1 .\" $Id: yacc.1,v 1.6 2005/05/04 22:11:56 tom Exp $
3 .TH YACC 1 "July\ 15,\ 1990"
6 Yacc \- an LALR(1) parser generator
8 .B yacc [ -dglrtv ] [ \-b
16 reads the grammar specification in the file
18 and generates an LALR(1) parser for it.
19 The parsers consist of a set of LALR(1) parsing tables and a driver routine
20 written in the C programming language.
22 normally writes the parse tables and the driver routine to the file
25 The following options are available:
28 \fB\-b \fP\fIfile_prefix\fR
31 option changes the prefix prepended to the output file names to
34 The default prefix is the character
38 The \fB-d\fR option causes the header file
45 option causes a graphical description of the generated LALR(1) parser to
46 be written to the file
48 in graphviz format, ready to be processed by dot(1).
53 option is not specified,
55 will insert \fI#line\fP directives in the generated code.
56 The \fI#line\fP directives let the C compiler relate errors in the
57 generated code to the user's original code.
58 If the \fB-l\fR option is specified,
60 will not insert the \fI#line\fP directives.
61 \&\fI#line\fP directives specified by the user will be retained.
63 \fB\-o \fP\fIoutput_file\fR
64 specify the filename for the parser file.
65 If this option is not given, the output filename is
66 the file prefix concatenated with the file suffix, e.g., \fBy.tab.c\fP.
67 This overrides the \fB-p\fP option.
69 \fB\-p \fP\fIsymbol_prefix\fR
72 option changes the prefix prepended to yacc-generated symbols to
75 The default prefix is the string
83 to produce separate files for code and tables. The code file
86 and the tables file is named
92 option changes the preprocessor directives generated by
94 so that debugging statements will be incorporated in the compiled code.
99 option causes a human-readable description of the generated parser to
100 be written to the file
104 print the version number to the standard output.
107 If there are rules that are never reduced, the number of such rules is
108 reported on standard error.
109 If there are any LALR(1) conflicts, the number of conflicts is reported