4 ms·
under 40 days ago someone posted to HN a SIGPLAN story about teaching compiler from the final phase to the first phase of processing the translations. https://
by cestith 6y ago
under 40 days ago someone posted to HN a SIGPLAN story about teaching compiler from the final phase to the first phase of processing the translations.
https://news.ycombinator.com/item?id=26237368 https://news.ycombinator.com/item?id=26237368
It gives you an AST you can assume is valid and has you do the work to rename variables and methods. Then it gives you an AST and has you develop your target code (in the case of the specific class, LLVM IR). Then the AST is checked for valid semantics. Then the course has you check a source program for syntactic validity and generate an AST.
It gives people the advantage of understanding what the AST is for on a deeper level before deciding how to represent it. I think this sort of class and a separate parsing class could be stellar together.