Object-oriented Tree Traversal with JJForester

Tobias Kuipers, Joost Visser. Object-oriented Tree Traversal with JJForester. Electronic Notes in Theoretical Computer Science, 44(2):34-58, 2001. [doi]

Abstract

We want to use the advanced language processing technology available in the ASF+SDF Meta-Environment in combination with general purpose programming languages. In particular, we want to combine the syntax definition formalism (SDF) and the associated components that support generalized LR parsing, with the object-oriented language Java. To this end, we implemented JJForester, a tool that generates class structures from SDF grammar definitions. The generated class structures implement a number of design patterns to facilitate construction and traversal of parse trees represented by object structures. In a detailed case study, we demonstrate how program analyses and transformations for languages of non-trivial size can be constructed with JJForester.