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()
def _nullable(self): return Nullable.of(self.exp)
def _nullable(self): return Nullable.any(self.options)
def _nullable(self): return Nullable.all(self.sequence)