retro_idl 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/ext/retro_idl/asn/ext_parser/ext_common.h +27 -0
  3. data/ext/retro_idl/asn/ext_parser/ext_parser.l +201 -0
  4. data/ext/retro_idl/asn/ext_parser/ext_parser.y +1207 -0
  5. data/ext/retro_idl/asn/ext_parser/extconf.rb +3 -0
  6. data/ext/retro_idl/asn/ext_parser/lexer.c +2873 -0
  7. data/ext/retro_idl/asn/ext_parser/lexer.h +366 -0
  8. data/ext/retro_idl/asn/ext_parser/parser.c +2963 -0
  9. data/ext/retro_idl/asn/ext_parser/parser.h +175 -0
  10. data/lib/retro_idl/asn/alternative_type.rb +43 -0
  11. data/lib/retro_idl/asn/asn.rb +309 -0
  12. data/lib/retro_idl/asn/asn_error.rb +2 -0
  13. data/lib/retro_idl/asn/base_type.rb +87 -0
  14. data/lib/retro_idl/asn/base_value.rb +75 -0
  15. data/lib/retro_idl/asn/bit_string.rb +44 -0
  16. data/lib/retro_idl/asn/boolean.rb +50 -0
  17. data/lib/retro_idl/asn/builtin_value.rb +51 -0
  18. data/lib/retro_idl/asn/choice.rb +95 -0
  19. data/lib/retro_idl/asn/component_type.rb +56 -0
  20. data/lib/retro_idl/asn/constraint.rb +162 -0
  21. data/lib/retro_idl/asn/defined_type.rb +61 -0
  22. data/lib/retro_idl/asn/defined_value.rb +82 -0
  23. data/lib/retro_idl/asn/enumerated.rb +127 -0
  24. data/lib/retro_idl/asn/enumeration_item.rb +103 -0
  25. data/lib/retro_idl/asn/integer.rb +84 -0
  26. data/lib/retro_idl/asn/location.rb +10 -0
  27. data/lib/retro_idl/asn/named_number.rb +83 -0
  28. data/lib/retro_idl/asn/null.rb +41 -0
  29. data/lib/retro_idl/asn/octetstring.rb +48 -0
  30. data/lib/retro_idl/asn/real.rb +36 -0
  31. data/lib/retro_idl/asn/sequence.rb +132 -0
  32. data/lib/retro_idl/asn/sequenceof.rb +62 -0
  33. data/lib/retro_idl/asn/single_value.rb +26 -0
  34. data/lib/retro_idl/asn/tag.rb +163 -0
  35. data/lib/retro_idl/asn/type_list.rb +121 -0
  36. data/lib/retro_idl/asn/value_assignment.rb +21 -0
  37. data/lib/retro_idl/asn/value_list.rb +48 -0
  38. data/lib/retro_idl.rb +20 -0
  39. data/rakefile +33 -0
  40. data/test/asn/ext_parser/capture_stderr.rb +20 -0
  41. data/test/asn/ext_parser/tc_ext_parser.rb +94 -0
  42. data/test/asn/parser/capture_stderr.rb +20 -0
  43. data/test/asn/parser/tc_parser.rb +90 -0
  44. metadata +133 -0
@@ -0,0 +1,2963 @@
1
+ /* A Bison parser, made by GNU Bison 3.0.2. */
2
+
3
+ /* Bison implementation for Yacc-like parsers in C
4
+
5
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
+
20
+ /* As a special exception, you may create a larger work that contains
21
+ part or all of the Bison parser skeleton and distribute that work
22
+ under terms of your choice, so long as that work isn't itself a
23
+ parser generator using the skeleton or a modified version thereof
24
+ as a parser skeleton. Alternatively, if you modify or redistribute
25
+ the parser skeleton itself, you may (at your option) remove this
26
+ special exception, which will cause the skeleton and the resulting
27
+ Bison output files to be licensed under the GNU General Public
28
+ License without this special exception.
29
+
30
+ This special exception was added by the Free Software Foundation in
31
+ version 2.2 of Bison. */
32
+
33
+ /* C LALR(1) parser skeleton written by Richard Stallman, by
34
+ simplifying the original so-called "semantic" parser. */
35
+
36
+ /* All symbols defined below should begin with yy or YY, to avoid
37
+ infringing on user name space. This should be done even for local
38
+ variables, as they might otherwise be expanded by user macros.
39
+ There are some unavoidable exceptions within include files to
40
+ define necessary library symbols; they are noted "INFRINGES ON
41
+ USER NAME SPACE" below. */
42
+
43
+ /* Identify Bison output. */
44
+ #define YYBISON 1
45
+
46
+ /* Bison version. */
47
+ #define YYBISON_VERSION "3.0.2"
48
+
49
+ /* Skeleton name. */
50
+ #define YYSKELETON_NAME "yacc.c"
51
+
52
+ /* Pure parsers. */
53
+ #define YYPURE 2
54
+
55
+ /* Push parsers. */
56
+ #define YYPUSH 0
57
+
58
+ /* Pull parsers. */
59
+ #define YYPULL 1
60
+
61
+
62
+
63
+
64
+ /* Copy the first part of user declarations. */
65
+ #line 6 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:339 */
66
+
67
+
68
+ /* includes ***********************************************************/
69
+
70
+ #include <stdio.h>
71
+ #include <stdlib.h>
72
+ #include <stdbool.h>
73
+ #include <ruby.h>
74
+ #include <assert.h>
75
+
76
+ #include "lexer.h"
77
+
78
+ /* local prototypes ***************************************************/
79
+
80
+ /**
81
+ * - Ruby method to take a hash of attributes and return a tree of parsed data
82
+ *
83
+ * <code>
84
+ * attr = {
85
+ * :buffer => [a ruby string containing the file],
86
+ * :filename => [a ruby string containing the filename]
87
+ * }
88
+ * </code>
89
+ *
90
+ * @param[in] self reciever
91
+ * @param[in] attr hash of attributes
92
+ *
93
+ * @return tree of parsed data
94
+ *
95
+ * */
96
+ static VALUE parseFileBuffer(VALUE self, VALUE attr);
97
+
98
+ /**
99
+ * - Create a Ruby location record from YYLTYPE structure
100
+ * - Returned structure is a Hash with keys for location values
101
+ *
102
+ * @param[in] filename filename corresponding to location record
103
+ * @param[in] location pointer to Bison location record
104
+ *
105
+ * @return Ruby location instance
106
+ *
107
+ * */
108
+ static VALUE newLocation(VALUE filename, YYLTYPE *location);
109
+
110
+ /**
111
+ * - Mandatory yyerror function called by Flex/Bison
112
+ * - variadic like printf
113
+ *
114
+ * @param[in] locp pointer to Bison location record
115
+ * @param[in] scanner pointer to scanner instance (this is a pure parser)
116
+ * @param[in] filename filename corresponding to location record
117
+ * @param[out] tree the return structure
118
+ * @param[in] msg printf format string
119
+ *
120
+ * */
121
+ void yyerror(YYLTYPE *locp, yyscan_t scanner, VALUE filename, VALUE *tree, char const *msg, ... );
122
+
123
+ /* static variables ***************************************************/
124
+
125
+ static VALUE ASN;
126
+
127
+ /* generated **********************************************************/
128
+
129
+
130
+ #line 131 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:339 */
131
+
132
+ # ifndef YY_NULLPTR
133
+ # if defined __cplusplus && 201103L <= __cplusplus
134
+ # define YY_NULLPTR nullptr
135
+ # else
136
+ # define YY_NULLPTR 0
137
+ # endif
138
+ # endif
139
+
140
+ /* Enabling verbose error messages. */
141
+ #ifdef YYERROR_VERBOSE
142
+ # undef YYERROR_VERBOSE
143
+ # define YYERROR_VERBOSE 1
144
+ #else
145
+ # define YYERROR_VERBOSE 1
146
+ #endif
147
+
148
+ /* In a future release of Bison, this section will be replaced
149
+ by #include "parser.h". */
150
+ #ifndef YY_YY_EXT_RETRO_IDL_ASN_EXT_PARSER_PARSER_H_INCLUDED
151
+ # define YY_YY_EXT_RETRO_IDL_ASN_EXT_PARSER_PARSER_H_INCLUDED
152
+ /* Debug traces. */
153
+ #ifndef YYDEBUG
154
+ # define YYDEBUG 0
155
+ #endif
156
+ #if YYDEBUG
157
+ extern int yydebug;
158
+ #endif
159
+
160
+ /* Token type. */
161
+ #ifndef YYTOKENTYPE
162
+ # define YYTOKENTYPE
163
+ enum yytokentype
164
+ {
165
+ TOK_EXCEPT = 258,
166
+ TOK_CARET = 259,
167
+ TOK_INTERSECTION = 260,
168
+ TOK_PIPE = 261,
169
+ TOK_UNION = 262,
170
+ TOK_ENDL = 263,
171
+ TOK_LVERSION = 264,
172
+ TOK_ASSIGN = 265,
173
+ TOK_RANGE = 266,
174
+ TOK_ELLIPSES = 267,
175
+ TOK_EXCLAIM = 268,
176
+ TOK_OCTET = 269,
177
+ TOK_CHARACTER = 270,
178
+ TOK_BIT = 271,
179
+ TOK_STRING = 272,
180
+ TOK_SIZE = 273,
181
+ TOK_CHOICE = 274,
182
+ TOK_SEQUENCE = 275,
183
+ TOK_SET = 276,
184
+ TOK_OF = 277,
185
+ TOK_ALL = 278,
186
+ TOK_MIN = 279,
187
+ TOK_MAX = 280,
188
+ TOK_COMPONENTS = 281,
189
+ TOK_COMPONENT = 282,
190
+ TOK_ABSENT = 283,
191
+ TOK_CONTAINING = 284,
192
+ TOK_FROM = 285,
193
+ TOK_INCLUDES = 286,
194
+ TOK_SETTINGS = 287,
195
+ TOK_PRESENT = 288,
196
+ TOK_PATTERN = 289,
197
+ TOK_WITH = 290,
198
+ TOK_OPTIONAL = 291,
199
+ TOK_DEFAULT = 292,
200
+ TOK_IMPLICIT = 293,
201
+ TOK_EXPLICIT = 294,
202
+ TOK_APPLICATION = 295,
203
+ TOK_PRIVATE = 296,
204
+ TOK_UNIVERSAL = 297,
205
+ TOK_CHAR = 298,
206
+ TOK_BOOLEAN = 299,
207
+ TOK_INTEGER = 300,
208
+ TOK_REAL = 301,
209
+ TOK_ENUMERATED = 302,
210
+ TOK_BMPString = 303,
211
+ TOK_GeneralString = 304,
212
+ TOK_GraphicString = 305,
213
+ TOK_IA5String = 306,
214
+ TOK_ISO646String = 307,
215
+ TOK_NumericString = 308,
216
+ TOK_PrintableString = 309,
217
+ TOK_TeletexString = 310,
218
+ TOK_T61String = 311,
219
+ TOK_UniversalString = 312,
220
+ TOK_UTF8String = 313,
221
+ TOK_VideotexString = 314,
222
+ TOK_VisibleString = 315,
223
+ TOK_DATE = 316,
224
+ TOK_DATE_TIME = 317,
225
+ TOK_DURATION = 318,
226
+ TOK_EMBEDDED = 319,
227
+ TOK_PDV = 320,
228
+ TOK_EXTERNAL = 321,
229
+ TOK_RELATIVE_OID_IRI = 322,
230
+ TOK_OBJECT = 323,
231
+ TOK_IDENTIFIER = 324,
232
+ TOK_RELATIVE_IRI = 325,
233
+ TOK_RELATIVE_OID = 326,
234
+ TOK_TIME = 327,
235
+ TOK_TIME_OF_DAY = 328,
236
+ TOK_POSINT = 329,
237
+ TOK_NEGINT = 330,
238
+ TOK_HEXINT = 331,
239
+ TOK_ID = 332,
240
+ TOK_RVERSION = 333,
241
+ TOK_PLUS_INFINITY = 334,
242
+ TOK_MINUS_INFINITY = 335,
243
+ TOK_NOT_A_NUMBER = 336,
244
+ TOK_TRUE = 337,
245
+ TOK_FALSE = 338,
246
+ TOK_NULL = 339,
247
+ TOK_CONTAINS = 340,
248
+ TOK_POSREAL = 341,
249
+ TOK_NEGREAL = 342,
250
+ TOK_HSTRING = 343,
251
+ TOK_BSTRING = 344,
252
+ TOK_CSTRING = 345,
253
+ TOK_DEFINITIONS = 346,
254
+ TOK_BEGIN = 347,
255
+ TOK_END = 348,
256
+ TOK_TAGS = 349,
257
+ TOK_INSTRUCTIONS = 350,
258
+ TOK_EXPORTS = 351,
259
+ TOK_IMPORTS = 352,
260
+ TOK_EXTENSIBILITY = 353,
261
+ TOK_IMPLIED = 354,
262
+ TOK_AUTOMATIC = 355,
263
+ TOK_TYPEREF = 356
264
+ };
265
+ #endif
266
+
267
+ /* Value type. */
268
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
269
+ typedef VALUE YYSTYPE;
270
+ # define YYSTYPE_IS_TRIVIAL 1
271
+ # define YYSTYPE_IS_DECLARED 1
272
+ #endif
273
+
274
+ /* Location type. */
275
+ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
276
+ typedef struct YYLTYPE YYLTYPE;
277
+ struct YYLTYPE
278
+ {
279
+ int first_line;
280
+ int first_column;
281
+ int last_line;
282
+ int last_column;
283
+ };
284
+ # define YYLTYPE_IS_DECLARED 1
285
+ # define YYLTYPE_IS_TRIVIAL 1
286
+ #endif
287
+
288
+
289
+
290
+ int yyparse (yyscan_t scanner, VALUE filename, VALUE *tree);
291
+
292
+ #endif /* !YY_YY_EXT_RETRO_IDL_ASN_EXT_PARSER_PARSER_H_INCLUDED */
293
+
294
+ /* Copy the second part of user declarations. */
295
+
296
+ #line 297 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:358 */
297
+
298
+ #ifdef short
299
+ # undef short
300
+ #endif
301
+
302
+ #ifdef YYTYPE_UINT8
303
+ typedef YYTYPE_UINT8 yytype_uint8;
304
+ #else
305
+ typedef unsigned char yytype_uint8;
306
+ #endif
307
+
308
+ #ifdef YYTYPE_INT8
309
+ typedef YYTYPE_INT8 yytype_int8;
310
+ #else
311
+ typedef signed char yytype_int8;
312
+ #endif
313
+
314
+ #ifdef YYTYPE_UINT16
315
+ typedef YYTYPE_UINT16 yytype_uint16;
316
+ #else
317
+ typedef unsigned short int yytype_uint16;
318
+ #endif
319
+
320
+ #ifdef YYTYPE_INT16
321
+ typedef YYTYPE_INT16 yytype_int16;
322
+ #else
323
+ typedef short int yytype_int16;
324
+ #endif
325
+
326
+ #ifndef YYSIZE_T
327
+ # ifdef __SIZE_TYPE__
328
+ # define YYSIZE_T __SIZE_TYPE__
329
+ # elif defined size_t
330
+ # define YYSIZE_T size_t
331
+ # elif ! defined YYSIZE_T
332
+ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
333
+ # define YYSIZE_T size_t
334
+ # else
335
+ # define YYSIZE_T unsigned int
336
+ # endif
337
+ #endif
338
+
339
+ #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
340
+
341
+ #ifndef YY_
342
+ # if defined YYENABLE_NLS && YYENABLE_NLS
343
+ # if ENABLE_NLS
344
+ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
345
+ # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
346
+ # endif
347
+ # endif
348
+ # ifndef YY_
349
+ # define YY_(Msgid) Msgid
350
+ # endif
351
+ #endif
352
+
353
+ #ifndef YY_ATTRIBUTE
354
+ # if (defined __GNUC__ \
355
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
356
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
357
+ # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
358
+ # else
359
+ # define YY_ATTRIBUTE(Spec) /* empty */
360
+ # endif
361
+ #endif
362
+
363
+ #ifndef YY_ATTRIBUTE_PURE
364
+ # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
365
+ #endif
366
+
367
+ #ifndef YY_ATTRIBUTE_UNUSED
368
+ # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
369
+ #endif
370
+
371
+ #if !defined _Noreturn \
372
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
373
+ # if defined _MSC_VER && 1200 <= _MSC_VER
374
+ # define _Noreturn __declspec (noreturn)
375
+ # else
376
+ # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
377
+ # endif
378
+ #endif
379
+
380
+ /* Suppress unused-variable warnings by "using" E. */
381
+ #if ! defined lint || defined __GNUC__
382
+ # define YYUSE(E) ((void) (E))
383
+ #else
384
+ # define YYUSE(E) /* empty */
385
+ #endif
386
+
387
+ #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
388
+ /* Suppress an incorrect diagnostic about yylval being uninitialized. */
389
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
390
+ _Pragma ("GCC diagnostic push") \
391
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
392
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
393
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
394
+ _Pragma ("GCC diagnostic pop")
395
+ #else
396
+ # define YY_INITIAL_VALUE(Value) Value
397
+ #endif
398
+ #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
399
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
400
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_END
401
+ #endif
402
+ #ifndef YY_INITIAL_VALUE
403
+ # define YY_INITIAL_VALUE(Value) /* Nothing. */
404
+ #endif
405
+
406
+
407
+ #if ! defined yyoverflow || YYERROR_VERBOSE
408
+
409
+ /* The parser invokes alloca or malloc; define the necessary symbols. */
410
+
411
+ # ifdef YYSTACK_USE_ALLOCA
412
+ # if YYSTACK_USE_ALLOCA
413
+ # ifdef __GNUC__
414
+ # define YYSTACK_ALLOC __builtin_alloca
415
+ # elif defined __BUILTIN_VA_ARG_INCR
416
+ # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
417
+ # elif defined _AIX
418
+ # define YYSTACK_ALLOC __alloca
419
+ # elif defined _MSC_VER
420
+ # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
421
+ # define alloca _alloca
422
+ # else
423
+ # define YYSTACK_ALLOC alloca
424
+ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
425
+ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
426
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
427
+ # ifndef EXIT_SUCCESS
428
+ # define EXIT_SUCCESS 0
429
+ # endif
430
+ # endif
431
+ # endif
432
+ # endif
433
+ # endif
434
+
435
+ # ifdef YYSTACK_ALLOC
436
+ /* Pacify GCC's 'empty if-body' warning. */
437
+ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
438
+ # ifndef YYSTACK_ALLOC_MAXIMUM
439
+ /* The OS might guarantee only one guard page at the bottom of the stack,
440
+ and a page size can be as small as 4096 bytes. So we cannot safely
441
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
442
+ to allow for a few compiler-allocated temporary stack slots. */
443
+ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
444
+ # endif
445
+ # else
446
+ # define YYSTACK_ALLOC YYMALLOC
447
+ # define YYSTACK_FREE YYFREE
448
+ # ifndef YYSTACK_ALLOC_MAXIMUM
449
+ # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
450
+ # endif
451
+ # if (defined __cplusplus && ! defined EXIT_SUCCESS \
452
+ && ! ((defined YYMALLOC || defined malloc) \
453
+ && (defined YYFREE || defined free)))
454
+ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
455
+ # ifndef EXIT_SUCCESS
456
+ # define EXIT_SUCCESS 0
457
+ # endif
458
+ # endif
459
+ # ifndef YYMALLOC
460
+ # define YYMALLOC malloc
461
+ # if ! defined malloc && ! defined EXIT_SUCCESS
462
+ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
463
+ # endif
464
+ # endif
465
+ # ifndef YYFREE
466
+ # define YYFREE free
467
+ # if ! defined free && ! defined EXIT_SUCCESS
468
+ void free (void *); /* INFRINGES ON USER NAME SPACE */
469
+ # endif
470
+ # endif
471
+ # endif
472
+ #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
473
+
474
+
475
+ #if (! defined yyoverflow \
476
+ && (! defined __cplusplus \
477
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
478
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
479
+
480
+ /* A type that is properly aligned for any stack member. */
481
+ union yyalloc
482
+ {
483
+ yytype_int16 yyss_alloc;
484
+ YYSTYPE yyvs_alloc;
485
+ YYLTYPE yyls_alloc;
486
+ };
487
+
488
+ /* The size of the maximum gap between one aligned stack and the next. */
489
+ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
490
+
491
+ /* The size of an array large to enough to hold all stacks, each with
492
+ N elements. */
493
+ # define YYSTACK_BYTES(N) \
494
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
495
+ + 2 * YYSTACK_GAP_MAXIMUM)
496
+
497
+ # define YYCOPY_NEEDED 1
498
+
499
+ /* Relocate STACK from its old location to the new one. The
500
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
501
+ elements in the stack, and YYPTR gives the new location of the
502
+ stack. Advance YYPTR to a properly aligned location for the next
503
+ stack. */
504
+ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
505
+ do \
506
+ { \
507
+ YYSIZE_T yynewbytes; \
508
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
509
+ Stack = &yyptr->Stack_alloc; \
510
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
511
+ yyptr += yynewbytes / sizeof (*yyptr); \
512
+ } \
513
+ while (0)
514
+
515
+ #endif
516
+
517
+ #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
518
+ /* Copy COUNT objects from SRC to DST. The source and destination do
519
+ not overlap. */
520
+ # ifndef YYCOPY
521
+ # if defined __GNUC__ && 1 < __GNUC__
522
+ # define YYCOPY(Dst, Src, Count) \
523
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
524
+ # else
525
+ # define YYCOPY(Dst, Src, Count) \
526
+ do \
527
+ { \
528
+ YYSIZE_T yyi; \
529
+ for (yyi = 0; yyi < (Count); yyi++) \
530
+ (Dst)[yyi] = (Src)[yyi]; \
531
+ } \
532
+ while (0)
533
+ # endif
534
+ # endif
535
+ #endif /* !YYCOPY_NEEDED */
536
+
537
+ /* YYFINAL -- State number of the termination state. */
538
+ #define YYFINAL 3
539
+ /* YYLAST -- Last index in YYTABLE. */
540
+ #define YYLAST 475
541
+
542
+ /* YYNTOKENS -- Number of terminals. */
543
+ #define YYNTOKENS 114
544
+ /* YYNNTS -- Number of nonterminals. */
545
+ #define YYNNTS 76
546
+ /* YYNRULES -- Number of rules. */
547
+ #define YYNRULES 170
548
+ /* YYNSTATES -- Number of states. */
549
+ #define YYNSTATES 267
550
+
551
+ /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
552
+ by yylex, with out-of-bounds checking. */
553
+ #define YYUNDEFTOK 2
554
+ #define YYMAXUTOK 356
555
+
556
+ #define YYTRANSLATE(YYX) \
557
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
558
+
559
+ /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
560
+ as returned by yylex, without out-of-bounds checking. */
561
+ static const yytype_uint8 yytranslate[] =
562
+ {
563
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
564
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
565
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
566
+ 2, 2, 2, 113, 2, 2, 2, 2, 2, 2,
567
+ 105, 106, 2, 2, 104, 2, 2, 2, 2, 2,
568
+ 2, 2, 2, 2, 2, 2, 2, 2, 107, 2,
569
+ 112, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
572
+ 2, 108, 2, 109, 110, 2, 2, 2, 2, 2,
573
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
574
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
575
+ 2, 2, 2, 102, 111, 103, 2, 2, 2, 2,
576
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
582
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
589
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
590
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
591
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
592
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
593
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
594
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
595
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
596
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
597
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
598
+ 95, 96, 97, 98, 99, 100, 101
599
+ };
600
+
601
+ #if YYDEBUG
602
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
603
+ static const yytype_uint16 yyrline[] =
604
+ {
605
+ 0, 188, 188, 188, 198, 210, 212, 216, 218, 218,
606
+ 220, 225, 231, 238, 240, 244, 255, 267, 274, 283,
607
+ 285, 287, 289, 291, 293, 295, 297, 299, 301, 303,
608
+ 307, 323, 325, 327, 329, 331, 333, 335, 337, 339,
609
+ 341, 343, 345, 351, 353, 357, 365, 371, 377, 383,
610
+ 389, 395, 401, 407, 413, 419, 425, 431, 437, 447,
611
+ 458, 468, 474, 483, 489, 496, 506, 508, 512, 514,
612
+ 520, 529, 535, 541, 550, 557, 565, 572, 578, 588,
613
+ 595, 606, 616, 626, 634, 639, 646, 654, 660, 667,
614
+ 675, 681, 689, 696, 704, 712, 714, 724, 726, 730,
615
+ 732, 739, 741, 745, 747, 752, 757, 764, 778, 786,
616
+ 791, 797, 805, 807, 814, 823, 829, 837, 845, 851,
617
+ 857, 865, 867, 876, 881, 890, 892, 896, 898, 904,
618
+ 912, 917, 924, 931, 938, 945, 953, 955, 964, 969,
619
+ 973, 981, 989, 997, 1006, 1016, 1023, 1025, 1029, 1031,
620
+ 1035, 1037, 1041, 1043, 1045, 1049, 1059, 1070, 1072, 1076,
621
+ 1078, 1085, 1087, 1094, 1096, 1103, 1116, 1118, 1122, 1124,
622
+ 1126
623
+ };
624
+ #endif
625
+
626
+ #if YYDEBUG || YYERROR_VERBOSE || 1
627
+ /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
628
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
629
+ static const char *const yytname[] =
630
+ {
631
+ "$end", "error", "$undefined", "EXCEPT", "CARET", "INTERSECTION",
632
+ "PIPE", "UNION", "ENDL", "\"[[\"", "\"::=\"", "\"..\"", "\"...\"",
633
+ "EXCLAIM", "OCTET", "CHARACTER", "BIT", "STRING", "SIZE", "CHOICE",
634
+ "SEQUENCE", "SET", "OF", "ALL", "MIN", "MAX", "COMPONENTS", "COMPONENT",
635
+ "ABSENT", "CONTAINING", "FROM", "INCLUDES", "SETTINGS", "PRESENT",
636
+ "PATTERN", "WITH", "OPTIONAL", "DEFAULT", "IMPLICIT", "EXPLICIT",
637
+ "APPLICATION", "PRIVATE", "UNIVERSAL", "CHAR", "BOOLEAN", "INTEGER",
638
+ "REAL", "ENUMERATED", "BMPString", "GeneralString", "GraphicString",
639
+ "IA5String", "ISO646String", "NumericString", "PrintableString",
640
+ "TeletexString", "T61String", "UniversalString", "UTF8String",
641
+ "VideotexString", "VisibleString", "DATE", "DATE_TIME", "DURATION",
642
+ "EMBEDDED", "PDV", "EXTERNAL", "RELATIVE_OID_IRI", "OBJECT",
643
+ "IDENTIFIER", "RELATIVE_IRI", "RELATIVE_OID", "TIME", "TIME_OF_DAY",
644
+ "\"positive integer\"", "\"negative integer\"", "HEXINT",
645
+ "\"identifier\"", "\"]]\"", "PLUS_INFINITY", "MINUS_INFINITY",
646
+ "NOT_A_NUMBER", "TRUE", "FALSE", "NULL", "CONTAINS",
647
+ "\"positive real number\"", "\"negative real number\"", "\"hstring\"",
648
+ "\"bstring\"", "\"cstring\"", "DEFINITIONS", "BEGIN", "END", "TAGS",
649
+ "INSTRUCTIONS", "EXPORTS", "IMPORTS", "EXTENSIBILITY", "IMPLIED",
650
+ "AUTOMATIC", "\"typereference\"", "'{'", "'}'", "','", "'('", "')'",
651
+ "':'", "'['", "']'", "'^'", "'|'", "'<'", "'!'", "$accept", "Top", "$@1",
652
+ "empty", "identifier", "typereference", "valuereference", "number",
653
+ "encodingreference", "AssignmentList", "Assignment", "TypeAssignment",
654
+ "ValueAssignment", "Value", "BuiltinValue", "DefinedValue", "Type",
655
+ "CharacterStringType", "UnrestrictedCharacterStringType",
656
+ "RestrictedCharacterStringType", "DefinedType", "BooleanType",
657
+ "IntegerType", "NamedNumberList", "NamedNumber", "NamedNumberNumber",
658
+ "SignedNumber", "EnumeratedType", "NextEnumerationItem",
659
+ "NextAddEnumerationItem", "EnumerationItem", "RealType", "BitStringType",
660
+ "OctetStringType", "NullType", "SequenceType", "HeadComponentTypeList",
661
+ "NextHeadComponentType", "AdditionalComponentTypeList",
662
+ "NextAdditionalComponentType", "AdditionalComponentType",
663
+ "ComponentTypeList", "TailComponentTypeList", "VersionNumber",
664
+ "ComponentType", "NamedType", "SequenceOfType", "SequenceOfTypeVariant",
665
+ "SequenceOfTypeTarget", "ChoiceType", "NextAltType", "NextAddAltType",
666
+ "AddAltType", "VersionedAltType", "optTypePrefix", "TypePrefix", "Tag",
667
+ "Class", "ClassNumber", "Constraint", "ConstraintSpec", "ElementSetSpec",
668
+ "NextElements", "IntersectionMark", "UnionMark", "Elements",
669
+ "SubTypeElements", "SingleValue", "ValueRange", "LowerEndpoint",
670
+ "UpperEndpoint", "LowerEndValue", "UpperEndValue", "SizeConstraint",
671
+ "ExceptionSpec", "ExceptionIdentification", YY_NULLPTR
672
+ };
673
+ #endif
674
+
675
+ # ifdef YYPRINT
676
+ /* YYTOKNUM[NUM] -- (External) token number corresponding to the
677
+ (internal) symbol number NUM (which must be that of a token). */
678
+ static const yytype_uint16 yytoknum[] =
679
+ {
680
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
681
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
682
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
683
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
684
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
685
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
686
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
687
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
688
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
689
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
690
+ 355, 356, 123, 125, 44, 40, 41, 58, 91, 93,
691
+ 94, 124, 60, 33
692
+ };
693
+ # endif
694
+
695
+ #define YYPACT_NINF -163
696
+
697
+ #define yypact_value_is_default(Yystate) \
698
+ (!!((Yystate) == (-163)))
699
+
700
+ #define YYTABLE_NINF -162
701
+
702
+ #define yytable_value_is_error(Yytable_value) \
703
+ 0
704
+
705
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
706
+ STATE-NUM. */
707
+ static const yytype_int16 yypact[] =
708
+ {
709
+ -163, 41, -53, -163, -163, -163, -163, 37, 316, -53,
710
+ -163, -163, -163, -42, 62, 69, 77, 5, 13, -163,
711
+ 15, -163, 26, -163, -163, -163, -163, -163, -163, -163,
712
+ -163, -163, -163, -163, -163, -163, -163, -163, 91, -163,
713
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
714
+ -163, -163, -163, -163, 14, -163, 316, -163, -9, -163,
715
+ -163, 29, 74, -2, -163, 7, 303, -163, 257, 136,
716
+ 145, 74, 74, 59, -12, -12, -12, -163, -163, 72,
717
+ -163, -163, 80, -163, 67, -163, -2, -163, -163, 74,
718
+ -42, -22, -163, 64, 159, -163, -163, -7, 75, 186,
719
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
720
+ -163, -163, 303, 4, -163, -163, 90, -163, 3, -163,
721
+ -163, -163, 184, 85, -163, -163, -163, -163, -163, -163,
722
+ 94, 23, -163, 94, -163, 58, -163, -163, -163, -163,
723
+ 14, -163, -163, 60, 316, -163, 1, -163, 191, -163,
724
+ 66, 316, -163, 32, -163, -163, 59, 370, 102, -163,
725
+ -163, -163, -163, -163, -163, -163, 370, 370, 73, -163,
726
+ -1, -163, 74, -163, 6, -163, 100, -163, -2, 64,
727
+ -22, -163, -163, -163, 93, -163, -163, -163, 16, -163,
728
+ -163, 64, -7, -163, -163, -163, 3, 3, -163, 204,
729
+ -163, -163, -163, -163, 106, -163, -163, 64, 58, -163,
730
+ -163, 68, -163, 59, 139, 70, -163, 66, -163, -163,
731
+ -163, -163, -163, 89, -163, -163, 31, -163, -163, 108,
732
+ -163, -10, -163, 27, -163, -163, -163, 74, -163, 139,
733
+ 113, -163, 68, -163, -33, -163, 114, 70, 89, 74,
734
+ -163, -163, -163, -10, -10, -163, 116, -163, -163, -163,
735
+ -32, -163, 117, -163, -163, 74, -163
736
+ };
737
+
738
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
739
+ Performed when YYTABLE does not specify something else to do. Zero
740
+ means the default is an error. */
741
+ static const yytype_uint8 yydefact[] =
742
+ {
743
+ 2, 0, 0, 1, 5, 6, 7, 0, 0, 3,
744
+ 12, 13, 14, 4, 0, 0, 0, 0, 0, 60,
745
+ 61, 78, 0, 46, 47, 48, 49, 50, 51, 52,
746
+ 53, 54, 55, 56, 57, 58, 82, 59, 0, 33,
747
+ 44, 43, 42, 32, 36, 35, 39, 31, 38, 37,
748
+ 41, 40, 34, 11, 0, 125, 0, 126, 127, 81,
749
+ 45, 79, 0, 4, 109, 0, 0, 139, 0, 0,
750
+ 0, 0, 0, 0, 0, 0, 0, 8, 9, 7,
751
+ 30, 136, 0, 137, 0, 135, 4, 128, 129, 0,
752
+ 4, 0, 165, 4, 0, 84, 83, 0, 103, 0,
753
+ 162, 22, 23, 24, 27, 28, 29, 19, 20, 21,
754
+ 25, 26, 0, 155, 17, 18, 0, 140, 4, 151,
755
+ 152, 153, 0, 157, 154, 112, 113, 108, 110, 111,
756
+ 0, 0, 63, 76, 77, 0, 16, 133, 134, 132,
757
+ 0, 131, 15, 0, 0, 115, 0, 114, 0, 167,
758
+ 0, 0, 87, 0, 86, 104, 0, 0, 0, 138,
759
+ 146, 148, 147, 149, 145, 142, 0, 0, 0, 158,
760
+ 0, 62, 0, 71, 0, 70, 0, 80, 4, 4,
761
+ 0, 68, 69, 169, 0, 170, 166, 90, 0, 85,
762
+ 106, 4, 0, 105, 141, 150, 4, 4, 164, 0,
763
+ 163, 156, 159, 66, 0, 67, 64, 4, 0, 130,
764
+ 107, 0, 117, 0, 4, 0, 95, 0, 89, 144,
765
+ 143, 160, 65, 0, 72, 118, 0, 116, 168, 0,
766
+ 101, 0, 92, 0, 91, 88, 74, 0, 73, 4,
767
+ 0, 121, 0, 102, 0, 97, 4, 0, 0, 0,
768
+ 119, 120, 96, 0, 0, 99, 0, 94, 75, 124,
769
+ 0, 98, 100, 93, 122, 0, 123
770
+ };
771
+
772
+ /* YYPGOTO[NTERM-NUM]. */
773
+ static const yytype_int16 yypgoto[] =
774
+ {
775
+ -163, -163, -163, -13, -51, 50, 55, -163, -163, -163,
776
+ 208, -163, -163, -69, -163, -48, -19, -163, -163, -163,
777
+ -163, -163, -163, 131, -66, -163, 52, -163, 17, -25,
778
+ -162, -163, -163, -163, -163, -163, -163, 35, 11, -23,
779
+ -3, -20, -163, -8, -63, -61, -163, -163, -163, -163,
780
+ 76, 10, -163, -163, 142, -163, -163, 115, -6, -54,
781
+ -163, 141, -77, -163, -163, -106, -163, -163, -163, -163,
782
+ -163, -163, 61, 236, -157, -163
783
+ };
784
+
785
+ /* YYDEFGOTO[NTERM-NUM]. */
786
+ static const yytype_int16 yydefgoto[] =
787
+ {
788
+ -1, 1, 2, 67, 6, 37, 80, 81, 82, 9,
789
+ 10, 11, 12, 113, 114, 115, 38, 39, 40, 41,
790
+ 42, 43, 44, 131, 134, 204, 185, 45, 175, 238,
791
+ 135, 46, 47, 48, 49, 50, 96, 154, 189, 234,
792
+ 215, 244, 256, 231, 216, 98, 51, 68, 127, 52,
793
+ 147, 227, 242, 260, 56, 57, 58, 84, 85, 69,
794
+ 116, 117, 165, 166, 167, 118, 119, 120, 121, 122,
795
+ 201, 123, 202, 124, 150, 186
796
+ };
797
+
798
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
799
+ positive, shift that token. If negative, reduce the rule whose
800
+ number is the opposite. If YYTABLE_NINF, syntax error. */
801
+ static const yytype_int16 yytable[] =
802
+ {
803
+ 55, 91, 97, 79, 136, 132, 83, 126, 160, 92,
804
+ 161, 90, 208, 179, 90, -161, 94, 90, 207, 93,
805
+ 130, 133, 211, 132, 4, 214, 83, 83, 83, 87,
806
+ 88, 63, 142, 94, 217, 64, 214, 86, 130, 246,
807
+ 239, 3, 94, 240, 191, 252, 264, 13, 5, 125,
808
+ 223, 194, 7, 94, 74, 75, 76, 8, 94, 7,
809
+ 196, 197, 77, 78, 8, 4, 54, 4, 137, 138,
810
+ 139, 253, 265, 181, 182, 248, 4, 55, 4, 59,
811
+ 149, 145, 146, 4, 4, 180, 60, 193, 77, 78,
812
+ 192, 4, 83, 4, 61, 90, 152, 153, 198, 200,
813
+ 183, 73, 90, 66, 4, 164, 206, 62, 4, 4,
814
+ 95, 155, 156, 162, 163, 65, -161, 71, 66, 219,
815
+ 220, 130, 203, 133, 210, 178, 171, 172, 72, 184,
816
+ 200, 89, 190, 101, 102, 103, 4, 90, 104, 105,
817
+ 106, 107, 108, 109, 228, 110, 111, 101, 102, 103,
818
+ 4, 4, 104, 105, 106, 107, 108, 109, 128, 110,
819
+ 111, 173, 174, 177, 172, 241, 149, 129, 245, 187,
820
+ 188, 225, 226, 232, 233, 90, 141, 148, 149, -10,
821
+ 90, 151, 90, 164, 164, 199, 133, 140, 259, 157,
822
+ 261, 245, 236, 237, 149, 168, 159, 169, 90, 170,
823
+ 213, 230, 90, 90, 266, 14, 15, 16, 195, 209,
824
+ 17, 18, 222, 229, 90, 243, 250, 53, 254, 263,
825
+ 143, 253, 205, 258, 257, 224, 230, 218, 235, 198,
826
+ 247, 249, 144, 255, 262, 19, 20, 21, 22, 23,
827
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
828
+ 34, 35, 251, 158, 70, 176, 212, 0, 0, 0,
829
+ 221, 0, 0, 0, 0, 181, 182, 0, 4, 0,
830
+ 0, 14, 15, 16, 0, 36, 17, 18, 101, 102,
831
+ 103, 4, 0, 104, 105, 106, 107, 108, 109, 0,
832
+ 110, 111, 5, 0, 0, 0, 0, 0, 0, 0,
833
+ 0, 19, 20, 21, 22, 23, 24, 25, 26, 27,
834
+ 28, 29, 30, 31, 32, 33, 34, 35, 0, 0,
835
+ 0, 63, 0, 0, 0, 0, 99, 100, 0, 0,
836
+ 14, 15, 16, 0, 4, 17, 18, 0, 0, 0,
837
+ 0, 36, 0, 0, 0, 0, 0, 0, 0, 0,
838
+ 0, 0, 0, 0, 0, 0, 0, 0, 5, 0,
839
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
840
+ 29, 30, 31, 32, 33, 34, 35, 101, 102, 103,
841
+ 4, 0, 104, 105, 106, 107, 108, 109, 63, 110,
842
+ 111, 0, 0, 0, 100, 0, 0, 0, 0, 0,
843
+ 36, 0, 0, 0, 0, 0, 0, 0, 112, 0,
844
+ 0, 0, 0, 0, 0, 0, 0, 5, 0, 0,
845
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
846
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
847
+ 0, 0, 0, 0, 101, 102, 103, 4, 0, 104,
848
+ 105, 106, 107, 108, 109, 0, 110, 111, 0, 0,
849
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
850
+ 0, 0, 0, 0, 0, 112
851
+ };
852
+
853
+ static const yytype_int16 yycheck[] =
854
+ {
855
+ 13, 62, 65, 54, 73, 71, 54, 68, 5, 63,
856
+ 7, 62, 174, 12, 65, 11, 26, 68, 12, 12,
857
+ 71, 72, 179, 89, 77, 9, 74, 75, 76, 38,
858
+ 39, 18, 86, 26, 191, 22, 9, 56, 89, 12,
859
+ 9, 0, 26, 12, 12, 78, 78, 10, 101, 68,
860
+ 207, 157, 2, 26, 40, 41, 42, 2, 26, 9,
861
+ 166, 167, 74, 75, 9, 77, 108, 77, 74, 75,
862
+ 76, 104, 104, 74, 75, 237, 77, 90, 77, 17,
863
+ 93, 103, 104, 77, 77, 146, 17, 156, 74, 75,
864
+ 153, 77, 140, 77, 17, 146, 103, 104, 25, 168,
865
+ 148, 10, 153, 105, 77, 118, 172, 102, 77, 77,
866
+ 103, 36, 37, 110, 111, 102, 112, 102, 105, 196,
867
+ 197, 172, 170, 174, 178, 144, 103, 104, 102, 148,
868
+ 199, 102, 151, 74, 75, 76, 77, 188, 79, 80,
869
+ 81, 82, 83, 84, 213, 86, 87, 74, 75, 76,
870
+ 77, 77, 79, 80, 81, 82, 83, 84, 22, 86,
871
+ 87, 103, 104, 103, 104, 226, 179, 22, 231, 103,
872
+ 104, 103, 104, 103, 104, 226, 109, 113, 191, 107,
873
+ 231, 22, 233, 196, 197, 112, 237, 107, 249, 3,
874
+ 253, 254, 103, 104, 207, 11, 106, 112, 249, 105,
875
+ 107, 214, 253, 254, 265, 14, 15, 16, 106, 109,
876
+ 19, 20, 106, 74, 265, 107, 103, 9, 104, 103,
877
+ 89, 104, 170, 248, 247, 208, 239, 192, 217, 25,
878
+ 233, 239, 90, 246, 254, 44, 45, 46, 47, 48,
879
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
880
+ 59, 60, 242, 112, 18, 140, 180, -1, -1, -1,
881
+ 199, -1, -1, -1, -1, 74, 75, -1, 77, -1,
882
+ -1, 14, 15, 16, -1, 84, 19, 20, 74, 75,
883
+ 76, 77, -1, 79, 80, 81, 82, 83, 84, -1,
884
+ 86, 87, 101, -1, -1, -1, -1, -1, -1, -1,
885
+ -1, 44, 45, 46, 47, 48, 49, 50, 51, 52,
886
+ 53, 54, 55, 56, 57, 58, 59, 60, -1, -1,
887
+ -1, 18, -1, -1, -1, -1, 23, 24, -1, -1,
888
+ 14, 15, 16, -1, 77, 19, 20, -1, -1, -1,
889
+ -1, 84, -1, -1, -1, -1, -1, -1, -1, -1,
890
+ -1, -1, -1, -1, -1, -1, -1, -1, 101, -1,
891
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
892
+ 54, 55, 56, 57, 58, 59, 60, 74, 75, 76,
893
+ 77, -1, 79, 80, 81, 82, 83, 84, 18, 86,
894
+ 87, -1, -1, -1, 24, -1, -1, -1, -1, -1,
895
+ 84, -1, -1, -1, -1, -1, -1, -1, 105, -1,
896
+ -1, -1, -1, -1, -1, -1, -1, 101, -1, -1,
897
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
898
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
899
+ -1, -1, -1, -1, 74, 75, 76, 77, -1, 79,
900
+ 80, 81, 82, 83, 84, -1, 86, 87, -1, -1,
901
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
902
+ -1, -1, -1, -1, -1, 105
903
+ };
904
+
905
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
906
+ symbol of state STATE-NUM. */
907
+ static const yytype_uint8 yystos[] =
908
+ {
909
+ 0, 115, 116, 0, 77, 101, 118, 119, 120, 123,
910
+ 124, 125, 126, 10, 14, 15, 16, 19, 20, 44,
911
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
912
+ 55, 56, 57, 58, 59, 60, 84, 119, 130, 131,
913
+ 132, 133, 134, 135, 136, 141, 145, 146, 147, 148,
914
+ 149, 160, 163, 124, 108, 117, 168, 169, 170, 17,
915
+ 17, 17, 102, 18, 22, 102, 105, 117, 161, 173,
916
+ 187, 102, 102, 10, 40, 41, 42, 74, 75, 118,
917
+ 120, 121, 122, 129, 171, 172, 130, 38, 39, 102,
918
+ 118, 159, 173, 12, 26, 103, 150, 158, 159, 23,
919
+ 24, 74, 75, 76, 79, 80, 81, 82, 83, 84,
920
+ 86, 87, 105, 127, 128, 129, 174, 175, 179, 180,
921
+ 181, 182, 183, 185, 187, 130, 159, 162, 22, 22,
922
+ 118, 137, 138, 118, 138, 144, 127, 172, 172, 172,
923
+ 107, 109, 173, 137, 168, 103, 104, 164, 113, 117,
924
+ 188, 22, 103, 104, 151, 36, 37, 3, 175, 106,
925
+ 5, 7, 110, 111, 117, 176, 177, 178, 11, 112,
926
+ 105, 103, 104, 103, 104, 142, 171, 103, 130, 12,
927
+ 159, 74, 75, 129, 130, 140, 189, 103, 104, 152,
928
+ 130, 12, 158, 127, 179, 106, 179, 179, 25, 112,
929
+ 127, 184, 186, 129, 139, 140, 138, 12, 144, 109,
930
+ 173, 188, 164, 107, 9, 154, 158, 188, 151, 176,
931
+ 176, 186, 106, 188, 142, 103, 104, 165, 127, 74,
932
+ 117, 157, 103, 104, 153, 152, 103, 104, 143, 9,
933
+ 12, 159, 166, 107, 155, 158, 12, 154, 144, 157,
934
+ 103, 165, 78, 104, 104, 117, 156, 153, 143, 159,
935
+ 167, 158, 155, 103, 78, 104, 159
936
+ };
937
+
938
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
939
+ static const yytype_uint8 yyr1[] =
940
+ {
941
+ 0, 114, 116, 115, 117, 118, 119, 120, 121, 121,
942
+ 122, 123, 123, 124, 124, 125, 126, 127, 127, 128,
943
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
944
+ 129, 130, 130, 130, 130, 130, 130, 130, 130, 130,
945
+ 130, 130, 130, 131, 131, 132, 133, 133, 133, 133,
946
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 134,
947
+ 135, 136, 136, 137, 137, 138, 139, 139, 140, 140,
948
+ 141, 142, 142, 142, 143, 143, 144, 144, 145, 146,
949
+ 146, 147, 148, 149, 150, 150, 150, 151, 151, 151,
950
+ 152, 152, 153, 153, 153, 154, 154, 155, 155, 156,
951
+ 156, 157, 157, 158, 158, 158, 158, 159, 160, 161,
952
+ 161, 161, 162, 162, 163, 164, 164, 164, 165, 165,
953
+ 165, 166, 166, 167, 167, 168, 168, 169, 169, 169,
954
+ 170, 170, 171, 171, 171, 171, 172, 172, 173, 173,
955
+ 174, 175, 175, 176, 176, 176, 177, 177, 178, 178,
956
+ 179, 179, 180, 180, 180, 181, 182, 183, 183, 184,
957
+ 184, 185, 185, 186, 186, 187, 188, 188, 189, 189,
958
+ 189
959
+ };
960
+
961
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
962
+ static const yytype_uint8 yyr2[] =
963
+ {
964
+ 0, 2, 0, 2, 0, 1, 1, 1, 1, 1,
965
+ 1, 2, 1, 1, 1, 5, 4, 1, 1, 1,
966
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
967
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
968
+ 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,
969
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
970
+ 1, 1, 4, 1, 3, 4, 1, 1, 1, 1,
971
+ 4, 1, 3, 4, 1, 3, 1, 1, 1, 2,
972
+ 5, 2, 1, 3, 1, 3, 2, 1, 4, 3,
973
+ 1, 3, 1, 4, 3, 1, 4, 1, 3, 1,
974
+ 2, 1, 2, 1, 2, 3, 3, 4, 3, 1,
975
+ 2, 2, 1, 1, 4, 1, 4, 3, 1, 3,
976
+ 3, 1, 4, 3, 1, 1, 1, 1, 2, 2,
977
+ 5, 3, 2, 2, 2, 1, 1, 1, 3, 1,
978
+ 1, 3, 2, 3, 3, 1, 1, 1, 1, 1,
979
+ 3, 1, 1, 1, 1, 1, 3, 1, 2, 1,
980
+ 2, 1, 1, 1, 1, 2, 2, 1, 3, 1,
981
+ 1
982
+ };
983
+
984
+
985
+ #define yyerrok (yyerrstatus = 0)
986
+ #define yyclearin (yychar = YYEMPTY)
987
+ #define YYEMPTY (-2)
988
+ #define YYEOF 0
989
+
990
+ #define YYACCEPT goto yyacceptlab
991
+ #define YYABORT goto yyabortlab
992
+ #define YYERROR goto yyerrorlab
993
+
994
+
995
+ #define YYRECOVERING() (!!yyerrstatus)
996
+
997
+ #define YYBACKUP(Token, Value) \
998
+ do \
999
+ if (yychar == YYEMPTY) \
1000
+ { \
1001
+ yychar = (Token); \
1002
+ yylval = (Value); \
1003
+ YYPOPSTACK (yylen); \
1004
+ yystate = *yyssp; \
1005
+ goto yybackup; \
1006
+ } \
1007
+ else \
1008
+ { \
1009
+ yyerror (&yylloc, scanner, filename, tree, YY_("syntax error: cannot back up")); \
1010
+ YYERROR; \
1011
+ } \
1012
+ while (0)
1013
+
1014
+ /* Error token number */
1015
+ #define YYTERROR 1
1016
+ #define YYERRCODE 256
1017
+
1018
+
1019
+ /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1020
+ If N is 0, then set CURRENT to the empty location which ends
1021
+ the previous symbol: RHS[0] (always defined). */
1022
+
1023
+ #ifndef YYLLOC_DEFAULT
1024
+ # define YYLLOC_DEFAULT(Current, Rhs, N) \
1025
+ do \
1026
+ if (N) \
1027
+ { \
1028
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1029
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1030
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1031
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1032
+ } \
1033
+ else \
1034
+ { \
1035
+ (Current).first_line = (Current).last_line = \
1036
+ YYRHSLOC (Rhs, 0).last_line; \
1037
+ (Current).first_column = (Current).last_column = \
1038
+ YYRHSLOC (Rhs, 0).last_column; \
1039
+ } \
1040
+ while (0)
1041
+ #endif
1042
+
1043
+ #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1044
+
1045
+
1046
+ /* Enable debugging if requested. */
1047
+ #if YYDEBUG
1048
+
1049
+ # ifndef YYFPRINTF
1050
+ # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1051
+ # define YYFPRINTF fprintf
1052
+ # endif
1053
+
1054
+ # define YYDPRINTF(Args) \
1055
+ do { \
1056
+ if (yydebug) \
1057
+ YYFPRINTF Args; \
1058
+ } while (0)
1059
+
1060
+
1061
+ /* YY_LOCATION_PRINT -- Print the location on the stream.
1062
+ This macro was not mandated originally: define only if we know
1063
+ we won't break user code: when these are the locations we know. */
1064
+
1065
+ #ifndef YY_LOCATION_PRINT
1066
+ # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1067
+
1068
+ /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1069
+
1070
+ YY_ATTRIBUTE_UNUSED
1071
+ static unsigned
1072
+ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1073
+ {
1074
+ unsigned res = 0;
1075
+ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1076
+ if (0 <= yylocp->first_line)
1077
+ {
1078
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1079
+ if (0 <= yylocp->first_column)
1080
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1081
+ }
1082
+ if (0 <= yylocp->last_line)
1083
+ {
1084
+ if (yylocp->first_line < yylocp->last_line)
1085
+ {
1086
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1087
+ if (0 <= end_col)
1088
+ res += YYFPRINTF (yyo, ".%d", end_col);
1089
+ }
1090
+ else if (0 <= end_col && yylocp->first_column < end_col)
1091
+ res += YYFPRINTF (yyo, "-%d", end_col);
1092
+ }
1093
+ return res;
1094
+ }
1095
+
1096
+ # define YY_LOCATION_PRINT(File, Loc) \
1097
+ yy_location_print_ (File, &(Loc))
1098
+
1099
+ # else
1100
+ # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1101
+ # endif
1102
+ #endif
1103
+
1104
+
1105
+ # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1106
+ do { \
1107
+ if (yydebug) \
1108
+ { \
1109
+ YYFPRINTF (stderr, "%s ", Title); \
1110
+ yy_symbol_print (stderr, \
1111
+ Type, Value, Location, scanner, filename, tree); \
1112
+ YYFPRINTF (stderr, "\n"); \
1113
+ } \
1114
+ } while (0)
1115
+
1116
+
1117
+ /*----------------------------------------.
1118
+ | Print this symbol's value on YYOUTPUT. |
1119
+ `----------------------------------------*/
1120
+
1121
+ static void
1122
+ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, VALUE filename, VALUE *tree)
1123
+ {
1124
+ FILE *yyo = yyoutput;
1125
+ YYUSE (yyo);
1126
+ YYUSE (yylocationp);
1127
+ YYUSE (scanner);
1128
+ YYUSE (filename);
1129
+ YYUSE (tree);
1130
+ if (!yyvaluep)
1131
+ return;
1132
+ # ifdef YYPRINT
1133
+ if (yytype < YYNTOKENS)
1134
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1135
+ # endif
1136
+ YYUSE (yytype);
1137
+ }
1138
+
1139
+
1140
+ /*--------------------------------.
1141
+ | Print this symbol on YYOUTPUT. |
1142
+ `--------------------------------*/
1143
+
1144
+ static void
1145
+ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, VALUE filename, VALUE *tree)
1146
+ {
1147
+ YYFPRINTF (yyoutput, "%s %s (",
1148
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1149
+
1150
+ YY_LOCATION_PRINT (yyoutput, *yylocationp);
1151
+ YYFPRINTF (yyoutput, ": ");
1152
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner, filename, tree);
1153
+ YYFPRINTF (yyoutput, ")");
1154
+ }
1155
+
1156
+ /*------------------------------------------------------------------.
1157
+ | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1158
+ | TOP (included). |
1159
+ `------------------------------------------------------------------*/
1160
+
1161
+ static void
1162
+ yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1163
+ {
1164
+ YYFPRINTF (stderr, "Stack now");
1165
+ for (; yybottom <= yytop; yybottom++)
1166
+ {
1167
+ int yybot = *yybottom;
1168
+ YYFPRINTF (stderr, " %d", yybot);
1169
+ }
1170
+ YYFPRINTF (stderr, "\n");
1171
+ }
1172
+
1173
+ # define YY_STACK_PRINT(Bottom, Top) \
1174
+ do { \
1175
+ if (yydebug) \
1176
+ yy_stack_print ((Bottom), (Top)); \
1177
+ } while (0)
1178
+
1179
+
1180
+ /*------------------------------------------------.
1181
+ | Report that the YYRULE is going to be reduced. |
1182
+ `------------------------------------------------*/
1183
+
1184
+ static void
1185
+ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, yyscan_t scanner, VALUE filename, VALUE *tree)
1186
+ {
1187
+ unsigned long int yylno = yyrline[yyrule];
1188
+ int yynrhs = yyr2[yyrule];
1189
+ int yyi;
1190
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1191
+ yyrule - 1, yylno);
1192
+ /* The symbols being reduced. */
1193
+ for (yyi = 0; yyi < yynrhs; yyi++)
1194
+ {
1195
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
1196
+ yy_symbol_print (stderr,
1197
+ yystos[yyssp[yyi + 1 - yynrhs]],
1198
+ &(yyvsp[(yyi + 1) - (yynrhs)])
1199
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner, filename, tree);
1200
+ YYFPRINTF (stderr, "\n");
1201
+ }
1202
+ }
1203
+
1204
+ # define YY_REDUCE_PRINT(Rule) \
1205
+ do { \
1206
+ if (yydebug) \
1207
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule, scanner, filename, tree); \
1208
+ } while (0)
1209
+
1210
+ /* Nonzero means print parse trace. It is left uninitialized so that
1211
+ multiple parsers can coexist. */
1212
+ int yydebug;
1213
+ #else /* !YYDEBUG */
1214
+ # define YYDPRINTF(Args)
1215
+ # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1216
+ # define YY_STACK_PRINT(Bottom, Top)
1217
+ # define YY_REDUCE_PRINT(Rule)
1218
+ #endif /* !YYDEBUG */
1219
+
1220
+
1221
+ /* YYINITDEPTH -- initial size of the parser's stacks. */
1222
+ #ifndef YYINITDEPTH
1223
+ # define YYINITDEPTH 200
1224
+ #endif
1225
+
1226
+ /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1227
+ if the built-in stack extension method is used).
1228
+
1229
+ Do not make this value too large; the results are undefined if
1230
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1231
+ evaluated with infinite-precision integer arithmetic. */
1232
+
1233
+ #ifndef YYMAXDEPTH
1234
+ # define YYMAXDEPTH 10000
1235
+ #endif
1236
+
1237
+
1238
+ #if YYERROR_VERBOSE
1239
+
1240
+ # ifndef yystrlen
1241
+ # if defined __GLIBC__ && defined _STRING_H
1242
+ # define yystrlen strlen
1243
+ # else
1244
+ /* Return the length of YYSTR. */
1245
+ static YYSIZE_T
1246
+ yystrlen (const char *yystr)
1247
+ {
1248
+ YYSIZE_T yylen;
1249
+ for (yylen = 0; yystr[yylen]; yylen++)
1250
+ continue;
1251
+ return yylen;
1252
+ }
1253
+ # endif
1254
+ # endif
1255
+
1256
+ # ifndef yystpcpy
1257
+ # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1258
+ # define yystpcpy stpcpy
1259
+ # else
1260
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1261
+ YYDEST. */
1262
+ static char *
1263
+ yystpcpy (char *yydest, const char *yysrc)
1264
+ {
1265
+ char *yyd = yydest;
1266
+ const char *yys = yysrc;
1267
+
1268
+ while ((*yyd++ = *yys++) != '\0')
1269
+ continue;
1270
+
1271
+ return yyd - 1;
1272
+ }
1273
+ # endif
1274
+ # endif
1275
+
1276
+ # ifndef yytnamerr
1277
+ /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1278
+ quotes and backslashes, so that it's suitable for yyerror. The
1279
+ heuristic is that double-quoting is unnecessary unless the string
1280
+ contains an apostrophe, a comma, or backslash (other than
1281
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
1282
+ null, do not copy; instead, return the length of what the result
1283
+ would have been. */
1284
+ static YYSIZE_T
1285
+ yytnamerr (char *yyres, const char *yystr)
1286
+ {
1287
+ if (*yystr == '"')
1288
+ {
1289
+ YYSIZE_T yyn = 0;
1290
+ char const *yyp = yystr;
1291
+
1292
+ for (;;)
1293
+ switch (*++yyp)
1294
+ {
1295
+ case '\'':
1296
+ case ',':
1297
+ goto do_not_strip_quotes;
1298
+
1299
+ case '\\':
1300
+ if (*++yyp != '\\')
1301
+ goto do_not_strip_quotes;
1302
+ /* Fall through. */
1303
+ default:
1304
+ if (yyres)
1305
+ yyres[yyn] = *yyp;
1306
+ yyn++;
1307
+ break;
1308
+
1309
+ case '"':
1310
+ if (yyres)
1311
+ yyres[yyn] = '\0';
1312
+ return yyn;
1313
+ }
1314
+ do_not_strip_quotes: ;
1315
+ }
1316
+
1317
+ if (! yyres)
1318
+ return yystrlen (yystr);
1319
+
1320
+ return yystpcpy (yyres, yystr) - yyres;
1321
+ }
1322
+ # endif
1323
+
1324
+ /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1325
+ about the unexpected token YYTOKEN for the state stack whose top is
1326
+ YYSSP.
1327
+
1328
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1329
+ not large enough to hold the message. In that case, also set
1330
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1331
+ required number of bytes is too large to store. */
1332
+ static int
1333
+ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1334
+ yytype_int16 *yyssp, int yytoken)
1335
+ {
1336
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1337
+ YYSIZE_T yysize = yysize0;
1338
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1339
+ /* Internationalized format string. */
1340
+ const char *yyformat = YY_NULLPTR;
1341
+ /* Arguments of yyformat. */
1342
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1343
+ /* Number of reported tokens (one for the "unexpected", one per
1344
+ "expected"). */
1345
+ int yycount = 0;
1346
+
1347
+ /* There are many possibilities here to consider:
1348
+ - If this state is a consistent state with a default action, then
1349
+ the only way this function was invoked is if the default action
1350
+ is an error action. In that case, don't check for expected
1351
+ tokens because there are none.
1352
+ - The only way there can be no lookahead present (in yychar) is if
1353
+ this state is a consistent state with a default action. Thus,
1354
+ detecting the absence of a lookahead is sufficient to determine
1355
+ that there is no unexpected or expected token to report. In that
1356
+ case, just report a simple "syntax error".
1357
+ - Don't assume there isn't a lookahead just because this state is a
1358
+ consistent state with a default action. There might have been a
1359
+ previous inconsistent state, consistent state with a non-default
1360
+ action, or user semantic action that manipulated yychar.
1361
+ - Of course, the expected token list depends on states to have
1362
+ correct lookahead information, and it depends on the parser not
1363
+ to perform extra reductions after fetching a lookahead from the
1364
+ scanner and before detecting a syntax error. Thus, state merging
1365
+ (from LALR or IELR) and default reductions corrupt the expected
1366
+ token list. However, the list is correct for canonical LR with
1367
+ one exception: it will still contain any token that will not be
1368
+ accepted due to an error action in a later state.
1369
+ */
1370
+ if (yytoken != YYEMPTY)
1371
+ {
1372
+ int yyn = yypact[*yyssp];
1373
+ yyarg[yycount++] = yytname[yytoken];
1374
+ if (!yypact_value_is_default (yyn))
1375
+ {
1376
+ /* Start YYX at -YYN if negative to avoid negative indexes in
1377
+ YYCHECK. In other words, skip the first -YYN actions for
1378
+ this state because they are default actions. */
1379
+ int yyxbegin = yyn < 0 ? -yyn : 0;
1380
+ /* Stay within bounds of both yycheck and yytname. */
1381
+ int yychecklim = YYLAST - yyn + 1;
1382
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1383
+ int yyx;
1384
+
1385
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1386
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1387
+ && !yytable_value_is_error (yytable[yyx + yyn]))
1388
+ {
1389
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1390
+ {
1391
+ yycount = 1;
1392
+ yysize = yysize0;
1393
+ break;
1394
+ }
1395
+ yyarg[yycount++] = yytname[yyx];
1396
+ {
1397
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1398
+ if (! (yysize <= yysize1
1399
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1400
+ return 2;
1401
+ yysize = yysize1;
1402
+ }
1403
+ }
1404
+ }
1405
+ }
1406
+
1407
+ switch (yycount)
1408
+ {
1409
+ # define YYCASE_(N, S) \
1410
+ case N: \
1411
+ yyformat = S; \
1412
+ break
1413
+ YYCASE_(0, YY_("syntax error"));
1414
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
1415
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1416
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1417
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1418
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1419
+ # undef YYCASE_
1420
+ }
1421
+
1422
+ {
1423
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1424
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1425
+ return 2;
1426
+ yysize = yysize1;
1427
+ }
1428
+
1429
+ if (*yymsg_alloc < yysize)
1430
+ {
1431
+ *yymsg_alloc = 2 * yysize;
1432
+ if (! (yysize <= *yymsg_alloc
1433
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1434
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1435
+ return 1;
1436
+ }
1437
+
1438
+ /* Avoid sprintf, as that infringes on the user's name space.
1439
+ Don't have undefined behavior even if the translation
1440
+ produced a string with the wrong number of "%s"s. */
1441
+ {
1442
+ char *yyp = *yymsg;
1443
+ int yyi = 0;
1444
+ while ((*yyp = *yyformat) != '\0')
1445
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1446
+ {
1447
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
1448
+ yyformat += 2;
1449
+ }
1450
+ else
1451
+ {
1452
+ yyp++;
1453
+ yyformat++;
1454
+ }
1455
+ }
1456
+ return 0;
1457
+ }
1458
+ #endif /* YYERROR_VERBOSE */
1459
+
1460
+ /*-----------------------------------------------.
1461
+ | Release the memory associated to this symbol. |
1462
+ `-----------------------------------------------*/
1463
+
1464
+ static void
1465
+ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, yyscan_t scanner, VALUE filename, VALUE *tree)
1466
+ {
1467
+ YYUSE (yyvaluep);
1468
+ YYUSE (yylocationp);
1469
+ YYUSE (scanner);
1470
+ YYUSE (filename);
1471
+ YYUSE (tree);
1472
+ if (!yymsg)
1473
+ yymsg = "Deleting";
1474
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1475
+
1476
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1477
+ YYUSE (yytype);
1478
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
1479
+ }
1480
+
1481
+
1482
+
1483
+
1484
+ /*----------.
1485
+ | yyparse. |
1486
+ `----------*/
1487
+
1488
+ int
1489
+ yyparse (yyscan_t scanner, VALUE filename, VALUE *tree)
1490
+ {
1491
+ /* The lookahead symbol. */
1492
+ int yychar;
1493
+
1494
+
1495
+ /* The semantic value of the lookahead symbol. */
1496
+ /* Default value used for initialization, for pacifying older GCCs
1497
+ or non-GCC compilers. */
1498
+ YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1499
+ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1500
+
1501
+ /* Location data for the lookahead symbol. */
1502
+ static YYLTYPE yyloc_default
1503
+ # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1504
+ = { 1, 1, 1, 1 }
1505
+ # endif
1506
+ ;
1507
+ YYLTYPE yylloc = yyloc_default;
1508
+
1509
+ /* Number of syntax errors so far. */
1510
+ int yynerrs;
1511
+
1512
+ int yystate;
1513
+ /* Number of tokens to shift before error messages enabled. */
1514
+ int yyerrstatus;
1515
+
1516
+ /* The stacks and their tools:
1517
+ 'yyss': related to states.
1518
+ 'yyvs': related to semantic values.
1519
+ 'yyls': related to locations.
1520
+
1521
+ Refer to the stacks through separate pointers, to allow yyoverflow
1522
+ to reallocate them elsewhere. */
1523
+
1524
+ /* The state stack. */
1525
+ yytype_int16 yyssa[YYINITDEPTH];
1526
+ yytype_int16 *yyss;
1527
+ yytype_int16 *yyssp;
1528
+
1529
+ /* The semantic value stack. */
1530
+ YYSTYPE yyvsa[YYINITDEPTH];
1531
+ YYSTYPE *yyvs;
1532
+ YYSTYPE *yyvsp;
1533
+
1534
+ /* The location stack. */
1535
+ YYLTYPE yylsa[YYINITDEPTH];
1536
+ YYLTYPE *yyls;
1537
+ YYLTYPE *yylsp;
1538
+
1539
+ /* The locations where the error started and ended. */
1540
+ YYLTYPE yyerror_range[3];
1541
+
1542
+ YYSIZE_T yystacksize;
1543
+
1544
+ int yyn;
1545
+ int yyresult;
1546
+ /* Lookahead token as an internal (translated) token number. */
1547
+ int yytoken = 0;
1548
+ /* The variables used to return semantic value and location from the
1549
+ action routines. */
1550
+ YYSTYPE yyval;
1551
+ YYLTYPE yyloc;
1552
+
1553
+ #if YYERROR_VERBOSE
1554
+ /* Buffer for error messages, and its allocated size. */
1555
+ char yymsgbuf[128];
1556
+ char *yymsg = yymsgbuf;
1557
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1558
+ #endif
1559
+
1560
+ #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1561
+
1562
+ /* The number of symbols on the RHS of the reduced rule.
1563
+ Keep to zero when no symbol should be popped. */
1564
+ int yylen = 0;
1565
+
1566
+ yyssp = yyss = yyssa;
1567
+ yyvsp = yyvs = yyvsa;
1568
+ yylsp = yyls = yylsa;
1569
+ yystacksize = YYINITDEPTH;
1570
+
1571
+ YYDPRINTF ((stderr, "Starting parse\n"));
1572
+
1573
+ yystate = 0;
1574
+ yyerrstatus = 0;
1575
+ yynerrs = 0;
1576
+ yychar = YYEMPTY; /* Cause a token to be read. */
1577
+ yylsp[0] = yylloc;
1578
+ goto yysetstate;
1579
+
1580
+ /*------------------------------------------------------------.
1581
+ | yynewstate -- Push a new state, which is found in yystate. |
1582
+ `------------------------------------------------------------*/
1583
+ yynewstate:
1584
+ /* In all cases, when you get here, the value and location stacks
1585
+ have just been pushed. So pushing a state here evens the stacks. */
1586
+ yyssp++;
1587
+
1588
+ yysetstate:
1589
+ *yyssp = yystate;
1590
+
1591
+ if (yyss + yystacksize - 1 <= yyssp)
1592
+ {
1593
+ /* Get the current used size of the three stacks, in elements. */
1594
+ YYSIZE_T yysize = yyssp - yyss + 1;
1595
+
1596
+ #ifdef yyoverflow
1597
+ {
1598
+ /* Give user a chance to reallocate the stack. Use copies of
1599
+ these so that the &'s don't force the real ones into
1600
+ memory. */
1601
+ YYSTYPE *yyvs1 = yyvs;
1602
+ yytype_int16 *yyss1 = yyss;
1603
+ YYLTYPE *yyls1 = yyls;
1604
+
1605
+ /* Each stack pointer address is followed by the size of the
1606
+ data in use in that stack, in bytes. This used to be a
1607
+ conditional around just the two extra args, but that might
1608
+ be undefined if yyoverflow is a macro. */
1609
+ yyoverflow (YY_("memory exhausted"),
1610
+ &yyss1, yysize * sizeof (*yyssp),
1611
+ &yyvs1, yysize * sizeof (*yyvsp),
1612
+ &yyls1, yysize * sizeof (*yylsp),
1613
+ &yystacksize);
1614
+
1615
+ yyls = yyls1;
1616
+ yyss = yyss1;
1617
+ yyvs = yyvs1;
1618
+ }
1619
+ #else /* no yyoverflow */
1620
+ # ifndef YYSTACK_RELOCATE
1621
+ goto yyexhaustedlab;
1622
+ # else
1623
+ /* Extend the stack our own way. */
1624
+ if (YYMAXDEPTH <= yystacksize)
1625
+ goto yyexhaustedlab;
1626
+ yystacksize *= 2;
1627
+ if (YYMAXDEPTH < yystacksize)
1628
+ yystacksize = YYMAXDEPTH;
1629
+
1630
+ {
1631
+ yytype_int16 *yyss1 = yyss;
1632
+ union yyalloc *yyptr =
1633
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1634
+ if (! yyptr)
1635
+ goto yyexhaustedlab;
1636
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
1637
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1638
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
1639
+ # undef YYSTACK_RELOCATE
1640
+ if (yyss1 != yyssa)
1641
+ YYSTACK_FREE (yyss1);
1642
+ }
1643
+ # endif
1644
+ #endif /* no yyoverflow */
1645
+
1646
+ yyssp = yyss + yysize - 1;
1647
+ yyvsp = yyvs + yysize - 1;
1648
+ yylsp = yyls + yysize - 1;
1649
+
1650
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1651
+ (unsigned long int) yystacksize));
1652
+
1653
+ if (yyss + yystacksize - 1 <= yyssp)
1654
+ YYABORT;
1655
+ }
1656
+
1657
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1658
+
1659
+ if (yystate == YYFINAL)
1660
+ YYACCEPT;
1661
+
1662
+ goto yybackup;
1663
+
1664
+ /*-----------.
1665
+ | yybackup. |
1666
+ `-----------*/
1667
+ yybackup:
1668
+
1669
+ /* Do appropriate processing given the current state. Read a
1670
+ lookahead token if we need one and don't already have one. */
1671
+
1672
+ /* First try to decide what to do without reference to lookahead token. */
1673
+ yyn = yypact[yystate];
1674
+ if (yypact_value_is_default (yyn))
1675
+ goto yydefault;
1676
+
1677
+ /* Not known => get a lookahead token if don't already have one. */
1678
+
1679
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1680
+ if (yychar == YYEMPTY)
1681
+ {
1682
+ YYDPRINTF ((stderr, "Reading a token: "));
1683
+ yychar = yylex (&yylval, &yylloc, scanner);
1684
+ }
1685
+
1686
+ if (yychar <= YYEOF)
1687
+ {
1688
+ yychar = yytoken = YYEOF;
1689
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
1690
+ }
1691
+ else
1692
+ {
1693
+ yytoken = YYTRANSLATE (yychar);
1694
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1695
+ }
1696
+
1697
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
1698
+ detect an error, take that action. */
1699
+ yyn += yytoken;
1700
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1701
+ goto yydefault;
1702
+ yyn = yytable[yyn];
1703
+ if (yyn <= 0)
1704
+ {
1705
+ if (yytable_value_is_error (yyn))
1706
+ goto yyerrlab;
1707
+ yyn = -yyn;
1708
+ goto yyreduce;
1709
+ }
1710
+
1711
+ /* Count tokens shifted since error; after three, turn off error
1712
+ status. */
1713
+ if (yyerrstatus)
1714
+ yyerrstatus--;
1715
+
1716
+ /* Shift the lookahead token. */
1717
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1718
+
1719
+ /* Discard the shifted token. */
1720
+ yychar = YYEMPTY;
1721
+
1722
+ yystate = yyn;
1723
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1724
+ *++yyvsp = yylval;
1725
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
1726
+ *++yylsp = yylloc;
1727
+ goto yynewstate;
1728
+
1729
+
1730
+ /*-----------------------------------------------------------.
1731
+ | yydefault -- do the default action for the current state. |
1732
+ `-----------------------------------------------------------*/
1733
+ yydefault:
1734
+ yyn = yydefact[yystate];
1735
+ if (yyn == 0)
1736
+ goto yyerrlab;
1737
+ goto yyreduce;
1738
+
1739
+
1740
+ /*-----------------------------.
1741
+ | yyreduce -- Do a reduction. |
1742
+ `-----------------------------*/
1743
+ yyreduce:
1744
+ /* yyn is the number of a rule to reduce with. */
1745
+ yylen = yyr2[yyn];
1746
+
1747
+ /* If YYLEN is nonzero, implement the default value of the action:
1748
+ '$$ = $1'.
1749
+
1750
+ Otherwise, the following line sets YYVAL to garbage.
1751
+ This behavior is undocumented and Bison
1752
+ users should not rely upon it. Assigning to YYVAL
1753
+ unconditionally makes the parser a bit smaller, and it avoids a
1754
+ GCC warning that YYVAL may be used uninitialized. */
1755
+ yyval = yyvsp[1-yylen];
1756
+
1757
+ /* Default location. */
1758
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1759
+ YY_REDUCE_PRINT (yyn);
1760
+ switch (yyn)
1761
+ {
1762
+ case 2:
1763
+ #line 188 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1764
+ {
1765
+ *tree = rb_ary_new();
1766
+ }
1767
+ #line 1768 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1768
+ break;
1769
+
1770
+ case 3:
1771
+ #line 192 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1772
+ {
1773
+ *tree = (yyvsp[0]);
1774
+ }
1775
+ #line 1776 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1776
+ break;
1777
+
1778
+ case 4:
1779
+ #line 199 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1780
+ {
1781
+ (yyval) = Qnil;
1782
+ }
1783
+ #line 1784 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1784
+ break;
1785
+
1786
+ case 11:
1787
+ #line 226 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1788
+ {
1789
+ (yyval) = (yyvsp[-1]);
1790
+ rb_ary_push((yyval), (yyvsp[0]));
1791
+ }
1792
+ #line 1793 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1793
+ break;
1794
+
1795
+ case 12:
1796
+ #line 232 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1797
+ {
1798
+ (yyval) = rb_ary_new3(1, (yyvsp[0]));
1799
+ }
1800
+ #line 1801 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1801
+ break;
1802
+
1803
+ case 15:
1804
+ #line 245 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1805
+ {
1806
+ (yyval) = (yyvsp[-1]);
1807
+ rb_hash_aset((yyval), ID2SYM(rb_intern("id")), (yyvsp[-4]));
1808
+ rb_hash_aset((yyval), ID2SYM(rb_intern("tag")), (yyvsp[-2]));
1809
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
1810
+ rb_hash_aset((yyval), ID2SYM(rb_intern("constraint")), (yyvsp[0]));
1811
+ }
1812
+ #line 1813 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1813
+ break;
1814
+
1815
+ case 16:
1816
+ #line 256 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1817
+ {
1818
+ (yyval) = (yyvsp[0]);
1819
+ rb_hash_aset((yyval), ID2SYM(rb_intern("id")), (yyvsp[-3]));
1820
+ rb_hash_aset((yyval), ID2SYM(rb_intern("governor")), (yyvsp[-2]));
1821
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
1822
+ }
1823
+ #line 1824 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1824
+ break;
1825
+
1826
+ case 17:
1827
+ #line 268 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1828
+ {
1829
+ (yyval) = rb_hash_new();
1830
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("BuiltinValue")));
1831
+ rb_hash_aset((yyval), ID2SYM(rb_intern("value")), (yyvsp[0]));
1832
+ }
1833
+ #line 1834 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1834
+ break;
1835
+
1836
+ case 18:
1837
+ #line 275 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1838
+ {
1839
+ (yyval) = rb_hash_new();
1840
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("DefinedValue")));
1841
+ rb_hash_aset((yyval), ID2SYM(rb_intern("ref")), (yyvsp[0]));
1842
+ }
1843
+ #line 1844 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1844
+ break;
1845
+
1846
+ case 45:
1847
+ #line 358 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1848
+ {
1849
+ (yyval) = rb_hash_new();
1850
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("CharacterString")));
1851
+ }
1852
+ #line 1853 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1853
+ break;
1854
+
1855
+ case 46:
1856
+ #line 366 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1857
+ {
1858
+ (yyval) = rb_hash_new();
1859
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("BMPString")));
1860
+ }
1861
+ #line 1862 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1862
+ break;
1863
+
1864
+ case 47:
1865
+ #line 372 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1866
+ {
1867
+ (yyval) = rb_hash_new();
1868
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("GeneralString")));
1869
+ }
1870
+ #line 1871 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1871
+ break;
1872
+
1873
+ case 48:
1874
+ #line 378 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1875
+ {
1876
+ (yyval) = rb_hash_new();
1877
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("GraphicString")));
1878
+ }
1879
+ #line 1880 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1880
+ break;
1881
+
1882
+ case 49:
1883
+ #line 384 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1884
+ {
1885
+ (yyval) = rb_hash_new();
1886
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("IA5String")));
1887
+ }
1888
+ #line 1889 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1889
+ break;
1890
+
1891
+ case 50:
1892
+ #line 390 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1893
+ {
1894
+ (yyval) = rb_hash_new();
1895
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("ISO646String")));
1896
+ }
1897
+ #line 1898 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1898
+ break;
1899
+
1900
+ case 51:
1901
+ #line 396 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1902
+ {
1903
+ (yyval) = rb_hash_new();
1904
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("NumericString")));
1905
+ }
1906
+ #line 1907 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1907
+ break;
1908
+
1909
+ case 52:
1910
+ #line 402 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1911
+ {
1912
+ (yyval) = rb_hash_new();
1913
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("PrintableString")));
1914
+ }
1915
+ #line 1916 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1916
+ break;
1917
+
1918
+ case 53:
1919
+ #line 408 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1920
+ {
1921
+ (yyval) = rb_hash_new();
1922
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("TeletexString")));
1923
+ }
1924
+ #line 1925 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1925
+ break;
1926
+
1927
+ case 54:
1928
+ #line 414 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1929
+ {
1930
+ (yyval) = rb_hash_new();
1931
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("T61String")));
1932
+ }
1933
+ #line 1934 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1934
+ break;
1935
+
1936
+ case 55:
1937
+ #line 420 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1938
+ {
1939
+ (yyval) = rb_hash_new();
1940
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("UniversalString")));
1941
+ }
1942
+ #line 1943 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1943
+ break;
1944
+
1945
+ case 56:
1946
+ #line 426 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1947
+ {
1948
+ (yyval) = rb_hash_new();
1949
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("UTF8String")));
1950
+ }
1951
+ #line 1952 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1952
+ break;
1953
+
1954
+ case 57:
1955
+ #line 432 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1956
+ {
1957
+ (yyval) = rb_hash_new();
1958
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("VideotexString")));
1959
+ }
1960
+ #line 1961 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1961
+ break;
1962
+
1963
+ case 58:
1964
+ #line 438 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1965
+ {
1966
+ (yyval) = rb_hash_new();
1967
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("VisibleString")));
1968
+ }
1969
+ #line 1970 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1970
+ break;
1971
+
1972
+ case 59:
1973
+ #line 448 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1974
+ {
1975
+ (yyval) = rb_hash_new();
1976
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("DefinedType")));
1977
+ rb_hash_aset((yyval), ID2SYM(rb_intern("ref")), (yyvsp[0]));
1978
+ }
1979
+ #line 1980 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1980
+ break;
1981
+
1982
+ case 60:
1983
+ #line 459 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1984
+ {
1985
+ (yyval) = rb_hash_new();
1986
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("BOOLEAN")));
1987
+ }
1988
+ #line 1989 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1989
+ break;
1990
+
1991
+ case 61:
1992
+ #line 469 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
1993
+ {
1994
+ (yyval) = rb_hash_new();
1995
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("INTEGER")));
1996
+ }
1997
+ #line 1998 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
1998
+ break;
1999
+
2000
+ case 62:
2001
+ #line 475 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2002
+ {
2003
+ (yyval) = rb_hash_new();
2004
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("INTEGER")));
2005
+ rb_hash_aset((yyval), ID2SYM(rb_intern("numberList")), (yyvsp[-1]));
2006
+ }
2007
+ #line 2008 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2008
+ break;
2009
+
2010
+ case 63:
2011
+ #line 484 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2012
+ {
2013
+ (yyval) = rb_ary_new();
2014
+ rb_ary_push((yyval), (yyvsp[0]));
2015
+ }
2016
+ #line 2017 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2017
+ break;
2018
+
2019
+ case 64:
2020
+ #line 490 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2021
+ {
2022
+ rb_ary_push((yyval), (yyvsp[0]));
2023
+ }
2024
+ #line 2025 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2025
+ break;
2026
+
2027
+ case 65:
2028
+ #line 497 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2029
+ {
2030
+ (yyval) = rb_hash_new();
2031
+ rb_hash_aset((yyval), ID2SYM(rb_intern("id")), (yyvsp[-3]));
2032
+ rb_hash_aset((yyval), ID2SYM(rb_intern("number")), (yyvsp[-1]));
2033
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2034
+ }
2035
+ #line 2036 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2036
+ break;
2037
+
2038
+ case 70:
2039
+ #line 521 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2040
+ {
2041
+ (yyval) = (yyvsp[0]);
2042
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("ENUMERATED")));
2043
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("root"))), (yyvsp[-1]));
2044
+ }
2045
+ #line 2046 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2046
+ break;
2047
+
2048
+ case 71:
2049
+ #line 530 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2050
+ {
2051
+ (yyval) = rb_hash_new();
2052
+ rb_hash_aset((yyval), ID2SYM(rb_intern("root")), rb_ary_new());
2053
+ }
2054
+ #line 2055 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2055
+ break;
2056
+
2057
+ case 72:
2058
+ #line 536 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2059
+ {
2060
+ (yyval) = (yyvsp[0]);
2061
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("root"))), (yyvsp[-1]));
2062
+ }
2063
+ #line 2064 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2064
+ break;
2065
+
2066
+ case 73:
2067
+ #line 542 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2068
+ {
2069
+ (yyval) = (yyvsp[0]);
2070
+ rb_hash_aset((yyval), ID2SYM(rb_intern("extensible")), Qtrue);
2071
+ rb_hash_aset((yyval), ID2SYM(rb_intern("exceptionSpec")), (yyvsp[-1]));
2072
+ }
2073
+ #line 2074 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2074
+ break;
2075
+
2076
+ case 74:
2077
+ #line 551 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2078
+ {
2079
+ (yyval) = rb_hash_new();
2080
+ rb_hash_aset((yyval), ID2SYM(rb_intern("additional")), rb_ary_new());
2081
+ rb_hash_aset((yyval), ID2SYM(rb_intern("root")), rb_ary_new());
2082
+ }
2083
+ #line 2084 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2084
+ break;
2085
+
2086
+ case 75:
2087
+ #line 558 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2088
+ {
2089
+ (yyval) = (yyvsp[0]);
2090
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("additional"))), (yyvsp[-1]));
2091
+ }
2092
+ #line 2093 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2093
+ break;
2094
+
2095
+ case 76:
2096
+ #line 566 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2097
+ {
2098
+ (yyval) = rb_hash_new();
2099
+ rb_hash_aset((yyval), ID2SYM(rb_intern("id")), (yyvsp[0]));
2100
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2101
+ }
2102
+ #line 2103 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2103
+ break;
2104
+
2105
+ case 78:
2106
+ #line 579 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2107
+ {
2108
+ (yyval) = rb_hash_new();
2109
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("REAL")));
2110
+ }
2111
+ #line 2112 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2112
+ break;
2113
+
2114
+ case 79:
2115
+ #line 589 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2116
+ {
2117
+ (yyval) = rb_hash_new();
2118
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("BITSTRING")));
2119
+ rb_hash_aset((yyval), ID2SYM(rb_intern("bitList")), rb_ary_new());
2120
+ }
2121
+ #line 2122 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2122
+ break;
2123
+
2124
+ case 80:
2125
+ #line 596 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2126
+ {
2127
+ (yyval) = rb_hash_new();
2128
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("BITSTRING")));
2129
+ rb_hash_aset((yyval), ID2SYM(rb_intern("bitList")), (yyvsp[-1]));
2130
+ }
2131
+ #line 2132 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2132
+ break;
2133
+
2134
+ case 81:
2135
+ #line 607 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2136
+ {
2137
+ (yyval) = rb_hash_new();
2138
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("OCTETSTRING")));
2139
+ }
2140
+ #line 2141 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2141
+ break;
2142
+
2143
+ case 82:
2144
+ #line 617 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2145
+ {
2146
+ (yyval) = rb_hash_new();
2147
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("NULL")));
2148
+ }
2149
+ #line 2150 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2150
+ break;
2151
+
2152
+ case 83:
2153
+ #line 627 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2154
+ {
2155
+ (yyval) = (yyvsp[0]);
2156
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("SEQUENCE")));
2157
+ }
2158
+ #line 2159 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2159
+ break;
2160
+
2161
+ case 84:
2162
+ #line 635 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2163
+ {
2164
+ (yyval) = rb_hash_new();
2165
+ }
2166
+ #line 2167 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2167
+ break;
2168
+
2169
+ case 85:
2170
+ #line 640 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2171
+ {
2172
+ (yyval) = (yyvsp[0]);
2173
+ rb_hash_aset((yyval), ID2SYM(rb_intern("extensible")), Qtrue);
2174
+ rb_hash_aset((yyval), ID2SYM(rb_intern("exceptionSpec")), (yyvsp[-1]));
2175
+ }
2176
+ #line 2177 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2177
+ break;
2178
+
2179
+ case 86:
2180
+ #line 647 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2181
+ {
2182
+ (yyval) = (yyvsp[0]);
2183
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("head"))), (yyvsp[-1]));
2184
+ }
2185
+ #line 2186 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2186
+ break;
2187
+
2188
+ case 87:
2189
+ #line 655 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2190
+ {
2191
+ (yyval) = rb_hash_new();
2192
+ rb_hash_aset((yyval), ID2SYM(rb_intern("head")), rb_ary_new());
2193
+ }
2194
+ #line 2195 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2195
+ break;
2196
+
2197
+ case 88:
2198
+ #line 661 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2199
+ {
2200
+ (yyval) = (yyvsp[0]);
2201
+ rb_hash_aset((yyval), ID2SYM(rb_intern("extensible")), Qtrue);
2202
+ rb_hash_aset((yyval), ID2SYM(rb_intern("exceptionSpec")), (yyvsp[-1]));
2203
+ }
2204
+ #line 2205 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2205
+ break;
2206
+
2207
+ case 89:
2208
+ #line 668 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2209
+ {
2210
+ (yyval) = (yyvsp[0]);
2211
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("head"))), (yyvsp[-1]));
2212
+ }
2213
+ #line 2214 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2214
+ break;
2215
+
2216
+ case 90:
2217
+ #line 676 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2218
+ {
2219
+ (yyval) = rb_hash_new();
2220
+ rb_hash_aset((yyval), ID2SYM(rb_intern("head")), rb_ary_new());
2221
+ }
2222
+ #line 2223 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2223
+ break;
2224
+
2225
+ case 91:
2226
+ #line 682 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2227
+ {
2228
+ (yyval) = (yyvsp[0]);
2229
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("additional"))), (yyvsp[-1]));
2230
+ }
2231
+ #line 2232 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2232
+ break;
2233
+
2234
+ case 92:
2235
+ #line 690 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2236
+ {
2237
+ (yyval) = rb_hash_new();
2238
+ rb_hash_aset((yyval), ID2SYM(rb_intern("additional")), rb_ary_new());
2239
+ rb_hash_aset((yyval), ID2SYM(rb_intern("head")), rb_ary_new());
2240
+ }
2241
+ #line 2242 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2242
+ break;
2243
+
2244
+ case 93:
2245
+ #line 697 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2246
+ {
2247
+ (yyval) = rb_hash_new();
2248
+ rb_hash_aset((yyval), ID2SYM(rb_intern("additional")), rb_ary_new());
2249
+ rb_hash_aset((yyval), ID2SYM(rb_intern("tail")), (yyvsp[-1]));
2250
+ rb_hash_aset((yyval), ID2SYM(rb_intern("extensible")), Qtrue);
2251
+ }
2252
+ #line 2253 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2253
+ break;
2254
+
2255
+ case 94:
2256
+ #line 705 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2257
+ {
2258
+ (yyval) = (yyvsp[0]);
2259
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("additional"))), (yyvsp[-1]));
2260
+ }
2261
+ #line 2262 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2262
+ break;
2263
+
2264
+ case 96:
2265
+ #line 715 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2266
+ {
2267
+ (yyval) = rb_hash_new();
2268
+ rb_hash_aset((yyval), ID2SYM(rb_intern("version")), (yyvsp[-2]));
2269
+ rb_hash_aset((yyval), ID2SYM(rb_intern("additional")), (yyvsp[-1]));
2270
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2271
+ }
2272
+ #line 2273 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2273
+ break;
2274
+
2275
+ case 100:
2276
+ #line 733 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2277
+ {
2278
+ (yyval) = (yyvsp[0]);
2279
+ }
2280
+ #line 2281 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2281
+ break;
2282
+
2283
+ case 104:
2284
+ #line 748 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2285
+ {
2286
+ rb_hash_aset((yyval), ID2SYM(rb_intern("OPTIONAL")), Qtrue);
2287
+ }
2288
+ #line 2289 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2289
+ break;
2290
+
2291
+ case 105:
2292
+ #line 753 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2293
+ {
2294
+ rb_hash_aset((yyval), ID2SYM(rb_intern("DEFAULT")), (yyvsp[0]));
2295
+ }
2296
+ #line 2297 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2297
+ break;
2298
+
2299
+ case 106:
2300
+ #line 758 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2301
+ {
2302
+ (yyval) = Qnil;
2303
+ }
2304
+ #line 2305 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2305
+ break;
2306
+
2307
+ case 107:
2308
+ #line 765 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2309
+ {
2310
+ (yyval) = (yyvsp[-1]);
2311
+ rb_hash_aset((yyval), ID2SYM(rb_intern("id")), (yyvsp[-3]));
2312
+ rb_hash_aset((yyval), ID2SYM(rb_intern("tag")), (yyvsp[-2]));
2313
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2314
+ rb_hash_aset((yyval), ID2SYM(rb_intern("constraint")), (yyvsp[0]));
2315
+ }
2316
+ #line 2317 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2317
+ break;
2318
+
2319
+ case 108:
2320
+ #line 779 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2321
+ {
2322
+ (yyval) = (yyvsp[-1]);
2323
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("SEQUENCEOF")));
2324
+ rb_hash_aset((yyval), ID2SYM(rb_intern("type")), (yyvsp[0]));
2325
+ }
2326
+ #line 2327 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2327
+ break;
2328
+
2329
+ case 109:
2330
+ #line 787 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2331
+ {
2332
+ (yyval) = rb_hash_new();
2333
+ }
2334
+ #line 2335 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2335
+ break;
2336
+
2337
+ case 110:
2338
+ #line 792 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2339
+ {
2340
+ (yyval) = rb_hash_new();
2341
+ rb_hash_aset((yyval), ID2SYM(rb_intern("constraint")), (yyvsp[-1]));
2342
+ }
2343
+ #line 2344 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2344
+ break;
2345
+
2346
+ case 111:
2347
+ #line 798 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2348
+ {
2349
+ (yyval) = rb_hash_new();
2350
+ rb_hash_aset((yyval), ID2SYM(rb_intern("constraint")), (yyvsp[-1]));
2351
+ }
2352
+ #line 2353 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2353
+ break;
2354
+
2355
+ case 114:
2356
+ #line 815 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2357
+ {
2358
+ (yyval) = (yyvsp[0]);
2359
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("CHOICE")));
2360
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("root"))), (yyvsp[-1]));
2361
+ }
2362
+ #line 2363 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2363
+ break;
2364
+
2365
+ case 115:
2366
+ #line 824 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2367
+ {
2368
+ (yyval) = rb_hash_new();
2369
+ rb_hash_aset((yyval), ID2SYM(rb_intern("root")), rb_ary_new());
2370
+ }
2371
+ #line 2372 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2372
+ break;
2373
+
2374
+ case 116:
2375
+ #line 830 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2376
+ {
2377
+ (yyval) = (yyvsp[0]);
2378
+ rb_hash_aset((yyval), ID2SYM(rb_intern("extensible")), Qtrue);
2379
+ rb_hash_aset((yyval), ID2SYM(rb_intern("exceptionSpec")), (yyvsp[-1]));
2380
+ rb_hash_aset((yyval), ID2SYM(rb_intern("root")), rb_ary_new());
2381
+ }
2382
+ #line 2383 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2383
+ break;
2384
+
2385
+ case 117:
2386
+ #line 838 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2387
+ {
2388
+ (yyval) = (yyvsp[0]);
2389
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("root"))), (yyvsp[-1]));
2390
+ }
2391
+ #line 2392 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2392
+ break;
2393
+
2394
+ case 118:
2395
+ #line 846 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2396
+ {
2397
+ (yyval) = rb_hash_new();
2398
+ rb_hash_aset((yyval), ID2SYM(rb_intern("additional")), rb_ary_new());
2399
+ }
2400
+ #line 2401 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2401
+ break;
2402
+
2403
+ case 119:
2404
+ #line 852 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2405
+ {
2406
+ (yyval) = rb_hash_new();
2407
+ rb_hash_aset((yyval), ID2SYM(rb_intern("additional")), rb_ary_new());
2408
+ }
2409
+ #line 2410 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2410
+ break;
2411
+
2412
+ case 120:
2413
+ #line 858 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2414
+ {
2415
+ (yyval) = (yyvsp[0]);
2416
+ rb_ary_unshift(rb_hash_aref((yyval), ID2SYM(rb_intern("additional"))), (yyvsp[-1]));
2417
+ }
2418
+ #line 2419 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2419
+ break;
2420
+
2421
+ case 122:
2422
+ #line 868 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2423
+ {
2424
+ (yyval) = rb_hash_new();
2425
+ rb_hash_aset((yyval), ID2SYM(rb_intern("version")), (yyvsp[-2]));
2426
+ rb_hash_aset((yyval), ID2SYM(rb_intern("additional")), (yyvsp[-1]));
2427
+ }
2428
+ #line 2429 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2429
+ break;
2430
+
2431
+ case 123:
2432
+ #line 877 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2433
+ {
2434
+ rb_ary_push((yyval), (yyvsp[0]));
2435
+ }
2436
+ #line 2437 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2437
+ break;
2438
+
2439
+ case 124:
2440
+ #line 882 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2441
+ {
2442
+ (yyval) = rb_ary_new3(1, (yyvsp[0]));
2443
+ }
2444
+ #line 2445 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2445
+ break;
2446
+
2447
+ case 128:
2448
+ #line 899 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2449
+ {
2450
+ (yyval) = (yyvsp[-1]);
2451
+ rb_hash_aset((yyvsp[-1]), ID2SYM(rb_intern("type")), ID2SYM(rb_intern("Implicit")));
2452
+ }
2453
+ #line 2454 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2454
+ break;
2455
+
2456
+ case 129:
2457
+ #line 905 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2458
+ {
2459
+ (yyval) = (yyvsp[-1]);
2460
+ rb_hash_aset((yyvsp[-1]), ID2SYM(rb_intern("type")), ID2SYM(rb_intern("Explicit")));
2461
+ }
2462
+ #line 2463 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2463
+ break;
2464
+
2465
+ case 130:
2466
+ #line 913 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2467
+ {
2468
+ (yyval) = (yyvsp[-1]);
2469
+ }
2470
+ #line 2471 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2471
+ break;
2472
+
2473
+ case 131:
2474
+ #line 918 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2475
+ {
2476
+ (yyval) = (yyvsp[-1]);
2477
+ }
2478
+ #line 2479 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2479
+ break;
2480
+
2481
+ case 132:
2482
+ #line 925 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2483
+ {
2484
+ (yyval) = rb_hash_new();
2485
+ rb_hash_aset((yyval), ID2SYM(rb_intern("classNumber")), (yyvsp[0]));
2486
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("Universal")));
2487
+ }
2488
+ #line 2489 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2489
+ break;
2490
+
2491
+ case 133:
2492
+ #line 932 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2493
+ {
2494
+ (yyval) = rb_hash_new();
2495
+ rb_hash_aset((yyval), ID2SYM(rb_intern("classNumber")), (yyvsp[0]));
2496
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("Application")));
2497
+ }
2498
+ #line 2499 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2499
+ break;
2500
+
2501
+ case 134:
2502
+ #line 939 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2503
+ {
2504
+ (yyval) = rb_hash_new();
2505
+ rb_hash_aset((yyval), ID2SYM(rb_intern("classNumber")), (yyvsp[0]));
2506
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("Private")));
2507
+ }
2508
+ #line 2509 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2509
+ break;
2510
+
2511
+ case 135:
2512
+ #line 946 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2513
+ {
2514
+ (yyval) = rb_hash_new();
2515
+ rb_hash_aset((yyval), ID2SYM(rb_intern("classNumber")), (yyvsp[0]));
2516
+ }
2517
+ #line 2518 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2518
+ break;
2519
+
2520
+ case 138:
2521
+ #line 965 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2522
+ {
2523
+ (yyval) = (yyvsp[-1]);
2524
+ }
2525
+ #line 2526 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2526
+ break;
2527
+
2528
+ case 140:
2529
+ #line 974 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2530
+ {
2531
+ (yyval) = rb_hash_new();
2532
+ rb_hash_aset((yyval), ID2SYM(rb_intern("rootElementSetSpec")), (yyvsp[0]));
2533
+ }
2534
+ #line 2535 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2535
+ break;
2536
+
2537
+ case 141:
2538
+ #line 982 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2539
+ {
2540
+ (yyval) = rb_ary_new();
2541
+ rb_ary_push((yyval), ID2SYM(rb_intern("ALL")));
2542
+ rb_ary_push((yyval), ID2SYM(rb_intern("EXCEPT")));
2543
+ rb_ary_push((yyval), (yyvsp[0]));
2544
+ }
2545
+ #line 2546 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2546
+ break;
2547
+
2548
+ case 142:
2549
+ #line 990 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2550
+ {
2551
+ (yyval) = (yyvsp[0]);
2552
+ rb_ary_unshift((yyval), (yyvsp[-1]));
2553
+ }
2554
+ #line 2555 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2555
+ break;
2556
+
2557
+ case 143:
2558
+ #line 998 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2559
+ {
2560
+ rb_ary_unshift((yyvsp[0]), (yyvsp[-1]));
2561
+ VALUE mark = rb_hash_new();
2562
+ rb_hash_aset(mark, ID2SYM(rb_intern("class")), ID2SYM(rb_intern("UNION")));
2563
+ rb_hash_aset(mark, ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2564
+ rb_ary_unshift((yyval), mark);
2565
+ }
2566
+ #line 2567 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2567
+ break;
2568
+
2569
+ case 144:
2570
+ #line 1007 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2571
+ {
2572
+ rb_ary_unshift((yyvsp[0]), (yyvsp[-1]));
2573
+ VALUE mark = rb_hash_new();
2574
+ rb_hash_aset(mark, ID2SYM(rb_intern("class")), ID2SYM(rb_intern("INTERSECTION")));
2575
+ rb_hash_aset(mark, ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2576
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2577
+ rb_ary_unshift((yyval), mark);
2578
+ }
2579
+ #line 2580 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2580
+ break;
2581
+
2582
+ case 145:
2583
+ #line 1017 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2584
+ {
2585
+ (yyval) = rb_ary_new();
2586
+ }
2587
+ #line 2588 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2588
+ break;
2589
+
2590
+ case 155:
2591
+ #line 1050 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2592
+ {
2593
+ (yyval) = rb_hash_new();
2594
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("SingleValue")));
2595
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2596
+ rb_hash_aset((yyval), ID2SYM(rb_intern("value")), (yyvsp[0]));
2597
+ }
2598
+ #line 2599 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2599
+ break;
2600
+
2601
+ case 156:
2602
+ #line 1060 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2603
+ {
2604
+ (yyval) = rb_hash_new();
2605
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("ValueRange")));
2606
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2607
+ rb_hash_aset((yyval), ID2SYM(rb_intern("lower")), (yyvsp[-2]));
2608
+ rb_hash_aset((yyval), ID2SYM(rb_intern("upper")), (yyvsp[0]));
2609
+ }
2610
+ #line 2611 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2611
+ break;
2612
+
2613
+ case 160:
2614
+ #line 1079 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2615
+ {
2616
+ (yyval) = (yyvsp[0]);
2617
+ }
2618
+ #line 2619 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2619
+ break;
2620
+
2621
+ case 162:
2622
+ #line 1088 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2623
+ {
2624
+ (yyval) = ID2SYM(rb_intern("MIN"));
2625
+ }
2626
+ #line 2627 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2627
+ break;
2628
+
2629
+ case 164:
2630
+ #line 1097 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2631
+ {
2632
+ (yyval) = ID2SYM(rb_intern("MAX"));
2633
+ }
2634
+ #line 2635 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2635
+ break;
2636
+
2637
+ case 165:
2638
+ #line 1104 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1646 */
2639
+ {
2640
+ (yyval) = rb_hash_new();
2641
+ rb_hash_aset((yyval), ID2SYM(rb_intern("class")), ID2SYM(rb_intern("SizeConstraint")));
2642
+ rb_hash_aset((yyval), ID2SYM(rb_intern("location")), newLocation(filename, &(yyloc)));
2643
+ rb_hash_aset((yyval), ID2SYM(rb_intern("constraint")), (yyvsp[0]));
2644
+ }
2645
+ #line 2646 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2646
+ break;
2647
+
2648
+
2649
+ #line 2650 "ext/retro_idl/asn/ext_parser/parser.c" /* yacc.c:1646 */
2650
+ default: break;
2651
+ }
2652
+ /* User semantic actions sometimes alter yychar, and that requires
2653
+ that yytoken be updated with the new translation. We take the
2654
+ approach of translating immediately before every use of yytoken.
2655
+ One alternative is translating here after every semantic action,
2656
+ but that translation would be missed if the semantic action invokes
2657
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2658
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2659
+ incorrect destructor might then be invoked immediately. In the
2660
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
2661
+ to an incorrect destructor call or verbose syntax error message
2662
+ before the lookahead is translated. */
2663
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2664
+
2665
+ YYPOPSTACK (yylen);
2666
+ yylen = 0;
2667
+ YY_STACK_PRINT (yyss, yyssp);
2668
+
2669
+ *++yyvsp = yyval;
2670
+ *++yylsp = yyloc;
2671
+
2672
+ /* Now 'shift' the result of the reduction. Determine what state
2673
+ that goes to, based on the state we popped back to and the rule
2674
+ number reduced by. */
2675
+
2676
+ yyn = yyr1[yyn];
2677
+
2678
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2679
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2680
+ yystate = yytable[yystate];
2681
+ else
2682
+ yystate = yydefgoto[yyn - YYNTOKENS];
2683
+
2684
+ goto yynewstate;
2685
+
2686
+
2687
+ /*--------------------------------------.
2688
+ | yyerrlab -- here on detecting error. |
2689
+ `--------------------------------------*/
2690
+ yyerrlab:
2691
+ /* Make sure we have latest lookahead translation. See comments at
2692
+ user semantic actions for why this is necessary. */
2693
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2694
+
2695
+ /* If not already recovering from an error, report this error. */
2696
+ if (!yyerrstatus)
2697
+ {
2698
+ ++yynerrs;
2699
+ #if ! YYERROR_VERBOSE
2700
+ yyerror (&yylloc, scanner, filename, tree, YY_("syntax error"));
2701
+ #else
2702
+ # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2703
+ yyssp, yytoken)
2704
+ {
2705
+ char const *yymsgp = YY_("syntax error");
2706
+ int yysyntax_error_status;
2707
+ yysyntax_error_status = YYSYNTAX_ERROR;
2708
+ if (yysyntax_error_status == 0)
2709
+ yymsgp = yymsg;
2710
+ else if (yysyntax_error_status == 1)
2711
+ {
2712
+ if (yymsg != yymsgbuf)
2713
+ YYSTACK_FREE (yymsg);
2714
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2715
+ if (!yymsg)
2716
+ {
2717
+ yymsg = yymsgbuf;
2718
+ yymsg_alloc = sizeof yymsgbuf;
2719
+ yysyntax_error_status = 2;
2720
+ }
2721
+ else
2722
+ {
2723
+ yysyntax_error_status = YYSYNTAX_ERROR;
2724
+ yymsgp = yymsg;
2725
+ }
2726
+ }
2727
+ yyerror (&yylloc, scanner, filename, tree, yymsgp);
2728
+ if (yysyntax_error_status == 2)
2729
+ goto yyexhaustedlab;
2730
+ }
2731
+ # undef YYSYNTAX_ERROR
2732
+ #endif
2733
+ }
2734
+
2735
+ yyerror_range[1] = yylloc;
2736
+
2737
+ if (yyerrstatus == 3)
2738
+ {
2739
+ /* If just tried and failed to reuse lookahead token after an
2740
+ error, discard it. */
2741
+
2742
+ if (yychar <= YYEOF)
2743
+ {
2744
+ /* Return failure if at end of input. */
2745
+ if (yychar == YYEOF)
2746
+ YYABORT;
2747
+ }
2748
+ else
2749
+ {
2750
+ yydestruct ("Error: discarding",
2751
+ yytoken, &yylval, &yylloc, scanner, filename, tree);
2752
+ yychar = YYEMPTY;
2753
+ }
2754
+ }
2755
+
2756
+ /* Else will try to reuse lookahead token after shifting the error
2757
+ token. */
2758
+ goto yyerrlab1;
2759
+
2760
+
2761
+ /*---------------------------------------------------.
2762
+ | yyerrorlab -- error raised explicitly by YYERROR. |
2763
+ `---------------------------------------------------*/
2764
+ yyerrorlab:
2765
+
2766
+ /* Pacify compilers like GCC when the user code never invokes
2767
+ YYERROR and the label yyerrorlab therefore never appears in user
2768
+ code. */
2769
+ if (/*CONSTCOND*/ 0)
2770
+ goto yyerrorlab;
2771
+
2772
+ yyerror_range[1] = yylsp[1-yylen];
2773
+ /* Do not reclaim the symbols of the rule whose action triggered
2774
+ this YYERROR. */
2775
+ YYPOPSTACK (yylen);
2776
+ yylen = 0;
2777
+ YY_STACK_PRINT (yyss, yyssp);
2778
+ yystate = *yyssp;
2779
+ goto yyerrlab1;
2780
+
2781
+
2782
+ /*-------------------------------------------------------------.
2783
+ | yyerrlab1 -- common code for both syntax error and YYERROR. |
2784
+ `-------------------------------------------------------------*/
2785
+ yyerrlab1:
2786
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
2787
+
2788
+ for (;;)
2789
+ {
2790
+ yyn = yypact[yystate];
2791
+ if (!yypact_value_is_default (yyn))
2792
+ {
2793
+ yyn += YYTERROR;
2794
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2795
+ {
2796
+ yyn = yytable[yyn];
2797
+ if (0 < yyn)
2798
+ break;
2799
+ }
2800
+ }
2801
+
2802
+ /* Pop the current state because it cannot handle the error token. */
2803
+ if (yyssp == yyss)
2804
+ YYABORT;
2805
+
2806
+ yyerror_range[1] = *yylsp;
2807
+ yydestruct ("Error: popping",
2808
+ yystos[yystate], yyvsp, yylsp, scanner, filename, tree);
2809
+ YYPOPSTACK (1);
2810
+ yystate = *yyssp;
2811
+ YY_STACK_PRINT (yyss, yyssp);
2812
+ }
2813
+
2814
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2815
+ *++yyvsp = yylval;
2816
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
2817
+
2818
+ yyerror_range[2] = yylloc;
2819
+ /* Using YYLLOC is tempting, but would change the location of
2820
+ the lookahead. YYLOC is available though. */
2821
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
2822
+ *++yylsp = yyloc;
2823
+
2824
+ /* Shift the error token. */
2825
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2826
+
2827
+ yystate = yyn;
2828
+ goto yynewstate;
2829
+
2830
+
2831
+ /*-------------------------------------.
2832
+ | yyacceptlab -- YYACCEPT comes here. |
2833
+ `-------------------------------------*/
2834
+ yyacceptlab:
2835
+ yyresult = 0;
2836
+ goto yyreturn;
2837
+
2838
+ /*-----------------------------------.
2839
+ | yyabortlab -- YYABORT comes here. |
2840
+ `-----------------------------------*/
2841
+ yyabortlab:
2842
+ yyresult = 1;
2843
+ goto yyreturn;
2844
+
2845
+ #if !defined yyoverflow || YYERROR_VERBOSE
2846
+ /*-------------------------------------------------.
2847
+ | yyexhaustedlab -- memory exhaustion comes here. |
2848
+ `-------------------------------------------------*/
2849
+ yyexhaustedlab:
2850
+ yyerror (&yylloc, scanner, filename, tree, YY_("memory exhausted"));
2851
+ yyresult = 2;
2852
+ /* Fall through. */
2853
+ #endif
2854
+
2855
+ yyreturn:
2856
+ if (yychar != YYEMPTY)
2857
+ {
2858
+ /* Make sure we have latest lookahead translation. See comments at
2859
+ user semantic actions for why this is necessary. */
2860
+ yytoken = YYTRANSLATE (yychar);
2861
+ yydestruct ("Cleanup: discarding lookahead",
2862
+ yytoken, &yylval, &yylloc, scanner, filename, tree);
2863
+ }
2864
+ /* Do not reclaim the symbols of the rule whose action triggered
2865
+ this YYABORT or YYACCEPT. */
2866
+ YYPOPSTACK (yylen);
2867
+ YY_STACK_PRINT (yyss, yyssp);
2868
+ while (yyssp != yyss)
2869
+ {
2870
+ yydestruct ("Cleanup: popping",
2871
+ yystos[*yyssp], yyvsp, yylsp, scanner, filename, tree);
2872
+ YYPOPSTACK (1);
2873
+ }
2874
+ #ifndef yyoverflow
2875
+ if (yyss != yyssa)
2876
+ YYSTACK_FREE (yyss);
2877
+ #endif
2878
+ #if YYERROR_VERBOSE
2879
+ if (yymsg != yymsgbuf)
2880
+ YYSTACK_FREE (yymsg);
2881
+ #endif
2882
+ return yyresult;
2883
+ }
2884
+ #line 1129 "ext/retro_idl/asn/ext_parser/ext_parser.y" /* yacc.c:1906 */
2885
+
2886
+
2887
+
2888
+
2889
+ /* public functions ***************************************************/
2890
+
2891
+ void Init_ext_parser(void)
2892
+ {
2893
+ ASN = rb_define_module_under(rb_define_module("RetroIDL"), "ASN");
2894
+ rb_define_module_function(ASN, "parseFileBuffer", parseFileBuffer, 1);
2895
+ }
2896
+
2897
+ void yyerror(YYLTYPE *locp, yyscan_t scanner, VALUE filename, VALUE *tree, char const *msg, ... )
2898
+ {
2899
+ int retval;
2900
+ VALUE rbString;
2901
+ char error[500];
2902
+
2903
+ int hdrLen;
2904
+
2905
+ hdrLen = snprintf(error, sizeof(error), "%s:%i:%i: error: ", (const char *)RSTRING_PTR(filename), locp->first_line, locp->first_column);
2906
+
2907
+ if((hdrLen > 0) && (hdrLen <= sizeof(error))){
2908
+
2909
+ va_list argptr;
2910
+ va_start(argptr, msg);
2911
+ retval = vsnprintf(&error[hdrLen], sizeof(error) - hdrLen, msg, argptr);
2912
+ va_end(argptr);
2913
+
2914
+ if((retval > 0) && ((hdrLen + retval) <= sizeof(error))){
2915
+
2916
+ rbString = rb_str_new((const char *)error, (hdrLen + retval));
2917
+ rb_io_puts(1, &rbString, rb_stderr);
2918
+ }
2919
+ else{
2920
+
2921
+ rb_bug("yyerror buffer is too short to contain error message");
2922
+ }
2923
+ }
2924
+ else{
2925
+
2926
+ rb_bug("yyerror buffer is too short to contain error message");
2927
+ }
2928
+ }
2929
+
2930
+ /* static functions ***************************************************/
2931
+
2932
+ static VALUE parseFileBuffer(VALUE self, VALUE attr)
2933
+ {
2934
+ yyscan_t scanner;
2935
+
2936
+ VALUE tree = Qnil;
2937
+
2938
+ VALUE buffer = rb_hash_aref(attr, ID2SYM(rb_intern("buffer")));
2939
+ VALUE filename = rb_hash_aref(attr, ID2SYM(rb_intern("fileName")));
2940
+
2941
+ if(yylex_init(&scanner) == 0){
2942
+
2943
+ if(yy_scan_bytes((const char *)RSTRING_PTR(buffer), RSTRING_LEN(buffer), scanner)){
2944
+
2945
+ yyparse(scanner, filename, &tree);
2946
+ }
2947
+
2948
+ yylex_destroy(scanner);
2949
+ }
2950
+
2951
+ return tree;
2952
+ }
2953
+
2954
+ static VALUE newLocation(VALUE filename, YYLTYPE *location)
2955
+ {
2956
+ return rb_funcall(rb_const_get(ASN, rb_intern("Location")), rb_intern("new"), 5,
2957
+ filename,
2958
+ INT2NUM(location->first_line),
2959
+ INT2NUM(location->last_line),
2960
+ INT2NUM(location->first_column),
2961
+ INT2NUM(location->last_column)
2962
+ );
2963
+ }