On Fri, 28 Jan 2022 20:25:08 +0100
Niklas Rosencrantz <[email protected]> wrote:

> I tried to read the Tiger Book with examples. I tried to learn Bison. I
> tried to learn Lemon Parser. I could not write the grammar for a for-loop.
> I don't know if that's because if stupid, if it wasn't well explained or if
> it's difficult.
> 
> What I could learn from was to take the instruction sheet for MIPS assembly
> and find out how statements in C can translate to assembly. That was easy
> to learn. What a real compiler will generate is always 5 times more than
> what the instruction manual says it should translate to. I tried with GCC
> and a MIPS compiler, looked at the generated assembly which was very
> different from what I could run directly from e.g. the MARS MIPS
> environment by writing it by hand.
> 
> I'm out on deep water but this was my experience with trying to learn. I
> found that TCC is very good for learning and trying ideas.
> 
> /Niklas

I would advice you to start with this 
https://craftinginterpreters.com/contents.html first.

The rest will follow before you know it.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to