Previous: , Up: Per-rule events   [Contents][Index]


25.15.1 Workaround with a dedicated LHS symbol

Most users will fix the second limitation (see lim2Ex) by falling back on marker symbols. For those users who for some reason prefer to avoid this, in this section we present a workaround that is based on introducing a new symbol, one dedicated to acting as the LHS of (R3) of lim2Ex.

We show the fix as another example, one which we will call fixEx. fixEx is identical to lim2Ex with the following exceptions:

fixEx will accept the same language as lim2Ex, with the same semantics as lim2Ex. A MARPA_EVENT_SYMBOL_COMPLETED event will trigger at the end of (R3a), this time for symbol A1, but at exactly the same parse location as it did for symbol A in lim2Ex. And a MARPA_EVENT_SYMBOL_COMPLETED event will no longer trigger at the end of (R4), which is the fix we were looking for.