Next: , Previous: , Up: Recognizer methods   [Contents][Index]


19.1 Recognizer overview

An archetypal application uses a recognizer to read input. To create a recognizer, use the marpa_r_new() method. When a recognizer is no longer in use, its memory can be freed using the marpa_r_unref() method.

To make a recognizer ready for input, use the marpa_r_start_input() method.

The recognizer starts with its current earleme at location 0. To read a token at the current earleme, use the marpa_r_alternative() call.

To complete the processing of the current earleme, and move forward to a new one, use the marpa_r_earleme_complete() call.