This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |