Abstract
Compiler architecture often follows an imperative layout. Different actions in the compiler are modeled as functions that operate over defined data structures. In this work, we present existing methodologies for writing object-oriented language-processing tools. As a contribution, we explore possibilities of writing a compiler based on recursive descent parsing in an object-oriented way. As a proof of the concept, we present a parser generator that employs the presented constructs both in its internal structure and in generated output.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)
Koskimies, K.: Object-orientation in attribute grammars. In: Alblas, H., Melichar, B. (eds.) Attribute Grammars, Applications and Systems, pp. 297–329. Springer, Heidelberg (1991)
Grune, D., Bal, H.E., Jacobs, C.J.H., Langendoen, K.G.: Modern Compiler Design. Wiley publishing, Chichester (2000)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)
Koskimies, K., Paakki, J.: Automatic language implementation. Ellis Horwood (1990)
Holmes, J.: Object-Oriented Compiler Construction. Prentice-Hall, Englewood Cliffs (1995)
Johnson, S.C.: YACC, yet another compiler compiler. Rep. CS-TR-32, Bell Laboratories (1975)
Stroustrup, B.: The C++ Programming Language, 3rd edn. Addison-Wesley, Reading (1997)
Hall, P.W.: Parsing with C++ Constructors. ACM SIGPLAN Notices 28(4), 67–68 (1993)
Arnold, K., Gosling, J., Holmes, D.: The Java(TM) Programming Language, 3rd edn. Addison-Wesley Professional, Reading (2000)
Standard ECMA-262. ECMAScript Language Specification. 3rd edn. (1999), http://www.ecma.ch/stand/ecma-262.htm
Thomas, D., Fowler, C., Hunt, A.: Programming Ruby: The Pragmatic Programmers’ Guide, 2nd edn., Pragmatic Bookshelf (2004)
Kodaganallur, V.: Incorporating Language Processing into Java Applications: A JavaCC Tutorial. IEEE Software 21(4), 70–77 (2004)
Callahan, G., Clark, B.: Design Parameters in a Java Interpreter. Java Developer’s Journal (January 1999), http://jdj.sys-con.com/read/36098.htm
Palsberg, J., Jay, C.B.: The Essence of the Visitor Pattern. In: COMPSAC 1998: Proceedings of the 22nd International Computer Software and Applications Conference, Washington (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Pohjalainen, P. (2006). Object-Oriented Language Processing. In: Lightfoot, D.E., Szyperski, C. (eds) Modular Programming Languages. JMLC 2006. Lecture Notes in Computer Science, vol 4228. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11860990_8
Download citation
DOI: https://doi.org/10.1007/11860990_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40927-4
Online ISBN: 978-3-540-40928-1
eBook Packages: Computer ScienceComputer Science (R0)