YACC(1) DOMAIN/IX Reference Manual (SYS5) YACC(1)
NAME
yacc - yet another compiler-compiler
USAGE
yacc [ -vdlt ] grammar
DESCRIPTION
Yacc converts a context-free grammar into a set of tables
for a simple automaton that executes an LR parsing algo-
rithm. The grammar may be ambiguous; specified precedence
rules are used to break ambiguities.
The C compiler must compile the y.tab.c output file to pro-
duce a yyparse program. This program must be loaded with
the lexical analyzer program, yylex, as well as main and
yyerror, an error-handling routine. You supply these rou-
tines. The lex(1) command can help create lexical analyzers
for use 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 state-
ments that associate the yacc-assigned token codes
with the user-declared token names. This allows
source files other than y.tab.c to access the
token codes.
-l Do not include any #line constructs in the code
produced in the y.tab.c file. This should only be
used after the grammar and the associated actions
are fully debugged.
-t Compile runtime debugging code by default. Run-
time debugging code is always generated in y.tab.c
under conditional compilation control. Normally,
this code is not included when y.tab.c is com-
piled. Regardless of whether or not this option
is used, the runtime debugging code is always
under the control of YYDEBUG, a preprocessor sym-
bol. If YYDEBUG has a non-zero value, then the
debugging code is included. If its value is zero,
the code is not included. The size and execution
time of a program produced without the runtime
debugging code is smaller and slightly faster.
CAUTIONS
Because filenames are fixed, only one yacc process may be
active in a given directory at a time.
Printed 6/10/85 YACC-1
YACC(1) DOMAIN/IX Reference Manual (SYS5) YACC(1)
FILES
y.output
y.tab.c
y.tab.h defines for token names
yacc.tmp temporary file
yacc.debug temporary file
yacc.acts temporary file
/usr/lib/yaccpar parser prototype for C programs
DIAGNOSTICS
The number of reduce-reduce and shift-reduce conflicts is
reported on the standard error output. (You can find a more
detailed report in the y.output file.) Similarly, if some
rules cannot be reached from the start symbol, this is also
reported.
RELATED INFORMATION
lex (1), malloc (3C).
YACC-2 Printed 6/10/85