CFG builder and rudimentary ant builder with DFA minimizer