Object-Oriented Language Processing

  • Pietu Pohjalainen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4228)


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.


Base Class Parse Tree Class Hierarchy Grammar Rule Attribute Grammar 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)Google Scholar
  2. 2.
    Koskimies, K.: Object-orientation in attribute grammars. In: Alblas, H., Melichar, B. (eds.) Attribute Grammars, Applications and Systems, pp. 297–329. Springer, Heidelberg (1991)Google Scholar
  3. 3.
    Grune, D., Bal, H.E., Jacobs, C.J.H., Langendoen, K.G.: Modern Compiler Design. Wiley publishing, Chichester (2000)Google Scholar
  4. 4.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)Google Scholar
  5. 5.
    Koskimies, K., Paakki, J.: Automatic language implementation. Ellis Horwood (1990)Google Scholar
  6. 6.
    Holmes, J.: Object-Oriented Compiler Construction. Prentice-Hall, Englewood Cliffs (1995)MATHGoogle Scholar
  7. 7.
    Johnson, S.C.: YACC, yet another compiler compiler. Rep. CS-TR-32, Bell Laboratories (1975)Google Scholar
  8. 8.
    Stroustrup, B.: The C++ Programming Language, 3rd edn. Addison-Wesley, Reading (1997)Google Scholar
  9. 9.
    Hall, P.W.: Parsing with C++ Constructors. ACM SIGPLAN Notices 28(4), 67–68 (1993)CrossRefGoogle Scholar
  10. 10.
    Arnold, K., Gosling, J., Holmes, D.: The Java(TM) Programming Language, 3rd edn. Addison-Wesley Professional, Reading (2000)Google Scholar
  11. 11.
    Standard ECMA-262. ECMAScript Language Specification. 3rd edn. (1999), http://www.ecma.ch/stand/ecma-262.htm
  12. 12.
    Thomas, D., Fowler, C., Hunt, A.: Programming Ruby: The Pragmatic Programmers’ Guide, 2nd edn., Pragmatic Bookshelf (2004)Google Scholar
  13. 13.
    Kodaganallur, V.: Incorporating Language Processing into Java Applications: A JavaCC Tutorial. IEEE Software 21(4), 70–77 (2004)CrossRefGoogle Scholar
  14. 14.
    Callahan, G., Clark, B.: Design Parameters in a Java Interpreter. Java Developer’s Journal (January 1999), http://jdj.sys-con.com/read/36098.htm
  15. 15.
    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)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Pietu Pohjalainen
    • 1
  1. 1.Department of Computer ScienceUniversity of Helsinki 

Personalised recommendations