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 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.
9 years ago
..
passes reportLeftRecursion: Change handling of the |visitedRules| array 9 years ago
asts.js Make infinite loop and left recursion detectors work with named rules 9 years ago
javascript.js Convert PEG.js code to strict mode 9 years ago
opcodes.js Convert PEG.js code to strict mode 9 years ago
visitor.js Convert PEG.js code to strict mode 9 years ago