Gents,
It took me years but after all it wasn't as difficult as I imagined. I
have a working version (in alpha stage) of a crosscompiler.
The compiler accepts the PLOV language (simplified version of Modula-2)
and produces PALO.
PALO is an intermediate language. It needs a few backends (for each
processor architecture) that yet have to be written. Still, PALO is a
Forth like intermediate language so the backends can also be relatively
simple.
Here http://fruttenboel.verhoeven272.nl/m4m/Plov10.html is the latest
version that compiles the wikitest program.
Why compile to an intermediate language? For one, because it is easier
to do. But also, if I make another compiler for another language, it
will also produce PALO code and can be used with the same ALTO backends
Some characteristics of PLOV:
- only one datatype
- no nested procedures
- LOOP, REPEAT, WHILE, IF statements (can be nested very deep)
- no punctuation required (i.e. no ; to terminate statements)
- local variables but no PROCEDURE arguments
--
Met vriendelijke groeten,
Jan Verhoeven
http://fruttenboel.verhoeven272.nl