Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gdb/6.7.1: 10_all_gdb-6.6-duel.patch 11_all_gdb-6.6-duel-integrate.patch README.history
Date: Sun, 30 Dec 2007 20:13:40
Message-Id: E1J94XE-0006Vs-3H@stork.gentoo.org
1 vapier 07/12/30 20:13:24
2
3 Modified: 10_all_gdb-6.6-duel.patch
4 11_all_gdb-6.6-duel-integrate.patch README.history
5 Log:
6 cleanup duel build a little and fix patch
7
8 Revision Changes Path
9 1.2 src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch?rev=1.2&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch?rev=1.2&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch?r1=1.1&r2=1.2
14
15 Index: 10_all_gdb-6.6-duel.patch
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v
18 retrieving revision 1.1
19 retrieving revision 1.2
20 diff -u -r1.1 -r1.2
21 --- 10_all_gdb-6.6-duel.patch 29 Dec 2007 21:06:06 -0000 1.1
22 +++ 10_all_gdb-6.6-duel.patch 30 Dec 2007 20:13:23 -0000 1.2
23 @@ -1,5 +1,46 @@
24 +Add support for DUEL to gdb.
25 ftp://ftp.cs.princeton.edu/pub/duel/
26
27 +To make changes:
28 + - patch -p0 < gdb-duel.patch
29 + - cd gdb/duel
30 + - <make changes>
31 + - ./create-patch.sh
32 +
33 +Diffstat:
34 + duel/MANUAL | 501 +++++++
35 + duel/Makefile | 32
36 + duel/README | 57
37 + duel/WHATNEW | 38
38 + duel/create-patch.sh | 29
39 + duel/duel.1 | 547 ++++++++
40 + duel/duel.c | 685 ++++++++++
41 + duel/duel.h | 35
42 + duel/duel.pipe | 107 +
43 + duel/duelself.c | 212 +++
44 + duel/error.c | 115 +
45 + duel/eval.c | 835 ++++++++++++
46 + duel/evalops.c | 1276 +++++++++++++++++++
47 + duel/global.h | 453 ++++++
48 + duel/internals.doc | 129 +
49 + duel/misc.c | 145 ++
50 + duel/output.c | 53
51 + duel/output2.c | 141 ++
52 + duel/parse.c | 3329 +++++++++++++++++++++++++++++++++++++++++++++++++++
53 + duel/parse.y | 943 ++++++++++++++
54 + duel/patchlevel.h | 7
55 + duel/print.c | 302 ++++
56 + duel/proto.h | 101 +
57 + duel/tsuite.c | 64
58 + duel/tsuite.gdb | 126 +
59 + duel/tsuite.gdb.out | 293 ++++
60 + duel/tsuite.self | 111 +
61 + duel/tsuite.self.out | 263 ++++
62 + duel/types.c | 203 +++
63 + duel/wishlist.doc | 160 ++
64 + duelgdb.c | 696 ++++++++++
65 + 31 files changed, 11988 insertions(+)
66 +
67 --- gdb/duel/MANUAL
68 +++ gdb/duel/MANUAL
69 @@ -0,0 +1,501 @@
70 @@ -506,7 +547,7 @@
71 + Exotic Language. Judge for yourself!
72 --- gdb/duel/Makefile
73 +++ gdb/duel/Makefile
74 -@@ -0,0 +1,44 @@
75 +@@ -0,0 +1,32 @@
76 +#
77 +# generic makefile for Duel 1.10
78 +# nothing fancy is required: yacc/bison of parse.y, compile all other modules,
79 @@ -514,36 +555,24 @@
80 +# gdb is compiled with its own makefile (you add duel.a and duelgdb.c)
81 +# selfduel, for testing, is compiled and linked with duel.a
82 +
83 -+# NOTE:
84 -+# for sunOS4.x you must use gcc or another ANSI compiler. cc doesnt
85 -+# support prototypes!
86 -+# Also for sunOS4.x, yacc inserts a declaration of malloc() at the first line
87 -+# of y.tab.c, which is WRONG (return char*). just delete it.
88 -+
89 -+CFLAGS= -g
90 -+CC= cc # won't work on sunOS. need ANSI C prototypes support.
91 -+#CC= gcc
92 -+YACC=yacc
93 -+RANLIB=ranlib # for BSD-derived systems
94 -+
95 -+#CC = gcc -U__GNUC__ #ONLY if you get __eprintf undefined (assert.h problem)
96 -+#RANLIB=echo # for System V, there is no 'ranlib'
97 -+
98 -+OBJ= duel.o types.o eval.o misc.o y.tab.o error.o evalops.o print.o
99 -+
100 -+all: duel.a duelself
101 -+
102 -+duelself: duel.a duelself.o output.o
103 -+ $(CC) duelself.o duel.a output.o -o duelself
104 -+
105 -+duel.a: $(OBJ)
106 -+ ar ru duel.a $(OBJ)
107 -+ $(RANLIB) duel.a
108 ++AR ?= ar
109 ++RANLIB ?= ranlib
110 ++
111 ++OBJ = duel.o types.o eval.o misc.o parse.o error.o evalops.o print.o
112 ++
113 ++all: duel.a duelself
114 ++
115 ++duelself: duel.a output.o
116 ++
117 ++duel.a: $(OBJ)
118 ++ $(AR) rc $@ $^
119 ++ $(RANLIB) $@
120 ++
121 ++parse.c: parse.y
122 ++ bison -o $@ $^
123 +
124 -+y.tab.c: parse.y
125 -+ $(YACC) parse.y
126 +clean:
127 -+ rm -f $(OBJ) y.tab.c duelself.o duelself duel.a
128 ++ rm -f $(OBJ) y.tab.c parse.c duelself.o duelself duel.a
129 +
130 +install:
131 +
132 @@ -652,6 +681,38 @@
133 +What's new in version 1.02
134 +--------------------------
135 +a few bug fixed, improved portability, gdb4.8 support.
136 +--- gdb/duel/create-patch.sh
137 ++++ gdb/duel/create-patch.sh
138 +@@ -0,0 +1,29 @@
139 ++#!/bin/sh
140 ++
141 ++export LC_ALL=C # make sure order/sort is consistent
142 ++
143 ++make -s clean
144 ++make -s parse.c
145 ++
146 ++cd ../..
147 ++mkdir -p empty/gdb/duel
148 ++
149 ++diff -Nur empty/gdb gdb | sed 's:^--- empty/gdb:--- gdb:' > gdb-duel.patch.bulk
150 ++cat <<EOF > gdb-duel.patch
151 ++Add support for DUEL to gdb.
152 ++ftp://ftp.cs.princeton.edu/pub/duel/
153 ++
154 ++To make changes:
155 ++ - patch -p0 < gdb-duel.patch
156 ++ - cd gdb/duel
157 ++ - <make changes>
158 ++ - ./create-patch.sh
159 ++
160 ++Diffstat:
161 ++$(diffstat gdb-duel.patch.bulk)
162 ++
163 ++$(cat gdb-duel.patch.bulk)
164 ++EOF
165 ++rm -r gdb-duel.patch.bulk empty
166 ++
167 ++echo "updated patch now ready:" $(du -b gdb-duel.patch)
168 --- gdb/duel/duel.1
169 +++ gdb/duel/duel.1
170 @@ -0,0 +1,547 @@
171 @@ -1204,17 +1265,20 @@
172 +
173 --- gdb/duel/duel.c
174 +++ gdb/duel/duel.c
175 -@@ -0,0 +1,692 @@
176 +@@ -0,0 +1,685 @@
177 +/* DUEL - A Very High Level Debugging Langauge. */
178 +/* Public domain code */
179 +/* Written by Michael Golan mg@××××××××××××.edu */
180 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
181 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
182 +
183 +/* this module contains the entery point to duel - duel_eval_and_pasre.
184 + */
185 +
186 +/*
187 + * $Log: 10_all_gdb-6.6-duel.patch,v $
188 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
189 ++ * cleanup duel build a little and fix patch
190 ++ *
191 + * Revision 1.1 2007/12/29 21:06:06 vapier
192 + * add DUEL support #199987 by Sergei Golubchik
193 + *
194 @@ -1890,23 +1954,13 @@
195 + }
196 + duel_cleanup(0);
197 +}
198 -+
199 -+
200 -+
201 -+
202 -+
203 -+
204 -+
205 -+
206 -+
207 -+
208 --- gdb/duel/duel.h
209 +++ gdb/duel/duel.h
210 @@ -0,0 +1,35 @@
211 +/* DUEL - A Very High Level Debugging Langauge. */
212 +/* Public domain code */
213 +/* Written by Michael Golan mg@××××××××××××.edu */
214 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
215 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
216 +
217 +/* duel.h - include file to be used with all duel source code.
218 + * it defines important global constants & data types, as well as some
219 @@ -2050,11 +2104,11 @@
220 +}
221 --- gdb/duel/duelself.c
222 +++ gdb/duel/duelself.c
223 -@@ -0,0 +1,209 @@
224 +@@ -0,0 +1,212 @@
225 +/* DUEL - A Very High Level Debugging Langauge. */
226 +/* Public domain code */
227 +/* Written by Michael Golan mg@××××××××××××.edu */
228 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
229 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
230 +
231 +/* self-debugger module, it contains all of duel's access to
232 + * the outside world (like duelgdb.c), but is intended to work when duel
233 @@ -2077,6 +2131,9 @@
234 +
235 +/*
236 + * $Log: 10_all_gdb-6.6-duel.patch,v $
237 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
238 ++ * cleanup duel build a little and fix patch
239 ++ *
240 + * Revision 1.1 2007/12/29 21:06:06 vapier
241 + * add DUEL support #199987 by Sergei Golubchik
242 + *
243 @@ -2265,16 +2322,19 @@
244 +}
245 --- gdb/duel/error.c
246 +++ gdb/duel/error.c
247 -@@ -0,0 +1,114 @@
248 +@@ -0,0 +1,115 @@
249 +/* DUEL - A Very High Level Debugging Langauge. */
250 +/* Public domain code */
251 +/* Written by Michael Golan mg@××××××××××××.edu */
252 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
253 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
254 +
255 +/* display errors in a neat way */
256 +
257 +/*
258 + * $Log: 10_all_gdb-6.6-duel.patch,v $
259 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
260 ++ * cleanup duel build a little and fix patch
261 ++ *
262 + * Revision 1.1 2007/12/29 21:06:06 vapier
263 + * add DUEL support #199987 by Sergei Golubchik
264 + *
265 @@ -2381,21 +2441,22 @@
266 + duel_printf("Fatal Duel error: %s\n",msg);
267 + duel_abort();
268 +}
269 -+
270 -+
271 --- gdb/duel/eval.c
272 +++ gdb/duel/eval.c
273 -@@ -0,0 +1,834 @@
274 +@@ -0,0 +1,835 @@
275 +/* DUEL - A Very High Level Debugging Langauge. */
276 +/* Public domain code */
277 +/* Written by Michael Golan mg@××××××××××××.edu */
278 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
279 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
280 +
281 +/* this module is the most critical code, the recursive evaluation
282 + */
283 +
284 +/*
285 + * $Log: 10_all_gdb-6.6-duel.patch,v $
286 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
287 ++ * cleanup duel build a little and fix patch
288 ++ *
289 + * Revision 1.1 2007/12/29 21:06:06 vapier
290 + * add DUEL support #199987 by Sergei Golubchik
291 + *
292 @@ -3221,21 +3282,22 @@
293 + duel_set_eval_loc(prev_loc);
294 + return ok ;
295 +}
296 -+
297 -+
298 --- gdb/duel/evalops.c
299 +++ gdb/duel/evalops.c
300 -@@ -0,0 +1,1273 @@
301 +@@ -0,0 +1,1276 @@
302 +/* DUEL - A Very High Level Debugging Langauge. */
303 +/* Public domain code */
304 +/* Written by Michael Golan mg@××××××××××××.edu */
305 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
306 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
307 +
308 +/* this module contains evalauation code for many standard operators, eg '+'
309 + */
310 +
311 +/*
312 + * $Log: 10_all_gdb-6.6-duel.patch,v $
313 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
314 ++ * cleanup duel build a little and fix patch
315 ++ *
316 + * Revision 1.1 2007/12/29 21:06:06 vapier
317 + * add DUEL support #199987 by Sergei Golubchik
318 + *
319 @@ -4504,11 +4566,11 @@
320 +}
321 --- gdb/duel/global.h
322 +++ gdb/duel/global.h
323 -@@ -0,0 +1,450 @@
324 +@@ -0,0 +1,453 @@
325 +/* DUEL - A Very High Level Debugging Langauge. */
326 +/* Public domain code */
327 +/* Written by Michael Golan mg@××××××××××××.edu */
328 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
329 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
330 +
331 +/* this include file contains global definitions for duel. All global info
332 + * is shared thru this single file.
333 @@ -4516,6 +4578,9 @@
334 +
335 +/*
336 + * $Log: 10_all_gdb-6.6-duel.patch,v $
337 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
338 ++ * cleanup duel build a little and fix patch
339 ++ *
340 + * Revision 1.1 2007/12/29 21:06:06 vapier
341 + * add DUEL support #199987 by Sergei Golubchik
342 + *
343 @@ -5096,12 +5161,15 @@
344 +/* DUEL - A Very High Level Debugging Langauge. */
345 +/* Public domain code */
346 +/* Written by Michael Golan mg@××××××××××××.edu */
347 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
348 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
349 +
350 +/* misc function/library-like */
351 +
352 +/*
353 + * $Log: 10_all_gdb-6.6-duel.patch,v $
354 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
355 ++ * cleanup duel build a little and fix patch
356 ++ *
357 + * Revision 1.1 2007/12/29 21:06:06 vapier
358 + * add DUEL support #199987 by Sergei Golubchik
359 + *
360 @@ -5238,16 +5306,13 @@
361 + }
362 + }
363 +}
364 -+
365 -+
366 -+
367 --- gdb/duel/output.c
368 +++ gdb/duel/output.c
369 @@ -0,0 +1,53 @@
370 +/* DUEL - A Very High Level Debugging Langauge. */
371 +/* Public domain code */
372 +/* Written by Michael Golan mg@××××××××××××.edu */
373 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
374 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
375 +
376 +/* This module supports i/o for duel. Normally output goes to stdout,
377 + * but it could be piped out instead.
378 @@ -5303,7 +5368,7 @@
379 +/* DUEL - A Very High Level Debugging Langauge. */
380 +/* Public domain code */
381 +/* Written by Michael Golan mg@××××××××××××.edu */
382 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
383 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
384 +
385 +/* This module supports i/o for duel. Normally output goes to stdout,
386 + * but it could be piped out instead.
387 @@ -5441,14 +5506,195 @@
388 + }
389 + else poutf=pinf=NULL ;
390 +}
391 ---- gdb/duel/parse.y
392 -+++ gdb/duel/parse.y
393 -@@ -0,0 +1,940 @@
394 -+%{
395 +--- gdb/duel/parse.c
396 ++++ gdb/duel/parse.c
397 +@@ -0,0 +1,3329 @@
398 ++/* A Bison parser, made by GNU Bison 2.3. */
399 ++
400 ++/* Skeleton implementation for Bison's Yacc-like parsers in C
401 ++
402 ++ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
403 ++ Free Software Foundation, Inc.
404 ++
405 ++ This program is free software; you can redistribute it and/or modify
406 ++ it under the terms of the GNU General Public License as published by
407 ++ the Free Software Foundation; either version 2, or (at your option)
408 ++ any later version.
409 ++
410 ++ This program is distributed in the hope that it will be useful,
411 ++ but WITHOUT ANY WARRANTY; without even the implied warranty of
412 ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
413 ++ GNU General Public License for more details.
414 ++
415 ++ You should have received a copy of the GNU General Public License
416 ++ along with this program; if not, write to the Free Software
417 ++ Foundation, Inc., 51 Franklin Street, Fifth Floor,
418 ++ Boston, MA 02110-1301, USA. */
419 ++
420 ++/* As a special exception, you may create a larger work that contains
421 ++ part or all of the Bison parser skeleton and distribute that work
422 ++ under terms of your choice, so long as that work isn't itself a
423 ++ parser generator using the skeleton or a modified version thereof
424 ++ as a parser skeleton. Alternatively, if you modify or redistribute
425 ++ the parser skeleton itself, you may (at your option) remove this
426 ++ special exception, which will cause the skeleton and the resulting
427 ++ Bison output files to be licensed under the GNU General Public
428 ++ License without this special exception.
429 ++
430 ++ This special exception was added by the Free Software Foundation in
431 ++ version 2.2 of Bison. */
432 ++
433 ++/* C LALR(1) parser skeleton written by Richard Stallman, by
434 ++ simplifying the original so-called "semantic" parser. */
435 ++
436 ++/* All symbols defined below should begin with yy or YY, to avoid
437 ++ infringing on user name space. This should be done even for local
438 ++ variables, as they might otherwise be expanded by user macros.
439 ++ There are some unavoidable exceptions within include files to
440 ++ define necessary library symbols; they are noted "INFRINGES ON
441 ++ USER NAME SPACE" below. */
442 ++
443 ++/* Identify Bison output. */
444 ++#define YYBISON 1
445 ++
446 ++/* Bison version. */
447 ++#define YYBISON_VERSION "2.3"
448 ++
449 ++/* Skeleton name. */
450 ++#define YYSKELETON_NAME "yacc.c"
451 ++
452 ++/* Pure parsers. */
453 ++#define YYPURE 0
454 ++
455 ++/* Using locations. */
456 ++#define YYLSP_NEEDED 0
457 ++
458 ++
459 ++
460 ++/* Tokens. */
461 ++#ifndef YYTOKENTYPE
462 ++# define YYTOKENTYPE
463 ++ /* Put the tokens into the symbol table, so that GDB and other debuggers
464 ++ know about them. */
465 ++ enum yytokentype {
466 ++ T_CONST = 258,
467 ++ T_SYM = 259,
468 ++ T_ASSIGN = 260,
469 ++ T_DEFVAR = 261,
470 ++ T_CHAR = 262,
471 ++ T_INT = 263,
472 ++ T_SHORT = 264,
473 ++ T_LONG = 265,
474 ++ T_UNSIGNED = 266,
475 ++ T_FLOAT = 267,
476 ++ T_DOUBLE = 268,
477 ++ T_VOID = 269,
478 ++ T_STRUCT = 270,
479 ++ T_UNION = 271,
480 ++ T_ENUM = 272,
481 ++ T_SIZEOF = 273,
482 ++ T_TYPEDEF_INDICATOR = 274,
483 ++ T_SIGNED = 275,
484 ++ T_IF = 276,
485 ++ T_ELSE = 277,
486 ++ T_FOR = 278,
487 ++ T_WHILE = 279,
488 ++ T_OR = 280,
489 ++ T_AND = 281,
490 ++ T_RSH = 282,
491 ++ T_LSH = 283,
492 ++ T_INC = 284,
493 ++ T_DEC = 285,
494 ++ T_COUNT = 286,
495 ++ T_FRAME = 287,
496 ++ T_TO = 288,
497 ++ T_DFS = 289,
498 ++ T_BFS = 290,
499 ++ T_ARROW = 291,
500 ++ T_OSEL = 292,
501 ++ T_CSEL = 293,
502 ++ T_IMP = 294,
503 ++ T_ANDL = 295,
504 ++ T_ORL = 296,
505 ++ T_EQ = 297,
506 ++ T_NE = 298,
507 ++ T_EQQ = 299,
508 ++ T_NEQ = 300,
509 ++ T_LE = 301,
510 ++ T_GE = 302,
511 ++ T_LSQ = 303,
512 ++ T_GTQ = 304,
513 ++ T_LEQ = 305,
514 ++ T_GEQ = 306,
515 ++ STMT = 307,
516 ++ UNARY = 308,
517 ++ T_POS = 309
518 ++ };
519 ++#endif
520 ++/* Tokens. */
521 ++#define T_CONST 258
522 ++#define T_SYM 259
523 ++#define T_ASSIGN 260
524 ++#define T_DEFVAR 261
525 ++#define T_CHAR 262
526 ++#define T_INT 263
527 ++#define T_SHORT 264
528 ++#define T_LONG 265
529 ++#define T_UNSIGNED 266
530 ++#define T_FLOAT 267
531 ++#define T_DOUBLE 268
532 ++#define T_VOID 269
533 ++#define T_STRUCT 270
534 ++#define T_UNION 271
535 ++#define T_ENUM 272
536 ++#define T_SIZEOF 273
537 ++#define T_TYPEDEF_INDICATOR 274
538 ++#define T_SIGNED 275
539 ++#define T_IF 276
540 ++#define T_ELSE 277
541 ++#define T_FOR 278
542 ++#define T_WHILE 279
543 ++#define T_OR 280
544 ++#define T_AND 281
545 ++#define T_RSH 282
546 ++#define T_LSH 283
547 ++#define T_INC 284
548 ++#define T_DEC 285
549 ++#define T_COUNT 286
550 ++#define T_FRAME 287
551 ++#define T_TO 288
552 ++#define T_DFS 289
553 ++#define T_BFS 290
554 ++#define T_ARROW 291
555 ++#define T_OSEL 292
556 ++#define T_CSEL 293
557 ++#define T_IMP 294
558 ++#define T_ANDL 295
559 ++#define T_ORL 296
560 ++#define T_EQ 297
561 ++#define T_NE 298
562 ++#define T_EQQ 299
563 ++#define T_NEQ 300
564 ++#define T_LE 301
565 ++#define T_GE 302
566 ++#define T_LSQ 303
567 ++#define T_GTQ 304
568 ++#define T_LEQ 305
569 ++#define T_GEQ 306
570 ++#define STMT 307
571 ++#define UNARY 308
572 ++#define T_POS 309
573 ++
574 ++
575 ++
576 ++
577 ++/* Copy the first part of user declarations. */
578 ++#line 1 "parse.y"
579 ++
580 +/* DUEL - A Very High Level Debugging Langauge. */
581 +/* Public domain code */
582 +/* Written by Michael Golan mg@××××××××××××.edu */
583 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
584 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
585 +
586 +/* this module contains the duel parser, in yacc, plus a simple lexer.
587 + * the lexer is slow, but duel expressions are tiny.
588 @@ -5480,6 +5726,9 @@
589 +
590 +/*
591 + * $Log: 10_all_gdb-6.6-duel.patch,v $
592 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
593 ++ * cleanup duel build a little and fix patch
594 ++ *
595 + * Revision 1.1 2007/12/29 21:06:06 vapier
596 + * add DUEL support #199987 by Sergei Golubchik
597 + *
598 @@ -5606,215 +5855,3369 @@
599 +
600 +/* #define YYDEBUG 1 */
601 +
602 -+%}
603 +
604 -+%union
605 -+ {
606 ++
607 ++/* Enabling traces. */
608 ++#ifndef YYDEBUG
609 ++# define YYDEBUG 0
610 ++#endif
611 ++
612 ++/* Enabling verbose error messages. */
613 ++#ifdef YYERROR_VERBOSE
614 ++# undef YYERROR_VERBOSE
615 ++# define YYERROR_VERBOSE 1
616 ++#else
617 ++# define YYERROR_VERBOSE 0
618 ++#endif
619 ++
620 ++/* Enabling the token table. */
621 ++#ifndef YYTOKEN_TABLE
622 ++# define YYTOKEN_TABLE 0
623 ++#endif
624 ++
625 ++#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
626 ++typedef union YYSTYPE
627 ++#line 166 "parse.y"
628 ++{
629 + tnode *node ; /* node pointer for constructed exp tree */
630 + tctype *ctype; /* type for type nodes */
631 + tnameinfo nameinfo ; /* a name/symbol + src position */
632 + topinfo opinfo; /* keyword/operator + source position */
633 + }
634 ++/* Line 187 of yacc.c. */
635 ++#line 375 "parse.c"
636 ++ YYSTYPE;
637 ++# define yystype YYSTYPE /* obsolescent; will be withdrawn */
638 ++# define YYSTYPE_IS_DECLARED 1
639 ++# define YYSTYPE_IS_TRIVIAL 1
640 ++#endif
641 +
642 -+%type <node> start duel_inp duel_exp exp type nameexp sm_exp oexp
643 -+%type <node> all_decls vars_decl var_decl name_decl1 name_decl
644 -+%type <ctype> typebase
645 -+%type <nameinfo> name
646 +
647 -+%token <node> T_CONST
648 -+%token <nameinfo> T_SYM
649 -+%token <opinfo> T_ASSIGN T_DEFVAR
650 +
651 ++/* Copy the second part of user declarations. */
652 +
653 -+%token <opinfo> T_CHAR T_INT T_SHORT T_LONG T_UNSIGNED T_FLOAT T_DOUBLE T_VOID
654 -+%token <opinfo> T_STRUCT T_UNION T_ENUM T_SIZEOF T_TYPEDEF_INDICATOR T_SIGNED
655 +
656 -+%token <opinfo> T_IF T_ELSE T_FOR T_WHILE
657 -+%token <opinfo> ';' ',' '=' '?' '|' '^' '&' '<' '>' '+' '-' '*' '/' '%'
658 -+%token <opinfo> '.' '[' ']' '(' ')' '{' '}' '#' '@' '!' '~'
659 -+%token <opinfo> T_OR T_AND T_RSH T_LSH T_INC T_DEC T_COUNT T_FRAME T_TO
660 -+%token <opinfo> T_DFS T_BFS T_ARROW T_OSEL T_CSEL T_IMP T_ANDL T_ORL
661 -+%token <opinfo> T_EQ T_NE T_EQQ T_NEQ T_LE T_GE T_LSQ T_GTQ T_LEQ T_GEQ
662 ++/* Line 216 of yacc.c. */
663 ++#line 388 "parse.c"
664 +
665 -+%left ';'
666 -+%right STMT T_ELSE
667 -+%right T_IMP
668 -+%right ','
669 -+%right '=' T_ASSIGN T_DEFVAR
670 -+%right '?'
671 -+%left T_OR T_ORL
672 -+%left T_AND T_ANDL
673 -+%left '|'
674 -+%left '^'
675 -+%left '&'
676 -+%left T_EQ T_NE T_EQQ T_NEQ
677 -+%left '<' '>' T_LE T_GE T_LSQ T_GTQ T_LEQ T_GEQ
678 -+%nonassoc T_TO
679 -+%left T_LSH T_RSH
680 -+%left '+' '-'
681 -+%left '*' '/' '%'
682 -+%right UNARY '!' '~' T_INC T_DEC T_COUNT T_FRAME
683 -+%left T_DFS T_BFS T_POS T_ARROW '.' '[' ']' '(' ')' '{' '}' '#' '@' T_OSEL T_CSEL
684 -+%%
685 ++#ifdef short
686 ++# undef short
687 ++#endif
688 +
689 -+start : duel_inp { root=$1 ; }
690 -+ ;
691 ++#ifdef YYTYPE_UINT8
692 ++typedef YYTYPE_UINT8 yytype_uint8;
693 ++#else
694 ++typedef unsigned char yytype_uint8;
695 ++#endif
696 +
697 -+duel_inp : all_decls
698 -+ | all_decls ';'
699 -+ | all_decls ';' duel_exp { $$=mknode_sbin($2,$1,$3);}
700 -+ | duel_exp
701 -+ ;
702 -+duel_exp : sm_exp
703 -+ | sm_exp ';' { $$=mknode_sbin($2,$1,0); }
704 -+ ;
705 -+all_decls: vars_decl
706 -+ | all_decls ';' vars_decl { $$=mknode_sbin($2,$1,$3); }
707 -+ ;
708 ++#ifdef YYTYPE_INT8
709 ++typedef YYTYPE_INT8 yytype_int8;
710 ++#elif (defined __STDC__ || defined __C99__FUNC__ \
711 ++ || defined __cplusplus || defined _MSC_VER)
712 ++typedef signed char yytype_int8;
713 ++#else
714 ++typedef short int yytype_int8;
715 ++#endif
716 +
717 -+vars_decl: typebase { decl_tbase=$1 ; } var_decl { $$=$3 ; }
718 -+ ;
719 -+var_decl : name_decl1
720 -+ | var_decl ',' name_decl1 { $$=mknode_sbin(seq_op,$1,$3); }
721 -+ ;
722 ++#ifdef YYTYPE_UINT16
723 ++typedef YYTYPE_UINT16 yytype_uint16;
724 ++#else
725 ++typedef unsigned short int yytype_uint16;
726 ++#endif
727 +
728 -+name_decl1: name_decl { $$=mknode_sbin(decl_op,$1,
729 -+ mknode_modified_ctype(decl_tbase)); }
730 -+ ;
731 ++#ifdef YYTYPE_INT16
732 ++typedef YYTYPE_INT16 yytype_int16;
733 ++#else
734 ++typedef short int yytype_int16;
735 ++#endif
736 +
737 -+name_decl : '(' name_decl ')' { $$=$2 ; }
738 -+ | '(' name_decl ')' '(' ')' { $$=$2 ; push_type('('); }
739 -+ | '*' name_decl { $$=$2 ; push_type('*'); }
740 -+ | name_decl '[' T_CONST ']' { $$=$1 ; push_type_int('[',$3); }
741 -+ | nameexp
742 -+ ;
743 ++#ifndef YYSIZE_T
744 ++# ifdef __SIZE_TYPE__
745 ++# define YYSIZE_T __SIZE_TYPE__
746 ++# elif defined size_t
747 ++# define YYSIZE_T size_t
748 ++# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
749 ++ || defined __cplusplus || defined _MSC_VER)
750 ++# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
751 ++# define YYSIZE_T size_t
752 ++# else
753 ++# define YYSIZE_T unsigned int
754 ++# endif
755 ++#endif
756 +
757 -+/* Statements - not really, these are expressions too!
758 -+ Notes: for(;;) oexp - will create lots of shift/reduce conflicts,
759 -+ 'for(;;;)' and 'for(;;) exp' are specified
760 -+ instead and yacc handle this as a "standard" s/r.
761 -+ the only diff is yacc dont complain on these!
762 -+ if() - same comments as above, plus, we prevent meaningless
763 -+ if's like in C: ' if(x); else;' - a useless statement.
764 -+ */
765 -+exp : T_IF '(' exp ')' exp %prec STMT { $$=mknode_tri($1,$3,$5,0); }
766 -+ | T_IF '(' exp ')' exp T_ELSE %prec STMT
767 -+ { $$=mknode_tri($1,$3,$5,0); }
768 -+ | T_IF '(' exp ')' T_ELSE exp %prec STMT
769 -+ { $$=mknode_tri($1,$3,0,$6); }
770 -+ | T_IF '(' exp ')' exp T_ELSE exp %prec STMT
771 -+ { $$=mknode_tri($1,$3,$5,$7); }
772 ++#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
773 +
774 -+ | T_FOR '(' oexp ';' exp ';' oexp ')' exp %prec STMT
775 -+ { $$=mknode_op(OPK_QUAD,$1,$3,$5,$7,$9); }
776 -+ | T_FOR '(' oexp ';' exp ';' oexp ')' %prec STMT
777 -+ { $$=mknode_op(OPK_QUAD,$1,$3,$5,$7,0); }
778 -+ | T_WHILE '(' exp ')' exp %prec STMT
779 -+ { $$=mknode_sbin($1,$3,$5); }
780 -+ | T_WHILE '(' exp ')' %prec STMT
781 -+ { $$=mknode_sbin($1,$3,0); }
782 -+ ;
783 ++#ifndef YY_
784 ++# if YYENABLE_NLS
785 ++# if ENABLE_NLS
786 ++# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
787 ++# define YY_(msgid) dgettext ("bison-runtime", msgid)
788 ++# endif
789 ++# endif
790 ++# ifndef YY_
791 ++# define YY_(msgid) msgid
792 ++# endif
793 ++#endif
794 +
795 -+/* Expressions */
796 ++/* Suppress unused-variable warnings by "using" E. */
797 ++#if ! defined lint || defined __GNUC__
798 ++# define YYUSE(e) ((void) (e))
799 ++#else
800 ++# define YYUSE(e) /* empty */
801 ++#endif
802 +
803 -+exp : '*' exp %prec UNARY { $$=mknode_unary( $1,$2); }
804 -+ | '&' exp %prec UNARY { $$=mknode_unary( $1,$2); }
805 -+ | '-' exp %prec UNARY { $$=mknode_unary( $1,$2); }
806 -+ | '!' exp { $$=mknode_unary( $1,$2); }
807 -+ | '~' exp { $$=mknode_unary( $1,$2); }
808 -+ | T_COUNT exp { $$=mknode_sunary($1,$2); }
809 -+ | T_ANDL exp { $$=mknode_sunary($1,$2); }
810 -+ | T_ORL exp { $$=mknode_sunary($1,$2); }
811 -+ | T_INC exp { $$=mknode_unary( $1,$2); }
812 -+ | T_DEC exp { $$=mknode_unary( $1,$2); }
813 -+ | exp T_INC { $$=mknode_post_unary($2,$1); }
814 -+ | exp T_DEC { $$=mknode_post_unary($2,$1); }
815 -+ | T_SIZEOF '(' type ')' { $$=mknode_sunary($1,$3); }
816 -+ | T_SIZEOF '(' exp ')' { $$=mknode_unary($1,$3); }
817 -+ | T_FRAME '(' exp ')' %prec UNARY { $$=mknode_unary( $1,$3); }
818 -+ ;
819 ++/* Identity function, used to suppress warnings about constant conditions. */
820 ++#ifndef lint
821 ++# define YYID(n) (n)
822 ++#else
823 ++#if (defined __STDC__ || defined __C99__FUNC__ \
824 ++ || defined __cplusplus || defined _MSC_VER)
825 ++static int
826 ++YYID (int i)
827 ++#else
828 ++static int
829 ++YYID (i)
830 ++ int i;
831 ++#endif
832 ++{
833 ++ return i;
834 ++}
835 ++#endif
836 +
837 -+exp : exp T_DFS exp { $$=mknode_sbin($2,$1,$3); }
838 -+ | exp T_BFS exp { $$=mknode_sbin($2,$1,$3); }
839 ++#if ! defined yyoverflow || YYERROR_VERBOSE
840 +
841 -+ | exp '#' nameexp { $$=mknode_sbin($2,$1,$3); }
842 -+ | exp '@' exp { $$=mknode_sbin($2,$1,$3); }
843 -+ | exp T_ARROW exp { $$=mknode_sbin($2,$1,$3); }
844 -+ | exp '.' exp { $$=mknode_sbin($2,$1,$3); }
845 -+ | exp '[' exp ']' { $$=mknode_bin( $2,$1,$3); }
846 -+ | exp T_OSEL exp T_CSEL { $$=mknode_sbin($2,$1,$3); }
847 -+ | exp '(' oexp ')' %prec '.' { $$=mknode_op(OPK_FUNC,$2,$1,$3,0,0); }
848 -+ | '(' sm_exp ')' { $$=mknode_unary($1,$2); }
849 -+ | '{' sm_exp '}' { $$=mknode_unary($1,$2); }
850 -+ ;
851 ++/* The parser invokes alloca or malloc; define the necessary symbols. */
852 +
853 -+exp : '(' type ')' exp %prec UNARY
854 -+ { $$=mknode_op(OPK_CAST,$1,$2,$4,0,0); }
855 -+/* HACKS to handle the most common cast cases with a typedef, without
856 -+ * requiring a 'T'. This code breaks (printf)("hi"), which returns the
857 -+ * error "printf not a typedef", but otherwise it works ok.
858 -+ * It might be confusing since "(uint *)p" works but "(uint (*)())p" wont,
859 -+ * but it seems that (uint*)p, (uint)x are the most common, and users get
860 -+ * confused w/o them.
861 -+ * The code below works essentially with context-sensitive parsing!
862 -+ * see the hacked %prec for nameexp which prevents yacc s/r warning!
863 -+ */
864 -+ | '(' name ')' exp %prec UNARY {
865 -+ tctype *t=duel_get_target_typedef($2.name);
866 -+ if(t==NULL) yyerror("not a typedef name");
867 -+ $$=mknode_op(OPK_CAST,$1,mknode_ctype(t),$4,0,0); }
868 -+ | '(' name '*' type_mod ')' exp %prec UNARY {
869 -+ tctype *t=duel_get_target_typedef($2.name);
870 -+ if(t==NULL) yyerror("not a typedef name");
871 -+ push_type('*');
872 -+ $$=mknode_op(OPK_CAST,$1,mknode_modified_ctype(t),$6,0,0); }
873 -+ ;
874 ++# ifdef YYSTACK_USE_ALLOCA
875 ++# if YYSTACK_USE_ALLOCA
876 ++# ifdef __GNUC__
877 ++# define YYSTACK_ALLOC __builtin_alloca
878 ++# elif defined __BUILTIN_VA_ARG_INCR
879 ++# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
880 ++# elif defined _AIX
881 ++# define YYSTACK_ALLOC __alloca
882 ++# elif defined _MSC_VER
883 ++# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
884 ++# define alloca _alloca
885 ++# else
886 ++# define YYSTACK_ALLOC alloca
887 ++# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
888 ++ || defined __cplusplus || defined _MSC_VER)
889 ++# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
890 ++# ifndef _STDLIB_H
891 ++# define _STDLIB_H 1
892 ++# endif
893 ++# endif
894 ++# endif
895 ++# endif
896 ++# endif
897 ++
898 ++# ifdef YYSTACK_ALLOC
899 ++ /* Pacify GCC's `empty if-body' warning. */
900 ++# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
901 ++# ifndef YYSTACK_ALLOC_MAXIMUM
902 ++ /* The OS might guarantee only one guard page at the bottom of the stack,
903 ++ and a page size can be as small as 4096 bytes. So we cannot safely
904 ++ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
905 ++ to allow for a few compiler-allocated temporary stack slots. */
906 ++# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
907 ++# endif
908 ++# else
909 ++# define YYSTACK_ALLOC YYMALLOC
910 ++# define YYSTACK_FREE YYFREE
911 ++# ifndef YYSTACK_ALLOC_MAXIMUM
912 ++# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
913 ++# endif
914 ++# if (defined __cplusplus && ! defined _STDLIB_H \
915 ++ && ! ((defined YYMALLOC || defined malloc) \
916 ++ && (defined YYFREE || defined free)))
917 ++# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
918 ++# ifndef _STDLIB_H
919 ++# define _STDLIB_H 1
920 ++# endif
921 ++# endif
922 ++# ifndef YYMALLOC
923 ++# define YYMALLOC malloc
924 ++# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
925 ++ || defined __cplusplus || defined _MSC_VER)
926 ++void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
927 ++# endif
928 ++# endif
929 ++# ifndef YYFREE
930 ++# define YYFREE free
931 ++# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
932 ++ || defined __cplusplus || defined _MSC_VER)
933 ++void free (void *); /* INFRINGES ON USER NAME SPACE */
934 ++# endif
935 ++# endif
936 ++# endif
937 ++#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
938 ++
939 ++
940 ++#if (! defined yyoverflow \
941 ++ && (! defined __cplusplus \
942 ++ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
943 +
944 -+ /* Bin ops in decreasing precedence order: */
945 ++/* A type that is properly aligned for any stack member. */
946 ++union yyalloc
947 ++{
948 ++ yytype_int16 yyss;
949 ++ YYSTYPE yyvs;
950 ++ };
951 +
952 -+exp : exp '*' exp { $$=mknode_bin($2,$1,$3); }
953 -+ | exp '/' exp { $$=mknode_bin($2,$1,$3); }
954 -+ | exp '%' exp { $$=mknode_bin($2,$1,$3); }
955 -+ | exp '+' exp { $$=mknode_bin($2,$1,$3); }
956 -+ | exp '-' exp { $$=mknode_bin($2,$1,$3); }
957 -+ | exp T_LSH exp { $$=mknode_bin($2,$1,$3); }
958 -+ | exp T_RSH exp { $$=mknode_bin($2,$1,$3); }
959 -+ | exp T_EQ exp { $$=mknode_bin($2,$1,$3); }
960 -+ | exp T_NE exp { $$=mknode_bin($2,$1,$3); }
961 -+ | exp T_EQQ exp { $$=mknode_bin($2,$1,$3); }
962 -+ | exp T_NEQ exp { $$=mknode_bin($2,$1,$3); }
963 -+ | exp T_LE exp { $$=mknode_bin($2,$1,$3); }
964 -+ | exp T_GE exp { $$=mknode_bin($2,$1,$3); }
965 -+ | exp T_LEQ exp { $$=mknode_bin($2,$1,$3); }
966 -+ | exp T_GEQ exp { $$=mknode_bin($2,$1,$3); }
967 -+ | exp '<' exp { $$=mknode_bin($2,$1,$3); }
968 -+ | exp '>' exp { $$=mknode_bin($2,$1,$3); }
969 -+ | exp T_LSQ exp { $$=mknode_bin($2,$1,$3); }
970 -+ | exp T_GTQ exp { $$=mknode_bin($2,$1,$3); }
971 -+ | exp '&' exp { $$=mknode_bin($2,$1,$3); }
972 -+ | exp '|' exp { $$=mknode_bin($2,$1,$3); }
973 -+ | exp '^' exp { $$=mknode_bin($2,$1,$3); }
974 -+ | exp T_AND exp { $$=mknode_sbin($2,$1,$3); }
975 -+ | exp T_OR exp { $$=mknode_sbin($2,$1,$3); }
976 -+ ;
977 ++/* The size of the maximum gap between one aligned stack and the next. */
978 ++# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
979 +
980 -+exp : exp '?' exp ':' exp %prec '?'
981 -+ { $$=mknode_tri($2,$1,$3,$5); }
982 -+ ;
983 -+
984 -+exp : exp '=' exp { $$=mknode_bin($2,$1,$3); }
985 -+ | exp T_ASSIGN exp { $$=mknode_op(OPK_ASSIGN,$2, $1,$3,0,0); }
986 -+ |nameexp T_DEFVAR exp { $$=mknode_sbin($2,$1,$3); }
987 -+ ;
988 ++/* The size of an array large to enough to hold all stacks, each with
989 ++ N elements. */
990 ++# define YYSTACK_BYTES(N) \
991 ++ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
992 ++ + YYSTACK_GAP_MAXIMUM)
993 ++
994 ++/* Copy COUNT objects from FROM to TO. The source and destination do
995 ++ not overlap. */
996 ++# ifndef YYCOPY
997 ++# if defined __GNUC__ && 1 < __GNUC__
998 ++# define YYCOPY(To, From, Count) \
999 ++ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1000 ++# else
1001 ++# define YYCOPY(To, From, Count) \
1002 ++ do \
1003 ++ { \
1004 ++ YYSIZE_T yyi; \
1005 ++ for (yyi = 0; yyi < (Count); yyi++) \
1006 ++ (To)[yyi] = (From)[yyi]; \
1007 ++ } \
1008 ++ while (YYID (0))
1009 ++# endif
1010 ++# endif
1011 ++
1012 ++/* Relocate STACK from its old location to the new one. The
1013 ++ local variables YYSIZE and YYSTACKSIZE give the old and new number of
1014 ++ elements in the stack, and YYPTR gives the new location of the
1015 ++ stack. Advance YYPTR to a properly aligned location for the next
1016 ++ stack. */
1017 ++# define YYSTACK_RELOCATE(Stack) \
1018 ++ do \
1019 ++ { \
1020 ++ YYSIZE_T yynewbytes; \
1021 ++ YYCOPY (&yyptr->Stack, Stack, yysize); \
1022 ++ Stack = &yyptr->Stack; \
1023 ++ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1024 ++ yyptr += yynewbytes / sizeof (*yyptr); \
1025 ++ } \
1026 ++ while (YYID (0))
1027 +
1028 -+ /* generating expressions */
1029 ++#endif
1030 +
1031 -+exp : exp T_TO exp { $$=mknode_sbin($2,$1,$3); }
1032 -+ | T_TO exp { $$=mknode_sbin($1, 0,$2); }
1033 -+ | exp T_TO { $$=mknode_sbin($2,$1, 0); }
1034 -+ | exp ',' exp { $$=mknode_sbin($2,$1,$3); }
1035 -+ | exp T_IMP exp { $$=mknode_sbin($2,$1,$3); }
1036 -+ ;
1037 ++/* YYFINAL -- State number of the termination state. */
1038 ++#define YYFINAL 77
1039 ++/* YYLAST -- Last index in YYTABLE. */
1040 ++#define YYLAST 1420
1041 ++
1042 ++/* YYNTOKENS -- Number of terminals. */
1043 ++#define YYNTOKENS 81
1044 ++/* YYNNTS -- Number of nonterminals. */
1045 ++#define YYNNTS 18
1046 ++/* YYNRULES -- Number of rules. */
1047 ++#define YYNRULES 129
1048 ++/* YYNRULES -- Number of states. */
1049 ++#define YYNSTATES 238
1050 ++
1051 ++/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1052 ++#define YYUNDEFTOK 2
1053 ++#define YYMAXUTOK 309
1054 ++
1055 ++#define YYTRANSLATE(YYX) \
1056 ++ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1057 ++
1058 ++/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1059 ++static const yytype_uint8 yytranslate[] =
1060 ++{
1061 ++ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1062 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1063 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1064 ++ 2, 2, 2, 48, 2, 46, 2, 38, 31, 2,
1065 ++ 42, 43, 36, 34, 26, 35, 39, 37, 2, 2,
1066 ++ 2, 2, 2, 2, 2, 2, 2, 2, 80, 25,
1067 ++ 32, 27, 33, 28, 47, 2, 2, 2, 2, 2,
1068 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1069 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1070 ++ 2, 40, 2, 41, 30, 2, 2, 2, 2, 2,
1071 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1072 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1073 ++ 2, 2, 2, 44, 29, 45, 49, 2, 2, 2,
1074 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1075 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1076 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1077 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1078 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1079 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1080 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1081 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1082 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1083 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1084 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1085 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1086 ++ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1087 ++ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1088 ++ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1089 ++ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1090 ++ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1091 ++ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
1092 ++};
1093 ++
1094 ++#if YYDEBUG
1095 ++/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1096 ++ YYRHS. */
1097 ++static const yytype_uint16 yyprhs[] =
1098 ++{
1099 ++ 0, 0, 3, 5, 7, 10, 14, 16, 18, 21,
1100 ++ 23, 27, 28, 32, 34, 38, 40, 44, 50, 53,
1101 ++ 58, 60, 66, 73, 80, 88, 98, 107, 113, 118,
1102 ++ 121, 124, 127, 130, 133, 136, 139, 142, 145, 148,
1103 ++ 151, 154, 159, 164, 169, 173, 177, 181, 185, 189,
1104 ++ 193, 198, 203, 208, 212, 216, 221, 226, 233, 237,
1105 ++ 241, 245, 249, 253, 257, 261, 265, 269, 273, 277,
1106 ++ 281, 285, 289, 293, 297, 301, 305, 309, 313, 317,
1107 ++ 321, 325, 329, 335, 339, 343, 347, 351, 354, 357,
1108 ++ 361, 365, 369, 371, 373, 374, 376, 378, 380, 383,
1109 ++ 387, 393, 396, 401, 402, 405, 407, 410, 413, 415,
1110 ++ 417, 420, 422, 425, 428, 432, 435, 439, 443, 448,
1111 ++ 450, 453, 456, 460, 462, 464, 466, 469, 472, 475
1112 ++};
1113 ++
1114 ++/* YYRHS -- A `-1'-separated list of the rules' RHS. */
1115 ++static const yytype_int8 yyrhs[] =
1116 ++{
1117 ++ 82, 0, -1, 83, -1, 85, -1, 85, 25, -1,
1118 ++ 85, 25, 84, -1, 84, -1, 92, -1, 92, 25,
1119 ++ -1, 86, -1, 85, 25, 86, -1, -1, 97, 87,
1120 ++ 88, -1, 89, -1, 88, 26, 89, -1, 90, -1,
1121 ++ 42, 90, 43, -1, 42, 90, 43, 42, 43, -1,
1122 ++ 36, 90, -1, 90, 40, 3, 41, -1, 94, -1,
1123 ++ 21, 42, 91, 43, 91, -1, 21, 42, 91, 43,
1124 ++ 91, 22, -1, 21, 42, 91, 43, 22, 91, -1,
1125 ++ 21, 42, 91, 43, 91, 22, 91, -1, 23, 42,
1126 ++ 93, 25, 91, 25, 93, 43, 91, -1, 23, 42,
1127 ++ 93, 25, 91, 25, 93, 43, -1, 24, 42, 91,
1128 ++ 43, 91, -1, 24, 42, 91, 43, -1, 36, 91,
1129 ++ -1, 31, 91, -1, 35, 91, -1, 48, 91, -1,
1130 ++ 49, 91, -1, 56, 91, -1, 65, 91, -1, 66,
1131 ++ 91, -1, 54, 91, -1, 55, 91, -1, 91, 54,
1132 ++ -1, 91, 55, -1, 18, 42, 95, 43, -1, 18,
1133 ++ 42, 91, 43, -1, 57, 42, 91, 43, -1, 91,
1134 ++ 59, 91, -1, 91, 60, 91, -1, 91, 46, 94,
1135 ++ -1, 91, 47, 91, -1, 91, 61, 91, -1, 91,
1136 ++ 39, 91, -1, 91, 40, 91, 41, -1, 91, 62,
1137 ++ 91, 63, -1, 91, 42, 93, 43, -1, 42, 92,
1138 ++ 43, -1, 44, 92, 45, -1, 42, 95, 43, 91,
1139 ++ -1, 42, 98, 43, 91, -1, 42, 98, 36, 96,
1140 ++ 43, 91, -1, 91, 36, 91, -1, 91, 37, 91,
1141 ++ -1, 91, 38, 91, -1, 91, 34, 91, -1, 91,
1142 ++ 35, 91, -1, 91, 53, 91, -1, 91, 52, 91,
1143 ++ -1, 91, 67, 91, -1, 91, 68, 91, -1, 91,
1144 ++ 69, 91, -1, 91, 70, 91, -1, 91, 71, 91,
1145 ++ -1, 91, 72, 91, -1, 91, 75, 91, -1, 91,
1146 ++ 76, 91, -1, 91, 32, 91, -1, 91, 33, 91,
1147 ++ -1, 91, 73, 91, -1, 91, 74, 91, -1, 91,
1148 ++ 31, 91, -1, 91, 29, 91, -1, 91, 30, 91,
1149 ++ -1, 91, 51, 91, -1, 91, 50, 91, -1, 91,
1150 ++ 28, 91, 80, 91, -1, 91, 27, 91, -1, 91,
1151 ++ 5, 91, -1, 94, 6, 91, -1, 91, 58, 91,
1152 ++ -1, 58, 91, -1, 91, 58, -1, 91, 26, 91,
1153 ++ -1, 91, 64, 91, -1, 92, 25, 91, -1, 91,
1154 ++ -1, 91, -1, -1, 3, -1, 94, -1, 98, -1,
1155 ++ 97, 96, -1, 42, 96, 43, -1, 42, 96, 43,
1156 ++ 42, 43, -1, 36, 96, -1, 96, 40, 3, 41,
1157 ++ -1, -1, 19, 98, -1, 7, -1, 20, 7, -1,
1158 ++ 11, 7, -1, 8, -1, 11, -1, 11, 8, -1,
1159 ++ 10, -1, 10, 8, -1, 11, 10, -1, 11, 10,
1160 ++ 8, -1, 10, 10, -1, 10, 10, 8, -1, 11,
1161 ++ 10, 10, -1, 11, 10, 10, 8, -1, 9, -1,
1162 ++ 9, 8, -1, 11, 9, -1, 11, 9, 8, -1,
1163 ++ 12, -1, 13, -1, 14, -1, 15, 98, -1, 16,
1164 ++ 98, -1, 17, 98, -1, 4, -1
1165 ++};
1166 ++
1167 ++/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1168 ++static const yytype_uint16 yyrline[] =
1169 ++{
1170 ++ 0, 214, 214, 217, 218, 219, 220, 222, 223, 225,
1171 ++ 226, 229, 229, 231, 232, 235, 239, 240, 241, 242,
1172 ++ 243, 254, 255, 257, 259, 262, 264, 266, 268, 274,
1173 ++ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1174 ++ 285, 286, 287, 288, 291, 292, 294, 295, 296, 297,
1175 ++ 298, 299, 300, 301, 302, 305, 316, 320, 329, 330,
1176 ++ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
1177 ++ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
1178 ++ 351, 352, 355, 359, 360, 361, 366, 367, 368, 369,
1179 ++ 370, 373, 374, 377, 378, 381, 382, 388, 390, 395,
1180 ++ 396, 397, 398, 399, 416, 426, 427, 428, 429, 430,
1181 ++ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
1182 ++ 441, 442, 443, 444, 445, 446, 447, 450, 453, 458
1183 ++};
1184 ++#endif
1185 ++
1186 ++#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1187 ++/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1188 ++ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1189 ++static const char *const yytname[] =
1190 ++{
1191 ++ "$end", "error", "$undefined", "T_CONST", "T_SYM", "T_ASSIGN",
1192 ++ "T_DEFVAR", "T_CHAR", "T_INT", "T_SHORT", "T_LONG", "T_UNSIGNED",
1193 ++ "T_FLOAT", "T_DOUBLE", "T_VOID", "T_STRUCT", "T_UNION", "T_ENUM",
1194 ++ "T_SIZEOF", "T_TYPEDEF_INDICATOR", "T_SIGNED", "T_IF", "T_ELSE", "T_FOR",
1195 ++ "T_WHILE", "';'", "','", "'='", "'?'", "'|'", "'^'", "'&'", "'<'", "'>'",
1196 ++ "'+'", "'-'", "'*'", "'/'", "'%'", "'.'", "'['", "']'", "'('", "')'",
1197 ++ "'{'", "'}'", "'#'", "'@'", "'!'", "'~'", "T_OR", "T_AND", "T_RSH",
1198 ++ "T_LSH", "T_INC", "T_DEC", "T_COUNT", "T_FRAME", "T_TO", "T_DFS",
1199 ++ "T_BFS", "T_ARROW", "T_OSEL", "T_CSEL", "T_IMP", "T_ANDL", "T_ORL",
1200 ++ "T_EQ", "T_NE", "T_EQQ", "T_NEQ", "T_LE", "T_GE", "T_LSQ", "T_GTQ",
1201 ++ "T_LEQ", "T_GEQ", "STMT", "UNARY", "T_POS", "':'", "$accept", "start",
1202 ++ "duel_inp", "duel_exp", "all_decls", "vars_decl", "@1", "var_decl",
1203 ++ "name_decl1", "name_decl", "exp", "sm_exp", "oexp", "nameexp", "type",
1204 ++ "type_mod", "typebase", "name", 0
1205 ++};
1206 ++#endif
1207 ++
1208 ++# ifdef YYPRINT
1209 ++/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1210 ++ token YYLEX-NUM. */
1211 ++static const yytype_uint16 yytoknum[] =
1212 ++{
1213 ++ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1214 ++ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1215 ++ 275, 276, 277, 278, 279, 59, 44, 61, 63, 124,
1216 ++ 94, 38, 60, 62, 43, 45, 42, 47, 37, 46,
1217 ++ 91, 93, 40, 41, 123, 125, 35, 64, 33, 126,
1218 ++ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
1219 ++ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
1220 ++ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
1221 ++ 58
1222 ++};
1223 ++# endif
1224 ++
1225 ++/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1226 ++static const yytype_uint8 yyr1[] =
1227 ++{
1228 ++ 0, 81, 82, 83, 83, 83, 83, 84, 84, 85,
1229 ++ 85, 87, 86, 88, 88, 89, 90, 90, 90, 90,
1230 ++ 90, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1231 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1232 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1233 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1234 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1235 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1236 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1237 ++ 91, 92, 92, 93, 93, 91, 91, 94, 95, 96,
1238 ++ 96, 96, 96, 96, 97, 97, 97, 97, 97, 97,
1239 ++ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1240 ++ 97, 97, 97, 97, 97, 97, 97, 97, 97, 98
1241 ++};
1242 ++
1243 ++/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1244 ++static const yytype_uint8 yyr2[] =
1245 ++{
1246 ++ 0, 2, 1, 1, 2, 3, 1, 1, 2, 1,
1247 ++ 3, 0, 3, 1, 3, 1, 3, 5, 2, 4,
1248 ++ 1, 5, 6, 6, 7, 9, 8, 5, 4, 2,
1249 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1250 ++ 2, 4, 4, 4, 3, 3, 3, 3, 3, 3,
1251 ++ 4, 4, 4, 3, 3, 4, 4, 6, 3, 3,
1252 ++ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1253 ++ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1254 ++ 3, 3, 5, 3, 3, 3, 3, 2, 2, 3,
1255 ++ 3, 3, 1, 1, 0, 1, 1, 1, 2, 3,
1256 ++ 5, 2, 4, 0, 2, 1, 2, 2, 1, 1,
1257 ++ 2, 1, 2, 2, 3, 2, 3, 3, 4, 1,
1258 ++ 2, 2, 3, 1, 1, 1, 2, 2, 2, 1
1259 ++};
1260 ++
1261 ++/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1262 ++ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1263 ++ means the default is an error. */
1264 ++static const yytype_uint8 yydefact[] =
1265 ++{
1266 ++ 0, 95, 129, 105, 108, 119, 111, 109, 123, 124,
1267 ++ 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1268 ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1269 ++ 0, 0, 0, 0, 0, 2, 6, 3, 9, 92,
1270 ++ 7, 96, 11, 97, 120, 112, 115, 107, 110, 121,
1271 ++ 113, 126, 127, 128, 0, 104, 106, 0, 94, 0,
1272 ++ 30, 31, 29, 0, 0, 103, 97, 0, 32, 33,
1273 ++ 37, 38, 34, 0, 87, 35, 36, 1, 4, 0,
1274 ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1275 ++ 0, 0, 0, 0, 0, 94, 0, 0, 0, 0,
1276 ++ 0, 0, 39, 40, 88, 0, 0, 0, 0, 0,
1277 ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1278 ++ 8, 0, 0, 116, 122, 114, 117, 0, 0, 0,
1279 ++ 93, 0, 0, 0, 53, 0, 103, 103, 98, 103,
1280 ++ 0, 54, 0, 5, 10, 84, 89, 83, 0, 78,
1281 ++ 79, 77, 73, 74, 61, 62, 58, 59, 60, 49,
1282 ++ 0, 0, 46, 47, 81, 80, 64, 63, 86, 44,
1283 ++ 45, 48, 0, 90, 65, 66, 67, 68, 69, 70,
1284 ++ 75, 76, 71, 72, 91, 85, 0, 0, 12, 13,
1285 ++ 15, 20, 118, 42, 41, 0, 0, 28, 55, 101,
1286 ++ 0, 0, 0, 56, 43, 0, 50, 52, 51, 18,
1287 ++ 0, 0, 0, 0, 21, 0, 27, 99, 0, 0,
1288 ++ 82, 16, 14, 0, 23, 22, 94, 0, 102, 57,
1289 ++ 0, 19, 24, 0, 100, 17, 26, 25
1290 ++};
1291 ++
1292 ++/* YYDEFGOTO[NTERM-NUM]. */
1293 ++static const yytype_int16 yydefgoto[] =
1294 ++{
1295 ++ -1, 34, 35, 36, 37, 38, 122, 188, 189, 190,
1296 ++ 39, 40, 131, 41, 64, 138, 42, 43
1297 ++};
1298 ++
1299 ++/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1300 ++ STATE-NUM. */
1301 ++#define YYPACT_NINF -105
1302 ++static const yytype_int16 yypact[] =
1303 ++{
1304 ++ 843, -105, -105, -105, -105, 15, 46, 23, -105, -105,
1305 ++ -105, 39, 39, 39, -15, 39, 44, 16, 34, 64,
1306 ++ 892, 892, 892, 843, 892, 892, 892, 892, 892, 892,
1307 ++ 67, 892, 892, 892, 110, -105, -105, 86, -105, 667,
1308 ++ 87, 108, -105, -105, -105, -105, 109, -105, -105, 111,
1309 ++ 47, -105, -105, -105, 843, -105, -105, 892, 892, 892,
1310 ++ 148, 148, 148, 1, 73, -17, -14, -10, 148, 148,
1311 ++ 148, 148, 148, 892, 1302, 1076, 1028, -105, 843, 892,
1312 ++ 892, 892, 892, 892, 892, 892, 892, 892, 892, 892,
1313 ++ 892, 892, 892, 892, 892, 892, 39, 892, 892, 892,
1314 ++ 892, 892, -105, -105, 941, 892, 892, 892, 892, 892,
1315 ++ 892, 892, 892, 892, 892, 892, 892, 892, 892, 892,
1316 ++ 892, 892, 0, -105, -105, -105, 113, 249, 75, 300,
1317 ++ 667, 98, 351, 892, -105, 892, -17, -17, 84, -17,
1318 ++ 892, -105, 402, -105, -105, 769, 718, 769, 191, 1123,
1319 ++ 1169, 1214, 1331, 1331, 1358, 1358, 148, 148, 148, -105,
1320 ++ 453, 88, -105, -105, 1028, 1076, 932, 932, 1302, -105,
1321 ++ -105, -105, 504, 667, 1259, 1259, 1259, 1259, 1331, 1331,
1322 ++ 1331, 1331, 1331, 1331, 667, 769, 0, 0, 106, -105,
1323 ++ 90, -105, -105, -105, -105, 104, 892, 892, 148, 84,
1324 ++ -19, 130, 7, 148, -105, 892, -105, -105, -105, 90,
1325 ++ 9, 0, 133, 892, 564, 616, 667, 95, 97, 892,
1326 ++ 980, 99, -105, 101, 667, 892, 892, 100, -105, 148,
1327 ++ 102, -105, 667, 107, -105, -105, 892, 667
1328 ++};
1329 ++
1330 ++/* YYPGOTO[NTERM-NUM]. */
1331 ++static const yytype_int8 yypgoto[] =
1332 ++{
1333 ++ -105, -105, -105, 66, -105, 69, -105, -105, -62, -104,
1334 ++ -20, 79, -92, -82, 103, -91, -13, 5
1335 ++};
1336 ++
1337 ++/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1338 ++ positive, shift that token. If negative, reduce the rule which
1339 ++ number is the opposite. If zero, do what YYDEFACT says.
1340 ++ If YYTABLE_NINF, syntax error. */
1341 ++#define YYTABLE_NINF -1
1342 ++static const yytype_int16 yytable[] =
1343 ++{
1344 ++ 60, 61, 62, 161, 2, 68, 69, 70, 71, 72,
1345 ++ 65, 74, 75, 76, 162, 133, 51, 52, 53, 136,
1346 ++ 55, 201, 139, 44, 217, 137, 133, 54, 66, 140,
1347 ++ 47, 48, 49, 50, 127, 141, 186, 129, 130, 132,
1348 ++ 191, 65, 187, 2, 134, 199, 200, 201, 202, 212,
1349 ++ 219, 56, 221, 142, 45, 125, 46, 126, 57, 145,
1350 ++ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1351 ++ 156, 157, 158, 159, 160, 130, 58, 163, 164, 165,
1352 ++ 166, 167, 209, 210, 168, 169, 170, 171, 172, 173,
1353 ++ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
1354 ++ 184, 185, 63, 67, 191, 191, 59, 1, 2, 73,
1355 ++ 77, 78, 120, 184, 121, 198, 135, 123, 194, 124,
1356 ++ 203, 192, 14, 196, 201, 17, 213, 18, 19, 191,
1357 ++ 212, 207, 211, 218, 233, 20, 223, 227, 228, 21,
1358 ++ 22, 230, 231, 234, 143, 235, 23, 144, 24, 222,
1359 ++ 236, 0, 25, 26, 0, 0, 0, 128, 27, 28,
1360 ++ 29, 30, 31, 0, 0, 0, 0, 0, 0, 32,
1361 ++ 33, 0, 0, 0, 0, 214, 215, 216, 0, 0,
1362 ++ 0, 0, 0, 0, 0, 220, 0, 93, 94, 0,
1363 ++ 95, 0, 0, 224, 96, 97, 79, 0, 0, 229,
1364 ++ 0, 0, 102, 103, 0, 232, 130, 105, 106, 107,
1365 ++ 108, 0, 0, 0, 0, 0, 237, 80, 81, 82,
1366 ++ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1367 ++ 93, 94, 0, 95, 0, 0, 0, 96, 97, 0,
1368 ++ 0, 98, 99, 100, 101, 102, 103, 0, 0, 104,
1369 ++ 105, 106, 107, 108, 79, 109, 0, 0, 110, 111,
1370 ++ 112, 113, 114, 115, 116, 117, 118, 119, 0, 0,
1371 ++ 0, 205, 0, 0, 0, 80, 81, 82, 83, 84,
1372 ++ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1373 ++ 0, 95, 193, 0, 0, 96, 97, 0, 0, 98,
1374 ++ 99, 100, 101, 102, 103, 79, 0, 104, 105, 106,
1375 ++ 107, 108, 0, 109, 0, 0, 110, 111, 112, 113,
1376 ++ 114, 115, 116, 117, 118, 119, 80, 81, 82, 83,
1377 ++ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1378 ++ 94, 0, 95, 195, 0, 0, 96, 97, 0, 0,
1379 ++ 98, 99, 100, 101, 102, 103, 79, 0, 104, 105,
1380 ++ 106, 107, 108, 0, 109, 0, 0, 110, 111, 112,
1381 ++ 113, 114, 115, 116, 117, 118, 119, 80, 81, 82,
1382 ++ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1383 ++ 93, 94, 0, 95, 197, 0, 0, 96, 97, 0,
1384 ++ 0, 98, 99, 100, 101, 102, 103, 79, 0, 104,
1385 ++ 105, 106, 107, 108, 0, 109, 0, 0, 110, 111,
1386 ++ 112, 113, 114, 115, 116, 117, 118, 119, 80, 81,
1387 ++ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1388 ++ 92, 93, 94, 0, 95, 204, 0, 0, 96, 97,
1389 ++ 0, 0, 98, 99, 100, 101, 102, 103, 79, 0,
1390 ++ 104, 105, 106, 107, 108, 0, 109, 0, 0, 110,
1391 ++ 111, 112, 113, 114, 115, 116, 117, 118, 119, 80,
1392 ++ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1393 ++ 91, 92, 93, 94, 206, 95, 0, 0, 0, 96,
1394 ++ 97, 0, 0, 98, 99, 100, 101, 102, 103, 79,
1395 ++ 0, 104, 105, 106, 107, 108, 0, 109, 0, 0,
1396 ++ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
1397 ++ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1398 ++ 90, 91, 92, 93, 94, 0, 95, 0, 0, 0,
1399 ++ 96, 97, 0, 0, 98, 99, 100, 101, 102, 103,
1400 ++ 0, 0, 104, 105, 106, 107, 108, 208, 109, 79,
1401 ++ 0, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1402 ++ 119, 0, 0, 0, 0, 0, 225, 0, 0, 0,
1403 ++ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1404 ++ 90, 91, 92, 93, 94, 0, 95, 0, 0, 0,
1405 ++ 96, 97, 0, 0, 98, 99, 100, 101, 102, 103,
1406 ++ 0, 79, 104, 105, 106, 107, 108, 0, 109, 0,
1407 ++ 0, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1408 ++ 119, 226, 80, 81, 82, 83, 84, 85, 86, 87,
1409 ++ 88, 89, 90, 91, 92, 93, 94, 0, 95, 0,
1410 ++ 0, 0, 96, 97, 0, 0, 98, 99, 100, 101,
1411 ++ 102, 103, 79, 0, 104, 105, 106, 107, 108, 0,
1412 ++ 109, 0, 0, 110, 111, 112, 113, 114, 115, 116,
1413 ++ 117, 118, 119, 80, 81, 82, 83, 84, 85, 86,
1414 ++ 87, 88, 89, 90, 91, 92, 93, 94, 0, 95,
1415 ++ 0, 0, 0, 96, 97, 0, 0, 98, 99, 100,
1416 ++ 101, 102, 103, 79, 0, 104, 105, 106, 107, 108,
1417 ++ 0, 109, 0, 0, 110, 111, 112, 113, 114, 115,
1418 ++ 116, 117, 118, 119, 80, 81, 82, 83, 84, 85,
1419 ++ 86, 87, 88, 89, 90, 91, 92, 93, 94, 0,
1420 ++ 95, 0, 0, 0, 96, 97, 0, 0, 98, 99,
1421 ++ 100, 101, 102, 103, 79, 0, 104, 105, 106, 107,
1422 ++ 108, 0, 0, 0, 0, 110, 111, 112, 113, 114,
1423 ++ 115, 116, 117, 118, 119, 0, 81, 82, 83, 84,
1424 ++ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1425 ++ 0, 95, 0, 0, 0, 96, 97, 0, 0, 98,
1426 ++ 99, 100, 101, 102, 103, 0, 0, 104, 105, 106,
1427 ++ 107, 108, 0, 0, 0, 0, 110, 111, 112, 113,
1428 ++ 114, 115, 116, 117, 118, 119, 1, 2, 0, 0,
1429 ++ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1430 ++ 13, 14, 15, 16, 17, 0, 18, 19, 0, 0,
1431 ++ 0, 0, 0, 0, 20, 0, 0, 0, 21, 22,
1432 ++ 0, 0, 0, 0, 0, 23, 0, 24, 0, 0,
1433 ++ 0, 25, 26, 0, 0, 1, 2, 27, 28, 29,
1434 ++ 30, 31, 0, 0, 0, 0, 0, 0, 32, 33,
1435 ++ 14, 0, 0, 17, 0, 18, 19, 0, 0, 0,
1436 ++ 0, 0, 0, 20, 0, 0, 0, 21, 22, 0,
1437 ++ 0, 0, 0, 0, 23, 0, 24, 0, 0, 0,
1438 ++ 25, 26, 0, 0, 1, 2, 27, 28, 29, 30,
1439 ++ 31, 0, 0, 0, 0, 0, 0, 32, 33, 14,
1440 ++ 0, 0, 17, 0, 18, 19, 88, 89, 90, 91,
1441 ++ 92, 93, 94, 0, 95, 0, 21, 22, 96, 97,
1442 ++ 0, 0, 0, 23, 0, 24, 102, 103, 0, 25,
1443 ++ 26, 105, 106, 107, 108, 27, 28, 29, 30, -1,
1444 ++ 0, 0, 0, 0, 0, 0, 32, 33, 82, 83,
1445 ++ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1446 ++ 94, 0, 95, 0, 0, 0, 96, 97, 0, 0,
1447 ++ 98, 99, 100, 101, 102, 103, 0, 0, 104, 105,
1448 ++ 106, 107, 108, 0, 0, 0, 0, 110, 111, 112,
1449 ++ 113, 114, 115, 116, 117, 118, 119, 83, 84, 85,
1450 ++ 86, 87, 88, 89, 90, 91, 92, 93, 94, 0,
1451 ++ 95, 0, 0, 0, 96, 97, 0, 0, 0, 99,
1452 ++ 100, 101, 102, 103, 0, 0, 104, 105, 106, 107,
1453 ++ 108, 0, 0, 0, 0, 110, 111, 112, 113, 114,
1454 ++ 115, 116, 117, 118, 119, 83, 84, 85, 86, 87,
1455 ++ 88, 89, 90, 91, 92, 93, 94, 0, 95, 0,
1456 ++ 0, 0, 96, 97, 0, 0, 0, 0, 100, 101,
1457 ++ 102, 103, 0, 0, 104, 105, 106, 107, 108, 0,
1458 ++ 0, 0, 0, 110, 111, 112, 113, 114, 115, 116,
1459 ++ 117, 118, 119, 84, 85, 86, 87, 88, 89, 90,
1460 ++ 91, 92, 93, 94, 0, 95, 0, 0, 0, 96,
1461 ++ 97, 0, 0, 0, 0, 100, 101, 102, 103, 0,
1462 ++ 0, 104, 105, 106, 107, 108, 0, 0, 0, 0,
1463 ++ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
1464 ++ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1465 ++ 0, 95, 0, 0, 0, 96, 97, 0, 0, 0,
1466 ++ 0, 100, 101, 102, 103, 0, 0, 104, 105, 106,
1467 ++ 107, 108, 0, 0, 0, 0, 110, 111, 112, 113,
1468 ++ 114, 115, 116, 117, 118, 119, 86, 87, 88, 89,
1469 ++ 90, 91, 92, 93, 94, 0, 95, 0, 0, 0,
1470 ++ 96, 97, 0, 0, 0, 0, 100, 101, 102, 103,
1471 ++ 0, 0, 104, 105, 106, 107, 108, 0, 0, 0,
1472 ++ 0, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1473 ++ 119, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1474 ++ 0, 95, 0, 0, 0, 96, 97, 0, 0, 0,
1475 ++ 0, 100, 101, 102, 103, 0, 0, 104, 105, 106,
1476 ++ 107, 108, 0, 0, 0, 0, 0, 0, 0, 0,
1477 ++ 114, 115, 116, 117, 118, 119, 88, 89, 90, 91,
1478 ++ 92, 93, 94, 0, 95, 0, 0, 0, 96, 97,
1479 ++ 0, 0, 0, 0, 100, 101, 102, 103, 0, 0,
1480 ++ -1, 105, 106, 107, 108, 88, 89, 90, 91, 92,
1481 ++ 93, 94, 0, 95, 0, 0, 0, 96, 97, 0,
1482 ++ 0, 0, 0, 100, 101, 102, 103, 0, 0, 104,
1483 ++ 105, 106, 107, 108, 90, 91, 92, 93, 94, 0,
1484 ++ 95, 0, 0, 0, 96, 97, 0, 0, 0, 0,
1485 ++ 0, 0, 102, 103, 0, 0, 0, 105, 106, 107,
1486 ++ 108
1487 ++};
1488 ++
1489 ++static const yytype_int16 yycheck[] =
1490 ++{
1491 ++ 20, 21, 22, 95, 4, 25, 26, 27, 28, 29,
1492 ++ 23, 31, 32, 33, 96, 25, 11, 12, 13, 36,
1493 ++ 15, 40, 36, 8, 43, 42, 25, 42, 23, 43,
1494 ++ 7, 8, 9, 10, 54, 45, 36, 57, 58, 59,
1495 ++ 122, 54, 42, 4, 43, 136, 137, 40, 139, 40,
1496 ++ 43, 7, 43, 73, 8, 8, 10, 10, 42, 79,
1497 ++ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1498 ++ 90, 91, 92, 93, 94, 95, 42, 97, 98, 99,
1499 ++ 100, 101, 186, 187, 104, 105, 106, 107, 108, 109,
1500 ++ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
1501 ++ 120, 121, 23, 24, 186, 187, 42, 3, 4, 42,
1502 ++ 0, 25, 25, 133, 6, 135, 43, 8, 43, 8,
1503 ++ 140, 8, 18, 25, 40, 21, 22, 23, 24, 211,
1504 ++ 40, 43, 26, 3, 226, 31, 3, 42, 41, 35,
1505 ++ 36, 42, 41, 43, 78, 43, 42, 78, 44, 211,
1506 ++ 43, -1, 48, 49, -1, -1, -1, 54, 54, 55,
1507 ++ 56, 57, 58, -1, -1, -1, -1, -1, -1, 65,
1508 ++ 66, -1, -1, -1, -1, 195, 196, 197, -1, -1,
1509 ++ -1, -1, -1, -1, -1, 205, -1, 39, 40, -1,
1510 ++ 42, -1, -1, 213, 46, 47, 5, -1, -1, 219,
1511 ++ -1, -1, 54, 55, -1, 225, 226, 59, 60, 61,
1512 ++ 62, -1, -1, -1, -1, -1, 236, 26, 27, 28,
1513 ++ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1514 ++ 39, 40, -1, 42, -1, -1, -1, 46, 47, -1,
1515 ++ -1, 50, 51, 52, 53, 54, 55, -1, -1, 58,
1516 ++ 59, 60, 61, 62, 5, 64, -1, -1, 67, 68,
1517 ++ 69, 70, 71, 72, 73, 74, 75, 76, -1, -1,
1518 ++ -1, 80, -1, -1, -1, 26, 27, 28, 29, 30,
1519 ++ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1520 ++ -1, 42, 43, -1, -1, 46, 47, -1, -1, 50,
1521 ++ 51, 52, 53, 54, 55, 5, -1, 58, 59, 60,
1522 ++ 61, 62, -1, 64, -1, -1, 67, 68, 69, 70,
1523 ++ 71, 72, 73, 74, 75, 76, 26, 27, 28, 29,
1524 ++ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1525 ++ 40, -1, 42, 43, -1, -1, 46, 47, -1, -1,
1526 ++ 50, 51, 52, 53, 54, 55, 5, -1, 58, 59,
1527 ++ 60, 61, 62, -1, 64, -1, -1, 67, 68, 69,
1528 ++ 70, 71, 72, 73, 74, 75, 76, 26, 27, 28,
1529 ++ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1530 ++ 39, 40, -1, 42, 43, -1, -1, 46, 47, -1,
1531 ++ -1, 50, 51, 52, 53, 54, 55, 5, -1, 58,
1532 ++ 59, 60, 61, 62, -1, 64, -1, -1, 67, 68,
1533 ++ 69, 70, 71, 72, 73, 74, 75, 76, 26, 27,
1534 ++ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1535 ++ 38, 39, 40, -1, 42, 43, -1, -1, 46, 47,
1536 ++ -1, -1, 50, 51, 52, 53, 54, 55, 5, -1,
1537 ++ 58, 59, 60, 61, 62, -1, 64, -1, -1, 67,
1538 ++ 68, 69, 70, 71, 72, 73, 74, 75, 76, 26,
1539 ++ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1540 ++ 37, 38, 39, 40, 41, 42, -1, -1, -1, 46,
1541 ++ 47, -1, -1, 50, 51, 52, 53, 54, 55, 5,
1542 ++ -1, 58, 59, 60, 61, 62, -1, 64, -1, -1,
1543 ++ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1544 ++ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1545 ++ 36, 37, 38, 39, 40, -1, 42, -1, -1, -1,
1546 ++ 46, 47, -1, -1, 50, 51, 52, 53, 54, 55,
1547 ++ -1, -1, 58, 59, 60, 61, 62, 63, 64, 5,
1548 ++ -1, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1549 ++ 76, -1, -1, -1, -1, -1, 22, -1, -1, -1,
1550 ++ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1551 ++ 36, 37, 38, 39, 40, -1, 42, -1, -1, -1,
1552 ++ 46, 47, -1, -1, 50, 51, 52, 53, 54, 55,
1553 ++ -1, 5, 58, 59, 60, 61, 62, -1, 64, -1,
1554 ++ -1, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1555 ++ 76, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1556 ++ 34, 35, 36, 37, 38, 39, 40, -1, 42, -1,
1557 ++ -1, -1, 46, 47, -1, -1, 50, 51, 52, 53,
1558 ++ 54, 55, 5, -1, 58, 59, 60, 61, 62, -1,
1559 ++ 64, -1, -1, 67, 68, 69, 70, 71, 72, 73,
1560 ++ 74, 75, 76, 26, 27, 28, 29, 30, 31, 32,
1561 ++ 33, 34, 35, 36, 37, 38, 39, 40, -1, 42,
1562 ++ -1, -1, -1, 46, 47, -1, -1, 50, 51, 52,
1563 ++ 53, 54, 55, 5, -1, 58, 59, 60, 61, 62,
1564 ++ -1, 64, -1, -1, 67, 68, 69, 70, 71, 72,
1565 ++ 73, 74, 75, 76, 26, 27, 28, 29, 30, 31,
1566 ++ 32, 33, 34, 35, 36, 37, 38, 39, 40, -1,
1567 ++ 42, -1, -1, -1, 46, 47, -1, -1, 50, 51,
1568 ++ 52, 53, 54, 55, 5, -1, 58, 59, 60, 61,
1569 ++ 62, -1, -1, -1, -1, 67, 68, 69, 70, 71,
1570 ++ 72, 73, 74, 75, 76, -1, 27, 28, 29, 30,
1571 ++ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1572 ++ -1, 42, -1, -1, -1, 46, 47, -1, -1, 50,
1573 ++ 51, 52, 53, 54, 55, -1, -1, 58, 59, 60,
1574 ++ 61, 62, -1, -1, -1, -1, 67, 68, 69, 70,
1575 ++ 71, 72, 73, 74, 75, 76, 3, 4, -1, -1,
1576 ++ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1577 ++ 17, 18, 19, 20, 21, -1, 23, 24, -1, -1,
1578 ++ -1, -1, -1, -1, 31, -1, -1, -1, 35, 36,
1579 ++ -1, -1, -1, -1, -1, 42, -1, 44, -1, -1,
1580 ++ -1, 48, 49, -1, -1, 3, 4, 54, 55, 56,
1581 ++ 57, 58, -1, -1, -1, -1, -1, -1, 65, 66,
1582 ++ 18, -1, -1, 21, -1, 23, 24, -1, -1, -1,
1583 ++ -1, -1, -1, 31, -1, -1, -1, 35, 36, -1,
1584 ++ -1, -1, -1, -1, 42, -1, 44, -1, -1, -1,
1585 ++ 48, 49, -1, -1, 3, 4, 54, 55, 56, 57,
1586 ++ 58, -1, -1, -1, -1, -1, -1, 65, 66, 18,
1587 ++ -1, -1, 21, -1, 23, 24, 34, 35, 36, 37,
1588 ++ 38, 39, 40, -1, 42, -1, 35, 36, 46, 47,
1589 ++ -1, -1, -1, 42, -1, 44, 54, 55, -1, 48,
1590 ++ 49, 59, 60, 61, 62, 54, 55, 56, 57, 58,
1591 ++ -1, -1, -1, -1, -1, -1, 65, 66, 28, 29,
1592 ++ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1593 ++ 40, -1, 42, -1, -1, -1, 46, 47, -1, -1,
1594 ++ 50, 51, 52, 53, 54, 55, -1, -1, 58, 59,
1595 ++ 60, 61, 62, -1, -1, -1, -1, 67, 68, 69,
1596 ++ 70, 71, 72, 73, 74, 75, 76, 29, 30, 31,
1597 ++ 32, 33, 34, 35, 36, 37, 38, 39, 40, -1,
1598 ++ 42, -1, -1, -1, 46, 47, -1, -1, -1, 51,
1599 ++ 52, 53, 54, 55, -1, -1, 58, 59, 60, 61,
1600 ++ 62, -1, -1, -1, -1, 67, 68, 69, 70, 71,
1601 ++ 72, 73, 74, 75, 76, 29, 30, 31, 32, 33,
1602 ++ 34, 35, 36, 37, 38, 39, 40, -1, 42, -1,
1603 ++ -1, -1, 46, 47, -1, -1, -1, -1, 52, 53,
1604 ++ 54, 55, -1, -1, 58, 59, 60, 61, 62, -1,
1605 ++ -1, -1, -1, 67, 68, 69, 70, 71, 72, 73,
1606 ++ 74, 75, 76, 30, 31, 32, 33, 34, 35, 36,
1607 ++ 37, 38, 39, 40, -1, 42, -1, -1, -1, 46,
1608 ++ 47, -1, -1, -1, -1, 52, 53, 54, 55, -1,
1609 ++ -1, 58, 59, 60, 61, 62, -1, -1, -1, -1,
1610 ++ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1611 ++ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1612 ++ -1, 42, -1, -1, -1, 46, 47, -1, -1, -1,
1613 ++ -1, 52, 53, 54, 55, -1, -1, 58, 59, 60,
1614 ++ 61, 62, -1, -1, -1, -1, 67, 68, 69, 70,
1615 ++ 71, 72, 73, 74, 75, 76, 32, 33, 34, 35,
1616 ++ 36, 37, 38, 39, 40, -1, 42, -1, -1, -1,
1617 ++ 46, 47, -1, -1, -1, -1, 52, 53, 54, 55,
1618 ++ -1, -1, 58, 59, 60, 61, 62, -1, -1, -1,
1619 ++ -1, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1620 ++ 76, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1621 ++ -1, 42, -1, -1, -1, 46, 47, -1, -1, -1,
1622 ++ -1, 52, 53, 54, 55, -1, -1, 58, 59, 60,
1623 ++ 61, 62, -1, -1, -1, -1, -1, -1, -1, -1,
1624 ++ 71, 72, 73, 74, 75, 76, 34, 35, 36, 37,
1625 ++ 38, 39, 40, -1, 42, -1, -1, -1, 46, 47,
1626 ++ -1, -1, -1, -1, 52, 53, 54, 55, -1, -1,
1627 ++ 58, 59, 60, 61, 62, 34, 35, 36, 37, 38,
1628 ++ 39, 40, -1, 42, -1, -1, -1, 46, 47, -1,
1629 ++ -1, -1, -1, 52, 53, 54, 55, -1, -1, 58,
1630 ++ 59, 60, 61, 62, 36, 37, 38, 39, 40, -1,
1631 ++ 42, -1, -1, -1, 46, 47, -1, -1, -1, -1,
1632 ++ -1, -1, 54, 55, -1, -1, -1, 59, 60, 61,
1633 ++ 62
1634 ++};
1635 ++
1636 ++/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1637 ++ symbol of state STATE-NUM. */
1638 ++static const yytype_uint8 yystos[] =
1639 ++{
1640 ++ 0, 3, 4, 7, 8, 9, 10, 11, 12, 13,
1641 ++ 14, 15, 16, 17, 18, 19, 20, 21, 23, 24,
1642 ++ 31, 35, 36, 42, 44, 48, 49, 54, 55, 56,
1643 ++ 57, 58, 65, 66, 82, 83, 84, 85, 86, 91,
1644 ++ 92, 94, 97, 98, 8, 8, 10, 7, 8, 9,
1645 ++ 10, 98, 98, 98, 42, 98, 7, 42, 42, 42,
1646 ++ 91, 91, 91, 92, 95, 97, 98, 92, 91, 91,
1647 ++ 91, 91, 91, 42, 91, 91, 91, 0, 25, 5,
1648 ++ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1649 ++ 36, 37, 38, 39, 40, 42, 46, 47, 50, 51,
1650 ++ 52, 53, 54, 55, 58, 59, 60, 61, 62, 64,
1651 ++ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1652 ++ 25, 6, 87, 8, 8, 8, 10, 91, 95, 91,
1653 ++ 91, 93, 91, 25, 43, 43, 36, 42, 96, 36,
1654 ++ 43, 45, 91, 84, 86, 91, 91, 91, 91, 91,
1655 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1656 ++ 91, 93, 94, 91, 91, 91, 91, 91, 91, 91,
1657 ++ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1658 ++ 91, 91, 91, 91, 91, 91, 36, 42, 88, 89,
1659 ++ 90, 94, 8, 43, 43, 43, 25, 43, 91, 96,
1660 ++ 96, 40, 96, 91, 43, 80, 41, 43, 63, 90,
1661 ++ 90, 26, 40, 22, 91, 91, 91, 43, 3, 43,
1662 ++ 91, 43, 89, 3, 91, 22, 25, 42, 41, 91,
1663 ++ 42, 41, 91, 93, 43, 43, 43, 91
1664 ++};
1665 ++
1666 ++#define yyerrok (yyerrstatus = 0)
1667 ++#define yyclearin (yychar = YYEMPTY)
1668 ++#define YYEMPTY (-2)
1669 ++#define YYEOF 0
1670 ++
1671 ++#define YYACCEPT goto yyacceptlab
1672 ++#define YYABORT goto yyabortlab
1673 ++#define YYERROR goto yyerrorlab
1674 ++
1675 ++
1676 ++/* Like YYERROR except do call yyerror. This remains here temporarily
1677 ++ to ease the transition to the new meaning of YYERROR, for GCC.
1678 ++ Once GCC version 2 has supplanted version 1, this can go. */
1679 ++
1680 ++#define YYFAIL goto yyerrlab
1681 ++
1682 ++#define YYRECOVERING() (!!yyerrstatus)
1683 ++
1684 ++#define YYBACKUP(Token, Value) \
1685 ++do \
1686 ++ if (yychar == YYEMPTY && yylen == 1) \
1687 ++ { \
1688 ++ yychar = (Token); \
1689 ++ yylval = (Value); \
1690 ++ yytoken = YYTRANSLATE (yychar); \
1691 ++ YYPOPSTACK (1); \
1692 ++ goto yybackup; \
1693 ++ } \
1694 ++ else \
1695 ++ { \
1696 ++ yyerror (YY_("syntax error: cannot back up")); \
1697 ++ YYERROR; \
1698 ++ } \
1699 ++while (YYID (0))
1700 ++
1701 ++
1702 ++#define YYTERROR 1
1703 ++#define YYERRCODE 256
1704 ++
1705 ++
1706 ++/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1707 ++ If N is 0, then set CURRENT to the empty location which ends
1708 ++ the previous symbol: RHS[0] (always defined). */
1709 ++
1710 ++#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1711 ++#ifndef YYLLOC_DEFAULT
1712 ++# define YYLLOC_DEFAULT(Current, Rhs, N) \
1713 ++ do \
1714 ++ if (YYID (N)) \
1715 ++ { \
1716 ++ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1717 ++ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1718 ++ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1719 ++ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1720 ++ } \
1721 ++ else \
1722 ++ { \
1723 ++ (Current).first_line = (Current).last_line = \
1724 ++ YYRHSLOC (Rhs, 0).last_line; \
1725 ++ (Current).first_column = (Current).last_column = \
1726 ++ YYRHSLOC (Rhs, 0).last_column; \
1727 ++ } \
1728 ++ while (YYID (0))
1729 ++#endif
1730 ++
1731 ++
1732 ++/* YY_LOCATION_PRINT -- Print the location on the stream.
1733 ++ This macro was not mandated originally: define only if we know
1734 ++ we won't break user code: when these are the locations we know. */
1735 ++
1736 ++#ifndef YY_LOCATION_PRINT
1737 ++# if YYLTYPE_IS_TRIVIAL
1738 ++# define YY_LOCATION_PRINT(File, Loc) \
1739 ++ fprintf (File, "%d.%d-%d.%d", \
1740 ++ (Loc).first_line, (Loc).first_column, \
1741 ++ (Loc).last_line, (Loc).last_column)
1742 ++# else
1743 ++# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1744 ++# endif
1745 ++#endif
1746 ++
1747 ++
1748 ++/* YYLEX -- calling `yylex' with the right arguments. */
1749 ++
1750 ++#ifdef YYLEX_PARAM
1751 ++# define YYLEX yylex (YYLEX_PARAM)
1752 ++#else
1753 ++# define YYLEX yylex ()
1754 ++#endif
1755 ++
1756 ++/* Enable debugging if requested. */
1757 ++#if YYDEBUG
1758 ++
1759 ++# ifndef YYFPRINTF
1760 ++# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1761 ++# define YYFPRINTF fprintf
1762 ++# endif
1763 ++
1764 ++# define YYDPRINTF(Args) \
1765 ++do { \
1766 ++ if (yydebug) \
1767 ++ YYFPRINTF Args; \
1768 ++} while (YYID (0))
1769 ++
1770 ++# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1771 ++do { \
1772 ++ if (yydebug) \
1773 ++ { \
1774 ++ YYFPRINTF (stderr, "%s ", Title); \
1775 ++ yy_symbol_print (stderr, \
1776 ++ Type, Value); \
1777 ++ YYFPRINTF (stderr, "\n"); \
1778 ++ } \
1779 ++} while (YYID (0))
1780 ++
1781 ++
1782 ++/*--------------------------------.
1783 ++| Print this symbol on YYOUTPUT. |
1784 ++`--------------------------------*/
1785 ++
1786 ++/*ARGSUSED*/
1787 ++#if (defined __STDC__ || defined __C99__FUNC__ \
1788 ++ || defined __cplusplus || defined _MSC_VER)
1789 ++static void
1790 ++yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1791 ++#else
1792 ++static void
1793 ++yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1794 ++ FILE *yyoutput;
1795 ++ int yytype;
1796 ++ YYSTYPE const * const yyvaluep;
1797 ++#endif
1798 ++{
1799 ++ if (!yyvaluep)
1800 ++ return;
1801 ++# ifdef YYPRINT
1802 ++ if (yytype < YYNTOKENS)
1803 ++ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1804 ++# else
1805 ++ YYUSE (yyoutput);
1806 ++# endif
1807 ++ switch (yytype)
1808 ++ {
1809 ++ default:
1810 ++ break;
1811 ++ }
1812 ++}
1813 ++
1814 ++
1815 ++/*--------------------------------.
1816 ++| Print this symbol on YYOUTPUT. |
1817 ++`--------------------------------*/
1818 ++
1819 ++#if (defined __STDC__ || defined __C99__FUNC__ \
1820 ++ || defined __cplusplus || defined _MSC_VER)
1821 ++static void
1822 ++yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1823 ++#else
1824 ++static void
1825 ++yy_symbol_print (yyoutput, yytype, yyvaluep)
1826 ++ FILE *yyoutput;
1827 ++ int yytype;
1828 ++ YYSTYPE const * const yyvaluep;
1829 ++#endif
1830 ++{
1831 ++ if (yytype < YYNTOKENS)
1832 ++ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1833 ++ else
1834 ++ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1835 ++
1836 ++ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1837 ++ YYFPRINTF (yyoutput, ")");
1838 ++}
1839 ++
1840 ++/*------------------------------------------------------------------.
1841 ++| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1842 ++| TOP (included). |
1843 ++`------------------------------------------------------------------*/
1844 ++
1845 ++#if (defined __STDC__ || defined __C99__FUNC__ \
1846 ++ || defined __cplusplus || defined _MSC_VER)
1847 ++static void
1848 ++yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1849 ++#else
1850 ++static void
1851 ++yy_stack_print (bottom, top)
1852 ++ yytype_int16 *bottom;
1853 ++ yytype_int16 *top;
1854 ++#endif
1855 ++{
1856 ++ YYFPRINTF (stderr, "Stack now");
1857 ++ for (; bottom <= top; ++bottom)
1858 ++ YYFPRINTF (stderr, " %d", *bottom);
1859 ++ YYFPRINTF (stderr, "\n");
1860 ++}
1861 ++
1862 ++# define YY_STACK_PRINT(Bottom, Top) \
1863 ++do { \
1864 ++ if (yydebug) \
1865 ++ yy_stack_print ((Bottom), (Top)); \
1866 ++} while (YYID (0))
1867 ++
1868 ++
1869 ++/*------------------------------------------------.
1870 ++| Report that the YYRULE is going to be reduced. |
1871 ++`------------------------------------------------*/
1872 ++
1873 ++#if (defined __STDC__ || defined __C99__FUNC__ \
1874 ++ || defined __cplusplus || defined _MSC_VER)
1875 ++static void
1876 ++yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1877 ++#else
1878 ++static void
1879 ++yy_reduce_print (yyvsp, yyrule)
1880 ++ YYSTYPE *yyvsp;
1881 ++ int yyrule;
1882 ++#endif
1883 ++{
1884 ++ int yynrhs = yyr2[yyrule];
1885 ++ int yyi;
1886 ++ unsigned long int yylno = yyrline[yyrule];
1887 ++ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1888 ++ yyrule - 1, yylno);
1889 ++ /* The symbols being reduced. */
1890 ++ for (yyi = 0; yyi < yynrhs; yyi++)
1891 ++ {
1892 ++ fprintf (stderr, " $%d = ", yyi + 1);
1893 ++ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1894 ++ &(yyvsp[(yyi + 1) - (yynrhs)])
1895 ++ );
1896 ++ fprintf (stderr, "\n");
1897 ++ }
1898 ++}
1899 ++
1900 ++# define YY_REDUCE_PRINT(Rule) \
1901 ++do { \
1902 ++ if (yydebug) \
1903 ++ yy_reduce_print (yyvsp, Rule); \
1904 ++} while (YYID (0))
1905 ++
1906 ++/* Nonzero means print parse trace. It is left uninitialized so that
1907 ++ multiple parsers can coexist. */
1908 ++int yydebug;
1909 ++#else /* !YYDEBUG */
1910 ++# define YYDPRINTF(Args)
1911 ++# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1912 ++# define YY_STACK_PRINT(Bottom, Top)
1913 ++# define YY_REDUCE_PRINT(Rule)
1914 ++#endif /* !YYDEBUG */
1915 ++
1916 ++
1917 ++/* YYINITDEPTH -- initial size of the parser's stacks. */
1918 ++#ifndef YYINITDEPTH
1919 ++# define YYINITDEPTH 200
1920 ++#endif
1921 ++
1922 ++/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1923 ++ if the built-in stack extension method is used).
1924 ++
1925 ++ Do not make this value too large; the results are undefined if
1926 ++ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1927 ++ evaluated with infinite-precision integer arithmetic. */
1928 ++
1929 ++#ifndef YYMAXDEPTH
1930 ++# define YYMAXDEPTH 10000
1931 ++#endif
1932 ++
1933 ++
1934 ++
1935 ++#if YYERROR_VERBOSE
1936 ++
1937 ++# ifndef yystrlen
1938 ++# if defined __GLIBC__ && defined _STRING_H
1939 ++# define yystrlen strlen
1940 ++# else
1941 ++/* Return the length of YYSTR. */
1942 ++#if (defined __STDC__ || defined __C99__FUNC__ \
1943 ++ || defined __cplusplus || defined _MSC_VER)
1944 ++static YYSIZE_T
1945 ++yystrlen (const char *yystr)
1946 ++#else
1947 ++static YYSIZE_T
1948 ++yystrlen (yystr)
1949 ++ const char *yystr;
1950 ++#endif
1951 ++{
1952 ++ YYSIZE_T yylen;
1953 ++ for (yylen = 0; yystr[yylen]; yylen++)
1954 ++ continue;
1955 ++ return yylen;
1956 ++}
1957 ++# endif
1958 ++# endif
1959 ++
1960 ++# ifndef yystpcpy
1961 ++# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1962 ++# define yystpcpy stpcpy
1963 ++# else
1964 ++/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1965 ++ YYDEST. */
1966 ++#if (defined __STDC__ || defined __C99__FUNC__ \
1967 ++ || defined __cplusplus || defined _MSC_VER)
1968 ++static char *
1969 ++yystpcpy (char *yydest, const char *yysrc)
1970 ++#else
1971 ++static char *
1972 ++yystpcpy (yydest, yysrc)
1973 ++ char *yydest;
1974 ++ const char *yysrc;
1975 ++#endif
1976 ++{
1977 ++ char *yyd = yydest;
1978 ++ const char *yys = yysrc;
1979 ++
1980 ++ while ((*yyd++ = *yys++) != '\0')
1981 ++ continue;
1982 ++
1983 ++ return yyd - 1;
1984 ++}
1985 ++# endif
1986 ++# endif
1987 ++
1988 ++# ifndef yytnamerr
1989 ++/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1990 ++ quotes and backslashes, so that it's suitable for yyerror. The
1991 ++ heuristic is that double-quoting is unnecessary unless the string
1992 ++ contains an apostrophe, a comma, or backslash (other than
1993 ++ backslash-backslash). YYSTR is taken from yytname. If YYRES is
1994 ++ null, do not copy; instead, return the length of what the result
1995 ++ would have been. */
1996 ++static YYSIZE_T
1997 ++yytnamerr (char *yyres, const char *yystr)
1998 ++{
1999 ++ if (*yystr == '"')
2000 ++ {
2001 ++ YYSIZE_T yyn = 0;
2002 ++ char const *yyp = yystr;
2003 ++
2004 ++ for (;;)
2005 ++ switch (*++yyp)
2006 ++ {
2007 ++ case '\'':
2008 ++ case ',':
2009 ++ goto do_not_strip_quotes;
2010 ++
2011 ++ case '\\':
2012 ++ if (*++yyp != '\\')
2013 ++ goto do_not_strip_quotes;
2014 ++ /* Fall through. */
2015 ++ default:
2016 ++ if (yyres)
2017 ++ yyres[yyn] = *yyp;
2018 ++ yyn++;
2019 ++ break;
2020 ++
2021 ++ case '"':
2022 ++ if (yyres)
2023 ++ yyres[yyn] = '\0';
2024 ++ return yyn;
2025 ++ }
2026 ++ do_not_strip_quotes: ;
2027 ++ }
2028 ++
2029 ++ if (! yyres)
2030 ++ return yystrlen (yystr);
2031 ++
2032 ++ return yystpcpy (yyres, yystr) - yyres;
2033 ++}
2034 ++# endif
2035 ++
2036 ++/* Copy into YYRESULT an error message about the unexpected token
2037 ++ YYCHAR while in state YYSTATE. Return the number of bytes copied,
2038 ++ including the terminating null byte. If YYRESULT is null, do not
2039 ++ copy anything; just return the number of bytes that would be
2040 ++ copied. As a special case, return 0 if an ordinary "syntax error"
2041 ++ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2042 ++ size calculation. */
2043 ++static YYSIZE_T
2044 ++yysyntax_error (char *yyresult, int yystate, int yychar)
2045 ++{
2046 ++ int yyn = yypact[yystate];
2047 ++
2048 ++ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2049 ++ return 0;
2050 ++ else
2051 ++ {
2052 ++ int yytype = YYTRANSLATE (yychar);
2053 ++ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2054 ++ YYSIZE_T yysize = yysize0;
2055 ++ YYSIZE_T yysize1;
2056 ++ int yysize_overflow = 0;
2057 ++ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2058 ++ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2059 ++ int yyx;
2060 ++
2061 ++# if 0
2062 ++ /* This is so xgettext sees the translatable formats that are
2063 ++ constructed on the fly. */
2064 ++ YY_("syntax error, unexpected %s");
2065 ++ YY_("syntax error, unexpected %s, expecting %s");
2066 ++ YY_("syntax error, unexpected %s, expecting %s or %s");
2067 ++ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2068 ++ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2069 ++# endif
2070 ++ char *yyfmt;
2071 ++ char const *yyf;
2072 ++ static char const yyunexpected[] = "syntax error, unexpected %s";
2073 ++ static char const yyexpecting[] = ", expecting %s";
2074 ++ static char const yyor[] = " or %s";
2075 ++ char yyformat[sizeof yyunexpected
2076 ++ + sizeof yyexpecting - 1
2077 ++ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2078 ++ * (sizeof yyor - 1))];
2079 ++ char const *yyprefix = yyexpecting;
2080 ++
2081 ++ /* Start YYX at -YYN if negative to avoid negative indexes in
2082 ++ YYCHECK. */
2083 ++ int yyxbegin = yyn < 0 ? -yyn : 0;
2084 ++
2085 ++ /* Stay within bounds of both yycheck and yytname. */
2086 ++ int yychecklim = YYLAST - yyn + 1;
2087 ++ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2088 ++ int yycount = 1;
2089 ++
2090 ++ yyarg[0] = yytname[yytype];
2091 ++ yyfmt = yystpcpy (yyformat, yyunexpected);
2092 ++
2093 ++ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2094 ++ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2095 ++ {
2096 ++ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2097 ++ {
2098 ++ yycount = 1;
2099 ++ yysize = yysize0;
2100 ++ yyformat[sizeof yyunexpected - 1] = '\0';
2101 ++ break;
2102 ++ }
2103 ++ yyarg[yycount++] = yytname[yyx];
2104 ++ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2105 ++ yysize_overflow |= (yysize1 < yysize);
2106 ++ yysize = yysize1;
2107 ++ yyfmt = yystpcpy (yyfmt, yyprefix);
2108 ++ yyprefix = yyor;
2109 ++ }
2110 ++
2111 ++ yyf = YY_(yyformat);
2112 ++ yysize1 = yysize + yystrlen (yyf);
2113 ++ yysize_overflow |= (yysize1 < yysize);
2114 ++ yysize = yysize1;
2115 ++
2116 ++ if (yysize_overflow)
2117 ++ return YYSIZE_MAXIMUM;
2118 ++
2119 ++ if (yyresult)
2120 ++ {
2121 ++ /* Avoid sprintf, as that infringes on the user's name space.
2122 ++ Don't have undefined behavior even if the translation
2123 ++ produced a string with the wrong number of "%s"s. */
2124 ++ char *yyp = yyresult;
2125 ++ int yyi = 0;
2126 ++ while ((*yyp = *yyf) != '\0')
2127 ++ {
2128 ++ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2129 ++ {
2130 ++ yyp += yytnamerr (yyp, yyarg[yyi++]);
2131 ++ yyf += 2;
2132 ++ }
2133 ++ else
2134 ++ {
2135 ++ yyp++;
2136 ++ yyf++;
2137 ++ }
2138 ++ }
2139 ++ }
2140 ++ return yysize;
2141 ++ }
2142 ++}
2143 ++#endif /* YYERROR_VERBOSE */
2144 ++
2145 ++
2146 ++/*-----------------------------------------------.
2147 ++| Release the memory associated to this symbol. |
2148 ++`-----------------------------------------------*/
2149 ++
2150 ++/*ARGSUSED*/
2151 ++#if (defined __STDC__ || defined __C99__FUNC__ \
2152 ++ || defined __cplusplus || defined _MSC_VER)
2153 ++static void
2154 ++yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2155 ++#else
2156 ++static void
2157 ++yydestruct (yymsg, yytype, yyvaluep)
2158 ++ const char *yymsg;
2159 ++ int yytype;
2160 ++ YYSTYPE *yyvaluep;
2161 ++#endif
2162 ++{
2163 ++ YYUSE (yyvaluep);
2164 ++
2165 ++ if (!yymsg)
2166 ++ yymsg = "Deleting";
2167 ++ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2168 ++
2169 ++ switch (yytype)
2170 ++ {
2171 ++
2172 ++ default:
2173 ++ break;
2174 ++ }
2175 ++}
2176 ++
2177 ++
2178 ++/* Prevent warnings from -Wmissing-prototypes. */
2179 ++
2180 ++#ifdef YYPARSE_PARAM
2181 ++#if defined __STDC__ || defined __cplusplus
2182 ++int yyparse (void *YYPARSE_PARAM);
2183 ++#else
2184 ++int yyparse ();
2185 ++#endif
2186 ++#else /* ! YYPARSE_PARAM */
2187 ++#if defined __STDC__ || defined __cplusplus
2188 ++int yyparse (void);
2189 ++#else
2190 ++int yyparse ();
2191 ++#endif
2192 ++#endif /* ! YYPARSE_PARAM */
2193 ++
2194 ++
2195 ++
2196 ++/* The look-ahead symbol. */
2197 ++int yychar;
2198 ++
2199 ++/* The semantic value of the look-ahead symbol. */
2200 ++YYSTYPE yylval;
2201 ++
2202 ++/* Number of syntax errors so far. */
2203 ++int yynerrs;
2204 ++
2205 ++
2206 ++
2207 ++/*----------.
2208 ++| yyparse. |
2209 ++`----------*/
2210 ++
2211 ++#ifdef YYPARSE_PARAM
2212 ++#if (defined __STDC__ || defined __C99__FUNC__ \
2213 ++ || defined __cplusplus || defined _MSC_VER)
2214 ++int
2215 ++yyparse (void *YYPARSE_PARAM)
2216 ++#else
2217 ++int
2218 ++yyparse (YYPARSE_PARAM)
2219 ++ void *YYPARSE_PARAM;
2220 ++#endif
2221 ++#else /* ! YYPARSE_PARAM */
2222 ++#if (defined __STDC__ || defined __C99__FUNC__ \
2223 ++ || defined __cplusplus || defined _MSC_VER)
2224 ++int
2225 ++yyparse (void)
2226 ++#else
2227 ++int
2228 ++yyparse ()
2229 ++
2230 ++#endif
2231 ++#endif
2232 ++{
2233 ++
2234 ++ int yystate;
2235 ++ int yyn;
2236 ++ int yyresult;
2237 ++ /* Number of tokens to shift before error messages enabled. */
2238 ++ int yyerrstatus;
2239 ++ /* Look-ahead token as an internal (translated) token number. */
2240 ++ int yytoken = 0;
2241 ++#if YYERROR_VERBOSE
2242 ++ /* Buffer for error messages, and its allocated size. */
2243 ++ char yymsgbuf[128];
2244 ++ char *yymsg = yymsgbuf;
2245 ++ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2246 ++#endif
2247 ++
2248 ++ /* Three stacks and their tools:
2249 ++ `yyss': related to states,
2250 ++ `yyvs': related to semantic values,
2251 ++ `yyls': related to locations.
2252 ++
2253 ++ Refer to the stacks thru separate pointers, to allow yyoverflow
2254 ++ to reallocate them elsewhere. */
2255 ++
2256 ++ /* The state stack. */
2257 ++ yytype_int16 yyssa[YYINITDEPTH];
2258 ++ yytype_int16 *yyss = yyssa;
2259 ++ yytype_int16 *yyssp;
2260 ++
2261 ++ /* The semantic value stack. */
2262 ++ YYSTYPE yyvsa[YYINITDEPTH];
2263 ++ YYSTYPE *yyvs = yyvsa;
2264 ++ YYSTYPE *yyvsp;
2265 ++
2266 ++
2267 ++
2268 ++#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2269 ++
2270 ++ YYSIZE_T yystacksize = YYINITDEPTH;
2271 ++
2272 ++ /* The variables used to return semantic value and location from the
2273 ++ action routines. */
2274 ++ YYSTYPE yyval;
2275 ++
2276 ++
2277 ++ /* The number of symbols on the RHS of the reduced rule.
2278 ++ Keep to zero when no symbol should be popped. */
2279 ++ int yylen = 0;
2280 ++
2281 ++ YYDPRINTF ((stderr, "Starting parse\n"));
2282 ++
2283 ++ yystate = 0;
2284 ++ yyerrstatus = 0;
2285 ++ yynerrs = 0;
2286 ++ yychar = YYEMPTY; /* Cause a token to be read. */
2287 ++
2288 ++ /* Initialize stack pointers.
2289 ++ Waste one element of value and location stack
2290 ++ so that they stay on the same level as the state stack.
2291 ++ The wasted elements are never initialized. */
2292 ++
2293 ++ yyssp = yyss;
2294 ++ yyvsp = yyvs;
2295 ++
2296 ++ goto yysetstate;
2297 ++
2298 ++/*------------------------------------------------------------.
2299 ++| yynewstate -- Push a new state, which is found in yystate. |
2300 ++`------------------------------------------------------------*/
2301 ++ yynewstate:
2302 ++ /* In all cases, when you get here, the value and location stacks
2303 ++ have just been pushed. So pushing a state here evens the stacks. */
2304 ++ yyssp++;
2305 ++
2306 ++ yysetstate:
2307 ++ *yyssp = yystate;
2308 ++
2309 ++ if (yyss + yystacksize - 1 <= yyssp)
2310 ++ {
2311 ++ /* Get the current used size of the three stacks, in elements. */
2312 ++ YYSIZE_T yysize = yyssp - yyss + 1;
2313 ++
2314 ++#ifdef yyoverflow
2315 ++ {
2316 ++ /* Give user a chance to reallocate the stack. Use copies of
2317 ++ these so that the &'s don't force the real ones into
2318 ++ memory. */
2319 ++ YYSTYPE *yyvs1 = yyvs;
2320 ++ yytype_int16 *yyss1 = yyss;
2321 ++
2322 ++
2323 ++ /* Each stack pointer address is followed by the size of the
2324 ++ data in use in that stack, in bytes. This used to be a
2325 ++ conditional around just the two extra args, but that might
2326 ++ be undefined if yyoverflow is a macro. */
2327 ++ yyoverflow (YY_("memory exhausted"),
2328 ++ &yyss1, yysize * sizeof (*yyssp),
2329 ++ &yyvs1, yysize * sizeof (*yyvsp),
2330 ++
2331 ++ &yystacksize);
2332 ++
2333 ++ yyss = yyss1;
2334 ++ yyvs = yyvs1;
2335 ++ }
2336 ++#else /* no yyoverflow */
2337 ++# ifndef YYSTACK_RELOCATE
2338 ++ goto yyexhaustedlab;
2339 ++# else
2340 ++ /* Extend the stack our own way. */
2341 ++ if (YYMAXDEPTH <= yystacksize)
2342 ++ goto yyexhaustedlab;
2343 ++ yystacksize *= 2;
2344 ++ if (YYMAXDEPTH < yystacksize)
2345 ++ yystacksize = YYMAXDEPTH;
2346 ++
2347 ++ {
2348 ++ yytype_int16 *yyss1 = yyss;
2349 ++ union yyalloc *yyptr =
2350 ++ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2351 ++ if (! yyptr)
2352 ++ goto yyexhaustedlab;
2353 ++ YYSTACK_RELOCATE (yyss);
2354 ++ YYSTACK_RELOCATE (yyvs);
2355 ++
2356 ++# undef YYSTACK_RELOCATE
2357 ++ if (yyss1 != yyssa)
2358 ++ YYSTACK_FREE (yyss1);
2359 ++ }
2360 ++# endif
2361 ++#endif /* no yyoverflow */
2362 ++
2363 ++ yyssp = yyss + yysize - 1;
2364 ++ yyvsp = yyvs + yysize - 1;
2365 ++
2366 ++
2367 ++ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2368 ++ (unsigned long int) yystacksize));
2369 ++
2370 ++ if (yyss + yystacksize - 1 <= yyssp)
2371 ++ YYABORT;
2372 ++ }
2373 ++
2374 ++ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2375 ++
2376 ++ goto yybackup;
2377 ++
2378 ++/*-----------.
2379 ++| yybackup. |
2380 ++`-----------*/
2381 ++yybackup:
2382 ++
2383 ++ /* Do appropriate processing given the current state. Read a
2384 ++ look-ahead token if we need one and don't already have one. */
2385 ++
2386 ++ /* First try to decide what to do without reference to look-ahead token. */
2387 ++ yyn = yypact[yystate];
2388 ++ if (yyn == YYPACT_NINF)
2389 ++ goto yydefault;
2390 ++
2391 ++ /* Not known => get a look-ahead token if don't already have one. */
2392 ++
2393 ++ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2394 ++ if (yychar == YYEMPTY)
2395 ++ {
2396 ++ YYDPRINTF ((stderr, "Reading a token: "));
2397 ++ yychar = YYLEX;
2398 ++ }
2399 ++
2400 ++ if (yychar <= YYEOF)
2401 ++ {
2402 ++ yychar = yytoken = YYEOF;
2403 ++ YYDPRINTF ((stderr, "Now at end of input.\n"));
2404 ++ }
2405 ++ else
2406 ++ {
2407 ++ yytoken = YYTRANSLATE (yychar);
2408 ++ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2409 ++ }
2410 ++
2411 ++ /* If the proper action on seeing token YYTOKEN is to reduce or to
2412 ++ detect an error, take that action. */
2413 ++ yyn += yytoken;
2414 ++ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2415 ++ goto yydefault;
2416 ++ yyn = yytable[yyn];
2417 ++ if (yyn <= 0)
2418 ++ {
2419 ++ if (yyn == 0 || yyn == YYTABLE_NINF)
2420 ++ goto yyerrlab;
2421 ++ yyn = -yyn;
2422 ++ goto yyreduce;
2423 ++ }
2424 ++
2425 ++ if (yyn == YYFINAL)
2426 ++ YYACCEPT;
2427 ++
2428 ++ /* Count tokens shifted since error; after three, turn off error
2429 ++ status. */
2430 ++ if (yyerrstatus)
2431 ++ yyerrstatus--;
2432 ++
2433 ++ /* Shift the look-ahead token. */
2434 ++ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2435 ++
2436 ++ /* Discard the shifted token unless it is eof. */
2437 ++ if (yychar != YYEOF)
2438 ++ yychar = YYEMPTY;
2439 ++
2440 ++ yystate = yyn;
2441 ++ *++yyvsp = yylval;
2442 ++
2443 ++ goto yynewstate;
2444 ++
2445 ++
2446 ++/*-----------------------------------------------------------.
2447 ++| yydefault -- do the default action for the current state. |
2448 ++`-----------------------------------------------------------*/
2449 ++yydefault:
2450 ++ yyn = yydefact[yystate];
2451 ++ if (yyn == 0)
2452 ++ goto yyerrlab;
2453 ++ goto yyreduce;
2454 ++
2455 ++
2456 ++/*-----------------------------.
2457 ++| yyreduce -- Do a reduction. |
2458 ++`-----------------------------*/
2459 ++yyreduce:
2460 ++ /* yyn is the number of a rule to reduce with. */
2461 ++ yylen = yyr2[yyn];
2462 ++
2463 ++ /* If YYLEN is nonzero, implement the default value of the action:
2464 ++ `$$ = $1'.
2465 ++
2466 ++ Otherwise, the following line sets YYVAL to garbage.
2467 ++ This behavior is undocumented and Bison
2468 ++ users should not rely upon it. Assigning to YYVAL
2469 ++ unconditionally makes the parser a bit smaller, and it avoids a
2470 ++ GCC warning that YYVAL may be used uninitialized. */
2471 ++ yyval = yyvsp[1-yylen];
2472 ++
2473 ++
2474 ++ YY_REDUCE_PRINT (yyn);
2475 ++ switch (yyn)
2476 ++ {
2477 ++ case 2:
2478 ++#line 214 "parse.y"
2479 ++ { root=(yyvsp[(1) - (1)].node) ; ;}
2480 ++ break;
2481 ++
2482 ++ case 5:
2483 ++#line 219 "parse.y"
2484 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));;}
2485 ++ break;
2486 ++
2487 ++ case 8:
2488 ++#line 223 "parse.y"
2489 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (2)].opinfo),(yyvsp[(1) - (2)].node),0); ;}
2490 ++ break;
2491 ++
2492 ++ case 10:
2493 ++#line 226 "parse.y"
2494 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2495 ++ break;
2496 ++
2497 ++ case 11:
2498 ++#line 229 "parse.y"
2499 ++ { decl_tbase=(yyvsp[(1) - (1)].ctype) ; ;}
2500 ++ break;
2501 ++
2502 ++ case 12:
2503 ++#line 229 "parse.y"
2504 ++ { (yyval.node)=(yyvsp[(3) - (3)].node) ; ;}
2505 ++ break;
2506 ++
2507 ++ case 14:
2508 ++#line 232 "parse.y"
2509 ++ { (yyval.node)=mknode_sbin(seq_op,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2510 ++ break;
2511 ++
2512 ++ case 15:
2513 ++#line 235 "parse.y"
2514 ++ { (yyval.node)=mknode_sbin(decl_op,(yyvsp[(1) - (1)].node),
2515 ++ mknode_modified_ctype(decl_tbase)); ;}
2516 ++ break;
2517 ++
2518 ++ case 16:
2519 ++#line 239 "parse.y"
2520 ++ { (yyval.node)=(yyvsp[(2) - (3)].node) ; ;}
2521 ++ break;
2522 ++
2523 ++ case 17:
2524 ++#line 240 "parse.y"
2525 ++ { (yyval.node)=(yyvsp[(2) - (5)].node) ; push_type('('); ;}
2526 ++ break;
2527 ++
2528 ++ case 18:
2529 ++#line 241 "parse.y"
2530 ++ { (yyval.node)=(yyvsp[(2) - (2)].node) ; push_type('*'); ;}
2531 ++ break;
2532 ++
2533 ++ case 19:
2534 ++#line 242 "parse.y"
2535 ++ { (yyval.node)=(yyvsp[(1) - (4)].node) ; push_type_int('[',(yyvsp[(3) - (4)].node)); ;}
2536 ++ break;
2537 ++
2538 ++ case 21:
2539 ++#line 254 "parse.y"
2540 ++ { (yyval.node)=mknode_tri((yyvsp[(1) - (5)].opinfo),(yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node),0); ;}
2541 ++ break;
2542 ++
2543 ++ case 22:
2544 ++#line 256 "parse.y"
2545 ++ { (yyval.node)=mknode_tri((yyvsp[(1) - (6)].opinfo),(yyvsp[(3) - (6)].node),(yyvsp[(5) - (6)].node),0); ;}
2546 ++ break;
2547 ++
2548 ++ case 23:
2549 ++#line 258 "parse.y"
2550 ++ { (yyval.node)=mknode_tri((yyvsp[(1) - (6)].opinfo),(yyvsp[(3) - (6)].node),0,(yyvsp[(6) - (6)].node)); ;}
2551 ++ break;
2552 ++
2553 ++ case 24:
2554 ++#line 260 "parse.y"
2555 ++ { (yyval.node)=mknode_tri((yyvsp[(1) - (7)].opinfo),(yyvsp[(3) - (7)].node),(yyvsp[(5) - (7)].node),(yyvsp[(7) - (7)].node)); ;}
2556 ++ break;
2557 ++
2558 ++ case 25:
2559 ++#line 263 "parse.y"
2560 ++ { (yyval.node)=mknode_op(OPK_QUAD,(yyvsp[(1) - (9)].opinfo),(yyvsp[(3) - (9)].node),(yyvsp[(5) - (9)].node),(yyvsp[(7) - (9)].node),(yyvsp[(9) - (9)].node)); ;}
2561 ++ break;
2562 ++
2563 ++ case 26:
2564 ++#line 265 "parse.y"
2565 ++ { (yyval.node)=mknode_op(OPK_QUAD,(yyvsp[(1) - (8)].opinfo),(yyvsp[(3) - (8)].node),(yyvsp[(5) - (8)].node),(yyvsp[(7) - (8)].node),0); ;}
2566 ++ break;
2567 ++
2568 ++ case 27:
2569 ++#line 267 "parse.y"
2570 ++ { (yyval.node)=mknode_sbin((yyvsp[(1) - (5)].opinfo),(yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node)); ;}
2571 ++ break;
2572 ++
2573 ++ case 28:
2574 ++#line 269 "parse.y"
2575 ++ { (yyval.node)=mknode_sbin((yyvsp[(1) - (4)].opinfo),(yyvsp[(3) - (4)].node),0); ;}
2576 ++ break;
2577 ++
2578 ++ case 29:
2579 ++#line 274 "parse.y"
2580 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2581 ++ break;
2582 ++
2583 ++ case 30:
2584 ++#line 275 "parse.y"
2585 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2586 ++ break;
2587 ++
2588 ++ case 31:
2589 ++#line 276 "parse.y"
2590 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2591 ++ break;
2592 ++
2593 ++ case 32:
2594 ++#line 277 "parse.y"
2595 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2596 ++ break;
2597 ++
2598 ++ case 33:
2599 ++#line 278 "parse.y"
2600 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2601 ++ break;
2602 ++
2603 ++ case 34:
2604 ++#line 279 "parse.y"
2605 ++ { (yyval.node)=mknode_sunary((yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2606 ++ break;
2607 ++
2608 ++ case 35:
2609 ++#line 280 "parse.y"
2610 ++ { (yyval.node)=mknode_sunary((yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2611 ++ break;
2612 ++
2613 ++ case 36:
2614 ++#line 281 "parse.y"
2615 ++ { (yyval.node)=mknode_sunary((yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2616 ++ break;
2617 ++
2618 ++ case 37:
2619 ++#line 282 "parse.y"
2620 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2621 ++ break;
2622 ++
2623 ++ case 38:
2624 ++#line 283 "parse.y"
2625 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (2)].opinfo),(yyvsp[(2) - (2)].node)); ;}
2626 ++ break;
2627 ++
2628 ++ case 39:
2629 ++#line 284 "parse.y"
2630 ++ { (yyval.node)=mknode_post_unary((yyvsp[(2) - (2)].opinfo),(yyvsp[(1) - (2)].node)); ;}
2631 ++ break;
2632 ++
2633 ++ case 40:
2634 ++#line 285 "parse.y"
2635 ++ { (yyval.node)=mknode_post_unary((yyvsp[(2) - (2)].opinfo),(yyvsp[(1) - (2)].node)); ;}
2636 ++ break;
2637 ++
2638 ++ case 41:
2639 ++#line 286 "parse.y"
2640 ++ { (yyval.node)=mknode_sunary((yyvsp[(1) - (4)].opinfo),(yyvsp[(3) - (4)].node)); ;}
2641 ++ break;
2642 ++
2643 ++ case 42:
2644 ++#line 287 "parse.y"
2645 ++ { (yyval.node)=mknode_unary((yyvsp[(1) - (4)].opinfo),(yyvsp[(3) - (4)].node)); ;}
2646 ++ break;
2647 ++
2648 ++ case 43:
2649 ++#line 288 "parse.y"
2650 ++ { (yyval.node)=mknode_unary( (yyvsp[(1) - (4)].opinfo),(yyvsp[(3) - (4)].node)); ;}
2651 ++ break;
2652 ++
2653 ++ case 44:
2654 ++#line 291 "parse.y"
2655 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2656 ++ break;
2657 ++
2658 ++ case 45:
2659 ++#line 292 "parse.y"
2660 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2661 ++ break;
2662 ++
2663 ++ case 46:
2664 ++#line 294 "parse.y"
2665 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2666 ++ break;
2667 ++
2668 ++ case 47:
2669 ++#line 295 "parse.y"
2670 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2671 ++ break;
2672 ++
2673 ++ case 48:
2674 ++#line 296 "parse.y"
2675 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2676 ++ break;
2677 ++
2678 ++ case 49:
2679 ++#line 297 "parse.y"
2680 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2681 ++ break;
2682 ++
2683 ++ case 50:
2684 ++#line 298 "parse.y"
2685 ++ { (yyval.node)=mknode_bin( (yyvsp[(2) - (4)].opinfo),(yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node)); ;}
2686 ++ break;
2687 ++
2688 ++ case 51:
2689 ++#line 299 "parse.y"
2690 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (4)].opinfo),(yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node)); ;}
2691 ++ break;
2692 ++
2693 ++ case 52:
2694 ++#line 300 "parse.y"
2695 ++ { (yyval.node)=mknode_op(OPK_FUNC,(yyvsp[(2) - (4)].opinfo),(yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node),0,0); ;}
2696 ++ break;
2697 ++
2698 ++ case 53:
2699 ++#line 301 "parse.y"
2700 ++ { (yyval.node)=mknode_unary((yyvsp[(1) - (3)].opinfo),(yyvsp[(2) - (3)].node)); ;}
2701 ++ break;
2702 ++
2703 ++ case 54:
2704 ++#line 302 "parse.y"
2705 ++ { (yyval.node)=mknode_unary((yyvsp[(1) - (3)].opinfo),(yyvsp[(2) - (3)].node)); ;}
2706 ++ break;
2707 ++
2708 ++ case 55:
2709 ++#line 306 "parse.y"
2710 ++ { (yyval.node)=mknode_op(OPK_CAST,(yyvsp[(1) - (4)].opinfo),(yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node),0,0); ;}
2711 ++ break;
2712 ++
2713 ++ case 56:
2714 ++#line 316 "parse.y"
2715 ++ {
2716 ++ tctype *t=duel_get_target_typedef((yyvsp[(2) - (4)].nameinfo).name);
2717 ++ if(t==NULL) yyerror("not a typedef name");
2718 ++ (yyval.node)=mknode_op(OPK_CAST,(yyvsp[(1) - (4)].opinfo),mknode_ctype(t),(yyvsp[(4) - (4)].node),0,0); ;}
2719 ++ break;
2720 ++
2721 ++ case 57:
2722 ++#line 320 "parse.y"
2723 ++ {
2724 ++ tctype *t=duel_get_target_typedef((yyvsp[(2) - (6)].nameinfo).name);
2725 ++ if(t==NULL) yyerror("not a typedef name");
2726 ++ push_type('*');
2727 ++ (yyval.node)=mknode_op(OPK_CAST,(yyvsp[(1) - (6)].opinfo),mknode_modified_ctype(t),(yyvsp[(6) - (6)].node),0,0); ;}
2728 ++ break;
2729 ++
2730 ++ case 58:
2731 ++#line 329 "parse.y"
2732 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2733 ++ break;
2734 ++
2735 ++ case 59:
2736 ++#line 330 "parse.y"
2737 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2738 ++ break;
2739 ++
2740 ++ case 60:
2741 ++#line 331 "parse.y"
2742 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2743 ++ break;
2744 ++
2745 ++ case 61:
2746 ++#line 332 "parse.y"
2747 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2748 ++ break;
2749 ++
2750 ++ case 62:
2751 ++#line 333 "parse.y"
2752 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2753 ++ break;
2754 ++
2755 ++ case 63:
2756 ++#line 334 "parse.y"
2757 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2758 ++ break;
2759 ++
2760 ++ case 64:
2761 ++#line 335 "parse.y"
2762 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2763 ++ break;
2764 ++
2765 ++ case 65:
2766 ++#line 336 "parse.y"
2767 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2768 ++ break;
2769 ++
2770 ++ case 66:
2771 ++#line 337 "parse.y"
2772 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2773 ++ break;
2774 ++
2775 ++ case 67:
2776 ++#line 338 "parse.y"
2777 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2778 ++ break;
2779 ++
2780 ++ case 68:
2781 ++#line 339 "parse.y"
2782 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2783 ++ break;
2784 ++
2785 ++ case 69:
2786 ++#line 340 "parse.y"
2787 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2788 ++ break;
2789 ++
2790 ++ case 70:
2791 ++#line 341 "parse.y"
2792 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2793 ++ break;
2794 ++
2795 ++ case 71:
2796 ++#line 342 "parse.y"
2797 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2798 ++ break;
2799 ++
2800 ++ case 72:
2801 ++#line 343 "parse.y"
2802 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2803 ++ break;
2804 ++
2805 ++ case 73:
2806 ++#line 344 "parse.y"
2807 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2808 ++ break;
2809 ++
2810 ++ case 74:
2811 ++#line 345 "parse.y"
2812 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2813 ++ break;
2814 ++
2815 ++ case 75:
2816 ++#line 346 "parse.y"
2817 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2818 ++ break;
2819 ++
2820 ++ case 76:
2821 ++#line 347 "parse.y"
2822 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2823 ++ break;
2824 ++
2825 ++ case 77:
2826 ++#line 348 "parse.y"
2827 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2828 ++ break;
2829 ++
2830 ++ case 78:
2831 ++#line 349 "parse.y"
2832 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2833 ++ break;
2834 ++
2835 ++ case 79:
2836 ++#line 350 "parse.y"
2837 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2838 ++ break;
2839 ++
2840 ++ case 80:
2841 ++#line 351 "parse.y"
2842 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2843 ++ break;
2844 ++
2845 ++ case 81:
2846 ++#line 352 "parse.y"
2847 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2848 ++ break;
2849 ++
2850 ++ case 82:
2851 ++#line 356 "parse.y"
2852 ++ { (yyval.node)=mknode_tri((yyvsp[(2) - (5)].opinfo),(yyvsp[(1) - (5)].node),(yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node)); ;}
2853 ++ break;
2854 ++
2855 ++ case 83:
2856 ++#line 359 "parse.y"
2857 ++ { (yyval.node)=mknode_bin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2858 ++ break;
2859 ++
2860 ++ case 84:
2861 ++#line 360 "parse.y"
2862 ++ { (yyval.node)=mknode_op(OPK_ASSIGN,(yyvsp[(2) - (3)].opinfo), (yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node),0,0); ;}
2863 ++ break;
2864 ++
2865 ++ case 85:
2866 ++#line 361 "parse.y"
2867 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2868 ++ break;
2869 ++
2870 ++ case 86:
2871 ++#line 366 "parse.y"
2872 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2873 ++ break;
2874 ++
2875 ++ case 87:
2876 ++#line 367 "parse.y"
2877 ++ { (yyval.node)=mknode_sbin((yyvsp[(1) - (2)].opinfo), 0,(yyvsp[(2) - (2)].node)); ;}
2878 ++ break;
2879 ++
2880 ++ case 88:
2881 ++#line 368 "parse.y"
2882 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (2)].opinfo),(yyvsp[(1) - (2)].node), 0); ;}
2883 ++ break;
2884 ++
2885 ++ case 89:
2886 ++#line 369 "parse.y"
2887 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2888 ++ break;
2889 ++
2890 ++ case 90:
2891 ++#line 370 "parse.y"
2892 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2893 ++ break;
2894 ++
2895 ++ case 91:
2896 ++#line 373 "parse.y"
2897 ++ { (yyval.node)=mknode_sbin((yyvsp[(2) - (3)].opinfo),(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node)); ;}
2898 ++ break;
2899 ++
2900 ++ case 94:
2901 ++#line 378 "parse.y"
2902 ++ { (yyval.node)=0 ; ;}
2903 ++ break;
2904 ++
2905 ++ case 97:
2906 ++#line 388 "parse.y"
2907 ++ { (yyval.node)=mknode_name((yyvsp[(1) - (1)].nameinfo)) ; ;}
2908 ++ break;
2909 ++
2910 ++ case 98:
2911 ++#line 390 "parse.y"
2912 ++ { (yyval.node)=mknode_modified_ctype((yyvsp[(1) - (2)].ctype)); ;}
2913 ++ break;
2914 ++
2915 ++ case 100:
2916 ++#line 396 "parse.y"
2917 ++ { push_type('('); ;}
2918 ++ break;
2919 ++
2920 ++ case 101:
2921 ++#line 397 "parse.y"
2922 ++ { push_type('*'); ;}
2923 ++ break;
2924 ++
2925 ++ case 102:
2926 ++#line 398 "parse.y"
2927 ++ { push_type_int('[',(yyvsp[(3) - (4)].node)); ;}
2928 ++ break;
2929 ++
2930 ++ case 104:
2931 ++#line 416 "parse.y"
2932 ++ {
2933 ++ (yyval.ctype)=duel_get_target_typedef((yyvsp[(2) - (2)].nameinfo).name);
2934 ++ if((yyval.ctype)==NULL) {
2935 ++ tvalue v;
2936 ++ if(duel_get_target_variable((yyvsp[(2) - (2)].nameinfo).name,-1,&v)) (yyval.ctype)=v.ctype;
2937 ++ else yyerror("not a typedef name");
2938 ++ }
2939 ++ ;}
2940 ++ break;
2941 ++
2942 ++ case 105:
2943 ++#line 426 "parse.y"
2944 ++ { (yyval.ctype) = ctype_char; ;}
2945 ++ break;
2946 ++
2947 ++ case 106:
2948 ++#line 427 "parse.y"
2949 ++ { (yyval.ctype) = ctype_schar; ;}
2950 ++ break;
2951 ++
2952 ++ case 107:
2953 ++#line 428 "parse.y"
2954 ++ { (yyval.ctype) = ctype_uchar; ;}
2955 ++ break;
2956 ++
2957 ++ case 108:
2958 ++#line 429 "parse.y"
2959 ++ { (yyval.ctype) = ctype_int; ;}
2960 ++ break;
2961 ++
2962 ++ case 109:
2963 ++#line 430 "parse.y"
2964 ++ { (yyval.ctype) = ctype_uint; ;}
2965 ++ break;
2966 ++
2967 ++ case 110:
2968 ++#line 431 "parse.y"
2969 ++ { (yyval.ctype) = ctype_uint; ;}
2970 ++ break;
2971 ++
2972 ++ case 111:
2973 ++#line 432 "parse.y"
2974 ++ { (yyval.ctype) = ctype_long; ;}
2975 ++ break;
2976 ++
2977 ++ case 112:
2978 ++#line 433 "parse.y"
2979 ++ { (yyval.ctype) = ctype_long; ;}
2980 ++ break;
2981 ++
2982 ++ case 113:
2983 ++#line 434 "parse.y"
2984 ++ { (yyval.ctype) = ctype_ulong; ;}
2985 ++ break;
2986 ++
2987 ++ case 114:
2988 ++#line 435 "parse.y"
2989 ++ { (yyval.ctype) = ctype_ulong; ;}
2990 ++ break;
2991 ++
2992 ++ case 115:
2993 ++#line 436 "parse.y"
2994 ++ { (yyval.ctype) = ctype_longlong; ;}
2995 ++ break;
2996 ++
2997 ++ case 116:
2998 ++#line 437 "parse.y"
2999 ++ { (yyval.ctype) = ctype_longlong; ;}
3000 ++ break;
3001 ++
3002 ++ case 117:
3003 ++#line 438 "parse.y"
3004 ++ { (yyval.ctype) = ctype_ulonglong; ;}
3005 ++ break;
3006 ++
3007 ++ case 118:
3008 ++#line 439 "parse.y"
3009 ++ { (yyval.ctype) = ctype_ulonglong; ;}
3010 ++ break;
3011 ++
3012 ++ case 119:
3013 ++#line 440 "parse.y"
3014 ++ { (yyval.ctype) = ctype_short; ;}
3015 ++ break;
3016 ++
3017 ++ case 120:
3018 ++#line 441 "parse.y"
3019 ++ { (yyval.ctype) = ctype_short; ;}
3020 ++ break;
3021 ++
3022 ++ case 121:
3023 ++#line 442 "parse.y"
3024 ++ { (yyval.ctype) = ctype_ushort; ;}
3025 ++ break;
3026 ++
3027 ++ case 122:
3028 ++#line 443 "parse.y"
3029 ++ { (yyval.ctype) = ctype_ushort; ;}
3030 ++ break;
3031 ++
3032 ++ case 123:
3033 ++#line 444 "parse.y"
3034 ++ { (yyval.ctype) = ctype_float ; ;}
3035 ++ break;
3036 ++
3037 ++ case 124:
3038 ++#line 445 "parse.y"
3039 ++ { (yyval.ctype) = ctype_double; ;}
3040 ++ break;
3041 ++
3042 ++ case 125:
3043 ++#line 446 "parse.y"
3044 ++ { (yyval.ctype) = ctype_void; ;}
3045 ++ break;
3046 ++
3047 ++ case 126:
3048 ++#line 448 "parse.y"
3049 ++ { (yyval.ctype) = duel_get_target_struct_tag((yyvsp[(2) - (2)].nameinfo).name);
3050 ++ if((yyval.ctype)==NULL) yyerror("not a struct tag"); ;}
3051 ++ break;
3052 ++
3053 ++ case 127:
3054 ++#line 451 "parse.y"
3055 ++ { (yyval.ctype) = duel_get_target_union_tag((yyvsp[(2) - (2)].nameinfo).name);
3056 ++ if((yyval.ctype)==NULL) yyerror("not a union tag"); ;}
3057 ++ break;
3058 ++
3059 ++ case 128:
3060 ++#line 454 "parse.y"
3061 ++ { (yyval.ctype) = duel_get_target_enum_tag((yyvsp[(2) - (2)].nameinfo).name);
3062 ++ if((yyval.ctype)==NULL) yyerror("not an enum tag"); ;}
3063 ++ break;
3064 ++
3065 ++
3066 ++/* Line 1267 of yacc.c. */
3067 ++#line 2630 "parse.c"
3068 ++ default: break;
3069 ++ }
3070 ++ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3071 ++
3072 ++ YYPOPSTACK (yylen);
3073 ++ yylen = 0;
3074 ++ YY_STACK_PRINT (yyss, yyssp);
3075 ++
3076 ++ *++yyvsp = yyval;
3077 ++
3078 ++
3079 ++ /* Now `shift' the result of the reduction. Determine what state
3080 ++ that goes to, based on the state we popped back to and the rule
3081 ++ number reduced by. */
3082 ++
3083 ++ yyn = yyr1[yyn];
3084 ++
3085 ++ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3086 ++ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3087 ++ yystate = yytable[yystate];
3088 ++ else
3089 ++ yystate = yydefgoto[yyn - YYNTOKENS];
3090 ++
3091 ++ goto yynewstate;
3092 ++
3093 ++
3094 ++/*------------------------------------.
3095 ++| yyerrlab -- here on detecting error |
3096 ++`------------------------------------*/
3097 ++yyerrlab:
3098 ++ /* If not already recovering from an error, report this error. */
3099 ++ if (!yyerrstatus)
3100 ++ {
3101 ++ ++yynerrs;
3102 ++#if ! YYERROR_VERBOSE
3103 ++ yyerror (YY_("syntax error"));
3104 ++#else
3105 ++ {
3106 ++ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3107 ++ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3108 ++ {
3109 ++ YYSIZE_T yyalloc = 2 * yysize;
3110 ++ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3111 ++ yyalloc = YYSTACK_ALLOC_MAXIMUM;
3112 ++ if (yymsg != yymsgbuf)
3113 ++ YYSTACK_FREE (yymsg);
3114 ++ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3115 ++ if (yymsg)
3116 ++ yymsg_alloc = yyalloc;
3117 ++ else
3118 ++ {
3119 ++ yymsg = yymsgbuf;
3120 ++ yymsg_alloc = sizeof yymsgbuf;
3121 ++ }
3122 ++ }
3123 ++
3124 ++ if (0 < yysize && yysize <= yymsg_alloc)
3125 ++ {
3126 ++ (void) yysyntax_error (yymsg, yystate, yychar);
3127 ++ yyerror (yymsg);
3128 ++ }
3129 ++ else
3130 ++ {
3131 ++ yyerror (YY_("syntax error"));
3132 ++ if (yysize != 0)
3133 ++ goto yyexhaustedlab;
3134 ++ }
3135 ++ }
3136 ++#endif
3137 ++ }
3138 ++
3139 ++
3140 ++
3141 ++ if (yyerrstatus == 3)
3142 ++ {
3143 ++ /* If just tried and failed to reuse look-ahead token after an
3144 ++ error, discard it. */
3145 ++
3146 ++ if (yychar <= YYEOF)
3147 ++ {
3148 ++ /* Return failure if at end of input. */
3149 ++ if (yychar == YYEOF)
3150 ++ YYABORT;
3151 ++ }
3152 ++ else
3153 ++ {
3154 ++ yydestruct ("Error: discarding",
3155 ++ yytoken, &yylval);
3156 ++ yychar = YYEMPTY;
3157 ++ }
3158 ++ }
3159 ++
3160 ++ /* Else will try to reuse look-ahead token after shifting the error
3161 ++ token. */
3162 ++ goto yyerrlab1;
3163 ++
3164 ++
3165 ++/*---------------------------------------------------.
3166 ++| yyerrorlab -- error raised explicitly by YYERROR. |
3167 ++`---------------------------------------------------*/
3168 ++yyerrorlab:
3169 ++
3170 ++ /* Pacify compilers like GCC when the user code never invokes
3171 ++ YYERROR and the label yyerrorlab therefore never appears in user
3172 ++ code. */
3173 ++ if (/*CONSTCOND*/ 0)
3174 ++ goto yyerrorlab;
3175 ++
3176 ++ /* Do not reclaim the symbols of the rule which action triggered
3177 ++ this YYERROR. */
3178 ++ YYPOPSTACK (yylen);
3179 ++ yylen = 0;
3180 ++ YY_STACK_PRINT (yyss, yyssp);
3181 ++ yystate = *yyssp;
3182 ++ goto yyerrlab1;
3183 ++
3184 ++
3185 ++/*-------------------------------------------------------------.
3186 ++| yyerrlab1 -- common code for both syntax error and YYERROR. |
3187 ++`-------------------------------------------------------------*/
3188 ++yyerrlab1:
3189 ++ yyerrstatus = 3; /* Each real token shifted decrements this. */
3190 ++
3191 ++ for (;;)
3192 ++ {
3193 ++ yyn = yypact[yystate];
3194 ++ if (yyn != YYPACT_NINF)
3195 ++ {
3196 ++ yyn += YYTERROR;
3197 ++ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3198 ++ {
3199 ++ yyn = yytable[yyn];
3200 ++ if (0 < yyn)
3201 ++ break;
3202 ++ }
3203 ++ }
3204 ++
3205 ++ /* Pop the current state because it cannot handle the error token. */
3206 ++ if (yyssp == yyss)
3207 ++ YYABORT;
3208 ++
3209 ++
3210 ++ yydestruct ("Error: popping",
3211 ++ yystos[yystate], yyvsp);
3212 ++ YYPOPSTACK (1);
3213 ++ yystate = *yyssp;
3214 ++ YY_STACK_PRINT (yyss, yyssp);
3215 ++ }
3216 ++
3217 ++ if (yyn == YYFINAL)
3218 ++ YYACCEPT;
3219 ++
3220 ++ *++yyvsp = yylval;
3221 ++
3222 ++
3223 ++ /* Shift the error token. */
3224 ++ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3225 ++
3226 ++ yystate = yyn;
3227 ++ goto yynewstate;
3228 ++
3229 ++
3230 ++/*-------------------------------------.
3231 ++| yyacceptlab -- YYACCEPT comes here. |
3232 ++`-------------------------------------*/
3233 ++yyacceptlab:
3234 ++ yyresult = 0;
3235 ++ goto yyreturn;
3236 ++
3237 ++/*-----------------------------------.
3238 ++| yyabortlab -- YYABORT comes here. |
3239 ++`-----------------------------------*/
3240 ++yyabortlab:
3241 ++ yyresult = 1;
3242 ++ goto yyreturn;
3243 ++
3244 ++#ifndef yyoverflow
3245 ++/*-------------------------------------------------.
3246 ++| yyexhaustedlab -- memory exhaustion comes here. |
3247 ++`-------------------------------------------------*/
3248 ++yyexhaustedlab:
3249 ++ yyerror (YY_("memory exhausted"));
3250 ++ yyresult = 2;
3251 ++ /* Fall through. */
3252 ++#endif
3253 ++
3254 ++yyreturn:
3255 ++ if (yychar != YYEOF && yychar != YYEMPTY)
3256 ++ yydestruct ("Cleanup: discarding lookahead",
3257 ++ yytoken, &yylval);
3258 ++ /* Do not reclaim the symbols of the rule which action triggered
3259 ++ this YYABORT or YYACCEPT. */
3260 ++ YYPOPSTACK (yylen);
3261 ++ YY_STACK_PRINT (yyss, yyssp);
3262 ++ while (yyssp != yyss)
3263 ++ {
3264 ++ yydestruct ("Cleanup: popping",
3265 ++ yystos[*yyssp], yyvsp);
3266 ++ YYPOPSTACK (1);
3267 ++ }
3268 ++#ifndef yyoverflow
3269 ++ if (yyss != yyssa)
3270 ++ YYSTACK_FREE (yyss);
3271 ++#endif
3272 ++#if YYERROR_VERBOSE
3273 ++ if (yymsg != yymsgbuf)
3274 ++ YYSTACK_FREE (yymsg);
3275 ++#endif
3276 ++ /* Make sure YYID is used. */
3277 ++ return YYID (yyresult);
3278 ++}
3279 ++
3280 ++
3281 ++#line 459 "parse.y"
3282 ++
3283 ++
3284 ++static struct stoken { /* all opcodes we recognize */
3285 ++ char *opstr ; /* op code as a string */
3286 ++ int token ; /* token to return to yacc */
3287 ++ int opcode ; /* opcode value associated with the token */
3288 ++ } tokens[] = { /* the special tokens, longer ones 1st! */
3289 ++ {">>=",T_ASSIGN, OP_RSH},
3290 ++ {"<<=",T_ASSIGN, OP_LSH},
3291 ++ {"-->",T_DFS, OP_DFS},
3292 ++ {"->>",T_BFS, OP_BFS},
3293 ++ {"==?", T_EQQ, OP_EQQ},
3294 ++ {"!=?", T_NEQ, OP_NEQ},
3295 ++ {"<=?", T_LEQ, OP_LEQ},
3296 ++ {">=?", T_GEQ, OP_GEQ},
3297 ++ {"&&/", T_ANDL, OP_AND},
3298 ++ {"||/", T_ORL, OP_OR},
3299 ++
3300 ++ {"<?", T_LSQ, OP_LSQ},
3301 ++ {">?", T_GTQ, OP_GTQ},
3302 ++ {"#/", T_COUNT, '#' },
3303 ++ {"%/", T_COUNT, '#' }, /* gdb insists to recognize # as start of comma!*/
3304 ++ {"%%", '#', '#' }, /* same. so %/ for #/ and %% for #. not doc!*/
3305 ++ {"+=", T_ASSIGN, '+'},
3306 ++ {"-=", T_ASSIGN, '-'},
3307 ++ {"*=", T_ASSIGN, '*'},
3308 ++ {"/=", T_ASSIGN, '/'},
3309 ++ {"%=", T_ASSIGN, '%'},
3310 ++ {"|=", T_ASSIGN, '|'},
3311 ++ {"&=", T_ASSIGN, '&'},
3312 ++ {"^=", T_ASSIGN, '^'},
3313 ++ {":=", T_DEFVAR,OP_DEF},
3314 ++ {"++", T_INC, OP_INC },
3315 ++ {"--", T_DEC, OP_DEC },
3316 ++ {"->", T_ARROW, OP_ARR },
3317 ++ {"&&", T_AND, OP_AND },
3318 ++ {"||", T_OR, OP_OR },
3319 ++ {"<<", T_LSH, OP_LSH },
3320 ++ {">>", T_RSH, OP_RSH },
3321 ++ {"==", T_EQ, OP_EQ },
3322 ++ {"!=", T_NE, OP_NE },
3323 ++ {"<=", T_LE, OP_LE },
3324 ++ {">=", T_GE, OP_GE },
3325 ++ {"..", T_TO, OP_TO },
3326 ++ {"=>", T_IMP, OP_IMP },
3327 ++ {"[[", T_OSEL, OP_SEL },
3328 ++ {"]]", T_CSEL, OP_SEL },
3329 ++ };
3330 ++
3331 ++static struct skeyword { /* all keywords we recognize */
3332 ++ char *keyword_str ; /* keyword as a string */
3333 ++ int token ; /* token to return to yacc */
3334 ++ topcode opcode ; /* opcode associated w/keyword */
3335 ++ } keywords[] = {
3336 ++ {"if", T_IF , OP_IF},
3337 ++ {"else", T_ELSE },
3338 ++ {"for", T_FOR , OP_FOR},
3339 ++ {"while", T_WHILE , OP_WHILE},
3340 ++ {"sizeof", T_SIZEOF , OP_SIZ},
3341 ++ {"frame", T_FRAME , OP_FRAME},
3342 ++
3343 ++ {"T", T_TYPEDEF_INDICATOR },
3344 ++ {"struct", T_STRUCT },
3345 ++ {"union", T_UNION },
3346 ++ {"enum", T_ENUM },
3347 ++
3348 ++ {"unsigned",T_UNSIGNED },
3349 ++ {"signed", T_SIGNED },
3350 ++ {"short", T_SHORT },
3351 ++ {"long", T_LONG },
3352 ++ {"char", T_CHAR },
3353 ++ {"int", T_INT },
3354 ++ {"double", T_DOUBLE },
3355 ++ {"float", T_FLOAT },
3356 ++ {"void", T_VOID },
3357 ++ } ;
3358 ++
3359 ++
3360 ++LFUNC tnode* duel_lex_int(void) /* parse next token as integer num */
3361 ++{
3362 ++ tnode *n ;
3363 ++ tulonglong val=0 ;
3364 ++ char *p=lexptr ;
3365 ++ bool is_l=0,is_u=0 ;
3366 ++ int base=10 ;
3367 ++ int src_pos=lexptr-inputstr ;
3368 ++
3369 ++ if(*p=='0') { /* figure out the base */
3370 ++ p++ ;
3371 ++ if(*p=='x' || *p=='X') base=16,p++ ;
3372 ++ else
3373 ++ if(isdigit(*p)) base=8 ; /* avoid having '0' as a base 8 (uint) */
3374 ++ }
3375 ++
3376 ++ while(isdigit(*p) || base==16 && isxdigit(*p)) { /* get the value */
3377 ++ val*=base ;
3378 ++ if(isupper(*p)) val+= *p-'A'+10 ;
3379 ++ else if(islower(*p)) val+= *p-'a'+10 ;
3380 ++ else val+= *p-'0' ;
3381 ++ p++ ;
3382 ++ }
3383 ++ for (;*p;p++) { /* yuk. figure 0L etc */
3384 ++ if (*p == 'l' || *p == 'L') is_l++;
3385 ++ else if(*p == 'u' || *p == 'U') is_u++;
3386 ++ else break;
3387 ++ }
3388 ++ is_u=is_u || base!=10 ;
3389 ++
3390 ++ if((is_l>1 && is_u) || (long long) val < 0 || ((tulong) val != val && is_u)) {
3391 ++ n=mknode_const(src_pos,ctype_ulonglong);
3392 ++ n->cnst.u.rval_ulonglong=val ;
3393 ++ }
3394 ++ else
3395 ++ if(is_l>1 || (tulong) val != val) {
3396 ++ n=mknode_const(src_pos,ctype_longlong) ;
3397 ++ n->cnst.u.rval_longlong=(long long) val ;
3398 ++ }
3399 ++ else
3400 ++ if((is_l && is_u) || (long) val < 0 || ((tuint) val != val && is_u)) {
3401 ++ n=mknode_const(src_pos,ctype_ulong);
3402 ++ n->cnst.u.rval_ulong=val ;
3403 ++ }
3404 ++ else
3405 ++ if(is_l || (tuint) val != val) {
3406 ++ n=mknode_const(src_pos,ctype_long) ;
3407 ++ n->cnst.u.rval_long=(long) val ;
3408 ++ }
3409 ++ else
3410 ++ if(is_u || (int) val < 0) {
3411 ++ n=mknode_const(src_pos,ctype_uint) ;
3412 ++ n->cnst.u.rval_uint=(tuint) val ;
3413 ++ }
3414 ++ else {
3415 ++ n=mknode_const(src_pos,ctype_int) ;
3416 ++ n->cnst.u.rval_int=(int) val ;
3417 ++ }
3418 ++ strncpyz(n->cnst.symb_val,lexptr,p-lexptr); /* save the symbolic val*/
3419 ++ lexptr=p ;
3420 ++ return n ;
3421 ++}
3422 ++
3423 ++LFUNC tnode* duel_lex_float(void) /* parse next token as float num */
3424 ++{
3425 ++ tnode *n=0 ;
3426 ++ char *p=lexptr ;
3427 ++ double val ;
3428 ++ char c,tmpc ;
3429 ++ bool ok=TRUE;
3430 ++ int src_pos = lexptr - inputstr ;
3431 ++
3432 ++ /* this is disgusting.. why isnt there a lib call to recognize floats?! */
3433 ++ while(isdigit(*p)) p++ ;
3434 ++ if(*p=='.') p++ ;
3435 ++ while(isdigit(*p)) p++ ;
3436 ++ if(*p=='e' || *p=='E') {
3437 ++ p++ ;
3438 ++ if(*p=='+' || *p=='-') p++ ;
3439 ++ if(!isdigit(*p)) ok=FALSE ; /* force digit (scanf allows 1e-.2 ?!) */
3440 ++ while(isdigit(*p)) p++ ;
3441 ++ }
3442 ++ tmpc= *p ; *p=0 ;
3443 ++ ok=ok && sscanf(lexptr,"%lf%c",&val,&c)==1 ;
3444 ++ *p=tmpc ;
3445 ++ if(!ok) yyerror("Invalid float constant.");
3446 ++
3447 ++ n=mknode_const(src_pos,ctype_double);
3448 ++ n->cnst.u.rval_double=val ;
3449 ++ strncpyz(n->cnst.symb_val,lexptr,p-lexptr); /* save the symbolic val*/
3450 ++ lexptr=p ;
3451 ++ return(n);
3452 ++}
3453 ++
3454 ++/* parse_escaped_char -- parse an escaped char (e.g. '\n').
3455 ++ * lexptr expected to point to text right after the '\'.
3456 ++ * return: actual char value (e.g. 012 if 'n' or '012' is found.)
3457 ++ * lexptr is advanced after the espaced char.
3458 ++ */
3459 ++
3460 ++LFUNC char parse_escaped_char(void)
3461 ++{
3462 ++ char retc ;
3463 ++ switch(lexptr[0]) {
3464 ++ /*case 'a': retc='\a' ; break ; /* some compilers don't support it. */
3465 ++ case 'b': retc='\b' ; break ;
3466 ++ case 'f': retc='\f' ; break ;
3467 ++ case 'n': retc='\n' ; break ;
3468 ++ case 'r': retc='\r' ; break ;
3469 ++ case 't': retc='\t' ; break ;
3470 ++ case 'v': retc='\v' ; break ;
3471 ++ case 'x': yyerror("hex char const not yet suppported");
3472 ++ case '0': case '1': case '2': case '3':
3473 ++ retc= lexptr[0] - '0' ;
3474 ++ if(lexptr[1]>='0' && lexptr[1]<='7')
3475 ++ retc= retc* 010 + *++lexptr - '0' ;
3476 ++ if(lexptr[1]>='0' && lexptr[1]<='7')
3477 ++ retc= retc* 010 + *++lexptr - '0' ;
3478 ++ break ;
3479 ++ default: retc=lexptr[0] ; /* default also takes care of '\'' '\\' */
3480 ++ }
3481 ++ lexptr++ ;
3482 ++ return retc ;
3483 ++}
3484 ++
3485 ++/* FUNC yylex -- return the next token to yacc.
3486 ++ * GLOBALS: lexptr point to the string we are parsing next. it is updated.
3487 ++ */
3488 ++
3489 ++LFUNC int yylex (void)
3490 ++{
3491 ++ int c,i,src_pos ;
3492 ++ char *p ;
3493 ++
3494 ++ for(c= *lexptr; c==' ' || c=='\t' || c=='\n' ; c= *++lexptr); /* skip blank*/
3495 ++
3496 ++ src_pos = lexptr - inputstr ; /* current char being parsed */
3497 ++ yylval.opinfo.src_pos = src_pos ;
3498 ++
3499 ++ if(*lexptr=='\0' || strncmp(lexptr,"|>",2)==0) return 0 ; /* end of expr */
3500 ++
3501 ++ for (i = 0; i < sizeof(tokens)/sizeof(struct stoken) ; i++) {
3502 ++ int l=strlen(tokens[i].opstr) ; /* check next token vs table */
3503 ++ if(strncmp(lexptr,tokens[i].opstr,l)==0) {
3504 ++ lexptr+=l ;
3505 ++ yylval.opinfo.opcode = tokens[i].opcode;
3506 ++ return tokens[i].token ;
3507 ++ }
3508 ++ }
3509 ++
3510 ++ switch (c = *lexptr) {
3511 ++ case '\'': /* char constant, but stored as int (ansi-c) */
3512 ++ p=lexptr++ ;
3513 ++ c = *lexptr++ ;
3514 ++ if (c == '\\') c=parse_escaped_char();
3515 ++ if( *lexptr++ != '\'') yyerror("Invalid character constant.");
3516 ++ yylval.node=mknode_const(src_pos,ctype_int) ;
3517 ++ yylval.node->cnst.u.rval_int=c ;
3518 ++ strncpyz(yylval.node->cnst.symb_val,p,lexptr-p); /*save the symbol. val*/
3519 ++ return T_CONST ;
3520 ++
3521 ++ case '0': /* chk hex */
3522 ++ if(lexptr[1]=='x' || lexptr[1]=='X') {
3523 ++ yylval.node=duel_lex_int();
3524 ++ return T_CONST ;
3525 ++ }
3526 ++ /* fall thru for other numbers */
3527 ++ case '1': case '2': case '3': /* decimal or floating point number */
3528 ++ case '4': case '5': case '6': case '7': case '8': case '9':
3529 ++ for(p=lexptr ; *p>='0' && *p<='9' ; p++ ) ; /*find next non digit*/
3530 ++ if(*p=='.' && p[1]!='.' || *p=='e' || *p=='E')
3531 ++ yylval.node=duel_lex_float();
3532 ++ else yylval.node=duel_lex_int();
3533 ++ return T_CONST ;
3534 ++
3535 ++ case '(': case ')':
3536 ++ case '<': case '>':
3537 ++ case '[': case ']':
3538 ++ case '{': case '}':
3539 ++ case '+': case '-': case '*': case '/': case '%':
3540 ++ case '|': case '&': case '^': case '~': case '!':
3541 ++ case ',': case '?': case ':': case '=':
3542 ++ case '.': case '@': case '$': case '#': case '`': case '\\':
3543 ++ lexptr++;
3544 ++ yylval.opinfo.opcode=c ;
3545 ++ return c;
3546 ++ case ';': { /* hack, ignore ';' before '}' and else. for C compatability*/
3547 ++ char *save_lexptr= ++lexptr ;
3548 ++ int tok=yylex() ; /* hack, call myself for next token */
3549 ++ if(tok=='}' || tok==T_ELSE) {
3550 ++ duel_printf("warning: useless ';' ignored\n");
3551 ++ return tok ;
3552 ++ }
3553 ++ /* else restore position and return the ';' */
3554 ++ lexptr=save_lexptr ;
3555 ++ yylval.opinfo.opcode=';' ;
3556 ++ yylval.opinfo.src_pos = src_pos ;
3557 ++ return ';';
3558 ++ }
3559 ++ case '"': {
3560 ++ char s[512] ;
3561 ++ size_t len=0 ;
3562 ++ ttarget_ptr dptr ;
3563 ++ tnode *n ;
3564 ++
3565 ++ p=lexptr++ ;
3566 ++ while((c= *lexptr++)!='"') {
3567 ++ if (c == '\\') c=parse_escaped_char();
3568 ++ s[len++]=c ;
3569 ++ }
3570 ++ s[len++]=0 ;
3571 ++ dptr=duel_alloc_target_space(len);
3572 ++ duel_put_target_bytes(dptr,s,len);
3573 ++
3574 ++ n=mknode_const(src_pos,ctype_charptr);
3575 ++ n->cnst.u.rval_ptr=dptr ;
3576 ++ len=lexptr-p ;
3577 ++ if(len>60) len=60 ;
3578 ++ strncpyz(n->cnst.symb_val,p,len); /* save the symbolic val*/
3579 ++ yylval.node=n ;
3580 ++ return T_CONST ;
3581 ++ }
3582 ++ }
3583 ++
3584 ++ if(c != '_' && !isalpha(c))
3585 ++ yyerror ("Invalid character in expression.");
3586 ++
3587 ++ p=lexptr ;
3588 ++ do { c= *++lexptr ; } while(c=='_' || isalnum(c));
3589 ++
3590 ++ for (i = 0; i < sizeof(keywords)/sizeof(struct skeyword) ; i++) {
3591 ++ int l=strlen(keywords[i].keyword_str) ; /* check next token vs keywords*/
3592 ++ if(l==lexptr-p && strncmp(p,keywords[i].keyword_str,l)==0) {
3593 ++ yylval.opinfo.opcode=keywords[i].opcode ;
3594 ++ return keywords[i].token ;
3595 ++ }
3596 ++ }
3597 ++
3598 ++ /* the symbol/name found is not a reserved word, so return it as a T_SYM
3599 ++ */
3600 ++
3601 ++ i=lexptr-p ; /* length of string found (symbol/name) */
3602 ++ yylval.nameinfo.src_pos=src_pos ;
3603 ++ yylval.nameinfo.name=duel_malloc(i+1);
3604 ++ strncpyz(yylval.nameinfo.name,p,i);
3605 ++ return T_SYM;
3606 ++}
3607 ++
3608 ++LPROC yyerror(char *msg)
3609 ++{
3610 ++ int i,n=lexptr-inputstr ;
3611 ++ duel_printf("%s\n",inputstr);
3612 ++ for(i=0 ; i<n ; i++) duel_printf("-");
3613 ++ duel_printf("^ %s\n",msg);
3614 ++ duel_abort(); /* terminate parsing. some callers depend on this*/
3615 ++}
3616 ++
3617 ++/*************************************************************************/
3618 ++/* utility functions used to parse the expression and build it as a tree */
3619 ++/*************************************************************************/
3620 ++
3621 ++/* mknode_op -- make a tree node of type op with given opcode and kids
3622 ++ */
3623 ++
3624 ++LFUNC tnode* mknode_op(top_kind op_kind,topinfo opinfo,
3625 ++ tnode *k1,tnode *k2,tnode *k3,tnode *k4)
3626 ++{
3627 ++ tnode *n ;
3628 ++ duel_assert(opinfo.opcode>' ');
3629 ++ n=(tnode *) duel_malloc(sizeof(tnode));
3630 ++ duel_bzero((char*) n,sizeof(tnode));
3631 ++ n->node_kind=NK_OP ;
3632 ++ n->op_kind=op_kind ;
3633 ++ n->op=opinfo.opcode ;
3634 ++ n->src_pos=opinfo.src_pos ;
3635 ++ n->kids[0]=k1 ; n->kids[1]=k2 ; n->kids[2]=k3 ; n->kids[3]=k4 ;
3636 ++ return n ;
3637 ++}
3638 ++
3639 ++
3640 ++ /* mknode_const -- make a constant node for the given type.
3641 ++ */
3642 ++
3643 ++LFUNC tnode* mknode_const(int src_pos,tctype *ctype)
3644 ++{
3645 ++ tnode *n ;
3646 ++ n=(tnode *) duel_malloc(sizeof(tnode));
3647 ++ duel_bzero((char*) n,sizeof(tnode));
3648 ++ n->node_kind=NK_CONST ;
3649 ++ n->src_pos=src_pos ;
3650 ++ n->cnst.val_kind=VK_RVALUE ;
3651 ++ n->cnst.ctype=ctype ;
3652 ++ return n ;
3653 ++}
3654 ++
3655 ++ /* mknode_ctype -- make a node of the given c-type.
3656 ++ */
3657 ++
3658 ++LFUNC tnode* mknode_ctype(tctype *ctype)
3659 ++{
3660 ++ tnode *n ;
3661 ++ n=(tnode *) duel_malloc(sizeof(tnode));
3662 ++ duel_bzero((char*) n,sizeof(tnode));
3663 ++ n->node_kind=NK_CTYPE ;
3664 ++ n->ctype=ctype ;
3665 ++ return n ;
3666 ++}
3667 ++
3668 ++ /* mknode_name -- make a node of the given name/symbol.
3669 ++ * input is pointer to the saved name (on heap)
3670 ++ */
3671 ++
3672 ++LFUNC tnode* mknode_name(tnameinfo nameinfo)
3673 ++{
3674 ++ tnode *n ;
3675 ++ n=(tnode *) duel_malloc(sizeof(tnode));
3676 ++ duel_bzero((char*) n,sizeof(tnode));
3677 ++ n->node_kind=NK_NAME ;
3678 ++ n->name=nameinfo.name ;
3679 ++ n->src_pos=nameinfo.src_pos ;
3680 ++ return n ;
3681 ++}
3682 ++
3683 ++/* In order to parse C types, which are 'reversed' in the parser, a stack
3684 ++ * is used to push abstract declarators, e.g. in (*)() we first push a func
3685 ++ * indicator '(' and then push a pointer indicator '*'. for arrays we push
3686 ++ * a '[' and the array size.
3687 ++ * This stack is popped and a ctype is constructed at the end of the
3688 ++ * abstract type parsing. The following functions implement the stack
3689 ++ */
3690 ++
3691 ++typedef struct stype_desc { /* stack of type descriptors is made of these */
3692 ++ char desc ;
3693 ++ int size ;
3694 ++ struct stype_desc *next ; /* next on stack */
3695 ++ } ttype_desc ;
3696 ++
3697 ++ttype_desc *top = 0 ;
3698 ++
3699 ++
3700 ++LPROC push_type(char desc) /* put desc on the types stack */
3701 ++{
3702 ++ ttype_desc *p = (ttype_desc* ) duel_malloc(sizeof(ttype_desc));
3703 ++ p->desc=desc ;
3704 ++ p->size=0 ;
3705 ++ p->next=top ;
3706 ++ top=p ;
3707 ++}
3708 ++
3709 ++/* push_type_int -- same as push_type but also set the size parameter, which
3710 ++ * is given as a constant node (which is expected to be int)
3711 ++ */
3712 ++
3713 ++LPROC push_type_int(char desc,tnode *n)
3714 ++{
3715 ++ duel_assert(n->node_kind==NK_CONST);
3716 ++ if(n->cnst.ctype != ctype_int ||
3717 ++ n->cnst.u.rval_int <=0 ) duel_gen_error("Illegal array size",0);
3718 ++ push_type(desc);
3719 ++ top->size=n->cnst.u.rval_int ;
3720 ++}
3721 ++
3722 ++LFUNC bool pop_type(char *desc,int *size) /* pop item from stack. */
3723 ++{
3724 ++ ttype_desc *p = top ;
3725 ++ if(p==0) return FALSE ;
3726 ++ *desc=p->desc ;
3727 ++ *size=p->size ;
3728 ++ top=p->next ;
3729 ++ duel_free(p) ;
3730 ++ return TRUE ;
3731 ++}
3732 ++
3733 ++
3734 ++/* abstract type-modifiers were pushed on a stack. Retrieve
3735 ++ * them (reversed) creating type nodes as we go
3736 ++ * input: base type (e.g. 'long').
3737 ++ * returns: node of the modified type.
3738 ++ * modification is based on the stack of things pushed while parsing.
3739 ++ */
3740 ++
3741 ++LFUNC tnode* mknode_modified_ctype(tctype *base)
3742 ++{
3743 ++ int size;
3744 ++ char tdesc ; /* descriptor of abs decl eg '*' */
3745 ++ tctype *t=base ; /* type under construction */
3746 ++
3747 ++ while(pop_type(&tdesc,&size)) /* pop next abs decl */
3748 ++ switch (tdesc) {
3749 ++ case '*': t=duel_mkctype_ptr(t); break ;
3750 ++ case '(': t=duel_mkctype_func(t); break ;
3751 ++ case '[': t=duel_mkctype_array(t,size); break ;
3752 ++ }
3753 ++ return mknode_ctype(t) ;
3754 ++}
3755 ++
3756 ++/* entry point for parsing. the given expression is parsed into the given
3757 ++ * node as root.
3758 ++ */
3759 ++
3760 ++FUNC tnode* duel_parse(char *s)
3761 ++{
3762 ++ lexptr=inputstr=s ;
3763 ++ top=0 ; /* reset the types stack */
3764 ++ if(duel_yyparse()) root=NULL ;
3765 ++ return root ;
3766 ++}
3767 ++
3768 +--- gdb/duel/parse.y
3769 ++++ gdb/duel/parse.y
3770 +@@ -0,0 +1,943 @@
3771 ++%{
3772 ++/* DUEL - A Very High Level Debugging Langauge. */
3773 ++/* Public domain code */
3774 ++/* Written by Michael Golan mg@××××××××××××.edu */
3775 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
3776 ++
3777 ++/* this module contains the duel parser, in yacc, plus a simple lexer.
3778 ++ * the lexer is slow, but duel expressions are tiny.
3779 ++ * the parsing generate an AST with essentially no type checking.
3780 ++ * names are only looked up when the refer explicitly to types. This forces
3781 ++ * the use of "T" before user types. You can't parse (x)(y) correctly, if
3782 ++ * you want the node to contain "cast" or "func", without knowing the x is
3783 ++ * not a type. (It is interesting to note that (x *)(y) is clearly a cast,
3784 ++ * but it can not be parsed without a context sensitive grammer!).
3785 ++ *
3786 ++ * Version 1.1 now accept (x) as a type cast, so (print)("hi") fails, but
3787 ++ * (uint)z is ok. Also accepted is (uint*)z. T is still required in sizeof
3788 ++ * and in variable declarations. A side effect was making "sizeof x" illegal
3789 ++ * (since then sizeof(x)-1 was parsed sizeof((x)-1) with (x) a cast), so
3790 ++ * now sizeof(x) must be used. Note that in C, sizoef(x)++ is acceptable,
3791 ++ * and the '++' operate on x (which is optimized out!) This can be confusing.
3792 ++ *
3793 ++ * yacc is also not smart enough to recognize e.g. "if(e) e ; else e" as
3794 ++ * a special case (redundent ';'). I hacked this in the lexer. It should
3795 ++ * reduce the trouble with C->duel coding. (It can also be done for {e1}e2,
3796 ++ * in some speical cases, e.g. if e2 is a keyword, or a name or a unary op,
3797 ++ * but this can confuse some people, e.g. in {i}[5], so I left it alone.)
3798 ++ * Finally, the %/ operator is accepted as "#/" and "%%" as "#", to those
3799 ++ * who wish to keep gdb with # comments.
3800 ++ * memory: nodes are alloc'ed dynamically. a parsing error loose so-far
3801 ++ * allocated nodes, which is normally acceptable (yyerror can probably hack
3802 ++ * into the yacc stack to release them.)
3803 ++ */
3804 ++
3805 ++/*
3806 ++ * $Log: 10_all_gdb-6.6-duel.patch,v $
3807 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
3808 ++ * cleanup duel build a little and fix patch
3809 ++ *
3810 ++ * Revision 1.1 2007/12/29 21:06:06 vapier
3811 ++ * add DUEL support #199987 by Sergei Golubchik
3812 ++ *
3813 ++ * Revision 1.14 93/03/17 11:04:12 mg
3814 ++ * fixed (t*)x bug, was parsed as (t**)x
3815 ++ *
3816 ++ * Revision 1.13 93/03/12 06:15:09 mg
3817 ++ * modified unary's a bit - cosmetics
3818 ++ * support (x)y as type cast
3819 ++ * support (x*)y as type cast
3820 ++ * replace sizeof exp with sizeof(exp) to prevent clash with above
3821 ++ * more cosmetics, including yyerror abort, tuint for uint.
3822 ++ * takes anything after |> to be comment (pipe command really)
3823 ++ *
3824 ++ *
3825 ++ * Revision 1.12 93/02/27 06:06:09 mg
3826 ++ * added signed char parsing.
3827 ++ *
3828 ++ * Revision 1.11 93/02/23 19:15:38 mg
3829 ++ * improved escaped char support
3830 ++ *
3831 ++ * Revision 1.10 93/02/03 21:49:34 mg
3832 ++ * bug fix - yyerror calls now abort parsing (eg called from lex)
3833 ++ *
3834 ++ * Revision 1.9 93/01/12 21:53:07 mg
3835 ++ * cleanup and set for release
3836 ++ *
3837 ++ * Revision 1.8 93/01/07 00:14:33 mg
3838 ++ * add &&/ ||/
3839 ++ * fixed parsing of trailing ';' was a mess.
3840 ++ * ignore ';' before 'else' and '}' w/warning.
3841 ++ *
3842 ++ * Revision 1.7 93/01/03 07:31:01 mg
3843 ++ * error reporting
3844 ++ *
3845 ++ * Revision 1.6 92/12/24 23:35:50 mg
3846 ++ * began src pos support
3847 ++ *
3848 ++ * Revision 1.5 92/10/19 15:08:02 mg
3849 ++ * frames() added; bug fixed
3850 ++ *
3851 ++ * Revision 1.4 92/10/14 02:06:32 mg
3852 ++ * misc/change casting parsing/variable def.
3853 ++ *
3854 ++ * Revision 1.3 92/09/16 11:09:39 mg
3855 ++ * add typedef/struct support, const strings
3856 ++ * cleanup s/r conflict by setting ELSE to a token. explained some stuff in
3857 ++ * comments.
3858 ++ *
3859 ++ * Revision 1.2 92/09/15 06:10:46 mg
3860 ++ * cosmetics and new ops: x@y, for() while() ..x and x..
3861 ++ * generic '.' and '_' support. x@y. '..x' and 'x..'. while(), for(), ?:
3862 ++ *
3863 ++ */
3864 ++
3865 ++#include "duel.h"
3866 ++
3867 ++static char *inputstr ; /* pointer to string being parsed */
3868 ++static char *lexptr ; /* current lexer pointer into input str */
3869 ++static tnode *root ; /* result of parsing stored here */
3870 ++
3871 ++/* pick unique names for globals of yacc. gdb has other parsers! */
3872 ++#define yyparse duel_yyparse
3873 ++#define yylex duel_yylex
3874 ++#define yyerror duel_yyerror
3875 ++#define yylval duel_yylval
3876 ++#define yychar duel_yychar
3877 ++#define yydebug duel_yydebug
3878 ++#define yypact duel_yypact
3879 ++#define yyr1 duel_yyr1
3880 ++#define yyr2 duel_yyr2
3881 ++#define yydef duel_yydef
3882 ++#define yychk duel_yychk
3883 ++#define yypgo duel_yypgo
3884 ++#define yyact duel_yyact
3885 ++#define yyexca duel_yyexca
3886 ++#define yyerrflag duel_yyerrflag
3887 ++#define yynerrs duel_yynerrs
3888 ++#define yyps duel_yyps
3889 ++#define yypv duel_yypv
3890 ++#define yys duel_yys
3891 ++#define yystate duel_yystate
3892 ++#define yytmp duel_yytmp
3893 ++#define yyv duel_yyv
3894 ++#define yyval duel_yyval
3895 ++#define yylloc duel_yylloc
3896 ++
3897 ++typedef struct { /* token info for operators */
3898 ++ int src_pos ; /* source position */
3899 ++ topcode opcode ; /* opcode */
3900 ++ } topinfo ;
3901 ++
3902 ++typedef struct { /* token info for symbols */
3903 ++ int src_pos ; /* source position */
3904 ++ char *name ; /* symbol */
3905 ++ } tnameinfo ;
3906 ++
3907 ++/* these are used as operators to mknode_... when source location is unknown*/
3908 ++static topinfo seq_op = { -1,';' } ; /* sequencing operator, src pos unkown */
3909 ++static topinfo decl_op = { -1,OP_DECL } ; /* declare var op, src pos unkown */
3910 ++
3911 ++/* local prototypes. */
3912 ++LPROC yyerror(char *msg);
3913 ++LFUNC int yylex (void);
3914 ++
3915 ++LPROC push_type(char desc) ;
3916 ++LPROC push_type_int(char desc,tnode *n) ;
3917 ++LFUNC bool pop_type(char *desc,int *size);
3918 ++
3919 ++LFUNC tnode* mknode_op(top_kind,topinfo opinfo,tnode*,tnode*,tnode*,tnode*);
3920 ++LFUNC tnode* mknode_const(int src_pos,tctype *ctype);
3921 ++LFUNC tnode* mknode_ctype(tctype *ctype);
3922 ++LFUNC tnode* mknode_name(tnameinfo nameinfo);
3923 ++LFUNC tnode* mknode_modified_ctype(tctype *base);
3924 ++
3925 ++#define mknode_post_unary(op,n) (mknode_op(OPK_POST_UNARY,op,n, 0, 0,0))
3926 ++#define mknode_unary(op,n) (mknode_op(OPK_UNARY, op,n, 0, 0,0))
3927 ++#define mknode_sunary(op,n) (mknode_op(OPK_SUNARY, op,n, 0, 0,0))
3928 ++#define mknode_bin(op,n1,n2) (mknode_op(OPK_BIN, op,n1,n2,0,0))
3929 ++#define mknode_sbin(op,n1,n2) (mknode_op(OPK_SBIN, op,n1,n2,0,0))
3930 ++#define mknode_tri(op,n1,n2,n3) (mknode_op(OPK_TRI, op,n1,n2,n3,0))
3931 ++
3932 ++static tctype *decl_tbase ; /* used for variables decl */
3933 ++
3934 ++/* #define YYDEBUG 1 */
3935 ++
3936 ++%}
3937 ++
3938 ++%union
3939 ++ {
3940 ++ tnode *node ; /* node pointer for constructed exp tree */
3941 ++ tctype *ctype; /* type for type nodes */
3942 ++ tnameinfo nameinfo ; /* a name/symbol + src position */
3943 ++ topinfo opinfo; /* keyword/operator + source position */
3944 ++ }
3945 ++
3946 ++%type <node> start duel_inp duel_exp exp type nameexp sm_exp oexp
3947 ++%type <node> all_decls vars_decl var_decl name_decl1 name_decl
3948 ++%type <ctype> typebase
3949 ++%type <nameinfo> name
3950 ++
3951 ++%token <node> T_CONST
3952 ++%token <nameinfo> T_SYM
3953 ++%token <opinfo> T_ASSIGN T_DEFVAR
3954 ++
3955 ++
3956 ++%token <opinfo> T_CHAR T_INT T_SHORT T_LONG T_UNSIGNED T_FLOAT T_DOUBLE T_VOID
3957 ++%token <opinfo> T_STRUCT T_UNION T_ENUM T_SIZEOF T_TYPEDEF_INDICATOR T_SIGNED
3958 ++
3959 ++%token <opinfo> T_IF T_ELSE T_FOR T_WHILE
3960 ++%token <opinfo> ';' ',' '=' '?' '|' '^' '&' '<' '>' '+' '-' '*' '/' '%'
3961 ++%token <opinfo> '.' '[' ']' '(' ')' '{' '}' '#' '@' '!' '~'
3962 ++%token <opinfo> T_OR T_AND T_RSH T_LSH T_INC T_DEC T_COUNT T_FRAME T_TO
3963 ++%token <opinfo> T_DFS T_BFS T_ARROW T_OSEL T_CSEL T_IMP T_ANDL T_ORL
3964 ++%token <opinfo> T_EQ T_NE T_EQQ T_NEQ T_LE T_GE T_LSQ T_GTQ T_LEQ T_GEQ
3965 ++
3966 ++%left ';'
3967 ++%right STMT T_ELSE
3968 ++%right T_IMP
3969 ++%right ','
3970 ++%right '=' T_ASSIGN T_DEFVAR
3971 ++%right '?'
3972 ++%left T_OR T_ORL
3973 ++%left T_AND T_ANDL
3974 ++%left '|'
3975 ++%left '^'
3976 ++%left '&'
3977 ++%left T_EQ T_NE T_EQQ T_NEQ
3978 ++%left '<' '>' T_LE T_GE T_LSQ T_GTQ T_LEQ T_GEQ
3979 ++%nonassoc T_TO
3980 ++%left T_LSH T_RSH
3981 ++%left '+' '-'
3982 ++%left '*' '/' '%'
3983 ++%right UNARY '!' '~' T_INC T_DEC T_COUNT T_FRAME
3984 ++%left T_DFS T_BFS T_POS T_ARROW '.' '[' ']' '(' ')' '{' '}' '#' '@' T_OSEL T_CSEL
3985 ++%%
3986 ++
3987 ++start : duel_inp { root=$1 ; }
3988 ++ ;
3989 ++
3990 ++duel_inp : all_decls
3991 ++ | all_decls ';'
3992 ++ | all_decls ';' duel_exp { $$=mknode_sbin($2,$1,$3);}
3993 ++ | duel_exp
3994 ++ ;
3995 ++duel_exp : sm_exp
3996 ++ | sm_exp ';' { $$=mknode_sbin($2,$1,0); }
3997 ++ ;
3998 ++all_decls: vars_decl
3999 ++ | all_decls ';' vars_decl { $$=mknode_sbin($2,$1,$3); }
4000 ++ ;
4001 ++
4002 ++vars_decl: typebase { decl_tbase=$1 ; } var_decl { $$=$3 ; }
4003 ++ ;
4004 ++var_decl : name_decl1
4005 ++ | var_decl ',' name_decl1 { $$=mknode_sbin(seq_op,$1,$3); }
4006 ++ ;
4007 ++
4008 ++name_decl1: name_decl { $$=mknode_sbin(decl_op,$1,
4009 ++ mknode_modified_ctype(decl_tbase)); }
4010 ++ ;
4011 ++
4012 ++name_decl : '(' name_decl ')' { $$=$2 ; }
4013 ++ | '(' name_decl ')' '(' ')' { $$=$2 ; push_type('('); }
4014 ++ | '*' name_decl { $$=$2 ; push_type('*'); }
4015 ++ | name_decl '[' T_CONST ']' { $$=$1 ; push_type_int('[',$3); }
4016 ++ | nameexp
4017 ++ ;
4018 ++
4019 ++/* Statements - not really, these are expressions too!
4020 ++ Notes: for(;;) oexp - will create lots of shift/reduce conflicts,
4021 ++ 'for(;;;)' and 'for(;;) exp' are specified
4022 ++ instead and yacc handle this as a "standard" s/r.
4023 ++ the only diff is yacc dont complain on these!
4024 ++ if() - same comments as above, plus, we prevent meaningless
4025 ++ if's like in C: ' if(x); else;' - a useless statement.
4026 ++ */
4027 ++exp : T_IF '(' exp ')' exp %prec STMT { $$=mknode_tri($1,$3,$5,0); }
4028 ++ | T_IF '(' exp ')' exp T_ELSE %prec STMT
4029 ++ { $$=mknode_tri($1,$3,$5,0); }
4030 ++ | T_IF '(' exp ')' T_ELSE exp %prec STMT
4031 ++ { $$=mknode_tri($1,$3,0,$6); }
4032 ++ | T_IF '(' exp ')' exp T_ELSE exp %prec STMT
4033 ++ { $$=mknode_tri($1,$3,$5,$7); }
4034 ++
4035 ++ | T_FOR '(' oexp ';' exp ';' oexp ')' exp %prec STMT
4036 ++ { $$=mknode_op(OPK_QUAD,$1,$3,$5,$7,$9); }
4037 ++ | T_FOR '(' oexp ';' exp ';' oexp ')' %prec STMT
4038 ++ { $$=mknode_op(OPK_QUAD,$1,$3,$5,$7,0); }
4039 ++ | T_WHILE '(' exp ')' exp %prec STMT
4040 ++ { $$=mknode_sbin($1,$3,$5); }
4041 ++ | T_WHILE '(' exp ')' %prec STMT
4042 ++ { $$=mknode_sbin($1,$3,0); }
4043 ++ ;
4044 ++
4045 ++/* Expressions */
4046 ++
4047 ++exp : '*' exp %prec UNARY { $$=mknode_unary( $1,$2); }
4048 ++ | '&' exp %prec UNARY { $$=mknode_unary( $1,$2); }
4049 ++ | '-' exp %prec UNARY { $$=mknode_unary( $1,$2); }
4050 ++ | '!' exp { $$=mknode_unary( $1,$2); }
4051 ++ | '~' exp { $$=mknode_unary( $1,$2); }
4052 ++ | T_COUNT exp { $$=mknode_sunary($1,$2); }
4053 ++ | T_ANDL exp { $$=mknode_sunary($1,$2); }
4054 ++ | T_ORL exp { $$=mknode_sunary($1,$2); }
4055 ++ | T_INC exp { $$=mknode_unary( $1,$2); }
4056 ++ | T_DEC exp { $$=mknode_unary( $1,$2); }
4057 ++ | exp T_INC { $$=mknode_post_unary($2,$1); }
4058 ++ | exp T_DEC { $$=mknode_post_unary($2,$1); }
4059 ++ | T_SIZEOF '(' type ')' { $$=mknode_sunary($1,$3); }
4060 ++ | T_SIZEOF '(' exp ')' { $$=mknode_unary($1,$3); }
4061 ++ | T_FRAME '(' exp ')' %prec UNARY { $$=mknode_unary( $1,$3); }
4062 ++ ;
4063 ++
4064 ++exp : exp T_DFS exp { $$=mknode_sbin($2,$1,$3); }
4065 ++ | exp T_BFS exp { $$=mknode_sbin($2,$1,$3); }
4066 ++
4067 ++ | exp '#' nameexp { $$=mknode_sbin($2,$1,$3); }
4068 ++ | exp '@' exp { $$=mknode_sbin($2,$1,$3); }
4069 ++ | exp T_ARROW exp { $$=mknode_sbin($2,$1,$3); }
4070 ++ | exp '.' exp { $$=mknode_sbin($2,$1,$3); }
4071 ++ | exp '[' exp ']' { $$=mknode_bin( $2,$1,$3); }
4072 ++ | exp T_OSEL exp T_CSEL { $$=mknode_sbin($2,$1,$3); }
4073 ++ | exp '(' oexp ')' %prec '.' { $$=mknode_op(OPK_FUNC,$2,$1,$3,0,0); }
4074 ++ | '(' sm_exp ')' { $$=mknode_unary($1,$2); }
4075 ++ | '{' sm_exp '}' { $$=mknode_unary($1,$2); }
4076 ++ ;
4077 ++
4078 ++exp : '(' type ')' exp %prec UNARY
4079 ++ { $$=mknode_op(OPK_CAST,$1,$2,$4,0,0); }
4080 ++/* HACKS to handle the most common cast cases with a typedef, without
4081 ++ * requiring a 'T'. This code breaks (printf)("hi"), which returns the
4082 ++ * error "printf not a typedef", but otherwise it works ok.
4083 ++ * It might be confusing since "(uint *)p" works but "(uint (*)())p" wont,
4084 ++ * but it seems that (uint*)p, (uint)x are the most common, and users get
4085 ++ * confused w/o them.
4086 ++ * The code below works essentially with context-sensitive parsing!
4087 ++ * see the hacked %prec for nameexp which prevents yacc s/r warning!
4088 ++ */
4089 ++ | '(' name ')' exp %prec UNARY {
4090 ++ tctype *t=duel_get_target_typedef($2.name);
4091 ++ if(t==NULL) yyerror("not a typedef name");
4092 ++ $$=mknode_op(OPK_CAST,$1,mknode_ctype(t),$4,0,0); }
4093 ++ | '(' name '*' type_mod ')' exp %prec UNARY {
4094 ++ tctype *t=duel_get_target_typedef($2.name);
4095 ++ if(t==NULL) yyerror("not a typedef name");
4096 ++ push_type('*');
4097 ++ $$=mknode_op(OPK_CAST,$1,mknode_modified_ctype(t),$6,0,0); }
4098 ++ ;
4099 ++
4100 ++ /* Bin ops in decreasing precedence order: */
4101 ++
4102 ++exp : exp '*' exp { $$=mknode_bin($2,$1,$3); }
4103 ++ | exp '/' exp { $$=mknode_bin($2,$1,$3); }
4104 ++ | exp '%' exp { $$=mknode_bin($2,$1,$3); }
4105 ++ | exp '+' exp { $$=mknode_bin($2,$1,$3); }
4106 ++ | exp '-' exp { $$=mknode_bin($2,$1,$3); }
4107 ++ | exp T_LSH exp { $$=mknode_bin($2,$1,$3); }
4108 ++ | exp T_RSH exp { $$=mknode_bin($2,$1,$3); }
4109 ++ | exp T_EQ exp { $$=mknode_bin($2,$1,$3); }
4110 ++ | exp T_NE exp { $$=mknode_bin($2,$1,$3); }
4111 ++ | exp T_EQQ exp { $$=mknode_bin($2,$1,$3); }
4112 ++ | exp T_NEQ exp { $$=mknode_bin($2,$1,$3); }
4113 ++ | exp T_LE exp { $$=mknode_bin($2,$1,$3); }
4114 ++ | exp T_GE exp { $$=mknode_bin($2,$1,$3); }
4115 ++ | exp T_LEQ exp { $$=mknode_bin($2,$1,$3); }
4116 ++ | exp T_GEQ exp { $$=mknode_bin($2,$1,$3); }
4117 ++ | exp '<' exp { $$=mknode_bin($2,$1,$3); }
4118 ++ | exp '>' exp { $$=mknode_bin($2,$1,$3); }
4119 ++ | exp T_LSQ exp { $$=mknode_bin($2,$1,$3); }
4120 ++ | exp T_GTQ exp { $$=mknode_bin($2,$1,$3); }
4121 ++ | exp '&' exp { $$=mknode_bin($2,$1,$3); }
4122 ++ | exp '|' exp { $$=mknode_bin($2,$1,$3); }
4123 ++ | exp '^' exp { $$=mknode_bin($2,$1,$3); }
4124 ++ | exp T_AND exp { $$=mknode_sbin($2,$1,$3); }
4125 ++ | exp T_OR exp { $$=mknode_sbin($2,$1,$3); }
4126 ++ ;
4127 ++
4128 ++exp : exp '?' exp ':' exp %prec '?'
4129 ++ { $$=mknode_tri($2,$1,$3,$5); }
4130 ++ ;
4131 ++
4132 ++exp : exp '=' exp { $$=mknode_bin($2,$1,$3); }
4133 ++ | exp T_ASSIGN exp { $$=mknode_op(OPK_ASSIGN,$2, $1,$3,0,0); }
4134 ++ |nameexp T_DEFVAR exp { $$=mknode_sbin($2,$1,$3); }
4135 ++ ;
4136 ++
4137 ++ /* generating expressions */
4138 ++
4139 ++exp : exp T_TO exp { $$=mknode_sbin($2,$1,$3); }
4140 ++ | T_TO exp { $$=mknode_sbin($1, 0,$2); }
4141 ++ | exp T_TO { $$=mknode_sbin($2,$1, 0); }
4142 ++ | exp ',' exp { $$=mknode_sbin($2,$1,$3); }
4143 ++ | exp T_IMP exp { $$=mknode_sbin($2,$1,$3); }
4144 ++ ;
4145 +
4146 +sm_exp : sm_exp ';' exp { $$=mknode_sbin($2,$1,$3); }
4147 + | exp
4148 @@ -6393,22 +9796,25 @@
4149 +/* DUEL - A Very High Level Debugging Langauge. */
4150 +/* Public domain code */
4151 +/* Written by Michael Golan mg@××××××××××××.edu */
4152 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
4153 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
4154 +
4155 +#define PATCHLEVEL 4
4156 +#define VERSION "DUEL 1.20"
4157 --- gdb/duel/print.c
4158 +++ gdb/duel/print.c
4159 -@@ -0,0 +1,300 @@
4160 +@@ -0,0 +1,302 @@
4161 +/* DUEL - A Very High Level Debugging Langauge. */
4162 +/* Public domain code */
4163 +/* Written by Michael Golan mg@××××××××××××.edu */
4164 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
4165 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
4166 +
4167 +/* handle value/type printing */
4168 +
4169 +/*
4170 + * $Log: 10_all_gdb-6.6-duel.patch,v $
4171 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
4172 ++ * cleanup duel build a little and fix patch
4173 ++ *
4174 + * Revision 1.1 2007/12/29 21:06:06 vapier
4175 + * add DUEL support #199987 by Sergei Golubchik
4176 + *
4177 @@ -6702,14 +10108,13 @@
4178 + if(strcmp(v->symb_val,s)!=0) duel_printf(" = %s",s);
4179 + duel_printf("\n");
4180 +}
4181 -+
4182 --- gdb/duel/proto.h
4183 +++ gdb/duel/proto.h
4184 @@ -0,0 +1,101 @@
4185 +/* DUEL - A Very High Level Debugging Langauge. */
4186 +/* Public domain code */
4187 +/* Written by Michael Golan mg@××××××××××××.edu */
4188 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
4189 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
4190 +
4191 +/* prototypes for all of duel's global functions */
4192 +
4193 @@ -6813,7 +10218,7 @@
4194 +/* DUEL - A Very High Level Debugging Langauge. */
4195 +/* Public domain code */
4196 +/* Written by Michael Golan mg@××××××××××××.edu */
4197 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
4198 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
4199 +
4200 +/* this is a test program to be used with tsuite.gdb */
4201 +
4202 @@ -6881,7 +10286,7 @@
4203 +## DUEL - A Very High Level Debugging Langauge.
4204 +## Public domain code
4205 +## Written by Michael Golan mg@××××××××××××.edu
4206 -+##$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $
4207 ++##$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $
4208 +##
4209 +## test suite for duel, can be used with duelself or gdb
4210 +##
4211 @@ -7305,7 +10710,7 @@
4212 +## DUEL - A Very High Level Debugging Langauge.
4213 +## Public domain code
4214 +## Written by Michael Golan mg@××××××××××××.edu
4215 -+## $Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $
4216 ++## $Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $
4217 +
4218 +##
4219 +## test suite for duel, can be used with duelself or gdb
4220 @@ -7681,17 +11086,20 @@
4221 +dl>
4222 --- gdb/duel/types.c
4223 +++ gdb/duel/types.c
4224 -@@ -0,0 +1,202 @@
4225 +@@ -0,0 +1,203 @@
4226 +/* DUEL - A Very High Level Debugging Langauge. */
4227 +/* Public domain code */
4228 +/* Written by Michael Golan mg@××××××××××××.edu */
4229 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
4230 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
4231 +
4232 +/* this module contains the duel type system management
4233 + */
4234 +
4235 +/*
4236 + * $Log: 10_all_gdb-6.6-duel.patch,v $
4237 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
4238 ++ * cleanup duel build a little and fix patch
4239 ++ *
4240 + * Revision 1.1 2007/12/29 21:06:06 vapier
4241 + * add DUEL support #199987 by Sergei Golubchik
4242 + *
4243 @@ -7885,8 +11293,6 @@
4244 + else duel_gen_error("bad size_t size",0);
4245 + }
4246 +}
4247 -+
4248 -+
4249 --- gdb/duel/wishlist.doc
4250 +++ gdb/duel/wishlist.doc
4251 @@ -0,0 +1,160 @@
4252 @@ -8052,11 +11458,11 @@
4253 +where e1 is the first return symbolc, en the last.
4254 --- gdb/duelgdb.c
4255 +++ gdb/duelgdb.c
4256 -@@ -0,0 +1,694 @@
4257 +@@ -0,0 +1,696 @@
4258 +/* DUEL - A Very High Level Debugging Langauge. */
4259 +/* Public domain code */
4260 +/* Written by Michael Golan mg@××××××××××××.edu */
4261 -+/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.1 2007/12/29 21:06:06 vapier Exp $*/
4262 ++/*$Header: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/10_all_gdb-6.6-duel.patch,v 1.2 2007/12/30 20:13:23 vapier Exp $*/
4263 +
4264 +/* debugger dependent module, it contains all of duel's access to
4265 + * the outside world (debuggee, symbol table, etc)
4266 @@ -8064,6 +11470,9 @@
4267 +
4268 +/*
4269 + * $Log: 10_all_gdb-6.6-duel.patch,v $
4270 ++ * Revision 1.2 2007/12/30 20:13:23 vapier
4271 ++ * cleanup duel build a little and fix patch
4272 ++ *
4273 + * Revision 1.1 2007/12/29 21:06:06 vapier
4274 + * add DUEL support #199987 by Sergei Golubchik
4275 + *
4276 @@ -8748,5 +12157,4 @@
4277 +"Evaluate Duel expressions. Duel is a very high level debugging language.\n\
4278 +\"dl help\" for help.\n");
4279 + add_com_alias ("dl", "duel", class_vars, 1);
4280 -+
4281 +}
4282
4283
4284
4285 1.2 src/patchsets/gdb/6.7.1/11_all_gdb-6.6-duel-integrate.patch
4286
4287 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/11_all_gdb-6.6-duel-integrate.patch?rev=1.2&view=markup
4288 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/11_all_gdb-6.6-duel-integrate.patch?rev=1.2&content-type=text/plain
4289 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/11_all_gdb-6.6-duel-integrate.patch?r1=1.1&r2=1.2
4290
4291 Index: 11_all_gdb-6.6-duel-integrate.patch
4292 ===================================================================
4293 RCS file: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/11_all_gdb-6.6-duel-integrate.patch,v
4294 retrieving revision 1.1
4295 retrieving revision 1.2
4296 diff -u -r1.1 -r1.2
4297 --- 11_all_gdb-6.6-duel-integrate.patch 29 Dec 2007 21:06:06 -0000 1.1
4298 +++ 11_all_gdb-6.6-duel-integrate.patch 30 Dec 2007 20:13:23 -0000 1.2
4299 @@ -54,6 +54,6 @@
4300 $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c
4301
4302 +$(DUEL):
4303 -+ $(MAKE) -C duel
4304 ++ $(MAKE) $(FLAGS_TO_PASS) -C duel
4305 +
4306 ### end of the gdb Makefile.in.
4307
4308
4309
4310 1.3 src/patchsets/gdb/6.7.1/README.history
4311
4312 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/README.history?rev=1.3&view=markup
4313 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/README.history?rev=1.3&content-type=text/plain
4314 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7.1/README.history?r1=1.2&r2=1.3
4315
4316 Index: README.history
4317 ===================================================================
4318 RCS file: /var/cvsroot/gentoo/src/patchsets/gdb/6.7.1/README.history,v
4319 retrieving revision 1.2
4320 retrieving revision 1.3
4321 diff -u -r1.2 -r1.3
4322 --- README.history 29 Dec 2007 21:06:06 -0000 1.2
4323 +++ README.history 30 Dec 2007 20:13:23 -0000 1.3
4324 @@ -1,3 +1,7 @@
4325 +1.2 [30.12.2007]
4326 + U 10_all_gdb-6.6-duel.patch
4327 + U 11_all_gdb-6.6-duel-integrate.patch
4328 +
4329 1.1 [29.12.2007]
4330 + 10_all_gdb-6.6-duel.patch
4331 + 11_all_gdb-6.6-duel-integrate.patch
4332
4333
4334
4335 --
4336 gentoo-commits@g.o mailing list