pegjs/lib/compiler/passes
David Majda cdeecf750f reportLeftRecursion: Change handling of the |visitedRules| array
Before this commit, the |reportLeftRecursion| pass was written in
functional style, passing the |visitedRules| array around as a parameter
and making a new copy each time a rule was visited. This apparently
caused performance problems in some deeply recursive grammars.

This commit makes it so that there is just one array which is shared
across all the visitor functions via a closure and modified as rules are
visited.

I don't like losing the functional style (it was elegant) but
performance is more important.

Fixes #203.
2015-08-07 14:52:22 +02:00
..
generate-bytecode.js Convert PEG.js code to strict mode 2015-06-12 17:34:59 -07:00
generate-javascript.js Merge pull request #347 from mbaumgartl/errorstack 2015-07-03 13:05:41 +02:00
remove-proxy-rules.js Convert PEG.js code to strict mode 2015-06-12 17:34:59 -07:00
report-infinite-loops.js Rename asts.matchesEmpty to alwaysAdvancesOnSuccess and negate it 2015-07-31 13:48:46 +02:00
report-left-recursion.js reportLeftRecursion: Change handling of the |visitedRules| array 2015-08-07 14:52:22 +02:00
report-missing-rules.js Convert PEG.js code to strict mode 2015-06-12 17:34:59 -07:00