29 Ιαν 2022, 03:20 Από s...@conman.org:

> It was thus said that the Great rempas via Tinycc-devel once stated:
>
>> > 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....
>>
>
> It's interpreters all the way down (what do you think CPUs do with machine
> code?  They interpret it).  Also, if you have parsed code into a form you
> can interpret, you have enough information to generate machine code.
>
>  -spc
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
I don't know if I'm that stupid but I really don't understand. I know that the 
CPU interprets the instructions but an interpreter will use a programming 
language to interpret. For example, the following statement:

`println("Hello from my lang: {}", "BestLang")`

will be translated to (suppose the interpreted is written in C) and then be 
executed:

`printf("Hello from my lang: %s", "BestLang);`

So how is this going to teach my assembly and how the instructions are 
represented in binary? The book specifically says that it won't work with 
teaching assembly. The interpreted is a binary that takes source code and 
executes it. It doesn't create a binary. So I really don't understand what's 
going on here...

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to