Browse Source

Merge branch 'sasank/docs' of https://github.com/chsasank/lark into chsasank-sasank/docs

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.10.0
Erez Sh 4 years ago
parent
commit
0664cbd3d3
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      lark/lark.py

+ 4
- 4
lark/lark.py View File

@@ -27,7 +27,7 @@ class LarkOptions(Serialize):

"""
OPTIONS_DOC = """
**=== General ===**
**=== General Options ===**

start
The start symbol. Either a string, or a list of strings for multiple possible starts (Default: "start")
@@ -56,7 +56,7 @@ class LarkOptions(Serialize):
keep_all_tokens
Prevent the tree builder from automagically removing "punctuation" tokens (default: False)

**=== Algorithm ===**
**=== Algorithm Options ===**

parser
Decides which parser engine to use. Accepts "earley" or "lalr". (Default: "earley").
@@ -76,7 +76,7 @@ class LarkOptions(Serialize):
(it chooses consistently: greedy for tokens, non-greedy for rules)
- "explicit": The parser will return all derivations wrapped in "_ambig" tree nodes (i.e. a forest).

**=== Misc. / Domain Specific ===**
**=== Misc. / Domain Specific Options ===**

postlex
Lexer post-processing (Default: None) Only works with the standard and contextual lexers.
@@ -307,7 +307,7 @@ class Lark(Serialize):
self.save(f)

# TODO: merge with above
__doc__ += "\nOptions:\n" + LarkOptions.OPTIONS_DOC
__doc__ += "\n\n" + LarkOptions.OPTIONS_DOC

__serialize_fields__ = 'parser', 'rules', 'options'



Loading…
Cancel
Save