added ContextfreeGrammar class (C++)