Comments (1)
This particular grammar was copied from a paper/book to test against Jison and doesn't necessarily compile/work-as-expected.
This type of activity will happen more often, so Jison has been augmented to provide a slightly better error report:
$ node dist/cli-cjs.js --main examples/test-ll2-arrows-fail.jison
W:\Users\Ger\Projects\sites\library.visyond.gov\80\lib\tooling\jison\dist\cli-cjs.js:26664
throw err;
^
JisonParserError:
rule id should be followed by a colon instead of an arrow:
please adjust your grammar to use this format:
rule_id : terms { optional action code }
| terms { optional action code }
...
;
Erroneous area:
38: S → G;
^^....^
39:
40: G → P
at Object.parseError (...\jison\dist\cli-cjs.js:21184:15)
at Object.yyError (...\jison\dist\cli-cjs.js:21343:25)
at Object.parser__PerformAction (...\jison\dist\cli-cjs.js:19293:14)
at Object.parse (...\jison\dist\cli-cjs.js:22544:40)
at Object.parse (...\jison\dist\cli-cjs.js:25426:23)
at autodetectAndConvertToJSONformat (...\jison\dist\cli-cjs.js:26617:32)
at new Jison_Generator (...\jison\dist\cli-cjs.js:34893:15)
at Object.generateParserString (...\tooling\jison\dist\cli-cjs.js:35435:25)
at processInputFile (...\tooling\jison\dist\cli-cjs.js:35350:30)
at Object.cliMain [as main] (...\tooling\jison\dist\cli-cjs.js:35428:13)
from jison.
Related Issues (20)
- Generate lexer/parser in different programming language
- build problem: @gerhobbelt/recast should require @gerhobbelt/esprima
- Rename project, new identity.
- arrow notation barfs on comments HOT 8
- `lexer.conditions[K].rules` grows with each call to parse HOT 7
- Git version looks older than NPM HOT 4
- Question: jison-gho debugger HOT 1
- Do parsers share a global state? HOT 1
- Parser source produced by generate API is different from CLI output HOT 1
- suggestion: typescript compilable to WASM HOT 6
- make esprima errors more intelligible (caused by faults in user action code test-parse-passes during grammar compile)
- Add unit tests to directly verify feature stripper generating compiling-and-running output
- Doesn't seem to pick longest possible match HOT 1
- Using "?." and "??" JS operators in action code blocks ?
- TypeError: yylexer.mergeLocationInfo is not a function HOT 1
- Use sub part of the parser HOT 2
- How is possible to implement C-like pre-processor macros ?
- NPM warnings about vulnerabilities
- Can't parse postgresql grammar and missing error location HOT 2
- Decorator error when using `@` variables in actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jison.