1ddb504emarcel/* A Bison parser, made by GNU Bison 1.875.  */
2ddb504emarcel
3ddb504emarcel/* Skeleton parser for Yacc-like parsing with Bison,
4ddb504emarcel   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
5ddb504emarcel
6ddb504emarcel   This program is free software; you can redistribute it and/or modify
7ddb504emarcel   it under the terms of the GNU General Public License as published by
8ddb504emarcel   the Free Software Foundation; either version 2, or (at your option)
9ddb504emarcel   any later version.
10ddb504emarcel
11ddb504emarcel   This program is distributed in the hope that it will be useful,
12ddb504emarcel   but WITHOUT ANY WARRANTY; without even the implied warranty of
13ddb504emarcel   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14ddb504emarcel   GNU General Public License for more details.
15ddb504emarcel
16ddb504emarcel   You should have received a copy of the GNU General Public License
17ddb504emarcel   along with this program; if not, write to the Free Software
18ddb504emarcel   Foundation, Inc., 59 Temple Place - Suite 330,
19ddb504emarcel   Boston, MA 02111-1307, USA.  */
20ddb504emarcel
21ddb504emarcel/* As a special exception, when this file is copied by Bison into a
22ddb504emarcel   Bison output file, you may use that output file without restriction.
23ddb504emarcel   This special exception was added by the Free Software Foundation
24ddb504emarcel   in version 1.24 of Bison.  */
25ddb504emarcel
26ddb504emarcel/* Written by Richard Stallman by simplifying the original so called
27ddb504emarcel   ``semantic'' parser.  */
28ddb504emarcel
29ddb504emarcel/* All symbols defined below should begin with yy or YY, to avoid
30ddb504emarcel   infringing on user name space.  This should be done even for local
31ddb504emarcel   variables, as they might otherwise be expanded by user macros.
32ddb504emarcel   There are some unavoidable exceptions within include files to
33ddb504emarcel   define necessary library symbols; they are noted "INFRINGES ON
34ddb504emarcel   USER NAME SPACE" below.  */
35ddb504emarcel
36ddb504emarcel/* Identify Bison output.  */
37ddb504emarcel#define YYBISON 1
38ddb504emarcel
39ddb504emarcel/* Skeleton name.  */
40ddb504emarcel#define YYSKELETON_NAME "yacc.c"
41ddb504emarcel
42ddb504emarcel/* Pure parsers.  */
43ddb504emarcel#define YYPURE 0
44ddb504emarcel
45ddb504emarcel/* Using locations.  */
46ddb504emarcel#define YYLSP_NEEDED 0
47ddb504emarcel
48ddb504emarcel
49ddb504emarcel
50ddb504emarcel/* Tokens.  */
51ddb504emarcel#ifndef YYTOKENTYPE
52ddb504emarcel# define YYTOKENTYPE
53ddb504emarcel   /* Put the tokens into the symbol table, so that GDB and other debuggers
54ddb504emarcel      know about them.  */
55ddb504emarcel   enum yytokentype {
56ddb504emarcel     INT = 258,
57ddb504emarcel     FLOAT = 259,
58ddb504emarcel     STRING = 260,
59ddb504emarcel     FIELDNAME = 261,
60ddb504emarcel     NAME = 262,
61ddb504emarcel     TYPENAME = 263,
62ddb504emarcel     NAME_OR_INT = 264,
63ddb504emarcel     STRUCT = 265,
64ddb504emarcel     CLASS = 266,
65ddb504emarcel     SIZEOF = 267,
66ddb504emarcel     COLONCOLON = 268,
67ddb504emarcel     ERROR = 269,
68ddb504emarcel     VARIABLE = 270,
69ddb504emarcel     THIS = 271,
70ddb504emarcel     TRUEKEYWORD = 272,
71ddb504emarcel     FALSEKEYWORD = 273,
72ddb504emarcel     ABOVE_COMMA = 274,
73ddb504emarcel     ASSIGN = 275,
74ddb504emarcel     NOT = 276,
75ddb504emarcel     OR = 277,
76ddb504emarcel     XOR = 278,
77ddb504emarcel     ANDAND = 279,
78ddb504emarcel     NOTEQUAL = 280,
79ddb504emarcel     GEQ = 281,
80ddb504emarcel     LEQ = 282,
81ddb504emarcel     MOD = 283,
82ddb504emarcel     DIV = 284,
83ddb504emarcel     RSH = 285,
84ddb504emarcel     LSH = 286,
85ddb504emarcel     DECREMENT = 287,
86ddb504emarcel     INCREMENT = 288,
87ddb504emarcel     UNARY = 289,
88ddb504emarcel     ARROW = 290,
89ddb504emarcel     BLOCKNAME = 291
90ddb504emarcel   };
91ddb504emarcel#endif
92ddb504emarcel#define INT 258
93ddb504emarcel#define FLOAT 259
94ddb504emarcel#define STRING 260
95ddb504emarcel#define FIELDNAME 261
96ddb504emarcel#define NAME 262
97ddb504emarcel#define TYPENAME 263
98ddb504emarcel#define NAME_OR_INT 264
99ddb504emarcel#define STRUCT 265
100ddb504emarcel#define CLASS 266
101ddb504emarcel#define SIZEOF 267
102ddb504emarcel#define COLONCOLON 268
103ddb504emarcel#define ERROR 269
104ddb504emarcel#define VARIABLE 270
105ddb504emarcel#define THIS 271
106ddb504emarcel#define TRUEKEYWORD 272
107ddb504emarcel#define FALSEKEYWORD 273
108ddb504emarcel#define ABOVE_COMMA 274
109ddb504emarcel#define ASSIGN 275
110ddb504emarcel#define NOT 276
111ddb504emarcel#define OR 277
112ddb504emarcel#define XOR 278
113ddb504emarcel#define ANDAND 279
114ddb504emarcel#define NOTEQUAL 280
115ddb504emarcel#define GEQ 281
116ddb504emarcel#define LEQ 282
117ddb504emarcel#define MOD 283
118ddb504emarcel#define DIV 284
119ddb504emarcel#define RSH 285
120ddb504emarcel#define LSH 286
121ddb504emarcel#define DECREMENT 287
122ddb504emarcel#define INCREMENT 288
123ddb504emarcel#define UNARY 289
124ddb504emarcel#define ARROW 290
125ddb504emarcel#define BLOCKNAME 291
126ddb504emarcel
127ddb504emarcel
128ddb504emarcel
129ddb504emarcel
130ddb504emarcel/* Copy the first part of user declarations.  */
131ddb504emarcel#line 46 "p-exp.y"
132ddb504emarcel
133ddb504emarcel
134ddb504emarcel#include "defs.h"
135ddb504emarcel#include "gdb_string.h"
136ddb504emarcel#include <ctype.h>
137ddb504emarcel#include "expression.h"
138ddb504emarcel#include "value.h"
139ddb504emarcel#include "parser-defs.h"
140ddb504emarcel#include "language.h"
141ddb504emarcel#include "p-lang.h"
142ddb504emarcel#include "bfd.h" /* Required by objfiles.h.  */
143ddb504emarcel#include "symfile.h" /* Required by objfiles.h.  */
144ddb504emarcel#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
145ddb504emarcel#include "block.h"
146ddb504emarcel
147ddb504emarcel/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
148ddb504emarcel   as well as gratuitiously global symbol names, so we can have multiple
149ddb504emarcel   yacc generated parsers in gdb.  Note that these are only the variables
150ddb504emarcel   produced by yacc.  If other parser generators (bison, byacc, etc) produce
151ddb504emarcel   additional global names that conflict at link time, then those parser
152ddb504emarcel   generators need to be fixed instead of adding those names to this list. */
153ddb504emarcel
154ddb504emarcel#define	yymaxdepth pascal_maxdepth
155ddb504emarcel#define	yyparse	pascal_parse
156ddb504emarcel#define	yylex	pascal_lex
157ddb504emarcel#define	yyerror	pascal_error
158ddb504emarcel#define	yylval	pascal_lval
159ddb504emarcel#define	yychar	pascal_char
160ddb504emarcel#define	yydebug	pascal_debug
161ddb504emarcel#define	yypact	pascal_pact
162ddb504emarcel#define	yyr1	pascal_r1
163ddb504emarcel#define	yyr2	pascal_r2
164ddb504emarcel#define	yydef	pascal_def
165ddb504emarcel#define	yychk	pascal_chk
166ddb504emarcel#define	yypgo	pascal_pgo
167ddb504emarcel#define	yyact	pascal_act
168ddb504emarcel#define	yyexca	pascal_exca
169ddb504emarcel#define yyerrflag pascal_errflag
170ddb504emarcel#define yynerrs	pascal_nerrs
171ddb504emarcel#define	yyps	pascal_ps
172ddb504emarcel#define	yypv	pascal_pv
173ddb504emarcel#define	yys	pascal_s
174ddb504emarcel#define	yy_yys	pascal_yys
175ddb504emarcel#define	yystate	pascal_state
176ddb504emarcel#define	yytmp	pascal_tmp
177ddb504emarcel#define	yyv	pascal_v
178ddb504emarcel#define	yy_yyv	pascal_yyv
179ddb504emarcel#define	yyval	pascal_val
180ddb504emarcel#define	yylloc	pascal_lloc
181ddb504emarcel#define yyreds	pascal_reds		/* With YYDEBUG defined */
182ddb504emarcel#define yytoks	pascal_toks		/* With YYDEBUG defined */
183ddb504emarcel#define yyname	pascal_name		/* With YYDEBUG defined */
184ddb504emarcel#define yyrule	pascal_rule		/* With YYDEBUG defined */
185ddb504emarcel#define yylhs	pascal_yylhs
186ddb504emarcel#define yylen	pascal_yylen
187ddb504emarcel#define yydefred pascal_yydefred
188ddb504emarcel#define yydgoto	pascal_yydgoto
189ddb504emarcel#define yysindex pascal_yysindex
190ddb504emarcel#define yyrindex pascal_yyrindex
191ddb504emarcel#define yygindex pascal_yygindex
192ddb504emarcel#define yytable	 pascal_yytable
193ddb504emarcel#define yycheck	 pascal_yycheck
194ddb504emarcel
195ddb504emarcel#ifndef YYDEBUG
196ddb504emarcel#define	YYDEBUG 1		/* Default to yydebug support */
197ddb504emarcel#endif
198ddb504emarcel
199ddb504emarcel#define YYFPRINTF parser_fprintf
200ddb504emarcel
201ddb504emarcelint yyparse (void);
202ddb504emarcel
203ddb504emarcelstatic int yylex (void);
204ddb504emarcel
205ddb504emarcelvoid
206ddb504emarcelyyerror (char *);
207ddb504emarcel
208ddb504emarcelstatic char * uptok (char *, int);
209ddb504emarcel
210ddb504emarcel
211ddb504emarcel/* Enabling traces.  */
212ddb504emarcel#ifndef YYDEBUG
213ddb504emarcel# define YYDEBUG 0
214ddb504emarcel#endif
215ddb504emarcel
216ddb504emarcel/* Enabling verbose error messages.  */
217ddb504emarcel#ifdef YYERROR_VERBOSE
218ddb504emarcel# undef YYERROR_VERBOSE
219ddb504emarcel# define YYERROR_VERBOSE 1
220ddb504emarcel#else
221ddb504emarcel# define YYERROR_VERBOSE 0
222ddb504emarcel#endif
223ddb504emarcel
224ddb504emarcel#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
225ddb504emarcel#line 130 "p-exp.y"
226ddb504emarceltypedef union YYSTYPE {
227ddb504emarcel    LONGEST lval;
228ddb504emarcel    struct {
229ddb504emarcel      LONGEST val;
230ddb504emarcel      struct type *type;
231ddb504emarcel    } typed_val_int;
232ddb504emarcel    struct {
233ddb504emarcel      DOUBLEST dval;
234ddb504emarcel      struct type *type;
235ddb504emarcel    } typed_val_float;
236ddb504emarcel    struct symbol *sym;
237ddb504emarcel    struct type *tval;
238ddb504emarcel    struct stoken sval;
239ddb504emarcel    struct ttype tsym;
240ddb504emarcel    struct symtoken ssym;
241ddb504emarcel    int voidval;
242ddb504emarcel    struct block *bval;
243ddb504emarcel    enum exp_opcode opcode;
244ddb504emarcel    struct internalvar *ivar;
245ddb504emarcel
246ddb504emarcel    struct type **tvec;
247ddb504emarcel    int *ivec;
248ddb504emarcel  } YYSTYPE;
249ddb504emarcel/* Line 191 of yacc.c.  */
250ddb504emarcel# define yystype YYSTYPE /* obsolescent; will be withdrawn */
251ddb504emarcel# define YYSTYPE_IS_DECLARED 1
252ddb504emarcel# define YYSTYPE_IS_TRIVIAL 1
253ddb504emarcel#endif
254ddb504emarcel
255ddb504emarcel
256ddb504emarcel
257ddb504emarcel/* Copy the second part of user declarations.  */
258ddb504emarcel#line 154 "p-exp.y"
259ddb504emarcel
260ddb504emarcel/* YYSTYPE gets defined by %union */
261ddb504emarcelstatic int
262ddb504emarcelparse_number (char *, int, int, YYSTYPE *);
263ddb504emarcel
264ddb504emarcelstatic struct type *current_type;
265ddb504emarcel
266ddb504emarcelstatic void push_current_type (void);
267ddb504emarcelstatic void pop_current_type (void);
268ddb504emarcelstatic int search_field;
269ddb504emarcel
270ddb504emarcel
271ddb504emarcel/* Line 214 of yacc.c.  */
272ddb504emarcel
273ddb504emarcel#if ! defined (yyoverflow) || YYERROR_VERBOSE
274ddb504emarcel
275ddb504emarcel/* The parser invokes alloca or xmalloc; define the necessary symbols.  */
276ddb504emarcel
277ddb504emarcel# if YYSTACK_USE_ALLOCA
278ddb504emarcel#  define YYSTACK_ALLOC alloca
279ddb504emarcel# else
280ddb504emarcel#  ifndef YYSTACK_USE_ALLOCA
281ddb504emarcel#   if defined (alloca) || defined (_ALLOCA_H)
282ddb504emarcel#    define YYSTACK_ALLOC alloca
283ddb504emarcel#   else
284ddb504emarcel#    ifdef __GNUC__
285ddb504emarcel#     define YYSTACK_ALLOC __builtin_alloca
286ddb504emarcel#    endif
287ddb504emarcel#   endif
288ddb504emarcel#  endif
289ddb504emarcel# endif
290ddb504emarcel
291ddb504emarcel# ifdef YYSTACK_ALLOC
292ddb504emarcel   /* Pacify GCC's `empty if-body' warning. */
293ddb504emarcel#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
294ddb504emarcel# else
295ddb504emarcel#  if defined (__STDC__) || defined (__cplusplus)
296ddb504emarcel#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
297ddb504emarcel#   define YYSIZE_T size_t
298ddb504emarcel#  endif
299ddb504emarcel#  define YYSTACK_ALLOC xmalloc
300ddb504emarcel#  define YYSTACK_FREE free
301ddb504emarcel# endif
302ddb504emarcel#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
303ddb504emarcel
304ddb504emarcel
305ddb504emarcel#if (! defined (yyoverflow) \
306ddb504emarcel     && (! defined (__cplusplus) \
307ddb504emarcel	 || (YYSTYPE_IS_TRIVIAL)))
308ddb504emarcel
309ddb504emarcel/* A type that is properly aligned for any stack member.  */
310ddb504emarcelunion yyalloc
311ddb504emarcel{
312ddb504emarcel  short yyss;
313ddb504emarcel  YYSTYPE yyvs;
314ddb504emarcel  };
315ddb504emarcel
316ddb504emarcel/* The size of the maximum gap between one aligned stack and the next.  */
317ddb504emarcel# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
318ddb504emarcel
319ddb504emarcel/* The size of an array large to enough to hold all stacks, each with
320ddb504emarcel   N elements.  */
321ddb504emarcel# define YYSTACK_BYTES(N) \
322ddb504emarcel     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
323ddb504emarcel      + YYSTACK_GAP_MAXIMUM)
324ddb504emarcel
325ddb504emarcel/* Copy COUNT objects from FROM to TO.  The source and destination do
326ddb504emarcel   not overlap.  */
327ddb504emarcel# ifndef YYCOPY
328ddb504emarcel#  if 1 < __GNUC__
329ddb504emarcel#   define YYCOPY(To, From, Count) \
330ddb504emarcel      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
331ddb504emarcel#  else
332ddb504emarcel#   define YYCOPY(To, From, Count)		\
333ddb504emarcel      do					\
334ddb504emarcel	{					\
335ddb504emarcel	  register YYSIZE_T yyi;		\
336ddb504emarcel	  for (yyi = 0; yyi < (Count); yyi++)	\
337ddb504emarcel	    (To)[yyi] = (From)[yyi];		\
338ddb504emarcel	}					\
339ddb504emarcel      while (0)
340ddb504emarcel#  endif
341ddb504emarcel# endif
342ddb504emarcel
343ddb504emarcel/* Relocate STACK from its old location to the new one.  The
344ddb504emarcel   local variables YYSIZE and YYSTACKSIZE give the old and new number of
345ddb504emarcel   elements in the stack, and YYPTR gives the new location of the
346ddb504emarcel   stack.  Advance YYPTR to a properly aligned location for the next
347ddb504emarcel   stack.  */
348ddb504emarcel# define YYSTACK_RELOCATE(Stack)					\
349ddb504emarcel    do									\
350ddb504emarcel      {									\
351ddb504emarcel	YYSIZE_T yynewbytes;						\
352ddb504emarcel	YYCOPY (&yyptr->Stack, Stack, yysize);				\
353ddb504emarcel	Stack = &yyptr->Stack;						\
354ddb504emarcel	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
355ddb504emarcel	yyptr += yynewbytes / sizeof (*yyptr);				\
356ddb504emarcel      }									\
357ddb504emarcel    while (0)
358ddb504emarcel
359ddb504emarcel#endif
360ddb504emarcel
361ddb504emarcel#if defined (__STDC__) || defined (__cplusplus)
362ddb504emarcel   typedef signed char yysigned_char;
363ddb504emarcel#else
364ddb504emarcel   typedef short yysigned_char;
365ddb504emarcel#endif
366ddb504emarcel
367ddb504emarcel/* YYFINAL -- State number of the termination state. */
368ddb504emarcel#define YYFINAL  3
369ddb504emarcel/* YYLAST -- Last index in YYTABLE.  */
370ddb504emarcel#define YYLAST   359
371ddb504emarcel
372ddb504emarcel/* YYNTOKENS -- Number of terminals. */
373ddb504emarcel#define YYNTOKENS  52
374ddb504emarcel/* YYNNTS -- Number of nonterminals. */
375ddb504emarcel#define YYNNTS  19
376ddb504emarcel/* YYNRULES -- Number of rules. */
377ddb504emarcel#define YYNRULES  73
378ddb504emarcel/* YYNRULES -- Number of states. */
379ddb504emarcel#define YYNSTATES  123
380ddb504emarcel
381ddb504emarcel/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
382ddb504emarcel#define YYUNDEFTOK  2
383ddb504emarcel#define YYMAXUTOK   291
384ddb504emarcel
385ddb504emarcel#define YYTRANSLATE(YYX) 						\
386ddb504emarcel  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
387ddb504emarcel
388ddb504emarcel/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
389ddb504emarcelstatic const unsigned char yytranslate[] =
390ddb504emarcel{
391ddb504emarcel       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
392ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
393ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
394ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
395ddb504emarcel      46,    50,    39,    37,    19,    38,    44,    40,     2,     2,
396ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
397ddb504emarcel      28,    26,    29,     2,    36,     2,     2,     2,     2,     2,
398ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
399ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
400ddb504emarcel       2,    45,     2,    51,    48,     2,     2,     2,     2,     2,
401ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
402ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
403ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
404ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
405ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
406ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
407ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
408ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
409ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
410ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
411ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
412ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
413ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
414ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
415ddb504emarcel       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
416ddb504emarcel       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
417ddb504emarcel       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
418ddb504emarcel      15,    16,    17,    18,    20,    21,    22,    23,    24,    25,
419ddb504emarcel      27,    30,    31,    32,    33,    34,    35,    41,    42,    43,
420ddb504emarcel      47,    49
421ddb504emarcel};
422ddb504emarcel
423ddb504emarcel#if YYDEBUG
424ddb504emarcel/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
425ddb504emarcel   YYRHS.  */
426ddb504emarcelstatic const unsigned char yyprhs[] =
427ddb504emarcel{
428ddb504emarcel       0,     0,     3,     4,     7,     9,    11,    13,    15,    19,
429ddb504emarcel      22,    25,    28,    31,    36,    41,    42,    47,    48,    54,
430ddb504emarcel      55,    61,    62,    64,    68,    73,    77,    81,    85,    89,
431ddb504emarcel      93,    97,   101,   105,   109,   113,   117,   121,   125,   129,
432ddb504emarcel     133,   137,   141,   145,   149,   151,   153,   155,   157,   159,
433ddb504emarcel     161,   163,   168,   170,   172,   174,   178,   182,   186,   188,
434ddb504emarcel     191,   193,   195,   197,   201,   204,   206,   209,   212,   214,
435ddb504emarcel     216,   218,   220,   222
436ddb504emarcel};
437ddb504emarcel
438ddb504emarcel/* YYRHS -- A `-1'-separated list of the rules' RHS. */
439ddb504emarcelstatic const yysigned_char yyrhs[] =
440ddb504emarcel{
441ddb504emarcel      53,     0,    -1,    -1,    54,    55,    -1,    57,    -1,    56,
442ddb504emarcel      -1,    67,    -1,    58,    -1,    57,    19,    58,    -1,    58,
443ddb504emarcel      48,    -1,    36,    58,    -1,    38,    58,    -1,    22,    58,
444ddb504emarcel      -1,    42,    46,    58,    50,    -1,    41,    46,    58,    50,
445ddb504emarcel      -1,    -1,    58,    44,    59,     6,    -1,    -1,    58,    45,
446ddb504emarcel      60,    57,    51,    -1,    -1,    58,    46,    61,    62,    50,
447ddb504emarcel      -1,    -1,    58,    -1,    62,    19,    58,    -1,    67,    46,
448ddb504emarcel      58,    50,    -1,    46,    57,    50,    -1,    58,    39,    58,
449ddb504emarcel      -1,    58,    40,    58,    -1,    58,    33,    58,    -1,    58,
450ddb504emarcel      32,    58,    -1,    58,    37,    58,    -1,    58,    38,    58,
451ddb504emarcel      -1,    58,    35,    58,    -1,    58,    34,    58,    -1,    58,
452ddb504emarcel      26,    58,    -1,    58,    27,    58,    -1,    58,    31,    58,
453ddb504emarcel      -1,    58,    30,    58,    -1,    58,    28,    58,    -1,    58,
454ddb504emarcel      29,    58,    -1,    58,    25,    58,    -1,    58,    24,    58,
455ddb504emarcel      -1,    58,    23,    58,    -1,    58,    21,    58,    -1,    17,
456ddb504emarcel      -1,    18,    -1,     3,    -1,     9,    -1,     4,    -1,    64,
457ddb504emarcel      -1,    15,    -1,    12,    46,    67,    50,    -1,     5,    -1,
458ddb504emarcel      16,    -1,    49,    -1,    63,    13,    69,    -1,    63,    13,
459ddb504emarcel      69,    -1,    68,    13,    69,    -1,    65,    -1,    13,    69,
460ddb504emarcel      -1,    70,    -1,    68,    -1,    66,    -1,    68,    13,    39,
461ddb504emarcel      -1,    48,    68,    -1,     8,    -1,    10,    69,    -1,    11,
462ddb504emarcel      69,    -1,     7,    -1,    49,    -1,     8,    -1,     9,    -1,
463ddb504emarcel       7,    -1,    49,    -1
464ddb504emarcel};
465ddb504emarcel
466ddb504emarcel/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
467ddb504emarcelstatic const unsigned short yyrline[] =
468ddb504emarcel{
469ddb504emarcel       0,   234,   234,   234,   241,   242,   245,   252,   253,   258,
470ddb504emarcel     264,   270,   274,   278,   282,   286,   286,   301,   299,   329,
471ddb504emarcel     326,   338,   339,   341,   345,   360,   366,   370,   374,   378,
472ddb504emarcel     382,   386,   390,   394,   398,   402,   406,   410,   414,   418,
473ddb504emarcel     422,   426,   430,   434,   438,   444,   450,   457,   468,   475,
474ddb504emarcel     478,   482,   490,   515,   542,   559,   570,   586,   601,   602,
475ddb504emarcel     636,   708,   719,   720,   725,   727,   729,   732,   740,   741,
476ddb504emarcel     742,   743,   746,   747
477ddb504emarcel};
478ddb504emarcel#endif
479ddb504emarcel
480ddb504emarcel#if YYDEBUG || YYERROR_VERBOSE
481ddb504emarcel/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
482ddb504emarcel   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
483ddb504emarcelstatic const char *const yytname[] =
484ddb504emarcel{
485ddb504emarcel  "$end", "error", "$undefined", "INT", "FLOAT", "STRING", "FIELDNAME",
486ddb504emarcel  "NAME", "TYPENAME", "NAME_OR_INT", "STRUCT", "CLASS", "SIZEOF",
487ddb504emarcel  "COLONCOLON", "ERROR", "VARIABLE", "THIS", "TRUEKEYWORD",
488ddb504emarcel  "FALSEKEYWORD", "','", "ABOVE_COMMA", "ASSIGN", "NOT", "OR", "XOR",
489ddb504emarcel  "ANDAND", "'='", "NOTEQUAL", "'<'", "'>'", "GEQ", "LEQ", "MOD", "DIV",
490ddb504emarcel  "RSH", "LSH", "'@'", "'+'", "'-'", "'*'", "'/'", "DECREMENT",
491ddb504emarcel  "INCREMENT", "UNARY", "'.'", "'['", "'('", "ARROW", "'^'", "BLOCKNAME",
492ddb504emarcel  "')'", "']'", "$accept", "start", "@1", "normal_start", "type_exp",
493ddb504emarcel  "exp1", "exp", "@2", "@3", "@4", "arglist", "block", "variable",
494ddb504emarcel  "qualified_name", "ptype", "type", "typebase", "name",
495ddb504emarcel  "name_not_typename", 0
496ddb504emarcel};
497ddb504emarcel#endif
498ddb504emarcel
499ddb504emarcel# ifdef YYPRINT
500ddb504emarcel/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
501ddb504emarcel   token YYLEX-NUM.  */
502ddb504emarcelstatic const unsigned short yytoknum[] =
503ddb504emarcel{
504ddb504emarcel       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
505ddb504emarcel     265,   266,   267,   268,   269,   270,   271,   272,   273,    44,
506ddb504emarcel     274,   275,   276,   277,   278,   279,    61,   280,    60,    62,
507ddb504emarcel     281,   282,   283,   284,   285,   286,    64,    43,    45,    42,
508ddb504emarcel      47,   287,   288,   289,    46,    91,    40,   290,    94,   291,
509ddb504emarcel      41,    93
510ddb504emarcel};
511ddb504emarcel# endif
512ddb504emarcel
513ddb504emarcel/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
514ddb504emarcelstatic const unsigned char yyr1[] =
515ddb504emarcel{
516ddb504emarcel       0,    52,    54,    53,    55,    55,    56,    57,    57,    58,
517ddb504emarcel      58,    58,    58,    58,    58,    59,    58,    60,    58,    61,
518ddb504emarcel      58,    62,    62,    62,    58,    58,    58,    58,    58,    58,
519ddb504emarcel      58,    58,    58,    58,    58,    58,    58,    58,    58,    58,
520ddb504emarcel      58,    58,    58,    58,    58,    58,    58,    58,    58,    58,
521ddb504emarcel      58,    58,    58,    58,    63,    63,    64,    65,    64,    64,
522ddb504emarcel      64,    66,    67,    67,    68,    68,    68,    68,    69,    69,
523ddb504emarcel      69,    69,    70,    70
524ddb504emarcel};
525ddb504emarcel
526ddb504emarcel/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
527ddb504emarcelstatic const unsigned char yyr2[] =
528ddb504emarcel{
529ddb504emarcel       0,     2,     0,     2,     1,     1,     1,     1,     3,     2,
530ddb504emarcel       2,     2,     2,     4,     4,     0,     4,     0,     5,     0,
531ddb504emarcel       5,     0,     1,     3,     4,     3,     3,     3,     3,     3,
532ddb504emarcel       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
533ddb504emarcel       3,     3,     3,     3,     1,     1,     1,     1,     1,     1,
534ddb504emarcel       1,     4,     1,     1,     1,     3,     3,     3,     1,     2,
535ddb504emarcel       1,     1,     1,     3,     2,     1,     2,     2,     1,     1,
536ddb504emarcel       1,     1,     1,     1
537ddb504emarcel};
538ddb504emarcel
539ddb504emarcel/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
540ddb504emarcel   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
541ddb504emarcel   means the default is an error.  */
542ddb504emarcelstatic const unsigned char yydefact[] =
543ddb504emarcel{
544ddb504emarcel       2,     0,     0,     1,    46,    48,    52,    72,    65,    47,
545ddb504emarcel       0,     0,     0,     0,    50,    53,    44,    45,     0,     0,
546ddb504emarcel       0,     0,     0,     0,     0,    73,     3,     5,     4,     7,
547ddb504emarcel       0,    49,    58,    62,     6,    61,    60,    68,    70,    71,
548ddb504emarcel      69,    66,    67,     0,    59,    12,     0,    10,    11,     0,
549ddb504emarcel       0,     0,    64,     0,     0,     0,     0,     0,     0,     0,
550ddb504emarcel       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
551ddb504emarcel       0,     0,    15,    17,    19,     9,     0,     0,     0,     0,
552ddb504emarcel      61,     0,     0,    25,     8,    43,    42,    41,    40,    34,
553ddb504emarcel      35,    38,    39,    37,    36,    29,    28,    33,    32,    30,
554ddb504emarcel      31,    26,    27,     0,     0,    21,    56,     0,    63,    57,
555ddb504emarcel      51,     0,    14,    13,    16,     0,    22,     0,    24,    18,
556ddb504emarcel       0,    20,    23
557ddb504emarcel};
558ddb504emarcel
559ddb504emarcel/* YYDEFGOTO[NTERM-NUM]. */
560ddb504emarcelstatic const yysigned_char yydefgoto[] =
561ddb504emarcel{
562ddb504emarcel      -1,     1,     2,    26,    27,    28,    29,   103,   104,   105,
563ddb504emarcel     117,    30,    31,    32,    33,    46,    35,    41,    36
564ddb504emarcel};
565ddb504emarcel
566ddb504emarcel/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
567ddb504emarcel   STATE-NUM.  */
568ddb504emarcel#define YYPACT_NINF -37
569ddb504emarcelstatic const short yypact[] =
570ddb504emarcel{
571ddb504emarcel     -37,     5,    88,   -37,   -37,   -37,   -37,   -37,   -37,   -37,
572ddb504emarcel       6,     6,   -35,     6,   -37,   -37,   -37,   -37,    88,    88,
573ddb504emarcel      88,   -29,   -27,    88,    10,    12,   -37,   -37,     8,   201,
574ddb504emarcel      16,   -37,   -37,   -37,   -13,    21,   -37,   -37,   -37,   -37,
575ddb504emarcel     -37,   -37,   -37,    10,   -37,   -36,   -13,   -36,   -36,    88,
576ddb504emarcel      88,    11,   -37,    88,    88,    88,    88,    88,    88,    88,
577ddb504emarcel      88,    88,    88,    88,    88,    88,    88,    88,    88,    88,
578ddb504emarcel      88,    88,   -37,   -37,   -37,   -37,     6,    88,    15,    20,
579ddb504emarcel      43,   117,   145,   -37,   201,   201,   226,   250,   273,   294,
580ddb504emarcel     294,   311,   311,   311,   311,    28,    28,    28,    28,    68,
581ddb504emarcel      68,   -36,   -36,    56,    88,    88,    62,   173,   -37,   -37,
582ddb504emarcel     -37,    38,   -37,   -37,   -37,     9,   201,    44,   -37,   -37,
583ddb504emarcel      88,   -37,   201
584ddb504emarcel};
585ddb504emarcel
586ddb504emarcel/* YYPGOTO[NTERM-NUM].  */
587ddb504emarcelstatic const yysigned_char yypgoto[] =
588ddb504emarcel{
589ddb504emarcel     -37,   -37,   -37,   -37,   -37,   -20,   -18,   -37,   -37,   -37,
590ddb504emarcel     -37,   -37,   -37,   -37,   -37,    14,   -17,    -7,   -37
591ddb504emarcel};
592ddb504emarcel
593ddb504emarcel/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
594ddb504emarcel   positive, shift that token.  If negative, reduce the rule which
595ddb504emarcel   number is the opposite.  If zero, do what YYDEFACT says.
596ddb504emarcel   If YYTABLE_NINF, syntax error.  */
597ddb504emarcel#define YYTABLE_NINF -56
598ddb504emarcelstatic const yysigned_char yytable[] =
599ddb504emarcel{
600ddb504emarcel      45,    47,    48,    51,    42,     3,    44,    52,    72,    73,
601ddb504emarcel      74,    43,    75,    37,    38,    39,    34,    49,     8,    50,
602ddb504emarcel      10,    11,    37,    38,    39,   -54,    80,    53,    53,    76,
603ddb504emarcel      53,    81,    82,    77,    78,    84,    85,    86,    87,    88,
604ddb504emarcel      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
605ddb504emarcel      99,   100,   101,   102,   108,    40,   111,    79,    24,   107,
606ddb504emarcel     119,    83,   114,   120,    40,    68,    69,    70,    71,   106,
607ddb504emarcel     110,   109,    72,    73,    74,   -55,    75,   108,     0,     0,
608ddb504emarcel       0,     0,     0,     0,   115,     0,     0,   116,     0,     0,
609ddb504emarcel       0,     4,     5,     6,   121,     7,     8,     9,    10,    11,
610ddb504emarcel      12,    13,   122,    14,    15,    16,    17,    70,    71,     0,
611ddb504emarcel      18,     0,    72,    73,    74,     0,    75,     0,     0,     0,
612ddb504emarcel       0,     0,     0,     0,    19,     0,    20,     0,     0,    21,
613ddb504emarcel      22,     0,     0,     0,    23,     0,    24,    25,    54,     0,
614ddb504emarcel      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
615ddb504emarcel      65,    66,    67,     0,    68,    69,    70,    71,     0,     0,
616ddb504emarcel       0,    72,    73,    74,     0,    75,    54,   112,    55,    56,
617ddb504emarcel      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
618ddb504emarcel      67,     0,    68,    69,    70,    71,     0,     0,     0,    72,
619ddb504emarcel      73,    74,     0,    75,    54,   113,    55,    56,    57,    58,
620ddb504emarcel      59,    60,    61,    62,    63,    64,    65,    66,    67,     0,
621ddb504emarcel      68,    69,    70,    71,     0,     0,     0,    72,    73,    74,
622ddb504emarcel       0,    75,    54,   118,    55,    56,    57,    58,    59,    60,
623ddb504emarcel      61,    62,    63,    64,    65,    66,    67,     0,    68,    69,
624ddb504emarcel      70,    71,     0,     0,     0,    72,    73,    74,     0,    75,
625ddb504emarcel      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
626ddb504emarcel      66,    67,     0,    68,    69,    70,    71,     0,     0,     0,
627ddb504emarcel      72,    73,    74,     0,    75,    57,    58,    59,    60,    61,
628ddb504emarcel      62,    63,    64,    65,    66,    67,     0,    68,    69,    70,
629ddb504emarcel      71,     0,     0,     0,    72,    73,    74,     0,    75,    58,
630ddb504emarcel      59,    60,    61,    62,    63,    64,    65,    66,    67,     0,
631ddb504emarcel      68,    69,    70,    71,     0,     0,     0,    72,    73,    74,
632ddb504emarcel       0,    75,    60,    61,    62,    63,    64,    65,    66,    67,
633ddb504emarcel       0,    68,    69,    70,    71,     0,     0,     0,    72,    73,
634ddb504emarcel      74,     0,    75,    64,    65,    66,    67,     0,    68,    69,
635ddb504emarcel      70,    71,     0,     0,     0,    72,    73,    74,     0,    75
636ddb504emarcel};
637ddb504emarcel
638ddb504emarcelstatic const yysigned_char yycheck[] =
639ddb504emarcel{
640ddb504emarcel      18,    19,    20,    23,    11,     0,    13,    24,    44,    45,
641ddb504emarcel      46,    46,    48,     7,     8,     9,     2,    46,     8,    46,
642ddb504emarcel      10,    11,     7,     8,     9,    13,    43,    19,    19,    13,
643ddb504emarcel      19,    49,    50,    46,    13,    53,    54,    55,    56,    57,
644ddb504emarcel      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
645ddb504emarcel      68,    69,    70,    71,    39,    49,    13,    43,    48,    77,
646ddb504emarcel      51,    50,     6,    19,    49,    37,    38,    39,    40,    76,
647ddb504emarcel      50,    78,    44,    45,    46,    13,    48,    39,    -1,    -1,
648ddb504emarcel      -1,    -1,    -1,    -1,   104,    -1,    -1,   105,    -1,    -1,
649ddb504emarcel      -1,     3,     4,     5,    50,     7,     8,     9,    10,    11,
650ddb504emarcel      12,    13,   120,    15,    16,    17,    18,    39,    40,    -1,
651ddb504emarcel      22,    -1,    44,    45,    46,    -1,    48,    -1,    -1,    -1,
652ddb504emarcel      -1,    -1,    -1,    -1,    36,    -1,    38,    -1,    -1,    41,
653ddb504emarcel      42,    -1,    -1,    -1,    46,    -1,    48,    49,    21,    -1,
654ddb504emarcel      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
655ddb504emarcel      33,    34,    35,    -1,    37,    38,    39,    40,    -1,    -1,
656ddb504emarcel      -1,    44,    45,    46,    -1,    48,    21,    50,    23,    24,
657ddb504emarcel      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
658ddb504emarcel      35,    -1,    37,    38,    39,    40,    -1,    -1,    -1,    44,
659ddb504emarcel      45,    46,    -1,    48,    21,    50,    23,    24,    25,    26,
660ddb504emarcel      27,    28,    29,    30,    31,    32,    33,    34,    35,    -1,
661ddb504emarcel      37,    38,    39,    40,    -1,    -1,    -1,    44,    45,    46,
662ddb504emarcel      -1,    48,    21,    50,    23,    24,    25,    26,    27,    28,
663ddb504emarcel      29,    30,    31,    32,    33,    34,    35,    -1,    37,    38,
664ddb504emarcel      39,    40,    -1,    -1,    -1,    44,    45,    46,    -1,    48,
665ddb504emarcel      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
666ddb504emarcel      34,    35,    -1,    37,    38,    39,    40,    -1,    -1,    -1,
667ddb504emarcel      44,    45,    46,    -1,    48,    25,    26,    27,    28,    29,
668ddb504emarcel      30,    31,    32,    33,    34,    35,    -1,    37,    38,    39,
669ddb504emarcel      40,    -1,    -1,    -1,    44,    45,    46,    -1,    48,    26,
670ddb504emarcel      27,    28,    29,    30,    31,    32,    33,    34,    35,    -1,
671ddb504emarcel      37,    38,    39,    40,    -1,    -1,    -1,    44,    45,    46,
672ddb504emarcel      -1,    48,    28,    29,    30,    31,    32,    33,    34,    35,
673ddb504emarcel      -1,    37,    38,    39,    40,    -1,    -1,    -1,    44,    45,
674ddb504emarcel      46,    -1,    48,    32,    33,    34,    35,    -1,    37,    38,
675ddb504emarcel      39,    40,    -1,    -1,    -1,    44,    45,    46,    -1,    48
676ddb504emarcel};
677ddb504emarcel
678ddb504emarcel/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
679ddb504emarcel   symbol of state STATE-NUM.  */
680ddb504emarcelstatic const unsigned char yystos[] =
681ddb504emarcel{
682ddb504emarcel       0,    53,    54,     0,     3,     4,     5,     7,     8,     9,
683ddb504emarcel      10,    11,    12,    13,    15,    16,    17,    18,    22,    36,
684ddb504emarcel      38,    41,    42,    46,    48,    49,    55,    56,    57,    58,
685ddb504emarcel      63,    64,    65,    66,    67,    68,    70,     7,     8,     9,
686ddb504emarcel      49,    69,    69,    46,    69,    58,    67,    58,    58,    46,
687ddb504emarcel      46,    57,    68,    19,    21,    23,    24,    25,    26,    27,
688ddb504emarcel      28,    29,    30,    31,    32,    33,    34,    35,    37,    38,
689ddb504emarcel      39,    40,    44,    45,    46,    48,    13,    46,    13,    67,
690ddb504emarcel      68,    58,    58,    50,    58,    58,    58,    58,    58,    58,
691ddb504emarcel      58,    58,    58,    58,    58,    58,    58,    58,    58,    58,
692ddb504emarcel      58,    58,    58,    59,    60,    61,    69,    58,    39,    69,
693ddb504emarcel      50,    13,    50,    50,     6,    57,    58,    62,    50,    51,
694ddb504emarcel      19,    50,    58
695ddb504emarcel};
696ddb504emarcel
697ddb504emarcel#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
698ddb504emarcel# define YYSIZE_T __SIZE_TYPE__
699ddb504emarcel#endif
700ddb504emarcel#if ! defined (YYSIZE_T) && defined (size_t)
701ddb504emarcel# define YYSIZE_T size_t
702ddb504emarcel#endif
703ddb504emarcel#if ! defined (YYSIZE_T)
704ddb504emarcel# if defined (__STDC__) || defined (__cplusplus)
705ddb504emarcel#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
706ddb504emarcel#  define YYSIZE_T size_t
707ddb504emarcel# endif
708ddb504emarcel#endif
709ddb504emarcel#if ! defined (YYSIZE_T)
710ddb504emarcel# define YYSIZE_T unsigned int
711ddb504emarcel#endif
712ddb504emarcel
713ddb504emarcel#define yyerrok		(yyerrstatus = 0)
714ddb504emarcel#define yyclearin	(yychar = YYEMPTY)
715ddb504emarcel#define YYEMPTY		(-2)
716ddb504emarcel#define YYEOF		0
717ddb504emarcel
718ddb504emarcel#define YYACCEPT	goto yyacceptlab
719ddb504emarcel#define YYABORT		goto yyabortlab
720ddb504emarcel#define YYERROR		goto yyerrlab1
721ddb504emarcel
722ddb504emarcel/* Like YYERROR except do call yyerror.  This remains here temporarily
723ddb504emarcel   to ease the transition to the new meaning of YYERROR, for GCC.
724ddb504emarcel   Once GCC version 2 has supplanted version 1, this can go.  */
725ddb504emarcel
726ddb504emarcel#define YYFAIL		goto yyerrlab
727ddb504emarcel
728ddb504emarcel#define YYRECOVERING()  (!!yyerrstatus)
729ddb504emarcel
730ddb504emarcel#define YYBACKUP(Token, Value)					\
731ddb504emarceldo								\
732ddb504emarcel  if (yychar == YYEMPTY && yylen == 1)				\
733ddb504emarcel    {								\
734ddb504emarcel      yychar = (Token);						\
735ddb504emarcel      yylval = (Value);						\
736ddb504emarcel      yytoken = YYTRANSLATE (yychar);				\
737ddb504emarcel      YYPOPSTACK;						\
738ddb504emarcel      goto yybackup;						\
739ddb504emarcel    }								\
740ddb504emarcel  else								\
741ddb504emarcel    { 								\
742ddb504emarcel      yyerror ("syntax error: cannot back up");\
743ddb504emarcel      YYERROR;							\
744ddb504emarcel    }								\
745ddb504emarcelwhile (0)
746ddb504emarcel
747ddb504emarcel#define YYTERROR	1
748ddb504emarcel#define YYERRCODE	256
749ddb504emarcel
750ddb504emarcel/* YYLLOC_DEFAULT -- Compute the default location (before the actions
751ddb504emarcel   are run).  */
752ddb504emarcel
753ddb504emarcel#ifndef YYLLOC_DEFAULT
754ddb504emarcel# define YYLLOC_DEFAULT(Current, Rhs, N)         \
755ddb504emarcel  Current.first_line   = Rhs[1].first_line;      \
756ddb504emarcel  Current.first_column = Rhs[1].first_column;    \
757ddb504emarcel  Current.last_line    = Rhs[N].last_line;       \
758ddb504emarcel  Current.last_column  = Rhs[N].last_column;
759ddb504emarcel#endif
760ddb504emarcel
761ddb504emarcel/* YYLEX -- calling `yylex' with the right arguments.  */
762ddb504emarcel
763ddb504emarcel#ifdef YYLEX_PARAM
764ddb504emarcel# define YYLEX yylex (YYLEX_PARAM)
765ddb504emarcel#else
766ddb504emarcel# define YYLEX yylex ()
767ddb504emarcel#endif
768ddb504emarcel
769ddb504emarcel/* Enable debugging if requested.  */
770ddb504emarcel#if YYDEBUG
771ddb504emarcel
772ddb504emarcel# ifndef YYFPRINTF
773ddb504emarcel#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
774ddb504emarcel#  define YYFPRINTF fprintf
775ddb504emarcel# endif
776ddb504emarcel
777ddb504emarcel# define YYDPRINTF(Args)			\
778ddb504emarceldo {						\
779ddb504emarcel  if (yydebug)					\
780ddb504emarcel    YYFPRINTF Args;				\
781ddb504emarcel} while (0)
782ddb504emarcel
783ddb504emarcel# define YYDSYMPRINT(Args)			\
784ddb504emarceldo {						\
785ddb504emarcel  if (yydebug)					\
786ddb504emarcel    yysymprint Args;				\
787ddb504emarcel} while (0)
788ddb504emarcel
789ddb504emarcel# define YYDSYMPRINTF(Title, Token, Value, Location)		\
790ddb504emarceldo {								\
791ddb504emarcel  if (yydebug)							\
792ddb504emarcel    {								\
793ddb504emarcel      YYFPRINTF (stderr, "%s ", Title);				\
794ddb504emarcel      yysymprint (stderr, 					\
795ddb504emarcel                  Token, Value);	\
796ddb504emarcel      YYFPRINTF (stderr, "\n");					\
797ddb504emarcel    }								\
798ddb504emarcel} while (0)
799ddb504emarcel
800ddb504emarcel/*------------------------------------------------------------------.
801ddb504emarcel| yy_stack_print -- Print the state stack from its BOTTOM up to its |
802ddb504emarcel| TOP (cinluded).                                                   |
803ddb504emarcel`------------------------------------------------------------------*/
804ddb504emarcel
805ddb504emarcel#if defined (__STDC__) || defined (__cplusplus)
806ddb504emarcelstatic void
807ddb504emarcelyy_stack_print (short *bottom, short *top)
808ddb504emarcel#else
809ddb504emarcelstatic void
810ddb504emarcelyy_stack_print (bottom, top)
811ddb504emarcel    short *bottom;
812ddb504emarcel    short *top;
813ddb504emarcel#endif
814ddb504emarcel{
815ddb504emarcel  YYFPRINTF (stderr, "Stack now");
816ddb504emarcel  for (/* Nothing. */; bottom <= top; ++bottom)
817ddb504emarcel    YYFPRINTF (stderr, " %d", *bottom);
818ddb504emarcel  YYFPRINTF (stderr, "\n");
819ddb504emarcel}
820ddb504emarcel
821ddb504emarcel# define YY_STACK_PRINT(Bottom, Top)				\
822ddb504emarceldo {								\
823ddb504emarcel  if (yydebug)							\
824ddb504emarcel    yy_stack_print ((Bottom), (Top));				\
825ddb504emarcel} while (0)
826ddb504emarcel
827ddb504emarcel
828ddb504emarcel/*------------------------------------------------.
829ddb504emarcel| Report that the YYRULE is going to be reduced.  |
830ddb504emarcel`------------------------------------------------*/
831ddb504emarcel
832ddb504emarcel#if defined (__STDC__) || defined (__cplusplus)
833ddb504emarcelstatic void
834ddb504emarcelyy_reduce_print (int yyrule)
835ddb504emarcel#else
836ddb504emarcelstatic void
837ddb504emarcelyy_reduce_print (yyrule)
838ddb504emarcel    int yyrule;
839ddb504emarcel#endif
840ddb504emarcel{
841ddb504emarcel  int yyi;
842ddb504emarcel  unsigned int yylineno = yyrline[yyrule];
843ddb504emarcel  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
844ddb504emarcel             yyrule - 1, yylineno);
845ddb504emarcel  /* Print the symbols being reduced, and their result.  */
846ddb504emarcel  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
847ddb504emarcel    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
848ddb504emarcel  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
849ddb504emarcel}
850ddb504emarcel
851ddb504emarcel# define YY_REDUCE_PRINT(Rule)		\
852ddb504emarceldo {					\
853ddb504emarcel  if (yydebug)				\
854ddb504emarcel    yy_reduce_print (Rule);		\
855ddb504emarcel} while (0)
856ddb504emarcel
857ddb504emarcel/* Nonzero means print parse trace.  It is left uninitialized so that
858ddb504emarcel   multiple parsers can coexist.  */
859ddb504emarcelint yydebug;
860ddb504emarcel#else /* !YYDEBUG */
861ddb504emarcel# define YYDPRINTF(Args)
862ddb504emarcel# define YYDSYMPRINT(Args)
863ddb504emarcel# define YYDSYMPRINTF(Title, Token, Value, Location)
864ddb504emarcel# define YY_STACK_PRINT(Bottom, Top)
865ddb504emarcel# define YY_REDUCE_PRINT(Rule)
866ddb504emarcel#endif /* !YYDEBUG */
867ddb504emarcel
868ddb504emarcel
869ddb504emarcel/* YYINITDEPTH -- initial size of the parser's stacks.  */
870ddb504emarcel#ifndef	YYINITDEPTH
871ddb504emarcel# define YYINITDEPTH 200
872ddb504emarcel#endif
873ddb504emarcel
874ddb504emarcel/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
875ddb504emarcel   if the built-in stack extension method is used).
876ddb504emarcel
877ddb504emarcel   Do not make this value too large; the results are undefined if
878ddb504emarcel   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
879ddb504emarcel   evaluated with infinite-precision integer arithmetic.  */
880ddb504emarcel
881ddb504emarcel#if YYMAXDEPTH == 0
882ddb504emarcel# undef YYMAXDEPTH
883ddb504emarcel#endif
884ddb504emarcel
885ddb504emarcel#ifndef YYMAXDEPTH
886ddb504emarcel# define YYMAXDEPTH 10000
887ddb504emarcel#endif
888ddb504emarcel
889ddb504emarcel
890ddb504emarcel
891ddb504emarcel#if YYERROR_VERBOSE
892ddb504emarcel
893ddb504emarcel# ifndef yystrlen
894ddb504emarcel#  if defined (__GLIBC__) && defined (_STRING_H)
895ddb504emarcel#   define yystrlen strlen
896ddb504emarcel#  else
897ddb504emarcel/* Return the length of YYSTR.  */
898ddb504emarcelstatic YYSIZE_T
899ddb504emarcel#   if defined (__STDC__) || defined (__cplusplus)
900ddb504emarcelyystrlen (const char *yystr)
901ddb504emarcel#   else
902ddb504emarcelyystrlen (yystr)
903ddb504emarcel     const char *yystr;
904ddb504emarcel#   endif
905ddb504emarcel{
906ddb504emarcel  register const char *yys = yystr;
907ddb504emarcel
908ddb504emarcel  while (*yys++ != '\0')
909ddb504emarcel    continue;
910ddb504emarcel
911ddb504emarcel  return yys - yystr - 1;
912ddb504emarcel}
913ddb504emarcel#  endif
914ddb504emarcel# endif
915ddb504emarcel
916ddb504emarcel# ifndef yystpcpy
917ddb504emarcel#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
918ddb504emarcel#   define yystpcpy stpcpy
919ddb504emarcel#  else
920ddb504emarcel/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
921ddb504emarcel   YYDEST.  */
922ddb504emarcelstatic char *
923ddb504emarcel#   if defined (__STDC__) || defined (__cplusplus)
924ddb504emarcelyystpcpy (char *yydest, const char *yysrc)
925ddb504emarcel#   else
926ddb504emarcelyystpcpy (yydest, yysrc)
927ddb504emarcel     char *yydest;
928ddb504emarcel     const char *yysrc;
929ddb504emarcel#   endif
930ddb504emarcel{
931ddb504emarcel  register char *yyd = yydest;
932ddb504emarcel  register const char *yys = yysrc;
933ddb504emarcel
934ddb504emarcel  while ((*yyd++ = *yys++) != '\0')
935ddb504emarcel    continue;
936ddb504emarcel
937ddb504emarcel  return yyd - 1;
938ddb504emarcel}
939ddb504emarcel#  endif
940ddb504emarcel# endif
941ddb504emarcel
942ddb504emarcel#endif /* !YYERROR_VERBOSE */
943ddb504emarcel
944ddb504emarcel
945ddb504emarcel
946ddb504emarcel#if YYDEBUG
947ddb504emarcel/*--------------------------------.
948ddb504emarcel| Print this symbol on YYOUTPUT.  |
949ddb504emarcel`--------------------------------*/
950ddb504emarcel
951ddb504emarcel#if defined (__STDC__) || defined (__cplusplus)
952ddb504emarcelstatic void
953ddb504emarcelyysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
954ddb504emarcel#else
955ddb504emarcelstatic void
956ddb504emarcelyysymprint (yyoutput, yytype, yyvaluep)
957ddb504emarcel    FILE *yyoutput;
958ddb504emarcel    int yytype;
959ddb504emarcel    YYSTYPE *yyvaluep;
960ddb504emarcel#endif
961ddb504emarcel{
962ddb504emarcel  /* Pacify ``unused variable'' warnings.  */
963ddb504emarcel  (void) yyvaluep;
964ddb504emarcel
965ddb504emarcel  if (yytype < YYNTOKENS)
966ddb504emarcel    {
967ddb504emarcel      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
968ddb504emarcel# ifdef YYPRINT
969ddb504emarcel      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
970ddb504emarcel# endif
971ddb504emarcel    }
972ddb504emarcel  else
973ddb504emarcel    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
974ddb504emarcel
975ddb504emarcel  switch (yytype)
976ddb504emarcel    {
977ddb504emarcel      default:
978ddb504emarcel        break;
979ddb504emarcel    }
980ddb504emarcel  YYFPRINTF (yyoutput, ")");
981ddb504emarcel}
982ddb504emarcel
983ddb504emarcel#endif /* ! YYDEBUG */
984ddb504emarcel/*-----------------------------------------------.
985ddb504emarcel| Release the memory associated to this symbol.  |
986ddb504emarcel`-----------------------------------------------*/
987ddb504emarcel
988ddb504emarcel#if defined (__STDC__) || defined (__cplusplus)
989ddb504emarcelstatic void
990ddb504emarcelyydestruct (int yytype, YYSTYPE *yyvaluep)
991ddb504emarcel#else
992ddb504emarcelstatic void
993ddb504emarcelyydestruct (yytype, yyvaluep)
994ddb504emarcel    int yytype;
995ddb504emarcel    YYSTYPE *yyvaluep;
996ddb504emarcel#endif
997ddb504emarcel{
998ddb504emarcel  /* Pacify ``unused variable'' warnings.  */
999ddb504emarcel  (void) yyvaluep;
1000ddb504emarcel
1001ddb504emarcel  switch (yytype)
1002ddb504emarcel    {
1003ddb504emarcel
1004ddb504emarcel      default:
1005ddb504emarcel        break;
1006ddb504emarcel    }
1007ddb504emarcel}
1008ddb504emarcel
1009ddb504emarcel
1010ddb504emarcel/* Prevent warnings from -Wmissing-prototypes.  */
1011ddb504emarcel
1012ddb504emarcel#ifdef YYPARSE_PARAM
1013ddb504emarcel# if defined (__STDC__) || defined (__cplusplus)
1014ddb504emarcelint yyparse (void *YYPARSE_PARAM);
1015ddb504emarcel# else
1016ddb504emarcelint yyparse ();
1017ddb504emarcel# endif
1018ddb504emarcel#else /* ! YYPARSE_PARAM */
1019ddb504emarcel#if defined (__STDC__) || defined (__cplusplus)
1020ddb504emarcelint yyparse (void);
1021ddb504emarcel#else
1022ddb504emarcelint yyparse ();
1023ddb504emarcel#endif
1024ddb504emarcel#endif /* ! YYPARSE_PARAM */
1025ddb504emarcel
1026ddb504emarcel
1027ddb504emarcel
1028ddb504emarcel/* The lookahead symbol.  */
1029ddb504emarcelint yychar;
1030ddb504emarcel
1031ddb504emarcel/* The semantic value of the lookahead symbol.  */
1032ddb504emarcelYYSTYPE yylval;
1033ddb504emarcel
1034ddb504emarcel/* Number of syntax errors so far.  */
1035ddb504emarcelint yynerrs;
1036ddb504emarcel
1037ddb504emarcel
1038ddb504emarcel
1039ddb504emarcel/*----------.
1040ddb504emarcel| yyparse.  |
1041ddb504emarcel`----------*/
1042ddb504emarcel
1043ddb504emarcel#ifdef YYPARSE_PARAM
1044ddb504emarcel# if defined (__STDC__) || defined (__cplusplus)
1045ddb504emarcelint yyparse (void *YYPARSE_PARAM)
1046ddb504emarcel# else
1047ddb504emarcelint yyparse (YYPARSE_PARAM)
1048ddb504emarcel  void *YYPARSE_PARAM;
1049ddb504emarcel# endif
1050ddb504emarcel#else /* ! YYPARSE_PARAM */
1051ddb504emarcel#if defined (__STDC__) || defined (__cplusplus)
1052ddb504emarcelint
1053ddb504emarcelyyparse (void)
1054ddb504emarcel#else
1055ddb504emarcelint
1056ddb504emarcelyyparse ()
1057ddb504emarcel
1058ddb504emarcel#endif
1059ddb504emarcel#endif
1060ddb504emarcel{
1061ddb504emarcel
1062ddb504emarcel  register int yystate;
1063ddb504emarcel  register int yyn;
1064ddb504emarcel  int yyresult;
1065ddb504emarcel  /* Number of tokens to shift before error messages enabled.  */
1066ddb504emarcel  int yyerrstatus;
1067ddb504emarcel  /* Lookahead token as an internal (translated) token number.  */
1068ddb504emarcel  int yytoken = 0;
1069ddb504emarcel
1070ddb504emarcel  /* Three stacks and their tools:
1071ddb504emarcel     `yyss': related to states,
1072ddb504emarcel     `yyvs': related to semantic values,
1073ddb504emarcel     `yyls': related to locations.
1074ddb504emarcel
1075ddb504emarcel     Refer to the stacks thru separate pointers, to allow yyoverflow
1076ddb504emarcel     to xreallocate them elsewhere.  */
1077ddb504emarcel
1078ddb504emarcel  /* The state stack.  */
1079ddb504emarcel  short	yyssa[YYINITDEPTH];
1080ddb504emarcel  short *yyss = yyssa;
1081ddb504emarcel  register short *yyssp;
1082ddb504emarcel
1083ddb504emarcel  /* The semantic value stack.  */
1084ddb504emarcel  YYSTYPE yyvsa[YYINITDEPTH];
1085ddb504emarcel  YYSTYPE *yyvs = yyvsa;
1086ddb504emarcel  register YYSTYPE *yyvsp;
1087ddb504emarcel
1088ddb504emarcel
1089ddb504emarcel
1090ddb504emarcel#define YYPOPSTACK   (yyvsp--, yyssp--)
1091ddb504emarcel
1092ddb504emarcel  YYSIZE_T yystacksize = YYINITDEPTH;
1093ddb504emarcel
1094ddb504emarcel  /* The variables used to return semantic value and location from the
1095ddb504emarcel     action routines.  */
1096ddb504emarcel  YYSTYPE yyval;
1097ddb504emarcel
1098ddb504emarcel
1099ddb504emarcel  /* When reducing, the number of symbols on the RHS of the reduced
1100ddb504emarcel     rule.  */
1101ddb504emarcel  int yylen;
1102ddb504emarcel
1103ddb504emarcel  YYDPRINTF ((stderr, "Starting parse\n"));
1104ddb504emarcel
1105ddb504emarcel  yystate = 0;
1106ddb504emarcel  yyerrstatus = 0;
1107ddb504emarcel  yynerrs = 0;
1108ddb504emarcel  yychar = YYEMPTY;		/* Cause a token to be read.  */
1109ddb504emarcel
1110ddb504emarcel  /* Initialize stack pointers.
1111ddb504emarcel     Waste one element of value and location stack
1112ddb504emarcel     so that they stay on the same level as the state stack.
1113ddb504emarcel     The wasted elements are never initialized.  */
1114ddb504emarcel
1115ddb504emarcel  yyssp = yyss;
1116ddb504emarcel  yyvsp = yyvs;
1117ddb504emarcel
1118ddb504emarcel  goto yysetstate;
1119ddb504emarcel
1120ddb504emarcel/*------------------------------------------------------------.
1121ddb504emarcel| yynewstate -- Push a new state, which is found in yystate.  |
1122ddb504emarcel`------------------------------------------------------------*/
1123ddb504emarcel yynewstate:
1124ddb504emarcel  /* In all cases, when you get here, the value and location stacks
1125ddb504emarcel     have just been pushed. so pushing a state here evens the stacks.
1126ddb504emarcel     */
1127ddb504emarcel  yyssp++;
1128ddb504emarcel
1129ddb504emarcel yysetstate:
1130ddb504emarcel  *yyssp = yystate;
1131ddb504emarcel
1132ddb504emarcel  if (yyss + yystacksize - 1 <= yyssp)
1133ddb504emarcel    {
1134ddb504emarcel      /* Get the current used size of the three stacks, in elements.  */
1135ddb504emarcel      YYSIZE_T yysize = yyssp - yyss + 1;
1136ddb504emarcel
1137ddb504emarcel#ifdef yyoverflow
1138ddb504emarcel      {
1139ddb504emarcel	/* Give user a chance to xreallocate the stack. Use copies of
1140ddb504emarcel	   these so that the &'s don't force the real ones into
1141ddb504emarcel	   memory.  */
1142ddb504emarcel	YYSTYPE *yyvs1 = yyvs;
1143ddb504emarcel	short *yyss1 = yyss;
1144ddb504emarcel
1145ddb504emarcel
1146ddb504emarcel	/* Each stack pointer address is followed by the size of the
1147ddb504emarcel	   data in use in that stack, in bytes.  This used to be a
1148ddb504emarcel	   conditional around just the two extra args, but that might
1149ddb504emarcel	   be undefined if yyoverflow is a macro.  */
1150ddb504emarcel	yyoverflow ("parser stack overflow",
1151ddb504emarcel		    &yyss1, yysize * sizeof (*yyssp),
1152ddb504emarcel		    &yyvs1, yysize * sizeof (*yyvsp),
1153ddb504emarcel
1154ddb504emarcel		    &yystacksize);
1155ddb504emarcel
1156ddb504emarcel	yyss = yyss1;
1157ddb504emarcel	yyvs = yyvs1;
1158ddb504emarcel      }
1159ddb504emarcel#else /* no yyoverflow */
1160ddb504emarcel# ifndef YYSTACK_RELOCATE
1161ddb504emarcel      goto yyoverflowlab;
1162ddb504emarcel# else
1163ddb504emarcel      /* Extend the stack our own way.  */
1164ddb504emarcel      if (YYMAXDEPTH <= yystacksize)
1165ddb504emarcel	goto yyoverflowlab;
1166ddb504emarcel      yystacksize *= 2;
1167ddb504emarcel      if (YYMAXDEPTH < yystacksize)
1168ddb504emarcel	yystacksize = YYMAXDEPTH;
1169ddb504emarcel
1170ddb504emarcel      {
1171ddb504emarcel	short *yyss1 = yyss;
1172ddb504emarcel	union yyalloc *yyptr =
1173ddb504emarcel	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1174ddb504emarcel	if (! yyptr)
1175ddb504emarcel	  goto yyoverflowlab;
1176ddb504emarcel	YYSTACK_RELOCATE (yyss);
1177ddb504emarcel	YYSTACK_RELOCATE (yyvs);
1178ddb504emarcel
1179ddb504emarcel#  undef YYSTACK_RELOCATE
1180ddb504emarcel	if (yyss1 != yyssa)
1181ddb504emarcel	  YYSTACK_FREE (yyss1);
1182ddb504emarcel      }
1183ddb504emarcel# endif
1184ddb504emarcel#endif /* no yyoverflow */
1185ddb504emarcel
1186ddb504emarcel      yyssp = yyss + yysize - 1;
1187ddb504emarcel      yyvsp = yyvs + yysize - 1;
1188ddb504emarcel
1189ddb504emarcel
1190ddb504emarcel      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1191ddb504emarcel		  (unsigned long int) yystacksize));
1192ddb504emarcel
1193ddb504emarcel      if (yyss + yystacksize - 1 <= yyssp)
1194ddb504emarcel	YYABORT;
1195ddb504emarcel    }
1196ddb504emarcel
1197ddb504emarcel  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1198ddb504emarcel
1199ddb504emarcel  goto yybackup;
1200ddb504emarcel
1201ddb504emarcel/*-----------.
1202ddb504emarcel| yybackup.  |
1203ddb504emarcel`-----------*/
1204ddb504emarcelyybackup:
1205ddb504emarcel
1206ddb504emarcel/* Do appropriate processing given the current state.  */
1207ddb504emarcel/* Read a lookahead token if we need one and don't already have one.  */
1208ddb504emarcel/* yyresume: */
1209ddb504emarcel
1210ddb504emarcel  /* First try to decide what to do without reference to lookahead token.  */
1211ddb504emarcel
1212ddb504emarcel  yyn = yypact[yystate];
1213ddb504emarcel  if (yyn == YYPACT_NINF)
1214ddb504emarcel    goto yydefault;
1215ddb504emarcel
1216ddb504emarcel  /* Not known => get a lookahead token if don't already have one.  */
1217ddb504emarcel
1218ddb504emarcel  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1219ddb504emarcel  if (yychar == YYEMPTY)
1220ddb504emarcel    {
1221ddb504emarcel      YYDPRINTF ((stderr, "Reading a token: "));
1222ddb504emarcel      yychar = YYLEX;
1223ddb504emarcel    }
1224ddb504emarcel
1225ddb504emarcel  if (yychar <= YYEOF)
1226ddb504emarcel    {
1227ddb504emarcel      yychar = yytoken = YYEOF;
1228ddb504emarcel      YYDPRINTF ((stderr, "Now at end of input.\n"));
1229ddb504emarcel    }
1230ddb504emarcel  else
1231ddb504emarcel    {
1232ddb504emarcel      yytoken = YYTRANSLATE (yychar);
1233ddb504emarcel      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1234ddb504emarcel    }
1235ddb504emarcel
1236ddb504emarcel  /* If the proper action on seeing token YYTOKEN is to reduce or to
1237ddb504emarcel     detect an error, take that action.  */
1238ddb504emarcel  yyn += yytoken;
1239ddb504emarcel  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1240ddb504emarcel    goto yydefault;
1241ddb504emarcel  yyn = yytable[yyn];
1242ddb504emarcel  if (yyn <= 0)
1243ddb504emarcel    {
1244ddb504emarcel      if (yyn == 0 || yyn == YYTABLE_NINF)
1245ddb504emarcel	goto yyerrlab;
1246ddb504emarcel      yyn = -yyn;
1247ddb504emarcel      goto yyreduce;
1248ddb504emarcel    }
1249ddb504emarcel
1250ddb504emarcel  if (yyn == YYFINAL)
1251ddb504emarcel    YYACCEPT;
1252ddb504emarcel
1253ddb504emarcel  /* Shift the lookahead token.  */
1254ddb504emarcel  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1255ddb504emarcel
1256ddb504emarcel  /* Discard the token being shifted unless it is eof.  */
1257ddb504emarcel  if (yychar != YYEOF)
1258ddb504emarcel    yychar = YYEMPTY;
1259ddb504emarcel
1260ddb504emarcel  *++yyvsp = yylval;
1261ddb504emarcel
1262ddb504emarcel
1263ddb504emarcel  /* Count tokens shifted since error; after three, turn off error
1264ddb504emarcel     status.  */
1265ddb504emarcel  if (yyerrstatus)
1266ddb504emarcel    yyerrstatus--;
1267ddb504emarcel
1268ddb504emarcel  yystate = yyn;
1269ddb504emarcel  goto yynewstate;
1270ddb504emarcel
1271ddb504emarcel
1272ddb504emarcel/*-----------------------------------------------------------.
1273ddb504emarcel| yydefault -- do the default action for the current state.  |
1274ddb504emarcel`-----------------------------------------------------------*/
1275ddb504emarcelyydefault:
1276ddb504emarcel  yyn = yydefact[yystate];
1277ddb504emarcel  if (yyn == 0)
1278ddb504emarcel    goto yyerrlab;
1279ddb504emarcel  goto yyreduce;
1280ddb504emarcel
1281ddb504emarcel
1282ddb504emarcel/*-----------------------------.
1283ddb504emarcel| yyreduce -- Do a reduction.  |
1284ddb504emarcel`-----------------------------*/
1285ddb504emarcelyyreduce:
1286ddb504emarcel  /* yyn is the number of a rule to reduce with.  */
1287ddb504emarcel  yylen = yyr2[yyn];
1288ddb504emarcel
1289ddb504emarcel  /* If YYLEN is nonzero, implement the default value of the action:
1290ddb504emarcel     `$$ = $1'.
1291ddb504emarcel
1292ddb504emarcel     Otherwise, the following line sets YYVAL to garbage.
1293ddb504emarcel     This behavior is undocumented and Bison
1294ddb504emarcel     users should not rely upon it.  Assigning to YYVAL
1295ddb504emarcel     unconditionally makes the parser a bit smaller, and it avoids a
1296ddb504emarcel     GCC warning that YYVAL may be used uninitialized.  */
1297ddb504emarcel  yyval = yyvsp[1-yylen];
1298ddb504emarcel
1299ddb504emarcel
1300ddb504emarcel  YY_REDUCE_PRINT (yyn);
1301ddb504emarcel  switch (yyn)
1302ddb504emarcel    {
1303ddb504emarcel        case 2:
1304ddb504emarcel#line 234 "p-exp.y"
1305ddb504emarcel    { current_type = NULL;
1306ddb504emarcel		  search_field = 0;
1307ddb504emarcel		}
1308ddb504emarcel    break;
1309ddb504emarcel
1310ddb504emarcel  case 3:
1311ddb504emarcel#line 237 "p-exp.y"
1312ddb504emarcel    {}
1313ddb504emarcel    break;
1314ddb504emarcel
1315ddb504emarcel  case 6:
1316ddb504emarcel#line 246 "p-exp.y"
1317ddb504emarcel    { write_exp_elt_opcode(OP_TYPE);
1318ddb504emarcel			  write_exp_elt_type(yyvsp[0].tval);
1319ddb504emarcel			  write_exp_elt_opcode(OP_TYPE);
1320ddb504emarcel			  current_type = yyvsp[0].tval; }
1321ddb504emarcel    break;
1322ddb504emarcel
1323ddb504emarcel  case 8:
1324ddb504emarcel#line 254 "p-exp.y"
1325ddb504emarcel    { write_exp_elt_opcode (BINOP_COMMA); }
1326ddb504emarcel    break;
1327ddb504emarcel
1328ddb504emarcel  case 9:
1329ddb504emarcel#line 259 "p-exp.y"
1330ddb504emarcel    { write_exp_elt_opcode (UNOP_IND);
1331ddb504emarcel			  if (current_type)
1332ddb504emarcel			    current_type = TYPE_TARGET_TYPE (current_type); }
1333ddb504emarcel    break;
1334ddb504emarcel
1335ddb504emarcel  case 10:
1336ddb504emarcel#line 265 "p-exp.y"
1337ddb504emarcel    { write_exp_elt_opcode (UNOP_ADDR);
1338ddb504emarcel			  if (current_type)
1339ddb504emarcel			    current_type = TYPE_POINTER_TYPE (current_type); }
1340ddb504emarcel    break;
1341ddb504emarcel
1342ddb504emarcel  case 11:
1343ddb504emarcel#line 271 "p-exp.y"
1344ddb504emarcel    { write_exp_elt_opcode (UNOP_NEG); }
1345ddb504emarcel    break;
1346ddb504emarcel
1347ddb504emarcel  case 12:
1348ddb504emarcel#line 275 "p-exp.y"
1349ddb504emarcel    { write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
1350ddb504emarcel    break;
1351ddb504emarcel
1352ddb504emarcel  case 13:
1353ddb504emarcel#line 279 "p-exp.y"
1354ddb504emarcel    { write_exp_elt_opcode (UNOP_PREINCREMENT); }
1355ddb504emarcel    break;
1356ddb504emarcel
1357ddb504emarcel  case 14:
1358ddb504emarcel#line 283 "p-exp.y"
1359ddb504emarcel    { write_exp_elt_opcode (UNOP_PREDECREMENT); }
1360ddb504emarcel    break;
1361ddb504emarcel
1362ddb504emarcel  case 15:
1363ddb504emarcel#line 286 "p-exp.y"
1364ddb504emarcel    { search_field = 1; }
1365ddb504emarcel    break;
1366ddb504emarcel
1367ddb504emarcel  case 16:
1368ddb504emarcel#line 289 "p-exp.y"
1369ddb504emarcel    { write_exp_elt_opcode (STRUCTOP_STRUCT);
1370ddb504emarcel			  write_exp_string (yyvsp[0].sval);
1371ddb504emarcel			  write_exp_elt_opcode (STRUCTOP_STRUCT);
1372ddb504emarcel			  search_field = 0;
1373ddb504emarcel			  if (current_type)
1374ddb504emarcel			    { while (TYPE_CODE (current_type) == TYPE_CODE_PTR)
1375ddb504emarcel				current_type = TYPE_TARGET_TYPE (current_type);
1376ddb504emarcel			      current_type = lookup_struct_elt_type (
1377ddb504emarcel				current_type, yyvsp[0].sval.ptr, 0); };
1378ddb504emarcel			 }
1379ddb504emarcel    break;
1380ddb504emarcel
1381ddb504emarcel  case 17:
1382ddb504emarcel#line 301 "p-exp.y"
1383ddb504emarcel    { char *arrayname;
1384ddb504emarcel			  int arrayfieldindex;
1385ddb504emarcel			  arrayfieldindex = is_pascal_string_type (
1386ddb504emarcel				current_type, NULL, NULL,
1387ddb504emarcel				NULL, NULL, &arrayname);
1388ddb504emarcel			  if (arrayfieldindex)
1389ddb504emarcel			    {
1390ddb504emarcel			      struct stoken stringsval;
1391ddb504emarcel			      stringsval.ptr = alloca (strlen (arrayname) + 1);
1392ddb504emarcel			      stringsval.length = strlen (arrayname);
1393ddb504emarcel			      strcpy (stringsval.ptr, arrayname);
1394ddb504emarcel			      current_type = TYPE_FIELD_TYPE (current_type,
1395ddb504emarcel				arrayfieldindex - 1);
1396ddb504emarcel			      write_exp_elt_opcode (STRUCTOP_STRUCT);
1397ddb504emarcel			      write_exp_string (stringsval);
1398ddb504emarcel			      write_exp_elt_opcode (STRUCTOP_STRUCT);
1399ddb504emarcel			    }
1400ddb504emarcel			  push_current_type ();  }
1401ddb504emarcel    break;
1402ddb504emarcel
1403ddb504emarcel  case 18:
1404ddb504emarcel#line 320 "p-exp.y"
1405ddb504emarcel    { pop_current_type ();
1406ddb504emarcel			  write_exp_elt_opcode (BINOP_SUBSCRIPT);
1407ddb504emarcel			  if (current_type)
1408ddb504emarcel			    current_type = TYPE_TARGET_TYPE (current_type); }
1409ddb504emarcel    break;
1410ddb504emarcel
1411ddb504emarcel  case 19:
1412ddb504emarcel#line 329 "p-exp.y"
1413ddb504emarcel    { push_current_type ();
1414ddb504emarcel			  start_arglist (); }
1415ddb504emarcel    break;
1416ddb504emarcel
1417ddb504emarcel  case 20:
1418ddb504emarcel#line 332 "p-exp.y"
1419ddb504emarcel    { write_exp_elt_opcode (OP_FUNCALL);
1420ddb504emarcel			  write_exp_elt_longcst ((LONGEST) end_arglist ());
1421ddb504emarcel			  write_exp_elt_opcode (OP_FUNCALL);
1422ddb504emarcel			  pop_current_type (); }
1423ddb504emarcel    break;
1424ddb504emarcel
1425ddb504emarcel  case 22:
1426ddb504emarcel#line 340 "p-exp.y"
1427ddb504emarcel    { arglist_len = 1; }
1428ddb504emarcel    break;
1429ddb504emarcel
1430ddb504emarcel  case 23:
1431ddb504emarcel#line 342 "p-exp.y"
1432ddb504emarcel    { arglist_len++; }
1433ddb504emarcel    break;
1434ddb504emarcel
1435ddb504emarcel  case 24:
1436ddb504emarcel#line 346 "p-exp.y"
1437ddb504emarcel    { if (current_type)
1438ddb504emarcel			    {
1439ddb504emarcel			      /* Allow automatic dereference of classes.  */
1440ddb504emarcel			      if ((TYPE_CODE (current_type) == TYPE_CODE_PTR)
1441ddb504emarcel				  && (TYPE_CODE (TYPE_TARGET_TYPE (current_type)) == TYPE_CODE_CLASS)
1442ddb504emarcel				  && (TYPE_CODE (yyvsp[-3].tval) == TYPE_CODE_CLASS))
1443ddb504emarcel				write_exp_elt_opcode (UNOP_IND);
1444ddb504emarcel			    }
1445ddb504emarcel			  write_exp_elt_opcode (UNOP_CAST);
1446ddb504emarcel			  write_exp_elt_type (yyvsp[-3].tval);
1447ddb504emarcel			  write_exp_elt_opcode (UNOP_CAST);
1448ddb504emarcel			  current_type = yyvsp[-3].tval; }
1449ddb504emarcel    break;
1450ddb504emarcel
1451ddb504emarcel  case 25:
1452ddb504emarcel#line 361 "p-exp.y"
1453ddb504emarcel    { }
1454ddb504emarcel    break;
1455ddb504emarcel
1456ddb504emarcel  case 26:
1457ddb504emarcel#line 367 "p-exp.y"
1458ddb504emarcel    { write_exp_elt_opcode (BINOP_MUL); }
1459ddb504emarcel    break;
1460ddb504emarcel
1461ddb504emarcel  case 27:
1462ddb504emarcel#line 371 "p-exp.y"
1463ddb504emarcel    { write_exp_elt_opcode (BINOP_DIV); }
1464ddb504emarcel    break;
1465ddb504emarcel
1466ddb504emarcel  case 28:
1467ddb504emarcel#line 375 "p-exp.y"
1468ddb504emarcel    { write_exp_elt_opcode (BINOP_INTDIV); }
1469ddb504emarcel    break;
1470ddb504e