compilers@ima.UUCP (01/07/86)
[from Eduardo Krell <think!ekrell@LOCUS.UCLA.EDU>] In article <2287@burdvax.UUCP> wpl@burdvax.UUCP (William P Loftus) writes: >Since A is copying attributes i and k from a child and also calculating >attribute j from the same attributes, is it better to get the values (that >j is calculated) from the children nodes or to calculate them from attributes >in the same node? You might want to read the following paper: Martin, David and Chirica Laurian, ``An Order-Algebraic Definition of Knuthian Systems'', Math. Systems Theory No. 13 (1979). In this paper the authors prove that any AG with both synthesized and inherited attributes can be transformed into an equivalent AG with only synthesized attributes. They also show how to do it. The price you pay for doing this is that some attributes are now in the functional domain (i.e. some attributes are functions, not just plain values). The payoffs, however, are tremendous since now you can process your AG in a strictly top-down, syntax-directed scheme. -- Eduardo Krell UCLA Computer Science Department ekrell@ucla-locus.arpa ..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell --------
compilers@ima.UUCP (01/09/86)
[from harvard!enmasse!dave] Organization: EnMasse Computer Corp., Acton, MA I understand that Microsoft's latest compilers are based on an attribute grammar system. That's their "C-Merge" system; frontends are attribute grammar based parsers (e.g., for C, Fortran, Pascal) generating code for a very low level psuedo-machine, which is then mapped to the instruction set for a specific machine (e.g., 8088/8086, 80286, 68000). Sounded a lot like Tanenbaum's system, except commercial and the psuedo-machine was less block-structured. At least, this was the story a while ago; it's certainly changed to get the products out commercially. Do notice, however, that at least one of their current compilers is quite good (for IBM PCs and clones such as the AT). They have some good folk working on their compilers. David Brownell EnMasse Computer Corp ...!{harvard,talcott,genrad}!enmasse!dave
compilers@ima.UUCP (01/15/86)
[from jrp@nplmg1a.UUCP (John Pavel)] Organization: National Physical Laboratory,Teddington,UK. In article <136300029@ima.UUCP> compilers@ima.UUCP writes: >I'm interested in finding people that have used attribute grammars to >aid the development of a real live compiler. We at the Protocol Standards Group at NPL have been using attribute grammars to facilitate the decoding of protocol data units, and also in the construction of several simple language parsing front-ends. We have used two main tools (apart from yacc which uses a bodged attribute grammar of sorts). The first is GAG from the University of Karlsruhe [Lecture Notes in Computer Science Vol 141]; this is a large and fairly impressive set of tools written in just about ISO standard Pascal, producing ISO Pascal front-ends. People have been using this for building Ada compilers and (I am informed) Ada to COBOL tranlators! The other is Prolog, which is good for trying out ideas, but probably not a practical construction tool. One of the best texts I know on attribute grammars is Waite/Goos: "Compiler Construction" from Springer-Verlag.