260 Commits (7d13580855b9d488297cca61a83d1c56a7b71345)

Author SHA1 Message Date
David Majda b105c43756 Define |global| object in different way in tests 11 years ago
David Majda 1279e87766 Simplify utility functions structure + do not export them as part of the PEG object 11 years ago
David Majda 5ab36f8018 Split the vendor directory 11 years ago
David Majda e59f3ba338 Split the source code into several files, introduce build system 11 years ago
David Majda 5e64d09a15 Renamed some properties of the |PEG| object 11 years ago
David Majda 1682a25b0d Move emitter utility functions out of |PEG.Compiler| 11 years ago
David Majda d7d1a0b28c Remove unused |PEG.ArrayUtils.range| utility function 11 years ago
David Majda af1968054b Implement semantic predicates 11 years ago
David Majda 4895f4f8e4 Treat the whole grammar as an AST node 11 years ago
David Majda 917cf1cf2a Start rule of the grammar is now implicitly its first rule 11 years ago
David Majda 70cf4cd94d Reset generated variable names for each rule parsing function 11 years ago
David Majda 66de889f4b Implement initializers 11 years ago
David Majda 718bcf5f87 Rename the |action| property of action AST nodes to |code| 11 years ago
David Majda 95735f2c97 Allow trailing semicolon (";") for rules 11 years ago
David Majda ee8c121676 Use labeled expressions and variables instead of $1, $2, etc. 11 years ago
David Majda 52704593cd Allow labeled expressions in the metagrammar (without any meaning yet) 11 years ago
David Majda 698564a3c2 Replace ":" after a rule name with "=" 11 years ago
David Majda 7fdf0492c7 Fixed error message for invalid character range + added test 11 years ago
David Majda 9bf86b89a6 Fix stupid mistakes in metagrammar-test.js 11 years ago
David Majda 33a1a7c1e9 Clean up class handling in the metagrammar and compiler 11 years ago
David Majda 137a4b4f53 Renamed |characters| -> |chars| (shorter, no loss of expressivity) 11 years ago
David Majda 76ed63c86e AST refactoring 6/6: Get rid of the |Grammar| namespace 11 years ago
David Majda b4bf49443a AST refactoring 5/6: Make AST classless 11 years ago
David Majda 1c7c5bb5da Correct variable name: "choice" -> "optional". 11 years ago
David Majda 85930cbcfe Reorder AST stuff more consistently and sensibly 11 years ago
David Majda e3aa4df090 Changed action parameter processing to avoid the arguments object. 11 years ago
David Majda b2f230fad2 Added Optional AST node. 11 years ago
David Majda e5df8284b5 Added AndPredicate AST node. 11 years ago
David Majda c3c1c79665 Added OneOrMore AST node. 11 years ago
David Majda 3f5cb8850c Fixed PEG.buildParser's documentation and added a test. 11 years ago
David Majda 48da65d08e PEG.buildParser now accepts grammars only in string format. 11 years ago
David Majda 927f2d65c9 Exception tests also test exception messages. 11 years ago
David Majda b5ac4f0c4a Refactored helpers for testing of thrown exceptions. 11 years ago
David Majda 4b51e6a6d3 Quote null characters in regexps, IE does not like them. 11 years ago
David Majda 7fc491412d Work around the fact that IE does not recognize "\v" in strings. 11 years ago
David Majda e79e869993 Compensate for IE's lack of Array.prototype.indexOf function. 11 years ago
David Majda 05381fedfa Fixed the inverted empty character class handling test. 11 years ago
David Majda e63f64a3d5 Make the generated parsers standalone (no runtime is required). 11 years ago
David Majda 74830d4f8f Sort expected strings in the error messages. 11 years ago
David Majda 37521cffa5 Error messages now do not contain duplicities. 11 years ago
David Majda 3291c70d97 Added \uFEFF (BOM) to the definition of whitespace in the metagrammar. 11 years ago
David Majda 383c5acaa6 Replaced \xA0 by \u00A0 in the whitespace definition in the metagrammar. 11 years ago
David Majda f87bcd6332 Added tests for error messages displayed when a character class match fails. 11 years ago
David Majda 4f4bb34ded Implemented negative character classes (e.g. [^a-z]). 11 years ago
David Majda b3381b9352 Fixed test name. 11 years ago
David Majda 22d2ac8ac2 Rewrote implementation of classes to be regexp-based. 11 years ago
David Majda 56ffa94cc7 PEG.buildParser reports left recursion (both direct and indirect). 11 years ago
David Majda a3ecf768ca Fixed missing referenced rules test. 11 years ago
David Majda 3a65316416 PEG.buildParser reports missing referenced rules. 11 years ago
David Majda 6bbd88088b Implemented and used PEG.ArrayUtils.each. 11 years ago