Teaching Compilers Backward
blog.sigplan.org
Teaching Compilers Backward
1–10 of 87 posts
Re: Teaching Compilers Backward
#2Re: Teaching Compilers Backward
#3Some argue that parsing is a microcosm of the rest of the compiler, since it requires one to transform a program from one representation to another. However, this message doesn't really come across when you're operating on highly unstructured input, and not doing any simplification passes.
I think execution is really important for visualizing the effects of your work.
Re: Teaching Compilers Backward
#4I discover "early" that parsing will be at mercy of each change in direction on the internals, making a costing rewrite each time. Is like premature, aimless, unit-testing, where the cost of testing dominate the actual code to write.
So, eventually I split my efforts in 2: On the side I just write programs in the imaginary syntax and change it even in each line.
But the whole action was from AST->Execution. I don't bother to parsing until very late in the game, and I think I could have deferred even more.
This is not because I believe the syntax "don't matter", I think the opposite!, but you can't know which syntax its the best until you nail the semantics. If the parsing/syntax is introduced too early you could going backwards to support THAT syntax bolted on the semantics, instead of left the semantics guide you.
ie: Is like UX/UI: If the program is not well defined, the UI will distort it.
Re: Teaching Compilers Backward
#5Re: Teaching Compilers Backward
#6Re: Teaching Compilers Backward
#7Re: Teaching Compilers Backward
#8Much to the chagrin of a lot of educators, I think this approach is the way to go. Too many compilers classes get bogged down in grammar classifications and parsing. Some argue that parsing is a microcosm of the rest of the compiler, since it requires one to transform a program from one representation to another. However, this message doesn't really come across when you're operating on highly unstructured input, and…
Re: Teaching Compilers Backward
#9Much to the chagrin of a lot of educators, I think this approach is the way to go. Too many compilers classes get bogged down in grammar classifications and parsing. Some argue that parsing is a microcosm of the rest of the compiler, since it requires one to transform a program from one representation to another. However, this message doesn't really come across when you're operating on highly unstructured input, and…