The lex command generates program that matches patterns for simple lexical analysis of an input stream. The yacc command converts a context-free grammar specification into a set of tables for a simple automaton that executes a parser. Together these commands generate a lexical analyzer and parser program for interpreting input and output handling.
The following topics are covered in this chapter:
Creating an Input Language with the lex and yacc Commands
Example Program for the lex and yacc Programs