about summary refs log tree commit diff
path: root/.venv/lib/python3.12/site-packages/lark-stubs/exceptions.pyi
diff options
context:
space:
mode:
authorS. Solomon Darnell2025-03-28 21:52:21 -0500
committerS. Solomon Darnell2025-03-28 21:52:21 -0500
commit4a52a71956a8d46fcb7294ac71734504bb09bcc2 (patch)
treeee3dc5af3b6313e921cd920906356f5d4febc4ed /.venv/lib/python3.12/site-packages/lark-stubs/exceptions.pyi
parentcc961e04ba734dd72309fb548a2f97d67d578813 (diff)
downloadgn-ai-master.tar.gz
two version of R2R are here HEAD master
Diffstat (limited to '.venv/lib/python3.12/site-packages/lark-stubs/exceptions.pyi')
-rw-r--r--.venv/lib/python3.12/site-packages/lark-stubs/exceptions.pyi65
1 files changed, 65 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/lark-stubs/exceptions.pyi b/.venv/lib/python3.12/site-packages/lark-stubs/exceptions.pyi
new file mode 100644
index 00000000..1c04fa87
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/lark-stubs/exceptions.pyi
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+
+from typing import Dict, Iterable, Callable, Union, TypeVar, Tuple, Any, List, Set
+from .tree import Tree
+from .lexer import Token
+from .parsers.lalr_interactive_parser import InteractiveParser
+
+class LarkError(Exception):
+    pass
+
+
+class ConfigurationError(LarkError, ValueError):
+    pass
+
+
+class GrammarError(LarkError):
+    pass
+
+
+class ParseError(LarkError):
+    pass
+
+
+class LexError(LarkError):
+    pass
+
+
+T = TypeVar('T')
+
+class UnexpectedEOF(ParseError):
+    expected: List[Token]
+
+class UnexpectedInput(LarkError):
+    line: int
+    column: int
+    pos_in_stream: int
+    state: Any
+
+    def get_context(self, text: str, span: int = ...) -> str:
+        ...
+
+    def match_examples(
+            self,
+            parse_fn: Callable[[str], Tree],
+            examples: Union[Dict[T, Iterable[str]], Iterable[Tuple[T, Iterable[str]]]],
+            token_type_match_fallback: bool = False,
+            use_accepts: bool = False,
+    ) -> T:
+        ...
+
+
+class UnexpectedToken(ParseError, UnexpectedInput):
+    expected: Set[str]
+    considered_rules: Set[str]
+    interactive_parser: InteractiveParser
+    accepts: Set[str]
+
+class UnexpectedCharacters(LexError, UnexpectedInput):
+    allowed: Set[str]
+    considered_tokens: Set[Any]
+
+
+class VisitError(LarkError):
+    obj: Union[Tree, Token]
+    orig_exc: Exception