A toy library for modeling formal grammars in C++