10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-24 13:23:40 +01:00

Prepare for more complex handling of the transition

This commit is contained in:
Mickaël Véril 2019-11-22 14:42:19 +01:00
parent 41386795e1
commit f66d0c8be7

View File

@ -33,9 +33,10 @@ class dataFileBase(object):
def convertState(StateTablelist,firstState=state(1,1,"A_1")): def convertState(StateTablelist,firstState=state(1,1,"A_1")):
tmplst=[] tmplst=[]
for TexState in StateTablelist: for TexState in StateTablelist:
st=list(TexState.find("$").contents)[0] lst=list(TexState.find("$").contents)
m=re.match(r"^\^(?P<multiplicity>\d)(?P<GPS>\S+)",st) st=str(lst[0])
seq=m.groups() m=re.match(r"^\^(?P<multiplicity>\d)(?P<symm>[^\s\[(]*)\s*(?:\[(?:\\mathrm{)?(?P<special>\w)(?:})\])?\s*\((?P<type>[^\)]*)\)",st)
seq=m.group("multiplicity","symm")
tmplst.append(seq) tmplst.append(seq)
lst=[] lst=[]
for index,item in enumerate(tmplst): for index,item in enumerate(tmplst):