Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lark-js should advise user when --start not passed rather than outputting a cryptic error #30

Open
turon opened this issue May 11, 2022 · 0 comments

Comments

@turon
Copy link

turon commented May 11, 2022

Trying to output a js parser for this matter.lark file fails with the following error:

$ ~/.local/bin/lark-js matter_grammar.lark -o matter_grammar.js
...
lark.exceptions.GrammarError: Using an undefined rule: NonTerminal('start')

Yet solving this is as simple as passing the correct start symbol with the -s flag with idl start symbol used by this .lark file:

$ ~/.local/bin/lark-js matter_grammar.lark -s idl -o matter_grammar.js

The lark-js should advise the user that the .lark file has no start symbol, and that the correct start symbol should be passed via --start rather than dumping a raw error backtrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant