28 Ιαν 2022, 22:35 Από ssofr...@cytanet.com.cy: > On Fri, 28 Jan 2022 20:25:08 +0100 > Niklas Rosencrantz <nikla...@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. > Thanks! However, I don't understand how this will help me. I mean, I don't even want to create an intepreter to begin with. So this has nothing to do with what I want to make. Unless you are referring to the frontend so in this case, It will probably be a good idea to read this book. Or maybe I should make an intepreter in the end? Hmmmmm....
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel