GCC 13.2 released (with Modula-2 support) (Developers)
> Also, Rugxulo, i hear you do some experiments in compilers area..
I've never written a compiler, and I'm sorely lacking in deep understanding of symbol tables, trees, graphs, LL(1) parsing, etc.
I mainly like using (or even rebuilding) interpreters and compilers and find some language dialects intriguing. But most of it is hampered by non-portability or extreme complexity.
> I want share idea:
> It is need go in reverse way:
> 1. Create linker (obj's -> exe)
> 2. Create backend - codegenerator (bytecode -> obj)
> 3. Create frontend - parser (source -> bytecode)
>
> If go in direct way each step will create new restrictions and requirements
> (more and more) -> need do lot of refactoring for all prev steps (and chain
> steps).
A million separate auxiliary .EXEs and lots of temp files? That's probably what I would do, but if your target machines have enough spare RAM, you can save some effort by not strictly separating everything.
> Also, in this way possible (near to) easy create TP7-grade compiler only.
TP7 may be overkill. In particular, it's too DOS/8086-specific, and Wirth would eschew any inline assembly feature. Oberon-07 isn't perfect either.
> For example, i move to trash my experiments with Pascal-S, because (imho)
> Wirth's bytecode is not so good for optimization on backend (no SSA form,
> etc).
His RISC cpu code is probably considered "bytecode" these days.
> Also, all of this is a reason for "strange" project rlink.
The last thing you need to worry about is ELF vs. Mach-O vs. PE/COFF. Use something neutral (if possible).
> Will be better split all steps to standalone applications.
Maybe, and I halfway agree, definitely. But it will be slower and use temporary files. (So? Use a RAM disk.) I think it's more "transparent" this way to see what's going on, to make certain steps optional. (Obviously a preprocessor is not strictly needed for some languages and slows everything down.)
> Imho, Wirth's pascal-p5/m2/oberon cover frontend only and shoud be used
> last of all.
One guy was running TP5 (under EMU2) hosted on Linux. But another guy was emulating CP/M (Z80) on a RaspPi (via Ultibo) with no host OS and running TP3. Another guy tried to port the Oberon/RISC emulator (compiler and OS) to RaspPi as native (also via Ultibo).
Complete thread:
- Source code for the Lilith's single pass Modula-2 compiler - DosWorld, 01.11.2022, 14:54 (Developers)
- Source code for the Lilith's single pass Modula-2 compiler - Rugxulo, 02.11.2022, 01:36
- Source code for the Lilith's single pass Modula-2 compiler - DosWorld, 06.11.2022, 21:27
- Source code for the Lilith's single pass Modula-2 compiler - boeckmann, 06.11.2022, 21:49
- Source code for the Lilith's single pass Modula-2 compiler - Rugxulo, 11.11.2022, 09:07
- GM2 merged into GCC 13 - Rugxulo, 27.12.2022, 08:55
- GCC 13.1 released (with Modula-2 support) - Rugxulo, 27.04.2023, 06:37
- GCC 13.1 released (with Modula-2 support) - DosWorld, 27.04.2023, 17:27
- GCC 13.1 released (with Modula-2 support) - glennmcc, 27.04.2023, 18:38
- GCC 13.1 released (with Modula-2 support) - DosWorld, 28.04.2023, 20:40
- GCC 13.1 released (with Modula-2 support) - Rugxulo, 28.04.2023, 04:53
- GCC 13.1 released (with Modula-2 support) - glennmcc, 27.04.2023, 18:38
- GCC 13.2 released (with Modula-2 support) - Rugxulo, 27.07.2023, 22:56
- GCC 13.2 released (with Modula-2 support) - Rugxulo, 15.09.2023, 05:53
- GCC 13.2 released (with Modula-2 support) - DosWorld, 15.11.2023, 13:50
- GCC 13.2 released (with Modula-2 support) - Rugxulo, 20.11.2023, 08:53
- compiler optimizations and algorithmic efficiency - Rugxulo, 05.03.2024, 06:29
- comparison of Pascal (P4 subset) bytecode compiler - Rugxulo, 29.04.2024, 05:42
- GCC 13.2 released (with Modula-2 support) - Rugxulo, 20.11.2023, 08:53
- GCC 13.2 released (with Modula-2 support) - DosWorld, 15.11.2023, 13:50
- GCC 13.2 released (with Modula-2 support) - Rugxulo, 15.09.2023, 05:53
- GCC 13.1 released (with Modula-2 support) - DosWorld, 27.04.2023, 17:27
- GCC 13.1 released (with Modula-2 support) - Rugxulo, 27.04.2023, 06:37
- Source code for the Lilith's single pass Modula-2 compiler - FredJScipione, 05.11.2022, 05:19
- Source code for the Lilith's single pass Modula-2 compiler - Rugxulo, 05.11.2022, 06:57
- Source code for the Lilith's single pass Modula-2 compiler - DosWorld, 06.11.2022, 21:10
- Source code for the Lilith's single pass Modula-2 compiler - rr, 06.11.2022, 21:25
- Source code for the Lilith's single pass Modula-2 compiler - DosWorld, 06.11.2022, 21:28
- Source code for the Lilith's single pass Modula-2 compiler - FredJScipione, 11.11.2022, 00:22
- Source code for the Lilith's single pass Modula-2 compiler - rr, 06.11.2022, 21:25
- Source code for the Lilith's single pass Modula-2 compiler - Rugxulo, 02.11.2022, 01:36