1*0a6a1f1dSLionel Sambuc /* $NetBSD: code_error.code.c,v 1.1.1.1 2015/01/03 22:58:24 christos Exp $ */
2*0a6a1f1dSLionel Sambuc
3*0a6a1f1dSLionel Sambuc /* original parser id follows */
4*0a6a1f1dSLionel Sambuc /* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
5*0a6a1f1dSLionel Sambuc /* (use YYMAJOR/YYMINOR for ifdefs dependent of parser version) */
6*0a6a1f1dSLionel Sambuc
7*0a6a1f1dSLionel Sambuc #define YYBYACC 1
8*0a6a1f1dSLionel Sambuc #define YYMAJOR 1
9*0a6a1f1dSLionel Sambuc #define YYMINOR 9
10*0a6a1f1dSLionel Sambuc #define YYCHECK "yyyymmdd"
11*0a6a1f1dSLionel Sambuc
12*0a6a1f1dSLionel Sambuc #define YYEMPTY (-1)
13*0a6a1f1dSLionel Sambuc #define yyclearin (yychar = YYEMPTY)
14*0a6a1f1dSLionel Sambuc #define yyerrok (yyerrflag = 0)
15*0a6a1f1dSLionel Sambuc #define YYRECOVERING() (yyerrflag != 0)
16*0a6a1f1dSLionel Sambuc #define YYENOMEM (-2)
17*0a6a1f1dSLionel Sambuc #define YYEOF 0
18*0a6a1f1dSLionel Sambuc #undef YYBTYACC
19*0a6a1f1dSLionel Sambuc #define YYBTYACC 0
20*0a6a1f1dSLionel Sambuc #define YYDEBUGSTR YYPREFIX "debug"
21*0a6a1f1dSLionel Sambuc
22*0a6a1f1dSLionel Sambuc #ifndef yyparse
23*0a6a1f1dSLionel Sambuc #define yyparse error_parse
24*0a6a1f1dSLionel Sambuc #endif /* yyparse */
25*0a6a1f1dSLionel Sambuc
26*0a6a1f1dSLionel Sambuc #ifndef yylex
27*0a6a1f1dSLionel Sambuc #define yylex error_lex
28*0a6a1f1dSLionel Sambuc #endif /* yylex */
29*0a6a1f1dSLionel Sambuc
30*0a6a1f1dSLionel Sambuc #ifndef yyerror
31*0a6a1f1dSLionel Sambuc #define yyerror error_error
32*0a6a1f1dSLionel Sambuc #endif /* yyerror */
33*0a6a1f1dSLionel Sambuc
34*0a6a1f1dSLionel Sambuc #ifndef yychar
35*0a6a1f1dSLionel Sambuc #define yychar error_char
36*0a6a1f1dSLionel Sambuc #endif /* yychar */
37*0a6a1f1dSLionel Sambuc
38*0a6a1f1dSLionel Sambuc #ifndef yyval
39*0a6a1f1dSLionel Sambuc #define yyval error_val
40*0a6a1f1dSLionel Sambuc #endif /* yyval */
41*0a6a1f1dSLionel Sambuc
42*0a6a1f1dSLionel Sambuc #ifndef yylval
43*0a6a1f1dSLionel Sambuc #define yylval error_lval
44*0a6a1f1dSLionel Sambuc #endif /* yylval */
45*0a6a1f1dSLionel Sambuc
46*0a6a1f1dSLionel Sambuc #ifndef yydebug
47*0a6a1f1dSLionel Sambuc #define yydebug error_debug
48*0a6a1f1dSLionel Sambuc #endif /* yydebug */
49*0a6a1f1dSLionel Sambuc
50*0a6a1f1dSLionel Sambuc #ifndef yynerrs
51*0a6a1f1dSLionel Sambuc #define yynerrs error_nerrs
52*0a6a1f1dSLionel Sambuc #endif /* yynerrs */
53*0a6a1f1dSLionel Sambuc
54*0a6a1f1dSLionel Sambuc #ifndef yyerrflag
55*0a6a1f1dSLionel Sambuc #define yyerrflag error_errflag
56*0a6a1f1dSLionel Sambuc #endif /* yyerrflag */
57*0a6a1f1dSLionel Sambuc
58*0a6a1f1dSLionel Sambuc #ifndef yylhs
59*0a6a1f1dSLionel Sambuc #define yylhs error_lhs
60*0a6a1f1dSLionel Sambuc #endif /* yylhs */
61*0a6a1f1dSLionel Sambuc
62*0a6a1f1dSLionel Sambuc #ifndef yylen
63*0a6a1f1dSLionel Sambuc #define yylen error_len
64*0a6a1f1dSLionel Sambuc #endif /* yylen */
65*0a6a1f1dSLionel Sambuc
66*0a6a1f1dSLionel Sambuc #ifndef yydefred
67*0a6a1f1dSLionel Sambuc #define yydefred error_defred
68*0a6a1f1dSLionel Sambuc #endif /* yydefred */
69*0a6a1f1dSLionel Sambuc
70*0a6a1f1dSLionel Sambuc #ifndef yystos
71*0a6a1f1dSLionel Sambuc #define yystos error_stos
72*0a6a1f1dSLionel Sambuc #endif /* yystos */
73*0a6a1f1dSLionel Sambuc
74*0a6a1f1dSLionel Sambuc #ifndef yydgoto
75*0a6a1f1dSLionel Sambuc #define yydgoto error_dgoto
76*0a6a1f1dSLionel Sambuc #endif /* yydgoto */
77*0a6a1f1dSLionel Sambuc
78*0a6a1f1dSLionel Sambuc #ifndef yysindex
79*0a6a1f1dSLionel Sambuc #define yysindex error_sindex
80*0a6a1f1dSLionel Sambuc #endif /* yysindex */
81*0a6a1f1dSLionel Sambuc
82*0a6a1f1dSLionel Sambuc #ifndef yyrindex
83*0a6a1f1dSLionel Sambuc #define yyrindex error_rindex
84*0a6a1f1dSLionel Sambuc #endif /* yyrindex */
85*0a6a1f1dSLionel Sambuc
86*0a6a1f1dSLionel Sambuc #ifndef yygindex
87*0a6a1f1dSLionel Sambuc #define yygindex error_gindex
88*0a6a1f1dSLionel Sambuc #endif /* yygindex */
89*0a6a1f1dSLionel Sambuc
90*0a6a1f1dSLionel Sambuc #ifndef yytable
91*0a6a1f1dSLionel Sambuc #define yytable error_table
92*0a6a1f1dSLionel Sambuc #endif /* yytable */
93*0a6a1f1dSLionel Sambuc
94*0a6a1f1dSLionel Sambuc #ifndef yycheck
95*0a6a1f1dSLionel Sambuc #define yycheck error_check
96*0a6a1f1dSLionel Sambuc #endif /* yycheck */
97*0a6a1f1dSLionel Sambuc
98*0a6a1f1dSLionel Sambuc #ifndef yyname
99*0a6a1f1dSLionel Sambuc #define yyname error_name
100*0a6a1f1dSLionel Sambuc #endif /* yyname */
101*0a6a1f1dSLionel Sambuc
102*0a6a1f1dSLionel Sambuc #ifndef yyrule
103*0a6a1f1dSLionel Sambuc #define yyrule error_rule
104*0a6a1f1dSLionel Sambuc #endif /* yyrule */
105*0a6a1f1dSLionel Sambuc
106*0a6a1f1dSLionel Sambuc #if YYBTYACC
107*0a6a1f1dSLionel Sambuc
108*0a6a1f1dSLionel Sambuc #ifndef yycindex
109*0a6a1f1dSLionel Sambuc #define yycindex error_cindex
110*0a6a1f1dSLionel Sambuc #endif /* yycindex */
111*0a6a1f1dSLionel Sambuc
112*0a6a1f1dSLionel Sambuc #ifndef yyctable
113*0a6a1f1dSLionel Sambuc #define yyctable error_ctable
114*0a6a1f1dSLionel Sambuc #endif /* yyctable */
115*0a6a1f1dSLionel Sambuc
116*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
117*0a6a1f1dSLionel Sambuc
118*0a6a1f1dSLionel Sambuc #define YYPREFIX "error_"
119*0a6a1f1dSLionel Sambuc
120*0a6a1f1dSLionel Sambuc #define YYPURE 0
121*0a6a1f1dSLionel Sambuc
122*0a6a1f1dSLionel Sambuc #line 2 "code_error.y"
123*0a6a1f1dSLionel Sambuc
124*0a6a1f1dSLionel Sambuc #ifdef YYBISON
125*0a6a1f1dSLionel Sambuc int yylex(void);
126*0a6a1f1dSLionel Sambuc static void yyerror(const char *);
127*0a6a1f1dSLionel Sambuc #endif
128*0a6a1f1dSLionel Sambuc
129*0a6a1f1dSLionel Sambuc #line 128 "code_error.code.c"
130*0a6a1f1dSLionel Sambuc
131*0a6a1f1dSLionel Sambuc #if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
132*0a6a1f1dSLionel Sambuc /* Default: YYSTYPE is the semantic value type. */
133*0a6a1f1dSLionel Sambuc typedef int YYSTYPE;
134*0a6a1f1dSLionel Sambuc # define YYSTYPE_IS_DECLARED 1
135*0a6a1f1dSLionel Sambuc #endif
136*0a6a1f1dSLionel Sambuc
137*0a6a1f1dSLionel Sambuc /* compatibility with bison */
138*0a6a1f1dSLionel Sambuc #ifdef YYPARSE_PARAM
139*0a6a1f1dSLionel Sambuc /* compatibility with FreeBSD */
140*0a6a1f1dSLionel Sambuc # ifdef YYPARSE_PARAM_TYPE
141*0a6a1f1dSLionel Sambuc # define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
142*0a6a1f1dSLionel Sambuc # else
143*0a6a1f1dSLionel Sambuc # define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
144*0a6a1f1dSLionel Sambuc # endif
145*0a6a1f1dSLionel Sambuc #else
146*0a6a1f1dSLionel Sambuc # define YYPARSE_DECL() yyparse(void)
147*0a6a1f1dSLionel Sambuc #endif
148*0a6a1f1dSLionel Sambuc
149*0a6a1f1dSLionel Sambuc /* Parameters sent to lex. */
150*0a6a1f1dSLionel Sambuc #ifdef YYLEX_PARAM
151*0a6a1f1dSLionel Sambuc # define YYLEX_DECL() yylex(void *YYLEX_PARAM)
152*0a6a1f1dSLionel Sambuc # define YYLEX yylex(YYLEX_PARAM)
153*0a6a1f1dSLionel Sambuc #else
154*0a6a1f1dSLionel Sambuc # define YYLEX_DECL() yylex(void)
155*0a6a1f1dSLionel Sambuc # define YYLEX yylex()
156*0a6a1f1dSLionel Sambuc #endif
157*0a6a1f1dSLionel Sambuc
158*0a6a1f1dSLionel Sambuc /* Parameters sent to yyerror. */
159*0a6a1f1dSLionel Sambuc #ifndef YYERROR_DECL
160*0a6a1f1dSLionel Sambuc #define YYERROR_DECL() yyerror(const char *s)
161*0a6a1f1dSLionel Sambuc #endif
162*0a6a1f1dSLionel Sambuc #ifndef YYERROR_CALL
163*0a6a1f1dSLionel Sambuc #define YYERROR_CALL(msg) yyerror(msg)
164*0a6a1f1dSLionel Sambuc #endif
165*0a6a1f1dSLionel Sambuc
166*0a6a1f1dSLionel Sambuc #define YYERRCODE 256
167*0a6a1f1dSLionel Sambuc #define YYTABLESIZE 0
168*0a6a1f1dSLionel Sambuc #define YYFINAL 2
169*0a6a1f1dSLionel Sambuc #ifndef YYDEBUG
170*0a6a1f1dSLionel Sambuc #define YYDEBUG 0
171*0a6a1f1dSLionel Sambuc #endif
172*0a6a1f1dSLionel Sambuc #define YYMAXTOKEN 256
173*0a6a1f1dSLionel Sambuc #define YYUNDFTOKEN 259
174*0a6a1f1dSLionel Sambuc #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
175*0a6a1f1dSLionel Sambuc
176*0a6a1f1dSLionel Sambuc extern int YYPARSE_DECL();
177*0a6a1f1dSLionel Sambuc typedef short YYINT;
178*0a6a1f1dSLionel Sambuc extern const YYINT yylhs[];
179*0a6a1f1dSLionel Sambuc extern const YYINT yylen[];
180*0a6a1f1dSLionel Sambuc extern const YYINT yydefred[];
181*0a6a1f1dSLionel Sambuc extern const YYINT yystos[];
182*0a6a1f1dSLionel Sambuc extern const YYINT yydgoto[];
183*0a6a1f1dSLionel Sambuc extern const YYINT yysindex[];
184*0a6a1f1dSLionel Sambuc extern const YYINT yyrindex[];
185*0a6a1f1dSLionel Sambuc #if YYBTYACC
186*0a6a1f1dSLionel Sambuc extern const YYINT yycindex[];
187*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
188*0a6a1f1dSLionel Sambuc extern const YYINT yygindex[];
189*0a6a1f1dSLionel Sambuc extern const YYINT yytable[];
190*0a6a1f1dSLionel Sambuc extern const YYINT yycheck[];
191*0a6a1f1dSLionel Sambuc #if YYBTYACC
192*0a6a1f1dSLionel Sambuc extern const YYINT yyctable[];
193*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
194*0a6a1f1dSLionel Sambuc
195*0a6a1f1dSLionel Sambuc #if YYDEBUG
196*0a6a1f1dSLionel Sambuc extern const char *const yyname[];
197*0a6a1f1dSLionel Sambuc extern const char *const yyrule[];
198*0a6a1f1dSLionel Sambuc #endif
199*0a6a1f1dSLionel Sambuc
200*0a6a1f1dSLionel Sambuc int yydebug;
201*0a6a1f1dSLionel Sambuc int yynerrs;
202*0a6a1f1dSLionel Sambuc
203*0a6a1f1dSLionel Sambuc int yyerrflag;
204*0a6a1f1dSLionel Sambuc int yychar;
205*0a6a1f1dSLionel Sambuc YYSTYPE yyval;
206*0a6a1f1dSLionel Sambuc YYSTYPE yylval;
207*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
208*0a6a1f1dSLionel Sambuc YYLTYPE yyloc; /* position returned by actions */
209*0a6a1f1dSLionel Sambuc YYLTYPE yylloc; /* position from the lexer */
210*0a6a1f1dSLionel Sambuc #endif
211*0a6a1f1dSLionel Sambuc
212*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
213*0a6a1f1dSLionel Sambuc #ifndef YYLLOC_DEFAULT
214*0a6a1f1dSLionel Sambuc #define YYLLOC_DEFAULT(loc, rhs, n) \
215*0a6a1f1dSLionel Sambuc do \
216*0a6a1f1dSLionel Sambuc { \
217*0a6a1f1dSLionel Sambuc if (n == 0) \
218*0a6a1f1dSLionel Sambuc { \
219*0a6a1f1dSLionel Sambuc (loc).first_line = ((rhs)[-1]).last_line; \
220*0a6a1f1dSLionel Sambuc (loc).first_column = ((rhs)[-1]).last_column; \
221*0a6a1f1dSLionel Sambuc (loc).last_line = ((rhs)[-1]).last_line; \
222*0a6a1f1dSLionel Sambuc (loc).last_column = ((rhs)[-1]).last_column; \
223*0a6a1f1dSLionel Sambuc } \
224*0a6a1f1dSLionel Sambuc else \
225*0a6a1f1dSLionel Sambuc { \
226*0a6a1f1dSLionel Sambuc (loc).first_line = ((rhs)[ 0 ]).first_line; \
227*0a6a1f1dSLionel Sambuc (loc).first_column = ((rhs)[ 0 ]).first_column; \
228*0a6a1f1dSLionel Sambuc (loc).last_line = ((rhs)[n-1]).last_line; \
229*0a6a1f1dSLionel Sambuc (loc).last_column = ((rhs)[n-1]).last_column; \
230*0a6a1f1dSLionel Sambuc } \
231*0a6a1f1dSLionel Sambuc } while (0)
232*0a6a1f1dSLionel Sambuc #endif /* YYLLOC_DEFAULT */
233*0a6a1f1dSLionel Sambuc #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
234*0a6a1f1dSLionel Sambuc #if YYBTYACC
235*0a6a1f1dSLionel Sambuc
236*0a6a1f1dSLionel Sambuc #ifndef YYLVQUEUEGROWTH
237*0a6a1f1dSLionel Sambuc #define YYLVQUEUEGROWTH 32
238*0a6a1f1dSLionel Sambuc #endif
239*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
240*0a6a1f1dSLionel Sambuc
241*0a6a1f1dSLionel Sambuc /* define the initial stack-sizes */
242*0a6a1f1dSLionel Sambuc #ifdef YYSTACKSIZE
243*0a6a1f1dSLionel Sambuc #undef YYMAXDEPTH
244*0a6a1f1dSLionel Sambuc #define YYMAXDEPTH YYSTACKSIZE
245*0a6a1f1dSLionel Sambuc #else
246*0a6a1f1dSLionel Sambuc #ifdef YYMAXDEPTH
247*0a6a1f1dSLionel Sambuc #define YYSTACKSIZE YYMAXDEPTH
248*0a6a1f1dSLionel Sambuc #else
249*0a6a1f1dSLionel Sambuc #define YYSTACKSIZE 10000
250*0a6a1f1dSLionel Sambuc #define YYMAXDEPTH 10000
251*0a6a1f1dSLionel Sambuc #endif
252*0a6a1f1dSLionel Sambuc #endif
253*0a6a1f1dSLionel Sambuc
254*0a6a1f1dSLionel Sambuc #ifndef YYINITSTACKSIZE
255*0a6a1f1dSLionel Sambuc #define YYINITSTACKSIZE 200
256*0a6a1f1dSLionel Sambuc #endif
257*0a6a1f1dSLionel Sambuc
258*0a6a1f1dSLionel Sambuc typedef struct {
259*0a6a1f1dSLionel Sambuc unsigned stacksize;
260*0a6a1f1dSLionel Sambuc short *s_base;
261*0a6a1f1dSLionel Sambuc short *s_mark;
262*0a6a1f1dSLionel Sambuc short *s_last;
263*0a6a1f1dSLionel Sambuc YYSTYPE *l_base;
264*0a6a1f1dSLionel Sambuc YYSTYPE *l_mark;
265*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
266*0a6a1f1dSLionel Sambuc YYLTYPE *p_base;
267*0a6a1f1dSLionel Sambuc YYLTYPE *p_mark;
268*0a6a1f1dSLionel Sambuc #endif
269*0a6a1f1dSLionel Sambuc } YYSTACKDATA;
270*0a6a1f1dSLionel Sambuc #if YYBTYACC
271*0a6a1f1dSLionel Sambuc
272*0a6a1f1dSLionel Sambuc struct YYParseState_s
273*0a6a1f1dSLionel Sambuc {
274*0a6a1f1dSLionel Sambuc struct YYParseState_s *save; /* Previously saved parser state */
275*0a6a1f1dSLionel Sambuc YYSTACKDATA yystack; /* saved parser stack */
276*0a6a1f1dSLionel Sambuc int state; /* saved parser state */
277*0a6a1f1dSLionel Sambuc int errflag; /* saved error recovery status */
278*0a6a1f1dSLionel Sambuc int lexeme; /* saved index of the conflict lexeme in the lexical queue */
279*0a6a1f1dSLionel Sambuc YYINT ctry; /* saved index in yyctable[] for this conflict */
280*0a6a1f1dSLionel Sambuc };
281*0a6a1f1dSLionel Sambuc typedef struct YYParseState_s YYParseState;
282*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
283*0a6a1f1dSLionel Sambuc /* variables for the parser stack */
284*0a6a1f1dSLionel Sambuc static YYSTACKDATA yystack;
285*0a6a1f1dSLionel Sambuc #if YYBTYACC
286*0a6a1f1dSLionel Sambuc
287*0a6a1f1dSLionel Sambuc /* Current parser state */
288*0a6a1f1dSLionel Sambuc static YYParseState *yyps = 0;
289*0a6a1f1dSLionel Sambuc
290*0a6a1f1dSLionel Sambuc /* yypath != NULL: do the full parse, starting at *yypath parser state. */
291*0a6a1f1dSLionel Sambuc static YYParseState *yypath = 0;
292*0a6a1f1dSLionel Sambuc
293*0a6a1f1dSLionel Sambuc /* Base of the lexical value queue */
294*0a6a1f1dSLionel Sambuc static YYSTYPE *yylvals = 0;
295*0a6a1f1dSLionel Sambuc
296*0a6a1f1dSLionel Sambuc /* Current position at lexical value queue */
297*0a6a1f1dSLionel Sambuc static YYSTYPE *yylvp = 0;
298*0a6a1f1dSLionel Sambuc
299*0a6a1f1dSLionel Sambuc /* End position of lexical value queue */
300*0a6a1f1dSLionel Sambuc static YYSTYPE *yylve = 0;
301*0a6a1f1dSLionel Sambuc
302*0a6a1f1dSLionel Sambuc /* The last allocated position at the lexical value queue */
303*0a6a1f1dSLionel Sambuc static YYSTYPE *yylvlim = 0;
304*0a6a1f1dSLionel Sambuc
305*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
306*0a6a1f1dSLionel Sambuc /* Base of the lexical position queue */
307*0a6a1f1dSLionel Sambuc static YYLTYPE *yylpsns = 0;
308*0a6a1f1dSLionel Sambuc
309*0a6a1f1dSLionel Sambuc /* Current position at lexical position queue */
310*0a6a1f1dSLionel Sambuc static YYLTYPE *yylpp = 0;
311*0a6a1f1dSLionel Sambuc
312*0a6a1f1dSLionel Sambuc /* End position of lexical position queue */
313*0a6a1f1dSLionel Sambuc static YYLTYPE *yylpe = 0;
314*0a6a1f1dSLionel Sambuc
315*0a6a1f1dSLionel Sambuc /* The last allocated position at the lexical position queue */
316*0a6a1f1dSLionel Sambuc static YYLTYPE *yylplim = 0;
317*0a6a1f1dSLionel Sambuc #endif
318*0a6a1f1dSLionel Sambuc
319*0a6a1f1dSLionel Sambuc /* Current position at lexical token queue */
320*0a6a1f1dSLionel Sambuc static short *yylexp = 0;
321*0a6a1f1dSLionel Sambuc
322*0a6a1f1dSLionel Sambuc static short *yylexemes = 0;
323*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
324*0a6a1f1dSLionel Sambuc #line 12 "code_error.y"
325*0a6a1f1dSLionel Sambuc
326*0a6a1f1dSLionel Sambuc #include <stdio.h>
327*0a6a1f1dSLionel Sambuc
328*0a6a1f1dSLionel Sambuc #ifdef YYBYACC
329*0a6a1f1dSLionel Sambuc extern int YYLEX_DECL();
330*0a6a1f1dSLionel Sambuc #endif
331*0a6a1f1dSLionel Sambuc
332*0a6a1f1dSLionel Sambuc int
main(void)333*0a6a1f1dSLionel Sambuc main(void)
334*0a6a1f1dSLionel Sambuc {
335*0a6a1f1dSLionel Sambuc printf("yyparse() = %d\n", yyparse());
336*0a6a1f1dSLionel Sambuc return 0;
337*0a6a1f1dSLionel Sambuc }
338*0a6a1f1dSLionel Sambuc
339*0a6a1f1dSLionel Sambuc int
yylex(void)340*0a6a1f1dSLionel Sambuc yylex(void)
341*0a6a1f1dSLionel Sambuc {
342*0a6a1f1dSLionel Sambuc return -1;
343*0a6a1f1dSLionel Sambuc }
344*0a6a1f1dSLionel Sambuc
345*0a6a1f1dSLionel Sambuc static void
yyerror(const char * s)346*0a6a1f1dSLionel Sambuc yyerror(const char* s)
347*0a6a1f1dSLionel Sambuc {
348*0a6a1f1dSLionel Sambuc printf("%s\n", s);
349*0a6a1f1dSLionel Sambuc }
350*0a6a1f1dSLionel Sambuc #line 349 "code_error.code.c"
351*0a6a1f1dSLionel Sambuc
352*0a6a1f1dSLionel Sambuc /* For use in generated program */
353*0a6a1f1dSLionel Sambuc #define yydepth (int)(yystack.s_mark - yystack.s_base)
354*0a6a1f1dSLionel Sambuc #if YYBTYACC
355*0a6a1f1dSLionel Sambuc #define yytrial (yyps->save)
356*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
357*0a6a1f1dSLionel Sambuc
358*0a6a1f1dSLionel Sambuc #if YYDEBUG
359*0a6a1f1dSLionel Sambuc #include <stdio.h> /* needed for printf */
360*0a6a1f1dSLionel Sambuc #endif
361*0a6a1f1dSLionel Sambuc
362*0a6a1f1dSLionel Sambuc #include <stdlib.h> /* needed for malloc, etc */
363*0a6a1f1dSLionel Sambuc #include <string.h> /* needed for memset */
364*0a6a1f1dSLionel Sambuc
365*0a6a1f1dSLionel Sambuc /* allocate initial stack or double stack size, up to YYMAXDEPTH */
yygrowstack(YYSTACKDATA * data)366*0a6a1f1dSLionel Sambuc static int yygrowstack(YYSTACKDATA *data)
367*0a6a1f1dSLionel Sambuc {
368*0a6a1f1dSLionel Sambuc int i;
369*0a6a1f1dSLionel Sambuc unsigned newsize;
370*0a6a1f1dSLionel Sambuc short *newss;
371*0a6a1f1dSLionel Sambuc YYSTYPE *newvs;
372*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
373*0a6a1f1dSLionel Sambuc YYLTYPE *newps;
374*0a6a1f1dSLionel Sambuc #endif
375*0a6a1f1dSLionel Sambuc
376*0a6a1f1dSLionel Sambuc if ((newsize = data->stacksize) == 0)
377*0a6a1f1dSLionel Sambuc newsize = YYINITSTACKSIZE;
378*0a6a1f1dSLionel Sambuc else if (newsize >= YYMAXDEPTH)
379*0a6a1f1dSLionel Sambuc return YYENOMEM;
380*0a6a1f1dSLionel Sambuc else if ((newsize *= 2) > YYMAXDEPTH)
381*0a6a1f1dSLionel Sambuc newsize = YYMAXDEPTH;
382*0a6a1f1dSLionel Sambuc
383*0a6a1f1dSLionel Sambuc i = (int) (data->s_mark - data->s_base);
384*0a6a1f1dSLionel Sambuc newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
385*0a6a1f1dSLionel Sambuc if (newss == 0)
386*0a6a1f1dSLionel Sambuc return YYENOMEM;
387*0a6a1f1dSLionel Sambuc
388*0a6a1f1dSLionel Sambuc data->s_base = newss;
389*0a6a1f1dSLionel Sambuc data->s_mark = newss + i;
390*0a6a1f1dSLionel Sambuc
391*0a6a1f1dSLionel Sambuc newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
392*0a6a1f1dSLionel Sambuc if (newvs == 0)
393*0a6a1f1dSLionel Sambuc return YYENOMEM;
394*0a6a1f1dSLionel Sambuc
395*0a6a1f1dSLionel Sambuc data->l_base = newvs;
396*0a6a1f1dSLionel Sambuc data->l_mark = newvs + i;
397*0a6a1f1dSLionel Sambuc
398*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
399*0a6a1f1dSLionel Sambuc newps = (YYLTYPE *)realloc(data->p_base, newsize * sizeof(*newps));
400*0a6a1f1dSLionel Sambuc if (newps == 0)
401*0a6a1f1dSLionel Sambuc return YYENOMEM;
402*0a6a1f1dSLionel Sambuc
403*0a6a1f1dSLionel Sambuc data->p_base = newps;
404*0a6a1f1dSLionel Sambuc data->p_mark = newps + i;
405*0a6a1f1dSLionel Sambuc #endif
406*0a6a1f1dSLionel Sambuc
407*0a6a1f1dSLionel Sambuc data->stacksize = newsize;
408*0a6a1f1dSLionel Sambuc data->s_last = data->s_base + newsize - 1;
409*0a6a1f1dSLionel Sambuc
410*0a6a1f1dSLionel Sambuc #if YYDEBUG
411*0a6a1f1dSLionel Sambuc if (yydebug)
412*0a6a1f1dSLionel Sambuc fprintf(stderr, "%sdebug: stack size increased to %d\n", YYPREFIX, newsize);
413*0a6a1f1dSLionel Sambuc #endif
414*0a6a1f1dSLionel Sambuc return 0;
415*0a6a1f1dSLionel Sambuc }
416*0a6a1f1dSLionel Sambuc
417*0a6a1f1dSLionel Sambuc #if YYPURE || defined(YY_NO_LEAKS)
yyfreestack(YYSTACKDATA * data)418*0a6a1f1dSLionel Sambuc static void yyfreestack(YYSTACKDATA *data)
419*0a6a1f1dSLionel Sambuc {
420*0a6a1f1dSLionel Sambuc free(data->s_base);
421*0a6a1f1dSLionel Sambuc free(data->l_base);
422*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
423*0a6a1f1dSLionel Sambuc free(data->p_base);
424*0a6a1f1dSLionel Sambuc #endif
425*0a6a1f1dSLionel Sambuc memset(data, 0, sizeof(*data));
426*0a6a1f1dSLionel Sambuc }
427*0a6a1f1dSLionel Sambuc #else
428*0a6a1f1dSLionel Sambuc #define yyfreestack(data) /* nothing */
429*0a6a1f1dSLionel Sambuc #endif /* YYPURE || defined(YY_NO_LEAKS) */
430*0a6a1f1dSLionel Sambuc #if YYBTYACC
431*0a6a1f1dSLionel Sambuc
432*0a6a1f1dSLionel Sambuc static YYParseState *
yyNewState(unsigned size)433*0a6a1f1dSLionel Sambuc yyNewState(unsigned size)
434*0a6a1f1dSLionel Sambuc {
435*0a6a1f1dSLionel Sambuc YYParseState *p = (YYParseState *) malloc(sizeof(YYParseState));
436*0a6a1f1dSLionel Sambuc if (p == NULL) return NULL;
437*0a6a1f1dSLionel Sambuc
438*0a6a1f1dSLionel Sambuc p->yystack.stacksize = size;
439*0a6a1f1dSLionel Sambuc if (size == 0)
440*0a6a1f1dSLionel Sambuc {
441*0a6a1f1dSLionel Sambuc p->yystack.s_base = NULL;
442*0a6a1f1dSLionel Sambuc p->yystack.l_base = NULL;
443*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
444*0a6a1f1dSLionel Sambuc p->yystack.p_base = NULL;
445*0a6a1f1dSLionel Sambuc #endif
446*0a6a1f1dSLionel Sambuc return p;
447*0a6a1f1dSLionel Sambuc }
448*0a6a1f1dSLionel Sambuc p->yystack.s_base = (short *) malloc(size * sizeof(short));
449*0a6a1f1dSLionel Sambuc if (p->yystack.s_base == NULL) return NULL;
450*0a6a1f1dSLionel Sambuc p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE));
451*0a6a1f1dSLionel Sambuc if (p->yystack.l_base == NULL) return NULL;
452*0a6a1f1dSLionel Sambuc memset(p->yystack.l_base, 0, size * sizeof(YYSTYPE));
453*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
454*0a6a1f1dSLionel Sambuc p->yystack.p_base = (YYLTYPE *) malloc(size * sizeof(YYLTYPE));
455*0a6a1f1dSLionel Sambuc if (p->yystack.p_base == NULL) return NULL;
456*0a6a1f1dSLionel Sambuc memset(p->yystack.p_base, 0, size * sizeof(YYLTYPE));
457*0a6a1f1dSLionel Sambuc #endif
458*0a6a1f1dSLionel Sambuc
459*0a6a1f1dSLionel Sambuc return p;
460*0a6a1f1dSLionel Sambuc }
461*0a6a1f1dSLionel Sambuc
462*0a6a1f1dSLionel Sambuc static void
yyFreeState(YYParseState * p)463*0a6a1f1dSLionel Sambuc yyFreeState(YYParseState *p)
464*0a6a1f1dSLionel Sambuc {
465*0a6a1f1dSLionel Sambuc yyfreestack(&p->yystack);
466*0a6a1f1dSLionel Sambuc free(p);
467*0a6a1f1dSLionel Sambuc }
468*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
469*0a6a1f1dSLionel Sambuc
470*0a6a1f1dSLionel Sambuc #define YYABORT goto yyabort
471*0a6a1f1dSLionel Sambuc #define YYREJECT goto yyabort
472*0a6a1f1dSLionel Sambuc #define YYACCEPT goto yyaccept
473*0a6a1f1dSLionel Sambuc #define YYERROR goto yyerrlab
474*0a6a1f1dSLionel Sambuc #if YYBTYACC
475*0a6a1f1dSLionel Sambuc #define YYVALID do { if (yyps->save) goto yyvalid; } while(0)
476*0a6a1f1dSLionel Sambuc #define YYVALID_NESTED do { if (yyps->save && \
477*0a6a1f1dSLionel Sambuc yyps->save->save == 0) goto yyvalid; } while(0)
478*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
479*0a6a1f1dSLionel Sambuc
480*0a6a1f1dSLionel Sambuc int
YYPARSE_DECL()481*0a6a1f1dSLionel Sambuc YYPARSE_DECL()
482*0a6a1f1dSLionel Sambuc {
483*0a6a1f1dSLionel Sambuc int yym, yyn, yystate, yyresult;
484*0a6a1f1dSLionel Sambuc #if YYBTYACC
485*0a6a1f1dSLionel Sambuc int yynewerrflag;
486*0a6a1f1dSLionel Sambuc YYParseState *yyerrctx = NULL;
487*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
488*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
489*0a6a1f1dSLionel Sambuc YYLTYPE yyerror_loc_range[2]; /* position of error start & end */
490*0a6a1f1dSLionel Sambuc #endif
491*0a6a1f1dSLionel Sambuc #if YYDEBUG
492*0a6a1f1dSLionel Sambuc const char *yys;
493*0a6a1f1dSLionel Sambuc
494*0a6a1f1dSLionel Sambuc if ((yys = getenv("YYDEBUG")) != 0)
495*0a6a1f1dSLionel Sambuc {
496*0a6a1f1dSLionel Sambuc yyn = *yys;
497*0a6a1f1dSLionel Sambuc if (yyn >= '0' && yyn <= '9')
498*0a6a1f1dSLionel Sambuc yydebug = yyn - '0';
499*0a6a1f1dSLionel Sambuc }
500*0a6a1f1dSLionel Sambuc if (yydebug)
501*0a6a1f1dSLionel Sambuc fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
502*0a6a1f1dSLionel Sambuc #endif
503*0a6a1f1dSLionel Sambuc
504*0a6a1f1dSLionel Sambuc #if YYBTYACC
505*0a6a1f1dSLionel Sambuc yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
506*0a6a1f1dSLionel Sambuc yyps->save = 0;
507*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
508*0a6a1f1dSLionel Sambuc yynerrs = 0;
509*0a6a1f1dSLionel Sambuc yyerrflag = 0;
510*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
511*0a6a1f1dSLionel Sambuc yystate = 0;
512*0a6a1f1dSLionel Sambuc
513*0a6a1f1dSLionel Sambuc #if YYPURE
514*0a6a1f1dSLionel Sambuc memset(&yystack, 0, sizeof(yystack));
515*0a6a1f1dSLionel Sambuc #endif
516*0a6a1f1dSLionel Sambuc
517*0a6a1f1dSLionel Sambuc if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
518*0a6a1f1dSLionel Sambuc yystack.s_mark = yystack.s_base;
519*0a6a1f1dSLionel Sambuc yystack.l_mark = yystack.l_base;
520*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
521*0a6a1f1dSLionel Sambuc yystack.p_mark = yystack.p_base;
522*0a6a1f1dSLionel Sambuc #endif
523*0a6a1f1dSLionel Sambuc yystate = 0;
524*0a6a1f1dSLionel Sambuc *yystack.s_mark = 0;
525*0a6a1f1dSLionel Sambuc
526*0a6a1f1dSLionel Sambuc yyloop:
527*0a6a1f1dSLionel Sambuc if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
528*0a6a1f1dSLionel Sambuc if (yychar < 0)
529*0a6a1f1dSLionel Sambuc {
530*0a6a1f1dSLionel Sambuc #if YYBTYACC
531*0a6a1f1dSLionel Sambuc do {
532*0a6a1f1dSLionel Sambuc if (yylvp < yylve)
533*0a6a1f1dSLionel Sambuc {
534*0a6a1f1dSLionel Sambuc /* we're currently re-reading tokens */
535*0a6a1f1dSLionel Sambuc yylval = *yylvp++;
536*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
537*0a6a1f1dSLionel Sambuc yylloc = *yylpp++;
538*0a6a1f1dSLionel Sambuc #endif
539*0a6a1f1dSLionel Sambuc yychar = *yylexp++;
540*0a6a1f1dSLionel Sambuc break;
541*0a6a1f1dSLionel Sambuc }
542*0a6a1f1dSLionel Sambuc if (yyps->save)
543*0a6a1f1dSLionel Sambuc {
544*0a6a1f1dSLionel Sambuc /* in trial mode; save scanner results for future parse attempts */
545*0a6a1f1dSLionel Sambuc if (yylvp == yylvlim)
546*0a6a1f1dSLionel Sambuc { /* Enlarge lexical value queue */
547*0a6a1f1dSLionel Sambuc size_t p = (size_t) (yylvp - yylvals);
548*0a6a1f1dSLionel Sambuc size_t s = (size_t) (yylvlim - yylvals);
549*0a6a1f1dSLionel Sambuc
550*0a6a1f1dSLionel Sambuc s += YYLVQUEUEGROWTH;
551*0a6a1f1dSLionel Sambuc if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
552*0a6a1f1dSLionel Sambuc if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
553*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
554*0a6a1f1dSLionel Sambuc if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
555*0a6a1f1dSLionel Sambuc #endif
556*0a6a1f1dSLionel Sambuc yylvp = yylve = yylvals + p;
557*0a6a1f1dSLionel Sambuc yylvlim = yylvals + s;
558*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
559*0a6a1f1dSLionel Sambuc yylpp = yylpe = yylpsns + p;
560*0a6a1f1dSLionel Sambuc yylplim = yylpsns + s;
561*0a6a1f1dSLionel Sambuc #endif
562*0a6a1f1dSLionel Sambuc yylexp = yylexemes + p;
563*0a6a1f1dSLionel Sambuc }
564*0a6a1f1dSLionel Sambuc *yylexp = (short) YYLEX;
565*0a6a1f1dSLionel Sambuc *yylvp++ = yylval;
566*0a6a1f1dSLionel Sambuc yylve++;
567*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
568*0a6a1f1dSLionel Sambuc *yylpp++ = yylloc;
569*0a6a1f1dSLionel Sambuc yylpe++;
570*0a6a1f1dSLionel Sambuc #endif
571*0a6a1f1dSLionel Sambuc yychar = *yylexp++;
572*0a6a1f1dSLionel Sambuc break;
573*0a6a1f1dSLionel Sambuc }
574*0a6a1f1dSLionel Sambuc /* normal operation, no conflict encountered */
575*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
576*0a6a1f1dSLionel Sambuc yychar = YYLEX;
577*0a6a1f1dSLionel Sambuc #if YYBTYACC
578*0a6a1f1dSLionel Sambuc } while (0);
579*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
580*0a6a1f1dSLionel Sambuc if (yychar < 0) yychar = YYEOF;
581*0a6a1f1dSLionel Sambuc /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */
582*0a6a1f1dSLionel Sambuc #if YYDEBUG
583*0a6a1f1dSLionel Sambuc if (yydebug)
584*0a6a1f1dSLionel Sambuc {
585*0a6a1f1dSLionel Sambuc yys = yyname[YYTRANSLATE(yychar)];
586*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)",
587*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate, yychar, yys);
588*0a6a1f1dSLionel Sambuc #ifdef YYSTYPE_TOSTRING
589*0a6a1f1dSLionel Sambuc #if YYBTYACC
590*0a6a1f1dSLionel Sambuc if (!yytrial)
591*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
592*0a6a1f1dSLionel Sambuc fprintf(stderr, " <%s>", YYSTYPE_TOSTRING(yychar, yylval));
593*0a6a1f1dSLionel Sambuc #endif
594*0a6a1f1dSLionel Sambuc fputc('\n', stderr);
595*0a6a1f1dSLionel Sambuc }
596*0a6a1f1dSLionel Sambuc #endif
597*0a6a1f1dSLionel Sambuc }
598*0a6a1f1dSLionel Sambuc #if YYBTYACC
599*0a6a1f1dSLionel Sambuc
600*0a6a1f1dSLionel Sambuc /* Do we have a conflict? */
601*0a6a1f1dSLionel Sambuc if (((yyn = yycindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
602*0a6a1f1dSLionel Sambuc yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
603*0a6a1f1dSLionel Sambuc {
604*0a6a1f1dSLionel Sambuc YYINT ctry;
605*0a6a1f1dSLionel Sambuc
606*0a6a1f1dSLionel Sambuc if (yypath)
607*0a6a1f1dSLionel Sambuc {
608*0a6a1f1dSLionel Sambuc YYParseState *save;
609*0a6a1f1dSLionel Sambuc #if YYDEBUG
610*0a6a1f1dSLionel Sambuc if (yydebug)
611*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: CONFLICT in state %d: following successful trial parse\n",
612*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate);
613*0a6a1f1dSLionel Sambuc #endif
614*0a6a1f1dSLionel Sambuc /* Switch to the next conflict context */
615*0a6a1f1dSLionel Sambuc save = yypath;
616*0a6a1f1dSLionel Sambuc yypath = save->save;
617*0a6a1f1dSLionel Sambuc save->save = NULL;
618*0a6a1f1dSLionel Sambuc ctry = save->ctry;
619*0a6a1f1dSLionel Sambuc if (save->state != yystate) YYABORT;
620*0a6a1f1dSLionel Sambuc yyFreeState(save);
621*0a6a1f1dSLionel Sambuc
622*0a6a1f1dSLionel Sambuc }
623*0a6a1f1dSLionel Sambuc else
624*0a6a1f1dSLionel Sambuc {
625*0a6a1f1dSLionel Sambuc
626*0a6a1f1dSLionel Sambuc /* Unresolved conflict - start/continue trial parse */
627*0a6a1f1dSLionel Sambuc YYParseState *save;
628*0a6a1f1dSLionel Sambuc #if YYDEBUG
629*0a6a1f1dSLionel Sambuc if (yydebug)
630*0a6a1f1dSLionel Sambuc {
631*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: CONFLICT in state %d. ", YYDEBUGSTR, yydepth, yystate);
632*0a6a1f1dSLionel Sambuc if (yyps->save)
633*0a6a1f1dSLionel Sambuc fputs("ALREADY in conflict, continuing trial parse.\n", stderr);
634*0a6a1f1dSLionel Sambuc else
635*0a6a1f1dSLionel Sambuc fputs("Starting trial parse.\n", stderr);
636*0a6a1f1dSLionel Sambuc }
637*0a6a1f1dSLionel Sambuc #endif
638*0a6a1f1dSLionel Sambuc save = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
639*0a6a1f1dSLionel Sambuc if (save == NULL) goto yyenomem;
640*0a6a1f1dSLionel Sambuc save->save = yyps->save;
641*0a6a1f1dSLionel Sambuc save->state = yystate;
642*0a6a1f1dSLionel Sambuc save->errflag = yyerrflag;
643*0a6a1f1dSLionel Sambuc save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);
644*0a6a1f1dSLionel Sambuc memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
645*0a6a1f1dSLionel Sambuc save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);
646*0a6a1f1dSLionel Sambuc memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
647*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
648*0a6a1f1dSLionel Sambuc save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base);
649*0a6a1f1dSLionel Sambuc memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
650*0a6a1f1dSLionel Sambuc #endif
651*0a6a1f1dSLionel Sambuc ctry = yytable[yyn];
652*0a6a1f1dSLionel Sambuc if (yyctable[ctry] == -1)
653*0a6a1f1dSLionel Sambuc {
654*0a6a1f1dSLionel Sambuc #if YYDEBUG
655*0a6a1f1dSLionel Sambuc if (yydebug && yychar >= YYEOF)
656*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: backtracking 1 token\n", YYDEBUGSTR, yydepth);
657*0a6a1f1dSLionel Sambuc #endif
658*0a6a1f1dSLionel Sambuc ctry++;
659*0a6a1f1dSLionel Sambuc }
660*0a6a1f1dSLionel Sambuc save->ctry = ctry;
661*0a6a1f1dSLionel Sambuc if (yyps->save == NULL)
662*0a6a1f1dSLionel Sambuc {
663*0a6a1f1dSLionel Sambuc /* If this is a first conflict in the stack, start saving lexemes */
664*0a6a1f1dSLionel Sambuc if (!yylexemes)
665*0a6a1f1dSLionel Sambuc {
666*0a6a1f1dSLionel Sambuc yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
667*0a6a1f1dSLionel Sambuc if (yylexemes == NULL) goto yyenomem;
668*0a6a1f1dSLionel Sambuc yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
669*0a6a1f1dSLionel Sambuc if (yylvals == NULL) goto yyenomem;
670*0a6a1f1dSLionel Sambuc yylvlim = yylvals + YYLVQUEUEGROWTH;
671*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
672*0a6a1f1dSLionel Sambuc yylpsns = (YYLTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYLTYPE));
673*0a6a1f1dSLionel Sambuc if (yylpsns == NULL) goto yyenomem;
674*0a6a1f1dSLionel Sambuc yylplim = yylpsns + YYLVQUEUEGROWTH;
675*0a6a1f1dSLionel Sambuc #endif
676*0a6a1f1dSLionel Sambuc }
677*0a6a1f1dSLionel Sambuc if (yylvp == yylve)
678*0a6a1f1dSLionel Sambuc {
679*0a6a1f1dSLionel Sambuc yylvp = yylve = yylvals;
680*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
681*0a6a1f1dSLionel Sambuc yylpp = yylpe = yylpsns;
682*0a6a1f1dSLionel Sambuc #endif
683*0a6a1f1dSLionel Sambuc yylexp = yylexemes;
684*0a6a1f1dSLionel Sambuc if (yychar >= YYEOF)
685*0a6a1f1dSLionel Sambuc {
686*0a6a1f1dSLionel Sambuc *yylve++ = yylval;
687*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
688*0a6a1f1dSLionel Sambuc *yylpe++ = yylloc;
689*0a6a1f1dSLionel Sambuc #endif
690*0a6a1f1dSLionel Sambuc *yylexp = (short) yychar;
691*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
692*0a6a1f1dSLionel Sambuc }
693*0a6a1f1dSLionel Sambuc }
694*0a6a1f1dSLionel Sambuc }
695*0a6a1f1dSLionel Sambuc if (yychar >= YYEOF)
696*0a6a1f1dSLionel Sambuc {
697*0a6a1f1dSLionel Sambuc yylvp--;
698*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
699*0a6a1f1dSLionel Sambuc yylpp--;
700*0a6a1f1dSLionel Sambuc #endif
701*0a6a1f1dSLionel Sambuc yylexp--;
702*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
703*0a6a1f1dSLionel Sambuc }
704*0a6a1f1dSLionel Sambuc save->lexeme = (int) (yylvp - yylvals);
705*0a6a1f1dSLionel Sambuc yyps->save = save;
706*0a6a1f1dSLionel Sambuc }
707*0a6a1f1dSLionel Sambuc if (yytable[yyn] == ctry)
708*0a6a1f1dSLionel Sambuc {
709*0a6a1f1dSLionel Sambuc #if YYDEBUG
710*0a6a1f1dSLionel Sambuc if (yydebug)
711*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
712*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate, yyctable[ctry]);
713*0a6a1f1dSLionel Sambuc #endif
714*0a6a1f1dSLionel Sambuc if (yychar < 0)
715*0a6a1f1dSLionel Sambuc {
716*0a6a1f1dSLionel Sambuc yylvp++;
717*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
718*0a6a1f1dSLionel Sambuc yylpp++;
719*0a6a1f1dSLionel Sambuc #endif
720*0a6a1f1dSLionel Sambuc yylexp++;
721*0a6a1f1dSLionel Sambuc }
722*0a6a1f1dSLionel Sambuc if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
723*0a6a1f1dSLionel Sambuc goto yyoverflow;
724*0a6a1f1dSLionel Sambuc yystate = yyctable[ctry];
725*0a6a1f1dSLionel Sambuc *++yystack.s_mark = (short) yystate;
726*0a6a1f1dSLionel Sambuc *++yystack.l_mark = yylval;
727*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
728*0a6a1f1dSLionel Sambuc *++yystack.p_mark = yylloc;
729*0a6a1f1dSLionel Sambuc #endif
730*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
731*0a6a1f1dSLionel Sambuc if (yyerrflag > 0) --yyerrflag;
732*0a6a1f1dSLionel Sambuc goto yyloop;
733*0a6a1f1dSLionel Sambuc }
734*0a6a1f1dSLionel Sambuc else
735*0a6a1f1dSLionel Sambuc {
736*0a6a1f1dSLionel Sambuc yyn = yyctable[ctry];
737*0a6a1f1dSLionel Sambuc goto yyreduce;
738*0a6a1f1dSLionel Sambuc }
739*0a6a1f1dSLionel Sambuc } /* End of code dealing with conflicts */
740*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
741*0a6a1f1dSLionel Sambuc if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
742*0a6a1f1dSLionel Sambuc yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
743*0a6a1f1dSLionel Sambuc {
744*0a6a1f1dSLionel Sambuc #if YYDEBUG
745*0a6a1f1dSLionel Sambuc if (yydebug)
746*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
747*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate, yytable[yyn]);
748*0a6a1f1dSLionel Sambuc #endif
749*0a6a1f1dSLionel Sambuc if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
750*0a6a1f1dSLionel Sambuc yystate = yytable[yyn];
751*0a6a1f1dSLionel Sambuc *++yystack.s_mark = yytable[yyn];
752*0a6a1f1dSLionel Sambuc *++yystack.l_mark = yylval;
753*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
754*0a6a1f1dSLionel Sambuc *++yystack.p_mark = yylloc;
755*0a6a1f1dSLionel Sambuc #endif
756*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
757*0a6a1f1dSLionel Sambuc if (yyerrflag > 0) --yyerrflag;
758*0a6a1f1dSLionel Sambuc goto yyloop;
759*0a6a1f1dSLionel Sambuc }
760*0a6a1f1dSLionel Sambuc if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
761*0a6a1f1dSLionel Sambuc yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
762*0a6a1f1dSLionel Sambuc {
763*0a6a1f1dSLionel Sambuc yyn = yytable[yyn];
764*0a6a1f1dSLionel Sambuc goto yyreduce;
765*0a6a1f1dSLionel Sambuc }
766*0a6a1f1dSLionel Sambuc if (yyerrflag != 0) goto yyinrecovery;
767*0a6a1f1dSLionel Sambuc #if YYBTYACC
768*0a6a1f1dSLionel Sambuc
769*0a6a1f1dSLionel Sambuc yynewerrflag = 1;
770*0a6a1f1dSLionel Sambuc goto yyerrhandler;
771*0a6a1f1dSLionel Sambuc goto yyerrlab;
772*0a6a1f1dSLionel Sambuc
773*0a6a1f1dSLionel Sambuc yyerrlab:
774*0a6a1f1dSLionel Sambuc yynewerrflag = 0;
775*0a6a1f1dSLionel Sambuc yyerrhandler:
776*0a6a1f1dSLionel Sambuc while (yyps->save)
777*0a6a1f1dSLionel Sambuc {
778*0a6a1f1dSLionel Sambuc int ctry;
779*0a6a1f1dSLionel Sambuc YYParseState *save = yyps->save;
780*0a6a1f1dSLionel Sambuc #if YYDEBUG
781*0a6a1f1dSLionel Sambuc if (yydebug)
782*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: ERROR in state %d, CONFLICT BACKTRACKING to state %d, %d tokens\n",
783*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate, yyps->save->state,
784*0a6a1f1dSLionel Sambuc (int)(yylvp - yylvals - yyps->save->lexeme));
785*0a6a1f1dSLionel Sambuc #endif
786*0a6a1f1dSLionel Sambuc /* Memorize most forward-looking error state in case it's really an error. */
787*0a6a1f1dSLionel Sambuc if (yyerrctx == NULL || yyerrctx->lexeme < yylvp - yylvals)
788*0a6a1f1dSLionel Sambuc {
789*0a6a1f1dSLionel Sambuc /* Free old saved error context state */
790*0a6a1f1dSLionel Sambuc if (yyerrctx) yyFreeState(yyerrctx);
791*0a6a1f1dSLionel Sambuc /* Create and fill out new saved error context state */
792*0a6a1f1dSLionel Sambuc yyerrctx = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
793*0a6a1f1dSLionel Sambuc if (yyerrctx == NULL) goto yyenomem;
794*0a6a1f1dSLionel Sambuc yyerrctx->save = yyps->save;
795*0a6a1f1dSLionel Sambuc yyerrctx->state = yystate;
796*0a6a1f1dSLionel Sambuc yyerrctx->errflag = yyerrflag;
797*0a6a1f1dSLionel Sambuc yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);
798*0a6a1f1dSLionel Sambuc memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
799*0a6a1f1dSLionel Sambuc yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);
800*0a6a1f1dSLionel Sambuc memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
801*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
802*0a6a1f1dSLionel Sambuc yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);
803*0a6a1f1dSLionel Sambuc memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
804*0a6a1f1dSLionel Sambuc #endif
805*0a6a1f1dSLionel Sambuc yyerrctx->lexeme = (int) (yylvp - yylvals);
806*0a6a1f1dSLionel Sambuc }
807*0a6a1f1dSLionel Sambuc yylvp = yylvals + save->lexeme;
808*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
809*0a6a1f1dSLionel Sambuc yylpp = yylpsns + save->lexeme;
810*0a6a1f1dSLionel Sambuc #endif
811*0a6a1f1dSLionel Sambuc yylexp = yylexemes + save->lexeme;
812*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
813*0a6a1f1dSLionel Sambuc yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);
814*0a6a1f1dSLionel Sambuc memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
815*0a6a1f1dSLionel Sambuc yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);
816*0a6a1f1dSLionel Sambuc memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
817*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
818*0a6a1f1dSLionel Sambuc yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);
819*0a6a1f1dSLionel Sambuc memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
820*0a6a1f1dSLionel Sambuc #endif
821*0a6a1f1dSLionel Sambuc ctry = ++save->ctry;
822*0a6a1f1dSLionel Sambuc yystate = save->state;
823*0a6a1f1dSLionel Sambuc /* We tried shift, try reduce now */
824*0a6a1f1dSLionel Sambuc if ((yyn = yyctable[ctry]) >= 0) goto yyreduce;
825*0a6a1f1dSLionel Sambuc yyps->save = save->save;
826*0a6a1f1dSLionel Sambuc save->save = NULL;
827*0a6a1f1dSLionel Sambuc yyFreeState(save);
828*0a6a1f1dSLionel Sambuc
829*0a6a1f1dSLionel Sambuc /* Nothing left on the stack -- error */
830*0a6a1f1dSLionel Sambuc if (!yyps->save)
831*0a6a1f1dSLionel Sambuc {
832*0a6a1f1dSLionel Sambuc #if YYDEBUG
833*0a6a1f1dSLionel Sambuc if (yydebug)
834*0a6a1f1dSLionel Sambuc fprintf(stderr, "%sdebug[%d,trial]: trial parse FAILED, entering ERROR mode\n",
835*0a6a1f1dSLionel Sambuc YYPREFIX, yydepth);
836*0a6a1f1dSLionel Sambuc #endif
837*0a6a1f1dSLionel Sambuc /* Restore state as it was in the most forward-advanced error */
838*0a6a1f1dSLionel Sambuc yylvp = yylvals + yyerrctx->lexeme;
839*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
840*0a6a1f1dSLionel Sambuc yylpp = yylpsns + yyerrctx->lexeme;
841*0a6a1f1dSLionel Sambuc #endif
842*0a6a1f1dSLionel Sambuc yylexp = yylexemes + yyerrctx->lexeme;
843*0a6a1f1dSLionel Sambuc yychar = yylexp[-1];
844*0a6a1f1dSLionel Sambuc yylval = yylvp[-1];
845*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
846*0a6a1f1dSLionel Sambuc yylloc = yylpp[-1];
847*0a6a1f1dSLionel Sambuc #endif
848*0a6a1f1dSLionel Sambuc yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);
849*0a6a1f1dSLionel Sambuc memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
850*0a6a1f1dSLionel Sambuc yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);
851*0a6a1f1dSLionel Sambuc memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
852*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
853*0a6a1f1dSLionel Sambuc yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);
854*0a6a1f1dSLionel Sambuc memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
855*0a6a1f1dSLionel Sambuc #endif
856*0a6a1f1dSLionel Sambuc yystate = yyerrctx->state;
857*0a6a1f1dSLionel Sambuc yyFreeState(yyerrctx);
858*0a6a1f1dSLionel Sambuc yyerrctx = NULL;
859*0a6a1f1dSLionel Sambuc }
860*0a6a1f1dSLionel Sambuc yynewerrflag = 1;
861*0a6a1f1dSLionel Sambuc }
862*0a6a1f1dSLionel Sambuc if (yynewerrflag == 0) goto yyinrecovery;
863*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
864*0a6a1f1dSLionel Sambuc
865*0a6a1f1dSLionel Sambuc YYERROR_CALL("syntax error");
866*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
867*0a6a1f1dSLionel Sambuc yyerror_loc_range[0] = yylloc; /* lookahead position is error start position */
868*0a6a1f1dSLionel Sambuc #endif
869*0a6a1f1dSLionel Sambuc
870*0a6a1f1dSLionel Sambuc #if !YYBTYACC
871*0a6a1f1dSLionel Sambuc goto yyerrlab;
872*0a6a1f1dSLionel Sambuc yyerrlab:
873*0a6a1f1dSLionel Sambuc #endif
874*0a6a1f1dSLionel Sambuc ++yynerrs;
875*0a6a1f1dSLionel Sambuc
876*0a6a1f1dSLionel Sambuc yyinrecovery:
877*0a6a1f1dSLionel Sambuc if (yyerrflag < 3)
878*0a6a1f1dSLionel Sambuc {
879*0a6a1f1dSLionel Sambuc yyerrflag = 3;
880*0a6a1f1dSLionel Sambuc for (;;)
881*0a6a1f1dSLionel Sambuc {
882*0a6a1f1dSLionel Sambuc if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
883*0a6a1f1dSLionel Sambuc yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
884*0a6a1f1dSLionel Sambuc {
885*0a6a1f1dSLionel Sambuc #if YYDEBUG
886*0a6a1f1dSLionel Sambuc if (yydebug)
887*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, error recovery shifting to state %d\n",
888*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, *yystack.s_mark, yytable[yyn]);
889*0a6a1f1dSLionel Sambuc #endif
890*0a6a1f1dSLionel Sambuc if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
891*0a6a1f1dSLionel Sambuc yystate = yytable[yyn];
892*0a6a1f1dSLionel Sambuc *++yystack.s_mark = yytable[yyn];
893*0a6a1f1dSLionel Sambuc *++yystack.l_mark = yylval;
894*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
895*0a6a1f1dSLionel Sambuc /* lookahead position is error end position */
896*0a6a1f1dSLionel Sambuc yyerror_loc_range[1] = yylloc;
897*0a6a1f1dSLionel Sambuc YYLLOC_DEFAULT(yyloc, yyerror_loc_range, 2); /* position of error span */
898*0a6a1f1dSLionel Sambuc *++yystack.p_mark = yyloc;
899*0a6a1f1dSLionel Sambuc #endif
900*0a6a1f1dSLionel Sambuc goto yyloop;
901*0a6a1f1dSLionel Sambuc }
902*0a6a1f1dSLionel Sambuc else
903*0a6a1f1dSLionel Sambuc {
904*0a6a1f1dSLionel Sambuc #if YYDEBUG
905*0a6a1f1dSLionel Sambuc if (yydebug)
906*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: error recovery discarding state %d\n",
907*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, *yystack.s_mark);
908*0a6a1f1dSLionel Sambuc #endif
909*0a6a1f1dSLionel Sambuc if (yystack.s_mark <= yystack.s_base) goto yyabort;
910*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
911*0a6a1f1dSLionel Sambuc /* the current TOS position is the error start position */
912*0a6a1f1dSLionel Sambuc yyerror_loc_range[0] = *yystack.p_mark;
913*0a6a1f1dSLionel Sambuc #endif
914*0a6a1f1dSLionel Sambuc #if defined(YYDESTRUCT_CALL)
915*0a6a1f1dSLionel Sambuc #if YYBTYACC
916*0a6a1f1dSLionel Sambuc if (!yytrial)
917*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
918*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
919*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("error: discarding state",
920*0a6a1f1dSLionel Sambuc yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);
921*0a6a1f1dSLionel Sambuc #else
922*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("error: discarding state",
923*0a6a1f1dSLionel Sambuc yystos[*yystack.s_mark], yystack.l_mark);
924*0a6a1f1dSLionel Sambuc #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
925*0a6a1f1dSLionel Sambuc #endif /* defined(YYDESTRUCT_CALL) */
926*0a6a1f1dSLionel Sambuc --yystack.s_mark;
927*0a6a1f1dSLionel Sambuc --yystack.l_mark;
928*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
929*0a6a1f1dSLionel Sambuc --yystack.p_mark;
930*0a6a1f1dSLionel Sambuc #endif
931*0a6a1f1dSLionel Sambuc }
932*0a6a1f1dSLionel Sambuc }
933*0a6a1f1dSLionel Sambuc }
934*0a6a1f1dSLionel Sambuc else
935*0a6a1f1dSLionel Sambuc {
936*0a6a1f1dSLionel Sambuc if (yychar == YYEOF) goto yyabort;
937*0a6a1f1dSLionel Sambuc #if YYDEBUG
938*0a6a1f1dSLionel Sambuc if (yydebug)
939*0a6a1f1dSLionel Sambuc {
940*0a6a1f1dSLionel Sambuc yys = yyname[YYTRANSLATE(yychar)];
941*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, error recovery discarding token %d (%s)\n",
942*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate, yychar, yys);
943*0a6a1f1dSLionel Sambuc }
944*0a6a1f1dSLionel Sambuc #endif
945*0a6a1f1dSLionel Sambuc #if defined(YYDESTRUCT_CALL)
946*0a6a1f1dSLionel Sambuc #if YYBTYACC
947*0a6a1f1dSLionel Sambuc if (!yytrial)
948*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
949*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
950*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("error: discarding token", yychar, &yylval, &yylloc);
951*0a6a1f1dSLionel Sambuc #else
952*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("error: discarding token", yychar, &yylval);
953*0a6a1f1dSLionel Sambuc #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
954*0a6a1f1dSLionel Sambuc #endif /* defined(YYDESTRUCT_CALL) */
955*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
956*0a6a1f1dSLionel Sambuc goto yyloop;
957*0a6a1f1dSLionel Sambuc }
958*0a6a1f1dSLionel Sambuc
959*0a6a1f1dSLionel Sambuc yyreduce:
960*0a6a1f1dSLionel Sambuc yym = yylen[yyn];
961*0a6a1f1dSLionel Sambuc #if YYDEBUG
962*0a6a1f1dSLionel Sambuc if (yydebug)
963*0a6a1f1dSLionel Sambuc {
964*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, reducing by rule %d (%s)",
965*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate, yyn, yyrule[yyn]);
966*0a6a1f1dSLionel Sambuc #ifdef YYSTYPE_TOSTRING
967*0a6a1f1dSLionel Sambuc #if YYBTYACC
968*0a6a1f1dSLionel Sambuc if (!yytrial)
969*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
970*0a6a1f1dSLionel Sambuc if (yym > 0)
971*0a6a1f1dSLionel Sambuc {
972*0a6a1f1dSLionel Sambuc int i;
973*0a6a1f1dSLionel Sambuc fputc('<', stderr);
974*0a6a1f1dSLionel Sambuc for (i = yym; i > 0; i--)
975*0a6a1f1dSLionel Sambuc {
976*0a6a1f1dSLionel Sambuc if (i != yym) fputs(", ", stderr);
977*0a6a1f1dSLionel Sambuc fputs(YYSTYPE_TOSTRING(yystos[yystack.s_mark[1-i]],
978*0a6a1f1dSLionel Sambuc yystack.l_mark[1-i]), stderr);
979*0a6a1f1dSLionel Sambuc }
980*0a6a1f1dSLionel Sambuc fputc('>', stderr);
981*0a6a1f1dSLionel Sambuc }
982*0a6a1f1dSLionel Sambuc #endif
983*0a6a1f1dSLionel Sambuc fputc('\n', stderr);
984*0a6a1f1dSLionel Sambuc }
985*0a6a1f1dSLionel Sambuc #endif
986*0a6a1f1dSLionel Sambuc if (yym > 0)
987*0a6a1f1dSLionel Sambuc yyval = yystack.l_mark[1-yym];
988*0a6a1f1dSLionel Sambuc else
989*0a6a1f1dSLionel Sambuc memset(&yyval, 0, sizeof yyval);
990*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
991*0a6a1f1dSLionel Sambuc
992*0a6a1f1dSLionel Sambuc /* Perform position reduction */
993*0a6a1f1dSLionel Sambuc memset(&yyloc, 0, sizeof(yyloc));
994*0a6a1f1dSLionel Sambuc #if YYBTYACC
995*0a6a1f1dSLionel Sambuc if (!yytrial)
996*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
997*0a6a1f1dSLionel Sambuc {
998*0a6a1f1dSLionel Sambuc YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);
999*0a6a1f1dSLionel Sambuc /* just in case YYERROR is invoked within the action, save
1000*0a6a1f1dSLionel Sambuc the start of the rhs as the error start position */
1001*0a6a1f1dSLionel Sambuc yyerror_loc_range[0] = yystack.p_mark[1-yym];
1002*0a6a1f1dSLionel Sambuc }
1003*0a6a1f1dSLionel Sambuc #endif
1004*0a6a1f1dSLionel Sambuc
1005*0a6a1f1dSLionel Sambuc switch (yyn)
1006*0a6a1f1dSLionel Sambuc {
1007*0a6a1f1dSLionel Sambuc default:
1008*0a6a1f1dSLionel Sambuc break;
1009*0a6a1f1dSLionel Sambuc }
1010*0a6a1f1dSLionel Sambuc yystack.s_mark -= yym;
1011*0a6a1f1dSLionel Sambuc yystate = *yystack.s_mark;
1012*0a6a1f1dSLionel Sambuc yystack.l_mark -= yym;
1013*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1014*0a6a1f1dSLionel Sambuc yystack.p_mark -= yym;
1015*0a6a1f1dSLionel Sambuc #endif
1016*0a6a1f1dSLionel Sambuc yym = yylhs[yyn];
1017*0a6a1f1dSLionel Sambuc if (yystate == 0 && yym == 0)
1018*0a6a1f1dSLionel Sambuc {
1019*0a6a1f1dSLionel Sambuc #if YYDEBUG
1020*0a6a1f1dSLionel Sambuc if (yydebug)
1021*0a6a1f1dSLionel Sambuc {
1022*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
1023*0a6a1f1dSLionel Sambuc #ifdef YYSTYPE_TOSTRING
1024*0a6a1f1dSLionel Sambuc #if YYBTYACC
1025*0a6a1f1dSLionel Sambuc if (!yytrial)
1026*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1027*0a6a1f1dSLionel Sambuc fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));
1028*0a6a1f1dSLionel Sambuc #endif
1029*0a6a1f1dSLionel Sambuc fprintf(stderr, "shifting from state 0 to final state %d\n", YYFINAL);
1030*0a6a1f1dSLionel Sambuc }
1031*0a6a1f1dSLionel Sambuc #endif
1032*0a6a1f1dSLionel Sambuc yystate = YYFINAL;
1033*0a6a1f1dSLionel Sambuc *++yystack.s_mark = YYFINAL;
1034*0a6a1f1dSLionel Sambuc *++yystack.l_mark = yyval;
1035*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1036*0a6a1f1dSLionel Sambuc *++yystack.p_mark = yyloc;
1037*0a6a1f1dSLionel Sambuc #endif
1038*0a6a1f1dSLionel Sambuc if (yychar < 0)
1039*0a6a1f1dSLionel Sambuc {
1040*0a6a1f1dSLionel Sambuc #if YYBTYACC
1041*0a6a1f1dSLionel Sambuc do {
1042*0a6a1f1dSLionel Sambuc if (yylvp < yylve)
1043*0a6a1f1dSLionel Sambuc {
1044*0a6a1f1dSLionel Sambuc /* we're currently re-reading tokens */
1045*0a6a1f1dSLionel Sambuc yylval = *yylvp++;
1046*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1047*0a6a1f1dSLionel Sambuc yylloc = *yylpp++;
1048*0a6a1f1dSLionel Sambuc #endif
1049*0a6a1f1dSLionel Sambuc yychar = *yylexp++;
1050*0a6a1f1dSLionel Sambuc break;
1051*0a6a1f1dSLionel Sambuc }
1052*0a6a1f1dSLionel Sambuc if (yyps->save)
1053*0a6a1f1dSLionel Sambuc {
1054*0a6a1f1dSLionel Sambuc /* in trial mode; save scanner results for future parse attempts */
1055*0a6a1f1dSLionel Sambuc if (yylvp == yylvlim)
1056*0a6a1f1dSLionel Sambuc { /* Enlarge lexical value queue */
1057*0a6a1f1dSLionel Sambuc size_t p = (size_t) (yylvp - yylvals);
1058*0a6a1f1dSLionel Sambuc size_t s = (size_t) (yylvlim - yylvals);
1059*0a6a1f1dSLionel Sambuc
1060*0a6a1f1dSLionel Sambuc s += YYLVQUEUEGROWTH;
1061*0a6a1f1dSLionel Sambuc if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
1062*0a6a1f1dSLionel Sambuc goto yyenomem;
1063*0a6a1f1dSLionel Sambuc if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
1064*0a6a1f1dSLionel Sambuc goto yyenomem;
1065*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1066*0a6a1f1dSLionel Sambuc if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
1067*0a6a1f1dSLionel Sambuc goto yyenomem;
1068*0a6a1f1dSLionel Sambuc #endif
1069*0a6a1f1dSLionel Sambuc yylvp = yylve = yylvals + p;
1070*0a6a1f1dSLionel Sambuc yylvlim = yylvals + s;
1071*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1072*0a6a1f1dSLionel Sambuc yylpp = yylpe = yylpsns + p;
1073*0a6a1f1dSLionel Sambuc yylplim = yylpsns + s;
1074*0a6a1f1dSLionel Sambuc #endif
1075*0a6a1f1dSLionel Sambuc yylexp = yylexemes + p;
1076*0a6a1f1dSLionel Sambuc }
1077*0a6a1f1dSLionel Sambuc *yylexp = (short) YYLEX;
1078*0a6a1f1dSLionel Sambuc *yylvp++ = yylval;
1079*0a6a1f1dSLionel Sambuc yylve++;
1080*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1081*0a6a1f1dSLionel Sambuc *yylpp++ = yylloc;
1082*0a6a1f1dSLionel Sambuc yylpe++;
1083*0a6a1f1dSLionel Sambuc #endif
1084*0a6a1f1dSLionel Sambuc yychar = *yylexp++;
1085*0a6a1f1dSLionel Sambuc break;
1086*0a6a1f1dSLionel Sambuc }
1087*0a6a1f1dSLionel Sambuc /* normal operation, no conflict encountered */
1088*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1089*0a6a1f1dSLionel Sambuc yychar = YYLEX;
1090*0a6a1f1dSLionel Sambuc #if YYBTYACC
1091*0a6a1f1dSLionel Sambuc } while (0);
1092*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1093*0a6a1f1dSLionel Sambuc if (yychar < 0) yychar = YYEOF;
1094*0a6a1f1dSLionel Sambuc /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */
1095*0a6a1f1dSLionel Sambuc #if YYDEBUG
1096*0a6a1f1dSLionel Sambuc if (yydebug)
1097*0a6a1f1dSLionel Sambuc {
1098*0a6a1f1dSLionel Sambuc yys = yyname[YYTRANSLATE(yychar)];
1099*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, reading %d (%s)\n",
1100*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);
1101*0a6a1f1dSLionel Sambuc }
1102*0a6a1f1dSLionel Sambuc #endif
1103*0a6a1f1dSLionel Sambuc }
1104*0a6a1f1dSLionel Sambuc if (yychar == YYEOF) goto yyaccept;
1105*0a6a1f1dSLionel Sambuc goto yyloop;
1106*0a6a1f1dSLionel Sambuc }
1107*0a6a1f1dSLionel Sambuc if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
1108*0a6a1f1dSLionel Sambuc yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
1109*0a6a1f1dSLionel Sambuc yystate = yytable[yyn];
1110*0a6a1f1dSLionel Sambuc else
1111*0a6a1f1dSLionel Sambuc yystate = yydgoto[yym];
1112*0a6a1f1dSLionel Sambuc #if YYDEBUG
1113*0a6a1f1dSLionel Sambuc if (yydebug)
1114*0a6a1f1dSLionel Sambuc {
1115*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
1116*0a6a1f1dSLionel Sambuc #ifdef YYSTYPE_TOSTRING
1117*0a6a1f1dSLionel Sambuc #if YYBTYACC
1118*0a6a1f1dSLionel Sambuc if (!yytrial)
1119*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1120*0a6a1f1dSLionel Sambuc fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[yystate], yyval));
1121*0a6a1f1dSLionel Sambuc #endif
1122*0a6a1f1dSLionel Sambuc fprintf(stderr, "shifting from state %d to state %d\n", *yystack.s_mark, yystate);
1123*0a6a1f1dSLionel Sambuc }
1124*0a6a1f1dSLionel Sambuc #endif
1125*0a6a1f1dSLionel Sambuc if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
1126*0a6a1f1dSLionel Sambuc *++yystack.s_mark = (short) yystate;
1127*0a6a1f1dSLionel Sambuc *++yystack.l_mark = yyval;
1128*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1129*0a6a1f1dSLionel Sambuc *++yystack.p_mark = yyloc;
1130*0a6a1f1dSLionel Sambuc #endif
1131*0a6a1f1dSLionel Sambuc goto yyloop;
1132*0a6a1f1dSLionel Sambuc #if YYBTYACC
1133*0a6a1f1dSLionel Sambuc
1134*0a6a1f1dSLionel Sambuc /* Reduction declares that this path is valid. Set yypath and do a full parse */
1135*0a6a1f1dSLionel Sambuc yyvalid:
1136*0a6a1f1dSLionel Sambuc if (yypath) YYABORT;
1137*0a6a1f1dSLionel Sambuc while (yyps->save)
1138*0a6a1f1dSLionel Sambuc {
1139*0a6a1f1dSLionel Sambuc YYParseState *save = yyps->save;
1140*0a6a1f1dSLionel Sambuc yyps->save = save->save;
1141*0a6a1f1dSLionel Sambuc save->save = yypath;
1142*0a6a1f1dSLionel Sambuc yypath = save;
1143*0a6a1f1dSLionel Sambuc }
1144*0a6a1f1dSLionel Sambuc #if YYDEBUG
1145*0a6a1f1dSLionel Sambuc if (yydebug)
1146*0a6a1f1dSLionel Sambuc fprintf(stderr, "%s[%d]: state %d, CONFLICT trial successful, backtracking to state %d, %d tokens\n",
1147*0a6a1f1dSLionel Sambuc YYDEBUGSTR, yydepth, yystate, yypath->state, (int)(yylvp - yylvals - yypath->lexeme));
1148*0a6a1f1dSLionel Sambuc #endif
1149*0a6a1f1dSLionel Sambuc if (yyerrctx)
1150*0a6a1f1dSLionel Sambuc {
1151*0a6a1f1dSLionel Sambuc yyFreeState(yyerrctx);
1152*0a6a1f1dSLionel Sambuc yyerrctx = NULL;
1153*0a6a1f1dSLionel Sambuc }
1154*0a6a1f1dSLionel Sambuc yylvp = yylvals + yypath->lexeme;
1155*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1156*0a6a1f1dSLionel Sambuc yylpp = yylpsns + yypath->lexeme;
1157*0a6a1f1dSLionel Sambuc #endif
1158*0a6a1f1dSLionel Sambuc yylexp = yylexemes + yypath->lexeme;
1159*0a6a1f1dSLionel Sambuc yychar = YYEMPTY;
1160*0a6a1f1dSLionel Sambuc yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);
1161*0a6a1f1dSLionel Sambuc memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
1162*0a6a1f1dSLionel Sambuc yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);
1163*0a6a1f1dSLionel Sambuc memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
1164*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1165*0a6a1f1dSLionel Sambuc yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);
1166*0a6a1f1dSLionel Sambuc memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
1167*0a6a1f1dSLionel Sambuc #endif
1168*0a6a1f1dSLionel Sambuc yystate = yypath->state;
1169*0a6a1f1dSLionel Sambuc goto yyloop;
1170*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1171*0a6a1f1dSLionel Sambuc
1172*0a6a1f1dSLionel Sambuc yyoverflow:
1173*0a6a1f1dSLionel Sambuc YYERROR_CALL("yacc stack overflow");
1174*0a6a1f1dSLionel Sambuc #if YYBTYACC
1175*0a6a1f1dSLionel Sambuc goto yyabort_nomem;
1176*0a6a1f1dSLionel Sambuc yyenomem:
1177*0a6a1f1dSLionel Sambuc YYERROR_CALL("memory exhausted");
1178*0a6a1f1dSLionel Sambuc yyabort_nomem:
1179*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1180*0a6a1f1dSLionel Sambuc yyresult = 2;
1181*0a6a1f1dSLionel Sambuc goto yyreturn;
1182*0a6a1f1dSLionel Sambuc
1183*0a6a1f1dSLionel Sambuc yyabort:
1184*0a6a1f1dSLionel Sambuc yyresult = 1;
1185*0a6a1f1dSLionel Sambuc goto yyreturn;
1186*0a6a1f1dSLionel Sambuc
1187*0a6a1f1dSLionel Sambuc yyaccept:
1188*0a6a1f1dSLionel Sambuc #if YYBTYACC
1189*0a6a1f1dSLionel Sambuc if (yyps->save) goto yyvalid;
1190*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1191*0a6a1f1dSLionel Sambuc yyresult = 0;
1192*0a6a1f1dSLionel Sambuc
1193*0a6a1f1dSLionel Sambuc yyreturn:
1194*0a6a1f1dSLionel Sambuc #if defined(YYDESTRUCT_CALL)
1195*0a6a1f1dSLionel Sambuc if (yychar != YYEOF && yychar != YYEMPTY)
1196*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1197*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval, &yylloc);
1198*0a6a1f1dSLionel Sambuc #else
1199*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval);
1200*0a6a1f1dSLionel Sambuc #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
1201*0a6a1f1dSLionel Sambuc
1202*0a6a1f1dSLionel Sambuc {
1203*0a6a1f1dSLionel Sambuc YYSTYPE *pv;
1204*0a6a1f1dSLionel Sambuc #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1205*0a6a1f1dSLionel Sambuc YYLTYPE *pp;
1206*0a6a1f1dSLionel Sambuc
1207*0a6a1f1dSLionel Sambuc for (pv = yystack.l_base, pp = yystack.p_base; pv <= yystack.l_mark; ++pv, ++pp)
1208*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("cleanup: discarding state",
1209*0a6a1f1dSLionel Sambuc yystos[*(yystack.s_base + (pv - yystack.l_base))], pv, pp);
1210*0a6a1f1dSLionel Sambuc #else
1211*0a6a1f1dSLionel Sambuc for (pv = yystack.l_base; pv <= yystack.l_mark; ++pv)
1212*0a6a1f1dSLionel Sambuc YYDESTRUCT_CALL("cleanup: discarding state",
1213*0a6a1f1dSLionel Sambuc yystos[*(yystack.s_base + (pv - yystack.l_base))], pv);
1214*0a6a1f1dSLionel Sambuc #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
1215*0a6a1f1dSLionel Sambuc }
1216*0a6a1f1dSLionel Sambuc #endif /* defined(YYDESTRUCT_CALL) */
1217*0a6a1f1dSLionel Sambuc
1218*0a6a1f1dSLionel Sambuc #if YYBTYACC
1219*0a6a1f1dSLionel Sambuc if (yyerrctx)
1220*0a6a1f1dSLionel Sambuc {
1221*0a6a1f1dSLionel Sambuc yyFreeState(yyerrctx);
1222*0a6a1f1dSLionel Sambuc yyerrctx = NULL;
1223*0a6a1f1dSLionel Sambuc }
1224*0a6a1f1dSLionel Sambuc while (yyps)
1225*0a6a1f1dSLionel Sambuc {
1226*0a6a1f1dSLionel Sambuc YYParseState *save = yyps;
1227*0a6a1f1dSLionel Sambuc yyps = save->save;
1228*0a6a1f1dSLionel Sambuc save->save = NULL;
1229*0a6a1f1dSLionel Sambuc yyFreeState(save);
1230*0a6a1f1dSLionel Sambuc }
1231*0a6a1f1dSLionel Sambuc while (yypath)
1232*0a6a1f1dSLionel Sambuc {
1233*0a6a1f1dSLionel Sambuc YYParseState *save = yypath;
1234*0a6a1f1dSLionel Sambuc yypath = save->save;
1235*0a6a1f1dSLionel Sambuc save->save = NULL;
1236*0a6a1f1dSLionel Sambuc yyFreeState(save);
1237*0a6a1f1dSLionel Sambuc }
1238*0a6a1f1dSLionel Sambuc #endif /* YYBTYACC */
1239*0a6a1f1dSLionel Sambuc yyfreestack(&yystack);
1240*0a6a1f1dSLionel Sambuc return (yyresult);
1241*0a6a1f1dSLionel Sambuc }
1242