3 ms·
I think it is great that you are into this kind of stuff. I am as well, as I find it one of the most interesting things to do. "The AST" is subjective, however.
by _RPM 10y ago
I think it is great that you are into this kind of stuff. I am as well, as I find it one of the most interesting things to do. "The AST" is subjective, however. We know it is a tree data structure, but most compilers implemented it differently. Also, AST generation is typically derived from the parsing stage, then the AST is taken to be compiled. I think you should look into GNU Bison.
- ianbertolacci 10y agoBison is a great tool for parsing grammars. However, I'm more looking for a tool that, on its own, can be used as a full compiler, with the added ability to put myself in the middle of the front and back end. LLVM has a similar ability where you can develop a pass over the IR and manipulate it.