Browse Source

BUGFIX affecting standalone generator (Issue #212)

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.6.4
Erez Shinan 7 years ago
parent
commit
86c8ad41c9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lark/load_grammar.py

+ 1
- 1
lark/load_grammar.py View File

@@ -172,7 +172,7 @@ class EBNF_to_BNF(Transformer_InPlace):

new_name = '__%s_%s_%d' % (self.prefix, type_, self.i)
self.i += 1
t = NonTerminal(Token('RULE', new_name, -1))
t = NonTerminal(new_name)
tree = ST('expansions', [ST('expansion', [expr]), ST('expansion', [t, expr])])
self.new_rules.append((new_name, tree, self.rule_options))
self.rules_by_expr[expr] = t


Loading…
Cancel
Save