from terml.parser import parseTerm as term
from terml.quasiterm import quasiterm as quasiterm
from typing import Any, Optional

def wrapGrammar(g: Any, tracefunc: Optional[Any] = ...): ...
def makeGrammar(source: Any, bindings: Any, name: str = ..., unwrap: bool = ..., extends: Any = ..., tracefunc: Optional[Any] = ...): ...
def unwrapGrammar(w: Any): ...

class _GrammarWrapper:
    __name__: Any = ...
    def __init__(self, grammar: Any, input: Any) -> None: ...
    def __getattr__(self, name: Any): ...

def makeProtocol(source: Any, senderFactory: Any, receiverFactory: Any, bindings: Optional[Any] = ..., name: str = ...): ...
def stack(*wrappers: Any): ...
