1156 Commits (b0a5db1ab964745add140632d72b8bd451612cf2)
 

Author SHA1 Message Date
David Majda d239bf0107 package.json: Add packages that will be needed soon
Add "express" and "morgan" packages, which will be needed by
soon-to-be-introduced spec server and benchmark server.

See #442.
8 years ago
David Majda 4e38617748 Pass the browser version through Babel
This will allow to use ES2015 constructs in PEG.js code.

See #442.
8 years ago
David Majda 16f38f6380 Drop Node 0.10.x & 0.12.x support
See #442.
8 years ago
David Majda 5ad1bc2add CSS example: Switch from first/rest to head/tail
Follow-up to e510ecc3d0.
8 years ago
David Majda f0657ba628 generated-parser-behavior.spec.js: Switch from first/rest to head/tail
Follow-up to these commits:

  e510ecc3d0
  a4a66a2e5b
8 years ago
David Majda 0d48ffca2b generated-parser-behavior.spec.js: s/==/===/ 8 years ago
David Majda c3e7072fa2 Remove unused arrays.pluck function 8 years ago
David Majda 062c6ae706 Escape backspace in regexp classes as "\b", not "\x08"
The "\x08" escaping is necessary only outside of classes (where "\b"
means "word boundary").
8 years ago
David Majda 1c71bf6cd7 spec/index.html: Add <!DOCTYPE html>
This ensures the specs are run in standards mode in Internet Explorer.
8 years ago
David Majda bd62ddf846 Use "[]" & "[^]" for empty character classes, not "(?!)" & "[\\S\\s]"
See #441.
8 years ago
David Majda 9c04c94c85 Escape vertical tab as "\v", not "\x0B"
See #441.
8 years ago
David Majda f36a667376 Remove "undefined" redefinition protection
See #441.
8 years ago
David Majda aa1a2e74cf Replace suitable for loops with Array methods (in /examples)
See #441.
8 years ago
David Majda 9fbb45a2c9 Replace suitable for loops with Array methods (in /benchmark)
See #441.
8 years ago
David Majda df5f86103e Replace suitable for loops with Array methods (in /spec)
See #441.
8 years ago
David Majda fad4ab74d1 Replace suitable for loops with Array methods (in /lib)
See #441.
8 years ago
David Majda 3e8bcbea73 Replace suitable for loops with Array methods (in /src)
See #441.
8 years ago
David Majda 1c3fbf6cb0 Replace "... instanceof Array" with "Array.isArray(...)"
See #441.
8 years ago
David Majda d346d2a66d Replace objects.keys with Object.keys
See #441.
8 years ago
David Majda 0059cc3bdd Replace arrays.some with Array.prototype.some
See #441.
8 years ago
David Majda d162fe1cfc Replace arrays.every with Array.prototype.every
See #441.
8 years ago
David Majda 5f65de92bc Replace arrays.map with Array.prototype.map
See #441.
8 years ago
David Majda b044a021c4 Replace arrays.each with Array.prototype.forEach
See #441.
8 years ago
David Majda 2a6a058c9c Merge pull request #440 from atavakoli/fix-js-example-logicalexpr
JavaScript example: Use LogicalExpression nodes for "&&" and "||"
8 years ago
Ali Tavakoli d914c7b150 JavaScript example: Use LogicalExpression nodes for "&&" and "||"
The buildLogicalExpression function was defined, but not used;
specifically, the Logical(AND|OR)Expression(NoIn)? rules were
constructing BinaryExpression nodes, but are now LogicalExpression
nodes as per the ESTree spec (es5.md).
8 years ago
David Majda bf08c6cbc3 JavaScript example: Declare built AST as compatible with ESTree
ESTree is now the canonical JavaScript AST format. Mozilla SpiderMonkey
Parser API, which we delared compatibility with before, is obsolete.
8 years ago
David Majda 567655e72f JavaScript example: Add "type" to ObjectExpression properties
Nodes representing ObjectExpression properties were missing the "type"
property (set to "Property") so let's add it.
8 years ago
David Majda 7fd273d893 Merge pull request #439 from atavakoli/fix-js-example-vardecl
Added 'kind' to VariableDeclaration in example
8 years ago
Ali Tavakoli 5f9bc6ed4d JavaScript example: Add "kind" to VariableDeclaration nodes
The JavaScript example grammar's VariableDeclaration nodes were missing
the "kind" member (which is always set to "var", according to the
ESTree spec).
8 years ago
David Majda 671166bbe8 Update version to 0.10.0 8 years ago
David Majda 86c040e05f Update CHANGELOG.md 8 years ago
David Majda 8003edafc9 Rename the "node" module format to "commonjs"
Parsers generated in this format use module.exports, so they are not
strictly CommonJS, but this is a common extension and the original name
would be confusing once Node.js implements ES2015 modules.
8 years ago
David Majda 8962dcfd16 Rename the "global" module format to "globals"
I think the new name is more widely used when describing the pattern.
8 years ago
David Majda 0478f8a6cf package.json: Sort files alphabetically 8 years ago
David Majda b77d33ca05 generate-js.js: Quote the "class" key in DESCRIBE_EXPECTATION_FNS
"class" is a reserved word. Having it as a key unquoted broke IE 8 (both
in standards and quirks mode) and IE 9 (in quirks mode).
8 years ago
David Majda 2a8544d86c README.md: Remove io.js from the list of compatible environments 8 years ago
David Majda 5c0f0add95 Downgrade eslint to 2.13.1
It turns out ESLint 3.x works only with Node.js >= 4, which breaks Travis
CI builds:

  https://travis-ci.org/pegjs/pegjs/builds/149205616
8 years ago
David Majda f09271493c Use jQuery.scrollTo 2.1.2 8 years ago
David Majda 0753d8d4d5 Use jQuery 1.12.4 8 years ago
David Majda 9446e07f6a Use uglify-js 2.7.0 8 years ago
David Majda a8d01e1834 Use eslint 3.2.0
Note the update required disabling the "no-control-regex" rule, which
started reporting following errors:

  /Users/dmajda/Programming/PEG.js/pegjs/lib/compiler/js.js
    22:16  error  Unexpected control character in regular expression  no-control-regex
    27:16  error  Unexpected control character in regular expression  no-control-regex
    28:16  error  Unexpected control character in regular expression  no-control-regex
    51:16  error  Unexpected control character in regular expression  no-control-regex
    52:16  error  Unexpected control character in regular expression  no-control-regex

  /Users/dmajda/Programming/PEG.js/pegjs/lib/parser.js
    76:16  error  Unexpected control character in regular expression  no-control-regex
    77:16  error  Unexpected control character in regular expression  no-control-regex
    90:16  error  Unexpected control character in regular expression  no-control-regex
    91:16  error  Unexpected control character in regular expression  no-control-regex
8 years ago
David Majda e6c3e7180f Use browserify 13.1.0 8 years ago
David Majda 2647f5789f generated-parser-behavior.spec.js: Test also with options.trace === true
Based on a pull request by @Mingun:

  https://github.com/pegjs/pegjs/pull/397
8 years ago
David Majda bf9d9561c4 Tighten "try ... catch" clauses in spec helpers
They wrapped too much code.
8 years ago
David Majda 67d85f2de8 Align names of compiler passes that detect infinite loops
Rename compiler passes as follows:

  reportLeftRecursion -> reportInfiniteRecursion
  reportInfiniteLoops -> reportInfiniteRepetition

This reflects the fact that both passes detect different ways of causing
the same problem (possible infinite loop when parsing).
8 years ago
David Majda 9717dc3417 Talk about "undefined rules" instead of "missing rules" internally
The new terminology is more precise and in line with commonly used
programming languages.

The change involves mainly renaming related compiler pass and files
associated with it.
8 years ago
David Majda e9cb23608d Split peg$buildException into two separate functions
This change reflects the fact that PEG.js-generated parsers really
produce two kinds of syntax errors:

  Structured errors

    Caused by match failures, trailing input, or calls of the "expected"
    function in parser code. Their messages have fixed format ("Expected
    ... but ... found.").

  Simple errors

    Caused by calls of the "error" function in parser code. Their
    messages don't have any fixed format.

Each kind of error now has a separate helper function which builds its
instances.
8 years ago
David Majda e03d92488a Set the "found" property of syntax errors produced by "error" to null
The property doesn't correspond to anything in the error's message.
8 years ago
David Majda 6ca546a44e Regenerate lib/parser.js 8 years ago
David Majda 75cd17ed58 bin/pegjs: Implement the --format option 8 years ago