Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lex(1)

YACC(1)                              BSD                               YACC(1)



NAME
     yacc - yet another compiler-compiler

SYNOPSIS
     yacc [ -vd ] grammar

DESCRIPTION
     yacc converts a context-free grammar into a set of tables for a simple
     automaton which executes an LR parsing algorithm.  The grammar may be
     ambiguous; yacc uses specified precedence rules to eliminate such
     problems.

     The output file, y.tab.c, must be compiled by the C compiler to produce a
     program yyparse.  This program must be loaded with the lexical analyzer
     program, yylex, as well as main and yyerror, an error-handling routine.
     You must supply these routines.  lex(1) helps create lexical analyzers
     usable by yacc.

OPTIONS
     -v        Prepare the y.output file, which contains a description of the
               parsing tables and a report on conflicts generated by
               ambiguities in the grammar.

     -d        Generate the y.tab.h file with the define statements that
               associate the token codes supplied by yacc with the user-
               declared token names.  This allows source files other than
               y.tab.c to access the token codes.

FILES
     y.output
     y.tab.c
     y.tab.h                 defines for token names
     yacc.tmp, yacc.acts     temporary files
     /usr/lib/yaccpar        parser prototype for C programs

DIAGNOSTICS
     yacc reports, on the standard output, the number of reduce-reduce and
     shift-reduce conflicts.  It also lets you know if some rules cannot be
     reached from the start symbol.  The y.output file contains a more
     detailed report.

BUGS
     Because filenames are fixed, only one yacc process can be active in a
     given directory at a time.

SEE ALSO
     lex(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026