213 Commits (a7a0a0d9ac4dc228a7b5805569d857da1336155f)

Author SHA1 Message Date
Mingun a7a0a0d9ac Bump devDependencies (#549)
- Removed: babel-preset-es2015@6.24.1
- Added: babel-preset-env@1.6.1
- Updated: gulp-mocha@5.0.0
- Updated: nyc@11.4.1
- Updated: vinyl-buffer@1.0.1
- Updated: vinyl-source-stream@2.0.0
6 years ago
Mingun 669f782a5f Partial fix #194 - nonsenses error messages with semantic predicates (#547)
* Remove stack manipulations from FAIL opcode and rename FAIL to EXPECT
* Always save the expected values regardless of the match result of expression
* Remove unnecessary check for match result in the `named` node
* Collect and process expectations from predicates
6 years ago
Futago-za Ryuu 1b20aa5427 Ensure usage of 'lib/peg.d.ts'
This commit ensures that all modules outside 'lib' are importing 'lib/peg.js' so that VS Code automatically gets 'lib/peg.d.ts'.

An alias module for 'lib/peg.js' called 'pegjs-dev' was made for test files at 'test/node_modules/pegjs-dev.js'
6 years ago
Mingun 3e89534bb7 Auto-add `allowedStartRules` to test options for `changeAST` and `reportError` methods if it not defined 6 years ago
Futago-za Ryuu 881eb67545 Removed redundant css files
The css files used in the benchmark contained 2 files for IE that contained syntax errors. These files weren't actually used by the benchmark, but were still in the repository.
7 years ago
Futago-za Ryuu 5f0001c3e5 Fix compatibility for older bins 7 years ago
Futago-za Ryuu e6d018a88d Update code format and style
This is related to my last commit. I've updated all the JavaScript files to satisfy 'eslint-config-futagozaryuu', my eslint configuration.

I'm sure I've probally missed something, but I've run all NPM scripts and Gulp tasks, fixed any bugs that cropped up, and updated some stuff (mainly related to generated messages), so as far as I can, tell this conversion is over (I know I've probally jixed it just by saying this ;P).
7 years ago
Futago-za Ryuu 3c6523ff83 Switched eslint configuration
Was using 'eslint-config-dmajda' by @dmajda, but since it's diffucult for me to use multiple styles across multiple projects, I'm switching to my own 'eslint-config-futagozaryuu'.
7 years ago
Futago-za Ryuu 9802bae15f test/impact: Add compatibility for older bin files
This ensures the impact test doesn't throw when testing against older commits that contain the bin files at their orignal locations.
7 years ago
Futago-za Ryuu abadaf4d5d Add test for empty grammars
This add's a test that ensures grammars without any rules are not accepted.
7 years ago
Futago-za Ryuu 96a386ff15 Merged documents for test suites 7 years ago
Futago-za Ryuu 5c36738a52 Rewrote test/impact as a Node.js script
"test/impact" was a bash script before, and used tools spefic to some systems, which required Window users to have more software installed.

This rewrite removes the bash script and add's a cross platform Node.js script that doesn't depend on platform-spefic tools.
7 years ago
Futago-za Ryuu 08bbd6d5b6 Moved "eslint-env node" to the root
It seem's kind of pointless setting the comment "/* eslint-env node */" at the top of only some JavaScript files when nearly all of them are Node.js releated, so I moved this option to the root level config, only leaving the 'lib' folder as "/* eslint-env commonjs */"
7 years ago
Futago-za Ryuu 5a833bd982 Moved all spec and benchmark tests
- Moved benchmark to test/benchmark
- Moved tests to test/spec
- Removed individual servers
- Implemented single test server
- Moved server assets to test/server
- Updated Gulpfile.js
- Moved tools/impact to test/impact

This commit move's nearly all code related to testing the PEG.js module into the test directory, and also ensures they run as they did before the move.
7 years ago
felix cb3c5f4473 Improve error message for unbalanced brace. (#534)
Currently, an open brace without a corresponding brace will emit this confusing error message:

> Expected "!", "$", "&", "(", "*", "+", ".", "/", "/*", "//", ";", "?", character class, code block, comment, end of line, identifier, literal, or whitespace but "{" found.

This change adds an error case to the grammar to make it clear what the problem is.
7 years ago
felix ee00a1ae6a Check allowedStartRules exist. (#532)
Fixes #524
7 years ago
felix 958e15879d Reimplement offset() and add range(). (#528)
* Reimplement offset()
* Implement range()

Fixes #526, thanks @felix9
7 years ago
Futago-za Ryuu 57bb28414e Merge pull request #509 from Mingun/simplify-bc
Simplify bytecode: remove unnecessary opcode.
7 years ago
Futago-za Ryuu 55bcaa46ef Updated ESLint configuration files
- added "root" option to main config
- moved "env.commonjs" to root
7 years ago
Mingun 575db38d1f Simplify bytecode: remove unnecessary opcode.
Now generated sources looks little better :)
7 years ago
David Majda 205c55d309 Tests: s/Spec/Test/
Missed in f5a372b075 (I probably grepped
case-sensitively).
7 years ago
David Majda 2942fa1867 Tests: Make tracing tests more specific
Check that the console and the default tracer are called with specific
arguments in given order. Previously the order of calls wasn't checked.
7 years ago
David Majda 9cc35d2cab Tests: DRY up tracing tests 7 years ago
David Majda 5d6bd75619 Tests: Use "to.be.{a,an}" instead of "expect(typeof ...)" 7 years ago
David Majda 6817f3b964 Tests: Require specific modules instead of the whole library
Requiring the whole library was a relict from the time where the tests
were exercising the browser build when run in the browser.
7 years ago
David Majda f5a372b075 Use "test" and "tests" instead of "spec" and "specs"
This reflects a convention used in most JavaScript projects. The change
involves renaming the "spec" directory, Gulp task, etc.
8 years ago
David Majda 23e04bb4f4 Jasmine: Delete remains the old test suite 12 years ago
David Majda 8ef5f08c90 Jasmine: Convert |removeProxyRules| compiler pass tests 12 years ago
David Majda eaf2af8e7b Jasmine: Convert |computeParams| compiler pass tests 12 years ago
David Majda 4edc9982cc Jasmine: Convert |computeVarNames| compiler pass tests 12 years ago
David Majda 1471df9a69 Jasmine: Convert |reportLeftRecursion| compiler pass tests 12 years ago
David Majda 2889ca72fc Jasmine: Convert |reportMissingRules| compiler pass tests 12 years ago
David Majda e030834a0e Delete test/compiler-test.js 12 years ago
David Majda 112e4122d0 Jasmine: Convert remaining error reporting tests 12 years ago
David Majda 94aaf4ec75 Jasmine: Convert error position reporting tests 12 years ago
David Majda 1825dd4a42 Jasmine: Convert start rule tests 12 years ago
David Majda 68bfeac134 Jasmine: Drop the idempotence test
The code this test covered is long gone.
12 years ago
David Majda f61813238d Jasmine: Convert complex example tests 12 years ago
David Majda 022a51f94e Jasmine: Convert cache tests 12 years ago
David Majda e9f7255d47 Jasmine: Convert initializer tests 12 years ago
David Majda f5f40f68d2 Jasmine: Convert choice matching tests 12 years ago
David Majda 1b0789fbae Jasmine: Convert sequence matching tests 12 years ago
David Majda ae8a89c9e4 Jasmine: Convert labeled matching tests 12 years ago
David Majda b013ba8cc9 Jasmine: Convert simple and matching tests 12 years ago
David Majda 343e9db525 Jasmine: Convert simple not matching tests 12 years ago
David Majda 2bb25efa44 Jasmine: Convert semantic and code tests 12 years ago
David Majda f04096189f Jasmine: Convert semantic not code tests 12 years ago
David Majda ccf31f8822 Jasmine: Convert optional matching tests 12 years ago
David Majda 669668fc1b Jasmine: Convert zero or more matching tests 12 years ago
David Majda 1ab06ff906 Jasmine: Convert one or more matching tests 12 years ago