Syntax vs datum. Syntax usually needs source locations tagged for good error reporting at minimum. String-> String or unannotated Sexp->Sexp are not going to be able to

CPP macros are string to string. Preprocessor style. They do annotate original source locations though.

[bindings as sets of scopes( “Let’s Build a Hygienic Macro Expander” by Matthew Flatt syntax objects

Hmm. macros are close to term rewriting. Quoting is a way of talking about syntax and meaning… Hmm. egglog macros expander if hygienic needs this stuff… We often want to switch between term and semantics views. Stepping out of the binding table. scope vs context a set of scopes is perhaps like an eclass of scopes metatheoryjl possibly had thoughts on this. generatedfunctions etc scope graphs a theory of name rtesolution Stack graphs at github for resoling references. This is an interesting dataflow/datalog feeling problem actually He mentions that dataflow is intertwined incrmenetal zero-config code nave partial path concat… proof? groupoid? tree sitter has patterns and rules and now graph construction? This does

Macros in Lean4

Macros like rust. Languages that aren’t uniform like lisp


[paper describing different generative programming systems] “micros”

A Third Perspective on Hygiene

See also: Partial Evaluation.

Raw macros work on syntax. Hygienic macros pay more attention to scope. They attach scope identification data to the syntax tree.

dynamic scope and lexical scope Without macros, the scope of binding forms is straightoforward. With macros,

sets of scopes - Flatt. Does this lattice maybe have something

Syntax objects in racket - More than just s-expressions. Annotated with source locations but also scope.

syntax-rules Syntax-case

What about gensymming?