KEN_LINECOMMENT: Any
TOKEN_DATA: Any
TOKEN_INITIAL: Any
TOKEN_EOF: Any
operators: Any
reverse_operators: Any
operator_re: Any
ignored_tokens: Any
ignore_if_empty: Any

def describe_token(token): ...
def describe_token_expr(expr): ...
def count_newlines(value): ...
def compile_rules(environment): ...

class Failure:
    message: Any
    error_class: Any
    def __init__(self, message, cls: Any = ...) -> None: ...
    def __call__(self, lineno, filename): ...

class Token(Tuple[int, Any, Any]):
    lineno: Any
    type: Any
    value: Any
    def __new__(cls, lineno, type, value): ...
    def test(self, expr): ...
    def test_any(self, *iterable): ...

class TokenStreamIterator:
    stream: Any
    def __init__(self, stream) -> None: ...
    def __iter__(self): ...
    def __next__(self): ...

class TokenStream:
    name: Any
    filename: Any
    closed: bool
    current: Any
    def __init__(self, generator, name, filename) -> None: ...
    def __iter__(self): ...
    def __bool__(self): ...
    __nonzero__: Any
    eos: Any
    def push(self, token): ...
    def look(self): ...
    def skip(self, n: int = ...): ...
    def next_if(self, expr): ...
    def skip_if(self, expr): ...
    def __next__(self): ...
    def close(self): ...
    def expect(self, expr): ...

def get_lexer(environment): ...

class Lexer:
    newline_sequence: Any
    keep_trailing_newline: Any
    rules: Any
    def __init__(self, environment) -> None: ...
    def tokenize(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., state: Optional[Any] = ...): ...
    def wrap(self, stream, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
    def tokeniter(self, source, name, filename: Optional[Any] = ..., state: Optional[Any] = ...): ...
PK