abiggerhammer/hammer — pull request #12 by pesco (2013-06-14 10:58:08+00:00)
Title: Pre-allocate the result of h_desugar so recursive h_indirect works

Otherwise, it would go into an infinite loop.

Accomplished by recording the pre-allocated `HCFChoice` in the `HCFStack` from where it will be picked up by the first call to `h_cfstack_new_choice_raw()`.

Not sure if the `last_completed` field is still needed now. Not anymore for getting the result after desugaring at least (cf. `h_desugar()`). Please poke tq.

Added a right-recursive test case, passes for both packrat and LL(k).