Rodney M. Bates
rodney_bates at lcwb.coop
Thu Nov 17 17:29:04 CET 2011
I have used m2tom3 successfully a couple of times in the (distant) past.
There are a few places where the languages are different enough that you
get either unidiomatic or unworkable translations. As I recall, the method
of returning a function result will require some hand cleanup, and variant
records, if you have them, will just be flattened, rather than converted
to an object type hierarchy. Nevertheless, it will save a *lot* of tedious
editing of mundane syntactic nits.
TextF exposes PM3's internal representation of TEXT values, which is
altogether different from that of CM3, so you will not be able to use
it unless you use PM3. I am sure it is in the PM3 distribution at
Elego, and I know I have copies around.
By now, PM3 has probably suffered some bitrot, so installing it might
take some work. I have an installation around on a machine that has not
been powered up for a few months, but probably works. I probably
also have a compiled executable for m2tom3 on LINUXLIBC6 that might
run on a machine of that type. I could provide a copy of that, if
you want to see if you can do it without putting in a lot of work.
Or maybe I could just run it for you a few times.
On 11/15/2011 04:44 PM, Mark Wickens wrote:
> I found the m2tom3 translation utility here: http://freepages.modula2.org/downloads/m2tom3-2.03.tar.gz
> I attempted to compile it using cm3, but I get an unknown interface:
> msw at x60:~/m2tom3/m2tom3/src$ cm3
> --- building in ../LINUXLIBC6 ---
> unsupported m3_option value: "-O"
> new source -> compiling Standard.m3
> "../src/Analyzer/Standard.m3", line 25: unable to find interface (TextF)
> 1 error encountered
> compilation failed => not building program "m2tom3"
> Fatal Error: package build failed
> Has anyone heard of interface TextF? Alternatively, is there a port of this utility to cm3?
> I recently uncovered a machine-readable copy of my degree final year project, a Meta Assembler, written in Modula-2, and wondered if I could get it to compile using the utility to work with Modula-3.
More information about the M3devel