Re:Implementing a programming language in C, part 2
by ufo on Tuesday June 09, 2015 @07:53PM
(#9689298)
IMO, using macros to generate the parser has some advantages. For example, you have the freedom do generate the syntax tree however you like, adding extra "line number" fields or translating some syntactic sugar. If your language has proper support for macros its also really pleasant overall. I wrote a bottom up parser in Racket once and it was really nice: compiling the parser is a piece of cake and you can define your own macros to automate list-parsing and some other boring things.
[ Parent
| on HN ]
There are no comments on this comment yet.