(no title)
ds300 | 11 years ago
When reversed, however, most of my students found it extremely hard to wrap their head around the the first part of the course, i.e. code generation from an AST. They didn't have sufficient grounding in recursive data structures and algorithms. While this might be a problem with the degree program rather than the compilers course, I believe that learning to write a recursive descent parser (by hand) provides this grounding and makes the code generation bit much easier to grasp.
Unfortunately the new lecturer had also done away with teaching the students how to write parsers by hand, instead encouraging them to use parser generators. I thought that was tragic. One of the best moments of my programming life was writing a recursive descent parser for a non-trivial grammar in one sitting (about 500 lines of python), hitting run and having it just work first time. It was orgasmic.
jdmichal|11 years ago
This was, in the grand scheme of things, likely offset by the hours of frustration most of the students went through while debugging their parser which did not work perfectly the first time.