Basically if you dont know what im doing,im doing a compiler which isĀ a program that can translate human code into machine code.
and the structure of the blogs will be like this:
- the numbers will mean like just random thoughts im thinking while im having and i want to put here to document like "2: im having problems doing X"
- every number point will be in different times,i cant put two things at the same time in different number points
- it will have some insight of what i added in the end.
- "[n]" means a reference that will later be explained further.
also im doing,at the same time,a string/array manipulation library called Train!!!! when i do {TRAIN} its because im talking about it, and i will be documenting this library too here.
starting now!
- ok,im adding the open file capabilty to main.c
- what should i do now a lexer? what a compiler does first??? what is its pipeline
- yeah ive found a usefull site on that regard: Compiler pipeline
- first step: do the lexer.
- should i create a separate file just for the lexer? yea probably:
- NEW FILES: ./src/Lexer.h && ./src/Lexer.c
- [2] should i make this a Tstr[1] or just char*?
- Token struct created.
- {TRAIN} how could i make a dynamic array for ANY type of data? idk
- yeah gonna do the generic dynamic array tomorrow.
[1]: Tstr is the string object in the Train library;
[2]: in the token struct,there is the "item" of it which is a string,but i couldnt figure if i should make it this Tstr because (i think) it will not be changed.
Comments
Displaying 2 of 2 comments ( View all | Add Comment )
knlrvr
Made an account just to say thanks for the shoutout! Super excited to keep up with what you're doing here!
Naburgondux
Bruh o forgot to put the code,when I got on my computer I will post it here.
If you can follow my blog too to see more of this!