Skip to content

Instantly share code, notes, and snippets.

@MegaIng
MegaIng / vanon1.py
Last active September 1, 2021 19:02 — forked from Drvanon/vanon1.py
LALR try for vanon (1)
from lark import Lark, UnexpectedToken, Token, UnexpectedCharacters
from lark.lexer import LexerThread, LexerState, LineCounter
grammar = r"""
start: _NL* _section+
_section: _HEADER _content* _HEADER
_HEADER: "--- SECTION ---" _NL
_content: number_list
| assign
| _other