1 |
|
%%{section} %%{body} %%".c" %%{yacc} |
2 |
/* -*- C -*- */ |
/* -*- C -*- */ |
3 |
|
|
4 |
/* A Bison parser, made from %%filename |
/* A Bison parser, made from %%{filename} |
5 |
by GNU bison %%version. */ |
by GNU bison %%{version}. */ |
6 |
|
|
7 |
/* Skeleton output parser for bison, |
/* Skeleton output parser for bison, |
8 |
Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc. |
Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc. |
36 |
#define YYBISON 1 |
#define YYBISON 1 |
37 |
|
|
38 |
/* Pure parsers. */ |
/* Pure parsers. */ |
39 |
#define YYPURE %%pure |
#define YYPURE %%{pure} |
40 |
|
|
41 |
/* Using locations. */ |
/* Using locations. */ |
42 |
#define YYLSP_NEEDED %%locations-flag |
#define YYLSP_NEEDED %%{locations-flag} |
43 |
|
|
44 |
/* If NAME_PREFIX is specified substitute the variables and functions |
/* If NAME_PREFIX is specified substitute the variables and functions |
45 |
names. */ |
names. */ |
46 |
#define yyparse %%prefix##parse |
#define yyparse %%{prefix}parse |
47 |
#define yylex %%prefix##lex |
#define yylex %%{prefix}lex |
48 |
#define yyerror %%prefix##error |
#define yyerror %%{prefix}error |
49 |
#define yylval %%prefix##lval |
#define yylval %%{prefix}lval |
50 |
#define yychar %%prefix##char |
#define yychar %%{prefix}char |
51 |
#define yydebug %%prefix##debug |
#define yydebug %%{prefix}debug |
52 |
#define yynerrs %%prefix##nerrs |
#define yynerrs %%{prefix}nerrs |
53 |
#if YYLSP_NEEDED |
#if YYLSP_NEEDED |
54 |
# define yylloc %%prefix##lloc |
# define yylloc %%{prefix}lloc |
55 |
#endif |
#endif |
56 |
|
|
57 |
|
|
58 |
/* Copy the user declarations. */ |
/* Copy the user declarations. */ |
59 |
%%prologue |
%%{prologue} |
60 |
|
|
61 |
/* Enabling traces. */ |
/* Enabling traces. */ |
62 |
#ifndef YYDEBUG |
#ifndef YYDEBUG |
63 |
# define YYDEBUG %%debug |
# define YYDEBUG %%{debug} |
64 |
#endif |
#endif |
65 |
|
|
66 |
/* Enabling verbose error messages. */ |
/* Enabling verbose error messages. */ |
68 |
# undef YYERROR_VERBOSE |
# undef YYERROR_VERBOSE |
69 |
# define YYERROR_VERBOSE 1 |
# define YYERROR_VERBOSE 1 |
70 |
#else |
#else |
71 |
# define YYERROR_VERBOSE %%error-verbose |
# define YYERROR_VERBOSE %%{error-verbose} |
72 |
#endif |
#endif |
73 |
|
|
74 |
#ifndef YYSTYPE |
#ifndef YYSTYPE |
75 |
typedef %%stype yystype; |
typedef %%{stype} yystype; |
76 |
# define YYSTYPE yystype |
# define YYSTYPE yystype |
77 |
#endif |
#endif |
78 |
|
|
84 |
int last_line; |
int last_line; |
85 |
int last_column; |
int last_column; |
86 |
} yyltype; |
} yyltype; |
87 |
# define YYLTYPE %%ltype |
# define YYLTYPE %%{ltype} |
88 |
#endif |
#endif |
89 |
|
|
90 |
/* Line %%skeleton-line of %%skeleton. */ |
/* Line %%{skeleton-line} of %%{skeleton}. */ |
91 |
#line %%line "%%parser-file-name" |
#line %%{line} "%%{parser-file-name}" |
92 |
|
|
93 |
/* All symbols defined below should begin with yy or YY, to avoid |
/* All symbols defined below should begin with yy or YY, to avoid |
94 |
infringing on user name space. This should be done even for local |
infringing on user name space. This should be done even for local |
185 |
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
186 |
|
|
187 |
/* Tokens. */ |
/* Tokens. */ |
188 |
%%tokendef |
%%{tokendef} |
189 |
|
|
190 |
/* YYFINAL -- State number of the termination state. */ |
/* YYFINAL -- State number of the termination state. */ |
191 |
#define YYFINAL %%final |
#define YYFINAL %%{final} |
192 |
#define YYFLAG %%flag |
#define YYFLAG %%{flag} |
193 |
#define YYLAST %%last |
#define YYLAST %%{last} |
194 |
|
|
195 |
/* YYNTOKENS -- Number of terminals. */ |
/* YYNTOKENS -- Number of terminals. */ |
196 |
#define YYNTOKENS %%ntokens |
#define YYNTOKENS %%{ntokens} |
197 |
/* YYNNTS -- Number of nonterminals. */ |
/* YYNNTS -- Number of nonterminals. */ |
198 |
#define YYNNTS %%nnts |
#define YYNNTS %%{nnts} |
199 |
/* YYNRULES -- Number of rules. */ |
/* YYNRULES -- Number of rules. */ |
200 |
#define YYNRULES %%nrules |
#define YYNRULES %%{nrules} |
201 |
/* YYNRULES -- Number of states. */ |
/* YYNRULES -- Number of states. */ |
202 |
#define YYNSTATES %%nstates |
#define YYNSTATES %%{nstates} |
203 |
#define YYMAXUTOK %%maxtok |
#define YYMAXUTOK %%{maxtok} |
204 |
|
|
205 |
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
206 |
#define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym) |
#define YYTRANSLATE(x) ((unsigned)(x) <= %%{maxtok} ? yytranslate[x] : %%{nsym}) |
207 |
|
|
208 |
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
209 |
static const char yytranslate[] = |
static const char yytranslate[] = |
210 |
{ |
{ |
211 |
%%translate |
%%{translate} |
212 |
}; |
}; |
213 |
|
|
214 |
#if YYDEBUG |
#if YYDEBUG |
216 |
YYRHS. */ |
YYRHS. */ |
217 |
static const short yyprhs[] = |
static const short yyprhs[] = |
218 |
{ |
{ |
219 |
%%prhs |
%%{prhs} |
220 |
}; |
}; |
221 |
|
|
222 |
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
223 |
static const short yyrhs[] = |
static const short yyrhs[] = |
224 |
{ |
{ |
225 |
%%rhs |
%%{rhs} |
226 |
}; |
}; |
227 |
|
|
228 |
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
229 |
static const short yyrline[] = |
static const short yyrline[] = |
230 |
{ |
{ |
231 |
%%rline |
%%{rline} |
232 |
}; |
}; |
233 |
#endif |
#endif |
234 |
|
|
237 |
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
238 |
static const char *const yytname[] = |
static const char *const yytname[] = |
239 |
{ |
{ |
240 |
%%tname |
%%{tname} |
241 |
}; |
}; |
242 |
#endif |
#endif |
243 |
|
|
244 |
/* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX. */ |
/* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX. */ |
245 |
static const short yytoknum[] = |
static const short yytoknum[] = |
246 |
{ |
{ |
247 |
%%toknum |
%%{toknum} |
248 |
}; |
}; |
249 |
|
|
250 |
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
251 |
static const short yyr1[] = |
static const short yyr1[] = |
252 |
{ |
{ |
253 |
%%r1 |
%%{r1} |
254 |
}; |
}; |
255 |
|
|
256 |
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
257 |
static const short yyr2[] = |
static const short yyr2[] = |
258 |
{ |
{ |
259 |
%%r2 |
%%{r2} |
260 |
}; |
}; |
261 |
|
|
262 |
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE |
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE |
264 |
error. */ |
error. */ |
265 |
static const short yydefact[] = |
static const short yydefact[] = |
266 |
{ |
{ |
267 |
%%defact |
%%{defact} |
268 |
}; |
}; |
269 |
|
|
270 |
/* YYPGOTO[NTERM-NUM]. */ |
/* YYPGOTO[NTERM-NUM]. */ |
271 |
static const short yydefgoto[] = |
static const short yydefgoto[] = |
272 |
{ |
{ |
273 |
%%defgoto |
%%{defgoto} |
274 |
}; |
}; |
275 |
|
|
276 |
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
277 |
STATE-NUM. */ |
STATE-NUM. */ |
278 |
static const short yypact[] = |
static const short yypact[] = |
279 |
{ |
{ |
280 |
%%pact |
%%{pact} |
281 |
}; |
}; |
282 |
|
|
283 |
/* YYPGOTO[NTERM-NUM]. */ |
/* YYPGOTO[NTERM-NUM]. */ |
284 |
static const short yypgoto[] = |
static const short yypgoto[] = |
285 |
{ |
{ |
286 |
%%pgoto |
%%{pgoto} |
287 |
}; |
}; |
288 |
|
|
289 |
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
291 |
number is the opposite. If zero, do what YYDEFACT says. */ |
number is the opposite. If zero, do what YYDEFACT says. */ |
292 |
static const short yytable[] = |
static const short yytable[] = |
293 |
{ |
{ |
294 |
%%table |
%%{table} |
295 |
}; |
}; |
296 |
|
|
297 |
static const short yycheck[] = |
static const short yycheck[] = |
298 |
{ |
{ |
299 |
%%check |
%%{check} |
300 |
}; |
}; |
301 |
|
|
302 |
|
|
420 |
|
|
421 |
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
422 |
#ifndef YYINITDEPTH |
#ifndef YYINITDEPTH |
423 |
# define YYINITDEPTH %%initdepth |
# define YYINITDEPTH %%{initdepth} |
424 |
#endif |
#endif |
425 |
|
|
426 |
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
435 |
#endif |
#endif |
436 |
|
|
437 |
#ifndef YYMAXDEPTH |
#ifndef YYMAXDEPTH |
438 |
# define YYMAXDEPTH %%maxdepth |
# define YYMAXDEPTH %%{maxdepth} |
439 |
#endif |
#endif |
440 |
|
|
441 |
|
|
904 |
#endif |
#endif |
905 |
switch (yyn) |
switch (yyn) |
906 |
{ |
{ |
907 |
%%actions |
%%{actions} |
908 |
} |
} |
909 |
|
|
910 |
/* Line %%skeleton-line of %%skeleton. */ |
/* Line %%{skeleton-line} of %%{skeleton}. */ |
911 |
#line %%line "%%parser-file-name" |
#line %%{line} "%%{parser-file-name}" |
912 |
|
|
913 |
yyvsp -= yylen; |
yyvsp -= yylen; |
914 |
yyssp -= yylen; |
yyssp -= yylen; |
1139 |
return yyresult; |
return yyresult; |
1140 |
} |
} |
1141 |
|
|
1142 |
%%epilogue |
%%{epilogue} |