gll icon indicating copy to clipboard operation
gll copied to clipboard

Introduce an IR for modularizing and simplifying parser generation

Open eddyb opened this issue 7 years ago • 2 comments

Instead of generating a string directly from CPS, and having to do e.g. the {push,pop}_state tracking on the fly, we could be producing a CFG ("control-flow graph" in this context), with only one deviation from the standard recipe: a "fork" node, where both/all successors execute "in parallel".

eddyb avatar Aug 21 '18 18:08 eddyb

cc @dragostis since you've been talking about an IR framework to use with pest

CAD97 avatar Jan 09 '19 19:01 CAD97

I think we can probably do something like structured control-flow first, mimicking the calls we make to helpers for "CPS to string", but without the {push,pop}_state parts (we would need "local variables" or similar - also, if we stop putting | cases into the state, the state would always be a "split" offset into a range).

eddyb avatar Mar 12 '19 17:03 eddyb