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


18.1 Overview

Events are generated by the marpa_g_precompute(), marpa_r_earleme_complete(), and marpa_r_start_input() methods. The methods are called event-active. Event-active methods always clear all previous events, so that after an event-active method the only events available will be those generated by that method.

Events are volatile, and it is expected that events will be queried immediately after the method that generated them. Note especially that multiple recognizers using the same base grammar overwrite each other’s events.

To find out how many events were generated by the last event-active method, use the marpa_g_event_count method.

To query a specific event, use the marpa_g_event and marpa_g_event_value methods.