-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Wiki of the M2C Modula-2 Translator & Compiler Project
The objective of this project is to develop a highly portable, reliable, readable and maintainable Modula-2 to C translator and via-C compiler that generates authentic and readable C source code.
The intended purpose for the M2C compiler is to provide a means:
- to cross-compile, build and deploy a C hosted compiler for the BSK subset of Modula-2 R10.
- to develop and bootstrap a self-hosting compiler for the full Modula-2 R10 specification.
M2C shall support the bootstrap kernel subset of the revised Modula-2 language described in "Modula-2 Revision 2010" (Kowarsch and Sutcliffe, July 2020). For details, see the online language specification at the project wiki or download the PDF version. Please note that M2C will support only the foreign function interface to C. The CLR and JVM FFIs also described in the specification are specific to M2Sharp and M2J respectively, and will not be supported by M2C.
The earlier PIM and ISO dialects will not be supported.
The grammar of the compiler is in the project repository
https://github.com/m2sf/m2c/blob/master/m2c-grammar.gll
For a graphical representation of the grammar, see Syntax Diagrams.
The M2C compiler is licensed under the GNU Lesser General Public License (LGPL) both v.2.1 and v.3.
The M2C compiler is written in C99 and therefore a C99 compiler is required to build it.
There are no dependencies on any third party libraries.
M2C will compile and run on any target system supported by the host compiler.
M2C's filesystem and pathname libraries support the following operating systems:
- AmigaOS
- DOS, Windows
- POSIX, Unix
- VAX/VMS, OpenVMS
For other systems, filesystem access and pathname parsing libraries may have to be adapted.
M2C has been integrated with Vim.
This project is under active development (May 2023).
If you have questions or would like to contribute to the project, get in touch via
-
email to the project maintainer
+++
Copyright (C) 2023 Modula-2 Software Foundation