A top Spanish judge has charged two Basque legislators with membership of the armed separatist group ETA, a court source said.