SableCC, an Object-Oriented Compiler Framework (original) (raw)
Related papers
Like its ancestor, it is intended as a text for a first course in compiler design. The emphasis is on solving p b l c m s universally cnwuntered in designing s language' translator, regardless of the source or target machine.
JastAdd—an aspect-oriented compiler construction system
Science of Computer Programming, 2003
We describe JastAdd, a Java-based system for compiler construction. JastAdd is centered around an object-oriented representation of the abstract syntax tree where reference variables can be used to link together di erent parts of the tree. JastAdd supports the combination of declarative techniques (using Reference Attributed Grammars) and imperative techniques (using ordinary Java code) in implementing the compiler. The behavior can be modularized into di erent aspects, e.g. name analysis, type checking, code generation, etc., that are woven together into classes using aspect-oriented programming techniques, providing a safer and more powerful alternative to the Visitor pattern. The JastAdd system is independent of the underlying parsing technology and supports any noncircular dependencies between computations, thereby allowing general multi-pass compilation. The attribute evaluator (optimal recursive evaluation) is implemented very conveniently using Java classes, interfaces, and virtual methods.
Compiler design in the Programming language
Journal of Emerging Technologies and Innovative Research
Abstract - compiler design is used to translate a code written in one programming language to other languages, while maintaining the meaning of the codes. The high-level language is usually composed by a developer, and compiler converts it to a machine language that could be understood by the processor. There are two major phases of a compiler, which is based on they compile. These phases include analysis phases and the synthesis phase. The lexical phase is composed of taking the modified code source originating from the language processor. The context-free grammar is mandated to producing production rules, which are followed by the syntax analyzer.
Compiler Construction Detail Design
Dr. Nwanze Ashioba, Ndubuife Nonso Daniel, 2021
A compiler is a language translator that translates a program written in high level programming language to an equivalent machine language. Compiler construction primarily comprises of some standard phases such as lexical analysis, syntax analysis, semantics analysis, intermediate code generation, code optimization and code generation. This paper analyzes the detail design of the various phases of compiler.
A Two-Dimensional Separation of Concerns for Compiler Construction
During language evolution, compiler construction is usually performed along two dimensions: defining new abstract syntax tree (AST) classes, or adding new operations. In order to facilitate such changes, two software design patterns (i.e., the inheritance pattern and the visitor pattern) are widely used to help modularize the language constructs. However, as each design pattern is only suitable for one dimension of extension, neither of these two patterns can independently fulfill the evolution needs during the compiler construction process. In this paper, we analyze two dimensions of concerns in compiler construction and develop a paradigm allowing compiler evolution across these two dimensions using both object-orientation and aspect-orientation. Moreover, this approach provides an ability to perform pattern transformation based on pluggable aspects. A simple implementation of an expression language and its possible extension is demonstrated using Java and AspectJ.
Courses on Grammars, Parsing and Compilation of programming languages have always been some of the core components of a computer science curriculum. The reason for this is that from the very beginning of these curricula it has been one of the few areas where the development of formal methods and the application of formal techniques in actual program construction come together. For a long time the construction of compilers has been one of the few areas where we had a methodology available, where we had tools for generating ...
2011
The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The design of a framework for compilers development
DOLPHIN framework is a solution conceived to support the development of modular compilers. Its supplies a large set of components, like: front-end's, back-end's, code analysis, code optimizations and measure components that can be combined to build new compilers. All these components work over a single form of intermediate code representation, the DOLPHIN Internal code Representation.
Reinventing the Wheel or Not Yet Another Compiler Compiler Compiler
Abstract: This paper discusses a tool developed for generating codegenerators. The first author, dismayed with the clumsiness of lex,yacc, JLex, and Java Cup, proposes a new tool that serves to augmentthe above tools, discusses challenges met during the first generationof said tool, and lays out plans for future revisions.