Parse the `input` using `methodname` as entry point.

        If `parse_all` is true, the input MUST be fully consumed at the end of
        the parsing, otherwise p_parse raises an exception.

def p_parse(cls, input, methodname=None, parse_all=True):
        """
        Parse the `input` using `methodname` as entry point.

        If `parse_all` is true, the input MUST be fully consumed at the end of
        the parsing, otherwise p_parse raises an exception.
        """
        if methodname is None:
            methodname = cls.__default__
        p = cls(input)
        result = getattr(p, methodname)()
        if result is cls.NoMatch or parse_all and p.p_peek() is not None:
            p.p_raise()
        return result