Skip to content

m2sf/m2bsk

Repository files navigation

M2BSK Modula-2 Bootstrap Kernel Project

Welcome to the M2BSK Modula-2 Bootstrap Kernel Project

Objective

The objective of this project is to develop a bootstrap compiler for the revised Modula-2 language described in

Modula-2 Revision 2010, Language Report for the Bootstrap Kernel Subset (BSK), by Kowarsch and Sutcliffe, July 2020.

NOTE: Due to minor edits, the PDF is currently out of sync with the online version below.

Grammar

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.

Language Specification

An online version of the language specification is here:

https://github.com/m2sf/m2bsk/wiki/Language-Specification

Scope

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

Targets

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).

License

Both compilers are licensed under the GNU Lesser General Public License (LGPL), both v.2.1 and v.3.

Prerequisites

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.

OS support

Both compilers will run on any operating system with target support for the C99 host-compiler.

Contact

If you have questions or would like to contribute to the project, get in touch via

Journal

For a discussion of design principles visit the journal at

+++

About

Modula-2 R10 Compiler supporting the M2 R10 Bootstrap Kernel subset (BSK).

Topics

Resources

Contributing

Stars

17 stars

Watchers

5 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors