6 ms·
This seems great. When I read these kinds of explanations, it always strikes me how the way you're supposed to write a programming languages is basically the sa
by Fraterkes 3y ago
This seems great. When I read these kinds of explanations, it always strikes me how the way you're supposed to write a programming languages is basically the same way someone who had never written one might do it. Just break the input up into units, map the units to some category, and connect functionality to that. Like if you forced someone who had 2 weeks of programming experience to come up with a way to turn code into programs, they would probably think of something like the lexer/parser/evaluater process if you gave them enough time
- IIAOPSW 3y agoIf you gave them enough time, they would have more than 2 weeks of programming experience.
- lmm 3y agoYou might enjoy https://hokstad.com/compiler https://hokstad.com/compiler . I could never get on with the traditional top-down presentation of building a compiler where you start with this idea that you're going to build a parser and a lexer and all that. Seeing someone build a compiler the same way you'd build a regular program - start from the simple cases and expand out to cover what you need to - was a real revelation. In practice it's ended up with something pretty similar to the standard architecture, but now I can understand why.
- bombolo 3y agoFrom personal experience… The stuff I came up before I studied compilers didn't resemble that structure at all.