In computer science, a parser is a program that checks to see if a text is valid according to the rules of a grammar.
Flow of data in a typical parser
Parsing a C program that needs 2 token lookahead