First parser example
We will continue with our book data as the input
First we will create the lexer. Let's keep it simple. It scans the input, creating just 3 types of tokens - Field, Slash, and LineTerminator. In other words, we are not building into our lexer much understanding of the semantics of the data.
For each token the lexer will "return it" (to the parser). For the Field tokens the lexer will also return the "value" of the token - which is in yytext()