Skip to content

Transpiler from Modula-2 to Oberon and Component Pascal

Notifications You must be signed in to change notification settings

GunterMueller/ModulaToOberon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ModulaToOberon

Transpiler from Modula-2 to Oberon and Component Pascal

In the second half of the last decade of the last century, I found Niklaus Wirth's Modula to Oberon transpiler as binhex files on some ftp server, most probably it was the ftp server of the GWDG (Gesellschaft für wissenschaftliche Datenverarbeitung, part of the German Max Planck Society), where it is still (as of 26-Apr-2023) available at this directory https://ftp.gwdg.de/pub/languages/oberon/ftp.inf.ethz.ch/OberonV4/MacII/Sources/ModulaToOberon/.

Nw's original version skips comments and presents syntax errors as error numbers. The latter was typical compiler behavior in early Modula-2 times (at least for those compilers written by NW's group). There should have been also a list, which explaines the meaning of the error number. This list was missing for the transpiler. I contacted NW for help, but he could not help either, so I used available Modula-2 compiler error lists and guessed the meaning of the error numbers for the transpiler in the first version. Later I used BlackBox error elements for the error messages in the BlackBox version. I also modified it to preserve comments, eventually doubling them by collecting corresponding comments from both, the DEFINITION and the IMPLEMENTATION MODULE.

At that time (late 1990ies) I used Oberon-V4 and BlackBox in parallel and I tried to keep two versions in sync. For that purpose I used version elements, which were available in Oberon-V4 (see Text Elements on https://ssw.jku.at/Research/Projects/OberonDownloads.html) and additionally I heavily used fold elements. I include the BlackBox StdCoded file m2o.txt. Sorrily the importer for the *.Eth files of the current BlackBox version does not import the fold elements correcty and cannot handle version elements. I'll try my best in the next time to manually correct these problems.

About

Transpiler from Modula-2 to Oberon and Component Pascal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Modula-2 100.0%