Esempio n. 1
0
File: match.py Progetto: vhb/pyrser
 def attach(self, s1: state.State, s2: state.State, sr: state.StateRegister):
     if self.t is not object:
         if self.iskindof:
             s1.matchKindType(self.t, s2)
         else:
             s1.matchType(self.t, s2)
         # to avoid artefact, store the minimal subelement to match
         s1.minsubelmt = len(self.attrs)
Esempio n. 2
0
File: match.py Progetto: vhb/pyrser
 def attach(self, s1: state.State, s2: state.State,
            sr: state.StateRegister):
     if self.t is not object:
         if self.iskindof:
             s1.matchKindType(self.t, s2)
         else:
             s1.matchType(self.t, s2)
         # to avoid artefact, store the minimal subelement to match
         s1.minsubelmt = len(self.attrs)