from antlr4.error.Errors import IllegalStateException as IllegalStateException
from antlr4.Lexer import Lexer as ActualLexer, TokenSource
from antlr4.Token import Token as Token

Lexer: None

class TokenStream: ...

class BufferedTokenStream(TokenStream):
    __slots__ = ("tokenSource", "tokens", "index", "fetchedEOF")
    tokenSource: TokenSource
    tokens: list[Token]
    index: int
    fetchedEOF: bool
    def __init__(self, tokenSource: ActualLexer | None) -> None: ...
    def mark(self) -> int: ...
    def release(self, marker: int) -> None: ...
    def reset(self) -> None: ...
    def seek(self, index: int) -> None: ...
    def get(self, index: int) -> Token: ...
    def consume(self) -> None: ...
    def sync(self, i: int) -> bool: ...
    def fetch(self, n: int) -> int: ...
    def getTokens(self, start: int, stop: int, types: set[int] | None = None) -> list[Token]: ...
    def LA(self, i: int) -> int: ...
    def LB(self, k: int) -> Token | None: ...
    def LT(self, k: int) -> Token | None: ...
    def adjustSeekIndex(self, i: int) -> int: ...
    def lazyInit(self) -> None: ...
    def setup(self) -> None: ...
    def setTokenSource(self, tokenSource: ActualLexer | None) -> None: ...
    def nextTokenOnChannel(self, i: int, channel: int) -> int: ...
    def previousTokenOnChannel(self, i: int, channel: int) -> int: ...
    def getHiddenTokensToRight(self, tokenIndex: int, channel: int = -1) -> list[Token] | None: ...
    def getHiddenTokensToLeft(self, tokenIndex: int, channel: int = -1) -> list[Token] | None: ...
    def filterForChannel(self, left: int, right: int, channel: int) -> list[Token] | None: ...
    def getSourceName(self) -> str: ...
    def getText(self, start: int | None = None, stop: int | None = None) -> str: ...
    def fill(self) -> None: ...
