blob: 2d4860d476246b67929cd7a1d27ad4aed657ea6c [file] [log] [blame]
Lev Walkin752e9732017-08-04 02:06:22 -07001/* A Bison parser, made by GNU Bison 2.3. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002
Lev Walkin752e9732017-08-04 02:06:22 -07003/* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
7
8 This program is free software; you can redistribute it and/or modify
Lev Walkin418298d2006-07-13 08:24:20 +00009 it under the terms of the GNU General Public License as published by
Lev Walkin752e9732017-08-04 02:06:22 -070010 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
Lev Walkin418298d2006-07-13 08:24:20 +000013 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
Lev Walkin752e9732017-08-04 02:06:22 -070017
Lev Walkin418298d2006-07-13 08:24:20 +000018 You should have received a copy of the GNU General Public License
Lev Walkin752e9732017-08-04 02:06:22 -070019 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
Lev Walkin418298d2006-07-13 08:24:20 +000022
Lev Walkin0e90aa02013-03-19 16:17:13 -070023/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
Lev Walkin752e9732017-08-04 02:06:22 -070032
Lev Walkin0e90aa02013-03-19 16:17:13 -070033 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
35
36/* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
Lev Walkin418298d2006-07-13 08:24:20 +000038
39/* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
45
46/* Identify Bison output. */
Lev Walkin0e90aa02013-03-19 16:17:13 -070047#define YYBISON 1
48
49/* Bison version. */
Lev Walkin752e9732017-08-04 02:06:22 -070050#define YYBISON_VERSION "2.3"
Lev Walkin0e90aa02013-03-19 16:17:13 -070051
52/* Skeleton name. */
53#define YYSKELETON_NAME "yacc.c"
Lev Walkin418298d2006-07-13 08:24:20 +000054
55/* Pure parsers. */
Lev Walkin0e90aa02013-03-19 16:17:13 -070056#define YYPURE 0
Lev Walkin418298d2006-07-13 08:24:20 +000057
Lev Walkin752e9732017-08-04 02:06:22 -070058/* Using locations. */
59#define YYLSP_NEEDED 0
Lev Walkin418298d2006-07-13 08:24:20 +000060
Lev Walkin0e90aa02013-03-19 16:17:13 -070061/* Substitute the variable and function names. */
Lev Walkin752e9732017-08-04 02:06:22 -070062#define yyparse asn1p_parse
63#define yylex asn1p_lex
64#define yyerror asn1p_error
65#define yylval asn1p_lval
66#define yychar asn1p_char
67#define yydebug asn1p_debug
68#define yynerrs asn1p_nerrs
Lev Walkinf15320b2004-06-03 03:38:44 +000069
Lev Walkin418298d2006-07-13 08:24:20 +000070
71/* Tokens. */
72#ifndef YYTOKENTYPE
73# define YYTOKENTYPE
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
75 know about them. */
76 enum yytokentype {
77 TOK_PPEQ = 258,
Lev Walkin0e90aa02013-03-19 16:17:13 -070078 TOK_VBracketLeft = 259,
79 TOK_VBracketRight = 260,
80 TOK_whitespace = 261,
81 TOK_opaque = 262,
82 TOK_bstring = 263,
83 TOK_cstring = 264,
84 TOK_hstring = 265,
85 TOK_identifier = 266,
86 TOK_number = 267,
87 TOK_number_negative = 268,
88 TOK_realnumber = 269,
89 TOK_tuple = 270,
90 TOK_quadruple = 271,
91 TOK_typereference = 272,
92 TOK_capitalreference = 273,
93 TOK_typefieldreference = 274,
94 TOK_valuefieldreference = 275,
95 TOK_Literal = 276,
Lev Walkinbe518fa2017-09-07 02:05:28 -070096 TOK_ExtValue_BIT_STRING = 277,
97 TOK_ABSENT = 278,
98 TOK_ABSTRACT_SYNTAX = 279,
99 TOK_ALL = 280,
100 TOK_ANY = 281,
101 TOK_APPLICATION = 282,
102 TOK_AUTOMATIC = 283,
103 TOK_BEGIN = 284,
104 TOK_BIT = 285,
105 TOK_BMPString = 286,
106 TOK_BOOLEAN = 287,
107 TOK_BY = 288,
108 TOK_CHARACTER = 289,
109 TOK_CHOICE = 290,
110 TOK_CLASS = 291,
111 TOK_COMPONENT = 292,
112 TOK_COMPONENTS = 293,
113 TOK_CONSTRAINED = 294,
114 TOK_CONTAINING = 295,
115 TOK_DEFAULT = 296,
116 TOK_DEFINITIONS = 297,
117 TOK_DEFINED = 298,
118 TOK_EMBEDDED = 299,
119 TOK_ENCODED = 300,
120 TOK_ENCODING_CONTROL = 301,
121 TOK_END = 302,
122 TOK_ENUMERATED = 303,
123 TOK_EXPLICIT = 304,
124 TOK_EXPORTS = 305,
125 TOK_EXTENSIBILITY = 306,
126 TOK_EXTERNAL = 307,
127 TOK_FALSE = 308,
128 TOK_FROM = 309,
129 TOK_GeneralizedTime = 310,
130 TOK_GeneralString = 311,
131 TOK_GraphicString = 312,
132 TOK_IA5String = 313,
133 TOK_IDENTIFIER = 314,
134 TOK_IMPLICIT = 315,
135 TOK_IMPLIED = 316,
136 TOK_IMPORTS = 317,
137 TOK_INCLUDES = 318,
138 TOK_INSTANCE = 319,
139 TOK_INSTRUCTIONS = 320,
140 TOK_INTEGER = 321,
141 TOK_ISO646String = 322,
142 TOK_MAX = 323,
143 TOK_MIN = 324,
144 TOK_MINUS_INFINITY = 325,
145 TOK_NULL = 326,
146 TOK_NumericString = 327,
147 TOK_OBJECT = 328,
148 TOK_ObjectDescriptor = 329,
149 TOK_OCTET = 330,
150 TOK_OF = 331,
151 TOK_OPTIONAL = 332,
152 TOK_PATTERN = 333,
153 TOK_PDV = 334,
154 TOK_PLUS_INFINITY = 335,
155 TOK_PRESENT = 336,
156 TOK_PrintableString = 337,
157 TOK_PRIVATE = 338,
158 TOK_REAL = 339,
159 TOK_RELATIVE_OID = 340,
160 TOK_SEQUENCE = 341,
161 TOK_SET = 342,
162 TOK_SIZE = 343,
163 TOK_STRING = 344,
164 TOK_SYNTAX = 345,
165 TOK_T61String = 346,
166 TOK_TAGS = 347,
167 TOK_TeletexString = 348,
168 TOK_TRUE = 349,
169 TOK_TYPE_IDENTIFIER = 350,
170 TOK_UNIQUE = 351,
171 TOK_UNIVERSAL = 352,
172 TOK_UniversalString = 353,
173 TOK_UTCTime = 354,
174 TOK_UTF8String = 355,
175 TOK_VideotexString = 356,
176 TOK_VisibleString = 357,
177 TOK_WITH = 358,
178 UTF8_BOM = 359,
179 TOK_EXCEPT = 360,
180 TOK_INTERSECTION = 361,
181 TOK_UNION = 362,
182 TOK_TwoDots = 363,
183 TOK_ThreeDots = 364
Lev Walkin418298d2006-07-13 08:24:20 +0000184 };
185#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700186/* Tokens. */
Lev Walkin418298d2006-07-13 08:24:20 +0000187#define TOK_PPEQ 258
Lev Walkin0e90aa02013-03-19 16:17:13 -0700188#define TOK_VBracketLeft 259
189#define TOK_VBracketRight 260
190#define TOK_whitespace 261
191#define TOK_opaque 262
192#define TOK_bstring 263
193#define TOK_cstring 264
194#define TOK_hstring 265
195#define TOK_identifier 266
196#define TOK_number 267
197#define TOK_number_negative 268
198#define TOK_realnumber 269
199#define TOK_tuple 270
200#define TOK_quadruple 271
201#define TOK_typereference 272
202#define TOK_capitalreference 273
203#define TOK_typefieldreference 274
204#define TOK_valuefieldreference 275
205#define TOK_Literal 276
Lev Walkinbe518fa2017-09-07 02:05:28 -0700206#define TOK_ExtValue_BIT_STRING 277
207#define TOK_ABSENT 278
208#define TOK_ABSTRACT_SYNTAX 279
209#define TOK_ALL 280
210#define TOK_ANY 281
211#define TOK_APPLICATION 282
212#define TOK_AUTOMATIC 283
213#define TOK_BEGIN 284
214#define TOK_BIT 285
215#define TOK_BMPString 286
216#define TOK_BOOLEAN 287
217#define TOK_BY 288
218#define TOK_CHARACTER 289
219#define TOK_CHOICE 290
220#define TOK_CLASS 291
221#define TOK_COMPONENT 292
222#define TOK_COMPONENTS 293
223#define TOK_CONSTRAINED 294
224#define TOK_CONTAINING 295
225#define TOK_DEFAULT 296
226#define TOK_DEFINITIONS 297
227#define TOK_DEFINED 298
228#define TOK_EMBEDDED 299
229#define TOK_ENCODED 300
230#define TOK_ENCODING_CONTROL 301
231#define TOK_END 302
232#define TOK_ENUMERATED 303
233#define TOK_EXPLICIT 304
234#define TOK_EXPORTS 305
235#define TOK_EXTENSIBILITY 306
236#define TOK_EXTERNAL 307
237#define TOK_FALSE 308
238#define TOK_FROM 309
239#define TOK_GeneralizedTime 310
240#define TOK_GeneralString 311
241#define TOK_GraphicString 312
242#define TOK_IA5String 313
243#define TOK_IDENTIFIER 314
244#define TOK_IMPLICIT 315
245#define TOK_IMPLIED 316
246#define TOK_IMPORTS 317
247#define TOK_INCLUDES 318
248#define TOK_INSTANCE 319
249#define TOK_INSTRUCTIONS 320
250#define TOK_INTEGER 321
251#define TOK_ISO646String 322
252#define TOK_MAX 323
253#define TOK_MIN 324
254#define TOK_MINUS_INFINITY 325
255#define TOK_NULL 326
256#define TOK_NumericString 327
257#define TOK_OBJECT 328
258#define TOK_ObjectDescriptor 329
259#define TOK_OCTET 330
260#define TOK_OF 331
261#define TOK_OPTIONAL 332
262#define TOK_PATTERN 333
263#define TOK_PDV 334
264#define TOK_PLUS_INFINITY 335
265#define TOK_PRESENT 336
266#define TOK_PrintableString 337
267#define TOK_PRIVATE 338
268#define TOK_REAL 339
269#define TOK_RELATIVE_OID 340
270#define TOK_SEQUENCE 341
271#define TOK_SET 342
272#define TOK_SIZE 343
273#define TOK_STRING 344
274#define TOK_SYNTAX 345
275#define TOK_T61String 346
276#define TOK_TAGS 347
277#define TOK_TeletexString 348
278#define TOK_TRUE 349
279#define TOK_TYPE_IDENTIFIER 350
280#define TOK_UNIQUE 351
281#define TOK_UNIVERSAL 352
282#define TOK_UniversalString 353
283#define TOK_UTCTime 354
284#define TOK_UTF8String 355
285#define TOK_VideotexString 356
286#define TOK_VisibleString 357
287#define TOK_WITH 358
288#define UTF8_BOM 359
289#define TOK_EXCEPT 360
290#define TOK_INTERSECTION 361
291#define TOK_UNION 362
292#define TOK_TwoDots 363
293#define TOK_ThreeDots 364
Lev Walkin418298d2006-07-13 08:24:20 +0000294
295
296
Lev Walkin752e9732017-08-04 02:06:22 -0700297
298/* Copy the first part of user declarations. */
299#line 1 "asn1p_y.y"
300
301
302#include <stdlib.h>
303#include <stdio.h>
304#include <string.h>
Lev Walkin0c686452017-09-07 22:59:36 -0700305#include <stdarg.h>
Lev Walkin752e9732017-08-04 02:06:22 -0700306#include <errno.h>
307#include <assert.h>
308
309#include "asn1parser.h"
310
311#define YYPARSE_PARAM param
312#define YYPARSE_PARAM_TYPE void **
313#define YYERROR_VERBOSE
Lev Walkin0c686452017-09-07 22:59:36 -0700314#define YYDEBUG 1
315#define YYFPRINTF prefixed_fprintf
316
317/*
318 * Prefix parser debug with "PARSER: " for easier human eye scanning.
319 */
320static int
321__attribute__((format(printf, 2, 3)))
322prefixed_fprintf(FILE *f, const char *fmt, ...) {
323 static int line_ended = 1;
324 va_list ap;
325 va_start(ap, fmt);
326 if(line_ended) {
327 fprintf(f, "PARSER: ");
328 line_ended = 0;
329 }
330 size_t len = strlen(fmt);
331 if(len && fmt[len-1] == '\n') {
332 line_ended = 1;
333 }
334 int ret = vfprintf(f, fmt, ap);
335 va_end(ap);
336 return ret;
337}
Lev Walkin752e9732017-08-04 02:06:22 -0700338
339int yylex(void);
Lev Walkin59165cf2017-09-11 06:24:45 -0700340static int yyerror(const char *msg);
341
Lev Walkin752e9732017-08-04 02:06:22 -0700342#ifdef YYBYACC
343int yyparse(void **param); /* byacc does not produce a prototype */
344#endif
345void asn1p_lexer_hack_push_opaque_state(void);
346void asn1p_lexer_hack_enable_with_syntax(void);
347void asn1p_lexer_hack_push_encoding_control(void);
348#define yylineno asn1p_lineno
349extern int asn1p_lineno;
Lev Walkind523ea42017-09-06 22:15:08 -0700350const char *asn1p_parse_debug_filename;
351#define ASN_FILENAME asn1p_parse_debug_filename
Lev Walkin752e9732017-08-04 02:06:22 -0700352
353/*
354 * Process directives as <ASN1C:RepresentAsPointer>
355 */
356extern int asn1p_as_pointer;
357
358/*
359 * This temporary variable is used to solve the shortcomings of 1-lookahead
360 * parser.
361 */
362static struct AssignedIdentifier *saved_aid;
363
364static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
365static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
366
367static asn1p_module_t *currentModule;
368#define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule))
369
370#define checkmem(ptr) do { \
371 if(!(ptr)) \
372 return yyerror("Memory failure"); \
373 } while(0)
374
375#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
376 if(arg1->type != constr_type) { \
377 int __ret; \
378 root = asn1p_constraint_new(yylineno, currentModule); \
379 checkmem(root); \
380 root->type = constr_type; \
381 __ret = asn1p_constraint_insert(root, \
382 arg1); \
383 checkmem(__ret == 0); \
384 } else { \
385 root = arg1; \
386 } \
387 if(arg2) { \
388 int __ret \
389 = asn1p_constraint_insert(root, arg2); \
390 checkmem(__ret == 0); \
391 } \
392 } while(0)
393
394#ifdef AL_IMPORT
395#error AL_IMPORT DEFINED ELSEWHERE!
396#endif
Lev Walkin1a49ced2017-11-06 00:07:00 -0800397#define AL_IMPORT(to, where, from, field) \
398 do { \
399 if(!(from)) break; \
400 while(TQ_FIRST(&((from)->where))) { \
401 TQ_ADD(&((to)->where), TQ_REMOVE(&((from)->where), field), field); \
402 } \
403 assert(TQ_FIRST(&((from)->where)) == 0); \
404 } while(0)
Lev Walkin752e9732017-08-04 02:06:22 -0700405
406
407
408/* Enabling traces. */
409#ifndef YYDEBUG
410# define YYDEBUG 0
411#endif
412
413/* Enabling verbose error messages. */
414#ifdef YYERROR_VERBOSE
415# undef YYERROR_VERBOSE
416# define YYERROR_VERBOSE 1
417#else
418# define YYERROR_VERBOSE 0
419#endif
420
421/* Enabling the token table. */
422#ifndef YYTOKEN_TABLE
423# define YYTOKEN_TABLE 0
424#endif
425
Lev Walkin0e90aa02013-03-19 16:17:13 -0700426#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
427typedef union YYSTYPE
Lev Walkin1a49ced2017-11-06 00:07:00 -0800428#line 115 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -0700429{
Lev Walkinf15320b2004-06-03 03:38:44 +0000430 asn1p_t *a_grammar;
431 asn1p_module_flags_e a_module_flags;
432 asn1p_module_t *a_module;
433 asn1p_expr_type_e a_type; /* ASN.1 Type */
434 asn1p_expr_t *a_expr; /* Constructed collection */
435 asn1p_constraint_t *a_constr; /* Constraint */
436 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
437 asn1p_xports_t *a_xports; /* IMports/EXports */
Lev Walkinb36317c2005-08-12 10:09:10 +0000438 struct AssignedIdentifier a_aid; /* Assigned Identifier */
Lev Walkinf15320b2004-06-03 03:38:44 +0000439 asn1p_oid_t *a_oid; /* Object Identifier */
440 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
441 struct asn1p_type_tag_s a_tag; /* A tag */
442 asn1p_ref_t *a_ref; /* Reference to custom type */
443 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
444 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
445 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
446 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
447 struct asn1p_param_s a_parg; /* A parameter argument */
448 asn1p_paramlist_t *a_plist; /* A pargs list */
Lev Walkin9c974182004-09-15 11:59:51 +0000449 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
Lev Walkinf15320b2004-06-03 03:38:44 +0000450 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
Lev Walkind21c5052004-09-29 13:18:09 +0000451 asn1c_integer_t a_int;
Lev Walkinadf863f2006-09-05 16:18:34 +0000452 double a_dbl;
Lev Walkinf15320b2004-06-03 03:38:44 +0000453 char *tv_str;
454 struct {
455 char *buf;
456 int len;
457 } tv_opaque;
458 struct {
459 char *name;
460 struct asn1p_type_tag_s tag;
461 } tv_nametag;
Lev Walkin752e9732017-08-04 02:06:22 -0700462}
463/* Line 193 of yacc.c. */
Lev Walkin1a49ced2017-11-06 00:07:00 -0800464#line 465 "asn1p_y.c"
Lev Walkin752e9732017-08-04 02:06:22 -0700465 YYSTYPE;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700466# define yystype YYSTYPE /* obsolescent; will be withdrawn */
467# define YYSTYPE_IS_DECLARED 1
Lev Walkin752e9732017-08-04 02:06:22 -0700468# define YYSTYPE_IS_TRIVIAL 1
Lev Walkinf15320b2004-06-03 03:38:44 +0000469#endif
470
Lev Walkin0e90aa02013-03-19 16:17:13 -0700471
Lev Walkin418298d2006-07-13 08:24:20 +0000472
473/* Copy the second part of user declarations. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000474
Lev Walkin752e9732017-08-04 02:06:22 -0700475
476/* Line 216 of yacc.c. */
Lev Walkin1a49ced2017-11-06 00:07:00 -0800477#line 478 "asn1p_y.c"
Lev Walkinf15320b2004-06-03 03:38:44 +0000478
Lev Walkin0e90aa02013-03-19 16:17:13 -0700479#ifdef short
480# undef short
481#endif
482
483#ifdef YYTYPE_UINT8
484typedef YYTYPE_UINT8 yytype_uint8;
485#else
486typedef unsigned char yytype_uint8;
487#endif
488
489#ifdef YYTYPE_INT8
490typedef YYTYPE_INT8 yytype_int8;
491#elif (defined __STDC__ || defined __C99__FUNC__ \
492 || defined __cplusplus || defined _MSC_VER)
493typedef signed char yytype_int8;
494#else
495typedef short int yytype_int8;
496#endif
497
498#ifdef YYTYPE_UINT16
499typedef YYTYPE_UINT16 yytype_uint16;
500#else
501typedef unsigned short int yytype_uint16;
502#endif
503
504#ifdef YYTYPE_INT16
505typedef YYTYPE_INT16 yytype_int16;
506#else
507typedef short int yytype_int16;
508#endif
509
510#ifndef YYSIZE_T
511# ifdef __SIZE_TYPE__
512# define YYSIZE_T __SIZE_TYPE__
513# elif defined size_t
514# define YYSIZE_T size_t
515# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
516 || defined __cplusplus || defined _MSC_VER)
517# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
518# define YYSIZE_T size_t
519# else
520# define YYSIZE_T unsigned int
521# endif
522#endif
523
524#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
525
526#ifndef YY_
527# if defined YYENABLE_NLS && YYENABLE_NLS
528# if ENABLE_NLS
529# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700530# define YY_(msgid) dgettext ("bison-runtime", msgid)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700531# endif
532# endif
533# ifndef YY_
Lev Walkin752e9732017-08-04 02:06:22 -0700534# define YY_(msgid) msgid
Lev Walkin0e90aa02013-03-19 16:17:13 -0700535# endif
536#endif
537
538/* Suppress unused-variable warnings by "using" E. */
539#if ! defined lint || defined __GNUC__
Lev Walkin752e9732017-08-04 02:06:22 -0700540# define YYUSE(e) ((void) (e))
Lev Walkin0e90aa02013-03-19 16:17:13 -0700541#else
Lev Walkin752e9732017-08-04 02:06:22 -0700542# define YYUSE(e) /* empty */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700543#endif
544
545/* Identity function, used to suppress warnings about constant conditions. */
546#ifndef lint
Lev Walkin752e9732017-08-04 02:06:22 -0700547# define YYID(n) (n)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700548#else
549#if (defined __STDC__ || defined __C99__FUNC__ \
550 || defined __cplusplus || defined _MSC_VER)
551static int
Lev Walkin752e9732017-08-04 02:06:22 -0700552YYID (int i)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700553#else
554static int
Lev Walkin752e9732017-08-04 02:06:22 -0700555YYID (i)
556 int i;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700557#endif
558{
Lev Walkin752e9732017-08-04 02:06:22 -0700559 return i;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700560}
561#endif
562
563#if ! defined yyoverflow || YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +0000564
Lev Walkin418298d2006-07-13 08:24:20 +0000565/* The parser invokes alloca or malloc; define the necessary symbols. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000566
Lev Walkin0e90aa02013-03-19 16:17:13 -0700567# ifdef YYSTACK_USE_ALLOCA
568# if YYSTACK_USE_ALLOCA
569# ifdef __GNUC__
570# define YYSTACK_ALLOC __builtin_alloca
571# elif defined __BUILTIN_VA_ARG_INCR
572# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
573# elif defined _AIX
574# define YYSTACK_ALLOC __alloca
575# elif defined _MSC_VER
576# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
577# define alloca _alloca
Lev Walkin418298d2006-07-13 08:24:20 +0000578# else
Lev Walkin0e90aa02013-03-19 16:17:13 -0700579# define YYSTACK_ALLOC alloca
Lev Walkin752e9732017-08-04 02:06:22 -0700580# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700581 || defined __cplusplus || defined _MSC_VER)
582# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700583# ifndef _STDLIB_H
584# define _STDLIB_H 1
Lev Walkin0e90aa02013-03-19 16:17:13 -0700585# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000586# endif
587# endif
588# endif
589# endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000590
Lev Walkin418298d2006-07-13 08:24:20 +0000591# ifdef YYSTACK_ALLOC
Lev Walkin0e90aa02013-03-19 16:17:13 -0700592 /* Pacify GCC's `empty if-body' warning. */
593# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
594# ifndef YYSTACK_ALLOC_MAXIMUM
595 /* The OS might guarantee only one guard page at the bottom of the stack,
596 and a page size can be as small as 4096 bytes. So we cannot safely
597 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
598 to allow for a few compiler-allocated temporary stack slots. */
599# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
Lev Walkin418298d2006-07-13 08:24:20 +0000600# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700601# else
602# define YYSTACK_ALLOC YYMALLOC
603# define YYSTACK_FREE YYFREE
604# ifndef YYSTACK_ALLOC_MAXIMUM
605# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
606# endif
Lev Walkin752e9732017-08-04 02:06:22 -0700607# if (defined __cplusplus && ! defined _STDLIB_H \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700608 && ! ((defined YYMALLOC || defined malloc) \
609 && (defined YYFREE || defined free)))
610# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700611# ifndef _STDLIB_H
612# define _STDLIB_H 1
Lev Walkin0e90aa02013-03-19 16:17:13 -0700613# endif
614# endif
615# ifndef YYMALLOC
616# define YYMALLOC malloc
Lev Walkin752e9732017-08-04 02:06:22 -0700617# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700618 || defined __cplusplus || defined _MSC_VER)
619void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
620# endif
621# endif
622# ifndef YYFREE
623# define YYFREE free
Lev Walkin752e9732017-08-04 02:06:22 -0700624# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700625 || defined __cplusplus || defined _MSC_VER)
626void free (void *); /* INFRINGES ON USER NAME SPACE */
627# endif
628# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000629# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700630#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
Lev Walkin418298d2006-07-13 08:24:20 +0000631
632
Lev Walkin0e90aa02013-03-19 16:17:13 -0700633#if (! defined yyoverflow \
634 && (! defined __cplusplus \
635 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Lev Walkin418298d2006-07-13 08:24:20 +0000636
637/* A type that is properly aligned for any stack member. */
638union yyalloc
639{
Lev Walkin752e9732017-08-04 02:06:22 -0700640 yytype_int16 yyss;
641 YYSTYPE yyvs;
642 };
Lev Walkin418298d2006-07-13 08:24:20 +0000643
644/* The size of the maximum gap between one aligned stack and the next. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700645# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
Lev Walkin418298d2006-07-13 08:24:20 +0000646
647/* The size of an array large to enough to hold all stacks, each with
648 N elements. */
649# define YYSTACK_BYTES(N) \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700650 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
651 + YYSTACK_GAP_MAXIMUM)
Lev Walkin418298d2006-07-13 08:24:20 +0000652
Lev Walkin752e9732017-08-04 02:06:22 -0700653/* Copy COUNT objects from FROM to TO. The source and destination do
654 not overlap. */
655# ifndef YYCOPY
656# if defined __GNUC__ && 1 < __GNUC__
657# define YYCOPY(To, From, Count) \
658 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
659# else
660# define YYCOPY(To, From, Count) \
661 do \
662 { \
663 YYSIZE_T yyi; \
664 for (yyi = 0; yyi < (Count); yyi++) \
665 (To)[yyi] = (From)[yyi]; \
666 } \
667 while (YYID (0))
668# endif
669# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000670
671/* Relocate STACK from its old location to the new one. The
672 local variables YYSIZE and YYSTACKSIZE give the old and new number of
673 elements in the stack, and YYPTR gives the new location of the
674 stack. Advance YYPTR to a properly aligned location for the next
675 stack. */
Lev Walkin752e9732017-08-04 02:06:22 -0700676# define YYSTACK_RELOCATE(Stack) \
Lev Walkin418298d2006-07-13 08:24:20 +0000677 do \
678 { \
679 YYSIZE_T yynewbytes; \
Lev Walkin752e9732017-08-04 02:06:22 -0700680 YYCOPY (&yyptr->Stack, Stack, yysize); \
681 Stack = &yyptr->Stack; \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700682 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
Lev Walkin418298d2006-07-13 08:24:20 +0000683 yyptr += yynewbytes / sizeof (*yyptr); \
684 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700685 while (YYID (0))
Lev Walkinf15320b2004-06-03 03:38:44 +0000686
687#endif
688
Lev Walkin0e90aa02013-03-19 16:17:13 -0700689/* YYFINAL -- State number of the termination state. */
Lev Walkin752e9732017-08-04 02:06:22 -0700690#define YYFINAL 9
Lev Walkin0e90aa02013-03-19 16:17:13 -0700691/* YYLAST -- Last index in YYTABLE. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700692#define YYLAST 919
Lev Walkin418298d2006-07-13 08:24:20 +0000693
Lev Walkin0e90aa02013-03-19 16:17:13 -0700694/* YYNTOKENS -- Number of terminals. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700695#define YYNTOKENS 126
Lev Walkin0e90aa02013-03-19 16:17:13 -0700696/* YYNNTS -- Number of nonterminals. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700697#define YYNNTS 147
Lev Walkin0e90aa02013-03-19 16:17:13 -0700698/* YYNRULES -- Number of rules. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700699#define YYNRULES 342
Lev Walkin0e90aa02013-03-19 16:17:13 -0700700/* YYNRULES -- Number of states. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700701#define YYNSTATES 522
Lev Walkin418298d2006-07-13 08:24:20 +0000702
703/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
704#define YYUNDEFTOK 2
Lev Walkin59165cf2017-09-11 06:24:45 -0700705#define YYMAXUTOK 365
Lev Walkin418298d2006-07-13 08:24:20 +0000706
Lev Walkin0e90aa02013-03-19 16:17:13 -0700707#define YYTRANSLATE(YYX) \
708 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Lev Walkin418298d2006-07-13 08:24:20 +0000709
710/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700711static const yytype_uint8 yytranslate[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000712{
713 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
714 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
715 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin59165cf2017-09-11 06:24:45 -0700716 2, 2, 2, 122, 2, 2, 2, 2, 2, 2,
717 115, 116, 2, 2, 118, 2, 123, 2, 2, 2,
718 2, 2, 2, 2, 2, 2, 2, 2, 119, 117,
719 124, 2, 2, 2, 125, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000720 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
721 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin59165cf2017-09-11 06:24:45 -0700722 2, 120, 2, 121, 106, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000723 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
724 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin59165cf2017-09-11 06:24:45 -0700725 2, 2, 2, 113, 108, 114, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000726 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
727 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
728 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
729 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
730 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
731 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
732 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
733 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
734 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
735 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
736 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
739 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
740 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
741 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
742 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
743 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
744 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
745 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
746 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
747 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Lev Walkin752e9732017-08-04 02:06:22 -0700748 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Lev Walkin59165cf2017-09-11 06:24:45 -0700749 105, 107, 109, 110, 111, 112
Lev Walkin418298d2006-07-13 08:24:20 +0000750};
751
752#if YYDEBUG
753/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
754 YYRHS. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700755static const yytype_uint16 yyprhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000756{
Lev Walkin752e9732017-08-04 02:06:22 -0700757 0, 0, 3, 6, 8, 10, 13, 14, 24, 25,
758 27, 31, 34, 36, 39, 41, 46, 48, 49, 51,
759 53, 56, 59, 62, 65, 68, 71, 72, 74, 78,
760 80, 83, 85, 87, 89, 90, 94, 96, 97, 99,
761 103, 106, 107, 109, 111, 114, 115, 117, 122, 124,
762 128, 130, 134, 136, 137, 139, 143, 147, 150, 152,
Lev Walkin59165cf2017-09-11 06:24:45 -0700763 156, 158, 162, 164, 168, 173, 175, 180, 184, 188,
764 195, 202, 204, 208, 210, 214, 218, 222, 226, 228,
765 232, 234, 236, 238, 240, 241, 243, 245, 249, 255,
766 259, 262, 266, 268, 270, 274, 277, 279, 281, 287,
767 288, 290, 292, 296, 299, 304, 308, 312, 316, 320,
768 324, 325, 327, 328, 335, 337, 340, 342, 344, 346,
769 350, 352, 356, 360, 362, 365, 368, 371, 375, 376,
770 379, 381, 383, 385, 390, 395, 400, 407, 414, 416,
771 421, 425, 427, 429, 433, 437, 441, 443, 447, 449,
772 451, 453, 455, 459, 463, 465, 470, 472, 474, 475,
773 479, 481, 483, 485, 487, 489, 491, 493, 495, 499,
774 501, 503, 505, 507, 510, 512, 514, 516, 518, 520,
775 523, 526, 528, 530, 533, 536, 538, 540, 542, 544,
776 546, 548, 551, 553, 558, 563, 569, 574, 578, 580,
777 582, 584, 586, 588, 590, 592, 594, 596, 598, 600,
778 602, 604, 606, 608, 610, 612, 614, 615, 617, 618,
779 620, 621, 623, 625, 629, 631, 634, 636, 638, 640,
780 642, 644, 648, 654, 656, 660, 662, 666, 668, 672,
781 674, 678, 680, 684, 686, 688, 690, 692, 694, 696,
782 698, 701, 704, 707, 710, 714, 716, 718, 720, 722,
783 724, 726, 728, 731, 733, 737, 741, 743, 745, 747,
784 751, 757, 759, 763, 767, 768, 770, 772, 774, 776,
785 778, 780, 782, 783, 789, 792, 794, 797, 800, 804,
786 806, 808, 812, 817, 819, 823, 826, 830, 832, 836,
787 837, 839, 841, 844, 846, 850, 852, 854, 858, 863,
788 868, 870, 874, 879, 884, 886, 888, 892, 894, 899,
789 904, 906, 908, 910, 912, 914, 915, 917, 920, 925,
790 926, 928, 930, 932, 933, 935, 937, 939, 941, 942,
791 944, 946, 948
Lev Walkin418298d2006-07-13 08:24:20 +0000792};
793
Lev Walkin0e90aa02013-03-19 16:17:13 -0700794/* YYRHS -- A `-1'-separated list of the rules' RHS. */
795static const yytype_int16 yyrhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000796{
Lev Walkin59165cf2017-09-11 06:24:45 -0700797 127, 0, -1, 104, 128, -1, 128, -1, 129, -1,
798 128, 129, -1, -1, 268, 130, 131, 42, 135, 3,
799 29, 138, 47, -1, -1, 132, -1, 113, 133, 114,
800 -1, 113, 114, -1, 134, -1, 133, 134, -1, 270,
801 -1, 270, 115, 12, 116, -1, 12, -1, -1, 136,
802 -1, 137, -1, 136, 137, -1, 49, 92, -1, 60,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700803 92, -1, 28, 92, -1, 51, 61, -1, 18, 65,
Lev Walkin59165cf2017-09-11 06:24:45 -0700804 -1, -1, 139, -1, 151, 143, 140, -1, 141, -1,
805 140, 141, -1, 158, -1, 193, -1, 156, -1, -1,
806 46, 18, 142, -1, 204, -1, -1, 144, -1, 62,
807 145, 117, -1, 62, 54, -1, -1, 146, -1, 148,
808 -1, 146, 148, -1, -1, 132, -1, 149, 54, 268,
809 147, -1, 150, -1, 149, 118, 150, -1, 268, -1,
810 268, 113, 114, -1, 270, -1, -1, 152, -1, 50,
811 153, 117, -1, 50, 25, 117, -1, 50, 117, -1,
812 154, -1, 153, 118, 154, -1, 268, -1, 268, 113,
813 114, -1, 270, -1, 113, 214, 114, -1, 268, 178,
814 3, 155, -1, 187, -1, 187, 113, 161, 114, -1,
815 268, 3, 178, -1, 268, 3, 168, -1, 268, 113,
816 159, 114, 3, 178, -1, 268, 113, 159, 114, 3,
817 168, -1, 160, -1, 159, 118, 160, -1, 268, -1,
818 268, 119, 270, -1, 268, 119, 268, -1, 201, 119,
819 270, -1, 201, 119, 268, -1, 162, -1, 161, 118,
820 162, -1, 181, -1, 196, -1, 197, -1, 155, -1,
821 -1, 164, -1, 165, -1, 164, 118, 165, -1, 164,
822 118, 4, 164, 5, -1, 270, 182, 250, -1, 182,
823 250, -1, 38, 76, 182, -1, 177, -1, 167, -1,
824 166, 118, 167, -1, 270, 182, -1, 177, -1, 182,
825 -1, 36, 113, 170, 114, 172, -1, -1, 96, -1,
826 171, -1, 170, 118, 171, -1, 19, 250, -1, 20,
827 178, 169, 250, -1, 20, 191, 250, -1, 20, 192,
828 250, -1, 19, 191, 250, -1, 19, 178, 250, -1,
829 19, 192, 250, -1, -1, 173, -1, -1, 103, 90,
830 113, 174, 175, 114, -1, 176, -1, 175, 176, -1,
831 6, -1, 21, -1, 190, -1, 120, 175, 121, -1,
832 111, -1, 111, 122, 197, -1, 111, 122, 261, -1,
833 179, -1, 263, 181, -1, 157, 208, -1, 185, 208,
834 -1, 263, 184, 208, -1, -1, 183, 185, -1, 186,
835 -1, 157, -1, 203, -1, 35, 113, 166, 114, -1,
836 86, 113, 163, 114, -1, 87, 113, 163, 114, -1,
837 86, 209, 76, 269, 263, 184, -1, 87, 209, 76,
838 269, 263, 184, -1, 26, -1, 26, 43, 33, 270,
839 -1, 64, 76, 187, -1, 17, -1, 18, -1, 17,
840 123, 268, -1, 18, 123, 268, -1, 18, 123, 188,
841 -1, 189, -1, 188, 123, 189, -1, 190, -1, 19,
842 -1, 20, -1, 19, -1, 191, 123, 19, -1, 191,
843 123, 20, -1, 18, -1, 270, 178, 3, 194, -1,
844 196, -1, 197, -1, -1, 113, 195, 199, -1, 71,
845 -1, 53, -1, 94, -1, 261, -1, 262, -1, 198,
846 -1, 228, -1, 272, -1, 268, 123, 270, -1, 9,
847 -1, 15, -1, 16, -1, 200, -1, 199, 7, -1,
848 7, -1, 270, -1, 32, -1, 71, -1, 84, -1,
849 75, 89, -1, 73, 59, -1, 85, -1, 52, -1,
850 44, 79, -1, 34, 89, -1, 99, -1, 55, -1,
851 204, -1, 202, -1, 66, -1, 48, -1, 30, 89,
852 -1, 201, -1, 66, 113, 254, 114, -1, 48, 113,
853 258, 114, -1, 30, 89, 113, 256, 114, -1, 22,
854 113, 252, 114, -1, 22, 113, 114, -1, 31, -1,
855 56, -1, 57, -1, 58, -1, 67, -1, 72, -1,
856 82, -1, 91, -1, 93, -1, 98, -1, 100, -1,
857 101, -1, 102, -1, 74, -1, 108, -1, 109, -1,
858 106, -1, 107, -1, -1, 210, -1, -1, 211, -1,
859 -1, 210, -1, 222, -1, 115, 212, 116, -1, 210,
860 -1, 211, 210, -1, 213, -1, 239, -1, 214, -1,
861 111, -1, 215, -1, 215, 118, 111, -1, 215, 118,
862 111, 118, 215, -1, 216, -1, 25, 105, 219, -1,
863 217, -1, 216, 205, 217, -1, 218, -1, 217, 206,
864 218, -1, 219, -1, 219, 105, 219, -1, 220, -1,
865 115, 215, 116, -1, 227, -1, 229, -1, 221, -1,
866 222, -1, 230, -1, 223, -1, 224, -1, 54, 210,
867 -1, 88, 210, -1, 78, 9, -1, 78, 270, -1,
868 225, 243, 226, -1, 227, -1, 69, -1, 227, -1,
869 68, -1, 194, -1, 8, -1, 10, -1, 63, 178,
870 -1, 180, -1, 103, 37, 231, -1, 103, 38, 232,
871 -1, 210, -1, 233, -1, 234, -1, 113, 235, 114,
872 -1, 113, 111, 118, 235, 114, -1, 236, -1, 235,
873 118, 236, -1, 272, 207, 237, -1, -1, 238, -1,
874 81, -1, 23, -1, 77, -1, 240, -1, 244, -1,
875 242, -1, -1, 39, 33, 113, 241, 199, -1, 40,
876 178, -1, 110, -1, 110, 124, -1, 124, 110, -1,
877 124, 110, 124, -1, 245, -1, 246, -1, 113, 268,
878 114, -1, 245, 113, 247, 114, -1, 248, -1, 247,
879 118, 248, -1, 125, 249, -1, 125, 123, 249, -1,
880 270, -1, 249, 123, 270, -1, -1, 251, -1, 77,
881 -1, 41, 194, -1, 253, -1, 252, 118, 253, -1,
882 270, -1, 255, -1, 254, 118, 255, -1, 270, 115,
883 261, 116, -1, 270, 115, 197, 116, -1, 257, -1,
884 256, 118, 257, -1, 270, 115, 12, 116, -1, 270,
885 115, 197, 116, -1, 259, -1, 260, -1, 259, 118,
886 260, -1, 270, -1, 270, 115, 261, 116, -1, 270,
887 115, 197, 116, -1, 261, -1, 111, -1, 12, -1,
888 13, -1, 14, -1, -1, 264, -1, 265, 267, -1,
889 120, 266, 12, 121, -1, -1, 97, -1, 27, -1,
890 83, -1, -1, 60, -1, 49, -1, 17, -1, 18,
891 -1, -1, 270, -1, 11, -1, 270, -1, 271, -1
Lev Walkin418298d2006-07-13 08:24:20 +0000892};
893
894/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700895static const yytype_uint16 yyrline[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000896{
Lev Walkin1a49ced2017-11-06 00:07:00 -0800897 0, 414, 414, 417, 423, 428, 445, 445, 474, 475,
898 479, 482, 488, 494, 503, 507, 511, 521, 522, 531,
899 534, 543, 546, 549, 552, 556, 577, 578, 587, 600,
900 603, 620, 627, 641, 649, 648, 662, 675, 676, 679,
901 689, 695, 696, 699, 704, 711, 712, 716, 727, 732,
902 739, 745, 751, 761, 762, 774, 777, 780, 788, 793,
903 800, 806, 812, 821, 824, 844, 854, 874, 880, 896,
904 902, 910, 919, 930, 934, 942, 950, 958, 969, 974,
905 981, 982, 990, 998, 1021, 1022, 1025, 1030, 1034, 1042,
906 1049, 1055, 1062, 1068, 1073, 1080, 1085, 1088, 1095, 1105,
907 1106, 1110, 1117, 1127, 1137, 1148, 1158, 1169, 1179, 1190,
908 1202, 1203, 1210, 1209, 1218, 1222, 1229, 1233, 1236, 1240,
909 1246, 1254, 1263, 1274, 1277, 1284, 1307, 1330, 1354, 1361,
910 1380, 1381, 1384, 1385, 1391, 1397, 1403, 1413, 1423, 1429,
911 1441, 1456, 1464, 1472, 1483, 1494, 1516, 1524, 1533, 1537,
912 1542, 1551, 1556, 1561, 1569, 1592, 1602, 1603, 1604, 1604,
913 1612, 1617, 1622, 1627, 1628, 1629, 1630, 1634, 1635, 1653,
914 1657, 1662, 1670, 1679, 1694, 1695, 1701, 1702, 1703, 1704,
915 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1720,
916 1721, 1722, 1726, 1732, 1737, 1742, 1747, 1752, 1761, 1762,
917 1766, 1770, 1771, 1772, 1773, 1774, 1778, 1779, 1780, 1781,
918 1785, 1786, 1793, 1793, 1794, 1794, 1798, 1799, 1803, 1804,
919 1808, 1809, 1810, 1814, 1820, 1821, 1830, 1830, 1832, 1835,
920 1839, 1840, 1846, 1857, 1858, 1864, 1865, 1871, 1872, 1879,
921 1880, 1886, 1887, 1898, 1904, 1910, 1911, 1913, 1914, 1915,
922 1920, 1925, 1930, 1935, 1947, 1956, 1957, 1963, 1964, 1969,
923 1972, 1977, 1985, 1991, 2003, 2006, 2012, 2013, 2013, 2014,
924 2016, 2029, 2034, 2040, 2054, 2055, 2059, 2062, 2065, 2073,
925 2074, 2075, 2080, 2079, 2091, 2100, 2101, 2102, 2103, 2106,
926 2109, 2118, 2134, 2140, 2146, 2160, 2171, 2187, 2190, 2210,
927 2214, 2218, 2222, 2229, 2234, 2240, 2249, 2254, 2261, 2269,
928 2279, 2284, 2291, 2299, 2309, 2324, 2329, 2336, 2343, 2351,
929 2359, 2366, 2377, 2381, 2388, 2419, 2420, 2424, 2431, 2437,
930 2438, 2439, 2440, 2444, 2445, 2446, 2450, 2454, 2462, 2463,
931 2469, 2476, 2483
Lev Walkin418298d2006-07-13 08:24:20 +0000932};
933#endif
934
Lev Walkin752e9732017-08-04 02:06:22 -0700935#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
Lev Walkin0e90aa02013-03-19 16:17:13 -0700936/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
937 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
Lev Walkin418298d2006-07-13 08:24:20 +0000938static const char *const yytname[] =
939{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700940 "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft",
941 "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring",
Lev Walkinbe518fa2017-09-07 02:05:28 -0700942 "TOK_cstring", "TOK_hstring", "\"identifier\"", "\"number\"",
943 "\"negative number\"", "TOK_realnumber", "TOK_tuple", "TOK_quadruple",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700944 "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference",
Lev Walkinbe518fa2017-09-07 02:05:28 -0700945 "TOK_valuefieldreference", "TOK_Literal", "TOK_ExtValue_BIT_STRING",
946 "TOK_ABSENT", "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY",
947 "TOK_APPLICATION", "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT",
948 "TOK_BMPString", "TOK_BOOLEAN", "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE",
949 "TOK_CLASS", "TOK_COMPONENT", "TOK_COMPONENTS", "TOK_CONSTRAINED",
950 "TOK_CONTAINING", "TOK_DEFAULT", "TOK_DEFINITIONS", "TOK_DEFINED",
951 "TOK_EMBEDDED", "TOK_ENCODED", "TOK_ENCODING_CONTROL", "TOK_END",
952 "TOK_ENUMERATED", "TOK_EXPLICIT", "TOK_EXPORTS", "TOK_EXTENSIBILITY",
953 "TOK_EXTERNAL", "TOK_FALSE", "TOK_FROM", "TOK_GeneralizedTime",
954 "TOK_GeneralString", "TOK_GraphicString", "TOK_IA5String",
955 "TOK_IDENTIFIER", "TOK_IMPLICIT", "TOK_IMPLIED", "TOK_IMPORTS",
956 "TOK_INCLUDES", "TOK_INSTANCE", "TOK_INSTRUCTIONS", "TOK_INTEGER",
957 "TOK_ISO646String", "TOK_MAX", "TOK_MIN", "TOK_MINUS_INFINITY",
958 "TOK_NULL", "TOK_NumericString", "TOK_OBJECT", "TOK_ObjectDescriptor",
959 "TOK_OCTET", "TOK_OF", "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV",
960 "TOK_PLUS_INFINITY", "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE",
961 "TOK_REAL", "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE",
962 "TOK_STRING", "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS",
963 "TOK_TeletexString", "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE",
964 "TOK_UNIVERSAL", "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String",
Lev Walkin752e9732017-08-04 02:06:22 -0700965 "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH",
966 "\"UTF-8 byte order mark\"", "TOK_EXCEPT", "'^'", "TOK_INTERSECTION",
Lev Walkin59165cf2017-09-11 06:24:45 -0700967 "'|'", "TOK_UNION", "\"..\"", "\"...\"", "\"concrete TypeDeclaration\"",
968 "'{'", "'}'", "'('", "')'", "';'", "','", "':'", "'['", "']'", "'!'",
969 "'.'", "'<'", "'@'", "$accept", "ParsedGrammar", "ModuleList",
970 "ModuleDefinition", "@1", "optObjectIdentifier", "ObjectIdentifier",
971 "ObjectIdentifierBody", "ObjectIdentifierElement",
972 "optModuleDefinitionFlags", "ModuleDefinitionFlags",
973 "ModuleDefinitionFlag", "optModuleBody", "ModuleBody", "AssignmentList",
974 "Assignment", "@2", "optImports", "ImportsDefinition",
975 "optImportsBundleSet", "ImportsBundleSet", "AssignedIdentifier",
976 "ImportsBundle", "ImportsList", "ImportsElement", "optExports",
977 "ExportsDefinition", "ExportsBody", "ExportsElement", "ValueSet",
978 "ValueSetTypeAssignment", "DefinedType", "DataTypeReference",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700979 "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList",
980 "ActualParameter", "optComponentTypeLists", "ComponentTypeLists",
981 "ComponentType", "AlternativeTypeLists", "AlternativeType",
Lev Walkin0c686452017-09-07 22:59:36 -0700982 "ObjectClass", "optUNIQUE", "FieldSpec", "ClassField", "optWithSyntax",
Lev Walkin752e9732017-08-04 02:06:22 -0700983 "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken",
Lev Walkin59165cf2017-09-11 06:24:45 -0700984 "ExtensionAndException", "Type", "TaggedType", "DefinedUntaggedType",
985 "UntaggedType", "MaybeIndirectTaggedType", "NSTD_IndirectMarker",
986 "MaybeIndirectTypeDeclaration", "TypeDeclaration",
987 "ConcreteTypeDeclaration", "ComplexTypeReference",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700988 "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement",
989 "PrimitiveFieldReference", "FieldName", "DefinedObjectClass",
Lev Walkin752e9732017-08-04 02:06:22 -0700990 "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue",
Lev Walkinbf979152017-09-07 23:36:11 -0700991 "RestrictedCharacterStringValue", "Opaque", "OpaqueFirstToken",
Lev Walkin59165cf2017-09-11 06:24:45 -0700992 "BasicTypeId", "BasicTypeId_UniverationCompatible", "BuiltinType",
Lev Walkinbf979152017-09-07 23:36:11 -0700993 "BasicString", "UnionMark", "IntersectionMark", "optConstraint",
994 "optManyConstraints", "optSizeOrConstraint", "Constraint",
995 "ManyConstraints", "ConstraintSpec", "SubtypeConstraint",
996 "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections",
Lev Walkin59165cf2017-09-11 06:24:45 -0700997 "IntersectionElements", "Elements", "SubtypeElements",
Lev Walkinbf979152017-09-07 23:36:11 -0700998 "PermittedAlphabet", "SizeConstraint", "PatternConstraint", "ValueRange",
999 "LowerEndValue", "UpperEndValue", "SingleValue", "BitStringValue",
Lev Walkin59165cf2017-09-11 06:24:45 -07001000 "ContainedSubtype", "InnerTypeConstraints", "SingleTypeConstraint",
1001 "MultipleTypeConstraints", "FullSpecification", "PartialSpecification",
1002 "TypeConstraints", "NamedConstraint", "optPresenceConstraint",
1003 "PresenceConstraint", "GeneralConstraint", "UserDefinedConstraint", "@5",
1004 "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint",
1005 "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList",
1006 "AtNotationElement", "ComponentIdList", "optMarker", "Marker",
1007 "IdentifierList", "IdentifierElement", "NamedNumberList", "NamedNumber",
1008 "NamedBitList", "NamedBit", "Enumerations", "UniverationList",
1009 "UniverationElement", "SignedNumber", "RealValue", "optTag", "Tag",
1010 "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName", "optIdentifier",
Lev Walkinbf979152017-09-07 23:36:11 -07001011 "Identifier", "IdentifierAsReference", "IdentifierAsValue", 0
Lev Walkin418298d2006-07-13 08:24:20 +00001012};
1013#endif
1014
1015# ifdef YYPRINT
1016/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1017 token YYLEX-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001018static const yytype_uint16 yytoknum[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001019{
1020 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1021 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1022 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1023 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1024 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1025 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1026 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1027 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1028 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1029 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001030 355, 356, 357, 358, 359, 360, 94, 361, 124, 362,
Lev Walkin59165cf2017-09-11 06:24:45 -07001031 363, 364, 365, 123, 125, 40, 41, 59, 44, 58,
1032 91, 93, 33, 46, 60, 64
Lev Walkin418298d2006-07-13 08:24:20 +00001033};
1034# endif
1035
1036/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Lev Walkinbe518fa2017-09-07 02:05:28 -07001037static const yytype_uint16 yyr1[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001038{
Lev Walkin59165cf2017-09-11 06:24:45 -07001039 0, 126, 127, 127, 128, 128, 130, 129, 131, 131,
1040 132, 132, 133, 133, 134, 134, 134, 135, 135, 136,
1041 136, 137, 137, 137, 137, 137, 138, 138, 139, 140,
1042 140, 141, 141, 141, 142, 141, 141, 143, 143, 144,
1043 144, 145, 145, 146, 146, 147, 147, 148, 149, 149,
1044 150, 150, 150, 151, 151, 152, 152, 152, 153, 153,
1045 154, 154, 154, 155, 156, 157, 157, 158, 158, 158,
1046 158, 159, 159, 160, 160, 160, 160, 160, 161, 161,
1047 162, 162, 162, 162, 163, 163, 164, 164, 164, 165,
1048 165, 165, 165, 166, 166, 167, 167, 167, 168, 169,
1049 169, 170, 170, 171, 171, 171, 171, 171, 171, 171,
1050 172, 172, 174, 173, 175, 175, 176, 176, 176, 176,
1051 177, 177, 177, 178, 179, 180, 181, 182, 183, 184,
1052 185, 185, 186, 186, 186, 186, 186, 186, 186, 186,
1053 186, 187, 187, 187, 187, 187, 188, 188, 189, 190,
1054 190, 191, 191, 191, 192, 193, 194, 194, 195, 194,
1055 196, 196, 196, 196, 196, 196, 196, 197, 197, 198,
1056 198, 198, 199, 199, 200, 200, 201, 201, 201, 201,
1057 201, 201, 201, 201, 201, 201, 201, 201, 201, 202,
1058 202, 202, 203, 203, 203, 203, 203, 203, 204, 204,
1059 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
1060 204, 204, 205, 205, 206, 206, 207, 207, 208, 208,
1061 209, 209, 209, 210, 211, 211, 212, 212, 213, 214,
1062 214, 214, 214, 215, 215, 216, 216, 217, 217, 218,
1063 218, 219, 219, 220, 220, 220, 220, 220, 220, 220,
1064 221, 222, 223, 223, 224, 225, 225, 226, 226, 227,
1065 228, 228, 229, 229, 230, 230, 231, 232, 232, 233,
1066 234, 235, 235, 236, 237, 237, 238, 238, 238, 239,
1067 239, 239, 241, 240, 242, 243, 243, 243, 243, 244,
1068 244, 245, 246, 247, 247, 248, 248, 249, 249, 250,
1069 250, 251, 251, 252, 252, 253, 254, 254, 255, 255,
1070 256, 256, 257, 257, 258, 259, 259, 260, 260, 260,
1071 260, 260, 261, 261, 262, 263, 263, 264, 265, 266,
1072 266, 266, 266, 267, 267, 267, 268, 268, 269, 269,
1073 270, 271, 272
Lev Walkin418298d2006-07-13 08:24:20 +00001074};
1075
1076/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001077static const yytype_uint8 yyr2[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001078{
Lev Walkin752e9732017-08-04 02:06:22 -07001079 0, 2, 2, 1, 1, 2, 0, 9, 0, 1,
1080 3, 2, 1, 2, 1, 4, 1, 0, 1, 1,
1081 2, 2, 2, 2, 2, 2, 0, 1, 3, 1,
1082 2, 1, 1, 1, 0, 3, 1, 0, 1, 3,
1083 2, 0, 1, 1, 2, 0, 1, 4, 1, 3,
1084 1, 3, 1, 0, 1, 3, 3, 2, 1, 3,
Lev Walkin59165cf2017-09-11 06:24:45 -07001085 1, 3, 1, 3, 4, 1, 4, 3, 3, 6,
1086 6, 1, 3, 1, 3, 3, 3, 3, 1, 3,
1087 1, 1, 1, 1, 0, 1, 1, 3, 5, 3,
1088 2, 3, 1, 1, 3, 2, 1, 1, 5, 0,
1089 1, 1, 3, 2, 4, 3, 3, 3, 3, 3,
1090 0, 1, 0, 6, 1, 2, 1, 1, 1, 3,
1091 1, 3, 3, 1, 2, 2, 2, 3, 0, 2,
1092 1, 1, 1, 4, 4, 4, 6, 6, 1, 4,
1093 3, 1, 1, 3, 3, 3, 1, 3, 1, 1,
1094 1, 1, 3, 3, 1, 4, 1, 1, 0, 3,
1095 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
1096 1, 1, 1, 2, 1, 1, 1, 1, 1, 2,
1097 2, 1, 1, 2, 2, 1, 1, 1, 1, 1,
1098 1, 2, 1, 4, 4, 5, 4, 3, 1, 1,
Lev Walkin418298d2006-07-13 08:24:20 +00001099 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin59165cf2017-09-11 06:24:45 -07001100 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
1101 0, 1, 1, 3, 1, 2, 1, 1, 1, 1,
1102 1, 3, 5, 1, 3, 1, 3, 1, 3, 1,
1103 3, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1104 2, 2, 2, 2, 3, 1, 1, 1, 1, 1,
1105 1, 1, 2, 1, 3, 3, 1, 1, 1, 3,
1106 5, 1, 3, 3, 0, 1, 1, 1, 1, 1,
1107 1, 1, 0, 5, 2, 1, 2, 2, 3, 1,
1108 1, 3, 4, 1, 3, 2, 3, 1, 3, 0,
1109 1, 1, 2, 1, 3, 1, 1, 3, 4, 4,
1110 1, 3, 4, 4, 1, 1, 3, 1, 4, 4,
1111 1, 1, 1, 1, 1, 0, 1, 2, 4, 0,
1112 1, 1, 1, 0, 1, 1, 1, 1, 0, 1,
1113 1, 1, 1
Lev Walkin418298d2006-07-13 08:24:20 +00001114};
1115
Lev Walkin752e9732017-08-04 02:06:22 -07001116/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1117 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
Lev Walkin418298d2006-07-13 08:24:20 +00001118 means the default is an error. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001119static const yytype_uint16 yydefact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001120{
Lev Walkin59165cf2017-09-11 06:24:45 -07001121 0, 336, 337, 0, 0, 3, 4, 6, 2, 1,
1122 5, 8, 0, 0, 9, 340, 16, 11, 0, 12,
Lev Walkin752e9732017-08-04 02:06:22 -07001123 14, 17, 10, 13, 0, 0, 0, 0, 0, 0,
1124 0, 18, 19, 0, 25, 23, 21, 24, 22, 0,
1125 20, 15, 53, 0, 0, 27, 37, 54, 0, 57,
1126 0, 58, 60, 62, 7, 41, 0, 38, 56, 55,
1127 0, 0, 40, 0, 42, 43, 0, 48, 50, 52,
Lev Walkin59165cf2017-09-11 06:24:45 -07001128 198, 0, 199, 200, 201, 202, 203, 211, 204, 205,
1129 206, 207, 208, 209, 210, 28, 29, 33, 31, 32,
1130 36, 325, 325, 59, 61, 39, 44, 0, 0, 0,
1131 34, 30, 325, 0, 329, 0, 123, 0, 326, 333,
1132 0, 45, 49, 51, 35, 0, 68, 67, 0, 176,
1133 0, 0, 190, 182, 186, 189, 177, 0, 0, 178,
1134 181, 185, 0, 71, 0, 188, 187, 73, 331, 332,
1135 330, 0, 0, 141, 142, 0, 138, 0, 0, 190,
1136 0, 189, 220, 220, 131, 124, 218, 130, 65, 192,
1137 132, 335, 334, 327, 0, 46, 47, 0, 191, 184,
1138 183, 180, 179, 0, 0, 0, 0, 0, 0, 64,
1139 0, 0, 0, 0, 191, 325, 0, 0, 0, 0,
1140 325, 0, 0, 221, 222, 325, 0, 126, 224, 219,
1141 0, 260, 169, 261, 322, 323, 324, 170, 171, 161,
1142 160, 162, 158, 155, 156, 157, 165, 166, 163, 164,
1143 0, 341, 342, 167, 325, 325, 0, 101, 325, 72,
1144 77, 76, 75, 74, 328, 141, 142, 0, 0, 325,
1145 256, 0, 0, 229, 0, 218, 263, 259, 0, 230,
1146 233, 235, 237, 239, 241, 245, 246, 248, 249, 0,
1147 243, 244, 247, 143, 149, 150, 145, 146, 148, 144,
1148 197, 0, 303, 305, 0, 0, 120, 0, 93, 96,
1149 97, 128, 325, 321, 0, 314, 315, 320, 317, 140,
1150 0, 306, 0, 251, 0, 0, 85, 86, 92, 299,
1151 325, 0, 325, 158, 0, 226, 228, 227, 279, 281,
1152 280, 289, 290, 338, 0, 338, 225, 160, 83, 0,
1153 78, 80, 81, 82, 0, 0, 154, 151, 0, 301,
1154 299, 299, 299, 103, 300, 99, 299, 299, 110, 0,
1155 70, 69, 0, 250, 262, 252, 253, 0, 0, 0,
1156 125, 63, 0, 212, 213, 0, 214, 215, 0, 0,
1157 285, 0, 0, 0, 196, 0, 139, 0, 310, 0,
1158 0, 133, 325, 0, 218, 95, 194, 0, 0, 193,
1159 0, 0, 325, 134, 325, 90, 299, 0, 284, 0,
1160 223, 0, 325, 339, 135, 325, 66, 0, 174, 159,
1161 172, 175, 168, 302, 108, 0, 107, 109, 100, 299,
1162 105, 106, 0, 98, 111, 102, 234, 266, 264, 0,
1163 265, 267, 268, 242, 231, 236, 238, 240, 286, 287,
1164 258, 254, 257, 147, 304, 195, 0, 0, 121, 122,
1165 94, 129, 127, 316, 0, 0, 307, 0, 0, 91,
1166 325, 87, 89, 282, 291, 0, 0, 293, 128, 128,
1167 79, 173, 152, 153, 104, 0, 0, 0, 271, 216,
1168 0, 288, 311, 0, 0, 319, 318, 309, 308, 0,
1169 0, 0, 295, 297, 292, 0, 136, 137, 112, 0,
1170 269, 0, 274, 217, 232, 312, 313, 88, 283, 296,
1171 0, 294, 0, 0, 272, 277, 278, 276, 273, 275,
1172 298, 116, 117, 0, 0, 114, 118, 270, 0, 113,
1173 115, 119
Lev Walkin418298d2006-07-13 08:24:20 +00001174};
1175
Lev Walkin0e90aa02013-03-19 16:17:13 -07001176/* YYDEFGOTO[NTERM-NUM]. */
1177static const yytype_int16 yydefgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001178{
Lev Walkin752e9732017-08-04 02:06:22 -07001179 -1, 4, 5, 6, 11, 13, 14, 18, 19, 30,
Lev Walkin59165cf2017-09-11 06:24:45 -07001180 31, 32, 44, 45, 85, 86, 114, 56, 57, 63,
1181 64, 166, 65, 66, 67, 46, 47, 50, 51, 318,
1182 87, 245, 88, 132, 133, 319, 320, 295, 296, 297,
1183 277, 278, 116, 409, 226, 227, 413, 414, 502, 514,
1184 515, 298, 105, 106, 246, 321, 299, 373, 374, 156,
1185 157, 158, 266, 267, 516, 331, 332, 89, 247, 324,
1186 214, 215, 216, 399, 400, 159, 135, 160, 136, 355,
1187 358, 492, 197, 192, 198, 199, 304, 305, 248, 249,
1188 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
1189 431, 260, 217, 261, 262, 418, 420, 421, 422, 467,
1190 468, 508, 509, 307, 308, 480, 309, 362, 310, 311,
1191 312, 456, 457, 482, 333, 334, 271, 272, 290, 291,
1192 367, 368, 284, 285, 286, 218, 219, 281, 108, 109,
1193 141, 163, 220, 392, 221, 222, 223
Lev Walkin418298d2006-07-13 08:24:20 +00001194};
1195
1196/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1197 STATE-NUM. */
Lev Walkin59165cf2017-09-11 06:24:45 -07001198#define YYPACT_NINF -296
Lev Walkin0e90aa02013-03-19 16:17:13 -07001199static const yytype_int16 yypact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001200{
Lev Walkin59165cf2017-09-11 06:24:45 -07001201 51, -296, -296, 217, 41, 217, -296, -296, 217, -296,
1202 -296, -63, 53, 43, -296, -296, -296, -296, 70, -296,
1203 -45, 204, -296, -296, 79, 32, 30, 38, 110, 87,
1204 200, 204, -296, 95, -296, -296, -296, -296, -296, 198,
1205 -296, -296, 247, 12, 178, -296, 174, -296, 134, -296,
1206 140, -296, 183, -296, -296, 72, 663, -296, -296, -296,
1207 213, 173, -296, 187, 213, -296, 50, -296, 211, -296,
1208 -296, 293, -296, -296, -296, -296, -296, -296, -296, -296,
1209 -296, -296, -296, -296, -296, 663, -296, -296, -296, -296,
1210 -296, 19, 219, -296, -296, -296, -296, 217, 213, 227,
1211 -296, -296, -2, 817, 68, 340, -296, 740, -296, 120,
1212 356, -63, -296, -296, -296, 249, -296, -296, 272, -296,
1213 274, 285, -296, -296, -296, -296, -296, 307, 278, -296,
1214 -296, -296, 13, -296, 250, -296, -296, 251, -296, -296,
1215 -296, 359, 260, 264, 265, 261, 346, 301, 279, 281,
1216 315, 294, 113, 135, -296, -296, 280, -296, 295, -296,
1217 -296, -296, -296, -296, 510, -296, -296, 290, -296, -296,
1218 -296, -296, -296, 406, 817, 213, 213, 289, 368, -296,
1219 217, 309, 14, 378, 299, 29, 108, 318, 403, 280,
1220 61, 229, 339, -296, -296, 61, 341, -296, -296, 280,
1221 604, -296, -296, -296, -296, -296, -296, -296, -296, -296,
1222 -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
1223 296, -296, -296, -296, 84, 28, 98, -296, -2, -296,
1224 -296, -296, -296, -296, -296, 264, 265, 311, 280, 219,
1225 -296, 104, 300, -296, 388, 280, -296, -296, 304, 302,
1226 237, 241, -296, 320, -296, -296, -296, -296, -296, -18,
1227 -17, -296, -296, -296, -296, -296, 303, -296, -296, -296,
1228 -296, 138, -296, -296, 403, 403, 305, 167, -296, -296,
1229 -296, -296, 219, -296, 314, 312, -296, -296, 308, -296,
1230 170, -296, 317, -296, 353, 319, 316, -296, -296, -3,
1231 219, 402, 219, 217, 324, -296, -296, -296, -296, -296,
1232 -296, 323, -296, 403, 331, 403, -296, 329, -296, 172,
1233 -296, -296, -296, -296, 282, 403, -296, -296, 510, -296,
1234 -3, 10, -3, -296, -296, 351, 10, -3, 345, 290,
1235 -296, -296, 496, -296, -296, -296, -296, 280, 336, 334,
1236 -296, -296, 342, -296, -296, 496, -296, -296, 496, 496,
1237 328, 344, 262, 330, -296, 403, -296, 181, -296, 343,
1238 248, -296, 29, 740, 280, -296, -296, 108, 248, -296,
1239 403, 248, 219, -296, 24, -296, -3, 347, -296, 349,
1240 -296, 348, 219, -296, -296, 219, -296, 604, -296, 448,
1241 -296, -296, -296, -296, -296, 332, -296, -296, -296, -3,
1242 -296, -296, 371, -296, -296, -296, -296, -296, -296, 25,
1243 -296, -296, -296, -296, 352, 241, -296, -296, -296, 350,
1244 -296, -296, -296, -296, -296, -296, 403, 196, -296, -296,
1245 -296, -296, -296, -296, 361, 362, -296, 364, 369, -296,
1246 42, -296, -296, -296, -296, 22, 188, -296, -296, -296,
1247 -296, -296, -296, -296, -296, 354, 357, 202, -296, 280,
1248 388, -296, -296, 370, 373, -296, -296, -296, -296, 16,
1249 282, 403, 367, -296, -296, 348, -296, -296, -296, 403,
1250 -296, 403, 77, -296, -296, -296, -296, -296, 448, 367,
1251 403, -296, 57, 207, -296, -296, -296, -296, -296, -296,
1252 -296, -296, -296, 57, 36, -296, -296, -296, 39, -296,
1253 -296, -296
Lev Walkin418298d2006-07-13 08:24:20 +00001254};
1255
1256/* YYPGOTO[NTERM-NUM]. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001257static const yytype_int16 yypgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001258{
Lev Walkin59165cf2017-09-11 06:24:45 -07001259 -296, -296, 461, 326, -296, -296, 376, -296, 447, -296,
1260 -296, 441, -296, -296, -296, 399, -296, -296, -296, -296,
1261 -296, -296, 428, -296, 395, -296, -296, -296, 434, 355,
1262 -296, -106, -296, -296, 321, -296, 99, 322, 48, 115,
1263 -296, 128, 287, -296, -296, 163, -296, -296, -296, 3,
1264 -196, -172, -82, -296, -296, 422, -177, -296, -104, 157,
1265 -296, 358, -296, 168, -164, 310, 313, -296, -140, -296,
1266 -191, -188, -296, 52, -296, -76, -296, -296, -24, -296,
1267 -296, -296, -227, 380, -150, -296, -296, -296, 360, -237,
1268 -296, 179, 182, -258, -296, -296, 205, -296, -296, -296,
1269 -296, 175, -296, -296, -296, -296, -296, -296, -296, 47,
1270 55, -296, -296, -296, -296, -296, -296, -296, -296, -296,
1271 -296, -296, 54, 60, -220, -296, -296, 177, -296, 164,
1272 -296, 107, -296, -296, 171, -160, -296, -87, -296, -296,
1273 -296, -296, 11, 232, -12, -296, -295
Lev Walkin418298d2006-07-13 08:24:20 +00001274};
1275
1276/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1277 positive, shift that token. If negative, reduce the rule which
Lev Walkin752e9732017-08-04 02:06:22 -07001278 number is the opposite. If zero, do what YYDEFACT says.
1279 If YYTABLE_NINF, syntax error. */
Lev Walkin59165cf2017-09-11 06:24:45 -07001280#define YYTABLE_NINF -300
Lev Walkin0e90aa02013-03-19 16:17:13 -07001281static const yytype_int16 yytable[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001282{
Lev Walkin59165cf2017-09-11 06:24:45 -07001283 20, 154, 193, 193, 107, 107, 20, 349, 280, 322,
1284 110, 7, 323, 279, 7, 107, 7, 268, 350, 7,
1285 117, 497, 102, 15, 213, 15, 287, 134, 450, 1,
1286 2, 53, 90, 15, 115, 15, 15, 48, 328, 293,
1287 15, 9, 511, 69, 92, 511, 326, 327, 53, 316,
1288 12, 328, 69, 15, 52, 264, 265, 512, 264, 265,
1289 512, 90, 294, 511, 15, 16, 68, 91, 1, 2,
1290 24, 52, 15, 92, 329, 68, 264, 265, 512, 385,
1291 294, 15, 16, 15, 416, 21, 69, 329, 343, 1,
1292 2, 33, 360, -255, 154, 138, 91, 34, 134, 294,
1293 505, 427, 326, 327, 97, 375, 361, -255, 111, 68,
1294 404, 406, 407, 345, 137, 15, 410, 411, 104, 15,
1295 204, 205, 35, 386, 469, 328, 62, 173, 270, 49,
1296 36, 174, 103, 405, 384, 276, 466, 107, 107, 104,
1297 276, 107, 330, 335, 104, 481, 341, 442, 104, 104,
1298 519, 139, 107, 276, 506, 3, 513, 344, 507, 513,
1299 521, 329, 104, 231, 233, 140, 452, 17, 98, 161,
1300 273, 37, 276, 282, 288, -84, 292, 513, 300, 38,
1301 162, 104, 438, 300, 22, 137, 230, 232, 403, 464,
1302 444, 263, 269, 447, 469, 280, 469, 417, -299, 268,
1303 279, 189, -299, 39, 104, 449, 322, 15, 473, 323,
1304 439, 41, 338, 1, 2, 107, 339, 287, 445, 283,
1305 388, 448, 25, 189, 15, 54, 190, 42, 191, 346,
1306 1, 2, 26, 494, 1, 2, 55, 201, 202, 203,
1307 15, 204, 205, 206, 207, 208, 235, 236, 195, 474,
1308 191, 58, 364, 27, 237, 28, 365, 59, 60, 15,
1309 204, 205, 366, 369, 29, 1, 2, 154, 301, 302,
1310 201, 202, 203, 15, 204, 205, 206, 207, 208, 1,
1311 2, 371, 209, 238, 379, 372, 396, 94, 380, 398,
1312 397, 154, 239, 15, -26, 435, 61, 43, 240, 436,
1313 210, 393, 484, 393, 95, 458, 485, 241, 459, 224,
1314 225, 100, 401, 402, 389, 209, 490, 189, 520, 493,
1315 491, 517, 520, 211, 99, 491, 1, 2, 264, 265,
1316 430, 10, 242, 210, 10, 143, 144, 347, 348, 104,
1317 243, 113, 303, 142, 244, 353, 354, 356, 357, 264,
1318 265, 462, 463, 273, 486, 487, 211, 194, 194, 164,
1319 282, 168, 167, 169, 170, 288, 171, 172, 292, 175,
1320 176, 177, 300, 178, 182, 212, 201, 202, 203, 15,
1321 204, 205, 206, 207, 208, 235, 236, 180, 181, 183,
1322 184, 187, 185, 237, 186, 191, 201, 202, 203, 15,
1323 204, 205, 206, 207, 208, 235, 236, 188, 200, 228,
1324 234, 274, 275, 237, 15, 313, 342, 315, 351, 325,
1325 352, 209, 238, 378, 369, 359, 363, 370, 376, 382,
1326 377, 239, 381, 383, 384, 387, 391, 240, 300, 210,
1327 390, 209, 238, 483, -177, 394, 241, 408, 412, 419,
1328 423, 239, 428, 424, 429, 461, 189, 240, 437, 210,
1329 453, 465, 211, 454, 8, 23, 241, 488, 401, 483,
1330 470, 242, 40, 455, 471, 489, 189, 475, 476, 243,
1331 477, 212, 211, 244, 101, 478, 495, 165, 510, 496,
1332 500, 242, 96, 112, 93, 229, 460, 179, 479, 451,
1333 440, 212, 415, 244, 201, 202, 203, 15, 204, 205,
1334 206, 207, 208, 235, 236, 340, 518, 314, 201, 202,
1335 203, 15, 204, 205, 206, 207, 208, 1, 2, 155,
1336 441, 433, 498, 196, 425, 336, 503, 432, 337, 501,
1337 426, 499, 434, 472, 446, 289, 504, 395, 443, 209,
1338 238, 306, 0, 0, 0, 0, 0, 0, 0, 239,
1339 0, 0, 0, 209, 0, 240, 0, 210, 0, 0,
1340 0, 0, 0, 0, 241, 0, 0, 0, 0, 0,
1341 0, 210, 0, 0, 189, 0, 0, 0, 0, 0,
1342 211, 0, 0, 0, 0, 0, 0, 0, 0, 242,
1343 0, 0, 0, 0, 211, 0, 0, 0, 0, 212,
1344 0, 244, 201, 202, 203, 15, 204, 205, 206, 207,
1345 208, 235, 236, 212, 0, 0, 145, 0, 0, 0,
1346 146, 0, 0, 0, 147, 70, 119, 0, 120, 148,
1347 0, 0, 0, 0, 0, 0, 0, 0, 121, 0,
1348 0, 0, 149, 0, 0, 0, 123, 209, 0, 124,
1349 72, 73, 74, 0, 0, 0, 0, 0, 150, 0,
1350 151, 75, 0, 0, 15, 317, 76, 127, 77, 128,
1351 1, 2, 0, 0, 0, 0, 78, 0, 129, 130,
1352 152, 153, 0, 0, 70, 79, 0, 80, 211, 0,
1353 0, 0, 81, 131, 82, 83, 84, 0, 0, 71,
1354 0, 0, 0, 0, 0, 0, 0, 178, 0, 72,
1355 73, 74, 0, 0, 0, 0, 0, 0, 0, 0,
1356 75, 0, 0, 0, 0, 76, 0, 77, 0, 0,
1357 0, 0, 0, 0, 0, 78, 0, 0, 0, 0,
1358 0, 0, 0, 0, 79, 0, 80, 143, 144, 0,
1359 0, 81, 145, 82, 83, 84, 146, 0, 0, 0,
1360 147, 70, 119, 0, 120, 148, 0, 0, 0, 0,
1361 0, 0, 0, 0, 121, 0, 0, 0, 149, 0,
1362 0, 0, 123, 0, 0, 124, 72, 73, 74, 0,
1363 0, 0, 0, 0, 150, 0, 151, 75, 0, 0,
1364 0, 126, 76, 127, 77, 128, 0, 0, 0, 0,
1365 0, 0, 78, 0, 129, 130, 152, 153, 0, 0,
1366 0, 79, 0, 80, 1, 2, 0, 0, 81, 131,
1367 82, 83, 84, 0, 0, 0, 0, 118, 70, 119,
1368 0, 120, 0, 0, 0, 0, 0, 0, 0, 0,
1369 0, 121, 0, 0, 0, 122, 0, 0, 0, 123,
1370 0, 0, 124, 72, 73, 74, 0, 0, 0, 0,
1371 0, 0, 0, 125, 75, 0, 0, 0, 126, 76,
1372 127, 77, 128, 0, 0, 0, 0, 0, 0, 78,
1373 0, 129, 130, 0, 0, 0, 0, 0, 79, 0,
1374 80, 0, 0, 0, 0, 81, 131, 82, 83, 84
Lev Walkin418298d2006-07-13 08:24:20 +00001375};
1376
Lev Walkin0e90aa02013-03-19 16:17:13 -07001377static const yytype_int16 yycheck[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001378{
Lev Walkin59165cf2017-09-11 06:24:45 -07001379 12, 107, 152, 153, 91, 92, 18, 244, 185, 200,
1380 92, 0, 200, 185, 3, 102, 5, 181, 245, 8,
1381 102, 5, 3, 11, 164, 11, 186, 103, 4, 17,
1382 18, 43, 56, 11, 36, 11, 11, 25, 41, 189,
1383 11, 0, 6, 55, 56, 6, 18, 19, 60, 199,
1384 113, 41, 64, 11, 43, 19, 20, 21, 19, 20,
1385 21, 85, 38, 6, 11, 12, 55, 56, 17, 18,
1386 115, 60, 11, 85, 77, 64, 19, 20, 21, 299,
1387 38, 11, 12, 11, 342, 42, 98, 77, 238, 17,
1388 18, 12, 110, 110, 200, 27, 85, 65, 174, 38,
1389 23, 359, 18, 19, 54, 282, 124, 124, 97, 98,
1390 330, 331, 332, 9, 103, 11, 336, 337, 120, 11,
1391 12, 13, 92, 300, 419, 41, 54, 114, 114, 117,
1392 92, 118, 113, 123, 118, 111, 111, 224, 225, 120,
1393 111, 228, 224, 225, 120, 123, 228, 374, 120, 120,
1394 114, 83, 239, 111, 77, 104, 120, 239, 81, 120,
1395 121, 77, 120, 175, 176, 97, 386, 114, 118, 49,
1396 182, 61, 111, 185, 186, 114, 188, 120, 190, 92,
1397 60, 120, 370, 195, 114, 174, 175, 176, 328, 409,
1398 378, 180, 181, 381, 489, 372, 491, 347, 114, 363,
1399 372, 88, 118, 3, 120, 382, 397, 11, 12, 397,
1400 370, 116, 114, 17, 18, 302, 118, 377, 378, 111,
1401 302, 381, 18, 88, 11, 47, 113, 29, 115, 241,
1402 17, 18, 28, 470, 17, 18, 62, 8, 9, 10,
1403 11, 12, 13, 14, 15, 16, 17, 18, 113, 437,
1404 115, 117, 114, 49, 25, 51, 118, 117, 118, 11,
1405 12, 13, 274, 275, 60, 17, 18, 373, 39, 40,
1406 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1407 18, 114, 53, 54, 114, 118, 114, 114, 118, 7,
1408 118, 397, 63, 11, 47, 114, 113, 50, 69, 118,
1409 71, 313, 114, 315, 117, 392, 118, 78, 395, 19,
1410 20, 18, 324, 325, 303, 53, 114, 88, 514, 469,
1411 118, 114, 518, 94, 113, 118, 17, 18, 19, 20,
1412 68, 5, 103, 71, 8, 17, 18, 37, 38, 120,
1413 111, 114, 113, 3, 115, 108, 109, 106, 107, 19,
1414 20, 19, 20, 365, 458, 459, 94, 152, 153, 3,
1415 372, 89, 113, 89, 79, 377, 59, 89, 380, 119,
1416 119, 12, 384, 113, 113, 113, 8, 9, 10, 11,
1417 12, 13, 14, 15, 16, 17, 18, 123, 123, 43,
1418 89, 76, 113, 25, 113, 115, 8, 9, 10, 11,
1419 12, 13, 14, 15, 16, 17, 18, 113, 113, 3,
1420 121, 33, 113, 25, 11, 76, 105, 76, 114, 123,
1421 118, 53, 54, 115, 436, 105, 123, 122, 114, 76,
1422 118, 63, 115, 114, 118, 33, 113, 69, 450, 71,
1423 116, 53, 54, 455, 115, 114, 78, 96, 103, 113,
1424 116, 63, 124, 111, 110, 7, 88, 69, 115, 71,
1425 113, 90, 94, 114, 3, 18, 78, 113, 480, 481,
1426 118, 103, 31, 125, 124, 118, 88, 116, 116, 111,
1427 116, 113, 94, 115, 85, 116, 116, 111, 500, 116,
1428 123, 103, 64, 98, 60, 174, 397, 142, 450, 384,
1429 372, 113, 339, 115, 8, 9, 10, 11, 12, 13,
1430 14, 15, 16, 17, 18, 228, 513, 195, 8, 9,
1431 10, 11, 12, 13, 14, 15, 16, 17, 18, 107,
1432 373, 363, 480, 153, 355, 225, 489, 362, 225, 485,
1433 358, 481, 365, 436, 380, 187, 491, 315, 377, 53,
1434 54, 191, -1, -1, -1, -1, -1, -1, -1, 63,
1435 -1, -1, -1, 53, -1, 69, -1, 71, -1, -1,
1436 -1, -1, -1, -1, 78, -1, -1, -1, -1, -1,
1437 -1, 71, -1, -1, 88, -1, -1, -1, -1, -1,
1438 94, -1, -1, -1, -1, -1, -1, -1, -1, 103,
1439 -1, -1, -1, -1, 94, -1, -1, -1, -1, 113,
1440 -1, 115, 8, 9, 10, 11, 12, 13, 14, 15,
1441 16, 17, 18, 113, -1, -1, 22, -1, -1, -1,
1442 26, -1, -1, -1, 30, 31, 32, -1, 34, 35,
1443 -1, -1, -1, -1, -1, -1, -1, -1, 44, -1,
1444 -1, -1, 48, -1, -1, -1, 52, 53, -1, 55,
1445 56, 57, 58, -1, -1, -1, -1, -1, 64, -1,
1446 66, 67, -1, -1, 11, 71, 72, 73, 74, 75,
1447 17, 18, -1, -1, -1, -1, 82, -1, 84, 85,
1448 86, 87, -1, -1, 31, 91, -1, 93, 94, -1,
1449 -1, -1, 98, 99, 100, 101, 102, -1, -1, 46,
1450 -1, -1, -1, -1, -1, -1, -1, 113, -1, 56,
1451 57, 58, -1, -1, -1, -1, -1, -1, -1, -1,
1452 67, -1, -1, -1, -1, 72, -1, 74, -1, -1,
1453 -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
1454 -1, -1, -1, -1, 91, -1, 93, 17, 18, -1,
1455 -1, 98, 22, 100, 101, 102, 26, -1, -1, -1,
1456 30, 31, 32, -1, 34, 35, -1, -1, -1, -1,
1457 -1, -1, -1, -1, 44, -1, -1, -1, 48, -1,
1458 -1, -1, 52, -1, -1, 55, 56, 57, 58, -1,
1459 -1, -1, -1, -1, 64, -1, 66, 67, -1, -1,
1460 -1, 71, 72, 73, 74, 75, -1, -1, -1, -1,
1461 -1, -1, 82, -1, 84, 85, 86, 87, -1, -1,
1462 -1, 91, -1, 93, 17, 18, -1, -1, 98, 99,
1463 100, 101, 102, -1, -1, -1, -1, 30, 31, 32,
1464 -1, 34, -1, -1, -1, -1, -1, -1, -1, -1,
1465 -1, 44, -1, -1, -1, 48, -1, -1, -1, 52,
1466 -1, -1, 55, 56, 57, 58, -1, -1, -1, -1,
1467 -1, -1, -1, 66, 67, -1, -1, -1, 71, 72,
1468 73, 74, 75, -1, -1, -1, -1, -1, -1, 82,
1469 -1, 84, 85, -1, -1, -1, -1, -1, 91, -1,
1470 93, -1, -1, -1, -1, 98, 99, 100, 101, 102
Lev Walkin418298d2006-07-13 08:24:20 +00001471};
1472
1473/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1474 symbol of state STATE-NUM. */
Lev Walkinbe518fa2017-09-07 02:05:28 -07001475static const yytype_uint16 yystos[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001476{
Lev Walkin59165cf2017-09-11 06:24:45 -07001477 0, 17, 18, 104, 127, 128, 129, 268, 128, 0,
1478 129, 130, 113, 131, 132, 11, 12, 114, 133, 134,
1479 270, 42, 114, 134, 115, 18, 28, 49, 51, 60,
1480 135, 136, 137, 12, 65, 92, 92, 61, 92, 3,
1481 137, 116, 29, 50, 138, 139, 151, 152, 25, 117,
1482 153, 154, 268, 270, 47, 62, 143, 144, 117, 117,
1483 118, 113, 54, 145, 146, 148, 149, 150, 268, 270,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001484 31, 46, 56, 57, 58, 67, 72, 74, 82, 91,
Lev Walkin59165cf2017-09-11 06:24:45 -07001485 93, 98, 100, 101, 102, 140, 141, 156, 158, 193,
1486 204, 268, 270, 154, 114, 117, 148, 54, 118, 113,
1487 18, 141, 3, 113, 120, 178, 179, 263, 264, 265,
1488 178, 268, 150, 114, 142, 36, 168, 178, 30, 32,
1489 34, 44, 48, 52, 55, 66, 71, 73, 75, 84,
1490 85, 99, 159, 160, 201, 202, 204, 268, 27, 83,
1491 97, 266, 3, 17, 18, 22, 26, 30, 35, 48,
1492 64, 66, 86, 87, 157, 181, 185, 186, 187, 201,
1493 203, 49, 60, 267, 3, 132, 147, 113, 89, 89,
1494 79, 59, 89, 114, 118, 119, 119, 12, 113, 155,
1495 123, 123, 113, 43, 89, 113, 113, 76, 113, 88,
1496 113, 115, 209, 210, 222, 113, 209, 208, 210, 211,
1497 113, 8, 9, 10, 12, 13, 14, 15, 16, 53,
1498 71, 94, 113, 194, 196, 197, 198, 228, 261, 262,
1499 268, 270, 271, 272, 19, 20, 170, 171, 3, 160,
1500 268, 270, 268, 270, 121, 17, 18, 25, 54, 63,
1501 69, 78, 103, 111, 115, 157, 180, 194, 214, 215,
1502 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
1503 227, 229, 230, 268, 19, 20, 188, 189, 190, 268,
1504 114, 252, 253, 270, 33, 113, 111, 166, 167, 177,
1505 182, 263, 270, 111, 258, 259, 260, 261, 270, 187,
1506 254, 255, 270, 210, 38, 163, 164, 165, 177, 182,
1507 270, 39, 40, 113, 212, 213, 214, 239, 240, 242,
1508 244, 245, 246, 76, 163, 76, 210, 71, 155, 161,
1509 162, 181, 196, 197, 195, 123, 18, 19, 41, 77,
1510 178, 191, 192, 250, 251, 178, 191, 192, 114, 118,
1511 168, 178, 105, 210, 178, 9, 270, 37, 38, 215,
1512 208, 114, 118, 108, 109, 205, 106, 107, 206, 105,
1513 110, 124, 243, 123, 114, 118, 270, 256, 257, 270,
1514 122, 114, 118, 183, 184, 182, 114, 118, 115, 114,
1515 118, 115, 76, 114, 118, 250, 182, 33, 178, 268,
1516 116, 113, 269, 270, 114, 269, 114, 118, 7, 199,
1517 200, 270, 270, 194, 250, 123, 250, 250, 96, 169,
1518 250, 250, 103, 172, 173, 171, 219, 210, 231, 113,
1519 232, 233, 234, 116, 111, 217, 218, 219, 124, 110,
1520 68, 226, 227, 189, 253, 114, 118, 115, 197, 261,
1521 167, 185, 208, 260, 197, 261, 255, 197, 261, 182,
1522 4, 165, 250, 113, 114, 125, 247, 248, 263, 263,
1523 162, 7, 19, 20, 250, 90, 111, 235, 236, 272,
1524 118, 124, 257, 12, 197, 116, 116, 116, 116, 164,
1525 241, 123, 249, 270, 114, 118, 184, 184, 113, 118,
1526 114, 118, 207, 210, 215, 116, 116, 5, 199, 249,
1527 123, 248, 174, 235, 236, 23, 77, 81, 237, 238,
1528 270, 6, 21, 120, 175, 176, 190, 114, 175, 114,
1529 176, 121
Lev Walkin418298d2006-07-13 08:24:20 +00001530};
1531
Lev Walkinf15320b2004-06-03 03:38:44 +00001532#define yyerrok (yyerrstatus = 0)
1533#define yyclearin (yychar = YYEMPTY)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001534#define YYEMPTY (-2)
Lev Walkinf15320b2004-06-03 03:38:44 +00001535#define YYEOF 0
Lev Walkin418298d2006-07-13 08:24:20 +00001536
Lev Walkinf15320b2004-06-03 03:38:44 +00001537#define YYACCEPT goto yyacceptlab
Lev Walkin418298d2006-07-13 08:24:20 +00001538#define YYABORT goto yyabortlab
Lev Walkin0e90aa02013-03-19 16:17:13 -07001539#define YYERROR goto yyerrorlab
1540
Lev Walkin418298d2006-07-13 08:24:20 +00001541
1542/* Like YYERROR except do call yyerror. This remains here temporarily
1543 to ease the transition to the new meaning of YYERROR, for GCC.
Lev Walkin752e9732017-08-04 02:06:22 -07001544 Once GCC version 2 has supplanted version 1, this can go. */
Lev Walkin418298d2006-07-13 08:24:20 +00001545
Lev Walkinf15320b2004-06-03 03:38:44 +00001546#define YYFAIL goto yyerrlab
Lev Walkin418298d2006-07-13 08:24:20 +00001547
Lev Walkinf15320b2004-06-03 03:38:44 +00001548#define YYRECOVERING() (!!yyerrstatus)
Lev Walkin418298d2006-07-13 08:24:20 +00001549
Lev Walkin752e9732017-08-04 02:06:22 -07001550#define YYBACKUP(Token, Value) \
1551do \
1552 if (yychar == YYEMPTY && yylen == 1) \
1553 { \
1554 yychar = (Token); \
1555 yylval = (Value); \
1556 yytoken = YYTRANSLATE (yychar); \
1557 YYPOPSTACK (1); \
1558 goto yybackup; \
1559 } \
1560 else \
1561 { \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001562 yyerror (YY_("syntax error: cannot back up")); \
Lev Walkin418298d2006-07-13 08:24:20 +00001563 YYERROR; \
1564 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001565while (YYID (0))
1566
Lev Walkin752e9732017-08-04 02:06:22 -07001567
Lev Walkinf15320b2004-06-03 03:38:44 +00001568#define YYTERROR 1
1569#define YYERRCODE 256
1570
Lev Walkin418298d2006-07-13 08:24:20 +00001571
Lev Walkin752e9732017-08-04 02:06:22 -07001572/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1573 If N is 0, then set CURRENT to the empty location which ends
1574 the previous symbol: RHS[0] (always defined). */
1575
1576#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1577#ifndef YYLLOC_DEFAULT
1578# define YYLLOC_DEFAULT(Current, Rhs, N) \
1579 do \
1580 if (YYID (N)) \
1581 { \
1582 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1583 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1584 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1585 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1586 } \
1587 else \
1588 { \
1589 (Current).first_line = (Current).last_line = \
1590 YYRHSLOC (Rhs, 0).last_line; \
1591 (Current).first_column = (Current).last_column = \
1592 YYRHSLOC (Rhs, 0).last_column; \
1593 } \
1594 while (YYID (0))
1595#endif
1596
1597
1598/* YY_LOCATION_PRINT -- Print the location on the stream.
1599 This macro was not mandated originally: define only if we know
1600 we won't break user code: when these are the locations we know. */
1601
Lev Walkin0e90aa02013-03-19 16:17:13 -07001602#ifndef YY_LOCATION_PRINT
Lev Walkin752e9732017-08-04 02:06:22 -07001603# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1604# define YY_LOCATION_PRINT(File, Loc) \
1605 fprintf (File, "%d.%d-%d.%d", \
1606 (Loc).first_line, (Loc).first_column, \
1607 (Loc).last_line, (Loc).last_column)
1608# else
1609# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1610# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07001611#endif
1612
1613
Lev Walkin418298d2006-07-13 08:24:20 +00001614/* YYLEX -- calling `yylex' with the right arguments. */
Lev Walkin752e9732017-08-04 02:06:22 -07001615
Lev Walkin0e90aa02013-03-19 16:17:13 -07001616#ifdef YYLEX_PARAM
1617# define YYLEX yylex (YYLEX_PARAM)
1618#else
1619# define YYLEX yylex ()
1620#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001621
Lev Walkin418298d2006-07-13 08:24:20 +00001622/* Enable debugging if requested. */
1623#if YYDEBUG
Lev Walkinfb872bd2006-03-18 06:53:11 +00001624
Lev Walkin418298d2006-07-13 08:24:20 +00001625# ifndef YYFPRINTF
1626# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1627# define YYFPRINTF fprintf
1628# endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001629
Lev Walkin418298d2006-07-13 08:24:20 +00001630# define YYDPRINTF(Args) \
1631do { \
1632 if (yydebug) \
1633 YYFPRINTF Args; \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001634} while (YYID (0))
1635
1636# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1637do { \
1638 if (yydebug) \
1639 { \
1640 YYFPRINTF (stderr, "%s ", Title); \
1641 yy_symbol_print (stderr, \
1642 Type, Value); \
1643 YYFPRINTF (stderr, "\n"); \
1644 } \
1645} while (YYID (0))
1646
1647
1648/*--------------------------------.
1649| Print this symbol on YYOUTPUT. |
1650`--------------------------------*/
1651
1652/*ARGSUSED*/
1653#if (defined __STDC__ || defined __C99__FUNC__ \
1654 || defined __cplusplus || defined _MSC_VER)
1655static void
1656yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1657#else
1658static void
1659yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1660 FILE *yyoutput;
1661 int yytype;
1662 YYSTYPE const * const yyvaluep;
1663#endif
1664{
1665 if (!yyvaluep)
1666 return;
1667# ifdef YYPRINT
1668 if (yytype < YYNTOKENS)
1669 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1670# else
1671 YYUSE (yyoutput);
1672# endif
Lev Walkin752e9732017-08-04 02:06:22 -07001673 switch (yytype)
1674 {
1675 default:
1676 break;
1677 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001678}
1679
1680
1681/*--------------------------------.
1682| Print this symbol on YYOUTPUT. |
1683`--------------------------------*/
1684
1685#if (defined __STDC__ || defined __C99__FUNC__ \
1686 || defined __cplusplus || defined _MSC_VER)
1687static void
1688yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1689#else
1690static void
1691yy_symbol_print (yyoutput, yytype, yyvaluep)
1692 FILE *yyoutput;
1693 int yytype;
1694 YYSTYPE const * const yyvaluep;
1695#endif
1696{
1697 if (yytype < YYNTOKENS)
1698 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1699 else
1700 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1701
1702 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1703 YYFPRINTF (yyoutput, ")");
1704}
1705
1706/*------------------------------------------------------------------.
1707| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1708| TOP (included). |
1709`------------------------------------------------------------------*/
1710
1711#if (defined __STDC__ || defined __C99__FUNC__ \
1712 || defined __cplusplus || defined _MSC_VER)
1713static void
Lev Walkin752e9732017-08-04 02:06:22 -07001714yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001715#else
1716static void
Lev Walkin752e9732017-08-04 02:06:22 -07001717yy_stack_print (bottom, top)
1718 yytype_int16 *bottom;
1719 yytype_int16 *top;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001720#endif
1721{
1722 YYFPRINTF (stderr, "Stack now");
Lev Walkin752e9732017-08-04 02:06:22 -07001723 for (; bottom <= top; ++bottom)
1724 YYFPRINTF (stderr, " %d", *bottom);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001725 YYFPRINTF (stderr, "\n");
1726}
1727
1728# define YY_STACK_PRINT(Bottom, Top) \
1729do { \
1730 if (yydebug) \
1731 yy_stack_print ((Bottom), (Top)); \
1732} while (YYID (0))
1733
1734
1735/*------------------------------------------------.
1736| Report that the YYRULE is going to be reduced. |
1737`------------------------------------------------*/
1738
1739#if (defined __STDC__ || defined __C99__FUNC__ \
1740 || defined __cplusplus || defined _MSC_VER)
1741static void
1742yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1743#else
1744static void
1745yy_reduce_print (yyvsp, yyrule)
1746 YYSTYPE *yyvsp;
1747 int yyrule;
1748#endif
1749{
1750 int yynrhs = yyr2[yyrule];
1751 int yyi;
1752 unsigned long int yylno = yyrline[yyrule];
1753 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1754 yyrule - 1, yylno);
1755 /* The symbols being reduced. */
1756 for (yyi = 0; yyi < yynrhs; yyi++)
1757 {
Lev Walkin752e9732017-08-04 02:06:22 -07001758 fprintf (stderr, " $%d = ", yyi + 1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001759 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1760 &(yyvsp[(yyi + 1) - (yynrhs)])
1761 );
Lev Walkin752e9732017-08-04 02:06:22 -07001762 fprintf (stderr, "\n");
Lev Walkin0e90aa02013-03-19 16:17:13 -07001763 }
1764}
1765
1766# define YY_REDUCE_PRINT(Rule) \
1767do { \
1768 if (yydebug) \
1769 yy_reduce_print (yyvsp, Rule); \
1770} while (YYID (0))
1771
Lev Walkin418298d2006-07-13 08:24:20 +00001772/* Nonzero means print parse trace. It is left uninitialized so that
1773 multiple parsers can coexist. */
1774int yydebug;
1775#else /* !YYDEBUG */
1776# define YYDPRINTF(Args)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001777# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1778# define YY_STACK_PRINT(Bottom, Top)
1779# define YY_REDUCE_PRINT(Rule)
Lev Walkin418298d2006-07-13 08:24:20 +00001780#endif /* !YYDEBUG */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001781
Lev Walkin0e90aa02013-03-19 16:17:13 -07001782
Lev Walkin418298d2006-07-13 08:24:20 +00001783/* YYINITDEPTH -- initial size of the parser's stacks. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001784#ifndef YYINITDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001785# define YYINITDEPTH 200
Lev Walkinf15320b2004-06-03 03:38:44 +00001786#endif
1787
Lev Walkin418298d2006-07-13 08:24:20 +00001788/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1789 if the built-in stack extension method is used).
1790
1791 Do not make this value too large; the results are undefined if
Lev Walkin0e90aa02013-03-19 16:17:13 -07001792 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Lev Walkin418298d2006-07-13 08:24:20 +00001793 evaluated with infinite-precision integer arithmetic. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001794
Lev Walkinf15320b2004-06-03 03:38:44 +00001795#ifndef YYMAXDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001796# define YYMAXDEPTH 10000
Lev Walkinf15320b2004-06-03 03:38:44 +00001797#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001798
Lev Walkin752e9732017-08-04 02:06:22 -07001799
Lev Walkinf15320b2004-06-03 03:38:44 +00001800
Lev Walkin418298d2006-07-13 08:24:20 +00001801#if YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +00001802
Lev Walkin418298d2006-07-13 08:24:20 +00001803# ifndef yystrlen
Lev Walkin0e90aa02013-03-19 16:17:13 -07001804# if defined __GLIBC__ && defined _STRING_H
Lev Walkin418298d2006-07-13 08:24:20 +00001805# define yystrlen strlen
1806# else
1807/* Return the length of YYSTR. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001808#if (defined __STDC__ || defined __C99__FUNC__ \
1809 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001810static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001811yystrlen (const char *yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001812#else
1813static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001814yystrlen (yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001815 const char *yystr;
1816#endif
Lev Walkina00d6b32006-03-21 03:40:38 +00001817{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001818 YYSIZE_T yylen;
1819 for (yylen = 0; yystr[yylen]; yylen++)
Lev Walkin418298d2006-07-13 08:24:20 +00001820 continue;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001821 return yylen;
Lev Walkin418298d2006-07-13 08:24:20 +00001822}
1823# endif
1824# endif
1825
1826# ifndef yystpcpy
Lev Walkin0e90aa02013-03-19 16:17:13 -07001827# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Lev Walkin418298d2006-07-13 08:24:20 +00001828# define yystpcpy stpcpy
1829# else
1830/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1831 YYDEST. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001832#if (defined __STDC__ || defined __C99__FUNC__ \
1833 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001834static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001835yystpcpy (char *yydest, const char *yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001836#else
1837static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001838yystpcpy (yydest, yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001839 char *yydest;
1840 const char *yysrc;
1841#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001842{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001843 char *yyd = yydest;
1844 const char *yys = yysrc;
Lev Walkin418298d2006-07-13 08:24:20 +00001845
1846 while ((*yyd++ = *yys++) != '\0')
1847 continue;
1848
1849 return yyd - 1;
1850}
1851# endif
1852# endif
1853
Lev Walkin0e90aa02013-03-19 16:17:13 -07001854# ifndef yytnamerr
1855/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1856 quotes and backslashes, so that it's suitable for yyerror. The
1857 heuristic is that double-quoting is unnecessary unless the string
1858 contains an apostrophe, a comma, or backslash (other than
1859 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1860 null, do not copy; instead, return the length of what the result
1861 would have been. */
1862static YYSIZE_T
1863yytnamerr (char *yyres, const char *yystr)
Lev Walkin418298d2006-07-13 08:24:20 +00001864{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001865 if (*yystr == '"')
Lev Walkin418298d2006-07-13 08:24:20 +00001866 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07001867 YYSIZE_T yyn = 0;
1868 char const *yyp = yystr;
Lev Walkin418298d2006-07-13 08:24:20 +00001869
Lev Walkin0e90aa02013-03-19 16:17:13 -07001870 for (;;)
1871 switch (*++yyp)
1872 {
1873 case '\'':
1874 case ',':
1875 goto do_not_strip_quotes;
1876
1877 case '\\':
1878 if (*++yyp != '\\')
1879 goto do_not_strip_quotes;
1880 /* Fall through. */
1881 default:
1882 if (yyres)
1883 yyres[yyn] = *yyp;
1884 yyn++;
1885 break;
1886
1887 case '"':
1888 if (yyres)
1889 yyres[yyn] = '\0';
1890 return yyn;
1891 }
1892 do_not_strip_quotes: ;
Lev Walkin418298d2006-07-13 08:24:20 +00001893 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001894
1895 if (! yyres)
1896 return yystrlen (yystr);
1897
1898 return yystpcpy (yyres, yystr) - yyres;
Lev Walkin418298d2006-07-13 08:24:20 +00001899}
Lev Walkin0e90aa02013-03-19 16:17:13 -07001900# endif
Lev Walkin418298d2006-07-13 08:24:20 +00001901
Lev Walkin752e9732017-08-04 02:06:22 -07001902/* Copy into YYRESULT an error message about the unexpected token
1903 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1904 including the terminating null byte. If YYRESULT is null, do not
1905 copy anything; just return the number of bytes that would be
1906 copied. As a special case, return 0 if an ordinary "syntax error"
1907 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1908 size calculation. */
1909static YYSIZE_T
1910yysyntax_error (char *yyresult, int yystate, int yychar)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001911{
Lev Walkin752e9732017-08-04 02:06:22 -07001912 int yyn = yypact[yystate];
Lev Walkin0e90aa02013-03-19 16:17:13 -07001913
Lev Walkin752e9732017-08-04 02:06:22 -07001914 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1915 return 0;
1916 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07001917 {
Lev Walkin752e9732017-08-04 02:06:22 -07001918 int yytype = YYTRANSLATE (yychar);
1919 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1920 YYSIZE_T yysize = yysize0;
1921 YYSIZE_T yysize1;
1922 int yysize_overflow = 0;
1923 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1924 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1925 int yyx;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001926
Lev Walkin752e9732017-08-04 02:06:22 -07001927# if 0
1928 /* This is so xgettext sees the translatable formats that are
1929 constructed on the fly. */
1930 YY_("syntax error, unexpected %s");
1931 YY_("syntax error, unexpected %s, expecting %s");
1932 YY_("syntax error, unexpected %s, expecting %s or %s");
1933 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1934 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1935# endif
1936 char *yyfmt;
1937 char const *yyf;
1938 static char const yyunexpected[] = "syntax error, unexpected %s";
1939 static char const yyexpecting[] = ", expecting %s";
1940 static char const yyor[] = " or %s";
1941 char yyformat[sizeof yyunexpected
1942 + sizeof yyexpecting - 1
1943 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1944 * (sizeof yyor - 1))];
1945 char const *yyprefix = yyexpecting;
1946
1947 /* Start YYX at -YYN if negative to avoid negative indexes in
1948 YYCHECK. */
1949 int yyxbegin = yyn < 0 ? -yyn : 0;
1950
1951 /* Stay within bounds of both yycheck and yytname. */
1952 int yychecklim = YYLAST - yyn + 1;
1953 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1954 int yycount = 1;
1955
1956 yyarg[0] = yytname[yytype];
1957 yyfmt = yystpcpy (yyformat, yyunexpected);
1958
1959 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1960 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1961 {
1962 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1963 {
1964 yycount = 1;
1965 yysize = yysize0;
1966 yyformat[sizeof yyunexpected - 1] = '\0';
1967 break;
1968 }
1969 yyarg[yycount++] = yytname[yyx];
1970 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1971 yysize_overflow |= (yysize1 < yysize);
1972 yysize = yysize1;
1973 yyfmt = yystpcpy (yyfmt, yyprefix);
1974 yyprefix = yyor;
1975 }
1976
1977 yyf = YY_(yyformat);
1978 yysize1 = yysize + yystrlen (yyf);
1979 yysize_overflow |= (yysize1 < yysize);
1980 yysize = yysize1;
1981
1982 if (yysize_overflow)
1983 return YYSIZE_MAXIMUM;
1984
1985 if (yyresult)
1986 {
1987 /* Avoid sprintf, as that infringes on the user's name space.
1988 Don't have undefined behavior even if the translation
1989 produced a string with the wrong number of "%s"s. */
1990 char *yyp = yyresult;
1991 int yyi = 0;
1992 while ((*yyp = *yyf) != '\0')
1993 {
1994 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1995 {
1996 yyp += yytnamerr (yyp, yyarg[yyi++]);
1997 yyf += 2;
1998 }
1999 else
2000 {
2001 yyp++;
2002 yyf++;
2003 }
2004 }
2005 }
2006 return yysize;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002007 }
2008}
2009#endif /* YYERROR_VERBOSE */
Lev Walkin752e9732017-08-04 02:06:22 -07002010
Lev Walkin418298d2006-07-13 08:24:20 +00002011
2012/*-----------------------------------------------.
2013| Release the memory associated to this symbol. |
2014`-----------------------------------------------*/
2015
Lev Walkin0e90aa02013-03-19 16:17:13 -07002016/*ARGSUSED*/
2017#if (defined __STDC__ || defined __C99__FUNC__ \
2018 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00002019static void
Lev Walkin0e90aa02013-03-19 16:17:13 -07002020yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Lev Walkin418298d2006-07-13 08:24:20 +00002021#else
Lev Walkin0e90aa02013-03-19 16:17:13 -07002022static void
2023yydestruct (yymsg, yytype, yyvaluep)
2024 const char *yymsg;
Lev Walkin418298d2006-07-13 08:24:20 +00002025 int yytype;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002026 YYSTYPE *yyvaluep;
Lev Walkin418298d2006-07-13 08:24:20 +00002027#endif
2028{
Lev Walkin0e90aa02013-03-19 16:17:13 -07002029 YYUSE (yyvaluep);
2030
2031 if (!yymsg)
2032 yymsg = "Deleting";
2033 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
Lev Walkin418298d2006-07-13 08:24:20 +00002034
Lev Walkin752e9732017-08-04 02:06:22 -07002035 switch (yytype)
2036 {
2037
2038 default:
2039 break;
2040 }
Lev Walkina00d6b32006-03-21 03:40:38 +00002041}
Lev Walkin752e9732017-08-04 02:06:22 -07002042
2043
2044/* Prevent warnings from -Wmissing-prototypes. */
2045
2046#ifdef YYPARSE_PARAM
2047#if defined __STDC__ || defined __cplusplus
2048int yyparse (void *YYPARSE_PARAM);
2049#else
2050int yyparse ();
2051#endif
2052#else /* ! YYPARSE_PARAM */
2053#if defined __STDC__ || defined __cplusplus
2054int yyparse (void);
2055#else
2056int yyparse ();
2057#endif
2058#endif /* ! YYPARSE_PARAM */
Lev Walkin418298d2006-07-13 08:24:20 +00002059
2060
Lev Walkin0e90aa02013-03-19 16:17:13 -07002061
Lev Walkin752e9732017-08-04 02:06:22 -07002062/* The look-ahead symbol. */
Lev Walkin418298d2006-07-13 08:24:20 +00002063int yychar;
2064
Lev Walkin752e9732017-08-04 02:06:22 -07002065/* The semantic value of the look-ahead symbol. */
2066YYSTYPE yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00002067
Lev Walkin0e90aa02013-03-19 16:17:13 -07002068/* Number of syntax errors so far. */
Lev Walkin418298d2006-07-13 08:24:20 +00002069int yynerrs;
2070
Lev Walkinfb872bd2006-03-18 06:53:11 +00002071
Lev Walkin752e9732017-08-04 02:06:22 -07002072
Lev Walkin0e90aa02013-03-19 16:17:13 -07002073/*----------.
2074| yyparse. |
2075`----------*/
2076
2077#ifdef YYPARSE_PARAM
2078#if (defined __STDC__ || defined __C99__FUNC__ \
2079 || defined __cplusplus || defined _MSC_VER)
Lev Walkinfb872bd2006-03-18 06:53:11 +00002080int
Lev Walkin0e90aa02013-03-19 16:17:13 -07002081yyparse (void *YYPARSE_PARAM)
2082#else
2083int
2084yyparse (YYPARSE_PARAM)
2085 void *YYPARSE_PARAM;
2086#endif
2087#else /* ! YYPARSE_PARAM */
2088#if (defined __STDC__ || defined __C99__FUNC__ \
2089 || defined __cplusplus || defined _MSC_VER)
2090int
2091yyparse (void)
2092#else
2093int
2094yyparse ()
2095
2096#endif
2097#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00002098{
Lev Walkin752e9732017-08-04 02:06:22 -07002099
2100 int yystate;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002101 int yyn;
Lev Walkin418298d2006-07-13 08:24:20 +00002102 int yyresult;
Lev Walkin752e9732017-08-04 02:06:22 -07002103 /* Number of tokens to shift before error messages enabled. */
2104 int yyerrstatus;
2105 /* Look-ahead token as an internal (translated) token number. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002106 int yytoken = 0;
2107#if YYERROR_VERBOSE
2108 /* Buffer for error messages, and its allocated size. */
2109 char yymsgbuf[128];
2110 char *yymsg = yymsgbuf;
2111 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2112#endif
Lev Walkin418298d2006-07-13 08:24:20 +00002113
Lev Walkin752e9732017-08-04 02:06:22 -07002114 /* Three stacks and their tools:
2115 `yyss': related to states,
2116 `yyvs': related to semantic values,
2117 `yyls': related to locations.
2118
2119 Refer to the stacks thru separate pointers, to allow yyoverflow
2120 to reallocate them elsewhere. */
2121
2122 /* The state stack. */
2123 yytype_int16 yyssa[YYINITDEPTH];
2124 yytype_int16 *yyss = yyssa;
2125 yytype_int16 *yyssp;
2126
2127 /* The semantic value stack. */
2128 YYSTYPE yyvsa[YYINITDEPTH];
2129 YYSTYPE *yyvs = yyvsa;
2130 YYSTYPE *yyvsp;
2131
2132
2133
Lev Walkin0e90aa02013-03-19 16:17:13 -07002134#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
Lev Walkinf15320b2004-06-03 03:38:44 +00002135
Lev Walkin752e9732017-08-04 02:06:22 -07002136 YYSIZE_T yystacksize = YYINITDEPTH;
2137
2138 /* The variables used to return semantic value and location from the
2139 action routines. */
2140 YYSTYPE yyval;
2141
2142
Lev Walkin0e90aa02013-03-19 16:17:13 -07002143 /* The number of symbols on the RHS of the reduced rule.
2144 Keep to zero when no symbol should be popped. */
2145 int yylen = 0;
Lev Walkinf15320b2004-06-03 03:38:44 +00002146
Lev Walkin418298d2006-07-13 08:24:20 +00002147 YYDPRINTF ((stderr, "Starting parse\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002148
2149 yystate = 0;
2150 yyerrstatus = 0;
2151 yynerrs = 0;
Lev Walkin752e9732017-08-04 02:06:22 -07002152 yychar = YYEMPTY; /* Cause a token to be read. */
2153
2154 /* Initialize stack pointers.
2155 Waste one element of value and location stack
2156 so that they stay on the same level as the state stack.
2157 The wasted elements are never initialized. */
2158
2159 yyssp = yyss;
2160 yyvsp = yyvs;
2161
Lev Walkin418298d2006-07-13 08:24:20 +00002162 goto yysetstate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002163
Lev Walkin418298d2006-07-13 08:24:20 +00002164/*------------------------------------------------------------.
2165| yynewstate -- Push a new state, which is found in yystate. |
2166`------------------------------------------------------------*/
2167 yynewstate:
2168 /* In all cases, when you get here, the value and location stacks
Lev Walkin0e90aa02013-03-19 16:17:13 -07002169 have just been pushed. So pushing a state here evens the stacks. */
Lev Walkin418298d2006-07-13 08:24:20 +00002170 yyssp++;
2171
2172 yysetstate:
2173 *yyssp = yystate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002174
Lev Walkin0e90aa02013-03-19 16:17:13 -07002175 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002176 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002177 /* Get the current used size of the three stacks, in elements. */
Lev Walkin418298d2006-07-13 08:24:20 +00002178 YYSIZE_T yysize = yyssp - yyss + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002179
2180#ifdef yyoverflow
Lev Walkin418298d2006-07-13 08:24:20 +00002181 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002182 /* Give user a chance to reallocate the stack. Use copies of
Lev Walkin418298d2006-07-13 08:24:20 +00002183 these so that the &'s don't force the real ones into
2184 memory. */
2185 YYSTYPE *yyvs1 = yyvs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002186 yytype_int16 *yyss1 = yyss;
Lev Walkinf15320b2004-06-03 03:38:44 +00002187
Lev Walkin752e9732017-08-04 02:06:22 -07002188
Lev Walkin418298d2006-07-13 08:24:20 +00002189 /* Each stack pointer address is followed by the size of the
2190 data in use in that stack, in bytes. This used to be a
2191 conditional around just the two extra args, but that might
2192 be undefined if yyoverflow is a macro. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002193 yyoverflow (YY_("memory exhausted"),
Lev Walkin418298d2006-07-13 08:24:20 +00002194 &yyss1, yysize * sizeof (*yyssp),
2195 &yyvs1, yysize * sizeof (*yyvsp),
Lev Walkin752e9732017-08-04 02:06:22 -07002196
Lev Walkin418298d2006-07-13 08:24:20 +00002197 &yystacksize);
2198
2199 yyss = yyss1;
2200 yyvs = yyvs1;
2201 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002202#else /* no yyoverflow */
Lev Walkin418298d2006-07-13 08:24:20 +00002203# ifndef YYSTACK_RELOCATE
Lev Walkin0e90aa02013-03-19 16:17:13 -07002204 goto yyexhaustedlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002205# else
Lev Walkinf15320b2004-06-03 03:38:44 +00002206 /* Extend the stack our own way. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002207 if (YYMAXDEPTH <= yystacksize)
2208 goto yyexhaustedlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002209 yystacksize *= 2;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002210 if (YYMAXDEPTH < yystacksize)
Lev Walkinf15320b2004-06-03 03:38:44 +00002211 yystacksize = YYMAXDEPTH;
Lev Walkin418298d2006-07-13 08:24:20 +00002212
2213 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002214 yytype_int16 *yyss1 = yyss;
Lev Walkin418298d2006-07-13 08:24:20 +00002215 union yyalloc *yyptr =
2216 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2217 if (! yyptr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07002218 goto yyexhaustedlab;
Lev Walkin752e9732017-08-04 02:06:22 -07002219 YYSTACK_RELOCATE (yyss);
2220 YYSTACK_RELOCATE (yyvs);
2221
Lev Walkin418298d2006-07-13 08:24:20 +00002222# undef YYSTACK_RELOCATE
2223 if (yyss1 != yyssa)
2224 YYSTACK_FREE (yyss1);
2225 }
2226# endif
Lev Walkinf15320b2004-06-03 03:38:44 +00002227#endif /* no yyoverflow */
2228
Lev Walkin418298d2006-07-13 08:24:20 +00002229 yyssp = yyss + yysize - 1;
2230 yyvsp = yyvs + yysize - 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002231
Lev Walkin752e9732017-08-04 02:06:22 -07002232
Lev Walkin418298d2006-07-13 08:24:20 +00002233 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2234 (unsigned long int) yystacksize));
Lev Walkinf15320b2004-06-03 03:38:44 +00002235
Lev Walkin0e90aa02013-03-19 16:17:13 -07002236 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002237 YYABORT;
2238 }
2239
Lev Walkin418298d2006-07-13 08:24:20 +00002240 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Lev Walkinf15320b2004-06-03 03:38:44 +00002241
2242 goto yybackup;
Lev Walkin418298d2006-07-13 08:24:20 +00002243
2244/*-----------.
2245| yybackup. |
2246`-----------*/
2247yybackup:
Lev Walkinf15320b2004-06-03 03:38:44 +00002248
Lev Walkin0e90aa02013-03-19 16:17:13 -07002249 /* Do appropriate processing given the current state. Read a
Lev Walkin752e9732017-08-04 02:06:22 -07002250 look-ahead token if we need one and don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002251
Lev Walkin752e9732017-08-04 02:06:22 -07002252 /* First try to decide what to do without reference to look-ahead token. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002253 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07002254 if (yyn == YYPACT_NINF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002255 goto yydefault;
2256
Lev Walkin752e9732017-08-04 02:06:22 -07002257 /* Not known => get a look-ahead token if don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002258
Lev Walkin752e9732017-08-04 02:06:22 -07002259 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002260 if (yychar == YYEMPTY)
2261 {
Lev Walkin418298d2006-07-13 08:24:20 +00002262 YYDPRINTF ((stderr, "Reading a token: "));
Lev Walkinf15320b2004-06-03 03:38:44 +00002263 yychar = YYLEX;
2264 }
2265
Lev Walkin0e90aa02013-03-19 16:17:13 -07002266 if (yychar <= YYEOF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002267 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002268 yychar = yytoken = YYEOF;
Lev Walkin418298d2006-07-13 08:24:20 +00002269 YYDPRINTF ((stderr, "Now at end of input.\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002270 }
2271 else
2272 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002273 yytoken = YYTRANSLATE (yychar);
2274 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Lev Walkinf15320b2004-06-03 03:38:44 +00002275 }
2276
Lev Walkin0e90aa02013-03-19 16:17:13 -07002277 /* If the proper action on seeing token YYTOKEN is to reduce or to
Lev Walkin418298d2006-07-13 08:24:20 +00002278 detect an error, take that action. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002279 yyn += yytoken;
2280 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Lev Walkinf15320b2004-06-03 03:38:44 +00002281 goto yydefault;
Lev Walkinf15320b2004-06-03 03:38:44 +00002282 yyn = yytable[yyn];
Lev Walkin418298d2006-07-13 08:24:20 +00002283 if (yyn <= 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00002284 {
Lev Walkin752e9732017-08-04 02:06:22 -07002285 if (yyn == 0 || yyn == YYTABLE_NINF)
2286 goto yyerrlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002287 yyn = -yyn;
2288 goto yyreduce;
2289 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002290
Lev Walkin752e9732017-08-04 02:06:22 -07002291 if (yyn == YYFINAL)
2292 YYACCEPT;
2293
Lev Walkin418298d2006-07-13 08:24:20 +00002294 /* Count tokens shifted since error; after three, turn off error
2295 status. */
2296 if (yyerrstatus)
2297 yyerrstatus--;
Lev Walkinf15320b2004-06-03 03:38:44 +00002298
Lev Walkin752e9732017-08-04 02:06:22 -07002299 /* Shift the look-ahead token. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002300 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2301
Lev Walkin752e9732017-08-04 02:06:22 -07002302 /* Discard the shifted token unless it is eof. */
2303 if (yychar != YYEOF)
2304 yychar = YYEMPTY;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002305
Lev Walkinf15320b2004-06-03 03:38:44 +00002306 yystate = yyn;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002307 *++yyvsp = yylval;
2308
Lev Walkinf15320b2004-06-03 03:38:44 +00002309 goto yynewstate;
2310
Lev Walkina00d6b32006-03-21 03:40:38 +00002311
Lev Walkin418298d2006-07-13 08:24:20 +00002312/*-----------------------------------------------------------.
2313| yydefault -- do the default action for the current state. |
2314`-----------------------------------------------------------*/
2315yydefault:
Lev Walkinf15320b2004-06-03 03:38:44 +00002316 yyn = yydefact[yystate];
2317 if (yyn == 0)
2318 goto yyerrlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002319 goto yyreduce;
Lev Walkinf15320b2004-06-03 03:38:44 +00002320
Lev Walkin418298d2006-07-13 08:24:20 +00002321
2322/*-----------------------------.
2323| yyreduce -- Do a reduction. |
2324`-----------------------------*/
Lev Walkinf15320b2004-06-03 03:38:44 +00002325yyreduce:
Lev Walkin418298d2006-07-13 08:24:20 +00002326 /* yyn is the number of a rule to reduce with. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002327 yylen = yyr2[yyn];
Lev Walkinf15320b2004-06-03 03:38:44 +00002328
Lev Walkin418298d2006-07-13 08:24:20 +00002329 /* If YYLEN is nonzero, implement the default value of the action:
2330 `$$ = $1'.
2331
2332 Otherwise, the following line sets YYVAL to garbage.
2333 This behavior is undocumented and Bison
2334 users should not rely upon it. Assigning to YYVAL
2335 unconditionally makes the parser a bit smaller, and it avoids a
2336 GCC warning that YYVAL may be used uninitialized. */
2337 yyval = yyvsp[1-yylen];
2338
2339
Lev Walkin0e90aa02013-03-19 16:17:13 -07002340 YY_REDUCE_PRINT (yyn);
Lev Walkin418298d2006-07-13 08:24:20 +00002341 switch (yyn)
2342 {
2343 case 2:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002344#line 414 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002345 {
Lev Walkin752e9732017-08-04 02:06:22 -07002346 *(void **)param = (yyvsp[(2) - (2)].a_grammar);
2347 }
2348 break;
2349
2350 case 3:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002351#line 417 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002352 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002353 *(void **)param = (yyvsp[(1) - (1)].a_grammar);
Lev Walkin418298d2006-07-13 08:24:20 +00002354 }
2355 break;
2356
Lev Walkin752e9732017-08-04 02:06:22 -07002357 case 4:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002358#line 423 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002359 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002360 (yyval.a_grammar) = asn1p_new();
2361 checkmem((yyval.a_grammar));
2362 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(1) - (1)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002363 }
2364 break;
2365
Lev Walkin752e9732017-08-04 02:06:22 -07002366 case 5:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002367#line 428 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002368 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002369 (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar);
2370 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002371 }
2372 break;
2373
Lev Walkin752e9732017-08-04 02:06:22 -07002374 case 6:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002375#line 445 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002376 { currentModule = asn1p_module_new(); }
2377 break;
2378
Lev Walkin752e9732017-08-04 02:06:22 -07002379 case 7:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002380#line 450 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002381 {
Lev Walkinfb872bd2006-03-18 06:53:11 +00002382
Lev Walkin0e90aa02013-03-19 16:17:13 -07002383 (yyval.a_module) = currentModule;
Lev Walkina9532f42006-09-17 04:52:50 +00002384
Lev Walkin0e90aa02013-03-19 16:17:13 -07002385 if((yyvsp[(8) - (9)].a_module)) {
2386 asn1p_module_t tmp = *((yyval.a_module));
2387 *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module));
2388 *((yyvsp[(8) - (9)].a_module)) = tmp;
2389 asn1p_module_free((yyvsp[(8) - (9)].a_module));
Lev Walkinf15320b2004-06-03 03:38:44 +00002390 } else {
2391 /* There's a chance that a module is just plain empty */
Lev Walkinf15320b2004-06-03 03:38:44 +00002392 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002393
Lev Walkin0e90aa02013-03-19 16:17:13 -07002394 (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str);
2395 (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid);
2396 (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002397 }
2398 break;
2399
Lev Walkin752e9732017-08-04 02:06:22 -07002400 case 8:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002401#line 474 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002402 { (yyval.a_oid) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002403 break;
2404
Lev Walkin752e9732017-08-04 02:06:22 -07002405 case 9:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002406#line 475 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002407 { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002408 break;
2409
Lev Walkin752e9732017-08-04 02:06:22 -07002410 case 10:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002411#line 479 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002412 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002413 (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid);
Lev Walkin418298d2006-07-13 08:24:20 +00002414 }
2415 break;
2416
Lev Walkin752e9732017-08-04 02:06:22 -07002417 case 11:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002418#line 482 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002419 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002420 (yyval.a_oid) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002421 }
2422 break;
2423
Lev Walkin752e9732017-08-04 02:06:22 -07002424 case 12:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002425#line 488 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002426 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002427 (yyval.a_oid) = asn1p_oid_new();
2428 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002429 if((yyvsp[(1) - (1)].a_oid_arc).name)
2430 free((yyvsp[(1) - (1)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002431 }
2432 break;
2433
Lev Walkin752e9732017-08-04 02:06:22 -07002434 case 13:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002435#line 494 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002436 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002437 (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid);
2438 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002439 if((yyvsp[(2) - (2)].a_oid_arc).name)
2440 free((yyvsp[(2) - (2)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002441 }
2442 break;
2443
Lev Walkin752e9732017-08-04 02:06:22 -07002444 case 14:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002445#line 503 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002446 { /* iso */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002447 (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str);
2448 (yyval.a_oid_arc).number = -1;
Lev Walkin418298d2006-07-13 08:24:20 +00002449 }
2450 break;
2451
Lev Walkin752e9732017-08-04 02:06:22 -07002452 case 15:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002453#line 507 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002454 { /* iso(1) */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002455 (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str);
2456 (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002457 }
2458 break;
2459
Lev Walkin752e9732017-08-04 02:06:22 -07002460 case 16:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002461#line 511 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002462 { /* 1 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002463 (yyval.a_oid_arc).name = 0;
2464 (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002465 }
2466 break;
2467
Lev Walkin752e9732017-08-04 02:06:22 -07002468 case 17:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002469#line 521 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002470 { (yyval.a_module_flags) = MSF_NOFLAGS; }
Lev Walkin418298d2006-07-13 08:24:20 +00002471 break;
2472
Lev Walkin418298d2006-07-13 08:24:20 +00002473 case 18:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002474#line 522 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002475 {
Lev Walkin752e9732017-08-04 02:06:22 -07002476 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2477 }
2478 break;
2479
Lev Walkind523ea42017-09-06 22:15:08 -07002480 case 19:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002481#line 531 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07002482 {
2483 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2484 }
2485 break;
2486
Lev Walkin752e9732017-08-04 02:06:22 -07002487 case 20:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002488#line 534 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002489 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002490 (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002491 }
2492 break;
2493
Lev Walkin752e9732017-08-04 02:06:22 -07002494 case 21:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002495#line 543 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002496 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002497 (yyval.a_module_flags) = MSF_EXPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002498 }
2499 break;
2500
Lev Walkin752e9732017-08-04 02:06:22 -07002501 case 22:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002502#line 546 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002503 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002504 (yyval.a_module_flags) = MSF_IMPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002505 }
2506 break;
2507
Lev Walkin752e9732017-08-04 02:06:22 -07002508 case 23:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002509#line 549 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002510 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002511 (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002512 }
2513 break;
2514
Lev Walkin752e9732017-08-04 02:06:22 -07002515 case 24:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002516#line 552 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002517 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002518 (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED;
Lev Walkin418298d2006-07-13 08:24:20 +00002519 }
2520 break;
2521
Lev Walkin752e9732017-08-04 02:06:22 -07002522 case 25:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002523#line 556 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002524 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002525 /* X.680Amd1 specifies TAG and XER */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002526 if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) {
2527 (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS;
2528 } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) {
2529 (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002530 } else {
2531 fprintf(stderr,
Lev Walkind523ea42017-09-06 22:15:08 -07002532 "WARNING: %s INSTRUCTIONS at %s:%d: "
Lev Walkinf59d0752004-08-18 04:59:12 +00002533 "Unrecognized encoding reference\n",
Lev Walkind523ea42017-09-06 22:15:08 -07002534 (yyvsp[(1) - (2)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002535 (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002536 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002537 free((yyvsp[(1) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00002538 }
2539 break;
2540
Lev Walkin752e9732017-08-04 02:06:22 -07002541 case 26:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002542#line 577 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002543 { (yyval.a_module) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002544 break;
2545
Lev Walkin752e9732017-08-04 02:06:22 -07002546 case 27:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002547#line 578 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002548 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002549 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002550 }
2551 break;
2552
Lev Walkin752e9732017-08-04 02:06:22 -07002553 case 28:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002554#line 587 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002555 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002556 (yyval.a_module) = asn1p_module_new();
2557 AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next);
2558 AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next);
Lev Walkin1a49ced2017-11-06 00:07:00 -08002559 asn1p_module_move_members((yyval.a_module), (yyvsp[(3) - (3)].a_module));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002560
2561 asn1p_module_free((yyvsp[(1) - (3)].a_module));
2562 asn1p_module_free((yyvsp[(2) - (3)].a_module));
2563 asn1p_module_free((yyvsp[(3) - (3)].a_module));
Lev Walkin418298d2006-07-13 08:24:20 +00002564 }
2565 break;
2566
Lev Walkin752e9732017-08-04 02:06:22 -07002567 case 29:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002568#line 600 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002569 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002570 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002571 }
2572 break;
2573
Lev Walkin752e9732017-08-04 02:06:22 -07002574 case 30:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002575#line 603 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002576 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002577 if((yyvsp[(1) - (2)].a_module)) {
2578 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002579 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002580 (yyval.a_module) = (yyvsp[(2) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002581 break;
2582 }
Lev Walkin1a49ced2017-11-06 00:07:00 -08002583 asn1p_module_move_members((yyval.a_module), (yyvsp[(2) - (2)].a_module));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002584 asn1p_module_free((yyvsp[(2) - (2)].a_module));
Lev Walkin866bd7f2006-09-14 10:35:20 +00002585 }
2586 break;
2587
Lev Walkin418298d2006-07-13 08:24:20 +00002588 case 31:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002589#line 620 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002590 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002591 (yyval.a_module) = asn1p_module_new();
2592 checkmem((yyval.a_module));
2593 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2594 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
Lev Walkin1a49ced2017-11-06 00:07:00 -08002595 asn1p_module_member_add((yyval.a_module), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002596 }
2597 break;
2598
2599 case 32:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002600#line 627 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002601 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002602 (yyval.a_module) = asn1p_module_new();
2603 checkmem((yyval.a_module));
2604 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2605 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
Lev Walkin1a49ced2017-11-06 00:07:00 -08002606 asn1p_module_member_add((yyval.a_module), (yyvsp[(1) - (1)].a_expr));
Lev Walkina9532f42006-09-17 04:52:50 +00002607 }
Lev Walkin418298d2006-07-13 08:24:20 +00002608 break;
2609
Lev Walkin866bd7f2006-09-14 10:35:20 +00002610 case 33:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002611#line 641 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002612 {
2613 (yyval.a_module) = asn1p_module_new();
2614 checkmem((yyval.a_module));
2615 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2616 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
Lev Walkin1a49ced2017-11-06 00:07:00 -08002617 asn1p_module_member_add((yyval.a_module), (yyvsp[(1) - (1)].a_expr));
Lev Walkin752e9732017-08-04 02:06:22 -07002618 }
Lev Walkina9532f42006-09-17 04:52:50 +00002619 break;
2620
2621 case 34:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002622#line 649 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002623 { asn1p_lexer_hack_push_encoding_control(); }
2624 break;
2625
2626 case 35:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002627#line 650 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002628 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002629 fprintf(stderr,
2630 "WARNING: ENCODING-CONTROL %s "
Lev Walkind523ea42017-09-06 22:15:08 -07002631 "specification at %s:%d ignored\n",
2632 (yyvsp[(2) - (3)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002633 free((yyvsp[(2) - (3)].tv_str));
2634 (yyval.a_module) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002635 }
2636 break;
2637
Lev Walkin752e9732017-08-04 02:06:22 -07002638 case 36:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002639#line 662 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002640 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002641 return yyerror(
Lev Walkin70853052005-11-26 11:21:55 +00002642 "Attempt to redefine a standard basic string type, "
2643 "please comment out or remove this type redefinition.");
Lev Walkin418298d2006-07-13 08:24:20 +00002644 }
2645 break;
2646
Lev Walkin752e9732017-08-04 02:06:22 -07002647 case 37:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002648#line 675 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002649 { (yyval.a_module) = 0; }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002650 break;
2651
Lev Walkin752e9732017-08-04 02:06:22 -07002652 case 39:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002653#line 679 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002654 {
Lev Walkinb36317c2005-08-12 10:09:10 +00002655 if(!saved_aid && 0)
2656 return yyerror("Unterminated IMPORTS FROM, "
2657 "expected semicolon ';'");
2658 saved_aid = 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002659 (yyval.a_module) = (yyvsp[(2) - (3)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002660 }
2661 break;
2662
Lev Walkin752e9732017-08-04 02:06:22 -07002663 case 40:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002664#line 689 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002665 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002666 return yyerror("Empty IMPORTS list");
Lev Walkin418298d2006-07-13 08:24:20 +00002667 }
2668 break;
2669
Lev Walkin752e9732017-08-04 02:06:22 -07002670 case 41:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002671#line 695 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002672 { (yyval.a_module) = asn1p_module_new(); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002673 break;
2674
Lev Walkin752e9732017-08-04 02:06:22 -07002675 case 43:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002676#line 699 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002677 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002678 (yyval.a_module) = asn1p_module_new();
2679 checkmem((yyval.a_module));
2680 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002681 }
2682 break;
2683
Lev Walkin752e9732017-08-04 02:06:22 -07002684 case 44:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002685#line 704 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002686 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002687 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
2688 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002689 }
2690 break;
2691
Lev Walkin752e9732017-08-04 02:06:22 -07002692 case 45:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002693#line 711 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002694 { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); }
Lev Walkin418298d2006-07-13 08:24:20 +00002695 break;
2696
Lev Walkin752e9732017-08-04 02:06:22 -07002697 case 46:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002698#line 712 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002699 { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002700 break;
2701
Lev Walkin752e9732017-08-04 02:06:22 -07002702 case 47:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002703#line 716 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002704 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002705 (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports);
2706 (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str);
2707 (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid);
Lev Walkinb36317c2005-08-12 10:09:10 +00002708 /* This stupid thing is used for look-back hack. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002709 saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier);
2710 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002711 }
2712 break;
2713
Lev Walkin752e9732017-08-04 02:06:22 -07002714 case 48:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002715#line 727 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002716 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002717 (yyval.a_xports) = asn1p_xports_new();
2718 checkmem((yyval.a_xports));
Lev Walkin1a49ced2017-11-06 00:07:00 -08002719 TQ_ADD(&((yyval.a_xports)->xp_members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002720 }
2721 break;
2722
Lev Walkin752e9732017-08-04 02:06:22 -07002723 case 49:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002724#line 732 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002725 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002726 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
Lev Walkin1a49ced2017-11-06 00:07:00 -08002727 TQ_ADD(&((yyval.a_xports)->xp_members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002728 }
2729 break;
2730
Lev Walkin752e9732017-08-04 02:06:22 -07002731 case 50:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002732#line 739 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002733 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002734 (yyval.a_expr) = NEW_EXPR();
2735 checkmem((yyval.a_expr));
2736 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2737 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin418298d2006-07-13 08:24:20 +00002738 }
2739 break;
2740
Lev Walkin752e9732017-08-04 02:06:22 -07002741 case 51:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002742#line 745 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002743 { /* Completely equivalent to above */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002744 (yyval.a_expr) = NEW_EXPR();
2745 checkmem((yyval.a_expr));
2746 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2747 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002748 }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002749 break;
2750
Lev Walkin752e9732017-08-04 02:06:22 -07002751 case 52:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002752#line 751 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002753 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002754 (yyval.a_expr) = NEW_EXPR();
2755 checkmem((yyval.a_expr));
2756 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2757 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002758 }
2759 break;
2760
Lev Walkin752e9732017-08-04 02:06:22 -07002761 case 53:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002762#line 761 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002763 { (yyval.a_module) = 0; }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002764 break;
2765
Lev Walkin752e9732017-08-04 02:06:22 -07002766 case 54:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002767#line 762 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002768 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002769 (yyval.a_module) = asn1p_module_new();
2770 checkmem((yyval.a_module));
2771 if((yyvsp[(1) - (1)].a_xports)) {
2772 TQ_ADD(&((yyval.a_module)->exports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002773 } else {
2774 /* "EXPORTS ALL;" */
2775 }
2776 }
2777 break;
2778
Lev Walkin752e9732017-08-04 02:06:22 -07002779 case 55:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002780#line 774 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002781 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002782 (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports);
Lev Walkin418298d2006-07-13 08:24:20 +00002783 }
2784 break;
2785
Lev Walkin752e9732017-08-04 02:06:22 -07002786 case 56:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002787#line 777 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002788 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002789 (yyval.a_xports) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002790 }
2791 break;
2792
Lev Walkin752e9732017-08-04 02:06:22 -07002793 case 57:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002794#line 780 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002795 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002796 /* Empty EXPORTS clause effectively prohibits export. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002797 (yyval.a_xports) = asn1p_xports_new();
2798 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002799 }
2800 break;
2801
Lev Walkin752e9732017-08-04 02:06:22 -07002802 case 58:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002803#line 788 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002804 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002805 (yyval.a_xports) = asn1p_xports_new();
2806 assert((yyval.a_xports));
Lev Walkin1a49ced2017-11-06 00:07:00 -08002807 TQ_ADD(&((yyval.a_xports)->xp_members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002808 }
2809 break;
2810
Lev Walkin752e9732017-08-04 02:06:22 -07002811 case 59:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002812#line 793 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002813 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002814 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
Lev Walkin1a49ced2017-11-06 00:07:00 -08002815 TQ_ADD(&((yyval.a_xports)->xp_members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002816 }
2817 break;
2818
Lev Walkin752e9732017-08-04 02:06:22 -07002819 case 60:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002820#line 800 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002821 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002822 (yyval.a_expr) = NEW_EXPR();
2823 checkmem((yyval.a_expr));
2824 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2825 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin418298d2006-07-13 08:24:20 +00002826 }
2827 break;
2828
Lev Walkin752e9732017-08-04 02:06:22 -07002829 case 61:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002830#line 806 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002831 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002832 (yyval.a_expr) = NEW_EXPR();
2833 checkmem((yyval.a_expr));
2834 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2835 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002836 }
Lev Walkin418298d2006-07-13 08:24:20 +00002837 break;
2838
Lev Walkin752e9732017-08-04 02:06:22 -07002839 case 62:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002840#line 812 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002841 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002842 (yyval.a_expr) = NEW_EXPR();
2843 checkmem((yyval.a_expr));
2844 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2845 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002846 }
2847 break;
2848
Lev Walkin752e9732017-08-04 02:06:22 -07002849 case 63:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002850#line 821 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002851 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002852 break;
2853
Lev Walkin752e9732017-08-04 02:06:22 -07002854 case 64:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002855#line 824 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002856 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002857 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
2858 assert((yyval.a_expr)->Identifier == 0);
2859 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
2860 (yyval.a_expr)->meta_type = AMT_VALUESET;
2861 (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002862 }
2863 break;
2864
Lev Walkin752e9732017-08-04 02:06:22 -07002865 case 65:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002866#line 844 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002867 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002868 (yyval.a_expr) = NEW_EXPR();
2869 checkmem((yyval.a_expr));
2870 (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref);
2871 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2872 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002873 }
2874 break;
2875
Lev Walkin59165cf2017-09-11 06:24:45 -07002876 case 66:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002877#line 854 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002878 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002879 (yyval.a_expr) = NEW_EXPR();
2880 checkmem((yyval.a_expr));
2881 (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref);
2882 (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr);
2883 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2884 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002885 }
2886 break;
2887
Lev Walkin59165cf2017-09-11 06:24:45 -07002888 case 67:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002889#line 874 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002890 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002891 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2892 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2893 assert((yyval.a_expr)->expr_type);
2894 assert((yyval.a_expr)->meta_type);
Lev Walkin418298d2006-07-13 08:24:20 +00002895 }
2896 break;
2897
Lev Walkin59165cf2017-09-11 06:24:45 -07002898 case 68:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002899#line 880 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002900 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002901 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2902 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2903 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
2904 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00002905 }
2906 break;
2907
Lev Walkin59165cf2017-09-11 06:24:45 -07002908 case 69:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002909#line 896 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07002910 {
2911 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2912 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2913 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2914 }
2915 break;
2916
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002917 case 70:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002918#line 902 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002919 {
2920 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2921 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2922 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2923 }
2924 break;
2925
Lev Walkin4a4543f2006-10-13 12:37:39 +00002926 case 71:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002927#line 910 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002928 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002929 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002930 (yyval.a_plist) = asn1p_paramlist_new(yylineno);
2931 checkmem((yyval.a_plist));
2932 ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(1) - (1)].a_parg).governor, (yyvsp[(1) - (1)].a_parg).argument);
Lev Walkinf15320b2004-06-03 03:38:44 +00002933 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002934 asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002935 free((yyvsp[(1) - (1)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002936 }
2937 break;
2938
Lev Walkin59165cf2017-09-11 06:24:45 -07002939 case 72:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002940#line 919 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002941 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002942 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002943 (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist);
2944 ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(3) - (3)].a_parg).governor, (yyvsp[(3) - (3)].a_parg).argument);
Lev Walkinf15320b2004-06-03 03:38:44 +00002945 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002946 asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002947 free((yyvsp[(3) - (3)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002948 }
2949 break;
2950
Lev Walkin59165cf2017-09-11 06:24:45 -07002951 case 73:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002952#line 930 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002953 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002954 (yyval.a_parg).governor = NULL;
2955 (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00002956 }
2957 break;
2958
Lev Walkin59165cf2017-09-11 06:24:45 -07002959 case 74:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002960#line 934 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07002961 {
2962 int ret;
2963 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
2964 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
2965 checkmem(ret == 0);
2966 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
2967 free((yyvsp[(1) - (3)].tv_str));
2968 }
2969 break;
2970
Lev Walkin866bd7f2006-09-14 10:35:20 +00002971 case 75:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002972#line 942 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002973 {
2974 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002975 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002976 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002977 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002978 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002979 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00002980 }
2981 break;
2982
2983 case 76:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002984#line 950 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002985 {
Lev Walkina9532f42006-09-17 04:52:50 +00002986 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002987 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin59165cf2017-09-11 06:24:45 -07002988 ret = asn1p_ref_add_component((yyval.a_parg).governor,
2989 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkina9532f42006-09-17 04:52:50 +00002990 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002991 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkina9532f42006-09-17 04:52:50 +00002992 }
2993 break;
2994
Lev Walkin4a4543f2006-10-13 12:37:39 +00002995 case 77:
Lev Walkin1a49ced2017-11-06 00:07:00 -08002996#line 958 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002997 {
2998 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002999 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003000 ret = asn1p_ref_add_component((yyval.a_parg).governor,
3001 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003002 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003003 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003004 }
3005 break;
3006
3007 case 78:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003008#line 969 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003009 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003010 (yyval.a_expr) = NEW_EXPR();
3011 checkmem((yyval.a_expr));
3012 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003013 }
3014 break;
3015
Lev Walkin59165cf2017-09-11 06:24:45 -07003016 case 79:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003017#line 974 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003018 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003019 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3020 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003021 }
3022 break;
3023
Lev Walkin752e9732017-08-04 02:06:22 -07003024 case 81:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003025#line 982 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003026 {
Lev Walkin59165cf2017-09-11 06:24:45 -07003027 (yyval.a_expr) = NEW_EXPR();
3028 checkmem((yyval.a_expr));
3029 (yyval.a_expr)->Identifier = strdup("?");
3030 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3031 (yyval.a_expr)->meta_type = AMT_VALUE;
3032 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003033 }
3034 break;
3035
Lev Walkin752e9732017-08-04 02:06:22 -07003036 case 82:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003037#line 990 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003038 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003039 (yyval.a_expr) = NEW_EXPR();
3040 checkmem((yyval.a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003041 (yyval.a_expr)->Identifier = strdup("?");
Lev Walkin0e90aa02013-03-19 16:17:13 -07003042 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3043 (yyval.a_expr)->meta_type = AMT_VALUE;
3044 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003045 }
3046 break;
3047
Lev Walkin752e9732017-08-04 02:06:22 -07003048 case 83:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003049#line 998 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003050 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003051 (yyval.a_expr) = NEW_EXPR();
3052 (yyval.a_expr)->expr_type = A1TC_VALUESET;
3053 (yyval.a_expr)->meta_type = AMT_VALUESET;
3054 (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00003055 }
3056 break;
3057
Lev Walkin59165cf2017-09-11 06:24:45 -07003058 case 84:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003059#line 1021 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003060 { (yyval.a_expr) = NEW_EXPR(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003061 break;
3062
Lev Walkin59165cf2017-09-11 06:24:45 -07003063 case 85:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003064#line 1022 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003065 { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); }
Lev Walkina9532f42006-09-17 04:52:50 +00003066 break;
3067
Lev Walkin59165cf2017-09-11 06:24:45 -07003068 case 86:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003069#line 1025 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003070 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003071 (yyval.a_expr) = NEW_EXPR();
3072 checkmem((yyval.a_expr));
3073 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003074 }
3075 break;
3076
Lev Walkin59165cf2017-09-11 06:24:45 -07003077 case 87:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003078#line 1030 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003079 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003080 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3081 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003082 }
3083 break;
3084
Lev Walkin59165cf2017-09-11 06:24:45 -07003085 case 88:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003086#line 1034 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003087 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003088 (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003089 asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003090 asn1p_expr_free((yyvsp[(4) - (5)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003091 }
3092 break;
3093
Lev Walkin59165cf2017-09-11 06:24:45 -07003094 case 89:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003095#line 1042 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003096 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003097 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3098 assert((yyval.a_expr)->Identifier == 0);
3099 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3100 (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3101 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003102 }
3103 break;
3104
Lev Walkin59165cf2017-09-11 06:24:45 -07003105 case 90:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003106#line 1049 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003107 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003108 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3109 (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3110 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
3111 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003112 }
3113 break;
3114
Lev Walkin59165cf2017-09-11 06:24:45 -07003115 case 91:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003116#line 1055 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003117 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003118 (yyval.a_expr) = NEW_EXPR();
3119 checkmem((yyval.a_expr));
3120 (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type;
3121 (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF;
3122 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003123 }
3124 break;
3125
Lev Walkin59165cf2017-09-11 06:24:45 -07003126 case 92:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003127#line 1062 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003128 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003129 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003130 }
3131 break;
3132
Lev Walkin59165cf2017-09-11 06:24:45 -07003133 case 93:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003134#line 1068 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003135 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003136 (yyval.a_expr) = NEW_EXPR();
3137 checkmem((yyval.a_expr));
3138 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003139 }
3140 break;
3141
Lev Walkin59165cf2017-09-11 06:24:45 -07003142 case 94:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003143#line 1073 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003144 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003145 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3146 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003147 }
3148 break;
3149
Lev Walkin59165cf2017-09-11 06:24:45 -07003150 case 95:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003151#line 1080 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003152 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003153 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3154 assert((yyval.a_expr)->Identifier == 0);
3155 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003156 }
3157 break;
3158
Lev Walkin59165cf2017-09-11 06:24:45 -07003159 case 96:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003160#line 1085 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003161 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003162 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003163 }
3164 break;
3165
Lev Walkin59165cf2017-09-11 06:24:45 -07003166 case 97:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003167#line 1088 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003168 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003169 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
3170 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003171 }
3172 break;
3173
Lev Walkin59165cf2017-09-11 06:24:45 -07003174 case 98:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003175#line 1095 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003176 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003177 (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr);
3178 checkmem((yyval.a_expr));
3179 (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt);
3180 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
3181 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00003182 }
3183 break;
3184
Lev Walkin59165cf2017-09-11 06:24:45 -07003185 case 99:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003186#line 1105 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003187 { (yyval.a_int) = 0; }
3188 break;
3189
Lev Walkin59165cf2017-09-11 06:24:45 -07003190 case 100:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003191#line 1106 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07003192 { (yyval.a_int) = 1; }
3193 break;
3194
Lev Walkin752e9732017-08-04 02:06:22 -07003195 case 101:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003196#line 1110 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003197 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003198 (yyval.a_expr) = NEW_EXPR();
3199 checkmem((yyval.a_expr));
3200 (yyval.a_expr)->expr_type = A1TC_CLASSDEF;
3201 (yyval.a_expr)->meta_type = AMT_OBJECTCLASS;
3202 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003203 }
3204 break;
3205
Lev Walkin59165cf2017-09-11 06:24:45 -07003206 case 102:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003207#line 1117 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003208 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003209 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3210 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003211 }
3212 break;
3213
Lev Walkin59165cf2017-09-11 06:24:45 -07003214 case 103:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003215#line 1127 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003216 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003217 (yyval.a_expr) = NEW_EXPR();
3218 checkmem((yyval.a_expr));
3219 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
3220 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3221 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */
3222 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003223 }
3224 break;
3225
Lev Walkin59165cf2017-09-11 06:24:45 -07003226 case 104:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003227#line 1137 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003228 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003229 (yyval.a_expr) = NEW_EXPR();
3230 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3231 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3232 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */
3233 (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int);
3234 (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker);
3235 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003236 }
3237 break;
3238
Lev Walkin59165cf2017-09-11 06:24:45 -07003239 case 105:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003240#line 1148 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003241 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003242 (yyval.a_expr) = NEW_EXPR();
3243 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3244 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3245 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS;
3246 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3247 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003248 }
3249 break;
3250
Lev Walkin59165cf2017-09-11 06:24:45 -07003251 case 106:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003252#line 1158 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003253 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003254 (yyval.a_expr) = NEW_EXPR();
3255 checkmem((yyval.a_expr));
3256 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3257 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3258 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3259 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS;
3260 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003261 }
3262 break;
3263
Lev Walkin59165cf2017-09-11 06:24:45 -07003264 case 107:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003265#line 1169 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003266 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003267 (yyval.a_expr) = NEW_EXPR();
3268 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3269 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3270 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS;
3271 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3272 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003273 }
3274 break;
3275
Lev Walkin59165cf2017-09-11 06:24:45 -07003276 case 108:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003277#line 1179 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003278 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003279 (yyval.a_expr) = NEW_EXPR();
3280 checkmem((yyval.a_expr));
3281 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3282 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3283 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS;
3284 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr));
3285 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003286 }
3287 break;
3288
Lev Walkin59165cf2017-09-11 06:24:45 -07003289 case 109:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003290#line 1190 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003291 {
3292 (yyval.a_expr) = NEW_EXPR();
3293 checkmem((yyval.a_expr));
3294 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3295 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3296 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3297 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS;
3298 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
3299 }
Lev Walkin418298d2006-07-13 08:24:20 +00003300 break;
3301
Lev Walkin59165cf2017-09-11 06:24:45 -07003302 case 110:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003303#line 1202 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003304 { (yyval.a_wsynt) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00003305 break;
3306
Lev Walkin59165cf2017-09-11 06:24:45 -07003307 case 111:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003308#line 1203 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003309 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003310 (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003311 }
3312 break;
3313
Lev Walkin59165cf2017-09-11 06:24:45 -07003314 case 112:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003315#line 1210 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003316 { asn1p_lexer_hack_enable_with_syntax(); }
3317 break;
3318
Lev Walkin59165cf2017-09-11 06:24:45 -07003319 case 113:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003320#line 1212 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003321 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003322 (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003323 }
3324 break;
3325
Lev Walkin59165cf2017-09-11 06:24:45 -07003326 case 114:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003327#line 1218 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003328 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003329 (yyval.a_wsynt) = asn1p_wsyntx_new();
3330 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003331 }
3332 break;
3333
Lev Walkin59165cf2017-09-11 06:24:45 -07003334 case 115:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003335#line 1222 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003336 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003337 (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt);
3338 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003339 }
3340 break;
3341
Lev Walkin59165cf2017-09-11 06:24:45 -07003342 case 116:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003343#line 1229 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003344 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003345 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0);
3346 (yyval.a_wchunk)->type = WC_WHITESPACE;
Lev Walkin418298d2006-07-13 08:24:20 +00003347 }
3348 break;
3349
Lev Walkin59165cf2017-09-11 06:24:45 -07003350 case 117:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003351#line 1233 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003352 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003353 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003354 }
3355 break;
3356
Lev Walkin59165cf2017-09-11 06:24:45 -07003357 case 118:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003358#line 1236 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003359 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003360 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0);
3361 (yyval.a_wchunk)->type = WC_FIELD;
Lev Walkin418298d2006-07-13 08:24:20 +00003362 }
3363 break;
3364
Lev Walkin59165cf2017-09-11 06:24:45 -07003365 case 119:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003366#line 1240 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003367 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003368 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt));
Lev Walkin866bd7f2006-09-14 10:35:20 +00003369 }
3370 break;
3371
Lev Walkin59165cf2017-09-11 06:24:45 -07003372 case 120:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003373#line 1246 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003374 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003375 (yyval.a_expr) = NEW_EXPR();
3376 checkmem((yyval.a_expr));
3377 (yyval.a_expr)->Identifier = strdup("...");
3378 checkmem((yyval.a_expr)->Identifier);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003379 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3380 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003381 }
3382 break;
3383
Lev Walkin59165cf2017-09-11 06:24:45 -07003384 case 121:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003385#line 1254 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003386 {
3387 (yyval.a_expr) = NEW_EXPR();
3388 checkmem((yyval.a_expr));
3389 (yyval.a_expr)->Identifier = strdup("...");
3390 checkmem((yyval.a_expr)->Identifier);
3391 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3392 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3393 (yyval.a_expr)->meta_type = AMT_TYPE;
3394 }
3395 break;
3396
Lev Walkin59165cf2017-09-11 06:24:45 -07003397 case 122:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003398#line 1263 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003399 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003400 (yyval.a_expr) = NEW_EXPR();
3401 checkmem((yyval.a_expr));
3402 (yyval.a_expr)->Identifier = strdup("...");
3403 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3404 checkmem((yyval.a_expr)->Identifier);
3405 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3406 (yyval.a_expr)->meta_type = AMT_TYPE;
3407 }
3408 break;
3409
Lev Walkin752e9732017-08-04 02:06:22 -07003410 case 124:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003411#line 1277 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07003412 {
3413 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3414 (yyval.a_expr)->tag = (yyvsp[(1) - (2)].a_tag);
3415 }
3416 break;
3417
3418 case 125:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003419#line 1284 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07003420 {
3421 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3422 /*
3423 * Outer constraint for SEQUENCE OF and SET OF applies
3424 * to the inner type.
3425 */
3426 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3427 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3428 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3429 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(2) - (2)].a_constr);
3430 } else {
3431 if((yyval.a_expr)->constraints) {
3432 assert(!(yyvsp[(2) - (2)].a_constr));
3433 /* Check this : optManyConstraints is not used ?! */
3434 asn1p_constraint_free((yyvsp[(2) - (2)].a_constr));
3435 } else {
3436 (yyval.a_expr)->constraints = (yyvsp[(2) - (2)].a_constr);
3437 }
3438 }
3439 }
3440 break;
3441
3442 case 126:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003443#line 1307 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07003444 {
3445 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3446 /*
3447 * Outer constraint for SEQUENCE OF and SET OF applies
3448 * to the inner type.
3449 */
3450 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3451 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3452 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3453 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(2) - (2)].a_constr);
3454 } else {
3455 if((yyval.a_expr)->constraints) {
3456 assert(!(yyvsp[(2) - (2)].a_constr));
3457 /* Check this : optManyConstraints is not used ?! */
3458 asn1p_constraint_free((yyvsp[(2) - (2)].a_constr));
3459 } else {
3460 (yyval.a_expr)->constraints = (yyvsp[(2) - (2)].a_constr);
3461 }
3462 }
3463 }
3464 break;
3465
3466 case 127:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003467#line 1330 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003468 {
3469 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3470 (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag);
Lev Walkin070a52d2004-08-22 03:19:54 +00003471 /*
3472 * Outer constraint for SEQUENCE OF and SET OF applies
3473 * to the inner type.
3474 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07003475 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3476 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3477 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3478 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003479 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003480 if((yyval.a_expr)->constraints) {
3481 assert(!(yyvsp[(2) - (3)].a_expr));
Lev Walkin0c686452017-09-07 22:59:36 -07003482 /* Check this : optManyConstraints is not used ?! */
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003483 asn1p_constraint_free((yyvsp[(3) - (3)].a_constr));
Lev Walkin070a52d2004-08-22 03:19:54 +00003484 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003485 (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003486 }
3487 }
Lev Walkin418298d2006-07-13 08:24:20 +00003488 }
3489 break;
3490
Lev Walkin59165cf2017-09-11 06:24:45 -07003491 case 128:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003492#line 1354 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003493 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003494 (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0;
Lev Walkinfb872bd2006-03-18 06:53:11 +00003495 asn1p_as_pointer = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00003496 }
3497 break;
3498
Lev Walkin59165cf2017-09-11 06:24:45 -07003499 case 129:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003500#line 1361 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003501 {
Lev Walkin59165cf2017-09-11 06:24:45 -07003502 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003503 (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int);
Lev Walkinfb872bd2006-03-18 06:53:11 +00003504
Lev Walkin0e90aa02013-03-19 16:17:13 -07003505 if(((yyval.a_expr)->marker.flags & EM_INDIRECT)
3506 && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) {
Lev Walkinef625402005-09-05 05:17:57 +00003507 fprintf(stderr,
3508 "INFO: Directive <ASN1C:RepresentAsPointer> "
Lev Walkind523ea42017-09-06 22:15:08 -07003509 "applied to %s at %s:%d\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003510 ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
3511 ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
Lev Walkinef625402005-09-05 05:17:57 +00003512 : "member",
Lev Walkind523ea42017-09-06 22:15:08 -07003513 ASN_FILENAME, (yyval.a_expr)->_lineno
Lev Walkinef625402005-09-05 05:17:57 +00003514 );
3515 }
Lev Walkin59165cf2017-09-11 06:24:45 -07003516 }
Lev Walkin418298d2006-07-13 08:24:20 +00003517 break;
3518
Lev Walkin59165cf2017-09-11 06:24:45 -07003519 case 133:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003520#line 1385 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003521 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003522 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3523 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3524 (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE;
3525 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003526 }
3527 break;
3528
Lev Walkin59165cf2017-09-11 06:24:45 -07003529 case 134:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003530#line 1391 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003531 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003532 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3533 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3534 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE;
3535 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003536 }
3537 break;
3538
Lev Walkin59165cf2017-09-11 06:24:45 -07003539 case 135:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003540#line 1397 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003541 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003542 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3543 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3544 (yyval.a_expr)->expr_type = ASN_CONSTR_SET;
3545 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003546 }
3547 break;
3548
Lev Walkin59165cf2017-09-11 06:24:45 -07003549 case 136:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003550#line 1403 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003551 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003552 (yyval.a_expr) = NEW_EXPR();
3553 checkmem((yyval.a_expr));
3554 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3555 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF;
3556 (yyval.a_expr)->meta_type = AMT_TYPE;
3557 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3558 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3559 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003560 }
3561 break;
3562
Lev Walkin59165cf2017-09-11 06:24:45 -07003563 case 137:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003564#line 1413 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003565 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003566 (yyval.a_expr) = NEW_EXPR();
3567 checkmem((yyval.a_expr));
3568 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3569 (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF;
3570 (yyval.a_expr)->meta_type = AMT_TYPE;
3571 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3572 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3573 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003574 }
3575 break;
3576
Lev Walkin59165cf2017-09-11 06:24:45 -07003577 case 138:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003578#line 1423 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003579 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003580 (yyval.a_expr) = NEW_EXPR();
3581 checkmem((yyval.a_expr));
3582 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3583 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003584 }
3585 break;
3586
Lev Walkin59165cf2017-09-11 06:24:45 -07003587 case 139:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003588#line 1429 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003589 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003590 int ret;
3591 (yyval.a_expr) = NEW_EXPR();
3592 checkmem((yyval.a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003593 (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003594 ret = asn1p_ref_add_component((yyval.a_expr)->reference,
3595 (yyvsp[(4) - (4)].tv_str), RLT_lowercase);
3596 checkmem(ret == 0);
3597 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3598 (yyval.a_expr)->meta_type = AMT_TYPE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003599 free((yyvsp[(4) - (4)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003600 }
3601 break;
3602
Lev Walkin59165cf2017-09-11 06:24:45 -07003603 case 140:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003604#line 1441 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003605 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003606 (yyval.a_expr) = NEW_EXPR();
3607 checkmem((yyval.a_expr));
3608 (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref);
3609 (yyval.a_expr)->expr_type = A1TC_INSTANCE;
3610 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003611 }
3612 break;
3613
Lev Walkin59165cf2017-09-11 06:24:45 -07003614 case 141:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003615#line 1456 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003616 {
3617 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003618 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003619 checkmem((yyval.a_ref));
3620 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003621 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003622 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003623 }
3624 break;
3625
Lev Walkin59165cf2017-09-11 06:24:45 -07003626 case 142:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003627#line 1464 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003628 {
Lev Walkin9c974182004-09-15 11:59:51 +00003629 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003630 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003631 checkmem((yyval.a_ref));
3632 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
3633 free((yyvsp[(1) - (1)].tv_str));
3634 checkmem(ret == 0);
3635 }
3636 break;
3637
Lev Walkin59165cf2017-09-11 06:24:45 -07003638 case 143:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003639#line 1472 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07003640 {
3641 int ret;
3642 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
3643 checkmem((yyval.a_ref));
3644 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3645 checkmem(ret == 0);
3646 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
3647 checkmem(ret == 0);
3648 free((yyvsp[(1) - (3)].tv_str));
3649 free((yyvsp[(3) - (3)].tv_str));
3650 }
3651 break;
3652
3653 case 144:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003654#line 1483 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07003655 {
3656 int ret;
3657 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
3658 checkmem((yyval.a_ref));
3659 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3660 checkmem(ret == 0);
3661 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
3662 checkmem(ret == 0);
3663 free((yyvsp[(1) - (3)].tv_str));
3664 free((yyvsp[(3) - (3)].tv_str));
3665 }
3666 break;
3667
3668 case 145:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003669#line 1494 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003670 {
3671 int ret;
3672 (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref);
3673 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS);
3674 free((yyvsp[(1) - (3)].tv_str));
Lev Walkinf15320b2004-06-03 03:38:44 +00003675 checkmem(ret == 0);
3676 /*
3677 * Move the last element infront.
3678 */
3679 {
3680 struct asn1p_ref_component_s tmp_comp;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003681 tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1];
3682 memmove(&(yyval.a_ref)->components[1],
3683 &(yyval.a_ref)->components[0],
3684 sizeof((yyval.a_ref)->components[0])
3685 * ((yyval.a_ref)->comp_count - 1));
3686 (yyval.a_ref)->components[0] = tmp_comp;
Lev Walkinf15320b2004-06-03 03:38:44 +00003687 }
Lev Walkin418298d2006-07-13 08:24:20 +00003688 }
3689 break;
3690
Lev Walkin59165cf2017-09-11 06:24:45 -07003691 case 146:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003692#line 1516 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003693 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003694 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003695 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003696 checkmem((yyval.a_ref));
3697 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type);
3698 free((yyvsp[(1) - (1)].a_refcomp).name);
Lev Walkinf15320b2004-06-03 03:38:44 +00003699 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003700 }
3701 break;
3702
Lev Walkin59165cf2017-09-11 06:24:45 -07003703 case 147:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003704#line 1524 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003705 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003706 int ret;
3707 (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref);
3708 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type);
3709 free((yyvsp[(3) - (3)].a_refcomp).name);
3710 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003711 }
3712 break;
3713
Lev Walkin59165cf2017-09-11 06:24:45 -07003714 case 149:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003715#line 1537 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003716 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003717 (yyval.a_refcomp).lex_type = RLT_AmpUppercase;
3718 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003719 }
3720 break;
3721
Lev Walkin59165cf2017-09-11 06:24:45 -07003722 case 150:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003723#line 1542 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003724 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003725 (yyval.a_refcomp).lex_type = RLT_Amplowercase;
3726 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003727 }
3728 break;
3729
Lev Walkin59165cf2017-09-11 06:24:45 -07003730 case 151:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003731#line 1551 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003732 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003733 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003734 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003735 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003736 }
3737 break;
3738
Lev Walkin59165cf2017-09-11 06:24:45 -07003739 case 152:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003740#line 1556 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003741 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003742 (yyval.a_ref) = (yyval.a_ref);
3743 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003744 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003745 }
3746 break;
3747
Lev Walkin59165cf2017-09-11 06:24:45 -07003748 case 153:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003749#line 1561 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003750 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003751 (yyval.a_ref) = (yyval.a_ref);
3752 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003753 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003754 }
3755 break;
3756
Lev Walkin59165cf2017-09-11 06:24:45 -07003757 case 154:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003758#line 1569 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003759 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003760 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003761 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003762 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003763 }
3764 break;
3765
Lev Walkin59165cf2017-09-11 06:24:45 -07003766 case 155:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003767#line 1592 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003768 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003769 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
3770 assert((yyval.a_expr)->Identifier == NULL);
3771 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3772 (yyval.a_expr)->meta_type = AMT_VALUE;
3773 (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003774 }
3775 break;
3776
Lev Walkin59165cf2017-09-11 06:24:45 -07003777 case 158:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003778#line 1604 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003779 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003780 break;
3781
Lev Walkin59165cf2017-09-11 06:24:45 -07003782 case 159:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003783#line 1604 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003784 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003785 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
3786 checkmem((yyval.a_value));
3787 (yyval.a_value)->type = ATV_UNPARSED;
Lev Walkin418298d2006-07-13 08:24:20 +00003788 }
3789 break;
3790
Lev Walkin59165cf2017-09-11 06:24:45 -07003791 case 160:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003792#line 1612 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003793 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003794 (yyval.a_value) = asn1p_value_fromint(0);
3795 checkmem((yyval.a_value));
3796 (yyval.a_value)->type = ATV_NULL;
Lev Walkin418298d2006-07-13 08:24:20 +00003797 }
3798 break;
3799
Lev Walkin59165cf2017-09-11 06:24:45 -07003800 case 161:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003801#line 1617 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003802 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003803 (yyval.a_value) = asn1p_value_fromint(0);
3804 checkmem((yyval.a_value));
3805 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00003806 }
3807 break;
3808
Lev Walkin59165cf2017-09-11 06:24:45 -07003809 case 162:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003810#line 1622 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003811 {
Lev Walkin59165cf2017-09-11 06:24:45 -07003812 (yyval.a_value) = asn1p_value_fromint(1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003813 checkmem((yyval.a_value));
3814 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00003815 }
3816 break;
3817
Lev Walkin59165cf2017-09-11 06:24:45 -07003818 case 168:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003819#line 1635 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003820 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003821 asn1p_ref_t *ref;
3822 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003823 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003824 checkmem(ref);
3825 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3826 checkmem(ret == 0);
3827 ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3828 checkmem(ret == 0);
3829 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3830 checkmem((yyval.a_value));
3831 free((yyvsp[(1) - (3)].tv_str));
3832 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003833 }
3834 break;
3835
Lev Walkin59165cf2017-09-11 06:24:45 -07003836 case 169:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003837#line 1653 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003838 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003839 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0);
3840 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003841 }
3842 break;
3843
Lev Walkin59165cf2017-09-11 06:24:45 -07003844 case 170:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003845#line 1657 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003846 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003847 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3848 checkmem((yyval.a_value));
3849 (yyval.a_value)->type = ATV_TUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003850 }
3851 break;
3852
Lev Walkin59165cf2017-09-11 06:24:45 -07003853 case 171:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003854#line 1662 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003855 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003856 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3857 checkmem((yyval.a_value));
3858 (yyval.a_value)->type = ATV_QUADRUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003859 }
3860 break;
3861
Lev Walkin59165cf2017-09-11 06:24:45 -07003862 case 172:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003863#line 1670 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003864 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003865 (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1;
Lev Walkinbf979152017-09-07 23:36:11 -07003866 (yyval.tv_opaque).buf = malloc(1 + (yyval.tv_opaque).len + 1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003867 checkmem((yyval.tv_opaque).buf);
3868 (yyval.tv_opaque).buf[0] = '{';
3869 memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len);
3870 (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0';
3871 free((yyvsp[(1) - (1)].tv_opaque).buf);
Lev Walkinbf979152017-09-07 23:36:11 -07003872 }
Lev Walkin418298d2006-07-13 08:24:20 +00003873 break;
3874
Lev Walkin59165cf2017-09-11 06:24:45 -07003875 case 173:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003876#line 1679 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003877 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003878 int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len;
3879 char *p = malloc(newsize + 1);
3880 checkmem(p);
3881 memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len);
3882 memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len);
3883 p[newsize] = '\0';
3884 free((yyvsp[(1) - (2)].tv_opaque).buf);
3885 free((yyvsp[(2) - (2)].tv_opaque).buf);
3886 (yyval.tv_opaque).buf = p;
3887 (yyval.tv_opaque).len = newsize;
Lev Walkin418298d2006-07-13 08:24:20 +00003888 }
3889 break;
3890
Lev Walkin59165cf2017-09-11 06:24:45 -07003891 case 175:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003892#line 1695 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003893 {
3894 (yyval.tv_opaque).len = strlen((yyvsp[(1) - (1)].tv_str));
3895 (yyval.tv_opaque).buf = (yyvsp[(1) - (1)].tv_str);
3896 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003897 break;
3898
Lev Walkin59165cf2017-09-11 06:24:45 -07003899 case 176:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003900#line 1701 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003901 { (yyval.a_type) = ASN_BASIC_BOOLEAN; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003902 break;
3903
Lev Walkin59165cf2017-09-11 06:24:45 -07003904 case 177:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003905#line 1702 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003906 { (yyval.a_type) = ASN_BASIC_NULL; }
Lev Walkind523ea42017-09-06 22:15:08 -07003907 break;
3908
Lev Walkin59165cf2017-09-11 06:24:45 -07003909 case 178:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003910#line 1703 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003911 { (yyval.a_type) = ASN_BASIC_REAL; }
Lev Walkind523ea42017-09-06 22:15:08 -07003912 break;
3913
Lev Walkin59165cf2017-09-11 06:24:45 -07003914 case 179:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003915#line 1704 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003916 { (yyval.a_type) = ASN_BASIC_OCTET_STRING; }
Lev Walkind523ea42017-09-06 22:15:08 -07003917 break;
3918
Lev Walkin59165cf2017-09-11 06:24:45 -07003919 case 180:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003920#line 1705 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003921 { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; }
Lev Walkind523ea42017-09-06 22:15:08 -07003922 break;
3923
Lev Walkin59165cf2017-09-11 06:24:45 -07003924 case 181:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003925#line 1706 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003926 { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; }
Lev Walkind523ea42017-09-06 22:15:08 -07003927 break;
3928
Lev Walkin59165cf2017-09-11 06:24:45 -07003929 case 182:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003930#line 1707 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003931 { (yyval.a_type) = ASN_BASIC_EXTERNAL; }
Lev Walkind523ea42017-09-06 22:15:08 -07003932 break;
3933
Lev Walkin59165cf2017-09-11 06:24:45 -07003934 case 183:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003935#line 1708 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003936 { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; }
Lev Walkind523ea42017-09-06 22:15:08 -07003937 break;
3938
Lev Walkin59165cf2017-09-11 06:24:45 -07003939 case 184:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003940#line 1709 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003941 { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; }
3942 break;
3943
Lev Walkin59165cf2017-09-11 06:24:45 -07003944 case 185:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003945#line 1710 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003946 { (yyval.a_type) = ASN_BASIC_UTCTime; }
3947 break;
3948
Lev Walkin59165cf2017-09-11 06:24:45 -07003949 case 186:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003950#line 1711 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003951 { (yyval.a_type) = ASN_BASIC_GeneralizedTime; }
3952 break;
3953
Lev Walkin59165cf2017-09-11 06:24:45 -07003954 case 189:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003955#line 1720 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003956 { (yyval.a_type) = ASN_BASIC_INTEGER; }
Lev Walkin752e9732017-08-04 02:06:22 -07003957 break;
3958
Lev Walkin59165cf2017-09-11 06:24:45 -07003959 case 190:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003960#line 1721 "asn1p_y.y"
Lev Walkina25584b2017-10-01 13:43:17 -07003961 { (yyval.a_type) = ASN_BASIC_ENUMERATED; }
Lev Walkinbf979152017-09-07 23:36:11 -07003962 break;
3963
Lev Walkin59165cf2017-09-11 06:24:45 -07003964 case 191:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003965#line 1722 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003966 { (yyval.a_type) = ASN_BASIC_BIT_STRING; }
3967 break;
3968
Lev Walkin59165cf2017-09-11 06:24:45 -07003969 case 192:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003970#line 1726 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003971 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003972 (yyval.a_expr) = NEW_EXPR();
3973 checkmem((yyval.a_expr));
3974 (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type);
3975 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003976 }
3977 break;
3978
Lev Walkin59165cf2017-09-11 06:24:45 -07003979 case 193:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003980#line 1732 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003981 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07003982 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3983 (yyval.a_expr)->expr_type = ASN_BASIC_INTEGER;
3984 (yyval.a_expr)->meta_type = AMT_TYPE;
3985 }
Lev Walkin418298d2006-07-13 08:24:20 +00003986 break;
3987
Lev Walkin59165cf2017-09-11 06:24:45 -07003988 case 194:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003989#line 1737 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07003990 {
3991 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3992 (yyval.a_expr)->expr_type = ASN_BASIC_ENUMERATED;
3993 (yyval.a_expr)->meta_type = AMT_TYPE;
3994 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003995 break;
3996
Lev Walkin59165cf2017-09-11 06:24:45 -07003997 case 195:
Lev Walkin1a49ced2017-11-06 00:07:00 -08003998#line 1742 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07003999 {
4000 (yyval.a_expr) = (yyvsp[(4) - (5)].a_expr);
4001 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4002 (yyval.a_expr)->meta_type = AMT_TYPE;
4003 }
4004 break;
4005
Lev Walkin59165cf2017-09-11 06:24:45 -07004006 case 196:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004007#line 1747 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004008 {
4009 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
4010 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4011 (yyval.a_expr)->meta_type = AMT_TYPE;
4012 }
4013 break;
4014
Lev Walkin59165cf2017-09-11 06:24:45 -07004015 case 197:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004016#line 1752 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004017 {
4018 (yyval.a_expr) = NEW_EXPR();
4019 checkmem((yyval.a_expr));
4020 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4021 (yyval.a_expr)->meta_type = AMT_TYPE;
4022 }
4023 break;
4024
Lev Walkin59165cf2017-09-11 06:24:45 -07004025 case 198:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004026#line 1761 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004027 { (yyval.a_type) = ASN_STRING_BMPString; }
4028 break;
4029
Lev Walkin59165cf2017-09-11 06:24:45 -07004030 case 199:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004031#line 1762 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004032 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004033 (yyval.a_type) = ASN_STRING_GeneralString;
Lev Walkin9c974182004-09-15 11:59:51 +00004034 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004035 }
4036 break;
4037
Lev Walkin59165cf2017-09-11 06:24:45 -07004038 case 200:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004039#line 1766 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004040 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004041 (yyval.a_type) = ASN_STRING_GraphicString;
Lev Walkin9c974182004-09-15 11:59:51 +00004042 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004043 }
4044 break;
4045
Lev Walkin59165cf2017-09-11 06:24:45 -07004046 case 201:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004047#line 1770 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004048 { (yyval.a_type) = ASN_STRING_IA5String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004049 break;
4050
Lev Walkin59165cf2017-09-11 06:24:45 -07004051 case 202:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004052#line 1771 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004053 { (yyval.a_type) = ASN_STRING_ISO646String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004054 break;
4055
Lev Walkin59165cf2017-09-11 06:24:45 -07004056 case 203:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004057#line 1772 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004058 { (yyval.a_type) = ASN_STRING_NumericString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004059 break;
4060
Lev Walkin59165cf2017-09-11 06:24:45 -07004061 case 204:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004062#line 1773 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004063 { (yyval.a_type) = ASN_STRING_PrintableString; }
4064 break;
4065
Lev Walkin59165cf2017-09-11 06:24:45 -07004066 case 205:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004067#line 1774 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004068 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004069 (yyval.a_type) = ASN_STRING_T61String;
Lev Walkin9c974182004-09-15 11:59:51 +00004070 fprintf(stderr, "WARNING: T61String is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004071 }
4072 break;
4073
Lev Walkin59165cf2017-09-11 06:24:45 -07004074 case 206:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004075#line 1778 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004076 { (yyval.a_type) = ASN_STRING_TeletexString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004077 break;
4078
Lev Walkin59165cf2017-09-11 06:24:45 -07004079 case 207:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004080#line 1779 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004081 { (yyval.a_type) = ASN_STRING_UniversalString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004082 break;
4083
Lev Walkin59165cf2017-09-11 06:24:45 -07004084 case 208:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004085#line 1780 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004086 { (yyval.a_type) = ASN_STRING_UTF8String; }
4087 break;
4088
Lev Walkin59165cf2017-09-11 06:24:45 -07004089 case 209:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004090#line 1781 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004091 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004092 (yyval.a_type) = ASN_STRING_VideotexString;
Lev Walkin9c974182004-09-15 11:59:51 +00004093 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004094 }
4095 break;
4096
Lev Walkin59165cf2017-09-11 06:24:45 -07004097 case 210:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004098#line 1785 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004099 { (yyval.a_type) = ASN_STRING_VisibleString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004100 break;
4101
Lev Walkin59165cf2017-09-11 06:24:45 -07004102 case 211:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004103#line 1786 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004104 { (yyval.a_type) = ASN_STRING_ObjectDescriptor; }
Lev Walkin418298d2006-07-13 08:24:20 +00004105 break;
4106
Lev Walkin59165cf2017-09-11 06:24:45 -07004107 case 216:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004108#line 1798 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004109 { (yyval.a_constr) = 0; }
4110 break;
4111
Lev Walkin59165cf2017-09-11 06:24:45 -07004112 case 218:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004113#line 1803 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004114 { (yyval.a_constr) = 0; }
4115 break;
4116
4117 case 220:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004118#line 1808 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004119 { (yyval.a_constr) = 0; }
4120 break;
4121
4122 case 223:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004123#line 1814 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004124 {
Lev Walkin0c686452017-09-07 22:59:36 -07004125 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(2) - (3)].a_constr), 0);
4126 }
4127 break;
4128
Lev Walkin59165cf2017-09-11 06:24:45 -07004129 case 225:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004130#line 1821 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004131 {
4132 if((yyvsp[(2) - (2)].a_constr)->type == ACT_CA_SET && (yyvsp[(2) - (2)].a_constr)->el_count == 1) {
4133 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr)->elements[0]);
4134 } else {
4135 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr));
4136 }
Lev Walkin418298d2006-07-13 08:24:20 +00004137 }
4138 break;
4139
Lev Walkin59165cf2017-09-11 06:24:45 -07004140 case 229:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004141#line 1835 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004142 {
4143 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4144 (yyval.a_constr)->type = ACT_EL_EXT;
4145 }
4146 break;
4147
Lev Walkin59165cf2017-09-11 06:24:45 -07004148 case 231:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004149#line 1840 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004150 {
Lev Walkin0c686452017-09-07 22:59:36 -07004151 asn1p_constraint_t *ct;
4152 ct = asn1p_constraint_new(yylineno, currentModule);
4153 ct->type = ACT_EL_EXT;
4154 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
4155 }
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004156 break;
4157
Lev Walkin59165cf2017-09-11 06:24:45 -07004158 case 232:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004159#line 1846 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004160 {
4161 asn1p_constraint_t *ct;
4162 ct = asn1p_constraint_new(yylineno, currentModule);
4163 ct->type = ACT_EL_EXT;
4164 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct);
4165 ct = (yyval.a_constr);
4166 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr));
4167 }
4168 break;
4169
Lev Walkin59165cf2017-09-11 06:24:45 -07004170 case 234:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004171#line 1858 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004172 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004173 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004174 }
4175 break;
4176
Lev Walkin59165cf2017-09-11 06:24:45 -07004177 case 236:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004178#line 1865 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004179 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004180 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_UNI, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004181 }
4182 break;
4183
Lev Walkin59165cf2017-09-11 06:24:45 -07004184 case 238:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004185#line 1872 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004186 {
Lev Walkinbf979152017-09-07 23:36:11 -07004187 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_INT, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004188 }
4189 break;
4190
Lev Walkin59165cf2017-09-11 06:24:45 -07004191 case 240:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004192#line 1880 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004193 {
4194 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr));
4195 }
4196 break;
4197
Lev Walkin59165cf2017-09-11 06:24:45 -07004198 case 242:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004199#line 1887 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004200 {
Lev Walkin0c686452017-09-07 22:59:36 -07004201 int ret;
4202 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4203 checkmem((yyval.a_constr));
4204 (yyval.a_constr)->type = ACT_CA_SET;
4205 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4206 checkmem(ret == 0);
4207 }
Lev Walkin418298d2006-07-13 08:24:20 +00004208 break;
4209
Lev Walkin59165cf2017-09-11 06:24:45 -07004210 case 243:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004211#line 1898 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004212 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004213 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004214 checkmem((yyval.a_constr));
4215 (yyval.a_constr)->type = ACT_EL_VALUE;
4216 (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004217 }
4218 break;
4219
Lev Walkin59165cf2017-09-11 06:24:45 -07004220 case 244:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004221#line 1904 "asn1p_y.y"
Lev Walkinf1727152006-09-21 01:50:37 +00004222 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004223 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004224 checkmem((yyval.a_constr));
4225 (yyval.a_constr)->type = ACT_EL_TYPE;
4226 (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value);
Lev Walkinf1727152006-09-21 01:50:37 +00004227 }
4228 break;
4229
Lev Walkin59165cf2017-09-11 06:24:45 -07004230 case 250:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004231#line 1920 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004232 {
4233 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_FROM, (yyvsp[(2) - (2)].a_constr), 0);
4234 }
4235 break;
4236
Lev Walkin59165cf2017-09-11 06:24:45 -07004237 case 251:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004238#line 1925 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004239 {
4240 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(2) - (2)].a_constr), 0);
4241 }
4242 break;
4243
Lev Walkin59165cf2017-09-11 06:24:45 -07004244 case 252:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004245#line 1930 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004246 {
4247 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004248 (yyval.a_constr)->type = ACT_CT_PATTERN;
4249 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len, 0);
Lev Walkin5c541f12006-10-18 18:40:14 +00004250 }
4251 break;
4252
Lev Walkin59165cf2017-09-11 06:24:45 -07004253 case 253:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004254#line 1935 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004255 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004256 asn1p_ref_t *ref;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004257 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004258 (yyval.a_constr)->type = ACT_CT_PATTERN;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004259 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004260 asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase);
4261 (yyval.a_constr)->value = asn1p_value_fromref(ref, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004262 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin5c541f12006-10-18 18:40:14 +00004263 }
4264 break;
4265
Lev Walkin59165cf2017-09-11 06:24:45 -07004266 case 254:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004267#line 1947 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004268 {
Lev Walkin0c686452017-09-07 22:59:36 -07004269 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4270 checkmem((yyval.a_constr));
4271 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4272 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
4273 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
4274 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004275 break;
4276
Lev Walkin59165cf2017-09-11 06:24:45 -07004277 case 256:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004278#line 1957 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004279 {
Lev Walkin0c686452017-09-07 22:59:36 -07004280 (yyval.a_value) = asn1p_value_fromint(-123);
4281 (yyval.a_value)->type = ATV_MIN;
4282 }
Lev Walkin418298d2006-07-13 08:24:20 +00004283 break;
4284
Lev Walkin59165cf2017-09-11 06:24:45 -07004285 case 258:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004286#line 1964 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004287 {
4288 (yyval.a_value) = asn1p_value_fromint(321);
4289 (yyval.a_value)->type = ATV_MAX;
4290 }
4291 break;
4292
Lev Walkin59165cf2017-09-11 06:24:45 -07004293 case 260:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004294#line 1972 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004295 {
4296 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
4297 checkmem((yyval.a_value));
Lev Walkin0e90aa02013-03-19 16:17:13 -07004298 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004299 }
4300 break;
4301
Lev Walkin59165cf2017-09-11 06:24:45 -07004302 case 261:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004303#line 1977 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004304 {
4305 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
4306 checkmem((yyval.a_value));
4307 free((yyvsp[(1) - (1)].tv_str));
4308 }
4309 break;
4310
Lev Walkin59165cf2017-09-11 06:24:45 -07004311 case 262:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004312#line 1985 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004313 {
Lev Walkin0c686452017-09-07 22:59:36 -07004314 (yyval.a_value) = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004315 checkmem((yyval.a_value));
Lev Walkined409e22017-09-26 18:07:40 -07004316 asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
Lev Walkind523ea42017-09-06 22:15:08 -07004317 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004318 break;
4319
Lev Walkin59165cf2017-09-11 06:24:45 -07004320 case 263:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004321#line 1991 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004322 {
4323 (yyval.a_value) = asn1p_value_fromtype((yyvsp[(1) - (1)].a_expr));
4324 checkmem((yyval.a_value));
Lev Walkined409e22017-09-26 18:07:40 -07004325 asn1p_expr_free((yyvsp[(1) - (1)].a_expr));
Lev Walkin59165cf2017-09-11 06:24:45 -07004326 }
Lev Walkin0c686452017-09-07 22:59:36 -07004327 break;
4328
Lev Walkin59165cf2017-09-11 06:24:45 -07004329 case 264:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004330#line 2003 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004331 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004332 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004333 }
4334 break;
4335
Lev Walkin59165cf2017-09-11 06:24:45 -07004336 case 265:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004337#line 2006 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004338 {
Lev Walkind523ea42017-09-06 22:15:08 -07004339 assert((yyvsp[(3) - (3)].a_constr)->type == ACT_CA_CSV);
4340 (yyvsp[(3) - (3)].a_constr)->type = ACT_CT_WCOMPS;
4341 (yyval.a_constr) = (yyvsp[(3) - (3)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004342 }
4343 break;
4344
Lev Walkin59165cf2017-09-11 06:24:45 -07004345 case 269:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004346#line 2014 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004347 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004348 break;
4349
Lev Walkin59165cf2017-09-11 06:24:45 -07004350 case 270:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004351#line 2016 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004352 {
4353 assert((yyvsp[(4) - (5)].a_constr)->type == ACT_CA_CSV);
4354 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4355 (yyval.a_constr)->type = ACT_CA_CSV;
4356 asn1p_constraint_t *ct = asn1p_constraint_new(yylineno, currentModule);
4357 checkmem((yyval.a_constr));
4358 ct->type = ACT_EL_EXT;
4359 asn1p_constraint_insert((yyval.a_constr), ct);
4360 for(unsigned i = 0; i < (yyvsp[(4) - (5)].a_constr)->el_count; i++) {
4361 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(4) - (5)].a_constr)->elements[i]);
4362 }
4363 }
4364 break;
4365
Lev Walkin59165cf2017-09-11 06:24:45 -07004366 case 271:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004367#line 2029 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004368 {
4369 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4370 (yyval.a_constr)->type = ACT_CA_CSV;
4371 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(1) - (1)].a_constr));
4372 }
4373 break;
4374
Lev Walkin59165cf2017-09-11 06:24:45 -07004375 case 272:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004376#line 2034 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004377 {
4378 (yyval.a_constr) = (yyvsp[(1) - (3)].a_constr);
4379 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (3)].a_constr));
4380 }
4381 break;
4382
Lev Walkin59165cf2017-09-11 06:24:45 -07004383 case 273:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004384#line 2040 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004385 {
4386 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4387 checkmem((yyval.a_constr));
4388 (yyval.a_constr)->type = ACT_EL_VALUE;
4389 (yyval.a_constr)->value = (yyvsp[(1) - (3)].a_value);
4390 if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4391 (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres);
4392 }
4393 break;
4394
Lev Walkin59165cf2017-09-11 06:24:45 -07004395 case 274:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004396#line 2054 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004397 { (yyval.a_pres) = ACPRES_DEFAULT; }
4398 break;
4399
Lev Walkin59165cf2017-09-11 06:24:45 -07004400 case 275:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004401#line 2055 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004402 { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); }
4403 break;
4404
Lev Walkin59165cf2017-09-11 06:24:45 -07004405 case 276:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004406#line 2059 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004407 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004408 (yyval.a_pres) = ACPRES_PRESENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004409 }
4410 break;
4411
Lev Walkin59165cf2017-09-11 06:24:45 -07004412 case 277:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004413#line 2062 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004414 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004415 (yyval.a_pres) = ACPRES_ABSENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004416 }
4417 break;
4418
Lev Walkin59165cf2017-09-11 06:24:45 -07004419 case 278:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004420#line 2065 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004421 {
4422 (yyval.a_pres) = ACPRES_OPTIONAL;
4423 }
Lev Walkina9532f42006-09-17 04:52:50 +00004424 break;
4425
Lev Walkin59165cf2017-09-11 06:24:45 -07004426 case 282:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004427#line 2080 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004428 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00004429 break;
4430
Lev Walkin59165cf2017-09-11 06:24:45 -07004431 case 283:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004432#line 2080 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004433 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004434 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004435 checkmem((yyval.a_constr));
4436 (yyval.a_constr)->type = ACT_CT_CTDBY;
4437 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0);
4438 checkmem((yyval.a_constr)->value);
4439 (yyval.a_constr)->value->type = ATV_UNPARSED;
Lev Walkina9532f42006-09-17 04:52:50 +00004440 }
4441 break;
4442
Lev Walkin59165cf2017-09-11 06:24:45 -07004443 case 284:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004444#line 2091 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004445 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004446 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004447 (yyval.a_constr)->type = ACT_CT_CTNG;
4448 (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08004449 asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
Lev Walkin4a4543f2006-10-13 12:37:39 +00004450 }
4451 break;
4452
Lev Walkin59165cf2017-09-11 06:24:45 -07004453 case 285:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004454#line 2100 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004455 { (yyval.a_ctype) = ACT_EL_RANGE; }
4456 break;
4457
Lev Walkin59165cf2017-09-11 06:24:45 -07004458 case 286:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004459#line 2101 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004460 { (yyval.a_ctype) = ACT_EL_RLRANGE; }
4461 break;
4462
Lev Walkin59165cf2017-09-11 06:24:45 -07004463 case 287:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004464#line 2102 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004465 { (yyval.a_ctype) = ACT_EL_LLRANGE; }
4466 break;
4467
Lev Walkin59165cf2017-09-11 06:24:45 -07004468 case 288:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004469#line 2103 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004470 { (yyval.a_ctype) = ACT_EL_ULRANGE; }
4471 break;
4472
Lev Walkin59165cf2017-09-11 06:24:45 -07004473 case 289:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004474#line 2106 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004475 {
4476 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4477 }
4478 break;
4479
Lev Walkin59165cf2017-09-11 06:24:45 -07004480 case 290:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004481#line 2109 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004482 {
4483 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4484 }
4485 break;
4486
Lev Walkin59165cf2017-09-11 06:24:45 -07004487 case 291:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004488#line 2118 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004489 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004490 asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004491 asn1p_constraint_t *ct;
4492 int ret;
4493 ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0);
4494 checkmem(ret == 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004495 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004496 checkmem((yyval.a_constr));
4497 ct->type = ACT_EL_VALUE;
4498 ct->value = asn1p_value_fromref(ref, 0);
4499 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004500 free((yyvsp[(2) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004501 }
4502 break;
4503
Lev Walkin59165cf2017-09-11 06:24:45 -07004504 case 292:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004505#line 2134 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004506 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004507 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004508 }
4509 break;
4510
Lev Walkin59165cf2017-09-11 06:24:45 -07004511 case 293:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004512#line 2140 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004513 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004514 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004515 checkmem((yyval.a_constr));
4516 (yyval.a_constr)->type = ACT_EL_VALUE;
4517 (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4518 }
4519 break;
4520
Lev Walkin59165cf2017-09-11 06:24:45 -07004521 case 294:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004522#line 2146 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004523 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004524 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004525 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00004526 checkmem(ct);
4527 ct->type = ACT_EL_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004528 ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0);
4529 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004530 }
4531 break;
4532
Lev Walkin59165cf2017-09-11 06:24:45 -07004533 case 295:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004534#line 2160 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004535 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004536 char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2);
Lev Walkinf15320b2004-06-03 03:38:44 +00004537 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004538 *p = '@';
4539 strcpy(p + 1, (yyvsp[(2) - (2)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004540 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004541 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
Lev Walkinf15320b2004-06-03 03:38:44 +00004542 checkmem(ret == 0);
4543 free(p);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004544 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004545 }
4546 break;
4547
Lev Walkin59165cf2017-09-11 06:24:45 -07004548 case 296:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004549#line 2171 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004550 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004551 char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3);
4552 int ret;
4553 p[0] = '@';
4554 p[1] = '.';
4555 strcpy(p + 2, (yyvsp[(3) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004556 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004557 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
4558 checkmem(ret == 0);
4559 free(p);
4560 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004561 }
4562 break;
4563
Lev Walkin59165cf2017-09-11 06:24:45 -07004564 case 297:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004565#line 2187 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004566 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004567 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00004568 }
4569 break;
4570
Lev Walkin59165cf2017-09-11 06:24:45 -07004571 case 298:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004572#line 2190 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004573 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004574 int l1 = strlen((yyvsp[(1) - (3)].tv_str));
4575 int l3 = strlen((yyvsp[(3) - (3)].tv_str));
4576 (yyval.tv_str) = malloc(l1 + 1 + l3 + 1);
4577 memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1);
4578 (yyval.tv_str)[l1] = '.';
4579 memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3);
4580 (yyval.tv_str)[l1 + 1 + l3] = '\0';
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004581 free((yyvsp[(1) - (3)].tv_str));
4582 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004583 }
4584 break;
4585
Lev Walkin59165cf2017-09-11 06:24:45 -07004586 case 299:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004587#line 2210 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004588 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004589 (yyval.a_marker).flags = EM_NOMARK;
4590 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004591 }
4592 break;
4593
Lev Walkin59165cf2017-09-11 06:24:45 -07004594 case 300:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004595#line 2214 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004596 { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); }
4597 break;
4598
Lev Walkin59165cf2017-09-11 06:24:45 -07004599 case 301:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004600#line 2218 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004601 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004602 (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT;
4603 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004604 }
4605 break;
4606
Lev Walkin59165cf2017-09-11 06:24:45 -07004607 case 302:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004608#line 2222 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004609 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004610 (yyval.a_marker).flags = EM_DEFAULT;
4611 (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004612 }
4613 break;
4614
Lev Walkin59165cf2017-09-11 06:24:45 -07004615 case 303:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004616#line 2229 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004617 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004618 (yyval.a_expr) = NEW_EXPR();
4619 checkmem((yyval.a_expr));
Lev Walkinbe518fa2017-09-07 02:05:28 -07004620 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4621 }
Lev Walkin418298d2006-07-13 08:24:20 +00004622 break;
4623
Lev Walkin59165cf2017-09-11 06:24:45 -07004624 case 304:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004625#line 2234 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004626 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07004627 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4628 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4629 }
Lev Walkin418298d2006-07-13 08:24:20 +00004630 break;
4631
Lev Walkin59165cf2017-09-11 06:24:45 -07004632 case 305:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004633#line 2240 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004634 {
4635 (yyval.a_expr) = NEW_EXPR();
4636 checkmem((yyval.a_expr));
4637 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4638 (yyval.a_expr)->meta_type = AMT_VALUE;
4639 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
4640 }
4641 break;
4642
Lev Walkin59165cf2017-09-11 06:24:45 -07004643 case 306:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004644#line 2249 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004645 {
Lev Walkin0c686452017-09-07 22:59:36 -07004646 (yyval.a_expr) = NEW_EXPR();
4647 checkmem((yyval.a_expr));
4648 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4649 }
4650 break;
4651
Lev Walkin59165cf2017-09-11 06:24:45 -07004652 case 307:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004653#line 2254 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004654 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07004655 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4656 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4657 }
4658 break;
4659
Lev Walkin59165cf2017-09-11 06:24:45 -07004660 case 308:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004661#line 2261 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004662 {
4663 (yyval.a_expr) = NEW_EXPR();
4664 checkmem((yyval.a_expr));
4665 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4666 (yyval.a_expr)->meta_type = AMT_VALUE;
4667 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4668 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4669 }
4670 break;
4671
4672 case 309:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004673#line 2269 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004674 {
4675 (yyval.a_expr) = NEW_EXPR();
4676 checkmem((yyval.a_expr));
4677 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4678 (yyval.a_expr)->meta_type = AMT_VALUE;
4679 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4680 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4681 }
4682 break;
4683
4684 case 310:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004685#line 2279 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004686 {
4687 (yyval.a_expr) = NEW_EXPR();
4688 checkmem((yyval.a_expr));
4689 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4690 }
4691 break;
4692
4693 case 311:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004694#line 2284 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004695 {
4696 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4697 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4698 }
4699 break;
4700
4701 case 312:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004702#line 2291 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004703 {
4704 (yyval.a_expr) = NEW_EXPR();
4705 checkmem((yyval.a_expr));
4706 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4707 (yyval.a_expr)->meta_type = AMT_VALUE;
4708 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4709 (yyval.a_expr)->value = asn1p_value_fromint((yyvsp[(3) - (4)].a_int));
4710 }
4711 break;
4712
Lev Walkinbf979152017-09-07 23:36:11 -07004713 case 313:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004714#line 2299 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004715 {
4716 (yyval.a_expr) = NEW_EXPR();
4717 checkmem((yyval.a_expr));
4718 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4719 (yyval.a_expr)->meta_type = AMT_VALUE;
4720 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4721 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4722 }
4723 break;
4724
Lev Walkin0c686452017-09-07 22:59:36 -07004725 case 314:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004726#line 2309 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004727 {
4728 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
4729 asn1p_expr_t *first_memb = TQ_FIRST(&((yyval.a_expr)->members));
4730 if(first_memb) {
4731 if(first_memb->expr_type == A1TC_EXTENSIBLE) {
4732 return yyerror(
4733 "The ENUMERATION cannot start with extension (...).");
4734 }
4735 } else {
4736 return yyerror(
4737 "The ENUMERATION list cannot be empty.");
4738 }
4739 }
4740 break;
4741
Lev Walkin59165cf2017-09-11 06:24:45 -07004742 case 315:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004743#line 2324 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004744 {
4745 (yyval.a_expr) = NEW_EXPR();
4746 checkmem((yyval.a_expr));
4747 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4748 }
4749 break;
4750
Lev Walkin59165cf2017-09-11 06:24:45 -07004751 case 316:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004752#line 2329 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004753 {
4754 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4755 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4756 }
4757 break;
4758
Lev Walkin59165cf2017-09-11 06:24:45 -07004759 case 317:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004760#line 2336 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004761 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004762 (yyval.a_expr) = NEW_EXPR();
4763 checkmem((yyval.a_expr));
4764 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4765 (yyval.a_expr)->meta_type = AMT_VALUE;
4766 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004767 }
4768 break;
4769
Lev Walkin59165cf2017-09-11 06:24:45 -07004770 case 318:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004771#line 2343 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004772 {
4773 (yyval.a_expr) = NEW_EXPR();
4774 checkmem((yyval.a_expr));
4775 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4776 (yyval.a_expr)->meta_type = AMT_VALUE;
4777 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4778 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4779 }
4780 break;
4781
Lev Walkin59165cf2017-09-11 06:24:45 -07004782 case 319:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004783#line 2351 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004784 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004785 (yyval.a_expr) = NEW_EXPR();
4786 checkmem((yyval.a_expr));
4787 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4788 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkinbf979152017-09-07 23:36:11 -07004789 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4790 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4791 }
4792 break;
4793
Lev Walkin59165cf2017-09-11 06:24:45 -07004794 case 320:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004795#line 2359 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004796 {
4797 (yyval.a_expr) = NEW_EXPR();
4798 checkmem((yyval.a_expr));
4799 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4800 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004801 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004802 }
4803 break;
4804
Lev Walkin59165cf2017-09-11 06:24:45 -07004805 case 321:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004806#line 2366 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004807 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004808 (yyval.a_expr) = NEW_EXPR();
4809 checkmem((yyval.a_expr));
4810 (yyval.a_expr)->Identifier = strdup("...");
4811 checkmem((yyval.a_expr)->Identifier);
4812 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
4813 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004814 }
4815 break;
4816
Lev Walkin59165cf2017-09-11 06:24:45 -07004817 case 322:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004818#line 2377 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004819 {
4820 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4821 checkmem((yyval.a_value));
4822 }
4823 break;
4824
Lev Walkin59165cf2017-09-11 06:24:45 -07004825 case 323:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004826#line 2381 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004827 {
Lev Walkinbf979152017-09-07 23:36:11 -07004828 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4829 checkmem((yyval.a_value));
4830 }
4831 break;
4832
Lev Walkin59165cf2017-09-11 06:24:45 -07004833 case 324:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004834#line 2388 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004835 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004836 (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl));
4837 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00004838 }
4839 break;
4840
Lev Walkin59165cf2017-09-11 06:24:45 -07004841 case 325:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004842#line 2419 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004843 { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); }
4844 break;
4845
Lev Walkin59165cf2017-09-11 06:24:45 -07004846 case 326:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004847#line 2420 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004848 { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); }
4849 break;
4850
Lev Walkin59165cf2017-09-11 06:24:45 -07004851 case 327:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004852#line 2424 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004853 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004854 (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag);
4855 (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode;
Lev Walkin418298d2006-07-13 08:24:20 +00004856 }
4857 break;
4858
Lev Walkin59165cf2017-09-11 06:24:45 -07004859 case 328:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004860#line 2431 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004861 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004862 (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag);
4863 (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int);
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004864 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004865 break;
4866
Lev Walkin59165cf2017-09-11 06:24:45 -07004867 case 329:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004868#line 2437 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004869 { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; }
4870 break;
4871
Lev Walkin59165cf2017-09-11 06:24:45 -07004872 case 330:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004873#line 2438 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004874 { (yyval.a_tag).tag_class = TC_UNIVERSAL; }
4875 break;
4876
Lev Walkin59165cf2017-09-11 06:24:45 -07004877 case 331:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004878#line 2439 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004879 { (yyval.a_tag).tag_class = TC_APPLICATION; }
4880 break;
4881
Lev Walkin59165cf2017-09-11 06:24:45 -07004882 case 332:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004883#line 2440 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004884 { (yyval.a_tag).tag_class = TC_PRIVATE; }
4885 break;
4886
Lev Walkin59165cf2017-09-11 06:24:45 -07004887 case 333:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004888#line 2444 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004889 { (yyval.a_tag).tag_mode = TM_DEFAULT; }
4890 break;
4891
Lev Walkin59165cf2017-09-11 06:24:45 -07004892 case 334:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004893#line 2445 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004894 { (yyval.a_tag).tag_mode = TM_IMPLICIT; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004895 break;
4896
Lev Walkin59165cf2017-09-11 06:24:45 -07004897 case 335:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004898#line 2446 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004899 { (yyval.a_tag).tag_mode = TM_EXPLICIT; }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004900 break;
4901
Lev Walkin59165cf2017-09-11 06:24:45 -07004902 case 336:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004903#line 2450 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004904 {
4905 checkmem((yyvsp[(1) - (1)].tv_str));
4906 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4907 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004908 break;
4909
Lev Walkin59165cf2017-09-11 06:24:45 -07004910 case 337:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004911#line 2454 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004912 {
4913 checkmem((yyvsp[(1) - (1)].tv_str));
4914 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin866bd7f2006-09-14 10:35:20 +00004915 }
4916 break;
4917
Lev Walkin59165cf2017-09-11 06:24:45 -07004918 case 338:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004919#line 2462 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004920 { (yyval.tv_str) = 0; }
4921 break;
4922
Lev Walkin59165cf2017-09-11 06:24:45 -07004923 case 339:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004924#line 2463 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004925 {
4926 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4927 }
4928 break;
4929
Lev Walkin59165cf2017-09-11 06:24:45 -07004930 case 340:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004931#line 2469 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004932 {
4933 checkmem((yyvsp[(1) - (1)].tv_str));
4934 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4935 }
4936 break;
4937
Lev Walkin59165cf2017-09-11 06:24:45 -07004938 case 341:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004939#line 2476 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004940 {
4941 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
4942 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkined409e22017-09-26 18:07:40 -07004943 free((yyvsp[(1) - (1)].tv_str));
Lev Walkind523ea42017-09-06 22:15:08 -07004944 }
4945 break;
4946
Lev Walkin59165cf2017-09-11 06:24:45 -07004947 case 342:
Lev Walkin1a49ced2017-11-06 00:07:00 -08004948#line 2483 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004949 {
4950 (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4951 }
4952 break;
4953
Lev Walkin418298d2006-07-13 08:24:20 +00004954
Lev Walkin752e9732017-08-04 02:06:22 -07004955/* Line 1267 of yacc.c. */
Lev Walkin1a49ced2017-11-06 00:07:00 -08004956#line 4957 "asn1p_y.c"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004957 default: break;
Lev Walkin418298d2006-07-13 08:24:20 +00004958 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004959 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Lev Walkin418298d2006-07-13 08:24:20 +00004960
Lev Walkin0e90aa02013-03-19 16:17:13 -07004961 YYPOPSTACK (yylen);
4962 yylen = 0;
4963 YY_STACK_PRINT (yyss, yyssp);
Lev Walkinf15320b2004-06-03 03:38:44 +00004964
4965 *++yyvsp = yyval;
4966
Lev Walkin752e9732017-08-04 02:06:22 -07004967
Lev Walkin418298d2006-07-13 08:24:20 +00004968 /* Now `shift' the result of the reduction. Determine what state
4969 that goes to, based on the state we popped back to and the rule
4970 number reduced by. */
Lev Walkinf15320b2004-06-03 03:38:44 +00004971
4972 yyn = yyr1[yyn];
4973
Lev Walkin418298d2006-07-13 08:24:20 +00004974 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4975 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00004976 yystate = yytable[yystate];
4977 else
Lev Walkin418298d2006-07-13 08:24:20 +00004978 yystate = yydefgoto[yyn - YYNTOKENS];
Lev Walkinf15320b2004-06-03 03:38:44 +00004979
4980 goto yynewstate;
4981
Lev Walkinf15320b2004-06-03 03:38:44 +00004982
Lev Walkin418298d2006-07-13 08:24:20 +00004983/*------------------------------------.
4984| yyerrlab -- here on detecting error |
4985`------------------------------------*/
4986yyerrlab:
4987 /* If not already recovering from an error, report this error. */
4988 if (!yyerrstatus)
Lev Walkinf15320b2004-06-03 03:38:44 +00004989 {
4990 ++yynerrs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004991#if ! YYERROR_VERBOSE
4992 yyerror (YY_("syntax error"));
4993#else
4994 {
Lev Walkin752e9732017-08-04 02:06:22 -07004995 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4996 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4997 {
4998 YYSIZE_T yyalloc = 2 * yysize;
4999 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5000 yyalloc = YYSTACK_ALLOC_MAXIMUM;
5001 if (yymsg != yymsgbuf)
5002 YYSTACK_FREE (yymsg);
5003 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5004 if (yymsg)
5005 yymsg_alloc = yyalloc;
5006 else
5007 {
5008 yymsg = yymsgbuf;
5009 yymsg_alloc = sizeof yymsgbuf;
5010 }
5011 }
5012
5013 if (0 < yysize && yysize <= yymsg_alloc)
5014 {
5015 (void) yysyntax_error (yymsg, yystate, yychar);
5016 yyerror (yymsg);
5017 }
5018 else
5019 {
5020 yyerror (YY_("syntax error"));
5021 if (yysize != 0)
5022 goto yyexhaustedlab;
5023 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005024 }
5025#endif
5026 }
5027
5028
5029
5030 if (yyerrstatus == 3)
5031 {
Lev Walkin752e9732017-08-04 02:06:22 -07005032 /* If just tried and failed to reuse look-ahead token after an
Lev Walkin0e90aa02013-03-19 16:17:13 -07005033 error, discard it. */
5034
5035 if (yychar <= YYEOF)
5036 {
5037 /* Return failure if at end of input. */
5038 if (yychar == YYEOF)
5039 YYABORT;
Lev Walkinf15320b2004-06-03 03:38:44 +00005040 }
5041 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07005042 {
5043 yydestruct ("Error: discarding",
5044 yytoken, &yylval);
5045 yychar = YYEMPTY;
5046 }
Lev Walkinf15320b2004-06-03 03:38:44 +00005047 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005048
Lev Walkin752e9732017-08-04 02:06:22 -07005049 /* Else will try to reuse look-ahead token after shifting the error
Lev Walkin0e90aa02013-03-19 16:17:13 -07005050 token. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005051 goto yyerrlab1;
Lev Walkinf15320b2004-06-03 03:38:44 +00005052
Lev Walkin418298d2006-07-13 08:24:20 +00005053
Lev Walkin0e90aa02013-03-19 16:17:13 -07005054/*---------------------------------------------------.
5055| yyerrorlab -- error raised explicitly by YYERROR. |
5056`---------------------------------------------------*/
5057yyerrorlab:
5058
5059 /* Pacify compilers like GCC when the user code never invokes
5060 YYERROR and the label yyerrorlab therefore never appears in user
5061 code. */
5062 if (/*CONSTCOND*/ 0)
5063 goto yyerrorlab;
5064
5065 /* Do not reclaim the symbols of the rule which action triggered
5066 this YYERROR. */
5067 YYPOPSTACK (yylen);
5068 yylen = 0;
5069 YY_STACK_PRINT (yyss, yyssp);
5070 yystate = *yyssp;
5071 goto yyerrlab1;
5072
5073
5074/*-------------------------------------------------------------.
5075| yyerrlab1 -- common code for both syntax error and YYERROR. |
5076`-------------------------------------------------------------*/
Lev Walkin418298d2006-07-13 08:24:20 +00005077yyerrlab1:
Lev Walkin418298d2006-07-13 08:24:20 +00005078 yyerrstatus = 3; /* Each real token shifted decrements this. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005079
Lev Walkin418298d2006-07-13 08:24:20 +00005080 for (;;)
Lev Walkina00d6b32006-03-21 03:40:38 +00005081 {
Lev Walkin418298d2006-07-13 08:24:20 +00005082 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07005083 if (yyn != YYPACT_NINF)
Lev Walkin418298d2006-07-13 08:24:20 +00005084 {
5085 yyn += YYTERROR;
5086 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5087 {
5088 yyn = yytable[yyn];
5089 if (0 < yyn)
5090 break;
5091 }
5092 }
5093
5094 /* Pop the current state because it cannot handle the error token. */
5095 if (yyssp == yyss)
5096 YYABORT;
5097
Lev Walkin418298d2006-07-13 08:24:20 +00005098
Lev Walkin0e90aa02013-03-19 16:17:13 -07005099 yydestruct ("Error: popping",
5100 yystos[yystate], yyvsp);
5101 YYPOPSTACK (1);
5102 yystate = *yyssp;
5103 YY_STACK_PRINT (yyss, yyssp);
Lev Walkina00d6b32006-03-21 03:40:38 +00005104 }
Lev Walkina00d6b32006-03-21 03:40:38 +00005105
Lev Walkin752e9732017-08-04 02:06:22 -07005106 if (yyn == YYFINAL)
5107 YYACCEPT;
5108
Lev Walkinf15320b2004-06-03 03:38:44 +00005109 *++yyvsp = yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00005110
Lev Walkinf15320b2004-06-03 03:38:44 +00005111
Lev Walkin0e90aa02013-03-19 16:17:13 -07005112 /* Shift the error token. */
5113 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5114
Lev Walkinf15320b2004-06-03 03:38:44 +00005115 yystate = yyn;
5116 goto yynewstate;
5117
Lev Walkina00d6b32006-03-21 03:40:38 +00005118
Lev Walkin418298d2006-07-13 08:24:20 +00005119/*-------------------------------------.
5120| yyacceptlab -- YYACCEPT comes here. |
5121`-------------------------------------*/
5122yyacceptlab:
5123 yyresult = 0;
5124 goto yyreturn;
5125
5126/*-----------------------------------.
5127| yyabortlab -- YYABORT comes here. |
5128`-----------------------------------*/
5129yyabortlab:
5130 yyresult = 1;
5131 goto yyreturn;
5132
Lev Walkin752e9732017-08-04 02:06:22 -07005133#ifndef yyoverflow
Lev Walkin0e90aa02013-03-19 16:17:13 -07005134/*-------------------------------------------------.
5135| yyexhaustedlab -- memory exhaustion comes here. |
5136`-------------------------------------------------*/
5137yyexhaustedlab:
5138 yyerror (YY_("memory exhausted"));
Lev Walkin418298d2006-07-13 08:24:20 +00005139 yyresult = 2;
5140 /* Fall through. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005141#endif
Lev Walkin418298d2006-07-13 08:24:20 +00005142
5143yyreturn:
Lev Walkin752e9732017-08-04 02:06:22 -07005144 if (yychar != YYEOF && yychar != YYEMPTY)
5145 yydestruct ("Cleanup: discarding lookahead",
5146 yytoken, &yylval);
Lev Walkin0e90aa02013-03-19 16:17:13 -07005147 /* Do not reclaim the symbols of the rule which action triggered
5148 this YYABORT or YYACCEPT. */
5149 YYPOPSTACK (yylen);
5150 YY_STACK_PRINT (yyss, yyssp);
5151 while (yyssp != yyss)
5152 {
5153 yydestruct ("Cleanup: popping",
5154 yystos[*yyssp], yyvsp);
5155 YYPOPSTACK (1);
5156 }
Lev Walkin418298d2006-07-13 08:24:20 +00005157#ifndef yyoverflow
5158 if (yyss != yyssa)
5159 YYSTACK_FREE (yyss);
5160#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07005161#if YYERROR_VERBOSE
5162 if (yymsg != yymsgbuf)
5163 YYSTACK_FREE (yymsg);
5164#endif
5165 /* Make sure YYID is used. */
5166 return YYID (yyresult);
Lev Walkinf15320b2004-06-03 03:38:44 +00005167}
Lev Walkin418298d2006-07-13 08:24:20 +00005168
5169
Lev Walkin1a49ced2017-11-06 00:07:00 -08005170#line 2487 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +00005171
5172
5173
5174/*
5175 * Convert Xstring ('0101'B or '5'H) to the binary vector.
5176 */
5177static asn1p_value_t *
5178_convert_bitstring2binary(char *str, int base) {
5179 asn1p_value_t *val;
5180 int slen;
5181 int memlen;
5182 int baselen;
5183 int bits;
5184 uint8_t *binary_vector;
5185 uint8_t *bv_ptr;
5186 uint8_t cur_val;
5187
5188 assert(str);
5189 assert(str[0] == '\'');
5190
5191 switch(base) {
5192 case 'B':
5193 baselen = 1;
5194 break;
5195 case 'H':
5196 baselen = 4;
5197 break;
5198 default:
5199 assert(base == 'B' || base == 'H');
5200 errno = EINVAL;
5201 return NULL;
5202 }
5203
5204 slen = strlen(str);
5205 assert(str[slen - 1] == base);
5206 assert(str[slen - 2] == '\'');
5207
5208 memlen = slen / (8 / baselen); /* Conservative estimate */
5209
5210 bv_ptr = binary_vector = malloc(memlen + 1);
5211 if(bv_ptr == NULL)
5212 /* ENOMEM */
5213 return NULL;
5214
5215 cur_val = 0;
5216 bits = 0;
5217 while(*(++str) != '\'') {
5218 switch(baselen) {
5219 case 1:
5220 switch(*str) {
5221 case '1':
5222 cur_val |= 1 << (7 - (bits % 8));
5223 case '0':
5224 break;
5225 default:
5226 assert(!"_y UNREACH1");
5227 case ' ': case '\r': case '\n':
5228 continue;
5229 }
5230 break;
5231 case 4:
5232 switch(*str) {
5233 case '0': case '1': case '2': case '3': case '4':
5234 case '5': case '6': case '7': case '8': case '9':
5235 cur_val |= (*str - '0') << (4 - (bits % 8));
5236 break;
5237 case 'A': case 'B': case 'C':
5238 case 'D': case 'E': case 'F':
5239 cur_val |= ((*str - 'A') + 10)
5240 << (4 - (bits % 8));
5241 break;
5242 default:
5243 assert(!"_y UNREACH2");
5244 case ' ': case '\r': case '\n':
5245 continue;
5246 }
5247 break;
5248 }
5249
5250 bits += baselen;
5251 if((bits % 8) == 0) {
5252 *bv_ptr++ = cur_val;
5253 cur_val = 0;
5254 }
5255 }
5256
5257 *bv_ptr = cur_val;
5258 assert((bv_ptr - binary_vector) <= memlen);
5259
5260 val = asn1p_value_frombits(binary_vector, bits, 0);
5261 if(val == NULL) {
5262 free(binary_vector);
5263 }
5264
5265 return val;
5266}
5267
Lev Walkin2e9bd5c2005-08-13 09:07:11 +00005268/*
5269 * For unnamed types (used in old X.208 compliant modules)
5270 * generate some sort of interim names, to not to force human being to fix
5271 * the specification's compliance to modern ASN.1 standards.
5272 */
5273static void
5274_fixup_anonymous_identifier(asn1p_expr_t *expr) {
5275 char *p;
5276 assert(expr->Identifier == 0);
5277
5278 /*
5279 * Try to figure out the type name
5280 * without going too much into details
5281 */
5282 expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
5283 if(expr->reference && expr->reference->comp_count > 0)
5284 expr->Identifier = expr->reference->components[0].name;
5285
5286 fprintf(stderr,
5287 "WARNING: Line %d: expected lower-case member identifier, "
5288 "found an unnamed %s.\n"
5289 "WARNING: Obsolete X.208 syntax detected, "
5290 "please give the member a name.\n",
5291 yylineno, expr->Identifier ? expr->Identifier : "type");
5292
5293 if(!expr->Identifier)
5294 expr->Identifier = "unnamed";
5295 expr->Identifier = strdup(expr->Identifier);
5296 assert(expr->Identifier);
5297 /* Make a lowercase identifier from the type name */
5298 for(p = expr->Identifier; *p; p++) {
5299 switch(*p) {
5300 case 'A' ... 'Z': *p += 32; break;
5301 case ' ': *p = '_'; break;
5302 case '-': *p = '_'; break;
5303 }
5304 }
5305 fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
5306 "Name clash may occur later.\n",
5307 expr->Identifier);
5308}
5309
Lev Walkin59165cf2017-09-11 06:24:45 -07005310static int
Lev Walkinf15320b2004-06-03 03:38:44 +00005311yyerror(const char *msg) {
Lev Walkin9d542d22006-03-14 16:31:37 +00005312 extern char *asn1p_text;
Lev Walkinf15320b2004-06-03 03:38:44 +00005313 fprintf(stderr,
5314 "ASN.1 grammar parse error "
Lev Walkind523ea42017-09-06 22:15:08 -07005315 "near %s:%d (token \"%s\"): %s\n",
5316 ASN_FILENAME, yylineno, asn1p_text, msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00005317 return -1;
5318}
5319
Lev Walkin752e9732017-08-04 02:06:22 -07005320