1 .\" $NetBSD: yacc.1,v 1.13 2003/08/07 11:17:55 agc Exp $
3 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to Berkeley by
7 .\" Robert Paul Corbett.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" 3. Neither the name of the University nor the names of its contributors
18 .\" may be used to endorse or promote products derived from this software
19 .\" without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .\" from: @(#)yacc.1 5.7 (Berkeley) 7/30/91
34 .\" $NetBSD: yacc.1,v 1.13 2003/08/07 11:17:55 agc Exp $
48 .Op Fl o Ar outputfile
49 .Op Fl p Ar symbol_prefix
53 reads the grammar specification in the file
58 The parsers consist of a set of
60 parsing tables and a driver routine
61 written in the C programming language.
63 normally writes the parse tables and the driver routine to the file
66 The following options are available:
71 option changes the prefix prepended to the output file names to
74 The default prefix is the character
79 option causes the header file
85 option causes a graphical description of the generated LALR(1) parser to
86 be written to the file
88 in graphviz format, ready to be processed by
93 option is not specified,
95 will insert #line directives in the generated code.
96 The #line directives let the C compiler relate errors in the
97 generated code to the user's original code.
102 will not insert the #line directives.
103 #line directives specified by the user will be retained.
104 .It Fl o Ar outputfile
107 option specifies an explicit output file name should be used instead
109 .It Fl p Ar symbol_prefix
112 option changes the prefix prepended to yacc-generated symbols to
113 the string denoted by
115 The default prefix is the string
122 to produce separate files for code and tables.
123 The code file is named
125 and the tables file is named
130 option changes the preprocessor directives generated by
132 so that debugging statements will be incorporated in the compiled code.
136 option causes a human-readable description of the generated parser to
137 be written to the file
141 The following environment variable is referenced by
143 .Bl -tag -width TMPDIR
145 If the environment variable
147 is set, the string denoted by
149 will be used as the name of the directory where the temporary
153 The names of the tables generated by this version of
166 Two additional tables,
172 is defined and non-zero.
174 .Bl -tag -width /tmp/yacc.uXXXXXXXX -compact
179 .It Pa /tmp/yacc.aXXXXXX
180 .It Pa /tmp/yacc.tXXXXXX
181 .It Pa /tmp/yacc.uXXXXXX
184 If there are rules that are never reduced, the number of such rules is
185 written to the standard error.
188 conflicts, the number of conflicts is also written
189 to the standard error.