from hutt.dsl import parser as parser_wrap
from kessel import primitives


ParseError = primitives.ParseError


unit = parser_wrap.wrap(primitives.unit)
match = parser_wrap.wrap(primitives.match)
any_ = parser_wrap.Parser(primitives.any_)
error = parser_wrap.wrap(primitives.error)


class Proxy(parser_wrap.Parser):
    def __init__(self):
        super(Proxy, self).__init__(primitives.Proxy())

    def bind(self, parser):
        self._parser.bind(parser._parser)
