29 Ιαν 2022, 12:10 Από eli...@orange.fr: > > I suggest you start with something simple: > > > > > > A language that implement 4 arithmetic integer operations, has integer > variables, allows to define functions and includes print function as library > function. > > > Chose the syntax you like and start to write you own compiler that generate > intermediate internal code, then choose a backend (for example C) that > generates code corresponding to your intermediate code. > > > > > > You’ll learn of lot of things and you’ll get 80% of the knowledge you’ll need > to write serious things. > > > > > > This globally how works my Lisp compiler from Lisp files up to standalone > executable. > > > > > > See https://en.wikipedia.org/wiki/OpenLisp#Compiler > > > > > > From:> Tinycc-devel > [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] > On Behalf Of > ian > Sent:> Saturday, January 29, 2022 10:43 > To:> rempas via Tinycc-devel > 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? > > Hi! Thank you for your answer but I really have a hard time to understand what you are saying In the second paragraph.
When saying to choose a backend the generates code, you mean a compiler right? Also, how will this generate code corresponding to mine? Isn't the code specific to the backend/compiler? And some compilers (like TCC) imidiatly create object files or assembly and don't generate an Intermediate representation file. But even If I could make an IR that would mimic the IR of another compiler (let's say Clang/LLVM), how would this help me understand how this translates this to a sequence of bytes and how the instructions are represented as bytes? _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel