I have been working on the basic setup of the lisp interpreter for a while now, and I am starting to realize that there are so many things I forgot about writing compilers, that I need to get the good old tiger book out again.

When I was studying, we used Flex and Bison to setup up lexer and parser. This time around, I decided to use spirit which is part of the boost libraries. Admittedly, in the beginning this choice has given me quite a few headaches. I thought I had C++ pretty well worked out, but the template magic that is used here is just incredible and somewhat mind-boggling in the beginning.
However, as I am stubborn sod, I finally got it to work, and the final solution for my grammar, I have ended up with so far do have a nice conciseness as well as very nice simplicity to it. Not only that, but no external tools like Flex and Bison are reqiured; everything is C++ driven.

Leave a comment