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.
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 5 I. Fang. "FOLDS, a Declarative Formal Language Definition System," Technical Report STAN-72-329, Stanford University (1972).Google ScholarDigital Library
- 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 ScholarDigital Library
- 7 H. Ganzinger, K. Ripken, and R. Wilhelm. "Automatic Generation of Optimizing Multipass Compilers," IFIP 77, pp. 535-540 (1977).Google Scholar
- 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 ScholarDigital Library
- 9 S. C. Johnson. "Yacc—Yet Another Compiler-Compiler," Comp. Sci. Tech. Rep. No. 32, Bell Laboratories (July 1975).Google Scholar
- 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 Scholar
- 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 ScholarCross Ref
- 12 B. W. Kernighan and D. M. Ritchie. The C Programming Language, Prentice Hall, Englewood Cliffs, NJ (1978). Google ScholarDigital Library
- 13 O. LeCarme and G. V. Bochmann. "A (Truly) Usable and Portable Compiler Writing System," Information Processing 74, North-Holland Publishing Company (1974).Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 17 Rowland, B. R. "Combining Parsing and Evaluation for Attributed Grammars," Ph.D. Thesis, University of Wisconsin-Madison, 1977. Google ScholarDigital Library
Index Terms
- An all(1) compiler generator
Recommendations
An all(1) compiler generator
SIGPLAN '79: Proceedings of the 1979 SIGPLAN symposium on Compiler constructionAparse 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 ...
LR Automatic Parser Generator and LR(1) Parser
LR is an LR(1) parser generation system. It is written entirely in portable ANS1 standard Fortran 66 and has been successfully operated on a number of computers. LR uses a powerful algorithm of Pager's to generate a space efficient parser for any LR(1) ...
Full LR(1) parser generator Hyacc and study on the performance of LR(1) algorithms
C3S2E '11: Proceedings of The Fourth International C* Conference on Computer Science and Software EngineeringDespite the popularity of LALR(1) parser generators such as Yacc/Bison and LL parser generators such as ANTLR, robust and effective LR(1) parser generators are rare due to expensive performance and implementation difficulty. This work employed relevant ...
Comments