2 char yysccsid
[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90";
4 #line 37 "installparse.y"
6 #define yyparse Pk11Install_yyparse
7 #define yylex Pk11Install_yylex
8 #define yyerror Pk11Install_yyerror
9 #define yychar Pk11Install_yychar
10 #define yyval Pk11Install_yyval
11 #define yylval Pk11Install_yylval
12 #define yydebug Pk11Install_yydebug
13 #define yynerrs Pk11Install_yynerrs
14 #define yyerrflag Pk11Install_yyerrflag
15 #define yyss Pk11Install_yyss
16 #define yyssp Pk11Install_yyssp
17 #define yyvs Pk11Install_yyvs
18 #define yyvsp Pk11Install_yyvsp
19 #define yylhs Pk11Install_yylhs
20 #define yylen Pk11Install_yylen
21 #define yydefred Pk11Install_yydefred
22 #define yydgoto Pk11Install_yydgoto
23 #define yysindex Pk11Install_yysindex
24 #define yyrindex Pk11Install_yyrindex
25 #define yygindex Pk11Install_yygindex
26 #define yytable Pk11Install_yytable
27 #define yycheck Pk11Install_yycheck
28 #define yyname Pk11Install_yyname
29 #define yyrule Pk11Install_yyrule
32 #include "install-ds.h"
35 #define YYSTYPE Pk11Install_Pointer
36 extern char *Pk11Install_yytext
;
37 char *Pk11Install_yyerrstr
=NULL
;
41 #define CLOSEBRACE 258
50 short yydefred
[] = { 0,
51 0, 0, 1, 0, 4, 0, 2, 0, 0, 6,
53 short yydgoto
[] = { 2,
56 short yysindex
[] = { -257,
57 0, 0, 0, -257, 0, -252, 0, -257, -251, 0,
59 short yyrindex
[] = { 6,
60 1, 0, 0, 3, 0, 0, 0, -250, 0, 0,
62 short yygindex
[] = { 0,
65 #define YYTABLESIZE 261
66 short yytable
[] = { 7,
67 5, 1, 3, 9, 8, 3, 10, 3, 0, 0,
68 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
69 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
71 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
72 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
73 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
74 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
75 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
76 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
77 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
78 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
79 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
80 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
81 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
82 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
83 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
84 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
85 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
86 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
87 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
88 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
91 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
92 0, 0, 0, 0, 0, 0, 0, 7, 5, 5,
95 short yycheck
[] = { 4,
96 0, 259, 0, 8, 257, 0, 258, 258, -1, -1,
97 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
98 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
99 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
100 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
101 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
102 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
104 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
106 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
111 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
112 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
119 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
121 -1, -1, -1, -1, -1, -1, -1, 257, 258, 259,
128 #define YYMAXTOKEN 259
131 "end-of-file",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,
132 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,
133 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,
134 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,
135 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,
136 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,
137 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"OPENBRACE","CLOSEBRACE","STRING",
141 "toplist : valuelist",
142 "valuelist : value valuelist",
144 "value : key_value_pair",
146 "key_value_pair : key OPENBRACE valuelist CLOSEBRACE",
153 #define yyclearin (yychar=(-1))
154 #define yyerrok (yyerrflag=0)
157 #define YYSTACKSIZE YYMAXDEPTH
159 #define YYSTACKSIZE 300
170 #define yystacksize YYSTACKSIZE
171 short yyss
[YYSTACKSIZE
];
172 YYSTYPE yyvs
[YYSTACKSIZE
];
173 #line 118 "installparse.y"
174 /*----------------------- Program Section --------------------------------*/
176 /*************************************************************************/
178 Pk11Install_yyerror(char *message
)
181 if(Pk11Install_yyerrstr
) {
182 tmp
=PR_smprintf("%sline %d: %s\n", Pk11Install_yyerrstr
,
183 Pk11Install_yylinenum
, message
);
184 PR_smprintf_free(Pk11Install_yyerrstr
);
186 tmp
= PR_smprintf("line %d: %s\n", Pk11Install_yylinenum
, message
);
188 Pk11Install_yyerrstr
=tmp
;
191 #define YYABORT goto yyabort
192 #define YYACCEPT goto yyaccept
193 #define YYERROR goto yyerrlab
197 register int yym
, yyn
, yystate
;
200 extern char *getenv();
202 if (yys
= getenv("YYDEBUG"))
205 if (yyn
>= '0' && yyn
<= '9')
216 *yyssp
= yystate
= 0;
219 if (yyn
= yydefred
[yystate
]) goto yyreduce
;
222 if ((yychar
= yylex()) < 0) yychar
= 0;
227 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
228 if (!yys
) yys
= "illegal-symbol";
229 printf("yydebug: state %d, reading %d (%s)\n", yystate
,
234 if ((yyn
= yysindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
235 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
239 printf("yydebug: state %d, shifting to state %d\n",
240 yystate
, yytable
[yyn
]);
242 if (yyssp
>= yyss
+ yystacksize
- 1)
246 *++yyssp
= yystate
= yytable
[yyn
];
249 if (yyerrflag
> 0) --yyerrflag
;
252 if ((yyn
= yyrindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
253 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
258 if (yyerrflag
) goto yyinrecovery
;
263 yyerror("syntax error");
275 if ((yyn
= yysindex
[*yyssp
]) && (yyn
+= YYERRCODE
) >= 0 &&
276 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == YYERRCODE
)
280 printf("yydebug: state %d, error recovery shifting\
281 to state %d\n", *yyssp
, yytable
[yyn
]);
283 if (yyssp
>= yyss
+ yystacksize
- 1)
287 *++yyssp
= yystate
= yytable
[yyn
];
295 printf("yydebug: error recovery discarding state %d\n",
298 if (yyssp
<= yyss
) goto yyabort
;
306 if (yychar
== 0) goto yyabort
;
311 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
312 if (!yys
) yys
= "illegal-symbol";
313 printf("yydebug: state %d, error recovery discards token %d (%s)\n",
314 yystate
, yychar
, yys
);
323 printf("yydebug: state %d, reducing by rule %d (%s)\n",
324 yystate
, yyn
, yyrule
[yyn
]);
327 yyval
= yyvsp
[1-yym
];
331 #line 84 "installparse.y"
333 Pk11Install_valueList
= yyvsp
[0].list
;
337 #line 89 "installparse.y"
339 Pk11Install_ValueList_AddItem(yyvsp
[0].list
,yyvsp
[-1].value
);
340 yyval
.list
= yyvsp
[0].list
;
344 #line 94 "installparse.y"
346 yyval
.list
= Pk11Install_ValueList_new();
350 #line 99 "installparse.y"
352 yyval
.value
= Pk11Install_Value_new(PAIR_VALUE
,yyvsp
[0]);
356 #line 103 "installparse.y"
358 yyval
.value
= Pk11Install_Value_new(STRING_VALUE
, yyvsp
[0]);
362 #line 108 "installparse.y"
364 yyval
.pair
= Pk11Install_Pair_new(yyvsp
[-3].string
,yyvsp
[-1].list
);
368 #line 113 "installparse.y"
370 yyval
.string
= yyvsp
[0].string
;
379 if (yystate
== 0 && yym
== 0)
383 printf("yydebug: after reduction, shifting from state 0 to\
384 state %d\n", YYFINAL
);
391 if ((yychar
= yylex()) < 0) yychar
= 0;
396 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
397 if (!yys
) yys
= "illegal-symbol";
398 printf("yydebug: state %d, reading %d (%s)\n",
399 YYFINAL
, yychar
, yys
);
403 if (yychar
== 0) goto yyaccept
;
406 if ((yyn
= yygindex
[yym
]) && (yyn
+= yystate
) >= 0 &&
407 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yystate
)
408 yystate
= yytable
[yyn
];
410 yystate
= yydgoto
[yym
];
413 printf("yydebug: after reduction, shifting from state %d \
414 to state %d\n", *yyssp
, yystate
);
416 if (yyssp
>= yyss
+ yystacksize
- 1)
424 yyerror("yacc stack overflow");