Next: , Previous: , Up: Events   [Contents][Index]


25.7 Symbol expected events

This section contains methods for dealing with MARPA_EVENT_SYMBOL_EXPECTED events. See MARPA_EVENT_SYMBOL_EXPECTED.

Mutator function: int marpa_r_expected_symbol_event_set ( Marpa_Recognizer r, Marpa_Symbol_ID symbol_id, int value)

On success, if value is 1, does the following:

On success, if value is 0, does the following:

Expected symbol events only trigger if the symbol with ID symbol_id is expected as terminal. This method will succeed if the symbol with ID symbol_id is not a terminal, but the event subtype that this method declared will never trigger.

The same symbol may be acceptable as both a terminal and a non-terminal if the deprecated LHS terminals feature is in use. If the symbol with ID symbol_id is expected at the current earleme as a non-terminal, but is not acceptable as a terminal, an expected symbol event will not be triggered at the current earleme. See LHS terminals.

Hard fails if value is not a boolean. Hard fails if value is 1, and symbol_id is the ID of a nulling symbol, an inaccessible symbol, or an unproductive symbol. Hard fails if symbol_id is not the ID of a valid symbol.

Return value: On success, value, which will be a boolean. On hard failure, -2.


Next: , Previous: , Up: Events   [Contents][Index]