types-antlr4-python3-runtime 4.13.0.20240116__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. types-antlr4-python3-runtime-4.13.0.20240116/CHANGELOG.md +4 -0
  2. types-antlr4-python3-runtime-4.13.0.20240116/MANIFEST.in +1 -0
  3. types-antlr4-python3-runtime-4.13.0.20240116/PKG-INFO +37 -0
  4. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/BufferedTokenStream.pyi +39 -0
  5. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/CommonTokenFactory.pyi +14 -0
  6. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/CommonTokenStream.pyi +13 -0
  7. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/FileStream.pyi +8 -0
  8. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/InputStream.pyi +21 -0
  9. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/IntervalSet.pyi +19 -0
  10. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/LL1Analyzer.pyi +26 -0
  11. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/Lexer.pyi +64 -0
  12. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/ListTokenSource.pyi +19 -0
  13. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/METADATA.toml +6 -0
  14. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/Parser.pyi +74 -0
  15. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/ParserInterpreter.pyi +36 -0
  16. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/ParserRuleContext.pyi +41 -0
  17. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/PredictionContext.pyi +87 -0
  18. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/Recognizer.pyi +27 -0
  19. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/RuleContext.pyi +28 -0
  20. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/StdinStream.pyi +4 -0
  21. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/Token.pyi +48 -0
  22. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/TokenStreamRewriter.pyi +53 -0
  23. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/Utils.pyi +2 -0
  24. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/__init__.pyi +32 -0
  25. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/_pygrun.pyi +4 -0
  26. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATN.pyi +29 -0
  27. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATNConfig.pyi +44 -0
  28. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATNConfigSet.pyi +44 -0
  29. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATNDeserializationOptions.pyi +9 -0
  30. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATNDeserializer.pyi +48 -0
  31. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATNSimulator.pyi +17 -0
  32. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATNState.pyi +99 -0
  33. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ATNType.pyi +7 -0
  34. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/LexerATNSimulator.pyi +87 -0
  35. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/LexerAction.pyi +82 -0
  36. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/LexerActionExecutor.pyi +15 -0
  37. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/ParserATNSimulator.pyi +133 -0
  38. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/PredictionMode.pyi +41 -0
  39. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/SemanticContext.pyi +49 -0
  40. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/Transition.pyi +101 -0
  41. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/atn/__init__.pyi +0 -0
  42. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/dfa/DFA.pyi +21 -0
  43. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/dfa/DFASerializer.pyi +17 -0
  44. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/dfa/DFAState.pyi +23 -0
  45. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/dfa/__init__.pyi +0 -0
  46. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/error/DiagnosticErrorListener.pyi +20 -0
  47. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/error/ErrorListener.pyi +19 -0
  48. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/error/ErrorStrategy.pyi +56 -0
  49. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/error/Errors.pyi +64 -0
  50. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/error/__init__.pyi +0 -0
  51. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/Chunk.pyi +12 -0
  52. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/ParseTreeMatch.pyi +16 -0
  53. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/ParseTreePattern.pyi +15 -0
  54. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/ParseTreePatternMatcher.pyi +44 -0
  55. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/RuleTagToken.pyi +17 -0
  56. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/TokenTagToken.pyi +9 -0
  57. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/Tree.pyi +51 -0
  58. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/Trees.pyi +31 -0
  59. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/tree/__init__.pyi +0 -0
  60. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/xpath/XPath.pyi +67 -0
  61. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/xpath/XPathLexer.pyi +28 -0
  62. types-antlr4-python3-runtime-4.13.0.20240116/antlr4-stubs/xpath/__init__.pyi +0 -0
  63. types-antlr4-python3-runtime-4.13.0.20240116/setup.cfg +4 -0
  64. types-antlr4-python3-runtime-4.13.0.20240116/setup.py +51 -0
  65. types-antlr4-python3-runtime-4.13.0.20240116/types_antlr4_python3_runtime.egg-info/PKG-INFO +37 -0
  66. types-antlr4-python3-runtime-4.13.0.20240116/types_antlr4_python3_runtime.egg-info/SOURCES.txt +66 -0
  67. types-antlr4-python3-runtime-4.13.0.20240116/types_antlr4_python3_runtime.egg-info/dependency_links.txt +1 -0
  68. types-antlr4-python3-runtime-4.13.0.20240116/types_antlr4_python3_runtime.egg-info/top_level.txt +1 -0
@@ -0,0 +1,4 @@
1
+ ## 4.13.0.20240116 (2024-01-16)
2
+
3
+ Add stubs for antlr4 (#11192)
4
+
@@ -0,0 +1 @@
1
+ include CHANGELOG.md
@@ -0,0 +1,37 @@
1
+ Metadata-Version: 2.1
2
+ Name: types-antlr4-python3-runtime
3
+ Version: 4.13.0.20240116
4
+ Summary: Typing stubs for antlr4-python3-runtime
5
+ Home-page: https://github.com/python/typeshed
6
+ License: Apache-2.0 license
7
+ Project-URL: GitHub, https://github.com/python/typeshed
8
+ Project-URL: Changes, https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/antlr4-python3-runtime.md
9
+ Project-URL: Issue tracker, https://github.com/python/typeshed/issues
10
+ Project-URL: Chat, https://gitter.im/python/typing
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Typing :: Stubs Only
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+
17
+ ## Typing stubs for antlr4-python3-runtime
18
+
19
+ This is a [PEP 561](https://peps.python.org/pep-0561/)
20
+ type stub package for the [`antlr4-python3-runtime`](https://github.com/antlr/antlr4) package.
21
+ It can be used by type-checking tools like
22
+ [mypy](https://github.com/python/mypy/),
23
+ [pyright](https://github.com/microsoft/pyright),
24
+ [pytype](https://github.com/google/pytype/),
25
+ PyCharm, etc. to check code that uses
26
+ `antlr4-python3-runtime`.
27
+
28
+ This version of `types-antlr4-python3-runtime` aims to provide accurate annotations
29
+ for `antlr4-python3-runtime==4.13.*`.
30
+ The source for this package can be found at
31
+ https://github.com/python/typeshed/tree/main/stubs/antlr4-python3-runtime. All fixes for
32
+ types and metadata should be contributed there.
33
+
34
+ See https://github.com/python/typeshed/blob/main/README.md for more details.
35
+ This package was generated from typeshed commit `26e77cbf67ee0e224808a85b18c08c1dda63aaec` and was tested
36
+ with mypy 1.8.0, pyright 1.1.342, and
37
+ pytype 2023.12.18.
@@ -0,0 +1,39 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.error.Errors import IllegalStateException as IllegalStateException
4
+ from antlr4.Token import Token as Token
5
+
6
+ Lexer: Incomplete
7
+
8
+ class TokenStream: ...
9
+
10
+ class BufferedTokenStream(TokenStream):
11
+ tokenSource: Incomplete
12
+ tokens: Incomplete
13
+ index: int
14
+ fetchedEOF: bool
15
+ def __init__(self, tokenSource: Lexer) -> None: ...
16
+ def mark(self) -> int: ...
17
+ def release(self, marker: int) -> None: ...
18
+ def reset(self) -> None: ...
19
+ def seek(self, index: int) -> None: ...
20
+ def get(self, index: int) -> Token: ...
21
+ def consume(self) -> None: ...
22
+ def sync(self, i: int) -> bool: ...
23
+ def fetch(self, n: int) -> int: ...
24
+ def getTokens(self, start: int, stop: int, types: set[int] | None = None) -> list[Token]: ...
25
+ def LA(self, i: int) -> int: ...
26
+ def LB(self, k: int) -> Token | None: ...
27
+ def LT(self, k: int) -> Token | None: ...
28
+ def adjustSeekIndex(self, i: int): ...
29
+ def lazyInit(self) -> None: ...
30
+ def setup(self) -> None: ...
31
+ def setTokenSource(self, tokenSource: Lexer): ...
32
+ def nextTokenOnChannel(self, i: int, channel: int): ...
33
+ def previousTokenOnChannel(self, i: int, channel: int): ...
34
+ def getHiddenTokensToRight(self, tokenIndex: int, channel: int = -1): ...
35
+ def getHiddenTokensToLeft(self, tokenIndex: int, channel: int = -1): ...
36
+ def filterForChannel(self, left: int, right: int, channel: int): ...
37
+ def getSourceName(self): ...
38
+ def getText(self, start: int | None = None, stop: int | None = None): ...
39
+ def fill(self) -> None: ...
@@ -0,0 +1,14 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.Token import CommonToken as CommonToken
4
+
5
+ class TokenFactory: ...
6
+
7
+ class CommonTokenFactory(TokenFactory):
8
+ DEFAULT: Incomplete
9
+ copyText: Incomplete
10
+ def __init__(self, copyText: bool = False) -> None: ...
11
+ def create(
12
+ self, source: tuple[Incomplete, ...], type: int, text: str, channel: int, start: int, stop: int, line: int, column: int
13
+ ): ...
14
+ def createThin(self, type: int, text: str): ...
@@ -0,0 +1,13 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.BufferedTokenStream import BufferedTokenStream as BufferedTokenStream
4
+ from antlr4.Lexer import Lexer as Lexer
5
+ from antlr4.Token import Token as Token
6
+
7
+ class CommonTokenStream(BufferedTokenStream):
8
+ channel: Incomplete
9
+ def __init__(self, lexer: Lexer, channel: int = 0) -> None: ...
10
+ def adjustSeekIndex(self, i: int) -> int: ...
11
+ def LB(self, k: int) -> Token | None: ...
12
+ def LT(self, k: int) -> Token | None: ...
13
+ def getNumberOfOnChannelTokens(self) -> int: ...
@@ -0,0 +1,8 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.InputStream import InputStream as InputStream
4
+
5
+ class FileStream(InputStream):
6
+ fileName: Incomplete
7
+ def __init__(self, fileName: str, encoding: str = "ascii", errors: str = "strict") -> None: ...
8
+ def readDataFrom(self, fileName: str, encoding: str, errors: str = "strict"): ...
@@ -0,0 +1,21 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.Token import Token as Token
4
+
5
+ class InputStream:
6
+ name: str
7
+ strdata: Incomplete
8
+ data: Incomplete
9
+ def __init__(self, data: str) -> None: ...
10
+ @property
11
+ def index(self): ...
12
+ @property
13
+ def size(self): ...
14
+ def reset(self) -> None: ...
15
+ def consume(self) -> None: ...
16
+ def LA(self, offset: int): ...
17
+ def LT(self, offset: int): ...
18
+ def mark(self): ...
19
+ def release(self, marker: int): ...
20
+ def seek(self, _index: int): ...
21
+ def getText(self, start: int, stop: int): ...
@@ -0,0 +1,19 @@
1
+ from antlr4.Token import Token as Token
2
+
3
+ class IntervalSet:
4
+ intervals: list[range] | None
5
+ readonly: bool
6
+ def __init__(self) -> None: ...
7
+ def __iter__(self): ...
8
+ def __getitem__(self, item): ...
9
+ def addOne(self, v: int): ...
10
+ def addRange(self, v: range): ...
11
+ def addSet(self, other: IntervalSet): ...
12
+ def reduce(self, k: int): ...
13
+ def complement(self, start: int, stop: int): ...
14
+ def __contains__(self, item) -> bool: ...
15
+ def __len__(self) -> int: ...
16
+ def removeRange(self, v) -> None: ...
17
+ def removeOne(self, v) -> None: ...
18
+ def toString(self, literalNames: list[str], symbolicNames: list[str]): ...
19
+ def elementName(self, literalNames: list[str], symbolicNames: list[str], a: int): ...
@@ -0,0 +1,26 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.atn.ATN import ATN as ATN
4
+ from antlr4.atn.ATNConfig import ATNConfig as ATNConfig
5
+ from antlr4.atn.ATNState import ATNState as ATNState, RuleStopState as RuleStopState
6
+ from antlr4.atn.Transition import (
7
+ AbstractPredicateTransition as AbstractPredicateTransition,
8
+ NotSetTransition as NotSetTransition,
9
+ RuleTransition as RuleTransition,
10
+ WildcardTransition as WildcardTransition,
11
+ )
12
+ from antlr4.IntervalSet import IntervalSet as IntervalSet
13
+ from antlr4.PredictionContext import (
14
+ PredictionContext as PredictionContext,
15
+ PredictionContextFromRuleContext as PredictionContextFromRuleContext,
16
+ SingletonPredictionContext as SingletonPredictionContext,
17
+ )
18
+ from antlr4.RuleContext import RuleContext as RuleContext
19
+ from antlr4.Token import Token as Token
20
+
21
+ class LL1Analyzer:
22
+ HIT_PRED: Incomplete
23
+ atn: Incomplete
24
+ def __init__(self, atn: ATN) -> None: ...
25
+ def getDecisionLookahead(self, s: ATNState): ...
26
+ def LOOK(self, s: ATNState, stopState: ATNState | None = None, ctx: RuleContext | None = None): ...
@@ -0,0 +1,64 @@
1
+ from _typeshed import Incomplete
2
+ from typing import TextIO
3
+
4
+ from antlr4.atn.LexerATNSimulator import LexerATNSimulator as LexerATNSimulator
5
+ from antlr4.CommonTokenFactory import CommonTokenFactory as CommonTokenFactory
6
+ from antlr4.error.Errors import (
7
+ IllegalStateException as IllegalStateException,
8
+ LexerNoViableAltException as LexerNoViableAltException,
9
+ RecognitionException as RecognitionException,
10
+ )
11
+ from antlr4.InputStream import InputStream as InputStream
12
+ from antlr4.Recognizer import Recognizer as Recognizer
13
+ from antlr4.Token import Token as Token
14
+
15
+ class TokenSource: ...
16
+
17
+ class Lexer(Recognizer, TokenSource):
18
+ DEFAULT_MODE: int
19
+ MORE: int
20
+ SKIP: int
21
+ DEFAULT_TOKEN_CHANNEL: Incomplete
22
+ HIDDEN: Incomplete
23
+ MIN_CHAR_VALUE: int
24
+ MAX_CHAR_VALUE: int
25
+ def __init__(self, input: InputStream, output: TextIO = ...) -> None: ...
26
+ def reset(self) -> None: ...
27
+ def nextToken(self): ...
28
+ def skip(self) -> None: ...
29
+ def more(self) -> None: ...
30
+ def mode(self, m: int): ...
31
+ def pushMode(self, m: int): ...
32
+ def popMode(self): ...
33
+ @property
34
+ def inputStream(self): ...
35
+ @inputStream.setter
36
+ def inputStream(self, input: InputStream): ...
37
+ @property
38
+ def sourceName(self): ...
39
+ def emitToken(self, token: Token): ...
40
+ def emit(self): ...
41
+ def emitEOF(self): ...
42
+ @property
43
+ def type(self): ...
44
+ @type.setter
45
+ def type(self, type: int): ...
46
+ @property
47
+ def line(self): ...
48
+ @line.setter
49
+ def line(self, line: int): ...
50
+ @property
51
+ def column(self): ...
52
+ @column.setter
53
+ def column(self, column: int): ...
54
+ def getCharIndex(self): ...
55
+ @property
56
+ def text(self): ...
57
+ @text.setter
58
+ def text(self, txt: str): ...
59
+ def getAllTokens(self): ...
60
+ def notifyListeners(self, e: LexerNoViableAltException): ...
61
+ def getErrorDisplay(self, s: str): ...
62
+ def getErrorDisplayForChar(self, c: str): ...
63
+ def getCharErrorDisplay(self, c: str): ...
64
+ def recover(self, re: RecognitionException): ...
@@ -0,0 +1,19 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.CommonTokenFactory import CommonTokenFactory as CommonTokenFactory
4
+ from antlr4.Lexer import TokenSource as TokenSource
5
+ from antlr4.Token import Token as Token
6
+
7
+ class ListTokenSource(TokenSource):
8
+ tokens: Incomplete
9
+ sourceName: Incomplete
10
+ pos: int
11
+ eofToken: Incomplete
12
+ def __init__(self, tokens: list[Token], sourceName: str | None = None) -> None: ...
13
+ @property
14
+ def column(self): ...
15
+ def nextToken(self): ...
16
+ @property
17
+ def line(self): ...
18
+ def getInputStream(self): ...
19
+ def getSourceName(self): ...
@@ -0,0 +1,6 @@
1
+ version = "4.13.*"
2
+ upstream_repository = "https://github.com/antlr/antlr4"
3
+
4
+ [tool.stubtest]
5
+ ignore_missing_stub = true
6
+ platforms = ["linux", "win32"]
@@ -0,0 +1,74 @@
1
+ from _typeshed import Incomplete
2
+ from typing import TextIO
3
+
4
+ from antlr4.atn.ATNDeserializationOptions import ATNDeserializationOptions as ATNDeserializationOptions
5
+ from antlr4.atn.ATNDeserializer import ATNDeserializer as ATNDeserializer
6
+ from antlr4.BufferedTokenStream import TokenStream as TokenStream
7
+ from antlr4.CommonTokenFactory import TokenFactory as TokenFactory
8
+ from antlr4.error.Errors import (
9
+ RecognitionException as RecognitionException,
10
+ UnsupportedOperationException as UnsupportedOperationException,
11
+ )
12
+ from antlr4.error.ErrorStrategy import DefaultErrorStrategy as DefaultErrorStrategy
13
+ from antlr4.InputStream import InputStream as InputStream
14
+ from antlr4.Lexer import Lexer as Lexer
15
+ from antlr4.ParserRuleContext import ParserRuleContext as ParserRuleContext
16
+ from antlr4.Recognizer import Recognizer as Recognizer
17
+ from antlr4.RuleContext import RuleContext as RuleContext
18
+ from antlr4.Token import Token as Token
19
+ from antlr4.tree.ParseTreePatternMatcher import ParseTreePatternMatcher as ParseTreePatternMatcher
20
+ from antlr4.tree.Tree import ErrorNode as ErrorNode, ParseTreeListener as ParseTreeListener, TerminalNode as TerminalNode
21
+
22
+ class TraceListener(ParseTreeListener):
23
+ def __init__(self, parser) -> None: ...
24
+ def enterEveryRule(self, ctx) -> None: ...
25
+ def visitTerminal(self, node) -> None: ...
26
+ def visitErrorNode(self, node) -> None: ...
27
+ def exitEveryRule(self, ctx) -> None: ...
28
+
29
+ class Parser(Recognizer):
30
+ bypassAltsAtnCache: Incomplete
31
+ buildParseTrees: bool
32
+ def __init__(self, input: TokenStream, output: TextIO = ...) -> None: ...
33
+ def reset(self) -> None: ...
34
+ def match(self, ttype: int): ...
35
+ def matchWildcard(self): ...
36
+ def getParseListeners(self): ...
37
+ def addParseListener(self, listener: ParseTreeListener): ...
38
+ def removeParseListener(self, listener: ParseTreeListener): ...
39
+ def removeParseListeners(self) -> None: ...
40
+ def triggerEnterRuleEvent(self) -> None: ...
41
+ def triggerExitRuleEvent(self) -> None: ...
42
+ def getNumberOfSyntaxErrors(self): ...
43
+ def getTokenFactory(self): ...
44
+ def setTokenFactory(self, factory: TokenFactory): ...
45
+ def getATNWithBypassAlts(self): ...
46
+ def compileParseTreePattern(self, pattern: str, patternRuleIndex: int, lexer: Lexer | None = None): ...
47
+ def getInputStream(self): ...
48
+ def setInputStream(self, input: InputStream): ...
49
+ def getTokenStream(self): ...
50
+ def setTokenStream(self, input: TokenStream): ...
51
+ def getCurrentToken(self): ...
52
+ def notifyErrorListeners(self, msg: str, offendingToken: Token | None = None, e: RecognitionException | None = None): ...
53
+ def consume(self): ...
54
+ def addContextToParseTree(self) -> None: ...
55
+ state: Incomplete
56
+ def enterRule(self, localctx: ParserRuleContext, state: int, ruleIndex: int): ...
57
+ def exitRule(self) -> None: ...
58
+ def enterOuterAlt(self, localctx: ParserRuleContext, altNum: int): ...
59
+ def getPrecedence(self): ...
60
+ def enterRecursionRule(self, localctx: ParserRuleContext, state: int, ruleIndex: int, precedence: int): ...
61
+ def pushNewRecursionContext(self, localctx: ParserRuleContext, state: int, ruleIndex: int): ...
62
+ def unrollRecursionContexts(self, parentCtx: ParserRuleContext): ...
63
+ def getInvokingContext(self, ruleIndex: int): ...
64
+ def precpred(self, localctx: RuleContext, precedence: int): ...
65
+ def inContext(self, context: str): ...
66
+ def isExpectedToken(self, symbol: int): ...
67
+ def getExpectedTokens(self): ...
68
+ def getExpectedTokensWithinCurrentRule(self): ...
69
+ def getRuleIndex(self, ruleName: str): ...
70
+ def getRuleInvocationStack(self, p: RuleContext | None = None): ...
71
+ def getDFAStrings(self): ...
72
+ def dumpDFA(self) -> None: ...
73
+ def getSourceName(self): ...
74
+ def setTrace(self, trace: bool): ...
@@ -0,0 +1,36 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.atn.ATN import ATN as ATN
4
+ from antlr4.atn.ATNState import ATNState as ATNState, LoopEndState as LoopEndState, StarLoopEntryState as StarLoopEntryState
5
+ from antlr4.atn.ParserATNSimulator import ParserATNSimulator as ParserATNSimulator
6
+ from antlr4.atn.Transition import Transition as Transition
7
+ from antlr4.BufferedTokenStream import TokenStream as TokenStream
8
+ from antlr4.dfa.DFA import DFA as DFA
9
+ from antlr4.error.Errors import (
10
+ FailedPredicateException as FailedPredicateException,
11
+ RecognitionException as RecognitionException,
12
+ UnsupportedOperationException as UnsupportedOperationException,
13
+ )
14
+ from antlr4.Lexer import Lexer as Lexer
15
+ from antlr4.Parser import Parser as Parser
16
+ from antlr4.ParserRuleContext import InterpreterRuleContext as InterpreterRuleContext, ParserRuleContext as ParserRuleContext
17
+ from antlr4.PredictionContext import PredictionContextCache as PredictionContextCache
18
+ from antlr4.Token import Token as Token
19
+
20
+ class ParserInterpreter(Parser):
21
+ grammarFileName: Incomplete
22
+ atn: Incomplete
23
+ tokenNames: Incomplete
24
+ ruleNames: Incomplete
25
+ decisionToDFA: Incomplete
26
+ sharedContextCache: Incomplete
27
+ pushRecursionContextStates: Incomplete
28
+ def __init__(
29
+ self, grammarFileName: str, tokenNames: list[str], ruleNames: list[str], atn: ATN, input: TokenStream
30
+ ) -> None: ...
31
+ state: Incomplete
32
+ def parse(self, startRuleIndex: int): ...
33
+ def enterRecursionRule(self, localctx: ParserRuleContext, state: int, ruleIndex: int, precedence: int): ...
34
+ def getATNState(self): ...
35
+ def visitState(self, p: ATNState): ...
36
+ def visitRuleStopState(self, p: ATNState): ...
@@ -0,0 +1,41 @@
1
+ from _typeshed import Incomplete
2
+ from collections.abc import Generator
3
+
4
+ from antlr4.RuleContext import RuleContext as RuleContext
5
+ from antlr4.Token import Token as Token
6
+ from antlr4.tree.Tree import (
7
+ INVALID_INTERVAL as INVALID_INTERVAL,
8
+ ErrorNodeImpl as ErrorNodeImpl,
9
+ ParseTree as ParseTree,
10
+ ParseTreeListener as ParseTreeListener,
11
+ TerminalNode as TerminalNode,
12
+ TerminalNodeImpl as TerminalNodeImpl,
13
+ )
14
+
15
+ class ParserRuleContext(RuleContext):
16
+ children: Incomplete
17
+ start: Incomplete
18
+ stop: Incomplete
19
+ exception: Incomplete
20
+ def __init__(self, parent: ParserRuleContext | None = None, invokingStateNumber: int | None = None) -> None: ...
21
+ parentCtx: Incomplete
22
+ invokingState: Incomplete
23
+ def copyFrom(self, ctx: ParserRuleContext): ...
24
+ def enterRule(self, listener: ParseTreeListener): ...
25
+ def exitRule(self, listener: ParseTreeListener): ...
26
+ def addChild(self, child: ParseTree): ...
27
+ def removeLastChild(self) -> None: ...
28
+ def addTokenNode(self, token: Token): ...
29
+ def addErrorNode(self, badToken: Token): ...
30
+ def getChild(self, i: int, ttype: type | None = None): ...
31
+ def getChildren(self, predicate: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...
32
+ def getToken(self, ttype: int, i: int): ...
33
+ def getTokens(self, ttype: int): ...
34
+ def getTypedRuleContext(self, ctxType: type, i: int): ...
35
+ def getTypedRuleContexts(self, ctxType: type): ...
36
+ def getChildCount(self): ...
37
+ def getSourceInterval(self): ...
38
+
39
+ class InterpreterRuleContext(ParserRuleContext):
40
+ ruleIndex: Incomplete
41
+ def __init__(self, parent: ParserRuleContext, invokingStateNumber: int, ruleIndex: int) -> None: ...
@@ -0,0 +1,87 @@
1
+ from _typeshed import Incomplete, SupportsLenAndGetItem
2
+
3
+ from antlr4.atn.ATN import ATN as ATN
4
+ from antlr4.error.Errors import IllegalStateException as IllegalStateException
5
+ from antlr4.RuleContext import RuleContext as RuleContext
6
+
7
+ class PredictionContext:
8
+ EMPTY: Incomplete
9
+ EMPTY_RETURN_STATE: int
10
+ globalNodeCount: int
11
+ id = globalNodeCount
12
+ cachedHashCode: Incomplete
13
+ def __init__(self, cachedHashCode: int) -> None: ...
14
+ def __len__(self) -> int: ...
15
+ def isEmpty(self): ...
16
+ def hasEmptyPath(self): ...
17
+ def getReturnState(self, index: int): ...
18
+ def __hash__(self): ...
19
+
20
+ def calculateHashCode(parent: PredictionContext, returnState: int): ...
21
+ def calculateListsHashCode(parents: list[PredictionContext], returnStates: list[int]): ...
22
+
23
+ class PredictionContextCache:
24
+ cache: Incomplete
25
+ def __init__(self) -> None: ...
26
+ def add(self, ctx: PredictionContext): ...
27
+ def get(self, ctx: PredictionContext): ...
28
+ def __len__(self) -> int: ...
29
+
30
+ class SingletonPredictionContext(PredictionContext):
31
+ @staticmethod
32
+ def create(parent: PredictionContext, returnState: int): ...
33
+ parentCtx: Incomplete
34
+ returnState: Incomplete
35
+ def __init__(self, parent: PredictionContext, returnState: int) -> None: ...
36
+ def __len__(self) -> int: ...
37
+ def getParent(self, index: int): ...
38
+ def getReturnState(self, index: int): ...
39
+ def __eq__(self, other): ...
40
+ def __hash__(self): ...
41
+
42
+ class EmptyPredictionContext(SingletonPredictionContext):
43
+ def __init__(self) -> None: ...
44
+ def isEmpty(self): ...
45
+ def __eq__(self, other): ...
46
+ def __hash__(self): ...
47
+
48
+ class ArrayPredictionContext(PredictionContext):
49
+ parents: Incomplete
50
+ returnStates: Incomplete
51
+ def __init__(self, parents: list[PredictionContext], returnStates: list[int]) -> None: ...
52
+ def isEmpty(self): ...
53
+ def __len__(self) -> int: ...
54
+ def getParent(self, index: int): ...
55
+ def getReturnState(self, index: int): ...
56
+ def __eq__(self, other): ...
57
+ def __hash__(self): ...
58
+
59
+ def PredictionContextFromRuleContext(atn: ATN, outerContext: RuleContext | None = None): ...
60
+ def merge(
61
+ a: PredictionContext,
62
+ b: PredictionContext,
63
+ rootIsWildcard: bool,
64
+ mergeCache: dict[tuple[Incomplete, Incomplete], SingletonPredictionContext] | None,
65
+ ): ...
66
+ def mergeSingletons(
67
+ a: SingletonPredictionContext,
68
+ b: SingletonPredictionContext,
69
+ rootIsWildcard: bool,
70
+ mergeCache: dict[tuple[Incomplete, Incomplete], SingletonPredictionContext] | None,
71
+ ): ...
72
+ def mergeRoot(a: SingletonPredictionContext, b: SingletonPredictionContext, rootIsWildcard: bool): ...
73
+ def mergeArrays(
74
+ a: ArrayPredictionContext,
75
+ b: ArrayPredictionContext,
76
+ rootIsWildcard: bool,
77
+ mergeCache: dict[tuple[Incomplete, Incomplete], SingletonPredictionContext] | None,
78
+ ): ...
79
+ def combineCommonParents(parents: SupportsLenAndGetItem[PredictionContext]): ...
80
+ def getCachedPredictionContext(
81
+ context: PredictionContext, contextCache: PredictionContextCache, visited: dict[PredictionContext, PredictionContext]
82
+ ): ...
83
+ def getAllContextNodes(
84
+ context: PredictionContext,
85
+ nodes: list[Incomplete] | None = None,
86
+ visited: dict[PredictionContext, PredictionContext] | None = None,
87
+ ): ...
@@ -0,0 +1,27 @@
1
+ from _typeshed import Incomplete
2
+
3
+ from antlr4.error.ErrorListener import ConsoleErrorListener as ConsoleErrorListener, ProxyErrorListener as ProxyErrorListener
4
+ from antlr4.RuleContext import RuleContext as RuleContext
5
+ from antlr4.Token import Token as Token
6
+
7
+ class Recognizer:
8
+ tokenTypeMapCache: Incomplete
9
+ ruleIndexMapCache: Incomplete
10
+ def __init__(self) -> None: ...
11
+ def extractVersion(self, version): ...
12
+ def checkVersion(self, toolVersion) -> None: ...
13
+ def addErrorListener(self, listener) -> None: ...
14
+ def removeErrorListener(self, listener) -> None: ...
15
+ def removeErrorListeners(self) -> None: ...
16
+ def getTokenTypeMap(self): ...
17
+ def getRuleIndexMap(self): ...
18
+ def getTokenType(self, tokenName: str): ...
19
+ def getErrorHeader(self, e): ...
20
+ def getTokenErrorDisplay(self, t: Token): ...
21
+ def getErrorListenerDispatch(self): ...
22
+ def sempred(self, localctx: RuleContext, ruleIndex: int, actionIndex: int): ...
23
+ def precpred(self, localctx: RuleContext, precedence: int): ...
24
+ @property
25
+ def state(self): ...
26
+ @state.setter
27
+ def state(self, atnState: int): ...
@@ -0,0 +1,28 @@
1
+ from _typeshed import Incomplete
2
+ from collections.abc import Generator
3
+
4
+ from antlr4.tree.Tree import INVALID_INTERVAL as INVALID_INTERVAL, ParseTreeVisitor as ParseTreeVisitor, RuleNode as RuleNode
5
+ from antlr4.tree.Trees import Trees as Trees
6
+
7
+ Parser: Incomplete
8
+
9
+ class RuleContext(RuleNode):
10
+ EMPTY: Incomplete
11
+ parentCtx: Incomplete
12
+ invokingState: Incomplete
13
+ def __init__(self, parent: RuleContext | None = None, invokingState: int = -1) -> None: ...
14
+ def depth(self): ...
15
+ def isEmpty(self): ...
16
+ def getSourceInterval(self): ...
17
+ def getRuleContext(self): ...
18
+ def getPayload(self): ...
19
+ def getText(self): ...
20
+ def getRuleIndex(self): ...
21
+ def getAltNumber(self): ...
22
+ def setAltNumber(self, altNumber: int): ...
23
+ def getChild(self, i: int): ...
24
+ def getChildCount(self): ...
25
+ def getChildren(self) -> Generator[Incomplete, None, None]: ...
26
+ def accept(self, visitor: ParseTreeVisitor): ...
27
+ def toStringTree(self, ruleNames: list[Incomplete] | None = None, recog: Parser | None = None): ...
28
+ def toString(self, ruleNames: list[Incomplete], stop: RuleContext) -> str: ...
@@ -0,0 +1,4 @@
1
+ from antlr4.InputStream import InputStream as InputStream
2
+
3
+ class StdinStream(InputStream):
4
+ def __init__(self, encoding: str = "ascii", errors: str = "strict") -> None: ...
@@ -0,0 +1,48 @@
1
+ from _typeshed import Incomplete
2
+
3
+ class Token:
4
+ INVALID_TYPE: int
5
+ EPSILON: int
6
+ MIN_USER_TOKEN_TYPE: int
7
+ EOF: int
8
+ DEFAULT_CHANNEL: int
9
+ HIDDEN_CHANNEL: int
10
+ source: Incomplete
11
+ type: Incomplete
12
+ channel: Incomplete
13
+ start: Incomplete
14
+ stop: Incomplete
15
+ tokenIndex: Incomplete
16
+ line: Incomplete
17
+ column: Incomplete
18
+ def __init__(self) -> None: ...
19
+ @property
20
+ def text(self): ...
21
+ @text.setter
22
+ def text(self, text: str): ...
23
+ def getTokenSource(self): ...
24
+ def getInputStream(self): ...
25
+
26
+ class CommonToken(Token):
27
+ EMPTY_SOURCE: Incomplete
28
+ source: Incomplete
29
+ type: Incomplete
30
+ channel: Incomplete
31
+ start: Incomplete
32
+ stop: Incomplete
33
+ tokenIndex: int
34
+ line: Incomplete
35
+ column: Incomplete
36
+ def __init__(
37
+ self,
38
+ source: tuple[Incomplete, Incomplete] = (None, None),
39
+ type: int | None = None,
40
+ channel: int = 0,
41
+ start: int = -1,
42
+ stop: int = -1,
43
+ ) -> None: ...
44
+ def clone(self): ...
45
+ @property
46
+ def text(self): ...
47
+ @text.setter
48
+ def text(self, text: str): ...