Exemple #1
0
 def __init__(self, ast=None, ctx=None):
     super().__init__(ast=ast, ctx=ctx)
     self._lookahead = None
     self._firstset = None
     self._follow_set = set()
     self.value = None
     self._nullability = self._nullable()
     if isinstance(self._nullability, int):  # Allow simple boolean values
         if self._nullability:
             self._nullability = Nullable.yes()
         else:
             self._nullability = Nullable.no()
Exemple #2
0
 def _nullable(self):
     return Nullable.of(self.exp)
Exemple #3
0
 def _nullable(self):
     return Nullable.any(self.options)
Exemple #4
0
 def _nullable(self):
     return Nullable.all(self.sequence)