You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
David Majda c6efb337f1 Fix bytecode built for nested sequences inside actions
In the bytecode generator, the |context.action| property wasn't
correctly reset when generating bytecode for sequence elements. As a
result, when a sequence was wrapped in an action and it contained
another sequence as an element, the generator thought that the inner
sequence was wrapped in an action too.

For example, the following grammar:

  start = ("a" "b") "c" { return "x"; }

was compiled as if it looked like this:

  start = ("a" "b" { return "x"; }) "c" { return "x"; }

This commit fixes the problem by resetting |context.action| correctly.

Fixes GH-168.
11 years ago
..
generate-bytecode.js Fix bytecode built for nested sequences inside actions 11 years ago
generate-javascript.js Merge pull request #196 from vrana/comma 11 years ago
remove-proxy-rules.js Move options handling from passes to |PEG.compiler.compile| 12 years ago
report-left-recursion.js Make |GrammarError| require work also in the browser version 12 years ago
report-missing-rules.js Make |GrammarError| require work also in the browser version 12 years ago