from typing import Any, Final, Mapping
from .lexer import BaseLexer, Token

class Parser:
    lexer: Final[BaseLexer]
    command_set: Final[Mapping]

    def __init__(self, lexer: BaseLexer, command_set: Mapping) -> None: ...
    def push(self, token: Token) -> None: ...
    def pop(self) -> Token: ...
    def exec_once(self) -> Any: ...
    def exec_(self) -> None: ...
    def __iter__(self) -> "Parser": ...
    def __next__(self) -> Any: ...