def wrapper(self): name = impl.__name__ # remove the single leading and trailing underscore # that the parser generator added name = name[1:-1] ruleinfo = RuleInfo(name, impl, params, kwparams) return self._call(ruleinfo)
def _parse_rhs(self, ctx, exp): ruleinfo = RuleInfo(self.name, exp.parse, self.params, self.kwparams) result = ctx._call(ruleinfo) if isinstance(result, AST): defines = compress_seq(self.defines()) result._define([d for d, l in defines if not l], [d for d, l in defines if l]) return result
def wrapper(self): name = impl.__name__ # remove the single leading and trailing underscore # that the parser generator added name = name[1:-1] is_leftrec = getattr(impl, "is_leftrec", False) is_memoizable = getattr(impl, "is_memoizable", True) ruleinfo = RuleInfo(name, impl, is_leftrec, is_memoizable, params, kwparams) return self._call(ruleinfo)
def _parse_rhs(self, ctx, exp): ruleinfo = RuleInfo(self.name, exp.parse, self.is_leftrec, self.is_memoizable, self.params, self.kwparams) result = ctx._call(ruleinfo) return result