4 ms·
Surprisingly shadow article for someone like Walter Bright. Just some basic recommendations, but nothing practical? No links to books, parsers, implementation
by rurban 13y ago
Surprisingly shadow article for someone like Walter Bright.
Just some basic recommendations, but nothing practical?
No links to books, parsers, implementations?
The easiest start would be "Compiler Construction
using Flex and Bison" by Anthony A. Aaby, available as free pdf,
and for adding LLVM to the mix the link would be: http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/ http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/
There needs much more to be said, e.g. links to such languages which were written in a day and are not necessarily lisp or scheme. That would be too easy.
- joe_the_user 13y agoThis is a fabulous article. This article seems like the perfect antidote to the usual "here's the dragon book" article. Articles that point you to the dragon book, give a few ideas of what parser and lexer are, and then turn you loose are just terrible. They are look articles on "how to build a house" that focus on "here's where to buy a backhoe, here's where you can concrete, etc..." Essentially, designing your own programming language is a difficult and in many ways, bad, idea. But what you to have a ghost of a chance is "what choice should you make, what will it feel like" narrative (there should also be "what are the milestones" but given programming, that will sadly be too variable to predict).
- WalterBright 13y agoI tried to avoid all the usual stuff that is well covered elsewhere, and touch on things I thought were poorly covered or not even mentioned. After all, it's just an article, not a comprehensive tome.
- acqq 13y agoThe author writes his own experiences, and they are directly opposite of the "Compiler Construction using Flex and Bison." And he explains why. I also remember Stroustrup's story where once he wanted to develop C++ he got well meant advices to use lex and yacc, and he claims that he much later realized that much better approach for him would have been to code both things by hand. This matches Walter's experiences, and not only his.