diff --git a/tatsu/contexts.py b/tatsu/contexts.py index 06458c41..f5d0f962 100644 --- a/tatsu/contexts.py +++ b/tatsu/contexts.py @@ -569,6 +569,7 @@ def rule(self): @property def memokey(self): + self.tokenizer.eat_whitespace() return MemoKey(self._pos, self.rule, self.substate) def _memoize(self, key, memo): diff --git a/tatsu/tokenizing.py b/tatsu/tokenizing.py index 918f0821..bc7077f5 100644 --- a/tatsu/tokenizing.py +++ b/tatsu/tokenizing.py @@ -40,6 +40,9 @@ def current(self): def token(self): return self.current + def eat_whitespace(self): + raise NotImplementedError + def next(self): raise NotImplementedError