Welcome to the M2BSK Modula-2 Bootstrap Kernel Project
The objective of this project is to develop a bootstrap compiler for the revised Modula-2 language described in
NOTE: Due to minor edits, the PDF is currently out of sync with the online version below.
The grammar of the compiler is in the project repository
https://github.com/m2sf/m2bsk/blob/master/m2bsk-grammar.gll
For a graphical representation of the grammar, see section Syntax Diagrams.
An online version of the language specification is here:
https://github.com/m2sf/m2bsk/wiki/Language-Specification
The compiler supports the Bootstrap Kernel (BSK) subset of Modula-2 R10. It does not support earlier PIM or ISO dialects.
For a list of facilities that have been omitted in the subset, see Omissions
Two separate bootstrap compiler tracks exist.
- M2C, a C hosted bootstrap compiler, written in C99, generating C99 source code
- M2BSK, a Modula-2 hosted bootstrap compiler, written in a reduced subset of PIM M2, generating C99 source code
An LLVM backend will be added later (post-bootstrap).
Both compilers are licensed under the GNU Lesser General Public License (LGPL), both v.2.1 and v.3.
Both compilers require a C99 supporting C compiler.
Additionally, M2BSK requires MOTTO, a via-C feature-reduced PIM Modula-2 Compiler that supporst extensible records.
There are no dependencies on any third party libraries.
Both compilers will run on any operating system with target support for the C99 host-compiler.
If you have questions or would like to contribute to the project, get in touch via
-
email to the project maintainer
For a discussion of design principles visit the journal at
+++