-
I'm trying to write a newline delimited language, but when i pass in single line program into parser it gives error since it's got EOF character, not newline character. so I tried to add EOF but it gave me this error. code: expr ("\n" | $)
| stmt File "/home/scarf/Repo/etc/pico/.venv/lib/python3.10/site-packages/lark/load_grammar.py", line 964, in _parse_grammar
raise GrammarError("Unexpected input at line %d column %d in %s: \n\n%s" %
lark.exceptions.GrammarError: Unexpected input at line 8 column 20 in <string>:
code: expr ("\n" | $)
^ i've read #237 #880 but despite their description, $ does not seems work. what should i do? my lark version is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
#880 is unmergered, so that is why it doesn't work. You can manually clone that PR and see if it works in your local situation, but it has a few fundamental issues that makes it currently not something that can be merged easily. |
Beta Was this translation helpful? Give feedback.
#880 is unmergered, so that is why it doesn't work. You can manually clone that PR and see if it works in your local situation, but it has a few fundamental issues that makes it currently not something that can be merged easily.