426 Commits (b81396a904fef4992ecd9fdc2b77a0226e2d7ee4)

Author SHA1 Message Date
David Majda 24d38f74b9 Replaced two-level rule cache with a one-level one.
This leads to simpler code and also speeds up the benchmark suite execution by
5,89 % on V8.

Detailed results (benchmark suite totals):

---------------------------------
 Test #     Before       After
---------------------------------
      1   24,70 kB/s   26,14 kB/s
      2   24,49 kB/s   26,05 kB/s
      3   24,67 kB/s   25,99 kB/s
      4   24,65 kB/s   26,13 kB/s
      5   24,71 kB/s   26,14 kB/s
---------------------------------
Average   24,64 kB/s   26.10 kB/s
---------------------------------

Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.7 Safari/533.2
14 years ago
David Majda 74830d4f8f Sort expected strings in the error messages. 14 years ago
David Majda 37521cffa5 Error messages now do not contain duplicities. 14 years ago
David Majda 714512f232 Implemented generic AST node extension mechanism. 14 years ago
David Majda 1aa3d8e07e Implemented a nop (no operation) function and used it on few places. 14 years ago
David Majda 16f238a64d Fixed comment heading. 14 years ago
David Majda 3291c70d97 Added \uFEFF (BOM) to the definition of whitespace in the metagrammar.
The Rhino bug that prevented inclusion of \uFEFF among the whitespace characters
is no longer relevant here because we compile character classes into regexps
now, which avoids the infinite recursion.
14 years ago
David Majda 383c5acaa6 Replaced \xA0 by \u00A0 in the whitespace definition in the metagrammar.
This is purely stylistic change.
14 years ago
David Majda 20e230ca0e Killed *MatchFailure classes => simpler code. 14 years ago
David Majda 4f4bb34ded Implemented negative character classes (e.g. [^a-z]). 14 years ago
David Majda 22d2ac8ac2 Rewrote implementation of classes to be regexp-based. 14 years ago
David Majda 56ffa94cc7 PEG.buildParser reports left recursion (both direct and indirect). 14 years ago
David Majda 3a65316416 PEG.buildParser reports missing referenced rules. 14 years ago
David Majda 6bbd88088b Implemented and used PEG.ArrayUtils.each. 14 years ago
David Majda eae48caf91 Regenerated the grammar parser. 14 years ago
David Majda 6f510a0336 The cache does not remember match length but next position after the match.
This leads to simpler and faster code because it avoids one addition and
subtraction.
14 years ago
David Majda 796c98bf8e Changed order of parameters in the SyntaxError constructor to make creating error with unknown location easier. Also fixes bug with reporting of invalid ranges such as [b-a] in the metagrammar. 14 years ago
David Majda 00a258d246 Renamed "humanName" to "displayName". 14 years ago
David Majda a43d1b33e3 Bootstrapped the grammar parser, yay! I should have done this long ago. 14 years ago
David Majda 636ceb2719 Metagrammar recognizes JavaScript-like comments. 14 years ago
David Majda 7bf51eddf0 Removed trailing commas in object initializers (Google Closure does not like them). 14 years ago
David Majda 452243d450 Improved error reporting for predicates a bit. 14 years ago
David Majda 69906e9730 Do not recognize \uFEFF as whitespace in the metagrammar since it does not work with Rhino. 14 years ago
David Majda bddb65ab9b Improved & simplified error handling code. 14 years ago
David Majda b86a219c86 Ensure that the same grammar and start rule always generate exactly the same parser. 14 years ago
David Majda c3dd696a3e Initial commit. 14 years ago