Commit graph

921 commits

Author SHA1 Message Date
David Majda 20a4fb2e7f Update version to 0.9.0 2015-08-30 08:22:26 +02:00
David Majda 7aa4d519db Update CHANGELOG.md 2015-08-30 08:22:26 +02:00
David Majda 9e8cb04c81 examples/arithmetics.pegjs: Remove trailing whitespace 2015-08-28 14:01:30 +02:00
David Majda a2d6488dae CHANGELOG.md: Add header 2015-08-28 11:24:48 +02:00
David Majda cee0d6a60a README.md: Update the "Compatibility" section
* Added io.js.
  * Added Edge.
  * Spelled out IE.
2015-08-24 11:16:10 +02:00
David Majda 787239e15c Update copyright years 2015-08-21 20:38:58 +02:00
David Majda be5d14eb27 Update jQuery.scrollTo's LICENSE file
I forgot to do that after upgrading jQuery.scrollTo itself.
2015-08-21 20:38:51 +02:00
David Majda a4b4a57569 Custom tracers specs: s/'/"/
The convention is to use single quotes only for strings containing code.
2015-08-21 17:38:04 +02:00
David Majda 1d38b973ee Custom tracers specs: Simplify code slightly 2015-08-21 17:36:34 +02:00
David Majda 671c22e80f Avoid using |console| in default tracer and its tests when not defined
This makes default tracer and its tests work in IE 8-10.
2015-08-21 17:32:37 +02:00
David Majda e8b379f945 Rewrite |trace| option tests to avoid using |console|
This makes them cleaner and also makes them work in IE 8-10.
2015-08-21 17:32:23 +02:00
David Majda cca41e6618 Quote |class| object literal key
It broke IE 8.
2015-08-21 16:36:43 +02:00
David Majda 6d82422045 Remove trailing comma in an array literal
It caused an additional newline in generated parsers in IE 8.
2015-08-21 16:02:23 +02:00
David Majda 969d39e8d9 Remove trailing commas in object literals
They broke IE 8-9.
2015-08-21 16:02:13 +02:00
David Majda 2d0ab55fa2 Use jQuery.scrollTo 2.1.1 2015-08-21 12:23:37 +02:00
David Majda b929f6ed97 Use jQuery 1.11.3 2015-08-21 12:20:46 +02:00
David Majda ae407572e6 Use jshint 2.8.0 2015-08-21 12:11:37 +02:00
David Majda 9cea4502f0 Use uglify-js 2.4.24 2015-08-21 12:04:03 +02:00
David Majda 698dba299a Use jasmine-node 1.14.5 2015-08-21 11:54:16 +02:00
David Majda d5f93a8282 Fix comment typo 2015-08-18 10:58:22 +02:00
David Majda a4772376fb Renumber bytecode instructions sequentially 2015-08-18 10:57:50 +02:00
David Majda ad27a300a8 Fix left recursion detection in sequences
Report left recursion also in cases where the recursive rule invocation
is not a direct element of a sequence, but is wrapped inside an
expression.

Fixes #359.
2015-08-17 10:58:37 +02:00
David Majda 9eb62051be package.json: Add the "license" attribute
Based on a pull request by Peter deHaan (@pdehaan):

  https://github.com/pegjs/pegjs/pull/338
2015-08-14 14:14:45 +02:00
David Majda cdeecf750f reportLeftRecursion: Change handling of the |visitedRules| array
Before this commit, the |reportLeftRecursion| pass was written in
functional style, passing the |visitedRules| array around as a parameter
and making a new copy each time a rule was visited. This apparently
caused performance problems in some deeply recursive grammars.

This commit makes it so that there is just one array which is shared
across all the visitor functions via a closure and modified as rules are
visited.

I don't like losing the functional style (it was elegant) but
performance is more important.

Fixes #203.
2015-08-07 14:52:22 +02:00
David Majda de1704f007 Replace |util.{puts,error}| by |console.{log,error}|
The |util.puts| and |util.error| functions are deprecated in Node.js
0.12.x.

Based on a pull request by Jan Stránský (@burningtree):

  https://github.com/pegjs/pegjs/pull/334
2015-08-06 17:23:07 +02:00
David Majda 4b154e177f Update character categories in grammars to Unicode 8.0.0 2015-08-06 16:42:26 +02:00
David Majda 703a352985 Change few testcase descriptions
Reaction to changes in 130cbcfaa3.
2015-08-06 16:38:38 +02:00
David Majda d7d7e87874 Make infinite loop and left recursion detectors work with named rules
Add missing |named| case to the visitor in lib/compiler/asts.js, which
makes the infinite loop and left recursion detectors work correctly with
named rules.

The missing case caused |make parser| to fail with:

  140:34: Infinite loop detected.
  make: *** [parser] Error 1
2015-08-06 16:32:08 +02:00
David Majda 130cbcfaa3 Rename asts.matchesEmpty to alwaysAdvancesOnSuccess and negate it
This makes it more clear that the function isn't about the input the
expression *matched* but about the input it *consumed* when it matched.

Based on a comment by @Mingun:

  https://github.com/pegjs/pegjs/pull/307#issuecomment-89512575
2015-07-31 13:48:46 +02:00
David Majda 317059760a Fix incorrect pass name in a spec description 2015-07-17 15:37:45 +02:00
David Majda 373f48c10f Fix small error in two testcases
Pointed out by @Mingun:

  6ce97457bf (commitcomment-10548605)
2015-07-17 15:37:26 +02:00
David Majda 6f2c75f7d8 Label specs: Improve structure and descriptions 2015-07-17 14:16:46 +02:00
David Majda 8487c9a0ff Label specs: Add missing test case 2015-07-17 11:43:30 +02:00
David Majda f4385da177 Label specs: Unify formatting with other code 2015-07-17 11:36:35 +02:00
David Majda ddff5feea3 Label specs: Simplify and regularize block-scoped label specs
There is no need to test 3 labels from the outside scope, 1 is enough.
2015-07-17 11:28:15 +02:00
David Majda 122d7b0737 README.md: Mention there is no backtracking for *, +, and ?
Based on a pull request by Jak Wings (@jakwings):

  https://github.com/pegjs/pegjs/pull/333
2015-07-10 13:56:44 +02:00
David Majda 5e6b5da4e9 Merge pull request #347 from mbaumgartl/errorstack
Add stack trace in engines based on V8
2015-07-03 13:05:41 +02:00
Marco Baumgartl 940a66fb38 Add stack trace in engines based on V8. Fixes #331 2015-06-18 14:21:48 +02:00
David Majda cb640cd0b2 Merge pull request #345 from arlolra/split4
Even more split outs from #339
2015-06-12 22:14:29 -07:00
Arlo Breault 12c169e7b5 Convert PEG.js code to strict mode
* Issues #323
2015-06-12 17:34:59 -07:00
Arlo Breault 1a32ae7bd0 Make PEG global explicit in helpers 2015-06-12 17:33:12 -07:00
Arlo Breault f4d2357609 Make jshint aware of node globals 2015-06-12 17:32:25 -07:00
Arlo Breault 7a94f97b46 Convert benchmark files to modules 2015-06-12 17:06:45 -07:00
David Majda 9815e49477 Merge pull request #343 from arlolra/split2
More split outs from #339
2015-06-08 10:27:23 -07:00
Arlo Breault 45e39c3ac8 Make generated parsers use strict mode
* Issue #324

 * JSHint complains about two possible strict violations. But are valid
   uses of `this`, so we suppress the warnings.
2015-06-08 10:22:14 -07:00
Arlo Breault 7285ccfd4e Remove block around initialize code
* In strict mode code, functions can only be declared at top level or
   immediately within another function.  This means functions defined in
   the initializer would throw.
2015-06-08 10:19:20 -07:00
Arlo Breault b079a056a2 Suppress linting newcap
* When the "use strict"; directive is set, constructors called without
   `new` will set the execution context to undefined. JSHint tries to be
   clever and forces on newcap. Suppress this behaviour, especially
   because newcap has gone the way of the dodo.
2015-06-08 10:19:02 -07:00
David Majda e0be643b7c Merge pull request #341 from arlolra/split
Split up the work from #339
2015-06-05 14:44:49 -07:00
Arlo Breault c71f723b3f Run make hint before testing 2015-06-05 14:41:38 -07:00
Arlo Breault 16756d9010 Run CI on newer version of node / iojs 2015-06-05 14:41:32 -07:00