An error within the pathToHashKeys proceadure
See original GitHub issueWhen I run chevrotain, it gives me this error:
/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js:355
for (var t = 0; t < tokType.categoryMatches.length; t++) {
^
TypeError: Cannot read property 'length' of undefined
at pathToHashKeys (/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js:355:57)
at /Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js:431:42
at Object.forEach (/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/utils/utils.js:77:30)
at _loop_1 (/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js:430:29)
at lookAheadSequenceFromAlternatives (/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js:441:13)
at Object.getLookaheadPathsForOr (/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js:450:12)
at /Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/checks.js:377:40
at Object.reduce (/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/utils/utils.js:208:32)
at validateAmbiguousAlternationAlternatives (/Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/checks.js:374:24)
at /Users/pmk/codes/lumberjack/node_modules/chevrotain/lib/src/parse/grammar/checks.js:42:20
The codes are proprietary, so if you want to contact me to give you access to the the codes.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
chevrotain-parser/Lobby - Gitter
hello all, trying to process ABNF grammar in chevrotain, and am struggling a bit with how to represent a rule that has a...
Read more >Tips To Handle RPC Request Errors - Chainstack Blog
We are sharing different solutions to handle RPC request errors in your application: promise methods, retries, and backup providers.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @nilaymaj I will try to reproduce this using your minimal example
The
SEP
inSEP: () => this.CONSUME(Tokens.ListSeparator),
should be aTokenType
not a function that consumes a token.Closing this as none reproducible, possibly caused by invalid parameters…