BSD 4_3_Net_2 release
[unix-history] / usr / src / usr.bin / yacc / yyfix.1
CommitLineData
af359dea 1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
7aca28b0
KB
2.\" All rights reserved.
3.\"
c0567266
KB
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.
7aca28b0 31.\"
af359dea
C
32.\" @(#)yyfix.1 5.3 (Berkeley) 4/24/91
33.\"
34.Dd April 24, 1991
35.Dt YYFIX 1
36.Os
37.Sh NAME
38.Nm yyfix
39.Nd extract tables from y.tab.c
40.Sh SYNOPSIS
41.Nm yyfix
42.Ar file
43.Op Ar tables
44.Sh DESCRIPTION
7aca28b0
KB
45Programs have historically used a script (often named ``:yyfix'') to
46extract tables from the
af359dea
C
47.Xr yacc 1
48generated file
49.Pa y.tab.c .
7aca28b0 50As the names of the tables generated by the current version of
af359dea 51.Xr yacc
7aca28b0 52are different from those of historical versions of
af359dea 53.Xr yacc ,
7aca28b0 54the shell script
af359dea 55.Nm yyfix
7aca28b0 56is provided to simplify the transition.
af359dea
C
57.Pp
58The first (and required) argument to
59.Nm yyfix
7aca28b0 60is the name of the file where the extracted tables should be stored.
af359dea 61.Pp
7aca28b0
KB
62If further command line arguments are specified, they are taken as
63the list of tables to be extracted.
64Otherwise,
af359dea
C
65.Nm yyfix
66attempts to determine if the
67.Pa y.tab.c
68file is from an old or new
69.Xr yacc ,
7aca28b0 70and extracts the appropriate tables.
af359dea
C
71.Pp
72The tables
73.Dq yyexca ,
74.Dq yyact ,
75.Dq yypact ,
76.Dq yypgo ,
77.Dq yyr1 ,
78.Dq yyr2 ,
79.Dq yychk ,
80and
81.Dq yydef
82are extracted
7aca28b0 83from historical versions of
af359dea
C
84.Xr yacc .
85.Pp
86The tables
87.Dq yylhs ,
88.Dq yylen ,
89.Dq yydefred ,
90.Dq yydgoto ,
91.Dq yysindex ,
92.Dq yyrindex ,
93.Dq yygindex ,
94.Dq yytable ,
95.Dq yyname ,
96.Dq yyrule ,
97and
98.Dq yycheck ,
99are extracted from the current version of
100.Xr yacc .
101.Sh FILES
102.Bl -tag -width y.tab.c
103.It Pa y.tab.c
104File from which tables are extracted.
105.El
106.Sh SEE ALSO
107.Xr yacc 1
108.Sh HISTORY
109The
110.Nm
111command is
112.Ud .