xref: /original-bsd/usr.bin/yacc/yyfix.1 (revision 759cfe84)
1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)yyfix.1	5.4 (Berkeley) 03/23/93
7.\"
8.Dd
9.Dt YYFIX 1
10.Os BSD 4.4
11.Sh NAME
12.Nm yyfix
13.Nd extract tables from y.tab.c
14.Sh SYNOPSIS
15.Nm yyfix
16.Ar file
17.Op Ar tables
18.Sh DESCRIPTION
19Programs have historically used a script (often named ``:yyfix'') to
20extract tables from the
21.Xr yacc 1
22generated file
23.Pa y.tab.c .
24As the names of the tables generated by the current version of
25.Xr yacc
26are different from those of historical versions of
27.Xr yacc ,
28the shell script
29.Nm yyfix
30is provided to simplify the transition.
31.Pp
32The first (and required) argument to
33.Nm yyfix
34is the name of the file where the extracted tables should be stored.
35.Pp
36If further command line arguments are specified, they are taken as
37the list of tables to be extracted.
38Otherwise,
39.Nm yyfix
40attempts to determine if the
41.Pa y.tab.c
42file is from an old or new
43.Xr yacc ,
44and extracts the appropriate tables.
45.Pp
46The tables
47.Dq yyexca ,
48.Dq yyact ,
49.Dq yypact ,
50.Dq yypgo ,
51.Dq yyr1 ,
52.Dq yyr2 ,
53.Dq yychk ,
54and
55.Dq yydef
56are extracted
57from historical versions of
58.Xr yacc .
59.Pp
60The tables
61.Dq yylhs ,
62.Dq yylen ,
63.Dq yydefred ,
64.Dq yydgoto ,
65.Dq yysindex ,
66.Dq yyrindex ,
67.Dq yygindex ,
68.Dq yytable ,
69.Dq yyname ,
70.Dq yyrule ,
71and
72.Dq yycheck ,
73are extracted from the current version of
74.Xr yacc .
75.Sh FILES
76.Bl -tag -width y.tab.c
77.It Pa y.tab.c
78File from which tables are extracted.
79.El
80.Sh SEE ALSO
81.Xr yacc 1
82.Sh HISTORY
83The
84.Nm
85command appears in
86.Bx 4.4 .
87