3 ms·
Could you elaborate on what you mean by that? To me this looks like a code generation library, an approach I like because of its concreteness and adaptability (
by musicale 3y ago
Could you elaborate on what you mean by that? To me this looks like a code generation library, an approach I like because of its concreteness and adaptability (for example, if we changed it to emit opcodes then it could be used for dynamic code generation, which has many fun and interesting applications.)
Also this post is aimed at the author's imagined teenage self. Does that change anything?
- mianos 3y agoWhen writing a compiler you want to first look at what you expect and when you get that, what to expect next. If that does not come, where do you go? We call this a graph, but there is no need to confuse things with advanced terms.
- musicale 3y agoI don't see any parsing in TFA - I think they are taking a bottom-up approach by starting with a code generation library before even thinking about parsing. I like this approach because it produces something that generates usable code without worrying about things like parsing or high level language syntax, and you've basically written a DSL/intermediate format which can be compiled by an existing C compiler.