Format: application/octet-stream
⬇ Download File (2.6 KB)
   1  from typing import Any, Callable, Dict, Generator, Iterable, Iterator, List, Tuple, Union
   2  
   3  __author__: str
   4  __credits__: str
   5  
   6  AMPER: int
   7  AMPEREQUAL: int
   8  AT: int
   9  BACKQUOTE: int
  10  Binnumber: str
  11  Bracket: str
  12  CIRCUMFLEX: int
  13  CIRCUMFLEXEQUAL: int
  14  COLON: int
  15  COMMA: int
  16  COMMENT: int
  17  Comment: str
  18  ContStr: str
  19  DEDENT: int
  20  DOT: int
  21  DOUBLESLASH: int
  22  DOUBLESLASHEQUAL: int
  23  DOUBLESTAR: int
  24  DOUBLESTAREQUAL: int
  25  Decnumber: str
  26  Double: str
  27  Double3: str
  28  ENDMARKER: int
  29  EQEQUAL: int
  30  EQUAL: int
  31  ERRORTOKEN: int
  32  Expfloat: str
  33  Exponent: str
  34  Floatnumber: str
  35  Funny: str
  36  GREATER: int
  37  GREATEREQUAL: int
  38  Hexnumber: str
  39  INDENT: int
  40  
  41  def ISEOF(x: int) -> bool: ...
  42  def ISNONTERMINAL(x: int) -> bool: ...
  43  def ISTERMINAL(x: int) -> bool: ...
  44  
  45  Ignore: str
  46  Imagnumber: str
  47  Intnumber: str
  48  LBRACE: int
  49  LEFTSHIFT: int
  50  LEFTSHIFTEQUAL: int
  51  LESS: int
  52  LESSEQUAL: int
  53  LPAR: int
  54  LSQB: int
  55  MINEQUAL: int
  56  MINUS: int
  57  NAME: int
  58  NEWLINE: int
  59  NL: int
  60  NOTEQUAL: int
  61  NT_OFFSET: int
  62  NUMBER: int
  63  N_TOKENS: int
  64  Name: str
  65  Number: str
  66  OP: int
  67  Octnumber: str
  68  Operator: str
  69  PERCENT: int
  70  PERCENTEQUAL: int
  71  PLUS: int
  72  PLUSEQUAL: int
  73  PlainToken: str
  74  Pointfloat: str
  75  PseudoExtras: str
  76  PseudoToken: str
  77  RBRACE: int
  78  RIGHTSHIFT: int
  79  RIGHTSHIFTEQUAL: int
  80  RPAR: int
  81  RSQB: int
  82  SEMI: int
  83  SLASH: int
  84  SLASHEQUAL: int
  85  STAR: int
  86  STAREQUAL: int
  87  STRING: int
  88  Single: str
  89  Single3: str
  90  Special: str
  91  String: str
  92  TILDE: int
  93  Token: str
  94  Triple: str
  95  VBAR: int
  96  VBAREQUAL: int
  97  Whitespace: str
  98  chain: type
  99  double3prog: type
 100  endprogs: Dict[str, Any]
 101  pseudoprog: type
 102  single3prog: type
 103  single_quoted: Dict[str, str]
 104  t: str
 105  tabsize: int
 106  tok_name: Dict[int, str]
 107  tokenprog: type
 108  triple_quoted: Dict[str, str]
 109  x: str
 110  
 111  _Pos = Tuple[int, int]
 112  _TokenType = Tuple[int, str, _Pos, _Pos, str]
 113  
 114  def any(*args, **kwargs) -> str: ...
 115  def generate_tokens(readline: Callable[[], str]) -> Generator[_TokenType, None, None]: ...
 116  def group(*args: str) -> str: ...
 117  def maybe(*args: str) -> str: ...
 118  def printtoken(type: int, token: str, srow_scol: _Pos, erow_ecol: _Pos, line: str) -> None: ...
 119  def tokenize(readline: Callable[[], str], tokeneater: Callable[[Tuple[int, str, _Pos, _Pos, str]], None]) -> None: ...
 120  def tokenize_loop(readline: Callable[[], str], tokeneater: Callable[[Tuple[int, str, _Pos, _Pos, str]], None]) -> None: ...
 121  def untokenize(iterable: Iterable[_TokenType]) -> str: ...
 122  
 123  class StopTokenizing(Exception): ...
 124  class TokenError(Exception): ...
 125  
 126  class Untokenizer:
 127      prev_col: int
 128      prev_row: int
 129      tokens: List[str]
 130      def __init__(self) -> None: ...
 131      def add_whitespace(self, _Pos) -> None: ...
 132      def compat(self, token: Tuple[int, Any], iterable: Iterator[_TokenType]) -> None: ...
 133      def untokenize(self, iterable: Iterable[_TokenType]) -> str: ...
 134