]> git.madduck.net Git - etc/vim.git/blob - blib2to3/pgen2/parse.pyi

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

[trivial] Simplify `mode` and `write_back` calculation in main()
[etc/vim.git] / blib2to3 / pgen2 / parse.pyi
1 # Stubs for lib2to3.pgen2.parse (Python 3.6)
2
3 from typing import Any, Dict, List, Optional, Sequence, Set, Text, Tuple
4
5 from blib2to3.pgen2.grammar import Grammar, _DFAS
6 from blib2to3.pytree import _NL, _Convert, _RawNode
7
8 _Context = Sequence[Any]
9
10 class ParseError(Exception):
11     msg: Text
12     type: int
13     value: Optional[Text]
14     context: _Context
15     def __init__(self, msg: Text, type: int, value: Optional[Text], context: _Context) -> None: ...
16
17 class Parser:
18     grammar: Grammar
19     convert: _Convert
20     stack: List[Tuple[_DFAS, int, _RawNode]]
21     rootnode: Optional[_NL]
22     used_names: Set[Text]
23     def __init__(self, grammar: Grammar, convert: Optional[_Convert] = ...) -> None: ...
24     def setup(self, start: Optional[int] = ...) -> None: ...
25     def addtoken(self, type: int, value: Optional[Text], context: _Context) -> bool: ...
26     def classify(self, type: int, value: Optional[Text], context: _Context) -> int: ...
27     def shift(self, type: int, value: Optional[Text], newstate: int, context: _Context) -> None: ...
28     def push(self, type: int, newdfa: _DFAS, newstate: int, context: _Context) -> None: ...
29     def pop(self) -> None: ...