Syntax:

Options:

("el") The file does not contain any
#line constructs. If this option is not specified,
yacc will attempt to adjust any such constructs as necessary.

-t

Generate a parser with debugging information, which may be enabled by
setting yydebug to 1.

-v

Be verbose; generate statistics of the parser.

Description:

The yacc utility transforms a specification of a context-free
grammar into a C language function that implements an LR(1)
parsing algorithm. Ambiguities in the grammar may be resolved using
precedence rules within the specification. The C language function
is named yyparse(), and calls yylex()
to get input tokens, which are integer values. The value 0 is considered
special, as being end-of-input.

You can use the following parser with the lexical analyzer in lex
to implement a simple calculator.