Calitha GOLD Parser Engine Documentation

LALRParser.OnParseError Event

This event will be called when the parser has a token it cannot parse.

public event ParseErrorHandler OnParseError;

Event Data

The event handler receives an argument of type ParseErrorEventArgs containing data related to this event. The following ParseErrorEventArgs properties provide information specific to this event.

Property Description
Continue The continue property can be set during the parse error event. It can be set to the following: (1) Stop to not try to parse the rest of the input. (2) Insert will pretend that the next token is the one set in NextToken after which the current "bad" token will be parsed again. (3) Skip will just ignore the current bad token and proceed to parse the input as if nothing happened. The default value is Stop.
ExpectedTokens The symbols that were expected by the parser.
NextToken If the continue property is set to true, then NextToken will be the next token to be used as input to the parser (it will become the lookahead token). The default value is null, which means that the next token will be read from the normal input stream. stream.
UnexpectedToken The token that caused this parser error.

See Also

LALRParser Class | com.calitha.goldparser Namespace