- Notifications
You must be signed in to change notification settings - Fork3
An LLVM frontend for the Oberon programming language
License
zaskar9/oberon-lang
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
TheOberon programming language was proposed in 1987 byNiklaus Wirth as a successor to Pascal and Modula-2. Due to this lineage, Oberonis an ALGOL-like language with strong (static and dynamic) typing discipline. The programming paradigm of Oberon canbe classified as imperative, structured, modular, and object-oriented.
This project implements a compiler for the Oberon programming language as a frontend to theLLVMCompiler Infrastructure. It is written in C++ and originated as project accompanying the MSc course "CompilerConstruction" taught at theUniversity of Konstanz. As a consequence, this compiler originally onlytargeted the Oberon-0 subset of the language, as described in Niklaus Wirth's book"Compiler Construction" (Chapter 6, pp. 30-32). Since then, thesupported subset of the Oberon has been continuously extended with the goal to eventually cover the full languagespecification as described in the latest version of theOberon Language Report.In addition to these "official" extensions, other features were added to the supported dialect of the Oberon programming language.These feature were either inspired by convenience, such as interfacing with standard libraries, or by the compilerauthor's nostalgia of learningTurbo Pascal 6.0 as his first programminglanguage at high school. A description of the currently supported Oberon dialect in terms of syntax and semantics (ofunofficial features) can be found in the Wiki section of this project repository.
Owing to its origin as a course project, care has been taken that the provided C++ sourcecode can be compiled ondifferent operating systems and with different toolchains. Currently the sourcecode only depends onBoost andLLVM.As of August 2023, the following configurations are tested and known to work.
macOS | Windows | MSYS2 (CLANG64) | Linux (Ubuntu) | |
---|---|---|---|---|
Boost | 1.87.0 | 1.83.0 | 1.85.0 | 1.83.0 |
LLVM | 19.1.7 | 17.0.2 | 18.1.4 | 17.0.6 |
CMake | 3.30.0 | 3.27.0 | 3.29.3 | 3.30.0 |
CXX | LLVM Clang 19.1.7 Apple Clang 16.0.0 | CL 19.38.33133 | LLVM Clang 18.1.4 | GCC 13.3.0 |
For macOS and Linux, both the x64 and the arm64 version have been tested. Full support for Windows (arm64) is currentlyunder development.Detailed instruction on how to build the Oberon compiler and its dependencies can be found in the Wiki section of thisproject repository.
See theDocumentation pages.