I am very new to lark and am trying to create a simple parser, but I am getting suck on a seemingly simple quesion, why does "No terminal defined for 'i' at line 2 col 1 int "i" 10" show up? Here is my grammar:
start: set_str | set_int COMMENT: ";" /[^\n]/* set_str: "str " STRING " " STRING set_int: "int " STRING " " NUMBER %import common.ESCAPED_STRING -> STRING %import common.SIGNED_NUMBER -> NUMBER %ignore COMMENT %ignore " " %ignore "\n" and the text input:
int "i" 10 ; this is a comment str "s" "test" I am new and do not know why this is not working, any tips would be available
also, just a smaller second question is there a way to get rid of the quotes around "i" and "s", because when I remove them they do not become escaped strings anymore.
*. And for your questioncommondefines another terminalCNAMEwhich is probably what you want for names.*?