Code simplification in keyword terminals support.
@@ -561,9 +561,7 @@ class Grammar(object):
# Change each string recognizer corresponding to the KEYWORD
# regex by the regex recognizer that match on word boundaries.
- for prod in self:
- if isinstance(prod, Terminal):
- term = prod
+ for term in self.terminals:
if isinstance(term.recognizer, StringRecognizer):
match = keyword_rec(term.recognizer.value, 0)
if match == term.recognizer.value:
