261 Commits (master)

Author SHA1 Message Date
Futago-za Ryuu b7b87ea8ae Fix comma-dangle warning from ESLint 4 years ago
Futago-za Ryuu 8b7bff7ac3 Resolve linting errors
This also temporarliy disables linting '.ts' files due to the fact that the currect '.d.ts' files contain too many errors/warnings that need to be manually fixed, but since I'm going to be rewriting the whole module in TypeScript anyway, resolving these ESLint error's is a pointless waste of time.
5 years ago
Futago-za Ryuu 61377b1bd7 Azure Pipelines -> GitHub Actions
- Update CodeCov CI provider URL
- Remove Support for Azure Pipelines
- Add support for GitHub Actions
- Stop generating redundent reports
- Update @pegjs/publish-dev
5 years ago
Futago-za Ryuu cf022429bb Cleanup and Update
- Update all dependencies
- Use '@futagoza/*' ESLint configurations
- Remove redundent '@pegjs/eslint-config'
- Add TypeScript support to the bundler
5 years ago
Futago-za Ryuu d08e8bf52d Upgrade devDependencies
- codecov: 3.3.0
- eslint: 5.16.0
- mocha: 6.1.3
- mocha-junit-reporter: 1.22.0
- nyc: 14.0.0
- vuepress: 1.0.0-alpha.47
- sinon: 7.3.2
- @babel/core: 7.4.3
- @babel/preset-env: 7.4.3
- webpack: 4.30.0
5 years ago
Futago-za Ryuu 138fb96aed Use progress reporter for faster local testing 5 years ago
Futago-za Ryuu fae001e4ed Upgrade devDependencies:
- codecov: 3.2.0
- eslint: 5.15.3
- eslint-config-futagozaryuu: 5.8.0
- eslint-plugin-vue: 5.2.2
- mocha: 6.0.3
- nyc: 13.3.0
- vuepress: 1.0.0-alpha.44
- sinon: 7.3.0
- @babel/core: 7.4.0
- @babel/preset-env: 7.4.2
- webpack: 4.29.6
- webpack-cli: 3.3.0
5 years ago
Futago-za Ryuu 703fbbf8d0 Ensure mocha only finds test files 5 years ago
Futago-za Ryuu caa8b4cf7b Use html reporter for mocha browser 5 years ago
Futago-za Ryuu fcbfa39102 Ensure mocha runs on the browser 5 years ago
Futago-za Ryuu ed6690e5bb Use mocha/mocha.js 5 years ago
Futago-za Ryuu 6525825f2e Use mocha-loader 5 years ago
Futago-za Ryuu 7a78b7cfdf Upgrade dependencies 5 years ago
Futago-za Ryuu 9906f21c57 Update output for mocha-junit-reporter 5 years ago
Futago-za Ryuu 2dc0a1b64a Upgrade dependencies 5 years ago
Futago-za Ryuu bdde25a9e4
Set up CI with Azure Pipelines (#596)
* Add support for Azure Pipelines
* Remove Travis CI support
* coverage: Generate cobertura and lcov reports only
* Add support for Code Climate
5 years ago
Futago-za Ryuu 9751980261 Remove unrequired ESLint rules 6 years ago
Futago-za Ryuu 93ceeff597 General QOL changes
- Added 'test/package.json' for dependencies used by spec tests
- Changed package names of local tools to reflect actual usage
- Removed bins for local tools (using files via 'node [file]' command)
- Updated help text for the CLIs of local tools to reflect changes
- Updated READMEs for tools
- Moved babel dependencies to 'tools/bundle/package.json'
- 'tools/bundle' now only logs created and watching
- Updated scripts in root package.json
6 years ago
Futago-za Ryuu 390478d61e Move test/spec to test 6 years ago
Futago-za Ryuu 163ff20508 Move test/benchmark to tools/benchmark 6 years ago
Futago-za Ryuu 9c039ce79b Move test/impact to tools/impact 6 years ago
Futago-za Ryuu 14b8b76a79 runInContext -> evalModule 6 years ago
Futago-za Ryuu e64118f3b7 Update src/parser.pegjs
- use value plucking
- remove helpers not needed now
- types in OPS_* are now returned by *Operator
- RESERVED_WORDS is now a `Object<Identifier,true>`
- use ES2015+ JavaScript
- cleanup source code
6 years ago
Futago-za Ryuu 460f0cc5bc Implement value plucking
Resolves #235, #427, #545
6 years ago
Futago-za Ryuu dd044b8cfb remove extronous files 6 years ago
Futago-za Ryuu dd76ff85d4 Update execution files 6 years ago
Futago-za Ryuu be88239543 Move PEG.js to packages/pegjs
* Move PEG.js from . to packages/pegjs
* Update relevanr paths
* Remove pegjs-dev; Use pegjs directly
* Generate browser files at packages/pegjs/dist
* nyc: exclude website
* website: keep packages folder
* Root package.json is private now
6 years ago
Futago-za Ryuu 5e7134936b Merge the test suites into the website 6 years ago
Futago-za Ryuu 60f69d6558 Stop ESLint warnings
- about use of eval
- whitespace before comments
6 years ago
Futago-za Ryuu b31009f73d Use peg.util.reservedWords 6 years ago
Futago-za Ryuu 30cfa29553 Provide context to parser (#517) 6 years ago
Futago-za Ryuu 6500189d58 Report unused rules (Closes #200) 6 years ago
Futago-za Ryuu 851d8edfdd Implement warning emitter (Closes #327) 6 years ago
Futago-za Ryuu f4c67993f6 Added the Session API 6 years ago
Futago-za Ryuu 5476eca59f Moved AST and visitor classes 6 years ago
Futago-za Ryuu 4b6ceb2b46 Fix plugin test that replaces parser
This test broke down aftert I intergrated the AST utils directly into the Grammar class, then I had problems importing the PEG.js parser to use the Grammar class, but found a workaround using 'process.cwd()'
6 years ago
Futago-za Ryuu 9ecb21b749 stripLocation > stripProperties 6 years ago
Mingun 0dab14d652 Add ability to extract comments from the grammar (#511)
All comments stored in the `comments` property of the `grammar` node.
Comments extracted only if the `extractComments` options set to `true` when you generate parser.
This property is object with mapping start offset of comment to comment object, that looks like:

```js
{
  text: 'text in the comment, just after // or /* and before */',
  multiline: true|false,// true for /**/ comments, false for // comments
  location: location()
}
```
6 years ago
Futago-za Ryuu f5b323b401 Report consistent errors on look ahead + cached results
This should resolve issue #452, and is based entirely on a fix @nikku did on a local branch of PEG.js v0.10.0 (Currently at https://github.com/nikku/pegjs/tree/452-peg-js-0.10-fix).

Also his test case from #555 is included.

Fixes #452, Closes #555
6 years ago
Mingun 9b90fa1d81 Move all codegeneration from `generateBytecode` pass to `generateJs` pass (#459)
* Split 'consts' collection by content types into:

  - literals: for literal expressions, like `"a"`
  - classes: for character class expressions, like `[a]`
  - expectations: for constants describing expected values when parse failed
  - functions: for constants with function code

* Move any JavaScript code generation from 'generateBytecode' to 'generateJs'.
* Rename opcode 'MATCH_REGEXP' to 'MATCH_CLASS' (name reflects purpose, not implementation).
* Replace 'PUSH' opcode with 'PUSH_EMPTY_STRING' opcode because it is only used with empty strings
6 years ago
Futago-za Ryuu 7cdfc03e9f Added utility methods for objects
Before there used to be some internal utility methods for arrays and objects, but as the code base moved to ES5+ use  case only, these were removed in favour of native alternatives, but most of these were only beneficial for arrays.

This commit add's common utility methods for objects, and also exposes these as they can be used by plugin developer's on the PEG.js AST.
6 years ago
Futago-za Ryuu b0056d7a9f Merge branch 'master' of github.com:pegjs/pegjs 6 years ago
Mingun 4cc9185a78 Improve error when reserved word used as label (#552)
Before this commit error looks like (for input `start = break:'a'`)

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

After this error looks like

> Label can't be a reserved word "break".
6 years ago
Futago-za Ryuu 1434346332 Move require statement to the top 6 years ago
Mingun fde1c480f4 Use chai-like instead of own properties matcher (#550) 6 years ago
Mingun 534dc53ac2 Optimize redundant fail checks (#400)
eliminate unnecessary checks for the result of parse, when it can be statically determined
6 years ago
Futago-za Ryuu 92f1798308 Moved Babel options to .babelrc 6 years ago
Mingun 42ec335d13 Optimize silent fails: remove checks that always false (#399)
* Optimization: do not generate unreachable calls |peg$fail| and constants for it (local to the rule).
* Optimization: do not generate unreachable calls |peg$fail| and constants for it (non-local to rule).
6 years ago
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