lib/rly/parse/rule_parser.rb in rly-0.2.1 vs lib/rly/parse/rule_parser.rb in rly-0.2.2

- old
+ new

@@ -47,9 +47,12 @@ rls.value = [r.value] + rl.value end @grammar.add_production(:rules, [:rule]) do |rl, r| rl.value = [r.value] end + @grammar.add_production(:rules, []) do |rl| + rl.value = [[]] + end @grammar.add_production(:rule, [:tokens]) do |r, tok| r.value = tok.value end @grammar.add_production(:tokens, [:ID, :tokens]) do |t, i, toks| t.value = [i.value.to_sym] + toks.value