Parser

program that analyses a string of symbols, according to the rules of a formal grammar

In computer science, a parser is a program that checks to see if the grammar is valid.