modify nfa to dfa convertor method and parser method