694 Commits (fa70e70ddf250a1dbb837d1e4b2cec249c8f1ff6)
 

Author SHA1 Message Date
David Majda fa70e70ddf Behavior specs cleanup: Improve choice specs 10 years ago
David Majda b3828919e2 Behavior specs cleanup: Improve sequence specs 10 years ago
David Majda 548209b48b Behavior specs cleanup: Improve simple predicate specs 10 years ago
David Majda 52144e48cb Behavior specs cleanup: Improve label specs 10 years ago
David Majda c5c44b9d0c Behavior specs cleanup: Improve text specs 10 years ago
David Majda bb708490a0 Behavior specs cleanup: Improve one or more specs 10 years ago
David Majda b9a3b44cf2 Behavior specs cleanup: Improve zero or more specs 10 years ago
David Majda c377eff876 Behavior specs cleanup: Improve optional specs 10 years ago
David Majda ade2c249f2 Behavior specs cleanup: Improve rule reference specs 10 years ago
David Majda 936d6453a5 Behavior specs cleanup: Improve dot specs 10 years ago
David Majda 74be12c657 Behavior specs cleanup: Improve character class specs 10 years ago
David Majda 54191fbf12 Behavior specs cleanup: Improve literal specs 10 years ago
David Majda 2faff0000e Behavior specs cleanup: Make |toParse| work without expected value
This means we can assert just "this string parses" and ignore the
returned value.
10 years ago
David Majda ce91921a1d Behavior specs cleanup: Don't describe named rules separately
While naming a rule creates a separate node on the AST level, it's not a
new concept on the user level, so its specs should be a part of rule
specs.
10 years ago
David Majda a597e65a66 Behavior specs cleanup: Reorder toplevel |describe| blocks
Reorder toplevel |describe| blocks to more closely match ordering used
in the PEG.js grammar and elsewhere in PEG.js.
10 years ago
David Majda 3308807d22 Behavior specs cleanup: Move spec/api/generated-parser-behavior.spec.js
Move spec/api/generated-parser-behavior.spec.js to
spec/behavior/generated-parser-behavior.spec.js. It's not an API test,
strictly speaking.
10 years ago
David Majda 84473db3ce Specs cleanup: Small description cleanups/fixes 10 years ago
David Majda cc8edd8892 README.md: Fix typo
Based on a pull request by Julien Valéry:

  https://github.com/pegjs/website/pull/14
10 years ago
David Majda fb7de36051 Update website URL
PEG.js website was moved from http://pegjs.majda.cz/ to http://pegjs.org/.
10 years ago
David Majda 2dedce52d6 Add info about the Bower package maintainer 10 years ago
David Majda 9a822528f9 Add Bower installation instructions 10 years ago
David Majda 178d56699a Update GitHub project URLs
See https://groups.google.com/d/msg/pegjs/4a6zWKQSG6U/n8Pm257Lz6wJ.

I didn't update CHANGELOG.md as I consider issue URLs there historical artifacts
;-)
10 years ago
David Majda 5a2ca2abc7 Add two missing blank lines 11 years ago
David Majda 5ce5f7a612 Specs cleanup: Use raw node types in |generateBytecode| specs
Use raw node types instead of humanized node names in |generateBytecode|
specs. This corresponds more closely to the level the specs are written
at.
11 years ago
David Majda 0977dd37a3 Reordering in visitors and their specs
Reorder visiting functions and their specs to more closely match
ordering used in the PEG.js grammar.
11 years ago
David Majda 850ddf5889 Specs cleanup: Simplify compiler passes specs
After 898a7b5a2d the specs mostly tested
the visitor implementation, not actual code in the passes.
11 years ago
David Majda 4ec9e6ba10 Remove useless test in the |reportLeftRecursion| pass
Empty sequences are not allowed anymore so we don't have to test for
them.
11 years ago
David Majda 898a7b5a2d Simplify visitors by providing default visit functions
The |visitor.build| function now supplies default visit functions for
visitors it builds. These functions don't do anything beside traversing
the tree and passing arguments around to child visit functions.

Having the default visit functions allowed to simplify several visitors.
11 years ago
David Majda 4a3b9cbb8d Require Node.js >= 0.10.0
Travis CI builds with Node.js 0.8.x started to fail:

  https://travis-ci.org/dmajda/pegjs/jobs/26691570

Rather than investigating what's wrong I decided to stop supporting Node
0.8.x. Node.js 0.10.x is here for over a year, which should be enough
time for everyone to upgrade in the fast-paced Node.js world.
11 years ago
David Majda e101e1b6f3 Specs cleanup: Implement generated parser API specs
The generated parser API specs are mostly extracted from
generated-parser.spec.js, which got renamed to
generated-parser-behavior.spec.js to better reflect its purpose.
11 years ago
David Majda 94c8b08acf Specs cleanup: Implement plugin API specs 11 years ago
David Majda d0ff834a3d Specs cleanup: Implement PEG.js API specs
Some parts were previously part of generated parser specs, these were
moved.
11 years ago
David Majda 0306a76152 Specs cleanup: Rename & simplify |varyAll|
Rename |varyAll| to |varyOptimizationOptions|, because that's what the
function does. Simplify as we don't need a fully generic solution.
11 years ago
David Majda 3d637173ee Specs cleanup: Split specs into unit and API specs
Unit specs are unit tests of internal stuff. API specs are tests of the
user-visible APIs and behavior.

I think it makes sense to make this distinction because then the public
API line is more clearly visible e.g. when using the specs as
documentation.
11 years ago
David Majda f457c41dd4 Declare the |j| variable before use in lib/utils/arrays.js
Until now it was inadvertently global.
11 years ago
David Majda 24394e3f91 Fix comment alignment in lib/compiler/passes/generate-javascript.js 11 years ago
David Majda 2b06476c69 Regenerate lib/parser.js after bytecode changes 11 years ago
David Majda dad1207c46 Improve semantics of the TEXT bytecode instruction
The TEXT instruction now replaces position at the top of the stack with
the input from that position until the current position. This is simpler
and cleaner semantics than the previous one, where TEXT also popped an
additional value from the stack and kept the position there.
11 years ago
David Majda a815a8b902 Implement additional PUSH_* bytecode instructions
Implement the following bytecode instructions:

  * PUSH_UNDEFINED
  * PUSH_NULL
  * PUSH_FAILED
  * PUSH_EMPTY_ARRAY

These instructions push simple JavaSccript values to the stack directly,
without going through constants. This makes the bytecode slightly
shorter and the bytecode generator somewhat simpler.

Also note that PUSH_EMPTY_ARRAY allows us to avoid a hack which protects
the [] constant from modification.
11 years ago
David Majda c6f0818d49 Use sentence case consistently in {spec,benchmark}/README.md headers 11 years ago
David Majda 4d456402be Small cleanup of benchmark/index.js
Update coding style to match the rest of PEG.js.
11 years ago
David Majda 811a5c0f01 Small cleanup of benchmark/runner.js
Update coding style to match the rest of PEG.js.
11 years ago
David Majda b901a5c37a Rewrite benchmark/README.md
More clarity, better grammar (hopefully).
11 years ago
David Majda f102814998 Rewrite spec/README.md
More clarity, better grammar (hopefully).
11 years ago
David Majda fc1d54d049 Convert benchmark/README to Markdown
It will look nicer on GitHub.
11 years ago
David Majda 24e1644c58 Convert spec/README to Markdown
It will look nicer on GitHub.
11 years ago
David Majda 85c8f386c1 Formatting 11 years ago
David Majda f03ba4bf4f generate-javascript.js: s/generateJavaScript/generateJavascript/
This makes the variable name in sync with pass name in lib/compiler.js.
11 years ago
David Majda 57f7fae684 Fix a bug in |stringEscape|
The |stringEscape| function both in lib/compiler/javascript.js and in
generated parsers didn't escape characters in the U+0100..U+107F and
U+1000..U+107F ranges.
11 years ago
David Majda 88e5f136e1 Utility functions cleanup: Cleanup lib/compiler/javascript.js 11 years ago