Abstract
This paper describes the theory behind and implementation of wburg, a code-generator generator that accepts tree grammars as input and produces a code generator that emits an optimal parse of an IR tree in just a single bottom-up pass. Furthermore, wburg eliminates the need for an explicit IR tree altogether. The grammars that wburg-generated parsers can parse are a proper subset of those that two-pass systems can handle. However, analysis indicates that uburg can optimally handle grammars for most instruction sets (e.g., SPARC, MIPS R3000, and x86).
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Alfred V. Aho, Mahedevan Ganapathi, and Steven W. K. Tjiang. Code generation using tree matching and dynamic programming. ACM Transactions on Programming Languages and Systems, 11(4):491–516, October 1989.
A. Balachandran, D. M. Dhamdhere, and S. Biswas. Efficient retargetable code generation using bottom-up tree pattern matching. Computer Languages, 15(3):127–140, 1990.
Helmut Emmelmann, Friedrich-Wilhelm Schröer, and Rudolf Landwehr. BEG—a generator for efficient back ends. In Proceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation, pages 227–237, New York, 1989. ACM.
Christopher W. Fraser and David R. Hanson. A Retargetable C Compiler: Design and Implementation. Benjamin/Cummings, Redwood City, California, 1995.
Christopher W. Fraser, David R. Hanson, and Todd A. Proebsting. Engineering a simple, efficient code-generator generator. ACM Letters on Programming Languages and Systems, 1(3):213–226, September 1992.
Christopher W. Fraser, Robert R. Henry, and Todd A. Proebsting. BURG — fast optimal instruction selection and tree parsing. SIGPLAN Notices, 27(4):68–76, April 1992.
Christoph M. Hoffmann and Michael J. O'Donnell. Pattern matching in trees. Journal of the ACM, 29(1):68–95, January 1982.
Eduardo Pelegri-Llopart and Susan L. Graham. Optimal code generation for expression trees: An application of BURS theory. In Proceedings of the 15th Annual Symposium on Principles of Programming Languages, pages 294–308, New York, 1988. ACM.
Todd A. Proebsting. Simple and efficient BURS table generation. In Proceedings of the SIGPLAN '92 Conference on Programming Language Design and Implementation, pages 331–340, New York, June 1992. ACM.
N. Wirth and J. Gutknecht. Project Oberon, the Design of an Operating System and Computer. Addison Wesley, 1992.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Proebsting, T.A., Whaley, B.R. (1996). One-pass, optimal tree parsing — With or without trees. In: Gyimóthy, T. (eds) Compiler Construction. CC 1996. Lecture Notes in Computer Science, vol 1060. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61053-7_69
Download citation
DOI: https://doi.org/10.1007/3-540-61053-7_69
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61053-3
Online ISBN: 978-3-540-49939-8
eBook Packages: Springer Book Archive