MCPcopy Create free account
hub / github.com/ccxt/ccxt / LarkOptions

Class LarkOptions

python/ccxt/static_dependencies/lark/lark.py:47–232  ·  view source on GitHub ↗

Specifies the options for Lark

Source from the content-addressed store, hash-verified

45 always_accept: Iterable[str] = ()
46
47class LarkOptions(Serialize):
48 """Specifies the options for Lark
49
50 """
51
52 start: List[str]
53 debug: bool
54 strict: bool
55 transformer: 'Optional[Transformer]'
56 propagate_positions: Union[bool, str]
57 maybe_placeholders: bool
58 cache: Union[bool, str]
59 regex: bool
60 g_regex_flags: int
61 keep_all_tokens: bool
62 tree_class: Optional[Callable[[str, List], Any]]
63 parser: _ParserArgType
64 lexer: _LexerArgType
65 ambiguity: 'Literal["auto", "resolve", "explicit", "forest"]'
66 postlex: Optional[PostLex]
67 priority: 'Optional[Literal["auto", "normal", "invert"]]'
68 lexer_callbacks: Dict[str, Callable[[Token], Token]]
69 use_bytes: bool
70 ordered_sets: bool
71 edit_terminals: Optional[Callable[[TerminalDef], TerminalDef]]
72 import_paths: 'List[Union[str, Callable[[Union[None, str, PackageResource], str], Tuple[str, str]]]]'
73 source_path: Optional[str]
74
75 OPTIONS_DOC = r"""
76 **=== General Options ===**
77
78 start
79 The start symbol. Either a string, or a list of strings for multiple possible starts (Default: "start")
80 debug
81 Display debug information and extra warnings. Use only when debugging (Default: ``False``)
82 When used with Earley, it generates a forest graph as "sppf.png", if 'dot' is installed.
83 strict
84 Throw an exception on any potential ambiguity, including shift/reduce conflicts, and regex collisions.
85 transformer
86 Applies the transformer to every parse tree (equivalent to applying it after the parse, but faster)
87 propagate_positions
88 Propagates positional attributes into the 'meta' attribute of all tree branches.
89 Sets attributes: (line, column, end_line, end_column, start_pos, end_pos,
90 container_line, container_column, container_end_line, container_end_column)
91 Accepts ``False``, ``True``, or a callable, which will filter which nodes to ignore when propagating.
92 maybe_placeholders
93 When ``True``, the ``[]`` operator returns ``None`` when not matched.
94 When ``False``, ``[]`` behaves like the ``?`` operator, and returns no value at all.
95 (default= ``True``)
96 cache
97 Cache the results of the Lark grammar analysis, for x2 to x3 faster loading. LALR only for now.
98
99 - When ``False``, does nothing (default)
100 - When ``True``, caches to a temporary file in the local directory
101 - When given a string, caches to the path pointed by the string
102 regex
103 When True, uses the ``regex`` module instead of the stdlib ``re``.
104 g_regex_flags

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…