grammars
A few common Lark grammars.
read_grammar(grammar_file_name, base_grammar_path=GRAMMAR_PATH)
Read grammar file from default grammar path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
grammar_file_name
|
str
|
The name of the grammar file to read. |
required |
base_grammar_path
|
Path
|
The path to the directory containing the grammar file. |
GRAMMAR_PATH
|
Returns:
Type | Description |
---|---|
str
|
The contents of the grammar file. |