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


21.3 Creating a new bocage

Constructor function: Marpa_Bocage marpa_b_new (Marpa_Recognizer r, Marpa_Earley_Set_ID earley_set_ID)

On success, the following is the case:

The application will usually want EOP to be the Earley set at the current earleme, but there are exceptions. See End of parse.

If earley_set_ID is -1 and there is no Earley set at the current earleme; or if earley_set_ID is non-negative and there is no parse ending at Earley set earley_set_ID, marpa_b_new() hard fails with the error code MARPA_ERR_NO_PARSE.

Return value: On success, the new bocage object. On hard failure, NULL.