David Majda
fee58d0806
Behavior specs cleanup: Improve rule specs
2015-01-26 09:54:29 +01:00
David Majda
fa70e70ddf
Behavior specs cleanup: Improve choice specs
2015-01-24 20:04:49 +01:00
David Majda
b3828919e2
Behavior specs cleanup: Improve sequence specs
2015-01-24 20:02:06 +01:00
David Majda
548209b48b
Behavior specs cleanup: Improve simple predicate specs
2015-01-24 19:57:49 +01:00
David Majda
52144e48cb
Behavior specs cleanup: Improve label specs
2015-01-24 19:57:49 +01:00
David Majda
c5c44b9d0c
Behavior specs cleanup: Improve text specs
2015-01-24 19:57:49 +01:00
David Majda
bb708490a0
Behavior specs cleanup: Improve one or more specs
2015-01-24 19:57:49 +01:00
David Majda
b9a3b44cf2
Behavior specs cleanup: Improve zero or more specs
2015-01-24 19:57:49 +01:00
David Majda
c377eff876
Behavior specs cleanup: Improve optional specs
2015-01-24 19:57:48 +01:00
David Majda
ade2c249f2
Behavior specs cleanup: Improve rule reference specs
2015-01-24 19:57:48 +01:00
David Majda
936d6453a5
Behavior specs cleanup: Improve dot specs
2015-01-24 19:57:48 +01:00
David Majda
74be12c657
Behavior specs cleanup: Improve character class specs
2015-01-24 19:57:48 +01:00
David Majda
54191fbf12
Behavior specs cleanup: Improve literal specs
2015-01-24 19:57:48 +01:00
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.
2015-01-12 16:40:28 +01:00
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.
2015-01-12 16:40:28 +01:00
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.
2015-01-12 16:40:28 +01:00
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.
2015-01-12 16:39:56 +01:00
David Majda
84473db3ce
Specs cleanup: Small description cleanups/fixes
2015-01-12 14:18:11 +01:00
David Majda
cc8edd8892
README.md: Fix typo
...
Based on a pull request by Julien Valéry:
https://github.com/pegjs/website/pull/14
2015-01-09 16:03:36 +01:00
David Majda
fb7de36051
Update website URL
...
PEG.js website was moved from http://pegjs.majda.cz/ to http://pegjs.org/ .
2014-12-15 15:28:57 +01:00
David Majda
2dedce52d6
Add info about the Bower package maintainer
2014-12-12 14:06:40 +01:00
David Majda
9a822528f9
Add Bower installation instructions
2014-12-12 14:06:11 +01:00
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
;-)
2014-11-28 13:56:47 +01:00
David Majda
5a2ca2abc7
Add two missing blank lines
2014-06-07 14:20:53 +02:00
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.
2014-06-07 14:17:11 +02:00
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.
2014-06-07 14:06:42 +02:00
David Majda
850ddf5889
Specs cleanup: Simplify compiler passes specs
...
After 898a7b5a2d
the specs mostly tested
the visitor implementation, not actual code in the passes.
2014-06-07 10:50:55 +02:00
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.
2014-06-07 10:50:55 +02:00
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.
2014-06-04 07:41:00 +02:00
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.
2014-06-04 07:37:19 +02:00
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.
2014-06-03 20:16:27 +02:00
David Majda
94c8b08acf
Specs cleanup: Implement plugin API specs
2014-06-03 20:16:27 +02:00
David Majda
d0ff834a3d
Specs cleanup: Implement PEG.js API specs
...
Some parts were previously part of generated parser specs, these were
moved.
2014-06-03 20:16:27 +02:00
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.
2014-06-03 20:16:16 +02:00
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.
2014-05-23 12:57:41 +02:00
David Majda
f457c41dd4
Declare the |j| variable before use in lib/utils/arrays.js
...
Until now it was inadvertently global.
2014-05-17 08:00:21 +02:00
David Majda
24394e3f91
Fix comment alignment in lib/compiler/passes/generate-javascript.js
2014-05-17 07:54:16 +02:00
David Majda
2b06476c69
Regenerate lib/parser.js after bytecode changes
2014-05-16 13:34:53 +02:00
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.
2014-05-16 13:30:03 +02:00
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.
2014-05-16 13:28:29 +02:00
David Majda
c6f0818d49
Use sentence case consistently in {spec,benchmark}/README.md headers
2014-05-10 16:40:39 +02:00
David Majda
4d456402be
Small cleanup of benchmark/index.js
...
Update coding style to match the rest of PEG.js.
2014-05-10 16:22:41 +02:00
David Majda
811a5c0f01
Small cleanup of benchmark/runner.js
...
Update coding style to match the rest of PEG.js.
2014-05-10 16:20:12 +02:00
David Majda
b901a5c37a
Rewrite benchmark/README.md
...
More clarity, better grammar (hopefully).
2014-05-09 15:09:54 +02:00
David Majda
f102814998
Rewrite spec/README.md
...
More clarity, better grammar (hopefully).
2014-05-09 15:09:53 +02:00
David Majda
fc1d54d049
Convert benchmark/README to Markdown
...
It will look nicer on GitHub.
2014-05-09 14:41:00 +02:00
David Majda
24e1644c58
Convert spec/README to Markdown
...
It will look nicer on GitHub.
2014-05-09 14:37:05 +02:00
David Majda
85c8f386c1
Formatting
2014-05-09 13:40:50 +02:00
David Majda
f03ba4bf4f
generate-javascript.js: s/generateJavaScript/generateJavascript/
...
This makes the variable name in sync with pass name in lib/compiler.js.
2014-05-08 20:28:32 +02:00
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.
2014-05-08 20:28:32 +02:00