Previous: Symbol expected events, Up: Events [Contents][Index]
Applications should never see this event. Event value: Unspecified. Suggested message: "No event".
A nullable symbol is either the separator for, or the right hand side of, a sequence. Event value: The ID of the symbol. Suggested message: "This symbol is a counted nullable".
This event indicates that an application-settable threshold on the number of Earley items has been reached or exceeded. See marpa_r_earley_item_warning_threshold_set().
Event value: The current Earley item count. Suggested message: "Too many Earley items".
The parse is exhausted. Event value: Unspecified. Suggested message: "Recognizer is exhausted".
One or more rules are loop rules — rules that are part of a cycle. Cycles are pathological cases of recursion, in which the same symbol string derives itself a potentially infinite number of times. Nonetheless, Marpa parses in the presence of these, and it is up to the application to treat these as fatal errors, something they almost always will wish to do. Event value: The count of loop rules. Suggested message: "Grammar contains a infinite loop".
This event occurs only if LHS terminals feature is in use. The LHS terminals feature is deprecated. See LHS terminals. Event value: The ID of the symbol. Suggested message: "This symbol is a nulling terminal".
The recognizer can be set to generate an event
a symbol is completed
using its
marpa_g_symbol_is_completion_event_set()
method.
(A symbol is “completed” if and only if any rule with that symbol
as its LHS is completed.)
This event code indicates that one of those events
occurred.
Event value: The ID of the completed symbol.
Suggested message: "Completed symbol".
The recognizer can be set to generate an event when a
symbol is expected as a terminal,
using its
marpa_r_expected_symbol_event_set()
method.
Note that this event only triggers if the symbol is
expected as a terminal.
Predicted symbols that are not expected as terminals
do not trigger this event.
This event code indicates that one of those events
occurred.
Event value: The ID of the expected symbol.
Suggested message: "Expecting symbol".
The recognizer can be set to generate an event when a
symbol is nulled – that is, recognized as a
zero-length symbol.
To set an nulled symbol event,
use the recognizer’s
marpa_r_nulled_symbol_event_set()
method.
This event code indicates that a nulled symbol event
occurred.
Event value: The ID of the nulled symbol.
Suggested message: "Symbol was nulled".
The recognizer can be set to generate an event when a
symbol is predicted.
To set an predicted symbol event,
use the recognizer’s
marpa_g_symbol_is_prediction_event_set()
method.
Unlike the
MARPA_EVENT_SYMBOL_EXPECTED
event,
the MARPA_EVENT_SYMBOL_PREDICTED
event
triggers for predictions of both
non-terminals and terminals.
This event code indicates that a predicted symbol event
occurred.
Event value: The ID of the predicted symbol.
Suggested message: "Symbol was predicted".
Previous: Symbol expected events, Up: Events [Contents][Index]