Skip to content

Commit

Permalink
Fixes according to review notes
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Sep 24, 2023
1 parent aaf32b7 commit b7f1ebb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lark/lark.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ class LarkOptions(Serialize):
regex: bool
g_regex_flags: int
keep_all_tokens: bool
tree_class: Callable
tree_class: Optional[Callable[[str, Sequence], Any]]
parser: _ParserArgType
lexer: _LexerArgType
ambiguity: 'Literal["auto", "resolve", "explicit", "forest"]'
postlex: Optional[PostLex]
priority: 'Optional[Literal["auto", "normal", "invert"]]'
lexer_callbacks: Dict[str, Callable[[Token], Token]]
use_bytes: bool
ordered_sets: bool
edit_terminals: Optional[Callable[[TerminalDef], TerminalDef]]
import_paths: 'List[Union[str, Callable[[Union[None, str, PackageResource], str], Tuple[str, str]]]]'
source_path: Optional[str]
ordered_sets: bool

OPTIONS_DOC = """
OPTIONS_DOC = r"""
**=== General Options ===**
start
Expand Down Expand Up @@ -143,7 +143,7 @@ class LarkOptions(Serialize):
use_bytes
Accept an input of type ``bytes`` instead of ``str``.
ordered_sets
Should Earley use ordered-sets to achieve stable output (~10%% slower than regular sets. Default: True)
Should Earley use ordered-sets to achieve stable output (~10% slower than regular sets. Default: True)
edit_terminals
A callback for editing the terminals before parse.
import_paths
Expand Down
2 changes: 1 addition & 1 deletion lark/parser_frontends.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, Callable, Dict, Optional, Collection

from .exceptions import ConfigurationError, GrammarError, assert_config
from .utils import get_regexp_width, Serialize, OrderedSet
from .utils import get_regexp_width, Serialize
from .parsers.grammar_analysis import GrammarAnalyzer
from .lexer import LexerThread, BasicLexer, ContextualLexer, Lexer
from .parsers import earley, xearley, cyk
Expand Down

0 comments on commit b7f1ebb

Please sign in to comment.