I initially wrote this while I was writing a parser for a scripting language that I was working on. I found it useful, and decided to publish it as a library just in case others would find it useful. It's been used in several projects out in the wild since.