Electrical Engineering
      and Computer Sciences

Electrical Engineering and Computer Sciences

COLLEGE OF ENGINEERING

UC Berkeley

Semantically-Sensitive Macroprocessing

William Maddox

EECS Department
University of California, Berkeley
Technical Report No. UCB/CSD-89-545
December 1989

http://www.eecs.berkeley.edu/Pubs/TechRpts/1989/CSD-89-545.pdf

Conventional procedure and type definition mechanisms are not sufficiently powerful to express many programming aberrations that can be captured by syntactic transformations. Unfortunately, conventional macroprocessing is oblivious to the semantics of the base language, resulting in scoping anomalies, poor handling of static semantic errors, and an inability to perform transformations dependent on semantic attributes of the manipulated program. We introduce a new mechanism, semantic macros, which permit such transformations a significant level of access to the static semantic properties of the program fragments they manipulate. In this way, new static semantic processing, including compilation of embedded languages with a rich static semantics of their own, can be incorporated into user-defined language extensions. A proof-of-concept language, XL, is described which embodies this mechanism.


BibTeX citation:

@techreport{Maddox:CSD-89-545,
    Author = {Maddox, William},
    Title = {Semantically-Sensitive Macroprocessing},
    Institution = {EECS Department, University of California, Berkeley},
    Year = {1989},
    Month = {Dec},
    URL = {http://www.eecs.berkeley.edu/Pubs/TechRpts/1989/5901.html},
    Number = {UCB/CSD-89-545},
    Abstract = {Conventional procedure and type definition mechanisms are not sufficiently powerful to express many programming aberrations that can be captured by syntactic transformations. Unfortunately, conventional macroprocessing is oblivious to the semantics of the base language, resulting in scoping anomalies, poor handling of static semantic errors, and an inability to perform transformations dependent on semantic attributes of the manipulated program. We introduce a new mechanism, semantic macros, which permit such transformations a significant level of access to the static semantic properties of the program fragments they manipulate. In this way, new static semantic processing, including compilation of embedded languages with a rich static semantics of their own, can be incorporated into user-defined language extensions. A proof-of-concept language, XL, is described which embodies this mechanism.}
}

EndNote citation:

%0 Report
%A Maddox, William
%T Semantically-Sensitive Macroprocessing
%I EECS Department, University of California, Berkeley
%D 1989
%@ UCB/CSD-89-545
%U http://www.eecs.berkeley.edu/Pubs/TechRpts/1989/5901.html
%F Maddox:CSD-89-545