10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-23 21:03:54 +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")):
tmplst=[]
for TexState in StateTablelist:
st=list(TexState.find("$").contents)[0]
m=re.match(r"^\^(?P<multiplicity>\d)(?P<GPS>\S+)",st)
seq=m.groups()
lst=list(TexState.find("$").contents)
st=str(lst[0])
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)
lst=[]
for index,item in enumerate(tmplst):