Flex and Bison Fun

So I’ve been writing parsers lately with Flex and Bison.

Some notes of interest:

  • The “info” pages on both are really helpful and I’ve learned most of what I needed from them (as opposed to Googling around or finding a book)
  • The Regular Expression Explorer has been quite handy
  • While learning, I wrote a bunch of toy parsers, and I realized that I was copying “template code” a lot. This seemed unnecessary. A tool like this simply takes a BNF-like input and outputs into different languages.  Seems pretty cool but haven’t played with it too much yet.