GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: usr.sbin/config/gram.c Lines: 0 255 0.0 %
Date: 2017-11-07 Branches: 0 203 0.0 %

Line Branch Exec Source
1
#include <stdlib.h>
2
#include <string.h>
3
#define YYBYACC 1
4
#define YYMAJOR 1
5
#define YYMINOR 9
6
#define YYLEX yylex()
7
#define YYEMPTY -1
8
#define yyclearin (yychar=(YYEMPTY))
9
#define yyerrok (yyerrflag=0)
10
#define YYRECOVERING() (yyerrflag!=0)
11
#define YYPREFIX "yy"
12
#line 2 "gram.y"
13
/*	$OpenBSD: gram.y,v 1.24 2015/01/16 06:40:16 deraadt Exp $	*/
14
/*	$NetBSD: gram.y,v 1.14 1997/02/02 21:12:32 thorpej Exp $	*/
15
16
/*
17
 * Copyright (c) 1992, 1993
18
 *	The Regents of the University of California.  All rights reserved.
19
 *
20
 * This software was developed by the Computer Systems Engineering group
21
 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
22
 * contributed to Berkeley.
23
 *
24
 * All advertising materials mentioning features or use of this software
25
 * must display the following acknowledgement:
26
 *	This product includes software developed by the University of
27
 *	California, Lawrence Berkeley Laboratories.
28
 *
29
 * Redistribution and use in source and binary forms, with or without
30
 * modification, are permitted provided that the following conditions
31
 * are met:
32
 * 1. Redistributions of source code must retain the above copyright
33
 *    notice, this list of conditions and the following disclaimer.
34
 * 2. Redistributions in binary form must reproduce the above copyright
35
 *    notice, this list of conditions and the following disclaimer in the
36
 *    documentation and/or other materials provided with the distribution.
37
 * 3. Neither the name of the University nor the names of its contributors
38
 *    may be used to endorse or promote products derived from this software
39
 *    without specific prior written permission.
40
 *
41
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
42
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
45
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51
 * SUCH DAMAGE.
52
 *
53
 *	from: @(#)gram.y	8.1 (Berkeley) 6/6/93
54
 */
55
56
#include <sys/param.h>	/* NODEV */
57
#include <sys/types.h>
58
#include <ctype.h>
59
#include <stdio.h>
60
#include <stdlib.h>
61
#include <limits.h>
62
#include <string.h>
63
#include <errno.h>
64
#include "config.h"
65
#include "sem.h"
66
67
#define	FORMAT(n) ((n) > -10 && (n) < 10 ? "%d" : "0x%x")
68
69
#define	stop(s)	error(s), exit(1)
70
71
int	include(const char *, int);
72
void	yyerror(const char *);
73
int	yylex(void);
74
75
static	struct	config conf;	/* at most one active at a time */
76
77
/* the following is used to recover nvlist space after errors */
78
static	struct	nvlist *alloc[1000];
79
static	int	adepth;
80
#define	new0(n,s,p,i,x)	(alloc[adepth++] = newnv(n, s, p, i, x))
81
#define	new_n(n)	new0(n, NULL, NULL, 0, NULL)
82
#define	new_nx(n, x)	new0(n, NULL, NULL, 0, x)
83
#define	new_ns(n, s)	new0(n, s, NULL, 0, NULL)
84
#define	new_si(s, i)	new0(NULL, s, NULL, i, NULL)
85
#define	new_nsi(n,s,i)	new0(n, s, NULL, i, NULL)
86
#define	new_np(n, p)	new0(n, NULL, p, 0, NULL)
87
#define	new_s(s)	new0(NULL, s, NULL, 0, NULL)
88
#define	new_p(p)	new0(NULL, NULL, p, 0, NULL)
89
#define	new_px(p, x)	new0(NULL, NULL, p, 0, x)
90
91
#define	fx_atom(s)	new0(s, NULL, NULL, FX_ATOM, NULL)
92
#define	fx_not(e)	new0(NULL, NULL, NULL, FX_NOT, e)
93
#define	fx_and(e1, e2)	new0(NULL, NULL, e1, FX_AND, e2)
94
#define	fx_or(e1, e2)	new0(NULL, NULL, e1, FX_OR, e2)
95
96
static	void	cleanup(void);
97
static	void	setmachine(const char *, const char *);
98
static	void	check_maxpart(void);
99
100
#line 91 "gram.y"
101
#ifndef YYSTYPE_DEFINED
102
#define YYSTYPE_DEFINED
103
typedef union {
104
	struct	attr *attr;
105
	struct	devbase *devb;
106
	struct	deva *deva;
107
	struct	nvlist *list;
108
	const char *str;
109
	int	val;
110
} YYSTYPE;
111
#endif /* YYSTYPE_DEFINED */
112
#line 113 "gram.c"
113
#define AND 257
114
#define AT 258
115
#define ATTACH 259
116
#define BUILD 260
117
#define COMPILE_WITH 261
118
#define CONFIG 262
119
#define DEFINE 263
120
#define DEFOPT 264
121
#define DEVICE 265
122
#define DISABLE 266
123
#define DUMPS 267
124
#define ENDFILE 268
125
#define XFILE 269
126
#define XOBJECT 270
127
#define FLAGS 271
128
#define INCLUDE 272
129
#define XMACHINE 273
130
#define MAJOR 274
131
#define MAKEOPTIONS 275
132
#define MAXUSERS 276
133
#define MAXPARTITIONS 277
134
#define MINOR 278
135
#define ON 279
136
#define OPTIONS 280
137
#define PSEUDO_DEVICE 281
138
#define ROOT 282
139
#define SOURCE 283
140
#define SWAP 284
141
#define WITH 285
142
#define NEEDS_COUNT 286
143
#define NEEDS_FLAG 287
144
#define RMOPTIONS 288
145
#define ENABLE 289
146
#define NUMBER 290
147
#define PATHNAME 291
148
#define WORD 292
149
#define EMPTY 293
150
#define YYERRCODE 256
151
const short yylhs[] =
152
	{                                        -1,
153
   39,    0,   34,   34,   40,   40,   40,   40,   35,   35,
154
   35,   37,    1,    1,   42,   43,    2,    2,    3,    3,
155
    3,    3,    3,    4,    5,    5,    6,    6,    7,    7,
156
    8,    9,    9,   41,   36,   36,   44,   44,   44,   45,
157
   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
158
   13,   13,   14,   14,   16,   16,   11,   12,   12,   15,
159
   15,   17,   17,   18,   18,   19,   19,   19,   20,   29,
160
   29,   29,   31,   31,   21,   21,   22,   22,   10,   46,
161
   46,   47,   38,   38,   48,   48,   48,   49,   49,   49,
162
   49,   49,   49,   49,   49,   49,   49,   49,   52,   52,
163
   55,   50,   50,   51,   51,   56,   56,   53,   54,   54,
164
   57,   57,   57,   25,   25,   26,   26,   30,   58,   58,
165
   32,   32,   27,   27,   28,   28,   28,   23,   23,   24,
166
   24,   33,   33,
167
};
168
const short yylen[] =
169
	{                                         2,
170
    0,   10,    2,    0,    3,    3,    2,    1,    3,    4,
171
    1,    1,    1,    3,    5,    4,    1,    0,    1,    2,
172
    3,    3,    3,    1,    2,    0,    1,    1,    2,    0,
173
    1,    2,    0,    2,    2,    0,    2,    1,    2,    1,
174
    1,    1,    3,    2,    4,    6,    4,    2,    3,    4,
175
    1,    0,    3,    1,    1,    1,    1,    2,    0,    3,
176
    0,    1,    0,    3,    1,    2,    1,    4,    2,    1,
177
    1,    1,    1,    2,    2,    0,    3,    1,    1,    3,
178
    1,    3,    2,    0,    2,    1,    2,    1,    1,    1,
179
    2,    2,    2,    2,    3,    4,    4,    6,    3,    1,
180
    3,    3,    1,    3,    1,    1,    3,    1,    2,    1,
181
    3,    3,    3,    3,    1,    1,    1,    4,    1,    0,
182
    1,    0,    2,    1,    1,    2,    1,    2,    0,    2,
183
    2,    2,    0,
184
};
185
const short yydefred[] =
186
	{                                      4,
187
    0,    0,   11,    0,    0,    0,    0,    8,   36,    3,
188
    0,    0,   34,    0,    0,    0,    7,    6,    0,    9,
189
    5,    0,    0,    0,    0,    0,   12,    0,    0,    0,
190
    0,    0,    0,   38,   36,   42,   40,   41,   35,    0,
191
   10,   39,   57,    0,    0,   44,    0,   13,    0,    0,
192
    0,    0,   48,    0,    0,   37,    0,    0,   43,    0,
193
   24,    0,    0,    0,   26,    0,   19,   30,    0,    0,
194
   81,    0,    0,   49,   36,   56,   55,    0,   54,    0,
195
    0,    0,   62,    0,   45,   14,   20,    0,    0,    0,
196
    0,    0,    0,   50,    0,   47,   79,   78,    0,    0,
197
    0,    0,    0,    0,   66,    0,   60,    0,   23,    0,
198
   27,   28,   25,   15,    0,   21,   31,   29,   82,   80,
199
    0,    1,   58,   53,   46,   73,   70,   71,    0,   69,
200
   72,    0,   64,   32,   77,   84,   74,   68,    0,    0,
201
    0,    0,    0,    0,    0,    0,    0,   86,    0,   90,
202
   88,   89,   83,    0,   87,  108,    0,    0,    0,  100,
203
   94,    0,    0,  103,    0,  105,    0,  123,    0,   85,
204
    0,    0,    0,    0,  110,    0,    0,    0,    0,  121,
205
    0,    0,  125,    0,    0,  119,    0,    0,    0,  109,
206
  101,   99,  107,  102,   51,   96,  104,  126,   97,  129,
207
    0,  116,  113,  117,  111,  112,    0,    0,    0,    0,
208
    0,    0,  128,   98,    0,  114,  132,  131,  130,  118,
209
};
210
const short yydgoto[] =
211
	{                                       1,
212
   49,   65,   66,   67,   89,  113,   92,  118,  114,   98,
213
   69,  103,  196,   78,   59,   79,   82,   83,   84,  105,
214
   74,   99,  208,  213,  206,  207,  149,  185,  130,  204,
215
  131,  181,  214,    2,    9,   16,   35,  139,  136,   10,
216
   36,   37,   38,   39,   40,   70,   71,  153,  154,  163,
217
  167,  159,  157,  174,  160,  164,  175,  187,
218
};
219
const short yysindex[] =
220
	{                                      0,
221
    0,   40,    0, -247, -250, -246, -218,    0,    0,    0,
222
   35,   64,    0,   -9,   66,   52,    0,    0,   67,    0,
223
    0,   68, -213, -212, -211, -213,    0, -208, -207,  -38,
224
 -204, -203, -213,    0,    0,    0,    0,    0,    0,   78,
225
    0,    0,    0, -169,  -33,    0,  -33,    0,  -13,   -5,
226
 -213, -199,    0,   34,   52,    0, -249,  -86,    0,   34,
227
    0, -198, -197,   -5,    0,  -28,    0,    0,   36,  -25,
228
    0, -192, -193,    0,    0,    0,    0,  -40,    0,   41,
229
 -191,  -21,    0,   61,    0,    0,    0,  -30, -230,   -5,
230
   -5, -181, -183,    0, -213,    0,    0,    0,   65,   52,
231
 -184, -249,   34,    9,    0,   41,    0,  -86,    0, -182,
232
    0,    0,    0,    0,   74,    0,    0,    0,    0,    0,
233
 -193,    0,    0,    0,    0,    0,    0,    0, -177,    0,
234
    0,   21,    0,    0,    0,    0,    0,    0,  -10,  105,
235
 -176, -175, -172, -173, -171, -170,   81,    0, -138,    0,
236
    0,    0,    0,  114,    0,    0, -231,   70,   82,    0,
237
    0,   71,   83,    0, -165,    0,   84,    0, -210,    0,
238
 -150, -150, -150, -231,    0,    9, -175,    9, -173,    0,
239
 -133, -158,    0,   72, -241,    0, -225, -225, -225,    0,
240
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
241
 -154,    0,    0,    0,    0,    0, -120, -237, -140, -225,
242
 -151,  -39,    0,    0, -148,    0,    0,    0,    0,    0,};
243
const short yyrindex[] =
244
	{                                      0,
245
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
246
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
247
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
248
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
249
    0,    0,    0,    0,  130,    0,    3,    0,    8,   -1,
250
    0,    0,    0,  131,    0,    0,    0,   18,    0,  131,
251
    0,    0,    0,    0,    0,   11,    0,    0,    0,    0,
252
    0,    0,    0,    0,    0,    0,    0,   13,    0,  -22,
253
    0,    0,    0,   20,    0,    0,    0,    0,  136,    0,
254
    0,  137,    0,    0,    0,    0,    0,    0,  138,    0,
255
    0,    0,  131,    0,    0,    0,    0,    0,    0,    0,
256
    0,    0,    0,    0,    6,    0,    0,    0,    0,    0,
257
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
258
    0,    0,    0,    0,    0,    0,    0,    0,  149,    0,
259
    0,    0,    0,    0,    0,    0, -108,    0,    0,    0,
260
    0,    0,    0,    0,    0,    0,    0,    0,  141,    0,
261
    0,   16,  142,    0,    2,    0,  143,    0,    0,    0,
262
 -222, -222, -222,  144,    0,    0,    0,    0,    0,    0,
263
  145,    0,    0,   -8,   -7,    0,    0,    0,    0,    0,
264
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
265
    0,    0,    0,    0,    0,    0,    7,  146,    0,    0,
266
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,};
267
const short yygindex[] =
268
	{                                      0,
269
    0,  107,  -27,   95,    0,    0,    0,    0,    0,   38,
270
   42,    0,  -24,    0,  113,   60,    0,   55,    0,   58,
271
  -45,    0,    0,    0,  -44, -149,    0,    0, -146,    0,
272
    0,    0,    0,    0,    0,   -6,  -41,    0,    0,    0,
273
    5,   26,   28,    0,    0,    0,   73,    0,    0,    0,
274
    0,    0,    0,    0,   -4,   -3,   -2, -132,
275
};
276
#define YYTABLESIZE 333
277
const short yytable[] =
278
	{                                     148,
279
   20,  127,   52,  102,   81,  129,   11,   91,   18,   91,
280
  109,  122,   61,   75,   85,   22,  115,   18,   95,   63,
281
   17,   67,   59,  218,  195,  106,   64,   63,   55,  191,
282
  110,  193,   76,  211,   64,  171,   88,  203,  205,  188,
283
  189,   13,   77,   12,   17,   14,   22,  199,  201,    8,
284
  172,  120,  173,  129,  212,  111,  112,  125,  122,  106,
285
   61,   34,  115,  116,   44,  219,  202,   47,  100,  120,
286
   59,  183,   15,   18,   54,   21,   41,   42,   43,   45,
287
   46,  184,   48,   50,   51,   52,   53,   56,   57,   58,
288
   72,   73,   86,   90,   61,   90,   93,   96,   97,   94,
289
  106,  104,   67,  107,  108,  117,  119,  123,  121,  134,
290
   62,   91,  137,  138,  155,  156,  158,  161,  162,  169,
291
  165,  166,  168,  170,  180,  177,  179,  182,  186,   22,
292
  176,  178,  195,  197,  198,  209,  210,  215,  217,   61,
293
   76,  220,   63,  150,   65,   33,   16,   75,    2,  124,
294
   93,   91,   92,   95,   52,  133,   68,   87,  135,   60,
295
  200,  124,  133,  132,  151,  216,  152,  120,    0,    0,
296
    0,  190,  192,    0,    0,  194,    0,    0,    0,    0,
297
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
298
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
299
    0,    0,    0,    0,    0,   80,    0,    0,    0,    0,
300
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
301
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
302
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
303
    0,    0,    0,    0,  101,  140,    0,    0,    0,    0,
304
  126,  141,  127,  128,    0,    0,    0,  127,   28,   29,
305
    0,    5,  127,   52,  142,  143,   22,  122,   18,  144,
306
  145,   17,    0,  115,    0,    0,    0,  146,   61,    0,
307
  127,  147,   19,  127,   52,   18,   61,    0,  115,    0,
308
  115,   22,   22,   18,   18,    3,   17,   17,  126,    4,
309
  127,  128,    0,    0,    0,    0,    0,   22,    0,    0,
310
   23,    5,    6,    0,   24,   25,   26,    0,    0,   27,
311
   28,   29,    7,    5,    0,   30,    0,   31,   32,    0,
312
    0,    0,   33,
313
};
314
const short yycheck[] =
315
	{                                      10,
316
   10,   10,   10,   44,   91,   45,    2,   38,   10,   38,
317
   41,   10,   10,   55,   60,   10,   10,   10,   44,   33,
318
   10,   44,   10,   63,  266,   10,   40,   33,   35,  176,
319
  261,  178,  282,  271,   40,  267,   64,  187,  188,  172,
320
  173,  292,  292,  291,   10,  292,   41,  289,  274,   10,
321
  282,  274,  284,   45,  292,  286,  287,  103,  100,   44,
322
   58,   10,   90,   91,   23,  212,  292,   26,   75,  292,
323
   58,  282,  291,   10,   33,   10,   10,   10,  292,  292,
324
  292,  292,  291,  291,  123,  290,  290,   10,  258,  123,
325
  290,   58,  291,  124,  292,  124,   61,  290,  292,  125,
326
  292,   61,  125,  125,   44,  287,  290,  292,   44,  292,
327
  124,   38,  290,   93,   10,  292,  292,  290,  292,  258,
328
  292,  292,   42,   10,  290,   44,   44,   44,  279,  124,
329
   61,   61,  266,  292,   63,  290,  257,  278,  290,   10,
330
   10,  290,  125,  139,  125,   10,   10,   10,    0,  258,
331
   10,   10,   10,   10,   10,   10,   50,   63,  121,   47,
332
  185,  102,  108,  106,  139,  210,  139,   95,   -1,   -1,
333
   -1,  174,  177,   -1,   -1,  179,   -1,   -1,   -1,   -1,
334
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
335
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
336
   -1,   -1,   -1,   -1,   -1,  292,   -1,   -1,   -1,   -1,
337
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
338
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
339
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
340
   -1,   -1,   -1,   -1,  285,  256,   -1,   -1,   -1,   -1,
341
  290,  262,  292,  293,   -1,   -1,   -1,  266,  269,  270,
342
   -1,  272,  271,  271,  275,  276,  261,  266,  261,  280,
343
  281,  261,   -1,  267,   -1,   -1,   -1,  288,  292,   -1,
344
  289,  292,  292,  292,  292,  287,  292,   -1,  282,   -1,
345
  284,  286,  287,  286,  287,  256,  286,  287,  290,  260,
346
  292,  293,   -1,   -1,   -1,   -1,   -1,  256,   -1,   -1,
347
  259,  272,  273,   -1,  263,  264,  265,   -1,   -1,  268,
348
  269,  270,  283,  272,   -1,  274,   -1,  276,  277,   -1,
349
   -1,   -1,  281,
350
};
351
#define YYFINAL 1
352
#ifndef YYDEBUG
353
#define YYDEBUG 0
354
#endif
355
#define YYMAXTOKEN 293
356
#if YYDEBUG
357
const char * const yyname[] =
358
	{
359
"end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
360
0,0,"'!'",0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','","'-'",0,0,0,0,0,0,0,0,0,0,0,
361
0,"':'",0,0,"'='",0,"'?'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
362
"'['",0,"']'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",
363
"'|'","'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
364
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
365
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
366
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"AND","AT","ATTACH","BUILD","COMPILE_WITH",
367
"CONFIG","DEFINE","DEFOPT","DEVICE","DISABLE","DUMPS","ENDFILE","XFILE",
368
"XOBJECT","FLAGS","INCLUDE","XMACHINE","MAJOR","MAKEOPTIONS","MAXUSERS",
369
"MAXPARTITIONS","MINOR","ON","OPTIONS","PSEUDO_DEVICE","ROOT","SOURCE","SWAP",
370
"WITH","NEEDS_COUNT","NEEDS_FLAG","RMOPTIONS","ENABLE","NUMBER","PATHNAME",
371
"WORD","EMPTY",
372
};
373
const char * const yyrule[] =
374
	{"$accept : Configuration",
375
"$$1 :",
376
"Configuration : topthings machine_spec dev_defs dev_eof dev_defs dev_eof dev_defs dev_eof $$1 specs",
377
"topthings : topthings topthing",
378
"topthings :",
379
"topthing : SOURCE PATHNAME '\\n'",
380
"topthing : BUILD PATHNAME '\\n'",
381
"topthing : include '\\n'",
382
"topthing : '\\n'",
383
"machine_spec : XMACHINE WORD '\\n'",
384
"machine_spec : XMACHINE WORD WORD '\\n'",
385
"machine_spec : error",
386
"dev_eof : ENDFILE",
387
"pathnames : PATHNAME",
388
"pathnames : pathnames '|' PATHNAME",
389
"file : XFILE pathnames fopts fflgs rule",
390
"object : XOBJECT PATHNAME fopts oflgs",
391
"fopts : fexpr",
392
"fopts :",
393
"fexpr : fatom",
394
"fexpr : '!' fatom",
395
"fexpr : fexpr '&' fexpr",
396
"fexpr : fexpr '|' fexpr",
397
"fexpr : '(' fexpr ')'",
398
"fatom : WORD",
399
"fflgs : fflgs fflag",
400
"fflgs :",
401
"fflag : NEEDS_COUNT",
402
"fflag : NEEDS_FLAG",
403
"oflgs : oflgs oflag",
404
"oflgs :",
405
"oflag : NEEDS_FLAG",
406
"rule : COMPILE_WITH WORD",
407
"rule :",
408
"include : INCLUDE WORD",
409
"dev_defs : dev_defs dev_def",
410
"dev_defs :",
411
"dev_def : one_def '\\n'",
412
"dev_def : '\\n'",
413
"dev_def : error '\\n'",
414
"one_def : file",
415
"one_def : object",
416
"one_def : include",
417
"one_def : DEFINE WORD interface_opt",
418
"one_def : DEFOPT WORD",
419
"one_def : DEVICE devbase interface_opt attrs_opt",
420
"one_def : ATTACH devbase AT atlist devattach_opt attrs_opt",
421
"one_def : MAXUSERS NUMBER NUMBER NUMBER",
422
"one_def : MAXPARTITIONS NUMBER",
423
"one_def : PSEUDO_DEVICE devbase attrs_opt",
424
"one_def : MAJOR '{' majorlist '}'",
425
"disable : DISABLE",
426
"disable :",
427
"atlist : atlist ',' atname",
428
"atlist : atname",
429
"atname : WORD",
430
"atname : ROOT",
431
"devbase : WORD",
432
"devattach_opt : WITH WORD",
433
"devattach_opt :",
434
"interface_opt : '{' loclist_opt '}'",
435
"interface_opt :",
436
"loclist_opt : loclist",
437
"loclist_opt :",
438
"loclist : locdef ',' loclist",
439
"loclist : locdef",
440
"locdef : WORD locdefault",
441
"locdef : WORD",
442
"locdef : '[' WORD locdefault ']'",
443
"locdefault : '=' value",
444
"value : WORD",
445
"value : EMPTY",
446
"value : signed_number",
447
"signed_number : NUMBER",
448
"signed_number : '-' NUMBER",
449
"attrs_opt : ':' attrs",
450
"attrs_opt :",
451
"attrs : attrs ',' attr",
452
"attrs : attr",
453
"attr : WORD",
454
"majorlist : majorlist ',' majordef",
455
"majorlist : majordef",
456
"majordef : devbase '=' NUMBER",
457
"specs : specs spec",
458
"specs :",
459
"spec : config_spec '\\n'",
460
"spec : '\\n'",
461
"spec : error '\\n'",
462
"config_spec : file",
463
"config_spec : object",
464
"config_spec : include",
465
"config_spec : OPTIONS opt_list",
466
"config_spec : RMOPTIONS ropt_list",
467
"config_spec : MAKEOPTIONS mkopt_list",
468
"config_spec : MAXUSERS NUMBER",
469
"config_spec : CONFIG conf sysparam_list",
470
"config_spec : PSEUDO_DEVICE WORD npseudo disable",
471
"config_spec : device_instance AT attachment ENABLE",
472
"config_spec : device_instance AT attachment disable locators flags_opt",
473
"mkopt_list : mkopt_list ',' mkoption",
474
"mkopt_list : mkoption",
475
"mkoption : WORD '=' value",
476
"opt_list : opt_list ',' option",
477
"opt_list : option",
478
"ropt_list : ropt_list ',' WORD",
479
"ropt_list : WORD",
480
"option : WORD",
481
"option : WORD '=' value",
482
"conf : WORD",
483
"sysparam_list : sysparam_list sysparam",
484
"sysparam_list : sysparam",
485
"sysparam : ROOT on_opt dev_spec",
486
"sysparam : SWAP on_opt swapdev_list",
487
"sysparam : DUMPS on_opt dev_spec",
488
"swapdev_list : dev_spec AND swapdev_list",
489
"swapdev_list : dev_spec",
490
"dev_spec : WORD",
491
"dev_spec : major_minor",
492
"major_minor : MAJOR NUMBER MINOR NUMBER",
493
"on_opt : ON",
494
"on_opt :",
495
"npseudo : NUMBER",
496
"npseudo :",
497
"device_instance : WORD '*'",
498
"device_instance : WORD",
499
"attachment : ROOT",
500
"attachment : WORD '?'",
501
"attachment : WORD",
502
"locators : locators locator",
503
"locators :",
504
"locator : WORD value",
505
"locator : WORD '?'",
506
"flags_opt : FLAGS NUMBER",
507
"flags_opt :",
508
};
509
#endif
510
#ifdef YYSTACKSIZE
511
#undef YYMAXDEPTH
512
#define YYMAXDEPTH YYSTACKSIZE
513
#else
514
#ifdef YYMAXDEPTH
515
#define YYSTACKSIZE YYMAXDEPTH
516
#else
517
#define YYSTACKSIZE 10000
518
#define YYMAXDEPTH 10000
519
#endif
520
#endif
521
#define YYINITSTACKSIZE 200
522
/* LINTUSED */
523
int yydebug;
524
int yynerrs;
525
int yyerrflag;
526
int yychar;
527
short *yyssp;
528
YYSTYPE *yyvsp;
529
YYSTYPE yyval;
530
YYSTYPE yylval;
531
short *yyss;
532
short *yysslim;
533
YYSTYPE *yyvs;
534
unsigned int yystacksize;
535
int yyparse(void);
536
#line 425 "gram.y"
537
538
void
539
yyerror(const char *s)
540
{
541
542
	error("%s", s);
543
}
544
545
/*
546
 * Cleanup procedure after syntax error: release any nvlists
547
 * allocated during parsing the current line.
548
 */
549
static void
550
cleanup(void)
551
{
552
	struct nvlist **np;
553
	int i;
554
555
	for (np = alloc, i = adepth; --i >= 0; np++)
556
		nvfree(*np);
557
	adepth = 0;
558
}
559
560
static void
561
setmachine(const char *mch, const char *mcharch)
562
{
563
	char buf[PATH_MAX];
564
565
	machine = mch;
566
	machinearch = mcharch;
567
568
	(void)snprintf(buf, sizeof buf, "arch/%s/conf/files.%s", machine, machine);
569
	if (include(buf, ENDFILE) != 0)
570
		exit(1);
571
572
	if (machinearch != NULL)
573
		(void)snprintf(buf, sizeof buf, "arch/%s/conf/files.%s",
574
		    machinearch, machinearch);
575
	else
576
		strlcpy(buf, _PATH_DEVNULL, sizeof buf);
577
	if (include(buf, ENDFILE) != 0)
578
		exit(1);
579
580
	if (include("conf/files", ENDFILE) != 0)
581
		exit(1);
582
}
583
584
static void
585
check_maxpart(void)
586
{
587
	if (maxpartitions <= 0) {
588
		stop("cannot proceed without maxpartitions specifier");
589
	}
590
}
591
#line 584 "gram.c"
592
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
593
static int yygrowstack(void)
594
{
595
    unsigned int newsize;
596
    long sslen;
597
    short *newss;
598
    YYSTYPE *newvs;
599
600
    if ((newsize = yystacksize) == 0)
601
        newsize = YYINITSTACKSIZE;
602
    else if (newsize >= YYMAXDEPTH)
603
        return -1;
604
    else if ((newsize *= 2) > YYMAXDEPTH)
605
        newsize = YYMAXDEPTH;
606
    sslen = yyssp - yyss;
607
#ifdef SIZE_MAX
608
#define YY_SIZE_MAX SIZE_MAX
609
#else
610
#define YY_SIZE_MAX 0xffffffffU
611
#endif
612
    if (newsize && YY_SIZE_MAX / newsize < sizeof *newss)
613
        goto bail;
614
    newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
615
      (short *)malloc(newsize * sizeof *newss); /* overflow check above */
616
    if (newss == NULL)
617
        goto bail;
618
    yyss = newss;
619
    yyssp = newss + sslen;
620
    if (newsize && YY_SIZE_MAX / newsize < sizeof *newvs)
621
        goto bail;
622
    newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :
623
      (YYSTYPE *)malloc(newsize * sizeof *newvs); /* overflow check above */
624
    if (newvs == NULL)
625
        goto bail;
626
    yyvs = newvs;
627
    yyvsp = newvs + sslen;
628
    yystacksize = newsize;
629
    yysslim = yyss + newsize - 1;
630
    return 0;
631
bail:
632
    if (yyss)
633
            free(yyss);
634
    if (yyvs)
635
            free(yyvs);
636
    yyss = yyssp = NULL;
637
    yyvs = yyvsp = NULL;
638
    yystacksize = 0;
639
    return -1;
640
}
641
642
#define YYABORT goto yyabort
643
#define YYREJECT goto yyabort
644
#define YYACCEPT goto yyaccept
645
#define YYERROR goto yyerrlab
646
int
647
yyparse(void)
648
{
649
    int yym, yyn, yystate;
650
#if YYDEBUG
651
    const char *yys;
652
653
    if ((yys = getenv("YYDEBUG")))
654
    {
655
        yyn = *yys;
656
        if (yyn >= '0' && yyn <= '9')
657
            yydebug = yyn - '0';
658
    }
659
#endif /* YYDEBUG */
660
661
    yynerrs = 0;
662
    yyerrflag = 0;
663
    yychar = (-1);
664
665
    if (yyss == NULL && yygrowstack()) goto yyoverflow;
666
    yyssp = yyss;
667
    yyvsp = yyvs;
668
    *yyssp = yystate = 0;
669
670
yyloop:
671
    if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
672
    if (yychar < 0)
673
    {
674
        if ((yychar = yylex()) < 0) yychar = 0;
675
#if YYDEBUG
676
        if (yydebug)
677
        {
678
            yys = 0;
679
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
680
            if (!yys) yys = "illegal-symbol";
681
            printf("%sdebug: state %d, reading %d (%s)\n",
682
                    YYPREFIX, yystate, yychar, yys);
683
        }
684
#endif
685
    }
686
    if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
687
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
688
    {
689
#if YYDEBUG
690
        if (yydebug)
691
            printf("%sdebug: state %d, shifting to state %d\n",
692
                    YYPREFIX, yystate, yytable[yyn]);
693
#endif
694
        if (yyssp >= yysslim && yygrowstack())
695
        {
696
            goto yyoverflow;
697
        }
698
        *++yyssp = yystate = yytable[yyn];
699
        *++yyvsp = yylval;
700
        yychar = (-1);
701
        if (yyerrflag > 0)  --yyerrflag;
702
        goto yyloop;
703
    }
704
    if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
705
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
706
    {
707
        yyn = yytable[yyn];
708
        goto yyreduce;
709
    }
710
    if (yyerrflag) goto yyinrecovery;
711
#if defined(__GNUC__)
712
    goto yynewerror;
713
#endif
714
yynewerror:
715
    yyerror("syntax error");
716
#if defined(__GNUC__)
717
    goto yyerrlab;
718
#endif
719
yyerrlab:
720
    ++yynerrs;
721
yyinrecovery:
722
    if (yyerrflag < 3)
723
    {
724
        yyerrflag = 3;
725
        for (;;)
726
        {
727
            if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
728
                    yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
729
            {
730
#if YYDEBUG
731
                if (yydebug)
732
                    printf("%sdebug: state %d, error recovery shifting\
733
 to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
734
#endif
735
                if (yyssp >= yysslim && yygrowstack())
736
                {
737
                    goto yyoverflow;
738
                }
739
                *++yyssp = yystate = yytable[yyn];
740
                *++yyvsp = yylval;
741
                goto yyloop;
742
            }
743
            else
744
            {
745
#if YYDEBUG
746
                if (yydebug)
747
                    printf("%sdebug: error recovery discarding state %d\n",
748
                            YYPREFIX, *yyssp);
749
#endif
750
                if (yyssp <= yyss) goto yyabort;
751
                --yyssp;
752
                --yyvsp;
753
            }
754
        }
755
    }
756
    else
757
    {
758
        if (yychar == 0) goto yyabort;
759
#if YYDEBUG
760
        if (yydebug)
761
        {
762
            yys = 0;
763
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
764
            if (!yys) yys = "illegal-symbol";
765
            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
766
                    YYPREFIX, yystate, yychar, yys);
767
        }
768
#endif
769
        yychar = (-1);
770
        goto yyloop;
771
    }
772
yyreduce:
773
#if YYDEBUG
774
    if (yydebug)
775
        printf("%sdebug: state %d, reducing by rule %d (%s)\n",
776
                YYPREFIX, yystate, yyn, yyrule[yyn]);
777
#endif
778
    yym = yylen[yyn];
779
    if (yym)
780
        yyval = yyvsp[1-yym];
781
    else
782
        memset(&yyval, 0, sizeof yyval);
783
    switch (yyn)
784
    {
785
case 1:
786
#line 149 "gram.y"
787
{ check_maxpart(); }
788
break;
789
case 5:
790
#line 157 "gram.y"
791
{ if (!srcdir) srcdir = yyvsp[-1].str; }
792
break;
793
case 6:
794
#line 158 "gram.y"
795
{ if (!builddir) builddir = yyvsp[-1].str; }
796
break;
797
case 9:
798
#line 163 "gram.y"
799
{ setmachine(yyvsp[-1].str,NULL); }
800
break;
801
case 10:
802
#line 164 "gram.y"
803
{ setmachine(yyvsp[-2].str,yyvsp[-1].str); }
804
break;
805
case 11:
806
#line 165 "gram.y"
807
{ stop("cannot proceed without machine specifier"); }
808
break;
809
case 12:
810
#line 168 "gram.y"
811
{ enddefs(); checkfiles(); }
812
break;
813
case 13:
814
#line 171 "gram.y"
815
{ yyval.list = new_nsi(yyvsp[0].str, NULL, 0); }
816
break;
817
case 14:
818
#line 172 "gram.y"
819
{ (yyval.list = yyvsp[-2].list)->nv_next = new_nsi(yyvsp[0].str, NULL, 0); }
820
break;
821
case 15:
822
#line 178 "gram.y"
823
{ addfile(yyvsp[-3].list, yyvsp[-2].list, yyvsp[-1].val, yyvsp[0].str); }
824
break;
825
case 16:
826
#line 181 "gram.y"
827
{ addobject(yyvsp[-2].str, yyvsp[-1].list, yyvsp[0].val); }
828
break;
829
case 17:
830
#line 185 "gram.y"
831
{ yyval.list = yyvsp[0].list; }
832
break;
833
case 18:
834
#line 186 "gram.y"
835
{ yyval.list = NULL; }
836
break;
837
case 19:
838
#line 189 "gram.y"
839
{ yyval.list = yyvsp[0].list; }
840
break;
841
case 20:
842
#line 190 "gram.y"
843
{ yyval.list = fx_not(yyvsp[0].list); }
844
break;
845
case 21:
846
#line 191 "gram.y"
847
{ yyval.list = fx_and(yyvsp[-2].list, yyvsp[0].list); }
848
break;
849
case 22:
850
#line 192 "gram.y"
851
{ yyval.list = fx_or(yyvsp[-2].list, yyvsp[0].list); }
852
break;
853
case 23:
854
#line 193 "gram.y"
855
{ yyval.list = yyvsp[-1].list; }
856
break;
857
case 24:
858
#line 196 "gram.y"
859
{ yyval.list = fx_atom(yyvsp[0].str); }
860
break;
861
case 25:
862
#line 199 "gram.y"
863
{ yyval.val = yyvsp[-1].val | yyvsp[0].val; }
864
break;
865
case 26:
866
#line 200 "gram.y"
867
{ yyval.val = 0; }
868
break;
869
case 27:
870
#line 203 "gram.y"
871
{ yyval.val = FI_NEEDSCOUNT; }
872
break;
873
case 28:
874
#line 204 "gram.y"
875
{ yyval.val = FI_NEEDSFLAG; }
876
break;
877
case 29:
878
#line 207 "gram.y"
879
{ yyval.val = yyvsp[-1].val | yyvsp[0].val; }
880
break;
881
case 30:
882
#line 208 "gram.y"
883
{ yyval.val = 0; }
884
break;
885
case 31:
886
#line 211 "gram.y"
887
{ yyval.val = OI_NEEDSFLAG; }
888
break;
889
case 32:
890
#line 214 "gram.y"
891
{ yyval.str = yyvsp[0].str; }
892
break;
893
case 33:
894
#line 215 "gram.y"
895
{ yyval.str = NULL; }
896
break;
897
case 34:
898
#line 218 "gram.y"
899
{ include(yyvsp[0].str, 0); }
900
break;
901
case 37:
902
#line 229 "gram.y"
903
{ adepth = 0; }
904
break;
905
case 39:
906
#line 231 "gram.y"
907
{ cleanup(); }
908
break;
909
case 43:
910
#line 237 "gram.y"
911
{ (void)defattr(yyvsp[-1].str, yyvsp[0].list); }
912
break;
913
case 44:
914
#line 238 "gram.y"
915
{ defoption(yyvsp[0].str); }
916
break;
917
case 45:
918
#line 240 "gram.y"
919
{ defdev(yyvsp[-2].devb, 0, yyvsp[-1].list, yyvsp[0].list); }
920
break;
921
case 46:
922
#line 242 "gram.y"
923
{ defdevattach(yyvsp[-1].deva, yyvsp[-4].devb, yyvsp[-2].list, yyvsp[0].list); }
924
break;
925
case 47:
926
#line 243 "gram.y"
927
{ setdefmaxusers(yyvsp[-2].val, yyvsp[-1].val, yyvsp[0].val); }
928
break;
929
case 48:
930
#line 244 "gram.y"
931
{ maxpartitions = yyvsp[0].val; }
932
break;
933
case 49:
934
#line 245 "gram.y"
935
{ defdev(yyvsp[-1].devb,1,NULL,yyvsp[0].list); }
936
break;
937
case 51:
938
#line 249 "gram.y"
939
{ yyval.val = 1; }
940
break;
941
case 52:
942
#line 250 "gram.y"
943
{ yyval.val = 0; }
944
break;
945
case 53:
946
#line 253 "gram.y"
947
{ yyval.list = new_nx(yyvsp[0].str, yyvsp[-2].list); }
948
break;
949
case 54:
950
#line 254 "gram.y"
951
{ yyval.list = new_n(yyvsp[0].str); }
952
break;
953
case 55:
954
#line 257 "gram.y"
955
{ yyval.str = yyvsp[0].str; }
956
break;
957
case 56:
958
#line 258 "gram.y"
959
{ yyval.str = NULL; }
960
break;
961
case 57:
962
#line 261 "gram.y"
963
{ yyval.devb = getdevbase((char *)yyvsp[0].str); }
964
break;
965
case 58:
966
#line 264 "gram.y"
967
{ yyval.deva = getdevattach(yyvsp[0].str); }
968
break;
969
case 59:
970
#line 265 "gram.y"
971
{ yyval.deva = NULL; }
972
break;
973
case 60:
974
#line 268 "gram.y"
975
{ yyval.list = new_nx("", yyvsp[-1].list); }
976
break;
977
case 61:
978
#line 269 "gram.y"
979
{ yyval.list = NULL; }
980
break;
981
case 62:
982
#line 272 "gram.y"
983
{ yyval.list = yyvsp[0].list; }
984
break;
985
case 63:
986
#line 273 "gram.y"
987
{ yyval.list = NULL; }
988
break;
989
case 64:
990
#line 277 "gram.y"
991
{ (yyval.list = yyvsp[-2].list)->nv_next = yyvsp[0].list; }
992
break;
993
case 65:
994
#line 278 "gram.y"
995
{ yyval.list = yyvsp[0].list; }
996
break;
997
case 66:
998
#line 282 "gram.y"
999
{ yyval.list = new_nsi(yyvsp[-1].str, yyvsp[0].str, 0); }
1000
break;
1001
case 67:
1002
#line 283 "gram.y"
1003
{ yyval.list = new_nsi(yyvsp[0].str, NULL, 0); }
1004
break;
1005
case 68:
1006
#line 284 "gram.y"
1007
{ yyval.list = new_nsi(yyvsp[-2].str, yyvsp[-1].str, 1); }
1008
break;
1009
case 69:
1010
#line 287 "gram.y"
1011
{ yyval.str = yyvsp[0].str; }
1012
break;
1013
case 70:
1014
#line 290 "gram.y"
1015
{ yyval.str = yyvsp[0].str; }
1016
break;
1017
case 71:
1018
#line 291 "gram.y"
1019
{ yyval.str = yyvsp[0].str; }
1020
break;
1021
case 72:
1022
#line 292 "gram.y"
1023
{
1024
						char bf[40];
1025
1026
						(void)snprintf(bf, sizeof bf,
1027
						    FORMAT(yyvsp[0].val), yyvsp[0].val);
1028
						yyval.str = intern(bf);
1029
					}
1030
break;
1031
case 73:
1032
#line 301 "gram.y"
1033
{ yyval.val = yyvsp[0].val; }
1034
break;
1035
case 74:
1036
#line 302 "gram.y"
1037
{ yyval.val = -yyvsp[0].val; }
1038
break;
1039
case 75:
1040
#line 305 "gram.y"
1041
{ yyval.list = yyvsp[0].list; }
1042
break;
1043
case 76:
1044
#line 306 "gram.y"
1045
{ yyval.list = NULL; }
1046
break;
1047
case 77:
1048
#line 309 "gram.y"
1049
{ yyval.list = new_px(yyvsp[0].attr, yyvsp[-2].list); }
1050
break;
1051
case 78:
1052
#line 310 "gram.y"
1053
{ yyval.list = new_p(yyvsp[0].attr); }
1054
break;
1055
case 79:
1056
#line 313 "gram.y"
1057
{ yyval.attr = getattr(yyvsp[0].str); }
1058
break;
1059
case 82:
1060
#line 320 "gram.y"
1061
{ setmajor(yyvsp[-2].devb, yyvsp[0].val); }
1062
break;
1063
case 85:
1064
#line 332 "gram.y"
1065
{ adepth = 0; }
1066
break;
1067
case 87:
1068
#line 334 "gram.y"
1069
{ cleanup(); }
1070
break;
1071
case 94:
1072
#line 343 "gram.y"
1073
{ setmaxusers(yyvsp[0].val); }
1074
break;
1075
case 95:
1076
#line 344 "gram.y"
1077
{ addconf(&conf); }
1078
break;
1079
case 96:
1080
#line 345 "gram.y"
1081
{ addpseudo(yyvsp[-2].str, yyvsp[-1].val, yyvsp[0].val); }
1082
break;
1083
case 97:
1084
#line 346 "gram.y"
1085
{ enabledev(yyvsp[-3].str, yyvsp[-1].str); }
1086
break;
1087
case 98:
1088
#line 348 "gram.y"
1089
{ adddev(yyvsp[-5].str, yyvsp[-3].str, yyvsp[-1].list, yyvsp[0].val, yyvsp[-2].val); }
1090
break;
1091
case 101:
1092
#line 355 "gram.y"
1093
{ addmkoption(yyvsp[-2].str, yyvsp[0].str); }
1094
break;
1095
case 104:
1096
#line 362 "gram.y"
1097
{ removeoption(yyvsp[0].str); }
1098
break;
1099
case 105:
1100
#line 363 "gram.y"
1101
{ removeoption(yyvsp[0].str); }
1102
break;
1103
case 106:
1104
#line 366 "gram.y"
1105
{ addoption(yyvsp[0].str, NULL); }
1106
break;
1107
case 107:
1108
#line 367 "gram.y"
1109
{ addoption(yyvsp[-2].str, yyvsp[0].str); }
1110
break;
1111
case 108:
1112
#line 370 "gram.y"
1113
{ conf.cf_name = yyvsp[0].str;
1114
					    conf.cf_lineno = currentline();
1115
					    conf.cf_root = NULL;
1116
					    conf.cf_swap = NULL;
1117
					    conf.cf_dump = NULL; }
1118
break;
1119
case 111:
1120
#line 381 "gram.y"
1121
{ setconf(&conf.cf_root, "root", yyvsp[0].list); }
1122
break;
1123
case 112:
1124
#line 382 "gram.y"
1125
{ setconf(&conf.cf_swap, "swap", yyvsp[0].list); }
1126
break;
1127
case 113:
1128
#line 383 "gram.y"
1129
{ setconf(&conf.cf_dump, "dumps", yyvsp[0].list); }
1130
break;
1131
case 114:
1132
#line 386 "gram.y"
1133
{ (yyval.list = yyvsp[-2].list)->nv_next = yyvsp[0].list; }
1134
break;
1135
case 115:
1136
#line 387 "gram.y"
1137
{ yyval.list = yyvsp[0].list; }
1138
break;
1139
case 116:
1140
#line 390 "gram.y"
1141
{ yyval.list = new_si(yyvsp[0].str, NODEV); }
1142
break;
1143
case 117:
1144
#line 391 "gram.y"
1145
{ yyval.list = new_si(NULL, yyvsp[0].val); }
1146
break;
1147
case 118:
1148
#line 394 "gram.y"
1149
{ yyval.val = makedev(yyvsp[-2].val, yyvsp[0].val); }
1150
break;
1151
case 121:
1152
#line 400 "gram.y"
1153
{ yyval.val = yyvsp[0].val; }
1154
break;
1155
case 122:
1156
#line 401 "gram.y"
1157
{ yyval.val = 1; }
1158
break;
1159
case 123:
1160
#line 404 "gram.y"
1161
{ yyval.str = starref(yyvsp[-1].str); }
1162
break;
1163
case 124:
1164
#line 405 "gram.y"
1165
{ yyval.str = yyvsp[0].str; }
1166
break;
1167
case 125:
1168
#line 408 "gram.y"
1169
{ yyval.str = NULL; }
1170
break;
1171
case 126:
1172
#line 409 "gram.y"
1173
{ yyval.str = wildref(yyvsp[-1].str); }
1174
break;
1175
case 127:
1176
#line 410 "gram.y"
1177
{ yyval.str = yyvsp[0].str; }
1178
break;
1179
case 128:
1180
#line 413 "gram.y"
1181
{ (yyval.list = yyvsp[0].list)->nv_next = yyvsp[-1].list; }
1182
break;
1183
case 129:
1184
#line 414 "gram.y"
1185
{ yyval.list = NULL; }
1186
break;
1187
case 130:
1188
#line 417 "gram.y"
1189
{ yyval.list = new_ns(yyvsp[-1].str, yyvsp[0].str); }
1190
break;
1191
case 131:
1192
#line 418 "gram.y"
1193
{ yyval.list = new_ns(yyvsp[-1].str, NULL); }
1194
break;
1195
case 132:
1196
#line 421 "gram.y"
1197
{ yyval.val = yyvsp[0].val; }
1198
break;
1199
case 133:
1200
#line 422 "gram.y"
1201
{ yyval.val = 0; }
1202
break;
1203
#line 1196 "gram.c"
1204
    }
1205
    yyssp -= yym;
1206
    yystate = *yyssp;
1207
    yyvsp -= yym;
1208
    yym = yylhs[yyn];
1209
    if (yystate == 0 && yym == 0)
1210
    {
1211
#if YYDEBUG
1212
        if (yydebug)
1213
            printf("%sdebug: after reduction, shifting from state 0 to\
1214
 state %d\n", YYPREFIX, YYFINAL);
1215
#endif
1216
        yystate = YYFINAL;
1217
        *++yyssp = YYFINAL;
1218
        *++yyvsp = yyval;
1219
        if (yychar < 0)
1220
        {
1221
            if ((yychar = yylex()) < 0) yychar = 0;
1222
#if YYDEBUG
1223
            if (yydebug)
1224
            {
1225
                yys = 0;
1226
                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
1227
                if (!yys) yys = "illegal-symbol";
1228
                printf("%sdebug: state %d, reading %d (%s)\n",
1229
                        YYPREFIX, YYFINAL, yychar, yys);
1230
            }
1231
#endif
1232
        }
1233
        if (yychar == 0) goto yyaccept;
1234
        goto yyloop;
1235
    }
1236
    if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
1237
            yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
1238
        yystate = yytable[yyn];
1239
    else
1240
        yystate = yydgoto[yym];
1241
#if YYDEBUG
1242
    if (yydebug)
1243
        printf("%sdebug: after reduction, shifting from state %d \
1244
to state %d\n", YYPREFIX, *yyssp, yystate);
1245
#endif
1246
    if (yyssp >= yysslim && yygrowstack())
1247
    {
1248
        goto yyoverflow;
1249
    }
1250
    *++yyssp = yystate;
1251
    *++yyvsp = yyval;
1252
    goto yyloop;
1253
yyoverflow:
1254
    yyerror("yacc stack overflow");
1255
yyabort:
1256
    if (yyss)
1257
            free(yyss);
1258
    if (yyvs)
1259
            free(yyvs);
1260
    yyss = yyssp = NULL;
1261
    yyvs = yyvsp = NULL;
1262
    yystacksize = 0;
1263
    return (1);
1264
yyaccept:
1265
    if (yyss)
1266
            free(yyss);
1267
    if (yyvs)
1268
            free(yyvs);
1269
    yyss = yyssp = NULL;
1270
    yyvs = yyvsp = NULL;
1271
    yystacksize = 0;
1272
    return (0);
1273
}