skip to main content
article
Free Access

An all(1) compiler generator

Published:01 August 1979Publication History
Skip Abstract Section

Abstract

Aparse is a flexible and modular system for generating efficient one-pass compilers from attributed grammar specifications. The system is of particular interest in that it combines recent research in attributed parsing and error-correction into a powerful and practical tool.

It has been amply demonstrated that attributed grammars are a convenient mechanism for organizing translations ([Fan 72], [LRS 74], [Bra 76]). This is partially due to the fact that an attributed grammar is not a completely formal specification tool—it merely provides a framework for structuring a semantic and syntactic specification. A number of compiler-compilers have been written to process attributed grammars ([LB 74], [BW 78], [GRW 77]), but Aparse is unique in incorporating attribute values in the parsing function. We have found that this facility permits smaller grammars to be used, and smaller parsers to be generated. In addition, a significant degree of context-sensitivity can be reflected in what is essentially a context-free framework. Section 2 will contain a brief introduction to attributed grammars, and section 3 will sketch the theory of attributed parsing.

References

  1. 1 A. V. Aho, S. C. Johnson, and J. D. Ullman. "Deterministic Parsing of Ambiguous Grammars," Communications of the ACM, Vol. 18, No. 2, pp. 441-452 (1975). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 P. Branquart, J.-P. Cardinael, J. Lewi, J.-P. Delescaille, and M. Vanbegin. An Optimized Translation Process and its Application to ALGOL 68, Springer Verlag, Berlin (1976). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3 G. V. Bochmann and P. Ward. "Compiler Writing System for Attribute Grammars," The Computer Journal, Vol. 21, No. 2, pp. 144-148 (1978).Google ScholarGoogle Scholar
  4. 4 C.C.I.T.T. Study Group XI. High Level Language Team of Specialists. "Proposal for a Recommendation for a C.C.I.T.T. High Level Programming Language," Blue document (May 1977).Google ScholarGoogle Scholar
  5. 5 I. Fang. "FOLDS, a Declarative Formal Language Definition System," Technical Report STAN-72-329, Stanford University (1972).Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 C. N. Fischer, D. R. Milton, and S. B. Quiring. "An Efficient Insertion-Only Error-Corrector for LL(1) Parsers," Conference Record of the Fourth Annual Symposium on Principles of Programming Languages, pp. 97-103 (Jan. 1977). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 H. Ganzinger, K. Ripken, and R. Wilhelm. "Automatic Generation of Optimizing Multipass Compilers," IFIP 77, pp. 535-540 (1977).Google ScholarGoogle Scholar
  8. 8 S. L. Graham and S. P. Rhodes. "Practical Syntactic Error Recovery," Comm. of the ACM, Vol. 18, No. 11, pp. 639-650(Nov. 1975). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9 S. C. Johnson. "Yacc—Yet Another Compiler-Compiler," Comp. Sci. Tech. Rep. No. 32, Bell Laboratories (July 1975).Google ScholarGoogle Scholar
  10. 10 S. C. Johnson and M. E. Lesk. "UNIXTM Time-Sharing System: Language Development Tools," Bell System Technical Journal, Vol. 57, No. 6, Part 2, pp. 155-2176 (1978).Google ScholarGoogle Scholar
  11. 11 D. E. Knuth. "Semantics of Context-Free Languages," Mathematical Systems Theory, Vol. 2, pp. 127-145 (1968). Correction appears in Mathematical Systems Theory, Vol. 5, p. 95 (1971).Google ScholarGoogle ScholarCross RefCross Ref
  12. 12 B. W. Kernighan and D. M. Ritchie. The C Programming Language, Prentice Hall, Englewood Cliffs, NJ (1978). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13 O. LeCarme and G. V. Bochmann. "A (Truly) Usable and Portable Compiler Writing System," Information Processing 74, North-Holland Publishing Company (1974).Google ScholarGoogle Scholar
  14. 14 P. M. Lewis, D. J. Rosenkrantz, and R. E. Stearns. "Attributed Translations," Journal of Computer and Systems Sciences Vol. 9, pp. 279-304 (1974).Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15 D. R. Milton. "Syntactic Specification and Analysis using Attributed Grammars," Ph.D. dissertation, Computer Sciences Dept. Tech. Rept. #304, University of Wisconsin - Madison (1977). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16 T. J. Pennello and F. DeRemer. "A Forward Move Algorithm for LR Error Recovery," Conference Record of the Fifth Annual ACM Symposium on Principles of Programming Languages, pp. 241-254, (Jan. 1978). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17 Rowland, B. R. "Combining Parsing and Evaluation for Attributed Grammars," Ph.D. Thesis, University of Wisconsin-Madison, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An all(1) compiler generator

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 14, Issue 8
          Proceedings of the 1979 SIGPLAN symposium on Compiler construction
          August 1979
          234 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/872732
          Issue’s Table of Contents
          • cover image ACM Conferences
            SIGPLAN '79: Proceedings of the 1979 SIGPLAN symposium on Compiler construction
            August 1979
            241 pages
            ISBN:0897910028
            DOI:10.1145/800229

          Copyright © 1979 Authors

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 August 1979

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader