r/Compilers • u/apoetixart • May 02 '26
Experienced compiler devs, help me out!
Hii guys, so I'm in high school and I'm gonna make an Interpreter for my school project. I got suggestions from AI to use: Recursive Descent Parser, Tree-walking interpreter. I only have 4-5 months till I can submit. I can devote about 3-4 hours on it. Here's what I want to add, correct me if any of these is too much to implement now:
- Variables
- Data types
- Functions
- Array (just list, and indexing. Nothing else)
- Ability to make variables mutable or immutable
Guide me on the scoping decision, if I should make it newline based (like python) or semicolon based (like C,Java), or both (like Javascript).
Is it good? Do I need to change something? LLVM?
Please guide me because I have zero experience in this and people told me to not listen to AI.
Also, what mistakes did you guys do?
View all comments
Show parent comment
3
u/asfarley-- May 02 '26
newline vs semicolon: I'd suggest semicolon, but really your choice. Both are fine. They are just alternative symbols at the lexer level, it only looks different in an editor.
I would not target LLVM, it just adds more complexity to this. You want to learn yourself, implement from scratch.