first version of grammar evaluator