Commit graph

1330 commits

Author SHA1 Message Date
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
fatfisz e3b7f0c3a9 Change "esm" to "es" 2017-06-11 18:48:52 +02:00
fatfisz aab928de91 Add support for ES modules 2017-06-11 18:48:52 +02:00
Futago-za Ryuu 35f3c5267a Merge pull request #490 from chearon/css-num-fix
CSS example: parse decimal form of nums correctly
2017-06-11 12:25:14 +01:00
Futago-za Ryuu f18cf30d76 Merge pull request #493 from AdhirRamjiawan/master
spelling error
2017-06-11 01:48:14 +01:00
Futago-za Ryuu 91c85d824d Merge pull request #494 from davidberneda/patch-1
Update arithmetics.pegjs
2017-06-09 21:52:31 +01:00
Futago-za Ryuu 624f87f66b README.md: Remove the notice about looking for a new maintainer [ci skip]
PEG.js has [a new maintainer](https://github.com/pegjs/pegjs/issues/503#issuecomment-303004127).
2017-05-22 20:27:04 +01:00
David Majda ba2f8bf3c2 README.md: Add a notice about looking for a new maintainer 2017-05-07 13:47:28 +02:00
David Berneda 962db9d090 Update arithmetics.pegjs
Allow spacing before digits like: "     2 * (3 + 4)"
2017-03-20 16:39:57 +01:00
Adhir Ramjiawan f861c2f476 spelling error 2017-03-08 08:56:56 +02:00
Caleb Hearon 770ca6e723 CSS example: parse decimal form of nums correctly
Before, 0.02 could get parsed as 0 and 0.02 when looking for nums+
2017-02-14 21:01:32 -05:00
David Majda 205c55d309 Tests: s/Spec/Test/
Missed in f5a372b075 (I probably grepped
case-sensitively).
2016-12-16 16:45:34 +01:00
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.
2016-12-16 14:25:41 +01:00
David Majda 9cc35d2cab Tests: DRY up tracing tests 2016-12-16 14:14:05 +01:00
David Majda 5d6bd75619 Tests: Use "to.be.{a,an}" instead of "expect(typeof ...)" 2016-12-16 13:43:22 +01:00
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.
2016-12-16 13:21:48 +01:00
David Majda 9f36131637 Use https: in links to majda.cz
This avoids redirects.
2016-12-08 10:45:07 +01:00
David Majda e0511a55d5 .travis.yml: Test also with Node.js 7.0.x 2016-12-08 10:31:12 +01:00
David Majda f982e1cfd1 README.md: Indicate that IE8 is unsupported
Should have been done as part of #441.
2016-12-08 10:26:30 +01:00
David Majda 95d1e0decf package.json: Use exact version of run-sequence
The package was added with a version range ("^") by mistake.
2016-12-08 10:23:11 +01:00
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.
2016-12-08 10:05:17 +01:00
David Majda 73de2c9384 Switch from Jasmine to Mocha & Chai
The switch is mostly mechanical, with assertions translated 1:1. The
biggest non-mechanical part is rewriting Jasmine custom matchers as Chai
helpers. The matchers were streamlined and simplified in the process and
their messages were made more in line with messages produced by built-in
Chai helpers.

Fixes #409.
2016-12-08 09:01:08 +01:00
David Majda 266f17d11c Adapt to using HTTPS on PEG.js website
PEG.js website is now served exclusively using HTTPS. Change protocol in
all links to it to avoid redirects.
2016-12-04 11:24:33 +01:00
David Majda a733beb933 Remove unnecessary escaping of "]" in a regexp
This fixes the following ESLint error, which started to appear after
eslint/eslint#7424 was fixed:

  /Users/dmajda/Programming/PEG.js/pegjs/lib/compiler/js.js
    37:17  error  Unnecessary escape character: \]  no-useless-escape

This should fix broken Travis CI builds:

  https://travis-ci.org/pegjs/pegjs/builds/180092802
2016-12-01 16:30:10 +01:00
David Majda b5bd30c813 gulpfile.js: Use "run-sequence" to run default tasks
Instead of specifying tasks that are part of the "default" task using
dependencies and running them in parallel, execute them serially using
"run-sequence". This makes things deterministic and ensures that all
messages from all tasks are seen in the output (which wasn't the case
before, leading to confusion).
2016-12-01 16:26:58 +01:00