Format: application/octet-stream
1 from lib2to3.pgen2.grammar import _DFAS, Grammar
2 from lib2to3.pytree import _NL, _Convert, _RawNode
3 from typing import Any, List, Optional, Sequence, Set, Text, Tuple
4
5 _Context = Sequence[Any]
6
7 class ParseError(Exception):
8 msg: Text
9 type: int
10 value: Optional[Text]
11 context: _Context
12 def __init__(self, msg: Text, type: int, value: Optional[Text], context: _Context) -> None: ...
13
14 class Parser:
15 grammar: Grammar
16 convert: _Convert
17 stack: List[Tuple[_DFAS, int, _RawNode]]
18 rootnode: Optional[_NL]
19 used_names: Set[Text]
20 def __init__(self, grammar: Grammar, convert: Optional[_Convert] = ...) -> None: ...
21 def setup(self, start: Optional[int] = ...) -> None: ...
22 def addtoken(self, type: int, value: Optional[Text], context: _Context) -> bool: ...
23 def classify(self, type: int, value: Optional[Text], context: _Context) -> int: ...
24 def shift(self, type: int, value: Optional[Text], newstate: int, context: _Context) -> None: ...
25 def push(self, type: int, newdfa: _DFAS, newstate: int, context: _Context) -> None: ...
26 def pop(self) -> None: ...
27