Answer the question
In order to leave comments, you need to log in
Are there simple, but at the same time quite complete examples of compilers in nature?
I am writing my compiler in JVM bytecode, and I would really like to have an example of a sufficient complete compiler at hand. Because all that I could google myself was either the sources of large and serious compilers with tons of classes that you can’t figure out even in a month, or the “calculator compiler”, which are too elementary and cover only the most basic architecture issues. So I would like to have an example of a compiler (exactly an example in the code) for a full-fledged language (I don’t know, let’s say a stripped-down version of Pascal), have you met such?
Answer the question
In order to leave comments, you need to log in
TCC, LCC, Pascal Pro, various Oberon compilers, it seems like someone made it for the Hummingbird OS. Borland seems to even open the sources of Turbo Pascal 6.0, I had them somewhere.
You can dig into the
groovy sources https://github.com/groovy/groovy-core
scala https://github.com/scala/scala
https://www.youtube.com/playlist?list=PL8E78559021... - Dudes write their own virtual machine.
on habré there was an article about the brainfuck compiler in java bytecode
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question