from re import Match, Pattern, RegexFlag

class EndOfText(RuntimeError): ...

class Scanner:
    data: str
    data_length: int
    start_pos: int
    pos: int
    flags: int | RegexFlag
    last: str | None
    match: str | None
    def __init__(self, text: str, flags: int | RegexFlag = 0) -> None: ...
    @property
    def eos(self) -> bool: ...
    def check(self, pattern: str | Pattern[str]) -> Match[str] | None: ...
    def test(self, pattern: str | Pattern[str]) -> bool: ...
    def scan(self, pattern: str | Pattern[str]) -> bool: ...
    def get_char(self) -> None: ...
