Crash when default start rule has parameters
See original GitHub issue> ohm.grammar('G { Start<x> = x }').match('x')
TypeError: Cannot read property 'getExprType' of undefined
at Apply.pexprs.Apply._calculateExprType (/Users/dubroy/dev/cdg/ohm/src/pexprs-getExprType.js:112:28)
at Apply.pexprs.PExpr.getExprType (/Users/dubroy/dev/cdg/ohm/src/pexprs-getExprType.js:33:19)
at Apply.PExpr.newInputStreamFor (/Users/dubroy/dev/cdg/ohm/src/pexprs.js:39:23)
at Object.Grammar._match (/Users/dubroy/dev/cdg/ohm/src/Grammar.js:102:38)
at Object.Grammar.match (/Users/dubroy/dev/cdg/ohm/src/Grammar.js:93:22)
at repl:1:35
at REPLServer.defaultEval (repl.js:252:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:417:12)
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to troubleshoot kernel crashes, hangs, or reboots with ...
Configuring and manually crashing a system: Confirm a full vmcore is generated, and move on to configure the NMI related parameters. If only...
Read more >SetupDiag - Windows Deployment - Microsoft Learn
In the following example, SetupDiag is run with default parameters (online mode, results file is SetupDiagResults.log in the same folder ...
Read more >Remote Config Parameters and Conditions - Firebase - Google
Conditions are made up of one or more rules that must all evaluate to true for the condition to evaluate to true for...
Read more >Crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an ... but others are more subtle, like passing invalid...
Read more >Edit Virtual Machine Startup and Shutdown Settings in the ...
The default option is Use Defaults. A drop-down menu appears. Select Custom and configure the startup delay by clicking the default value ( ......
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
Not sure how we should handle this. I wonder if we should require that the default start rule for a grammar have no parameters.
After fixing #76, the error message you will get now is
Error: Wrong number of parameters for rule Start (expected 1, got 0)
. You can run the match by explicitly callingmatch('x', 'Start<"x">')
. Does that fix and close this issue (for now)?