massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / lib2to3 / pgen2 / parse.pyi
1 # Stubs for lib2to3.pgen2.parse (Python 3.6)\r
2 \r
3 from typing import Any, Dict, List, Optional, Sequence, Set, Text, Tuple\r
4 \r
5 from lib2to3.pgen2.grammar import Grammar, _DFAS\r
6 from lib2to3.pytree import _NL, _Convert, _RawNode\r
7 \r
8 _Context = Sequence[Any]\r
9 \r
10 class ParseError(Exception):\r
11     msg: Text\r
12     type: int\r
13     value: Optional[Text]\r
14     context: _Context\r
15     def __init__(self, msg: Text, type: int, value: Optional[Text], context: _Context) -> None: ...\r
16 \r
17 class Parser:\r
18     grammar: Grammar\r
19     convert: _Convert\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