source: trunk/minix/man/man1/yacc.1@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 2.3 KB
Line 
1.\" %W% %R% (Berkeley) %E%
2.\"
3.TH YACC 1 "July 15, 1990"
4.UC 6
5.SH NAME
6yacc \- an LALR(1) parser generator
7.SH SYNOPSIS
8.B yacc [ -dlrtv ] [ -b
9.I file_prefix
10.B ] [ -p
11.I symbol_prefix
12.B ]
13.I filename
14.SH DESCRIPTION
15.I Yacc
16reads the grammar specification in the file
17.I filename
18and generates an LR(1) parser for it.
19The parsers consist of a set of LALR(1) parsing tables and a driver routine
20written in the C programming language.
21.I Yacc
22normally writes the parse tables and the driver routine to the file
23.IR y.tab.c.
24.PP
25The following options are available:
26.RS
27.TP
28\fB-b \fIfile_prefix\fR
29The
30.B -b
31option changes the prefix prepended to the output file names to
32the string denoted by
33.IR file_prefix.
34The default prefix is the character
35.IR y.
36.TP
37.B -d
38The \fB-d\fR option causes the header file
39.IR y.tab.h
40to be written.
41.TP
42.B -l
43If the
44.B -l
45option is not specified,
46.I yacc
47will insert #line directives in the generated code.
48The #line directives let the C compiler relate errors in the
49generated code to the user's original code.
50If the \fB-l\fR option is specified,
51.I yacc
52will not insert the #line directives.
53\&#line directives specified by the user will be retained.
54.TP
55\fB-p \fIsymbol_prefix\fR
56The
57.B -p
58option changes the prefix prepended to yacc-generated symbols to
59the string denoted by
60.IR symbol_prefix.
61The default prefix is the string
62.IR yy.
63.TP
64.B -r
65The
66.B -r
67option causes
68.I yacc
69to produce separate files for code and tables. The code file
70is named
71.IR y.code.c,
72and the tables file is named
73.IR y.tab.c.
74.TP
75.B -t
76The
77.B -t
78option changes the preprocessor directives generated by
79.I yacc
80so that debugging statements will be incorporated in the compiled code.
81.TP
82.B -v
83The
84.B -v
85option causes a human-readable description of the generated parser to
86be written to the file
87.IR y.output.
88.RE
89.PP
90If the environment variable TMPDIR is set, the string denoted by
91TMPDIR will be used as the name of the directory where the temporary
92files are created.
93.SH FILES
94.IR y.code.c
95.br
96.IR y.tab.c
97.br
98.IR y.tab.h
99.br
100.IR y.output
101.br
102.IR /tmp/yacc.aXXXXXX
103.br
104.IR /tmp/yacc.tXXXXXX
105.br
106.IR /tmp/yacc.uXXXXXX
107.SH DIAGNOSTICS
108If there are rules that are never reduced, the number of such rules is
109reported on standard error.
110If there are any LALR(1) conflicts, the number of conflicts is reported
111on standard error.
Note: See TracBrowser for help on using the repository browser.