question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An error within the pathToHashKeys proceadure

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bd82commented, Feb 8, 2022

Thanks @nilaymaj I will try to reproduce this using your minimal example

0reactions
bd82commented, Jun 30, 2022

The SEP in SEP: () => this.CONSUME(Tokens.ListSeparator), should be a TokenType not a function that consumes a token.

Closing this as none reproducible, possibly caused by invalid parameters…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found