Discussion:
Transpiling between Oberon, Modula and Pascal
(too old to reply)
711 Spooky Mart
2021-10-22 03:37:44 UTC
Permalink
What _good_ and up-to-date tools exist, if any, for transpiling between
Oberon, FreePascal, ObjectPascal, and the Modulas? Where would I look
for these. Please don't say "google" since the search engines really
suck nowadays.
--
┏━━━━┓──┏━━┓───┏━━┓── ┌────────────────────────┐ ┌────────┐
┗━━┓─┃──┗┓─┃───┗┓─┃── │ Spooky Mart [chan] 711 │ │ always │
───┃─┃──┏┛─┗┓──┏┛─┗┓─ │ https://bitmessage.org │ │ open │
───┗━┛──┗━━━┛──┗━━━┛─ └────────────────────────┘ └────────┘
Program Language Analyst
2021-10-22 19:00:22 UTC
Permalink
Post by 711 Spooky Mart
What _good_ and up-to-date tools exist, if any, for transpiling between
Oberon, FreePascal, ObjectPascal, and the Modulas? Where would I look
for these. Please don't say "google" since the search engines really
suck nowadays.
I don't think there is any. I'm working on a modest sort of formatter
for Object Pascal which can change some of the characteristics of the
Units. I tried to find something like that without success before I
started working on that tool.
G.K.
2022-12-07 13:24:22 UTC
Permalink
Post by Program Language Analyst
Post by 711 Spooky Mart
What _good_ and up-to-date tools exist, if any, for transpiling between
Oberon, FreePascal, ObjectPascal, and the Modulas? Where would I look
for these. Please don't say "google" since the search engines really
suck nowadays.
I don't think there is any. I'm working on a modest sort of formatter
for Object Pascal which can change some of the characteristics of the
Units. I tried to find something like that without success before I
started working on that tool.
How is this project coming along? Do you have a public repository?
--
G.K.
Program Language Analyst
2023-11-08 16:44:57 UTC
Permalink
Post by G.K.
Post by Program Language Analyst
Post by 711 Spooky Mart
What _good_ and up-to-date tools exist, if any, for transpiling between
Oberon, FreePascal, ObjectPascal, and the Modulas? Where would I look
for these. Please don't say "google" since the search engines really
suck nowadays.
I don't think there is any. I'm working on a modest sort of formatter
for Object Pascal which can change some of the characteristics of the
Units. I tried to find something like that without success before I
started working on that tool.
How is this project coming along? Do you have a public repository?
Unfortunately, it is on hold.

Right now I'm working on a ptop which is part of the FreePascal basic
toolset although it seems not to be actively maintained. I'm in the
final phase completing the first version of ptop which behaves as it was
intended to behave by the original author as far as I can tell. I fully
understand all the parts of ptop and I found several small bugs which I
have fixed.

This work will be merged into the official release of ptop if approved
by my co-worker from the the FreePascal community who has write access
to the official FreePascal repo.

I also understand the limitations of the approach taken by ptop and I've
already collected a set of changes for a next generation of ptop
necessary to ironing out most of the weaknesses of the current approach.

If this improved approach will be successful the next generation of ptop
will also be made available through the FreePascal repository.

My transformator project is implemented with Delphi and FreePascal, i.e.
can be compiled with both, Delphi and FreePascal, and runs on UNIX and
Windows.

To avoid having to implement the language frontend I tried out different
frontends from the FreePascal community. I gave up because none of these
collected all the information I need.

Then I tried JEDI Code Formatter which seemed to be not maintained (see
https://github.com/quadroid/jcf-pascal-format) and I reached the point
where I understood most of the decisions made by the original author.
Then I simplified some of the data structures according to the ideas the
author had in mind as I understood them but hadn't time so far to
complete these steps.

I also removed the dependency from the Lazarus GUI which was only
introduced by importing some declarations. A command line tool or -
generally spoken - the formatter should not depend on any GUI related
parts. In fact, the dependency can be flipped, i.e. the common
declarations can be imported from Lazarus without harm if the formatter
is needed.

So far, the object tree is populated and contains all the information I
need, but the generation phase is not implemented. The project is not
abandoned and will sooner or later be published as a replacement for
ptop and JEDI Code Formatter. Before I continue I will study the work of
Jay and quadroid on JEDI.
Bernhard
2024-09-27 07:21:39 UTC
Permalink
there is m transpiler from Modula-2 to Oberon originally created by
Niklaus Wirth available at https://github.com/btreut/ModulaToOberon
Loading...