Commit graph

422 commits

Author SHA1 Message Date
David Majda 1aa3d8e07e Implemented a nop (no operation) function and used it on few places. 2010-04-11 14:16:38 +02:00
David Majda 16f238a64d Fixed comment heading. 2010-04-11 12:41:25 +02:00
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.
2010-04-11 11:45:05 +02:00
David Majda 383c5acaa6 Replaced \xA0 by \u00A0 in the whitespace definition in the metagrammar.
This is purely stylistic change.
2010-04-11 11:18:42 +02:00
David Majda 20e230ca0e Killed *MatchFailure classes => simpler code. 2010-03-21 15:48:28 +01:00
David Majda 4f4bb34ded Implemented negative character classes (e.g. [^a-z]). 2010-03-20 12:08:45 +01:00
David Majda 22d2ac8ac2 Rewrote implementation of classes to be regexp-based. 2010-03-20 11:24:04 +01:00
David Majda 56ffa94cc7 PEG.buildParser reports left recursion (both direct and indirect). 2010-03-19 17:10:54 +01:00
David Majda 3a65316416 PEG.buildParser reports missing referenced rules. 2010-03-19 11:15:53 +01:00
David Majda 6bbd88088b Implemented and used PEG.ArrayUtils.each. 2010-03-19 10:38:46 +01:00
David Majda eae48caf91 Regenerated the grammar parser. 2010-03-19 10:38:32 +01:00
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.
2010-03-19 10:12:35 +01:00
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. 2010-03-13 15:56:53 +01:00
David Majda 00a258d246 Renamed "humanName" to "displayName". 2010-03-13 15:36:04 +01:00
David Majda a43d1b33e3 Bootstrapped the grammar parser, yay! I should have done this long ago. 2010-03-13 15:18:57 +01:00
David Majda 636ceb2719 Metagrammar recognizes JavaScript-like comments. 2010-03-13 09:49:06 +01:00
David Majda 7bf51eddf0 Removed trailing commas in object initializers (Google Closure does not like them). 2010-03-08 14:44:46 +01:00
David Majda 452243d450 Improved error reporting for predicates a bit. 2010-03-08 12:15:52 +01:00
David Majda 69906e9730 Do not recognize \uFEFF as whitespace in the metagrammar since it does not work with Rhino. 2010-03-08 11:37:03 +01:00
David Majda bddb65ab9b Improved & simplified error handling code. 2010-03-08 09:58:23 +01:00
David Majda b86a219c86 Ensure that the same grammar and start rule always generate exactly the same parser. 2010-03-07 21:14:07 +01:00
David Majda c3dd696a3e Initial commit. 2010-03-07 20:41:02 +01:00