1
/* A Bison parser, made by GNU Bison 2.1. */
3
/* Skeleton parser for Yacc-like parsing with Bison,
4
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
1
/* A Bison parser, made by GNU Bison 2.3. */
3
/* Skeleton implementation for Bison's Yacc-like parsers in C
5
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
Free Software Foundation, Inc.
6
8
This program is free software; you can redistribute it and/or modify
7
9
it under the terms of the GNU General Public License as published by
18
20
Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
21
Boston, MA 02110-1301, USA. */
21
/* As a special exception, when this file is copied by Bison into a
22
Bison output file, you may use that output file without restriction.
23
This special exception was added by the Free Software Foundation
24
in version 1.24 of Bison. */
26
/* Written by Richard Stallman by simplifying the original so called
27
``semantic'' parser. */
23
/* As a special exception, you may create a larger work that contains
24
part or all of the Bison parser skeleton and distribute that work
25
under terms of your choice, so long as that work isn't itself a
26
parser generator using the skeleton or a modified version thereof
27
as a parser skeleton. Alternatively, if you modify or redistribute
28
the parser skeleton itself, you may (at your option) remove this
29
special exception, which will cause the skeleton and the resulting
30
Bison output files to be licensed under the GNU General Public
31
License without this special exception.
33
This special exception was added by the Free Software Foundation in
34
version 2.2 of Bison. */
36
/* C LALR(1) parser skeleton written by Richard Stallman, by
37
simplifying the original so-called "semantic" parser. */
29
39
/* All symbols defined below should begin with yy or YY, to avoid
30
40
infringing on user name space. This should be done even for local
185
197
/* Copy the second part of user declarations. */
188
/* Line 219 of yacc.c. */
191
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
192
# define YYSIZE_T __SIZE_TYPE__
194
#if ! defined (YYSIZE_T) && defined (size_t)
195
# define YYSIZE_T size_t
197
#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
198
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
199
# define YYSIZE_T size_t
201
#if ! defined (YYSIZE_T)
202
# define YYSIZE_T unsigned int
200
/* Line 216 of yacc.c. */
208
typedef YYTYPE_UINT8 yytype_uint8;
210
typedef unsigned char yytype_uint8;
214
typedef YYTYPE_INT8 yytype_int8;
215
#elif (defined __STDC__ || defined __C99__FUNC__ \
216
|| defined __cplusplus || defined _MSC_VER)
217
typedef signed char yytype_int8;
219
typedef short int yytype_int8;
223
typedef YYTYPE_UINT16 yytype_uint16;
225
typedef unsigned short int yytype_uint16;
229
typedef YYTYPE_INT16 yytype_int16;
231
typedef short int yytype_int16;
235
# ifdef __SIZE_TYPE__
236
# define YYSIZE_T __SIZE_TYPE__
237
# elif defined size_t
238
# define YYSIZE_T size_t
239
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
240
|| defined __cplusplus || defined _MSC_VER)
241
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
242
# define YYSIZE_T size_t
244
# define YYSIZE_T unsigned int
248
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
206
251
# if YYENABLE_NLS
222
292
# if YYSTACK_USE_ALLOCA
224
294
# define YYSTACK_ALLOC __builtin_alloca
295
# elif defined __BUILTIN_VA_ARG_INCR
296
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
298
# define YYSTACK_ALLOC __alloca
299
# elif defined _MSC_VER
300
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
301
# define alloca _alloca
226
303
# define YYSTACK_ALLOC alloca
227
# if defined (__STDC__) || defined (__cplusplus)
304
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
305
|| defined __cplusplus || defined _MSC_VER)
228
306
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
229
# define YYINCLUDED_STDLIB_H
235
315
# ifdef YYSTACK_ALLOC
236
/* Pacify GCC's `empty if-body' warning. */
237
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
316
/* Pacify GCC's `empty if-body' warning. */
317
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
238
318
# ifndef YYSTACK_ALLOC_MAXIMUM
239
319
/* The OS might guarantee only one guard page at the bottom of the stack,
240
320
and a page size can be as small as 4096 bytes. So we cannot safely
241
321
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
242
322
to allow for a few compiler-allocated temporary stack slots. */
243
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
323
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
246
326
# define YYSTACK_ALLOC YYMALLOC
247
327
# define YYSTACK_FREE YYFREE
248
328
# ifndef YYSTACK_ALLOC_MAXIMUM
249
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
329
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
331
# if (defined __cplusplus && ! defined _STDLIB_H \
332
&& ! ((defined YYMALLOC || defined malloc) \
333
&& (defined YYFREE || defined free)))
334
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
254
339
# ifndef YYMALLOC
255
340
# define YYMALLOC malloc
256
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
257
&& (defined (__STDC__) || defined (__cplusplus)))
341
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
342
|| defined __cplusplus || defined _MSC_VER)
258
343
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
262
347
# define YYFREE free
263
# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
264
&& (defined (__STDC__) || defined (__cplusplus)))
348
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
349
|| defined __cplusplus || defined _MSC_VER)
265
350
void free (void *); /* INFRINGES ON USER NAME SPACE */
272
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
275
#if (! defined (yyoverflow) \
276
&& (! defined (__cplusplus) \
277
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
354
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
357
#if (! defined yyoverflow \
358
&& (! defined __cplusplus \
359
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
279
361
/* A type that is properly aligned for any stack member. */
324
406
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
325
407
yyptr += yynewbytes / sizeof (*yyptr); \
331
#if defined (__STDC__) || defined (__cplusplus)
332
typedef signed char yysigned_char;
334
typedef short int yysigned_char;
337
/* YYFINAL -- State number of the termination state. */
413
/* YYFINAL -- State number of the termination state. */
338
414
#define YYFINAL 14
339
415
/* YYLAST -- Last index in YYTABLE. */
340
416
#define YYLAST 142
342
/* YYNTOKENS -- Number of terminals. */
418
/* YYNTOKENS -- Number of terminals. */
343
419
#define YYNTOKENS 42
344
/* YYNNTS -- Number of nonterminals. */
420
/* YYNNTS -- Number of nonterminals. */
345
421
#define YYNNTS 36
346
/* YYNRULES -- Number of rules. */
422
/* YYNRULES -- Number of rules. */
347
423
#define YYNRULES 86
348
/* YYNRULES -- Number of states. */
424
/* YYNRULES -- Number of states. */
349
425
#define YYNSTATES 140
351
427
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
356
432
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
358
434
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
359
static const unsigned char yytranslate[] =
435
static const yytype_uint8 yytranslate[] =
361
437
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
362
438
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
405
481
227, 228, 231, 232, 234, 236, 239
408
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
409
static const yysigned_char yyrhs[] =
484
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
485
static const yytype_int8 yyrhs[] =
411
487
43, 0, -1, -1, 44, -1, 45, -1, 44, 45,
412
488
-1, 46, -1, 51, -1, 52, -1, 28, 3, 32,
522
598
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
523
599
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
524
600
means the default is an error. */
525
static const unsigned char yydefact[] =
601
static const yytype_uint8 yydefact[] =
527
603
22, 0, 0, 0, 22, 4, 6, 7, 8, 0,
528
604
0, 27, 0, 24, 1, 5, 0, 0, 0, 60,
540
616
22, 64, 40, 0, 57, 66, 0, 67, 0, 13
543
/* YYDEFGOTO[NTERM-NUM]. */
544
static const yysigned_char yydefgoto[] =
619
/* YYDEFGOTO[NTERM-NUM]. */
620
static const yytype_int8 yydefgoto[] =
546
622
-1, 3, 4, 5, 6, 83, 113, 111, 112, 7,
547
623
8, 9, 12, 13, 21, 50, 51, 55, 73, 74,
584
660
number is the opposite. If zero, do what YYDEFACT says.
585
661
If YYTABLE_NINF, syntax error. */
586
662
#define YYTABLE_NINF -38
587
static const short int yytable[] =
663
static const yytype_int16 yytable[] =
589
665
72, 106, 48, -2, -3, 109, 100, 117, 121, 118,
590
666
72, 2, 41, 42, 43, 44, 45, 46, 10, 41,
625
701
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
626
702
symbol of state STATE-NUM. */
627
static const unsigned char yystos[] =
703
static const yytype_uint8 yystos[] =
629
705
0, 28, 39, 43, 44, 45, 46, 51, 52, 53,
630
706
3, 3, 54, 55, 0, 45, 25, 26, 32, 35,
746
822
YYFPRINTF Args; \
749
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
753
YYFPRINTF (stderr, "%s ", Title); \
754
yysymprint (stderr, \
756
YYFPRINTF (stderr, "\n"); \
825
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
829
YYFPRINTF (stderr, "%s ", Title); \
830
yy_symbol_print (stderr, \
832
YYFPRINTF (stderr, "\n"); \
837
/*--------------------------------.
838
| Print this symbol on YYOUTPUT. |
839
`--------------------------------*/
842
#if (defined __STDC__ || defined __C99__FUNC__ \
843
|| defined __cplusplus || defined _MSC_VER)
845
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
848
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
851
YYSTYPE const * const yyvaluep;
857
if (yytype < YYNTOKENS)
858
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
870
/*--------------------------------.
871
| Print this symbol on YYOUTPUT. |
872
`--------------------------------*/
874
#if (defined __STDC__ || defined __C99__FUNC__ \
875
|| defined __cplusplus || defined _MSC_VER)
877
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
880
yy_symbol_print (yyoutput, yytype, yyvaluep)
883
YYSTYPE const * const yyvaluep;
886
if (yytype < YYNTOKENS)
887
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
889
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
891
yy_symbol_value_print (yyoutput, yytype, yyvaluep);
892
YYFPRINTF (yyoutput, ")");
760
895
/*------------------------------------------------------------------.
761
896
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
762
897
| TOP (included). |
763
898
`------------------------------------------------------------------*/
765
#if defined (__STDC__) || defined (__cplusplus)
900
#if (defined __STDC__ || defined __C99__FUNC__ \
901
|| defined __cplusplus || defined _MSC_VER)
767
yy_stack_print (short int *bottom, short int *top)
903
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
770
906
yy_stack_print (bottom, top)
907
yytype_int16 *bottom;
775
911
YYFPRINTF (stderr, "Stack now");
776
for (/* Nothing. */; bottom <= top; ++bottom)
912
for (; bottom <= top; ++bottom)
777
913
YYFPRINTF (stderr, " %d", *bottom);
778
914
YYFPRINTF (stderr, "\n");
784
920
yy_stack_print ((Bottom), (Top)); \
788
924
/*------------------------------------------------.
789
925
| Report that the YYRULE is going to be reduced. |
790
926
`------------------------------------------------*/
792
#if defined (__STDC__) || defined (__cplusplus)
928
#if (defined __STDC__ || defined __C99__FUNC__ \
929
|| defined __cplusplus || defined _MSC_VER)
794
yy_reduce_print (int yyrule)
931
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
797
yy_reduce_print (yyrule)
934
yy_reduce_print (yyvsp, yyrule)
939
int yynrhs = yyr2[yyrule];
802
941
unsigned long int yylno = yyrline[yyrule];
803
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
805
/* Print the symbols being reduced, and their result. */
806
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
807
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
808
YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
942
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
944
/* The symbols being reduced. */
945
for (yyi = 0; yyi < yynrhs; yyi++)
947
fprintf (stderr, " $%d = ", yyi + 1);
948
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
949
&(yyvsp[(yyi + 1) - (yynrhs)])
951
fprintf (stderr, "\n");
811
955
# define YY_REDUCE_PRINT(Rule) \
814
yy_reduce_print (Rule); \
958
yy_reduce_print (yyvsp, Rule); \
817
961
/* Nonzero means print parse trace. It is left uninitialized so that
818
962
multiple parsers can coexist. */
846
990
#if YYERROR_VERBOSE
848
992
# ifndef yystrlen
849
# if defined (__GLIBC__) && defined (_STRING_H)
993
# if defined __GLIBC__ && defined _STRING_H
850
994
# define yystrlen strlen
852
996
/* Return the length of YYSTR. */
997
#if (defined __STDC__ || defined __C99__FUNC__ \
998
|| defined __cplusplus || defined _MSC_VER)
854
# if defined (__STDC__) || defined (__cplusplus)
855
1000
yystrlen (const char *yystr)
857
1003
yystrlen (yystr)
861
const char *yys = yystr;
863
while (*yys++ != '\0')
1008
for (yylen = 0; yystr[yylen]; yylen++)
866
return yys - yystr - 1;
871
1015
# ifndef yystpcpy
872
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1016
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
873
1017
# define yystpcpy stpcpy
875
1019
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1021
#if (defined __STDC__ || defined __C99__FUNC__ \
1022
|| defined __cplusplus || defined _MSC_VER)
878
# if defined (__STDC__) || defined (__cplusplus)
879
1024
yystpcpy (char *yydest, const char *yysrc)
881
1027
yystpcpy (yydest, yysrc)
886
1032
char *yyd = yydest;
887
1033
const char *yys = yysrc;
945
#endif /* YYERROR_VERBOSE */
950
/*--------------------------------.
951
| Print this symbol on YYOUTPUT. |
952
`--------------------------------*/
954
#if defined (__STDC__) || defined (__cplusplus)
956
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
959
yysymprint (yyoutput, yytype, yyvaluep)
1091
/* Copy into YYRESULT an error message about the unexpected token
1092
YYCHAR while in state YYSTATE. Return the number of bytes copied,
1093
including the terminating null byte. If YYRESULT is null, do not
1094
copy anything; just return the number of bytes that would be
1095
copied. As a special case, return 0 if an ordinary "syntax error"
1096
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1097
size calculation. */
1099
yysyntax_error (char *yyresult, int yystate, int yychar)
965
/* Pacify ``unused variable'' warnings. */
1101
int yyn = yypact[yystate];
968
if (yytype < YYNTOKENS)
969
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1103
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
971
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
975
if (yytype < YYNTOKENS)
976
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1107
int yytype = YYTRANSLATE (yychar);
1108
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1109
YYSIZE_T yysize = yysize0;
1111
int yysize_overflow = 0;
1112
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1113
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1117
/* This is so xgettext sees the translatable formats that are
1118
constructed on the fly. */
1119
YY_("syntax error, unexpected %s");
1120
YY_("syntax error, unexpected %s, expecting %s");
1121
YY_("syntax error, unexpected %s, expecting %s or %s");
1122
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1123
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1127
static char const yyunexpected[] = "syntax error, unexpected %s";
1128
static char const yyexpecting[] = ", expecting %s";
1129
static char const yyor[] = " or %s";
1130
char yyformat[sizeof yyunexpected
1131
+ sizeof yyexpecting - 1
1132
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1133
* (sizeof yyor - 1))];
1134
char const *yyprefix = yyexpecting;
1136
/* Start YYX at -YYN if negative to avoid negative indexes in
1138
int yyxbegin = yyn < 0 ? -yyn : 0;
1140
/* Stay within bounds of both yycheck and yytname. */
1141
int yychecklim = YYLAST - yyn + 1;
1142
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1145
yyarg[0] = yytname[yytype];
1146
yyfmt = yystpcpy (yyformat, yyunexpected);
1148
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1149
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1151
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1155
yyformat[sizeof yyunexpected - 1] = '\0';
1158
yyarg[yycount++] = yytname[yyx];
1159
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1160
yysize_overflow |= (yysize1 < yysize);
1162
yyfmt = yystpcpy (yyfmt, yyprefix);
1166
yyf = YY_(yyformat);
1167
yysize1 = yysize + yystrlen (yyf);
1168
yysize_overflow |= (yysize1 < yysize);
1171
if (yysize_overflow)
1172
return YYSIZE_MAXIMUM;
1176
/* Avoid sprintf, as that infringes on the user's name space.
1177
Don't have undefined behavior even if the translation
1178
produced a string with the wrong number of "%s"s. */
1179
char *yyp = yyresult;
1181
while ((*yyp = *yyf) != '\0')
1183
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1185
yyp += yytnamerr (yyp, yyarg[yyi++]);
983
YYFPRINTF (yyoutput, ")");
1198
#endif /* YYERROR_VERBOSE */
986
#endif /* ! YYDEBUG */
987
1201
/*-----------------------------------------------.
988
1202
| Release the memory associated to this symbol. |
989
1203
`-----------------------------------------------*/
991
#if defined (__STDC__) || defined (__cplusplus)
1206
#if (defined __STDC__ || defined __C99__FUNC__ \
1207
|| defined __cplusplus || defined _MSC_VER)
993
1209
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1321
1542
#line 140 "mofc.y"
1323
add_qual_list(qual_chain_current,(yyvsp[0].lval_qual));
1544
add_qual_list(qual_chain_current,(yyvsp[(1) - (1)].lval_qual));
1328
1549
#line 144 "mofc.y"
1330
add_class_list(cls_chain_current,(yyvsp[0].lval_class));
1551
add_class_list(cls_chain_current,(yyvsp[(1) - (1)].lval_class));
1335
1556
#line 148 "mofc.y"
1337
add_class_list(inst_chain_current,(yyvsp[0].lval_class));
1558
add_class_list(inst_chain_current,(yyvsp[(1) - (1)].lval_class));
1342
1563
#line 160 "mofc.y"
1344
(yyval.lval_qual) = make_qualifier_definition(current_qualtab, (yyvsp[-6].lval_id), (yyvsp[-4].lval_type),
1345
(yyvsp[-3].lval_literal),(yyvsp[-2].lval_vals),(yyvsp[-1].lval_qual_quals));
1565
(yyval.lval_qual) = make_qualifier_definition(current_qualtab, (yyvsp[(2) - (8)].lval_id), (yyvsp[(4) - (8)].lval_type),
1566
(yyvsp[(5) - (8)].lval_literal),(yyvsp[(6) - (8)].lval_vals),(yyvsp[(7) - (8)].lval_qual_quals));
1366
1587
#line 177 "mofc.y"
1368
1589
(yyval.lval_qual_quals).scope = 0;
1369
(yyval.lval_qual_quals).flavor = (yyvsp[-1].lval_int);
1590
(yyval.lval_qual_quals).flavor = (yyvsp[(4) - (5)].lval_int);
1374
1595
#line 182 "mofc.y"
1376
(yyval.lval_qual_quals).scope = (yyvsp[-6].lval_int);
1377
(yyval.lval_qual_quals).flavor = (yyvsp[-1].lval_int);
1597
(yyval.lval_qual_quals).scope = (yyvsp[(4) - (10)].lval_int);
1598
(yyval.lval_qual_quals).flavor = (yyvsp[(9) - (10)].lval_int);
1382
1603
#line 189 "mofc.y"
1384
(yyval.lval_int)=make_scope((yyvsp[0].lval_id));
1605
(yyval.lval_int)=make_scope((yyvsp[(1) - (1)].lval_id));
1389
1610
#line 193 "mofc.y"
1391
(yyval.lval_int)|=make_scope((yyvsp[0].lval_id));
1612
(yyval.lval_int)|=make_scope((yyvsp[(3) - (3)].lval_id));
1396
1617
#line 199 "mofc.y"
1398
(yyval.lval_int)=make_flavor((yyvsp[0].lval_id));
1619
(yyval.lval_int)=make_flavor((yyvsp[(1) - (1)].lval_id));
1403
1624
#line 203 "mofc.y"
1405
(yyval.lval_int)|=make_flavor((yyvsp[0].lval_id));
1626
(yyval.lval_int)|=make_flavor((yyvsp[(3) - (3)].lval_id));
1410
1631
#line 220 "mofc.y"
1411
{ (yyval.lval_class) = make_class(current_symtab,(yyvsp[-7].lval_quals),(yyvsp[-5].lval_id),(yyvsp[-4].lval_class),(yyvsp[-2].lval_props)); }
1632
{ (yyval.lval_class) = make_class(current_symtab,(yyvsp[(1) - (8)].lval_quals),(yyvsp[(3) - (8)].lval_id),(yyvsp[(4) - (8)].lval_class),(yyvsp[(6) - (8)].lval_props)); }
1415
1636
#line 227 "mofc.y"
1417
(yyval.lval_class) = make_instance(current_symtab,(yyvsp[-8].lval_quals),(yyvsp[-5].lval_id),(yyvsp[-2].lval_props));
1418
add_class_list(cls_chain_current,get_class_def(current_symtab,(yyvsp[-5].lval_id)));
1638
(yyval.lval_class) = make_instance(current_symtab,(yyvsp[(1) - (9)].lval_quals),(yyvsp[(4) - (9)].lval_id),(yyvsp[(7) - (9)].lval_props),g_instmig);
1639
add_class_list(cls_chain_current,get_class_def(current_symtab,(yyvsp[(4) - (9)].lval_id)));
1498
1719
#line 264 "mofc.y"
1499
{(yyval.lval_props)=(yyvsp[0].lval_props);}
1720
{(yyval.lval_props)=(yyvsp[(1) - (1)].lval_props);}
1503
1724
#line 267 "mofc.y"
1504
{(yyval.lval_props)=(yyvsp[0].lval_props);}
1725
{(yyval.lval_props)=(yyvsp[(1) - (1)].lval_props);}
1508
1729
#line 270 "mofc.y"
1509
{pom_list_add((yyvsp[-1].lval_props),(yyvsp[0].lval_props));}
1730
{pom_list_add((yyvsp[(1) - (2)].lval_props),(yyvsp[(2) - (2)].lval_props));}
1513
1734
#line 279 "mofc.y"
1514
{(yyval.lval_props)=make_pom_list((yyvsp[-6].lval_quals),(yyvsp[-5].lval_type),(yyvsp[-4].lval_id),(yyvsp[-3].lval_literal),(yyvsp[-2].lval_params),(yyvsp[-1].lval_vals));}
1735
{(yyval.lval_props)=make_pom_list((yyvsp[(1) - (7)].lval_quals),(yyvsp[(2) - (7)].lval_type),(yyvsp[(3) - (7)].lval_id),(yyvsp[(4) - (7)].lval_literal),(yyvsp[(5) - (7)].lval_params),(yyvsp[(6) - (7)].lval_vals));}
1518
1739
#line 282 "mofc.y"
1519
{(yyval.lval_type)=(yyvsp[0].lval_type);}
1740
{(yyval.lval_type)=(yyvsp[(1) - (1)].lval_type);}
1523
1744
#line 283 "mofc.y"
1524
{(yyval.lval_type)=make_ref_type(current_symtab,(yyvsp[-1].lval_id));}
1745
{(yyval.lval_type)=make_ref_type(current_symtab,(yyvsp[(1) - (2)].lval_id));}
1658
1879
#line 325 "mofc.y"
1659
{(yyval.lval_vals) = (yyvsp[0].lval_vals);}
1880
{(yyval.lval_vals) = (yyvsp[(2) - (2)].lval_vals);}
1663
1884
#line 328 "mofc.y"
1664
{(yyval.lval_vals)=make_value_list((yyvsp[0].lval_literal));}
1885
{(yyval.lval_vals)=make_value_list((yyvsp[(1) - (1)].lval_literal));}
1668
1889
#line 329 "mofc.y"
1669
{(yyval.lval_vals)=(yyvsp[-1].lval_vals);}
1890
{(yyval.lval_vals)=(yyvsp[(2) - (3)].lval_vals);}
1673
1894
#line 334 "mofc.y"
1674
{(yyval.lval_literal)=make_char((yyvsp[0].lval_literal));}
1895
{(yyval.lval_literal)=make_char((yyvsp[(1) - (1)].lval_literal));}
1678
1899
#line 340 "mofc.y"
1679
{(yyval.lval_literal)=make_string((yyvsp[0].lval_literal));}
1900
{(yyval.lval_literal)=make_string((yyvsp[(1) - (1)].lval_literal));}
1683
1904
#line 341 "mofc.y"
1684
{(yyval.lval_literal)=append_string((yyvsp[-1].lval_literal),make_string((yyvsp[0].lval_literal)));}
1905
{(yyval.lval_literal)=append_string((yyvsp[(1) - (2)].lval_literal),make_string((yyvsp[(2) - (2)].lval_literal)));}
1693
1914
#line 350 "mofc.y"
1695
(yyval.lval_props)=(yyvsp[0].lval_props);
1916
(yyval.lval_props)=(yyvsp[(1) - (1)].lval_props);
1700
1921
#line 356 "mofc.y"
1702
(yyval.lval_props)=(yyvsp[0].lval_props);
1923
(yyval.lval_props)=(yyvsp[(1) - (1)].lval_props);
1707
1928
#line 360 "mofc.y"
1709
pom_list_add((yyvsp[-1].lval_props),(yyvsp[0].lval_props));
1930
pom_list_add((yyvsp[(1) - (2)].lval_props),(yyvsp[(2) - (2)].lval_props));
1714
1935
#line 366 "mofc.y"
1716
(yyval.lval_props)=make_pom_list(NULL,(type_type)0,(yyvsp[-2].lval_id),NULL,NULL,(yyvsp[-1].lval_vals));
1937
(yyval.lval_props)=make_pom_list(NULL,(type_type)0,(yyvsp[(1) - (3)].lval_id),NULL,NULL,(yyvsp[(2) - (3)].lval_vals));
1942
/* Line 1267 of yacc.c. */
1721
1944
default: break;
1724
/* Line 1126 of yacc.c. */
1946
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1731
1950
YY_STACK_PRINT (yyss, yyssp);
1733
1952
*++yyvsp = yyval;
1756
1975
if (!yyerrstatus)
1760
yyn = yypact[yystate];
1762
if (YYPACT_NINF < yyn && yyn < YYLAST)
1764
int yytype = YYTRANSLATE (yychar);
1765
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1766
YYSIZE_T yysize = yysize0;
1768
int yysize_overflow = 0;
1770
# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
1771
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1775
/* This is so xgettext sees the translatable formats that are
1776
constructed on the fly. */
1777
YY_("syntax error, unexpected %s");
1778
YY_("syntax error, unexpected %s, expecting %s");
1779
YY_("syntax error, unexpected %s, expecting %s or %s");
1780
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1781
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1785
static char const yyunexpected[] = "syntax error, unexpected %s";
1786
static char const yyexpecting[] = ", expecting %s";
1787
static char const yyor[] = " or %s";
1788
char yyformat[sizeof yyunexpected
1789
+ sizeof yyexpecting - 1
1790
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1791
* (sizeof yyor - 1))];
1792
char const *yyprefix = yyexpecting;
1794
/* Start YYX at -YYN if negative to avoid negative indexes in
1796
int yyxbegin = yyn < 0 ? -yyn : 0;
1798
/* Stay within bounds of both yycheck and yytname. */
1799
int yychecklim = YYLAST - yyn;
1800
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1803
yyarg[0] = yytname[yytype];
1804
yyfmt = yystpcpy (yyformat, yyunexpected);
1806
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1807
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1809
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1813
yyformat[sizeof yyunexpected - 1] = '\0';
1816
yyarg[yycount++] = yytname[yyx];
1817
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1818
yysize_overflow |= yysize1 < yysize;
1820
yyfmt = yystpcpy (yyfmt, yyprefix);
1824
yyf = YY_(yyformat);
1825
yysize1 = yysize + yystrlen (yyf);
1826
yysize_overflow |= yysize1 < yysize;
1829
if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
1830
yymsg = (char *) YYSTACK_ALLOC (yysize);
1833
/* Avoid sprintf, as that infringes on the user's name space.
1834
Don't have undefined behavior even if the translation
1835
produced a string with the wrong number of "%s"s. */
1838
while ((*yyp = *yyf))
1840
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1842
yyp += yytnamerr (yyp, yyarg[yyi++]);
1978
#if ! YYERROR_VERBOSE
1979
yyerror (YY_("syntax error"));
1982
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1983
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1985
YYSIZE_T yyalloc = 2 * yysize;
1986
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1987
yyalloc = YYSTACK_ALLOC_MAXIMUM;
1988
if (yymsg != yymsgbuf)
1852
1989
YYSTACK_FREE (yymsg);
1856
yyerror (YY_("syntax error"));
1990
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1992
yymsg_alloc = yyalloc;
1996
yymsg_alloc = sizeof yymsgbuf;
2000
if (0 < yysize && yysize <= yymsg_alloc)
2002
(void) yysyntax_error (yymsg, yystate, yychar);
2007
yyerror (YY_("syntax error"));
1857
2009
goto yyexhaustedlab;
1861
#endif /* YYERROR_VERBOSE */
1862
yyerror (YY_("syntax error"));