1 # Stubs for lib2to3.pgen2.parse (Python 3.6)
\r
3 from typing import Any, Dict, List, Optional, Sequence, Set, Text, Tuple
\r
5 from lib2to3.pgen2.grammar import Grammar, _DFAS
\r
6 from lib2to3.pytree import _NL, _Convert, _RawNode
\r
8 _Context = Sequence[Any]
\r
10 class ParseError(Exception):
\r
13 value: Optional[Text]
\r
15 def __init__(self, msg: Text, type: int, value: Optional[Text], context: _Context) -> None: ...
\r
20 stack: List[Tuple[_DFAS, int, _RawNode]]
\r
21 rootnode: Optional[_NL]
\r
22 used_names: Set[Text]
\r
23 def __init__(self, grammar: Grammar, convert: Optional[_Convert] = ...) -> None: ...
\r
24 def setup(self, start: Optional[int] = ...) -> None: ...
\r
25 def addtoken(self, type: int, value: Optional[Text], context: _Context) -> bool: ...
\r
26 def classify(self, type: int, value: Optional[Text], context: _Context) -> int: ...
\r
27 def shift(self, type: int, value: Optional[Text], newstate: int, context: _Context) -> None: ...
\r
28 def push(self, type: int, newdfa: _DFAS, newstate: int, context: _Context) -> None: ...
\r
29 def pop(self) -> None: ...
\r