Commit graph

1354 commits

Author SHA1 Message Date
Futago-za Ryuu 280466cc7b Added Issue Template
Based on the example at https://github.com/stevemao/github-issue-templates/tree/master/checklist2
2017-11-29 18:34:19 +00:00
Futago-za Ryuu 9568522d9c Move guidelines to docs folder 2017-11-29 15:29:42 +00:00
Futago-za Ryuu 123a20a83c Updated ignored and published files 2017-11-28 20:42:01 +00:00
Futago-za Ryuu 37698d8981 Updated NPM scripts & Gulp tasks
- updated names & ordering
- set "gulp clean" to also remove generated examples
- added "gulp lint" to list of default tasks
2017-11-28 17:49:51 +00:00
Futago-za Ryuu b4e5b97a2e Disabled eslint rule 'prefer-spread' 2017-10-26 10:20:29 +01:00
Futago-za Ryuu 5f0001c3e5 Fix compatibility for older bins 2017-10-25 23:08:53 +01:00
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).
2017-10-25 19:19:42 +01:00
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'.
2017-10-25 02:24:11 +01:00
Futago-za Ryuu 50cbcd6704 Updated devDependencies
Was planning on doing this after 0.11 (see #497), but since I'm doing an overhaul of the development files now instead, might as well...
2017-10-24 18:49:04 +01:00
Futago-za Ryuu 35832f474f Updated gulpfile.js
- Updated glob for test files
- Updated HEADER var for generated browser build
- Inlined list of JS_FILES to lint
- Added helper 'execFile'
- Simplyfied 'gulp benchmark'
- Parser generator now use's 'bin/peg.js'
- Moved HEADER var into 'browser:build' function
- Simplyfied 'gulp browser:clean'
- removed dependency 'gulp-transform'
2017-10-24 16:38:10 +01:00
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.
2017-10-24 15:26:31 +01:00
Futago-za Ryuu abadaf4d5d Add test for empty grammars
This add's a test that ensures grammars without any rules are not accepted.
2017-10-20 19:01:19 +01:00
Futago-za Ryuu 96a386ff15 Merged documents for test suites 2017-10-15 02:36:10 +01:00
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.
2017-10-06 07:49:52 +01:00
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 */"
2017-10-02 06:32:20 +01:00
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.
2017-10-02 04:35:46 +01:00
Futago-za Ryuu a1ad351c2c Add extension for bin file
Fixes #535 (again ...)
2017-09-16 01:27:10 +01:00
Futago-za Ryuu 14948dad93 Update files field to include bin files
Closes #529, Fixes #535
2017-09-15 22:22:15 +01:00
felix 6a9a9a5d23 Add more explanation of balanced braces (#533) 2017-09-15 21:40:14 +01:00
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.
2017-09-15 21:36:19 +01:00
felix 369b8cdcc6 Clarify details for the execution environment for actions (#531)
* Clarify execution environment of actions and predicates
* Makes a new section for describing the common execution environment
* Add the new section to TOC
* Clarify start/end for predicates
* Clarify the scope of labels
2017-09-14 22:56:39 +01:00
felix ee00a1ae6a Check allowedStartRules exist. (#532)
Fixes #524
2017-09-12 21:21:35 +01:00
felix 958e15879d Reimplement offset() and add range(). (#528)
* Reimplement offset()
* Implement range()

Fixes #526, thanks @felix9
2017-09-04 05:48:17 +01:00
Futago-za Ryuu 5cde815341 Add default export for es format.
This is a minor addition that add's a default export statement (e.g. `export default { ... };`) for the es output format.

Fixes #525
2017-08-30 17:58:04 +01:00
Alan Mimms 4cdc6d6353 Do not indent backtick quoted strings in code blocks (#492)
* Do not indent backtick quoted strings in initializer or rule action code blocks
* Use const instead of var for ESLint happiness
* Fix ESLint issues for double quotes and indent6
2017-08-24 20:11:49 +01:00
Futago-za Ryuu 57bb28414e Merge pull request #509 from Mingun/simplify-bc
Simplify bytecode: remove unnecessary opcode.
2017-08-24 04:17:45 +01:00
Futago-za Ryuu 0ed8c6f89a Rewrote command line tool
- Split into 3 files: "peg.js", "options.js" and "usage.txt"
- Rewrote arguments parser and helpers to be more precise
- Any arguments after "--" will be passed to "options['--']" now
- Added negation options: "--no-cache" and "--no-trace"
- Added "bare" to accepted module formats
- Added 2 aliases for "--extra-options-file": "-c" and "--config"
- Added short options: "-a", "-f" and "-p"
- Reformatted help text in "usage.txt"
- Updated documentation related to command line options and normal options
- Changed "bin" field in "package.json" from "bin/pegjs" to "bin/peg"
- Added documentation note about command line options that are repeated
- Updated gulpfile.js, replacing "bin/pegjs" with "bin/*.js"

See #429, which was what I intended to fix/solve, but instead pushed back and did this instead.
2017-08-24 03:29:02 +01:00
Futago-za Ryuu d7d5f375f1 Removed redundant .eslintrc
See 55bcaa46ef
2017-08-23 09:41:45 +01:00
Futago-za Ryuu 48a0c37997 Fix link for dot character [ci skip] 2017-08-23 09:20:05 +01:00
Futago-za Ryuu 6661f6b958 Updated documentation
- Updated Badges
- Moved the introduction back to the top
- Added a title for the TOC list
- Added "Latest" sub-section (closes #521)
- Added "Case-insensitivity" sub-section (see #518)
- Added "Backtracking" sub-section (closes #438)
- Fixed link for . (dot character)
- Added a title for the links in the development section
- Added "Contribution" sub-section (closses #457)
- Updated the TOC list
2017-08-20 12:44:08 +01:00
Futago-za Ryuu b926be7d71 Added npm scripts for gulp tasks 2017-08-20 08:05:30 +01:00
Futago-za Ryuu dcf9790da0 Ensure 'package-lock.json' is never created
I've noticed on Travis that if a project is testing on Node.js 8 then NPM will automatically create the 'package-lock.json' file, but it's best not to use this file yet.

See 10ec7f0576
2017-08-20 06:57:10 +01:00
Futago-za Ryuu 30ea7d5ed0 Fix "gulp benchmark" for Windows
I'm presuming this task worked fine on Linux, but I use a Windows 10 laptop, and since Windows doesn't open extensionless files to check their shebang, this task failed.

Node.js on the other hand ignore's JavaScript files with a shebang, so this simple fix should make it work on all platforms now.
2017-07-22 16:01:13 +01:00
Futago-za Ryuu 55bcaa46ef Updated ESLint configuration files
- added "root" option to main config
- moved "env.commonjs" to root
2017-07-22 15:45:10 +01:00
Futago-za Ryuu 10ec7f0576 Removed package-lock.json
See npm/npm#16866
2017-07-22 15:10:26 +01:00
Futago-za Ryuu 8cf81b47b7 Ensure bin/*.js files use LF instead of CRLF 2017-07-17 11:30:54 +01:00
Futago-za Ryuu 1afe682c65 Merge pull request #510 from Mingun/group-location
Add location information to group AST node
2017-06-26 19:23:37 +01:00
Mingun c98fee1629 Add location information to group AST node 2017-06-24 23:34:50 +05:00
Mingun 575db38d1f Simplify bytecode: remove unnecessary opcode.
Now generated sources looks little better :)
2017-06-24 22:36:21 +05:00
Futago-za Ryuu 03912dc761 Create CODE_OF_CONDUCT.md 2017-06-14 23:37:38 +01:00
Futago-za Ryuu 928fdca6ac Added TOC's [skip ci] 2017-06-12 08:21:53 +01:00
Futago-za Ryuu 8856913ae8 Updated maintainer #503 2017-06-12 07:40:38 +01:00
Futago-za Ryuu 9658f4a92d Added package-lock.json 2017-06-12 07:09:27 +01:00
Futago-za Ryuu 081856cdeb Set "linebreak-style" rule to 0 2017-06-12 07:08:34 +01:00
Futago-za Ryuu 5e3ed79f95 Merge pull request #415 from sampsyo/master
Docs: try to explain error messages
2017-06-12 05:23:13 +01:00
Futago-za Ryuu 6939d1eb8d Merge pull request #481 from fatfisz/esm-support
Add support for ES modules
2017-06-12 02:13:06 +01:00
Futago-za Ryuu bc5c8a0f97 Add support for testing with Node.js 8 2017-06-12 02:12:38 +01:00
fatfisz 9c60380f86 Add info about es to the cmd tool 2017-06-11 19:03:33 +02:00
fatfisz d1f62596f1 Add info about the "es" target to the README 2017-06-11 18:49:40 +02:00
fatfisz c541911c04 Extract formats into array
Previously there was a very long condition.
2017-06-11 18:48:52 +02:00