Re:Book – Writing a C Compiler: Build a Real Programming Lan...
by markus_zhang on Thursday August 15, 2024 @06:08PM
(#41260968)
Thanks, can you please lemme know which part uses pattern matching? I'd assume mostly in the lexer, but the parser should just be something that consume the tokens and spit out AST. Unless of course it combines the two.
[ Parent
| on HN ]
Re:Book – Writing a C Compiler: Build a Real Programming Lan...
by shawn_w on Thursday August 15, 2024 @09:05PM
(#41262119)
Presumably anything that walks the syntax tree.
Re:Book – Writing a C Compiler: Build a Real Programming Lan...
by markus_zhang on Friday August 16, 2024 @09:22AM
(#41266206)
Thanks. At first I thought it is something like regex, but then I found it's something in functional programming. I need to read a few chapters of the book before buying it because I'm not interested in learning FP at the moment.