on_error(t, val, vstack) public

This method is called when a parse error is found.

ERROR_TOKEN_ID is an internal ID of token which caused error. You can get string representation of this ID by calling #token_to_str.

ERROR_VALUE is a value of error token.

value_stack is a stack of symbol values. DO NOT MODIFY this object.

This method raises ParseError by default.

If this method returns, parsers enter “error recovering mode”.

Show source
Register or log in to add new notes.