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


23.6 Symbol expected events

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

Libmarpa can be set up to generate an expected symbol event (MARPA_EVENT_SYMBOL_EXPECTED) when the symbol with ID symbol_id is acceptable as a terminal at the current earleme. Note that the symbol expected event is only generated if the symbol with ID symbol_id is acceptable as terminal. 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.

On success, if value is 1,

On success, if value is 0,

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.