@classmethod<EOL><INDENT>def p_parse(cls, input, methodname=None, parse_all=True):<DEDENT>
if methodname is None:<EOL><INDENT>methodname = cls.__default__<EOL><DEDENT>p = cls(input)<EOL>result = getattr(p, methodname)()<EOL>if result is cls.NoMatch or parse_all and p.p_peek() is not None:<EOL><INDENT>p.p_raise()<EOL><DEDENT>return result<EOL>
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.