tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Can a biggener (and idiot) like me read and understan


From: Stefanos
Subject: Re: [Tinycc-devel] Can a biggener (and idiot) like me read and understand TCC's backend so I can create my own frontend with it?
Date: Fri, 28 Jan 2022 22:35:02 +0200

On Fri, 28 Jan 2022 20:25:08 +0100
Niklas Rosencrantz <niklasro@gmail.com> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]