kgt icon indicating copy to clipboard operation
kgt copied to clipboard

Promote the rrd node tree to serve as a general IR for all dialects

Open katef opened this issue 6 years ago • 0 comments

The AST is inconvenient; it has nesting of a forced hierarchy of particular types. In retrospect I think I'd prefer to construct rrd nodes directly. And now the tnode tree has positional information split off, I think these rrd nodes should serve well as an abstract representation of grammars for both transformation and for rendering to all outputs. In turn that makes the AST nodes redundant, and I think those can go.

So:

  1. Move the rrd nodes out for general use;
  2. Switch all outputs to the rrd nodes;
  3. Have all outputs share the tree rewriting;
  4. Construct the rrd nodes directly from parser actions;
  5. Remove AST;

And perhaps: 6. Rename rrd nodes to AST 7. Rename tnode to rrd?

katef avatar Mar 11 '19 03:03 katef