@@ -0,0 +1,1339 @@
+from lark import Lark%0A%0Agrammar = '''start: (%5Bblock%5D _NEWLINE)* %5Bblock%5D%0Ablock: (command %7C named_utterance %7C comment)%0Acomment: /%5Cs*#.*/%0A_NEWLINE: /%5C%5Cn/%0A_SPACE: (%22 %22 %7C %22%5C%5Ct%22)%0A_optsp: _SPACE*%0ANAME: /%5Ba-zA-Z%5D%5Ba-zA-Z0-9%5D*/%0Anamed_utterance: NAME _optsp %22:=%22 _optsp utterance%0Autterance: utterance_piece (_SPACE utterance_piece)*%0Autterance_piece: (WORD %7C utterance_reference %7C utterance_choices) %5Brepetition%5D %5Baction_substitute%5D%0Autterance_choices: %22(%22 _optsp utterance_choices_items _optsp %22)%22%0Autterance_choices_items: utterance (_optsp %22%7C%22 _optsp utterance _optsp)* %0Autterance_reference: %22%3C%22 WORD %22%3E%22%0Aaction_substitute: %22=%22 _optsp action%0Arepetition: %22_%22 (ZERO_OR_POSITIVE_INT %7C range)%0Arange: ZERO_OR_POSITIVE_INT %22_%22 ZERO_OR_POSITIVE_INT%0A%0Acommand: _optsp utterance _optsp %22=%22 _optsp action _optsp%0A%0Aaction: (expr _SPACE+)* expr%0Aexpr: (ESCAPED_STRING %7C binop %7C expr_grouping %7C keypress %7C literal %7C INTEGER %7C FLOAT)%0Aexpr_grouping: %22(%22 expr %22)%22%0Abinop: expr _optsp (%22+%22 %7C %22-%22 %7C %22*%22 %7C %22/%22 %7C %22//%22 %7C %22%25%22 %7C %22==%22 %7C %22!=%22) _optsp expr%0Akeypress: %22%7B%22 expr (%22,%22 _optsp expr)* %22%7D%22%0AZERO_OR_POSITIVE_INT: /%5B0-9%5D+/%0AINTEGER: /-?%5B0-9%5D+/%0AFLOAT: /-?(%5B0-9%5D+)?%5C.%5B0-9%5D+/%0Aliteral.-1: /%5B%5E,%7B%7D()%5Cs%22'%7C%5D+/%0A%0A%25import common.WORD   // imports from terminal library%0A%25import common.ESCAPED_STRING%0A'''%0A%0A%0Alark_grammar = Lark(grammar)%0Autterance_grammar = Lark(grammar, start='utterance')

add lark grammar skeleton