Debian Codegraph @

modules/libcom/src/yacc/yacc.html

raw
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8 Yacc - an <B>LALR(1)</B> parser generator
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13 yacc [ -dlrtv ] [ -b <I>file</I>_<I>prefix</I> ] [ -p <I>symbol</I>_<I>prefix</I> ]
14 <I>filename</I>
15
16
17 </PRE>
18 <H2>DESCRIPTION</H2><PRE>
19 <I>Yacc</I> reads the grammar specification in the file <I>filename</I>
20 and generates an <B>LR(1)</B> parser for it. The parsers consist
21 of a set of <B>LALR(1)</B> parsing tables and a driver routine
22 written in the C programming language. <I>Yacc</I> normally writes
23 the parse tables and the driver routine to the file <I>y</I>.<I>tab</I>.<I>c</I>.
24
25 The following options are available:
26
27 -b <I>file</I>_<I>prefix</I>
28 The -b option changes the prefix prepended to the
29 output file names to the string denoted by
30 <I>file</I>_<I>prefix</I>. The default prefix is the character
31 <I>y</I>.
32
33 -d The -d option causes the header file <I>y</I>.<I>tab</I>.<I>h</I> to be
34 written.
35
36 -l If the -l option is not specified, <I>yacc</I> will
37 insert #line directives in the generated code.
38 The #line directives let the C compiler relate
39 errors in the generated code to the user's origi-
40 nal code. If the -l option is specified, <I>yacc</I>
41 will not insert the #line directives. #line
42 directives specified by the user will be retained.
43
44 -p <I>symbol</I>_<I>prefix</I>
45 The -p option changes the prefix prepended to
46 yacc-generated symbols to the string denoted by
47 <I>symbol</I>_<I>prefix</I>. The default prefix is the string
48 <I>yy</I>.
49
50 -r The -r option causes <I>yacc</I> to produce separate
51 files for code and tables. The code file is named
52 <I>y</I>.<I>code</I>.<I>c</I>, and the tables file is named <I>y</I>.<I>tab</I>.<I>c</I>.
53
54 -t The -t option changes the preprocessor directives
55 generated by <I>yacc</I> so that debugging statements
56 will be incorporated in the compiled code.
57
58 -v The -v option causes a human-readable description
59 of the generated parser to be written to the file
60 <I>y</I>.<I>output</I>.
61
62
63 If the environment variable TMPDIR is set, the string
64 denoted by TMPDIR will be used as the name of the directory
65 where the temporary files are created.
66
67
68 </PRE>
69 <H2>FILES</H2><PRE>
70 <I>y</I>.<I>code</I>.<I>c</I>
71 <I>y</I>.<I>tab</I>.<I>c</I>
72 <I>y</I>.<I>tab</I>.<I>h</I>
73 <I>y</I>.<I>output</I>
74 /<I>tmp</I>/<I>yacc</I>.<I>aXXXXXX</I>
75 /<I>tmp</I>/<I>yacc</I>.<I>tXXXXXX</I>
76 /<I>tmp</I>/<I>yacc</I>.<I>uXXXXXX</I>
77
78
79 </PRE>
80 <H2>DIAGNOSTICS</H2><PRE>
81 If there are rules that are never reduced, the number of
82 such rules is reported on standard error. If there are any
83 <B>LALR(1)</B> conflicts, the number of conflicts is reported on
84 standard error.
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119 </PRE>
120 <HR>
121 <ADDRESS>
122 Man(1) output converted with
123 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
124 </ADDRESS>
125 </BODY>
126 </HTML>