67 Commits (b4bf906cf8f9d6d954ce2caa527325247e1bc4ed)
 

Author SHA1 Message Date
David Majda b4bf906cf8 Modified README.md to indicate that IE6+ is supported. 14 years ago
David Majda 09291d6f0f Use "charAt(...)" instead of "[...]" for accessing string characters (compatibility with IE < 8). 14 years ago
David Majda 28459236aa Removed trailing comma that caused error in IE. 14 years ago
David Majda 4b51e6a6d3 Quote null characters in regexps, IE does not like them. 14 years ago
David Majda 7fc491412d Work around the fact that IE does not recognize "\v" in strings. 14 years ago
David Majda 6abda95a99 Made regexps generated for empty character classes ("[]" and "[^]") work in IE. 14 years ago
David Majda e79e869993 Compensate for IE's lack of Array.prototype.indexOf function. 14 years ago
David Majda 05381fedfa Fixed the inverted empty character class handling test. 14 years ago
David Majda e63f64a3d5 Make the generated parsers standalone (no runtime is required).
This and also speeds up the benchmark suite execution by 7.83 % on V8.

Detailed results (benchmark suite totals):

---------------------------------
 Test #     Before       After
---------------------------------
      1   26.17 kB/s   28.16 kB/s
      2   26.05 kB/s   28.16 kB/s
      3   25.99 kB/s   28.10 kB/s
      4   26.13 kB/s   28.11 kB/s
      5   26.14 kB/s   28.07 kB/s
---------------------------------
Average   26.10 kB/s   28.14 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 3f85a9ca84 Regenerated the metaparser with one-level rule cache. 14 years ago
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 6a194e8f68 Added example JavaScript parser. 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 db616f0b77 Made the "version" variable scope smaller. 14 years ago
David Majda c5cc545209 "rake metaparser" and "rake minify" now always generate the target files.
Until now, these tasks looked at the file times and generated the target files
only when they were older than the source files. This caused problems when I
mainupulated the lib/metagrammar.* files by hand sometimes, replaced them from
backups after screw-ups, etc.
14 years ago
David Majda 51232fd652 I don't like the .txt extension after all :-) 14 years ago
David Majda 9488291ac0 Converted README to GitHub Flavored Markdown.
Also added ".txt" extension to VERSION and LICENSE for more consistency.
14 years ago
David Majda 85bd98d846 Replaced .hgignore with .gitignore. 14 years ago
David Majda cfd46b622a Added a benchmark suite. 14 years ago
David Majda 751a33715d Added example CSS parser. 14 years ago
David Majda a1adbf0607 Added example JSON parser. 14 years ago
David Majda 20e230ca0e Killed *MatchFailure classes => simpler code. 14 years ago
David Majda f87bcd6332 Added tests for error messages displayed when a character class match fails. 14 years ago
David Majda 4f4bb34ded Implemented negative character classes (e.g. [^a-z]). 14 years ago
David Majda b3381b9352 Fixed test name. 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 a3ecf768ca Fixed missing referenced rules test. 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 2e94dce944 Improved tests of the "arithmetics" grammar. 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 8f2aa1e834 Fixed a bug in the example grammar where integers beginning with 0 were parsed as octal. 14 years ago
David Majda aff85fd228 Removed subtraction and division from the example grammar because of wrong associativity. 14 years ago
David Majda c35417c345 Added tag 0.3 for changeset 6c4975072e03 14 years ago
David Majda f4e0d0a5ce Updated version to 0.3. 14 years ago
David Majda 9d239db2d6 Simplified the example arithmetics grammar once more + addded comment. 14 years ago
David Majda 8f3fa8436d Wrote README. 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 bdfc2a57e7 Avoid ugliness in QUnit output. 14 years ago
David Majda d3104742d9 Fixed --start vs. --start-rule inconsistency between help and actual option processing code. 14 years ago
David Majda a43d1b33e3 Bootstrapped the grammar parser, yay! I should have done this long ago. 14 years ago