[Dok Melody Scratchpad Notes]



Bottom-up and Top-down navigation inside the AST.

It can be used for:

  • code analysis
  • code transformation
  • macro expansion

In Lisp many macro are a case analysis of the input synatx, so AG are useful.

In Nanopass there are transformations from one language to another, so AG transforming the tree are useful.

The DokMelody IDE should show the source data, the resulting data, and which part of source data generated the corresponding part of result data, and the part of code generating it.

TODO check the link with CHR, maybe they are based on pattern an AST and rewrite rule

TODO join the best idea of Nanopass (e.g. compact syntax based on small symbol of common types, and diffs by languages, and clear transformation to one language to another) with AG (e.g. top-down attributes, add additional attributes to the same AST).

TODO there are various types of AG semantic (e.g. with rewriting, with references, incremental, …), then study the best approach.