1 .\" $NetBSD: yacc.1,v 1.13 2003/08/07 11:17:55 agc Exp $
2 .\" Id: yacc.1,v 1.6 2005/05/04 22:11:56 tom Exp
4 .TH YACC 1 "July\ 15,\ 1990"
7 Yacc \- an LALR(1) parser generator
9 .B yacc [ -dglrtv ] [ \-b
17 reads the grammar specification in the file
19 and generates an LALR(1) parser for it.
20 The parsers consist of a set of LALR(1) parsing tables and a driver routine
21 written in the C programming language.
23 normally writes the parse tables and the driver routine to the file
26 The following options are available:
29 \fB\-b \fP\fIfile_prefix\fR
32 option changes the prefix prepended to the output file names to
35 The default prefix is the character
39 The \fB-d\fR option causes the header file
46 option causes a graphical description of the generated LALR(1) parser to
47 be written to the file
49 in graphviz format, ready to be processed by dot(1).
54 option is not specified,
56 will insert \fI#line\fP directives in the generated code.
57 The \fI#line\fP directives let the C compiler relate errors in the
58 generated code to the user's original code.
59 If the \fB-l\fR option is specified,
61 will not insert the \fI#line\fP directives.
62 \&\fI#line\fP directives specified by the user will be retained.
64 \fB\-o \fP\fIoutput_file\fR
65 specify the filename for the parser file.
66 If this option is not given, the output filename is
67 the file prefix concatenated with the file suffix, e.g., \fBy.tab.c\fP.
68 This overrides the \fB-p\fP option.
70 \fB\-p \fP\fIsymbol_prefix\fR
73 option changes the prefix prepended to yacc-generated symbols to
76 The default prefix is the string
84 to produce separate files for code and tables. The code file
87 and the tables file is named
93 option changes the preprocessor directives generated by
95 so that debugging statements will be incorporated in the compiled code.
100 option causes a human-readable description of the generated parser to
101 be written to the file
105 print the version number to the standard output.
108 If there are rules that are never reduced, the number of such rules is
109 reported on standard error.
110 If there are any LALR(1) conflicts, the number of conflicts is reported