This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
883 B

  1. from typing import List, Tuple, Union, Callable, Dict, Optional
  2. from lark import Tree
  3. from lark.grammar import RuleOptions
  4. class Grammar:
  5. rule_defs: List[Tuple[str, Tuple[str, ...], Tree, RuleOptions]]
  6. term_defs: List[Tuple[str, Tuple[Tree, int]]]
  7. ignore: List[str]
  8. class GrammarBuilder:
  9. global_keep_all_tokens: bool
  10. import_paths: List[Union[str, Callable]]
  11. def __init__(self, global_keep_all_tokens: bool = False, import_paths: List[Union[str, Callable]] = None) -> None: ...
  12. def load_grammar(self, grammar_text: str, grammar_name: str = ..., mangle: Callable[[str], str] = None) -> None: ...
  13. def do_import(self, dotted_path: Tuple[str, ...], base_path: Optional[str], aliases: Dict[str, str],
  14. base_mangle: Callable[[str], str] = None) -> None: ...
  15. def validate(self) -> None: ...
  16. def build(self) -> Grammar: ...