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.

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

github_iconTop GitHub Comments

1reaction
pdubroycommented, Mar 17, 2016

Not sure how we should handle this. I wonder if we should require that the default start rule for a grammar have no parameters.

0reactions
mroedercommented, Mar 18, 2016

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 calling match('x', 'Start<"x">'). Does that fix and close this issue (for now)?

Read more comments on GitHub >

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

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