Skip to content

trijezdci/MOTTO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MOTTO — Classic Modula-2 Translator Tokyo

MOTTO is a source to source Modula-2 Translator for classic Modula-2 (aka PIM). It forms part of a multi-stage toolchain that translates source files written in any of the classic Modula-2 dialects described in the 2nd, 3rd and 4th edition of Niklaus Wirth's book "Programming in Modula-2" published by Springer Verlag via C99 to executable code.

ISO Modula-2 will not be supported.

Translating Unified PIM

When translating newly developed source code written in the unified and extended PIM dialect of MOTTO, no dialect reduction is required and the sources can be translated directly by MOTTO to C99, then compiled, assembled and linked to executable code by clang, gcc or tcc.

translation compilation assembly linking
MOTTO clang/gcc/tcc assembler linker

Translating PIM2, PIM3, PIM4

When translating legacy sources written in any of the classic dialects known as PIM2, PIM3 and PIM4, the sources are first reduced by the M2-Redux utility to a unified, dialect agnostic form. In a second stage the dialect agnostic source files are translated by MOTTO to C99. In a third stage, the C99 source files are compiled, assembled and linked to executable code by clang, gcc or tcc.

reduction translation compilation assembly linking
M2-Redux MOTTO clang/gcc/tcc assembler linker

A replacement for the venerable Modula-2 Compiler Karlsruhe (MOCKA)

Due to a backend generated by an undocumented proprietary backend generator, MOCKA is locked to the Intel x86 32-bit architecture; therefore, a replacement that is platform independent and 100% open source is desirable.

MOTTO can fill the void. Using M2-Redux and MOTTO, most MOCKA source files can be translated without the need to manually edit them.

Note

The project has been repurposed from its original objective and scope as a PIM3 compiler. Rework will take some time.

For more details please visit the project wiki at the URL: https://github.com/trijezdci/motto/wiki

+++

About

Classic Modula-2 Source to Source Translator

Topics

Resources

Stars

29 stars

Watchers

6 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages