Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / yacc / yyfix.1
1 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)yyfix.1     5.4 (Berkeley) 3/23/93
33 .\" $FreeBSD: src/usr.bin/yacc/yyfix.1,v 1.3.2.3 2003/02/25 02:55:37 trhodes Exp $
34 .\" $DragonFly: src/usr.bin/yacc/yyfix.1,v 1.2 2003/06/17 04:29:34 dillon Exp $
35 .\"
36 .Dd March 23, 1993
37 .Dt YYFIX 1
38 .Os
39 .Sh NAME
40 .Nm yyfix
41 .Nd extract tables from y.tab.c
42 .Sh SYNOPSIS
43 .Nm
44 .Ar file
45 .Op Ar tables
46 .Sh DESCRIPTION
47 Programs have historically used a script (often named
48 .Dq :yyfix )
49 to extract tables from the
50 .Xr yacc 1
51 generated file
52 .Pa y.tab.c .
53 As the names of the tables generated by the current version of
54 .Xr yacc 1
55 are different from those of historical versions of
56 .Xr yacc 1 ,
57 the shell script
58 .Nm
59 is provided to simplify the transition.
60 .Pp
61 The first (and required) argument to
62 .Nm
63 is the name of the file where the extracted tables should be stored.
64 .Pp
65 If further command line arguments are specified, they are taken as
66 the list of tables to be extracted.
67 Otherwise,
68 .Nm
69 attempts to determine if the
70 .Pa y.tab.c
71 file is from an old or new
72 .Xr yacc 1 ,
73 and extracts the appropriate tables.
74 .Pp
75 The tables
76 .Dq yyexca ,
77 .Dq yyact ,
78 .Dq yypact ,
79 .Dq yypgo ,
80 .Dq yyr1 ,
81 .Dq yyr2 ,
82 .Dq yychk ,
83 and
84 .Dq yydef
85 are extracted
86 from historical versions of
87 .Xr yacc 1 .
88 .Pp
89 The tables
90 .Dq yylhs ,
91 .Dq yylen ,
92 .Dq yydefred ,
93 .Dq yydgoto ,
94 .Dq yysindex ,
95 .Dq yyrindex ,
96 .Dq yygindex ,
97 .Dq yytable ,
98 .Dq yyname ,
99 .Dq yyrule ,
100 and
101 .Dq yycheck ,
102 are extracted from the current version of
103 .Xr yacc 1 .
104 .Sh FILES
105 .Bl -tag -width y.tab.c
106 .It Pa y.tab.c
107 File from which tables are extracted.
108 .El
109 .Sh SEE ALSO
110 .Xr yacc 1
111 .Sh HISTORY
112 The
113 .Nm
114 command first appeared in
115 .Bx 4.4 .