Next: , Previous: , Up: LHS terminals   [Contents][Index]


32.1.3 LHS terminal methods

The terminal status of a symbol is a boolean, which is true iff the symbol is a terminal. The terminal status of a symbol is locked iff the terminal status of that symbol cannot be changed.

Mutator function: int marpa_g_symbol_is_terminal_set ( Marpa_Grammar g, Marpa_Symbol_ID sym_id, int value)

On success, does the following:

Hard fails with error code MARPA_ERR_TERMINAL_IS_LOCKED if the symbol with sym_id is locked, and the terminal status of the symbol with sym_id is not equal to value. Also hard fails if value is not a boolean or if g is precomputed.

Return value: On success, value, which will be 1 or 0. On soft failure, -1. On hard failure, -2.