3 ms·
I used Flex/Bison for writing my first interpreter, and I definitely recommended for beginners. I think when you're starting out, it's more important to focus o
by nemo1618 13y ago
I used Flex/Bison for writing my first interpreter, and I definitely recommended for beginners. I think when you're starting out, it's more important to focus on writing a proper grammar and traversing the AST than to do all the lexing/parsing by hand. Plus, it makes it easier to rapidly prototype your language when you're still in the design phase, and the Flex/Bison files serve as a form of documentation.
That said, now that my language's grammar is stable and I have a better understanding of lexing and parsing, I'm thinking about ditching Flex/Bison, mainly to achieve more descriptive error messages.
- knome 13y agoI found the lemon parser generator distributed with the source to sqlite3 to be far easier to use than bison. http://www.hwaci.com/sw/lemon/ http://www.hwaci.com/sw/lemon/
- reidrac 13y agoThis looks really interesting, thanks. I've playing with PLY* for fun, but I'd like to try something else in C without going back to flex/bison. * http://www.dabeaz.com/ply/ http://www.dabeaz.com/ply/