Compiler sources in the repository cover these platforms and processors
The last letter in the name of the compiler modules (e.g. B in OPB, iOPB or OROPB) indicate the function
Module | Function |
---|---|
B(uilder) | Builds the syntax tree |
C(ode emitter) | Higher level part of the code generator |
L(ow lever code generator) | Lower level part of the code generator |
M(achine) | Interface to the host |
P(arser) | Parses the language |
S(canner) | Scans the source and extracts the symbols on which the language is built |
T(able handler) | Maintains the table holding declared types and variables |
(Tree tra)V(erser) | Reads the syntax tree |
B, P, S and T form the front-end and should be platform independent independent. The rely on some constants exported from M to check for certain limitations already while reading the source.
C, L and V form the back-end and need to be adapted/rewritten when porting Oberon to a new platform.
M is used by both front- and back-end.
Much more informations on the compiler can be found in the TechReport OP2 a portable Oberon Compiler by Régis Crelier or his PhD-Thesis.
The Linux and Windows implementation have additional modules I and O.
Besides that you can find compiler sources in the ProjectOberon folders which cover the original Oberon language only.
Code generators for MIPS, RISC-V and ARMv7 based on the System 3 version of the OP compiler can be found at OLR Oberon Linux Revival