2005
A type-driven approach to concrete meta programming.
Publication
Publication
Applications that manipulate programs as data are called meta programs. Examples of meta programs are compilers, source-to-source translators and code generators. Meta programming can be supported by the ability to represent program fragments in concrete syntax instead of abstract syntax. The resulting meta programs are far more self-documenting because ``what you see is what you manipulate''. One caveat in concrete meta programming is the syntactic separation between the meta language and the manipulated language. Conventional scanning and parsing technologies have a hard time distinguishing the two levels. To aid in solving this problem, many meta programming systems use quoting and escaping to indicate precisely where level switches occur. These ``syntactic hedges'' can heavily obfuscate the concrete program fragments. In practice, it leads to programmers avoiding the use of concrete syntax for the bigger or more deeply nested program fragments. This paper contributes by removing the technical need for quotes and escapes, allowing more ``what you see is what you manipulate'' than before in meta programming applications. The method is based on typing mechanisms
Additional Metadata | |
---|---|
CWI | |
Software Engineering [SEN] | |
Organisation | Software Analysis and Transformation |
Vinju, J. (2005). A type-driven approach to concrete meta programming.. Software Engineering [SEN]. CWI. |