| W. Maddox. Semantically-sensitive macroprocessing. Technical report, University of California, Berkeley, 1989. Technical Report UCB/CSD 89/545. |
....intended primarily for metaprogramming. Such systems perform compile time transformations according to a developer supplied specification. Many metaprogramming tools operate by performing generic source to source transformations. Syntactic and semantic macro processors such as MS [Weise 93] XL [Maddox 89] OpenJava [Tatsubori 00] OpenC [Chiba 95] as well as aspect oriented programming systems such as AspectJ [Kiczales 97] fall into this category. These tools are designed for compiler like use and have many of the same limitations as other batch oriented development tools. The result of the ....
Maddox, W. Semantically-Sensitive Macroprocessing. Master's thesis, University of California, Berkeley. UCB/CSD 89/545, 1989.
....the invariant is in fact represented as a syntax tree, so here we have an example of a higher order attribute. De ning new language features in this way, by expanding new productions to old, is called forwarding. Forwarding is similar to but subtly di erent from syntax [33] and semantic macros [20]. Like semantic macros, forwarding does give access to semantic information, for instance the attribute r :type:invariant . Such semantic information is not available in syntax macros. Forwarding is di erent from both semantic and syntax macros in that not all attribute queries on a new production ....
W Maddox. Semantically-sensitive macroprocessing. Master's thesis, The University of California at Berkeley, Computer Science Division (EECS), Berkeley, CA 94720, December 1989.
....this we describe the functional and imperative speci cation languages and their instantiations with the model target language LM . 4. 1 Macro languages as speci cation languages Macro processing has long been used as a mechanism for implementing language translators [McI60,Lea66,Che66,WC93,Mad89] Our colleagues and we have used macro processing in the framework of algebraic compilers in many di erent instances [Lee90,Kna94,RHVWK97,VW98,Hal99] In all of these cases, the macro languages act as a kind of translator speci cation language. In the realm of algebraic compilers, the macro ....
....of the rst component. This macro expands into code which computes the value of the expression and leaves that value on the top of the stack. 12 add : Expr 0 : Expr 1 Expr 2 macro : Expr 1 Expr 2 #if type(Expr 1 ) Integer addi #else addr #endif (By using Maddox s semantic macros [Mad89] in algebraic compilers [VW98] we can access semantic information such as an expression s type, type(Expr 1 ) during macro expansion. Of interest here is the fact that we ve used the macro language #if construct to specify the derived operation which computes the target language image, in ....
W Maddox. Semantically-sensitive macroprocessing. Master's thesis, The University of California at Berkeley, Computer Science Division (EECS), Berkeley, CA 94720, December 1989.
....large AST to include these ASTs. Manipulating a large AST is another di#cult task. To reduce these di#culties, macro systems should provide logical and contextual information of programs for macro programs. There are only a few macro systems providing the logical information. For example, XL [15] is one of those systems although it is for a functional language but not for an OO language. 3 OpenJava OpenJava is our advanced macro system for Java. In OpenJava, macro programs can access the data structures representing a logical structure of the programs. We call these data structure class ....
William Maddox. Semantically-Sensitive Macroprocessing. Master's thesis, University of California, Berkeley, 1989. ucb/csd 89/545.
....program may be written. They have long been advocated as a means for extending programming languages [26, 4, 14] Recent interest in domain specific and customizable languages poses the challenge of using macros to realize new language concepts and constructs or even to grow entire new languages [20, 2, 15]. Existing macro languages are either unsafe or not expressive enough to live up to this challenge, since the syntax allowed for macro invocations is too restrictive. Also, many macro languages resort to compile time meta programming, making them di#cult to use safely. In this paper we propose a ....
W. Maddox. Semantically-sensitive macroprocessing. Technical report, University of California, Berkeley, 1989. Technical Report UCB/CSD 89/545.
....language by adding new syntax rules and macro definitions and then regenerating the compiler from the specifications. Thus, although these systems use macro processors as code generators the programmer can not add macro definitions to extend the language. The semantic macro, introduced by Maddox [52], is another macro style which was designed to allow programmers to extend high level languages with macro definitions, but which also has implications on the use of macro processors in language translators. In using these macros to extend a base langue, the macro writer has access to many of the ....
....symbols on the right 29 hand side. If the parameter corresponds to a non terminal symbol, then during macro expansion, the parameter may be replaced by the target image of the source language construct derived from the non terminal symbol. Each parameter may have additional semantic properties [52] associated with it and keywords are used to identify these different properties. In assembly language macros additional properties of a parameter include the type of the result computed by the actual parameter and the location of this result. In this macro language, the only property associated ....
W Maddox. Semantically-sensitive macroprocessing. Master's thesis, The University of California at Berkeley, Computer Science Division (EECS), Berkeley, CA 94720, December 1989.
.... 1 Introduction Syntax macros have long been advocated as a means for extending programming languages [21, 4, 11] Recent interest in domain specific and customizable languages poses the challenge of using macros to realize new language concepts and constructs or even to grow entire new languages [16, 1, 12]. Existing macro languages are not expressive enough to lift this challenge, since the syntax allowed for macro invocations is too restrictive. Also, many macro languages resort to compile time meta programming, making them di#cult to use safely. In this paper we propose a new macro language ....
William Maddox. Semantically-sensitive macroprocessing. Technical report, University of California, Berkeley, 1989. Technical Report UCB/CSD 89/545.
....large AST to include these ASTs. Manipulating a large AST is another difficult task. To reduce these difficulties, macro systems should provide logical and contextual information of programs for macro programs. There are only a few macro systems providing the logical information. For example, XL[15] is one of those systems although it is for a functional language but not for an OO language. 3 OpenJava OpenJava is our advanced macro system for Java. In OpenJava, macro programs can access the data structures representing a logical structure of the programs. We call these data structure class ....
Maddox, W. Semantically-sensitive macroprocessing. Master's thesis, University of California, Berkeley, 1989. ucb/csd 89/545.
....can be flexibly divided, transformed, and inspected. Lisp s macro system deals with macro arguments as a tree of symbols, which can be manipulated as other regular data structures. Such macro systems have been also developed for languages like C, which has a more complex grammar than Lisp [24, 13, 25, 16]. These macro systems are called programmable syntax macros since their macro arguments are not parse trees but abstract syntax trees (ASTs) so that it is easy to handle the complex grammar. Significant design issues for syntax macros are (1) how to specify places where a macro is expanded in a ....
....Writing a macro for defining an abstract class Visitor is also difficult. Although the macro needs to collect the names of all the tree node classes, no direct supports are provided by the syntax macro systems. Again, the programmer has to write a complex pattern to retrieve the class names. XL [16] provides semantic information obtained by static program analysis in macro functions, but it is a functional language without object orientation. The semantic information provided by XL is limited to the static type of expressions and so on. 3: OpenC The first version of our C macro system ....
William Maddox. Semantically-sensitive macroprocessing. Master's thesis (ucb/csd 89/545), University of California, Berkeley, 1989.
....terms requiring the target language to be provided with a macro facility [WC93] that allows the compiler specifier to program the code generation activity of the compiler. Such a facility is obtained by assuming that the target language is provided with semantic macro operations [Lee90, Rus90, Mad89] and with a macro processor, M, provided with its own arithmetic and logic power. Macro operations are parameterized target language constructs associated with the specification rules r 2 R, rhs(r) t 0 A 1 t 1 : t n Gamma1 An t n . We use the symbol , accompanied by indices if necessary, ....
W. Maddox. Semantically-sensitive macroprocessing. Master's thesis, The University of California at Berkeley, Computer Science Division (EECS), Berkeley, CA 94720, December 1989.
....associated with r 2 CS(L) specifies the semantics of source language constructs w r specified by r compositionally, in terms the types defined in w r , constants and variables declared in w r , and transition performed by the computation denoted by w r . 5. Develop target image macro operations [20, 21, 30, 35] (see Section5.5) associated with the rules in CS(L) The target macro operation associated with r 2 CS(L) specifies the target images of the source language constructs specified by r compositionally, in terms of the target images of their construct components. Each of the combinations S, S R, ....
....in programming terms, by requiring the target language to be provided with a macro facility [43] that allows the compiler specifier to program the code generation activity of the compiler. Such a facility is obtained by assuming that the target language is provided with semantic macro operations [20, 30, 21] and with a macro processor, M, provided with its own arithmetic and logic power. Macro operations are parameterized target language constructs associated with the specification rules r 2 CS(L) rhs(r) t 0 A 1 t 1 : t n Gamma1 An t n . We use the symbol , accompanied by indices if ....
W. Maddox. Semantically-sensitive macroprocessing. Master's thesis, The University of California at Berkeley, Computer Science Division (EECS), Berkeley, CA 94720, December 1989.
No context found.
W. Maddox. Semantically-sensitive macroprocessing. Technical report, University of California, Berkeley, 1989. Technical Report UCB/CSD 89/545.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC