Skip to content
Benjamin Kowarsch edited this page May 30, 2017 · 6 revisions

M2Sharp Modula-2 Compiler & Translator Project

Welcome to the Wiki of the M2Sharp Modula-2 Compiler & Translator Project

Objective

The objective of this project is to develop a highly portable, reliable, readable and maintainable multi-dialect Modula-2 to C# translator and via-C# compiler that is feature compatible with the M2C and M2J translators/compilers.

Purpose

The purpose of the M2Sharp compiler is to provide a means:

  • to compile and run program examples from early Modula-2 books (PIM3/PIM4), in particular works by Wirth.
  • to develop, build and bootstrap a .NET compiler for Modula-2 Revision 2010 written in a subset of M2 R10.

Dialects

The M2Sharp compiler shall support the classic Modula-2 language described in the third and fourth editions of "Programming in Modula-2" (Wirth, 1983-1985) and selected features of the revised Modula-2 language described in "Modula-2 Revision 2010" (Kowarsch and Sutcliffe, 2010-2015). For details, see section Dialects & Language. The ISO Modula-2 dialect will not be supported.

Grammar

The grammar of the compiler is in the project repository

https://github.com/m2sf/m2sharp/blob/master/m2sharp-grammar.gll

For a graphical representation of the grammar, see section Syntax Diagrams.

License

The M2Sharp compiler is licensed under the GNU Lesser General Public License (LGPL) both v.2.1 and v.3.

Prerequisites

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. A .NET or Mono execution environment is required to execute it.

OS support

The M2Sharp compiler will run on any operating system with a .NET or Mono execution environment installed.

IDE support

The M2Sharp compiler will be integrated with Vim, possibly with MS Visual Studio and Xamarin Studio.

Collaboration

If you would like to contribute to the project, please get in touch by email

trijezdci (gmail)

+++

Clone this wiki locally