Construct from .lark grammar source (full bundle only).
Optionaloptions: LarkOptions | nullLook up a compiled terminal by name (undefined when unknown).
Lex text into Tokens without parsing. dont_ignore re-emits %ignore
tokens.
Optionaldont_ignore: boolean | nullParse text into a Tree / Token / null, or — with opts.transformer
(or a constructor-level transformer:) — the folded host value.
Optionalopts: ParseOptions & { transformer?: null }Parse text into a Tree / Token / null, or — with opts.transformer
(or a constructor-level transformer:) — the folded host value.
Parse text into a Tree / Token / null, or — with opts.transformer
(or a constructor-level transformer:) — the folded host value.
Parse into a RETAINED-arena handle whose nodes are addressed by u32
positions — the selective-query escape from the eager full-tree copy-out.
Optionalstart: string | nullSeat an interactive parser over text (lark parse_interactive): manual
token-level control of the parse. Omit text to feed every token yourself
via feedToken. LALR + built-in lexer only (Earley or a custom lexer
throws).
Optionaltext: string | nullOptionalstart: string | nullStream completed subtrees of the opts.on rule(s) to onSubtree as they
reduce; returns the number of subtrees emitted. onSubtree returning false
stops the parse cleanly.
Whether the instance was built with propagate_positions.
The resolved lexer name (auto already collapsed).
Tree data display names by id (introspection).
The declared start symbols.
Terminal type names by id (introspection).
StaticfromConstruct from a serialized tools.serialize grammar JSON string.
Optionaloptions: LarkOptions | null
A compiled grammar ready to parse. Reusable across parses. The PUBLIC surface; the generated
_parse*methods are internal plumbing and are not part of this contract.