-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to the Wiki of the M2Sharp Modula-2 Compiler & Translator Project
The objective of this project is to develop a CLR hosted Modula-2 to C# translator and via-C# compiler that generates CLR executable code.
In translator mode, M2Sharp translates Modula-2 source to C# source files. In compiler mode, M2Sharp compiles Modula-2 source via C# source files to object code or executables using the host system's C# compiler.
The intended purpose for the M2Sharp compiler is to provide a means:
- to compile, build and deploy a CLR 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 targeting the CLR.
M2Sharp 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 M2Sharp will support only the foreign function interface to C#. The C and JVM FFIs also described in the specification are specific to M2C and M2J respectively, and will not be supported by M2Sharp.
The earlier PIM and ISO dialects will not be supported.
The grammar of the compiler is in the project repository
https://github.com/m2sf/m2sharp/blob/master/m2c-grammar.gll
For a graphical representation of the grammar, see Syntax Diagrams.
The M2Sharp compiler is licensed under the GNU Lesser General Public License (LGPL) both v.2.1 and v.3.
The M2Sharp compiler is written in C# and therefore a C# compiler is required to build it.
There are no dependencies on any third party libraries.
M2Sharp will compile and run on any target system with a CLR execution environment.
M2Sharp'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.
M2Sharp 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) 2017 Modula-2 Software Foundation