Open turon opened 2 years ago
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:
-s
idl
.lark
$ ~/.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.
lark-js
start
--start
Trying to output a js parser for this matter.lark file fails with the following error:
Yet solving this is as simple as passing the correct start symbol with the
-s
flag withidl
start symbol used by this.lark
file:The
lark-js
should advise the user that the.lark
file has nostart
symbol, and that the correctstart
symbol should be passed via--start
rather than dumping a raw error backtrace.