I took a compilers course last year, based off UPenn's CIS341[1]. The lexing + parsing lectures were blitzed through, and we didn't even write the parser for the semester-long compiler assignment. The parsing section of the assignment was for us to simply assign shift-reduce precedences to operators and expressions, and OCaml's Menhir took care of everything.
I have written a recursive-descent parser, and it boils down to essentially turning the context-free grammar into a bunch of mutually-recursive functions, which is frankly rather tedious work.
I am much more interested in how a modern compiler is able to optimise a call to `std::accumulate` into a fast, tight, and vectorised loop in assembly.
I have written a recursive-descent parser, and it boils down to essentially turning the context-free grammar into a bunch of mutually-recursive functions, which is frankly rather tedious work.
I am much more interested in how a modern compiler is able to optimise a call to `std::accumulate` into a fast, tight, and vectorised loop in assembly.
[1]: https://www.seas.upenn.edu/~cis3410/current/