def __init__(self,_name=''): Xfrm.__init__(self,_name) # finite-state-machine for recognizing node sequences self.fsm = FSM(8,True) # reduction rules are represented by a set of parrallel arrays self.offS = [] self.offE = [] self.props = [] self.sc = [] self.act = []
def __init__(self,_name=''): Xfrm.__init__(self,_name) # debug toggles self.trace = False self.trace_best = False # mappings, x and y sequences -> index self.xdct = SeqDct(vcb.spell_sc,'xdct') self.ydct = SeqDct(srseq_tostr,'ydct') # The parse maps self.srmap = [] self.srmap.append(SrMap("prelude",False,self.xdct,self.ydct)) self.srmap.append(SrMap("chain",False,self.xdct,self.ydct)) self.srmap.append(SrMap("subv",False,self.xdct,self.ydct)) self.srmap.append(SrMap("vobj",True,self.xdct,self.ydct)) self.srmap.append(SrMap("postlude",True,self.xdct,self.ydct))