blob: fdb6a8ffde3906625d3fb265636bdc58b314b5ff [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);
340int yyerror(const char *msg);
341#ifdef YYBYACC
342int yyparse(void **param); /* byacc does not produce a prototype */
343#endif
344void asn1p_lexer_hack_push_opaque_state(void);
345void asn1p_lexer_hack_enable_with_syntax(void);
346void asn1p_lexer_hack_push_encoding_control(void);
347#define yylineno asn1p_lineno
348extern int asn1p_lineno;
Lev Walkind523ea42017-09-06 22:15:08 -0700349const char *asn1p_parse_debug_filename;
350#define ASN_FILENAME asn1p_parse_debug_filename
Lev Walkin752e9732017-08-04 02:06:22 -0700351
352/*
353 * Process directives as <ASN1C:RepresentAsPointer>
354 */
355extern int asn1p_as_pointer;
356
357/*
358 * This temporary variable is used to solve the shortcomings of 1-lookahead
359 * parser.
360 */
361static struct AssignedIdentifier *saved_aid;
362
363static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
364static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
365
366static asn1p_module_t *currentModule;
367#define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule))
368
369#define checkmem(ptr) do { \
370 if(!(ptr)) \
371 return yyerror("Memory failure"); \
372 } while(0)
373
374#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
375 if(arg1->type != constr_type) { \
376 int __ret; \
377 root = asn1p_constraint_new(yylineno, currentModule); \
378 checkmem(root); \
379 root->type = constr_type; \
380 __ret = asn1p_constraint_insert(root, \
381 arg1); \
382 checkmem(__ret == 0); \
383 } else { \
384 root = arg1; \
385 } \
386 if(arg2) { \
387 int __ret \
388 = asn1p_constraint_insert(root, arg2); \
389 checkmem(__ret == 0); \
390 } \
391 } while(0)
392
393#ifdef AL_IMPORT
394#error AL_IMPORT DEFINED ELSEWHERE!
395#endif
396#define AL_IMPORT(to,where,from,field) do { \
397 if(!(from)) break; \
398 while(TQ_FIRST(&((from)->where))) { \
399 TQ_ADD(&((to)->where), \
400 TQ_REMOVE(&((from)->where), field), \
401 field); \
402 } \
403 assert(TQ_FIRST(&((from)->where)) == 0); \
404 } while(0)
405
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 Walkin0c686452017-09-07 22:59:36 -0700428#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 Walkin0c686452017-09-07 22:59:36 -0700464#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 Walkin0c686452017-09-07 22:59:36 -0700477#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 Walkin0c686452017-09-07 22:59:36 -0700692#define YYLAST 921
Lev Walkin418298d2006-07-13 08:24:20 +0000693
Lev Walkin0e90aa02013-03-19 16:17:13 -0700694/* YYNTOKENS -- Number of terminals. */
Lev Walkinbe518fa2017-09-07 02:05:28 -0700695#define YYNTOKENS 125
Lev Walkin0e90aa02013-03-19 16:17:13 -0700696/* YYNNTS -- Number of nonterminals. */
Lev Walkin0c686452017-09-07 22:59:36 -0700697#define YYNNTS 144
Lev Walkin0e90aa02013-03-19 16:17:13 -0700698/* YYNRULES -- Number of rules. */
Lev Walkin0c686452017-09-07 22:59:36 -0700699#define YYNRULES 347
Lev Walkin0e90aa02013-03-19 16:17:13 -0700700/* YYNRULES -- Number of states. */
Lev Walkin0c686452017-09-07 22:59:36 -0700701#define YYNSTATES 523
Lev Walkin418298d2006-07-13 08:24:20 +0000702
703/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
704#define YYUNDEFTOK 2
Lev Walkinbe518fa2017-09-07 02:05:28 -0700705#define YYMAXUTOK 364
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 Walkinbe518fa2017-09-07 02:05:28 -0700716 2, 2, 2, 121, 2, 2, 2, 2, 2, 2,
717 114, 115, 2, 2, 117, 2, 122, 2, 2, 2,
718 2, 2, 2, 2, 2, 2, 2, 2, 118, 116,
719 123, 2, 2, 2, 124, 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 Walkinbe518fa2017-09-07 02:05:28 -0700722 2, 119, 2, 120, 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 Walkinbe518fa2017-09-07 02:05:28 -0700725 2, 2, 2, 112, 108, 113, 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 Walkinbe518fa2017-09-07 02:05:28 -0700749 105, 107, 109, 110, 111
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,
763 156, 158, 162, 164, 168, 173, 175, 177, 182, 186,
764 190, 197, 204, 206, 210, 212, 216, 220, 224, 228,
765 230, 234, 236, 238, 240, 242, 243, 245, 247, 251,
766 257, 261, 264, 268, 270, 272, 276, 279, 281, 283,
767 289, 290, 292, 294, 298, 301, 306, 310, 314, 318,
768 322, 326, 327, 329, 330, 337, 339, 342, 344, 346,
769 348, 352, 354, 358, 362, 366, 367, 370, 372, 377,
770 382, 387, 394, 401, 403, 408, 412, 414, 418, 422,
771 426, 428, 432, 434, 438, 440, 442, 444, 446, 450,
772 454, 456, 461, 463, 465, 469, 470, 474, 476, 478,
773 480, 482, 484, 486, 488, 490, 494, 496, 498, 500,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700774 502, 505, 507, 509, 511, 514, 517, 519, 521, 524,
775 527, 529, 531, 533, 535, 537, 539, 542, 544, 549,
776 554, 560, 565, 569, 571, 573, 575, 577, 579, 581,
777 583, 585, 587, 589, 591, 593, 595, 597, 599, 601,
Lev Walkin0c686452017-09-07 22:59:36 -0700778 603, 605, 606, 608, 609, 611, 612, 614, 616, 620,
779 622, 625, 627, 629, 631, 633, 635, 639, 645, 647,
780 651, 653, 657, 659, 663, 665, 669, 671, 675, 677,
781 679, 681, 683, 685, 687, 689, 690, 694, 697, 700,
782 703, 706, 710, 712, 714, 716, 718, 720, 722, 724,
783 726, 728, 730, 732, 734, 737, 738, 740, 744, 748,
784 750, 752, 754, 758, 764, 766, 770, 774, 775, 777,
785 779, 781, 783, 785, 787, 789, 790, 796, 799, 801,
786 804, 807, 811, 813, 815, 819, 824, 826, 830, 833,
787 837, 839, 843, 844, 846, 848, 851, 853, 857, 859,
788 861, 865, 870, 875, 877, 881, 886, 891, 893, 895,
789 899, 901, 906, 911, 913, 915, 917, 919, 921, 923,
790 924, 926, 929, 934, 935, 937, 939, 941, 942, 944,
791 946, 948, 950, 952, 953, 955, 957, 959
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 Walkinbe518fa2017-09-07 02:05:28 -0700797 126, 0, -1, 104, 127, -1, 127, -1, 128, -1,
Lev Walkin0c686452017-09-07 22:59:36 -0700798 127, 128, -1, -1, 263, 129, 130, 42, 134, 3,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700799 29, 137, 47, -1, -1, 131, -1, 112, 132, 113,
Lev Walkin0c686452017-09-07 22:59:36 -0700800 -1, 112, 113, -1, 133, -1, 132, 133, -1, 266,
801 -1, 266, 114, 12, 115, -1, 12, -1, -1, 135,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700802 -1, 136, -1, 135, 136, -1, 49, 92, -1, 60,
803 92, -1, 28, 92, -1, 51, 61, -1, 18, 65,
804 -1, -1, 138, -1, 150, 142, 139, -1, 140, -1,
805 139, 140, -1, 157, -1, 187, -1, 155, -1, -1,
806 46, 18, 141, -1, 197, -1, -1, 143, -1, 62,
807 144, 116, -1, 62, 54, -1, -1, 145, -1, 147,
Lev Walkin0c686452017-09-07 22:59:36 -0700808 -1, 145, 147, -1, -1, 131, -1, 148, 54, 263,
809 146, -1, 149, -1, 148, 117, 149, -1, 263, -1,
810 263, 112, 113, -1, 266, -1, -1, 151, -1, 50,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700811 152, 116, -1, 50, 25, 116, -1, 50, 116, -1,
Lev Walkin0c686452017-09-07 22:59:36 -0700812 153, -1, 152, 117, 153, -1, 263, -1, 263, 112,
813 113, -1, 266, -1, 112, 207, 113, -1, 263, 156,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700814 3, 154, -1, 196, -1, 181, -1, 181, 112, 160,
Lev Walkin0c686452017-09-07 22:59:36 -0700815 113, -1, 263, 3, 177, -1, 263, 3, 167, -1,
816 263, 112, 158, 113, 3, 177, -1, 263, 112, 158,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700817 113, 3, 167, -1, 159, -1, 158, 117, 159, -1,
Lev Walkin0c686452017-09-07 22:59:36 -0700818 263, -1, 263, 118, 266, -1, 263, 118, 263, -1,
819 194, 118, 266, -1, 194, 118, 263, -1, 161, -1,
820 160, 117, 161, -1, 177, -1, 190, -1, 266, -1,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700821 154, -1, -1, 163, -1, 164, -1, 163, 117, 164,
Lev Walkin0c686452017-09-07 22:59:36 -0700822 -1, 163, 117, 4, 163, 5, -1, 266, 177, 245,
823 -1, 177, 245, -1, 38, 76, 177, -1, 176, -1,
824 166, -1, 165, 117, 166, -1, 266, 177, -1, 176,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700825 -1, 177, -1, 36, 112, 169, 113, 171, -1, -1,
Lev Walkin0c686452017-09-07 22:59:36 -0700826 96, -1, 170, -1, 169, 117, 170, -1, 19, 245,
827 -1, 20, 177, 168, 245, -1, 20, 185, 245, -1,
828 20, 186, 245, -1, 19, 185, 245, -1, 19, 177,
829 245, -1, 19, 186, 245, -1, -1, 172, -1, -1,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700830 103, 90, 112, 173, 174, 113, -1, 175, -1, 174,
831 175, -1, 6, -1, 21, -1, 184, -1, 119, 174,
832 120, -1, 111, -1, 111, 121, 191, -1, 111, 121,
Lev Walkin0c686452017-09-07 22:59:36 -0700833 256, -1, 258, 179, 201, -1, -1, 178, 180, -1,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700834 156, -1, 35, 112, 165, 113, -1, 86, 112, 162,
Lev Walkin0c686452017-09-07 22:59:36 -0700835 113, -1, 87, 112, 162, 113, -1, 86, 202, 76,
836 265, 258, 179, -1, 87, 202, 76, 265, 258, 179,
837 -1, 26, -1, 26, 43, 33, 266, -1, 64, 76,
838 181, -1, 17, -1, 17, 122, 263, -1, 264, 122,
839 263, -1, 17, 122, 266, -1, 264, -1, 264, 122,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700840 182, -1, 183, -1, 182, 122, 183, -1, 184, -1,
841 19, -1, 20, -1, 19, -1, 185, 122, 19, -1,
Lev Walkin0c686452017-09-07 22:59:36 -0700842 185, 122, 20, -1, 18, -1, 266, 177, 3, 188,
843 -1, 190, -1, 191, -1, 266, 118, 188, -1, -1,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700844 112, 189, 193, -1, 71, -1, 53, -1, 94, -1,
Lev Walkin0c686452017-09-07 22:59:36 -0700845 8, -1, 10, -1, 192, -1, 256, -1, 266, -1,
846 263, 122, 266, -1, 9, -1, 15, -1, 16, -1,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700847 7, -1, 193, 7, -1, 32, -1, 71, -1, 84,
848 -1, 75, 89, -1, 73, 59, -1, 85, -1, 52,
849 -1, 44, 79, -1, 34, 89, -1, 99, -1, 55,
850 -1, 197, -1, 195, -1, 66, -1, 48, -1, 30,
Lev Walkin0c686452017-09-07 22:59:36 -0700851 89, -1, 194, -1, 66, 112, 249, 113, -1, 48,
852 112, 253, 113, -1, 30, 89, 112, 251, 113, -1,
853 22, 112, 247, 113, -1, 22, 112, 113, -1, 31,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700854 -1, 56, -1, 57, -1, 58, -1, 67, -1, 72,
855 -1, 82, -1, 91, -1, 93, -1, 98, -1, 100,
856 -1, 101, -1, 102, -1, 74, -1, 108, -1, 109,
Lev Walkin0c686452017-09-07 22:59:36 -0700857 -1, 106, -1, 107, -1, -1, 203, -1, -1, 204,
858 -1, -1, 203, -1, 216, -1, 114, 205, 115, -1,
859 203, -1, 204, 203, -1, 206, -1, 234, -1, 207,
860 -1, 111, -1, 208, -1, 208, 117, 111, -1, 208,
861 117, 111, 117, 208, -1, 209, -1, 25, 105, 212,
862 -1, 210, -1, 209, 198, 210, -1, 211, -1, 210,
863 199, 211, -1, 212, -1, 212, 105, 212, -1, 213,
864 -1, 114, 208, 115, -1, 221, -1, 223, -1, 215,
865 -1, 216, -1, 225, -1, 217, -1, 218, -1, -1,
866 112, 214, 193, -1, 54, 203, -1, 88, 203, -1,
867 78, 9, -1, 78, 266, -1, 219, 238, 220, -1,
868 221, -1, 69, -1, 221, -1, 68, -1, 53, -1,
869 94, -1, 257, -1, 192, -1, 222, -1, 266, -1,
870 8, -1, 10, -1, 224, 177, -1, -1, 63, -1,
871 103, 37, 226, -1, 103, 38, 227, -1, 203, -1,
872 228, -1, 229, -1, 112, 230, 113, -1, 112, 111,
873 117, 230, 113, -1, 231, -1, 230, 117, 231, -1,
874 268, 200, 232, -1, -1, 233, -1, 81, -1, 23,
875 -1, 77, -1, 235, -1, 239, -1, 237, -1, -1,
876 39, 33, 112, 236, 193, -1, 40, 177, -1, 110,
877 -1, 110, 123, -1, 123, 110, -1, 123, 110, 123,
878 -1, 240, -1, 241, -1, 112, 263, 113, -1, 240,
879 112, 242, 113, -1, 243, -1, 242, 117, 243, -1,
880 124, 244, -1, 124, 122, 244, -1, 266, -1, 244,
881 122, 266, -1, -1, 246, -1, 77, -1, 41, 188,
882 -1, 248, -1, 247, 117, 248, -1, 266, -1, 250,
883 -1, 249, 117, 250, -1, 266, 114, 256, 115, -1,
884 266, 114, 191, 115, -1, 252, -1, 251, 117, 252,
885 -1, 266, 114, 12, 115, -1, 266, 114, 191, 115,
886 -1, 254, -1, 255, -1, 254, 117, 255, -1, 266,
887 -1, 266, 114, 256, 115, -1, 266, 114, 191, 115,
888 -1, 256, -1, 111, -1, 12, -1, 13, -1, 256,
889 -1, 14, -1, -1, 259, -1, 260, 262, -1, 119,
890 261, 12, 120, -1, -1, 97, -1, 27, -1, 83,
891 -1, -1, 60, -1, 49, -1, 17, -1, 18, -1,
892 18, -1, -1, 266, -1, 11, -1, 266, -1, 267,
893 -1
Lev Walkin418298d2006-07-13 08:24:20 +0000894};
895
896/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700897static const yytype_uint16 yyrline[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000898{
Lev Walkin0c686452017-09-07 22:59:36 -0700899 0, 410, 410, 413, 419, 424, 441, 441, 470, 471,
900 475, 478, 484, 490, 499, 503, 507, 517, 518, 527,
901 530, 539, 542, 545, 548, 552, 573, 574, 583, 596,
902 599, 616, 623, 637, 645, 644, 658, 671, 672, 675,
903 685, 691, 692, 695, 700, 707, 708, 712, 723, 728,
904 735, 741, 747, 757, 758, 770, 773, 776, 784, 789,
905 796, 802, 808, 817, 820, 830, 843, 853, 873, 879,
906 895, 901, 909, 918, 929, 933, 941, 949, 957, 968,
907 973, 980, 983, 991, 1002, 1025, 1026, 1029, 1034, 1038,
908 1046, 1053, 1059, 1066, 1072, 1077, 1084, 1089, 1092, 1099,
909 1109, 1110, 1114, 1121, 1131, 1141, 1152, 1162, 1173, 1183,
910 1194, 1206, 1207, 1214, 1213, 1222, 1226, 1233, 1237, 1240,
911 1244, 1250, 1258, 1267, 1279, 1303, 1310, 1329, 1332, 1338,
912 1344, 1350, 1360, 1370, 1376, 1388, 1403, 1411, 1422, 1433,
913 1444, 1452, 1474, 1482, 1491, 1495, 1500, 1509, 1514, 1519,
914 1527, 1550, 1560, 1561, 1562, 1569, 1569, 1574, 1582, 1587,
915 1592, 1597, 1602, 1605, 1611, 1622, 1640, 1644, 1649, 1657,
916 1666, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689,
917 1690, 1691, 1692, 1693, 1700, 1701, 1702, 1706, 1712, 1717,
918 1722, 1727, 1732, 1741, 1742, 1746, 1750, 1751, 1752, 1753,
919 1754, 1758, 1759, 1760, 1761, 1765, 1766, 1773, 1773, 1774,
920 1774, 1778, 1779, 1783, 1784, 1788, 1789, 1790, 1794, 1800,
921 1801, 1810, 1810, 1812, 1815, 1819, 1820, 1826, 1837, 1838,
922 1844, 1845, 1851, 1852, 1859, 1860, 1866, 1867, 1878, 1884,
923 1890, 1891, 1893, 1894, 1895, 1896, 1896, 1907, 1912, 1917,
924 1922, 1934, 1943, 1944, 1950, 1951, 1957, 1962, 1967, 1968,
925 1969, 1970, 1984, 1989, 1997, 2004, 2005, 2013, 2016, 2022,
926 2023, 2023, 2024, 2026, 2039, 2044, 2050, 2064, 2065, 2069,
927 2072, 2075, 2083, 2084, 2085, 2090, 2089, 2101, 2110, 2111,
928 2112, 2113, 2116, 2119, 2128, 2144, 2150, 2156, 2170, 2181,
929 2197, 2200, 2220, 2224, 2228, 2232, 2239, 2244, 2250, 2259,
930 2264, 2271, 2279, 2289, 2294, 2301, 2309, 2319, 2334, 2339,
931 2346, 2353, 2361, 2369, 2376, 2387, 2391, 2398, 2399, 2430,
932 2431, 2435, 2442, 2448, 2449, 2450, 2451, 2455, 2456, 2457,
933 2461, 2465, 2473, 2480, 2481, 2487, 2494, 2500
Lev Walkin418298d2006-07-13 08:24:20 +0000934};
935#endif
936
Lev Walkin752e9732017-08-04 02:06:22 -0700937#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
Lev Walkin0e90aa02013-03-19 16:17:13 -0700938/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
939 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
Lev Walkin418298d2006-07-13 08:24:20 +0000940static const char *const yytname[] =
941{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700942 "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft",
943 "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring",
Lev Walkinbe518fa2017-09-07 02:05:28 -0700944 "TOK_cstring", "TOK_hstring", "\"identifier\"", "\"number\"",
945 "\"negative number\"", "TOK_realnumber", "TOK_tuple", "TOK_quadruple",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700946 "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference",
Lev Walkinbe518fa2017-09-07 02:05:28 -0700947 "TOK_valuefieldreference", "TOK_Literal", "TOK_ExtValue_BIT_STRING",
948 "TOK_ABSENT", "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY",
949 "TOK_APPLICATION", "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT",
950 "TOK_BMPString", "TOK_BOOLEAN", "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE",
951 "TOK_CLASS", "TOK_COMPONENT", "TOK_COMPONENTS", "TOK_CONSTRAINED",
952 "TOK_CONTAINING", "TOK_DEFAULT", "TOK_DEFINITIONS", "TOK_DEFINED",
953 "TOK_EMBEDDED", "TOK_ENCODED", "TOK_ENCODING_CONTROL", "TOK_END",
954 "TOK_ENUMERATED", "TOK_EXPLICIT", "TOK_EXPORTS", "TOK_EXTENSIBILITY",
955 "TOK_EXTERNAL", "TOK_FALSE", "TOK_FROM", "TOK_GeneralizedTime",
956 "TOK_GeneralString", "TOK_GraphicString", "TOK_IA5String",
957 "TOK_IDENTIFIER", "TOK_IMPLICIT", "TOK_IMPLIED", "TOK_IMPORTS",
958 "TOK_INCLUDES", "TOK_INSTANCE", "TOK_INSTRUCTIONS", "TOK_INTEGER",
959 "TOK_ISO646String", "TOK_MAX", "TOK_MIN", "TOK_MINUS_INFINITY",
960 "TOK_NULL", "TOK_NumericString", "TOK_OBJECT", "TOK_ObjectDescriptor",
961 "TOK_OCTET", "TOK_OF", "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV",
962 "TOK_PLUS_INFINITY", "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE",
963 "TOK_REAL", "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE",
964 "TOK_STRING", "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS",
965 "TOK_TeletexString", "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE",
966 "TOK_UNIVERSAL", "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String",
Lev Walkin752e9732017-08-04 02:06:22 -0700967 "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH",
968 "\"UTF-8 byte order mark\"", "TOK_EXCEPT", "'^'", "TOK_INTERSECTION",
Lev Walkinbe518fa2017-09-07 02:05:28 -0700969 "'|'", "TOK_UNION", "\"..\"", "\"...\"", "'{'", "'}'", "'('", "')'",
970 "';'", "','", "':'", "'['", "']'", "'!'", "'.'", "'<'", "'@'", "$accept",
971 "ParsedGrammar", "ModuleList", "ModuleDefinition", "@1",
Lev Walkin752e9732017-08-04 02:06:22 -0700972 "optObjectIdentifier", "ObjectIdentifier", "ObjectIdentifierBody",
973 "ObjectIdentifierElement", "optModuleDefinitionFlags",
974 "ModuleDefinitionFlags", "ModuleDefinitionFlag", "optModuleBody",
975 "ModuleBody", "AssignmentList", "Assignment", "@2", "optImports",
976 "ImportsDefinition", "optImportsBundleSet", "ImportsBundleSet",
977 "AssignedIdentifier", "ImportsBundle", "ImportsList", "ImportsElement",
978 "optExports", "ExportsDefinition", "ExportsBody", "ExportsElement",
979 "ValueSet", "ValueSetTypeAssignment", "DefinedType", "DataTypeReference",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700980 "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList",
981 "ActualParameter", "optComponentTypeLists", "ComponentTypeLists",
982 "ComponentType", "AlternativeTypeLists", "AlternativeType",
Lev Walkin0c686452017-09-07 22:59:36 -0700983 "ObjectClass", "optUNIQUE", "FieldSpec", "ClassField", "optWithSyntax",
Lev Walkin752e9732017-08-04 02:06:22 -0700984 "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700985 "ExtensionAndException", "Type", "NSTD_IndirectMarker",
986 "TypeDeclaration", "TypeDeclarationSet", "ComplexTypeReference",
987 "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement",
988 "PrimitiveFieldReference", "FieldName", "DefinedObjectClass",
Lev Walkin752e9732017-08-04 02:06:22 -0700989 "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700990 "RestrictedCharacterStringValue", "Opaque", "BasicTypeId",
991 "BasicTypeId_UniverationCompatible", "BasicType", "BasicString",
Lev Walkin0c686452017-09-07 22:59:36 -0700992 "UnionMark", "IntersectionMark", "optConstraint", "optManyConstraints",
993 "optSizeOrConstraint", "Constraint", "ManyConstraints", "ConstraintSpec",
994 "SubtypeConstraint", "ElementSetSpecs", "ElementSetSpec", "Unions",
995 "Intersections", "IntersectionElements", "Elements", "SubtypeElements",
996 "@5", "PermittedAlphabet", "SizeConstraint", "PatternConstraint",
997 "ValueRange", "LowerEndValue", "UpperEndValue", "SingleValue",
998 "BitStringValue", "ContainedSubtype", "optINCLUDES",
999 "InnerTypeConstraints", "SingleTypeConstraint",
Lev Walkind523ea42017-09-06 22:15:08 -07001000 "MultipleTypeConstraints", "FullSpecification", "PartialSpecification",
1001 "TypeConstraints", "NamedConstraint", "optPresenceConstraint",
1002 "PresenceConstraint", "GeneralConstraint", "UserDefinedConstraint", "@6",
1003 "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint",
1004 "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList",
1005 "AtNotationElement", "ComponentIdList", "optMarker", "Marker",
Lev Walkinbe518fa2017-09-07 02:05:28 -07001006 "IdentifierList", "IdentifierElement", "NamedNumberList", "NamedNumber",
1007 "NamedBitList", "NamedBit", "Enumerations", "UniverationList",
1008 "UniverationElement", "SignedNumber", "RealValue", "optTag", "Tag",
1009 "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName",
1010 "ObjectClassReference", "optIdentifier", "Identifier",
1011 "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,
1031 363, 364, 123, 125, 40, 41, 59, 44, 58, 91,
1032 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 Walkinbe518fa2017-09-07 02:05:28 -07001039 0, 125, 126, 126, 127, 127, 129, 128, 130, 130,
1040 131, 131, 132, 132, 133, 133, 133, 134, 134, 135,
1041 135, 136, 136, 136, 136, 136, 137, 137, 138, 139,
1042 139, 140, 140, 140, 141, 140, 140, 142, 142, 143,
1043 143, 144, 144, 145, 145, 146, 146, 147, 148, 148,
1044 149, 149, 149, 150, 150, 151, 151, 151, 152, 152,
1045 153, 153, 153, 154, 155, 156, 156, 156, 157, 157,
1046 157, 157, 158, 158, 159, 159, 159, 159, 159, 160,
1047 160, 161, 161, 161, 161, 162, 162, 163, 163, 163,
1048 164, 164, 164, 164, 165, 165, 166, 166, 166, 167,
1049 168, 168, 169, 169, 170, 170, 170, 170, 170, 170,
1050 170, 171, 171, 173, 172, 174, 174, 175, 175, 175,
1051 175, 176, 176, 176, 177, 178, 179, 180, 180, 180,
1052 180, 180, 180, 180, 180, 180, 181, 181, 181, 181,
1053 181, 181, 182, 182, 183, 184, 184, 185, 185, 185,
1054 186, 187, 188, 188, 188, 189, 188, 188, 190, 190,
1055 190, 190, 190, 190, 191, 191, 192, 192, 192, 193,
1056 193, 194, 194, 194, 194, 194, 194, 194, 194, 194,
1057 194, 194, 194, 194, 195, 195, 195, 196, 196, 196,
1058 196, 196, 196, 197, 197, 197, 197, 197, 197, 197,
1059 197, 197, 197, 197, 197, 197, 197, 198, 198, 199,
Lev Walkin0c686452017-09-07 22:59:36 -07001060 199, 200, 200, 201, 201, 202, 202, 202, 203, 204,
1061 204, 205, 205, 206, 207, 207, 207, 207, 208, 208,
1062 209, 209, 210, 210, 211, 211, 212, 212, 213, 213,
1063 213, 213, 213, 213, 213, 214, 213, 215, 216, 217,
1064 217, 218, 219, 219, 220, 220, 221, 221, 221, 221,
1065 221, 221, 222, 222, 223, 224, 224, 225, 225, 226,
1066 227, 227, 228, 229, 230, 230, 231, 232, 232, 233,
1067 233, 233, 234, 234, 234, 236, 235, 237, 238, 238,
1068 238, 238, 239, 239, 240, 241, 242, 242, 243, 243,
1069 244, 244, 245, 245, 246, 246, 247, 247, 248, 249,
1070 249, 250, 250, 251, 251, 252, 252, 253, 254, 254,
1071 255, 255, 255, 255, 255, 256, 256, 257, 257, 258,
1072 258, 259, 260, 261, 261, 261, 261, 262, 262, 262,
1073 263, 263, 264, 265, 265, 266, 267, 268
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,
1085 1, 3, 1, 3, 4, 1, 1, 4, 3, 3,
1086 6, 6, 1, 3, 1, 3, 3, 3, 3, 1,
1087 3, 1, 1, 1, 1, 0, 1, 1, 3, 5,
1088 3, 2, 3, 1, 1, 3, 2, 1, 1, 5,
1089 0, 1, 1, 3, 2, 4, 3, 3, 3, 3,
1090 3, 0, 1, 0, 6, 1, 2, 1, 1, 1,
1091 3, 1, 3, 3, 3, 0, 2, 1, 4, 4,
1092 4, 6, 6, 1, 4, 3, 1, 3, 3, 3,
1093 1, 3, 1, 3, 1, 1, 1, 1, 3, 3,
1094 1, 4, 1, 1, 3, 0, 3, 1, 1, 1,
1095 1, 1, 1, 1, 1, 3, 1, 1, 1, 1,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001096 2, 1, 1, 1, 2, 2, 1, 1, 2, 2,
1097 1, 1, 1, 1, 1, 1, 2, 1, 4, 4,
1098 5, 4, 3, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin418298d2006-07-13 08:24:20 +00001099 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin0c686452017-09-07 22:59:36 -07001100 1, 0, 1, 0, 1, 0, 1, 1, 3, 1,
1101 2, 1, 1, 1, 1, 1, 3, 5, 1, 3,
1102 1, 3, 1, 3, 1, 3, 1, 3, 1, 1,
1103 1, 1, 1, 1, 1, 0, 3, 2, 2, 2,
1104 2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1105 1, 1, 1, 1, 2, 0, 1, 3, 3, 1,
1106 1, 1, 3, 5, 1, 3, 3, 0, 1, 1,
1107 1, 1, 1, 1, 1, 0, 5, 2, 1, 2,
1108 2, 3, 1, 1, 3, 4, 1, 3, 2, 3,
1109 1, 3, 0, 1, 1, 2, 1, 3, 1, 1,
1110 3, 4, 4, 1, 3, 4, 4, 1, 1, 3,
1111 1, 4, 4, 1, 1, 1, 1, 1, 1, 0,
1112 1, 2, 4, 0, 1, 1, 1, 0, 1, 1,
1113 1, 1, 1, 0, 1, 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 Walkin0c686452017-09-07 22:59:36 -07001121 0, 340, 341, 0, 0, 3, 4, 6, 2, 1,
1122 5, 8, 0, 0, 9, 345, 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 Walkinbe518fa2017-09-07 02:05:28 -07001128 193, 0, 194, 195, 196, 197, 198, 206, 199, 200,
1129 201, 202, 203, 204, 205, 28, 29, 33, 31, 32,
Lev Walkin0c686452017-09-07 22:59:36 -07001130 36, 0, 329, 59, 61, 39, 44, 0, 0, 0,
1131 34, 30, 329, 136, 342, 0, 0, 171, 0, 0,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001132 185, 177, 181, 184, 172, 0, 0, 173, 176, 180,
Lev Walkin0c686452017-09-07 22:59:36 -07001133 0, 0, 66, 187, 183, 65, 182, 140, 333, 0,
1134 125, 330, 337, 45, 49, 51, 35, 0, 69, 68,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001135 0, 0, 186, 179, 178, 0, 0, 175, 174, 0,
Lev Walkin0c686452017-09-07 22:59:36 -07001136 185, 184, 0, 72, 0, 74, 0, 329, 0, 335,
1137 336, 334, 0, 0, 0, 213, 339, 338, 331, 46,
1138 47, 0, 137, 139, 192, 0, 306, 308, 0, 325,
1139 326, 324, 0, 317, 318, 323, 320, 0, 309, 0,
1140 186, 0, 0, 0, 0, 265, 64, 160, 166, 161,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001141 167, 168, 158, 159, 84, 0, 79, 81, 82, 162,
1142 163, 83, 145, 146, 141, 142, 144, 138, 0, 157,
Lev Walkin0c686452017-09-07 22:59:36 -07001143 155, 151, 152, 153, 0, 164, 133, 0, 0, 215,
1144 215, 127, 126, 265, 124, 219, 214, 329, 329, 0,
1145 102, 191, 0, 0, 313, 0, 189, 0, 0, 188,
1146 0, 0, 329, 73, 78, 77, 76, 75, 262, 263,
1147 328, 0, 256, 0, 266, 253, 0, 0, 257, 0,
1148 224, 245, 265, 259, 0, 225, 228, 230, 232, 234,
1149 236, 240, 241, 243, 244, 0, 238, 260, 239, 329,
1150 242, 327, 258, 261, 67, 329, 0, 332, 0, 0,
1151 0, 0, 329, 0, 329, 0, 216, 217, 329, 0,
1152 0, 329, 245, 0, 221, 223, 222, 282, 284, 283,
1153 292, 293, 220, 150, 147, 0, 304, 302, 302, 302,
1154 104, 303, 100, 302, 302, 111, 0, 307, 190, 0,
1155 0, 319, 0, 0, 164, 310, 0, 0, 71, 70,
1156 265, 247, 249, 250, 248, 0, 0, 0, 0, 63,
1157 0, 207, 208, 265, 209, 210, 265, 265, 288, 0,
1158 0, 264, 80, 143, 169, 156, 165, 154, 0, 121,
1159 0, 94, 97, 98, 329, 135, 0, 0, 86, 87,
1160 93, 302, 329, 343, 0, 343, 0, 287, 0, 218,
1161 0, 305, 109, 0, 108, 110, 101, 302, 106, 107,
1162 0, 99, 112, 103, 314, 0, 0, 322, 321, 312,
1163 311, 229, 269, 267, 0, 268, 270, 271, 246, 237,
1164 226, 231, 233, 235, 289, 290, 255, 251, 254, 170,
1165 134, 0, 128, 329, 96, 329, 129, 329, 91, 302,
1166 329, 344, 130, 329, 285, 294, 0, 0, 296, 148,
1167 149, 105, 0, 315, 316, 0, 0, 274, 346, 347,
1168 211, 265, 291, 122, 123, 95, 92, 329, 88, 90,
1169 125, 125, 0, 0, 298, 300, 295, 0, 113, 0,
1170 272, 0, 277, 212, 227, 0, 131, 132, 286, 299,
1171 0, 297, 0, 0, 275, 280, 281, 279, 276, 278,
1172 89, 301, 117, 118, 0, 0, 115, 119, 273, 0,
1173 114, 116, 120
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 Walkinbe518fa2017-09-07 02:05:28 -07001180 31, 32, 44, 45, 85, 86, 136, 56, 57, 63,
1181 64, 170, 65, 66, 67, 46, 47, 50, 51, 204,
Lev Walkin0c686452017-09-07 22:59:36 -07001182 87, 121, 88, 152, 153, 205, 206, 387, 388, 389,
1183 380, 381, 138, 407, 239, 240, 411, 412, 502, 515,
1184 516, 390, 391, 164, 165, 232, 122, 214, 215, 517,
1185 328, 329, 89, 221, 298, 222, 223, 273, 375, 123,
1186 124, 125, 126, 363, 366, 492, 234, 305, 306, 236,
1187 313, 314, 274, 275, 276, 277, 278, 279, 280, 357,
1188 281, 282, 283, 284, 285, 437, 286, 287, 288, 289,
1189 290, 423, 425, 426, 427, 466, 467, 508, 509, 316,
1190 317, 482, 318, 370, 319, 320, 321, 457, 458, 484,
1191 330, 331, 175, 176, 187, 188, 243, 244, 182, 183,
1192 184, 291, 292, 130, 131, 132, 162, 168, 224, 127,
1193 450, 293, 469, 470
Lev Walkin418298d2006-07-13 08:24:20 +00001194};
1195
1196/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1197 STATE-NUM. */
Lev Walkin0c686452017-09-07 22:59:36 -07001198#define YYPACT_NINF -351
Lev Walkin0e90aa02013-03-19 16:17:13 -07001199static const yytype_int16 yypact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001200{
Lev Walkin0c686452017-09-07 22:59:36 -07001201 0, -351, -351, 238, 59, 238, -351, -351, 238, -351,
1202 -351, -21, 26, 43, -351, -351, -351, -351, 49, -351,
1203 -18, 248, -351, -351, 103, 70, 65, 71, 124, 113,
1204 216, 248, -351, 82, -351, -351, -351, -351, -351, 252,
1205 -351, -351, 122, 77, 161, -351, 172, -351, 170, -351,
1206 63, -351, 177, -351, -351, 198, 653, -351, -351, -351,
1207 105, 191, -351, 196, 105, -351, -3, -351, 204, -351,
1208 -351, 301, -351, -351, -351, -351, -351, -351, -351, -351,
1209 -351, -351, -351, -351, -351, 653, -351, -351, -351, -351,
1210 -351, 303, 212, -351, -351, -351, -351, 238, 105, 210,
1211 -351, -351, -10, 214, -351, 226, 253, -351, 261, 274,
1212 270, -351, -351, 272, -351, 314, 297, -351, -351, -351,
1213 819, 386, 278, -351, -351, -351, -351, 269, 28, 389,
1214 -351, -351, 33, -21, -351, -351, -351, 281, -351, -351,
1215 105, 13, 283, -351, -351, 163, 387, -351, -351, 308,
1216 -351, -351, 24, -351, 282, 288, 287, 179, 250, -351,
1217 -351, -351, 395, 232, 742, 294, -351, -351, -351, -351,
1218 -351, 275, -351, -351, -351, 93, -351, -351, 387, -351,
1219 -351, -351, 296, 293, -351, -351, 299, 104, -351, 300,
1220 -351, 408, 819, 105, 105, 516, -351, -351, -351, -351,
1221 -351, -351, -351, -351, -351, 112, -351, -351, -351, -351,
1222 -351, -351, -351, -351, 304, -351, -351, -351, 307, -351,
1223 -351, -351, -351, -351, 306, 298, 390, 318, 356, -14,
1224 139, -351, -351, 409, -351, -351, 294, 205, 23, 120,
1225 -351, -351, 387, 162, -351, 322, -351, 163, 328, -351,
1226 387, 328, -10, -351, -351, -351, -351, -351, -351, -351,
1227 -351, 332, -351, 294, -351, -351, 217, 294, -351, 292,
1228 -351, -351, 537, -351, 325, 323, 240, 256, -351, 334,
1229 -351, -351, -351, -351, -351, -78, -20, -351, -351, 212,
1230 -351, -351, -351, -351, -351, 179, 337, -351, 434, 387,
1231 232, 410, 19, 347, 8, 366, -351, -351, 8, 369,
1232 413, 212, 238, 335, -351, -351, -351, -351, -351, -351,
1233 339, -351, -351, -351, -351, 232, -351, 12, 109, 12,
1234 -351, -351, 351, 109, 12, 349, 275, -351, -351, 387,
1235 260, -351, 338, 340, -351, -351, 341, 342, -351, -351,
1236 644, -351, -351, -351, -351, 294, 346, 434, 344, -351,
1237 343, -351, -351, 644, -351, -351, 644, 644, 345, 350,
1238 249, -351, -351, -351, -351, 454, -351, -351, 387, 352,
1239 167, -351, -351, -351, 212, -351, 388, 353, 357, -351,
1240 -351, 12, 212, 387, 354, 387, 358, -351, 362, -351,
1241 359, -351, -351, 348, -351, -351, -351, 12, -351, -351,
1242 379, -351, -351, -351, -351, 361, 365, -351, -351, -351,
1243 -351, -351, -351, -351, 25, -351, -351, -351, 454, -351,
1244 364, 256, -351, -351, -351, 363, -351, -351, -351, -351,
1245 -351, 328, -351, 19, -351, 212, -351, 45, -351, 12,
1246 212, -351, -351, 212, -351, -351, 2, 192, -351, -351,
1247 -351, -351, 370, -351, -351, 367, 194, -351, -351, -351,
1248 294, 537, -351, -351, -351, -351, -351, 54, -351, -351,
1249 -351, -351, 434, 387, 368, -351, -351, 359, -351, 387,
1250 -351, 387, 126, -351, -351, 3, -351, -351, 454, 368,
1251 387, -351, 51, 197, -351, -351, -351, -351, -351, -351,
1252 -351, -351, -351, -351, 51, 58, -351, -351, -351, 48,
1253 -351, -351, -351
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 Walkin0c686452017-09-07 22:59:36 -07001259 -351, -351, 482, 42, -351, -351, 360, -351, 471, -351,
1260 -351, 460, -351, -351, -351, 407, -351, -351, -351, -351,
1261 -351, -351, 430, -351, 397, -351, -351, -351, 436, 355,
1262 -351, 336, -351, -351, 309, -351, 203, 199, 22, 55,
1263 -351, 61, 254, -351, -351, 169, -351, -351, -351, -6,
1264 -297, -299, -91, -351, -109, -351, 206, -351, 218, -153,
1265 277, 279, -351, -238, -351, -143, -239, -142, -350, -93,
1266 -351, -351, -27, -351, -351, -351, -351, 280, -155, -351,
1267 -351, -351, 285, -270, -351, 153, 147, -219, -351, -351,
1268 -351, 150, -351, -351, -351, -351, 149, -351, -351, -351,
1269 -351, -351, -351, -351, -351, 44, 31, -351, -351, -351,
1270 -351, -351, -351, -351, -351, -351, -351, -351, 47, 52,
1271 -294, -351, -351, 295, -351, 286, -351, 200, -351, -351,
1272 291, -141, -351, -254, -351, -351, -351, -351, 20, -351,
1273 145, -12, -351, -351
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 Walkin0c686452017-09-07 22:59:36 -07001280#define YYTABLE_NINF -303
Lev Walkin0e90aa02013-03-19 16:17:13 -07001281static const yytype_int16 yytable[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001282{
Lev Walkin0c686452017-09-07 22:59:36 -07001283 20, 129, 358, 382, 185, 216, 20, 428, 510, 342,
1284 235, 139, 346, 15, 208, 209, 210, 1, 2, 15,
1285 7, 209, 210, 7, 15, 7, 137, 154, 7, 90,
1286 15, 53, 368, 402, 404, 405, 15, 15, 16, 408,
1287 409, 323, 324, 69, 92, 369, 386, 10, 53, 477,
1288 10, 97, 69, 325, 512, 159, 15, 512, 90, 9,
1289 15, 16, 377, 52, 512, 15, 207, 212, 213, 513,
1290 212, 213, 513, 92, 267, 68, 91, 212, 213, 513,
1291 52, 322, 166, 386, 68, 21, 69, 401, 15, 326,
1292 -252, 12, 386, 167, 1, 2, 24, 448, 304, 154,
1293 233, 416, 48, -252, 3, 91, 185, 343, 351, 128,
1294 347, 160, 354, 461, 98, 33, 15, 133, 68, 379,
1295 447, -85, 1, 2, 483, 161, 174, 128, 173, 177,
1296 379, 421, 498, 186, 189, 34, 465, 191, 128, 17,
1297 155, 192, 128, 216, 382, 211, 327, 332, 433, 505,
1298 325, 225, 208, 209, 210, 479, 379, 35, 209, 210,
1299 172, 349, 22, 36, 128, 379, 245, 514, 522, -26,
1300 514, 520, 43, 128, 15, 179, 180, 514, 217, 59,
1301 60, 255, 257, 209, 210, 37, 326, 197, 198, 199,
1302 15, 179, 180, 49, 200, 201, 480, 41, 371, 481,
1303 422, 494, 473, 506, 207, 38, 241, 507, 54, 15,
1304 242, 383, 155, 254, 256, 1, 2, 249, 521, 39,
1305 397, 250, 521, 323, 324, 294, 352, 267, 15, 295,
1306 177, 403, 202, 335, 55, 186, 344, 336, 189, 344,
1307 197, 198, 199, 15, 179, 180, 325, 200, 201, 1,
1308 2, 308, 62, 233, 353, 1, 2, 258, 198, 259,
1309 15, 179, 180, 260, 200, 201, 25, 1, 2, 212,
1310 213, 15, 415, 203, 181, 338, 26, 1, 2, 339,
1311 442, 42, 326, 211, 443, 202, 58, 376, 225, 61,
1312 384, 195, 392, 444, 237, 238, 392, 27, 128, 28,
1313 474, 449, 262, 219, 94, 486, 102, 490, 29, 487,
1314 518, 491, 95, 225, 491, 493, 99, 436, -302, 100,
1315 103, 104, -302, 135, 128, 105, 203, 245, 344, 355,
1316 356, 128, 398, 106, 70, 107, 140, 108, 141, 15,
1317 179, 180, 142, 268, 220, 1, 2, 109, 361, 362,
1318 143, 110, 383, 144, 476, 111, 212, 213, 112, 72,
1319 73, 74, 364, 365, 103, 104, 440, 459, 460, 113,
1320 75, 496, 497, 147, 114, 76, 115, 77, 116, 307,
1321 307, 451, 145, 451, 146, 78, 148, 117, 118, 156,
1322 157, 158, 163, 171, 79, 178, 80, 190, 15, 195,
1323 193, 81, 119, 82, 83, 84, 194, 218, 233, 246,
1324 247, 252, 468, 248, 251, 120, 300, 258, 198, 259,
1325 15, 179, 180, 260, 200, 201, 296, 297, 299, 344,
1326 302, 384, 303, 301, 261, 392, 340, 350, 359, 367,
1327 360, 374, 393, 378, 485, 395, 396, 406, 310, 311,
1328 399, 400, 410, 417, 430, 418, 419, 420, 424, 429,
1329 435, 439, 262, 263, 445, 392, 446, 452, 434, 462,
1330 454, 485, 264, 441, 447, 455, 463, 468, 265, 468,
1331 464, 471, 488, 456, 489, 8, 472, 266, 511, 23,
1332 500, 40, 101, 169, 96, 134, 93, 267, 372, 495,
1333 231, 253, 478, 268, 475, 413, 348, 394, 519, 385,
1334 309, 196, 269, 432, 373, 333, 431, 334, 315, 438,
1335 270, 312, 504, 272, 258, 198, 259, 15, 179, 180,
1336 260, 200, 201, 503, 501, 499, 345, 337, 341, 414,
1337 453, 261, 0, 0, 0, 258, 198, 259, 15, 179,
1338 180, 260, 200, 201, 0, 0, 0, 0, 0, 0,
1339 0, 0, 261, 0, 0, 0, 0, 0, 0, 262,
1340 263, 0, 0, 0, 0, 0, 0, 0, 0, 264,
1341 0, 0, 0, 0, 0, 265, 0, 0, 0, 0,
1342 262, 263, 0, 0, 266, 0, 0, 0, 0, 0,
1343 264, 0, 0, 0, 267, 0, 265, 0, 0, 0,
1344 268, 0, 0, 0, 0, 266, 0, 0, 0, 269,
1345 0, 0, 0, 0, 0, 267, 0, 270, 271, 0,
1346 272, 268, 0, 0, 0, 0, 0, 0, 0, 0,
1347 269, 0, 0, 0, 0, 0, 0, 0, 0, 271,
1348 0, 272, 258, 198, 259, 15, 179, 180, 260, 200,
1349 201, 0, 0, 0, 15, 0, 0, 0, 0, 0,
1350 1, 2, 0, 0, 0, 0, 0, 0, 0, 0,
1351 0, 0, 0, 0, 70, 0, 0, 0, 0, 0,
1352 0, 0, 0, 0, 0, 0, 0, 262, 263, 71,
1353 0, 0, 0, 0, 0, 0, 0, 264, 0, 72,
1354 73, 74, 0, 265, 0, 0, 0, 0, 0, 0,
1355 75, 0, 266, 0, 0, 76, 0, 77, 0, 0,
1356 0, 0, 267, 0, 0, 78, 0, 0, 268, 0,
1357 0, 0, 0, 0, 79, 0, 80, 269, 0, 0,
1358 0, 81, 0, 82, 83, 84, 271, 0, 272, 103,
1359 104, 0, 0, 0, 105, 0, 0, 0, 226, 0,
1360 0, 0, 106, 70, 107, 0, 108, 227, 0, 0,
1361 0, 0, 0, 0, 0, 0, 109, 0, 0, 0,
1362 110, 0, 0, 0, 111, 0, 0, 112, 72, 73,
1363 74, 0, 0, 0, 0, 0, 228, 0, 113, 75,
1364 0, 0, 0, 114, 76, 115, 77, 116, 0, 0,
1365 0, 0, 0, 0, 78, 0, 117, 118, 229, 230,
1366 0, 0, 0, 79, 0, 80, 1, 2, 0, 0,
1367 81, 119, 82, 83, 84, 0, 0, 0, 0, 149,
1368 70, 107, 0, 108, 0, 0, 0, 0, 0, 0,
1369 0, 0, 0, 109, 0, 0, 0, 150, 0, 0,
1370 0, 111, 0, 0, 112, 72, 73, 74, 0, 0,
1371 0, 0, 0, 0, 0, 151, 75, 0, 0, 0,
1372 114, 76, 115, 77, 116, 0, 0, 0, 0, 0,
1373 0, 78, 0, 117, 118, 0, 0, 0, 0, 0,
1374 79, 0, 80, 0, 0, 0, 0, 81, 119, 82,
1375 83, 84
Lev Walkin418298d2006-07-13 08:24:20 +00001376};
1377
Lev Walkin0e90aa02013-03-19 16:17:13 -07001378static const yytype_int16 yycheck[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001379{
Lev Walkin0c686452017-09-07 22:59:36 -07001380 12, 92, 272, 302, 145, 158, 18, 357, 5, 248,
1381 165, 102, 251, 11, 157, 157, 157, 17, 18, 11,
1382 0, 163, 163, 3, 11, 5, 36, 120, 8, 56,
1383 11, 43, 110, 327, 328, 329, 11, 11, 12, 333,
1384 334, 18, 19, 55, 56, 123, 38, 5, 60, 4,
1385 8, 54, 64, 41, 6, 27, 11, 6, 85, 0,
1386 11, 12, 300, 43, 6, 11, 157, 19, 20, 21,
1387 19, 20, 21, 85, 88, 55, 56, 19, 20, 21,
1388 60, 236, 49, 38, 64, 42, 98, 325, 11, 77,
1389 110, 112, 38, 60, 17, 18, 114, 391, 112, 192,
1390 114, 340, 25, 123, 104, 85, 247, 248, 263, 119,
1391 251, 83, 267, 407, 117, 12, 11, 97, 98, 111,
1392 117, 113, 17, 18, 122, 97, 113, 119, 140, 141,
1393 111, 350, 482, 145, 146, 65, 111, 113, 119, 113,
1394 120, 117, 119, 296, 443, 157, 237, 238, 367, 23,
1395 41, 163, 295, 295, 295, 449, 111, 92, 300, 300,
1396 140, 252, 113, 92, 119, 111, 178, 119, 120, 47,
1397 119, 113, 50, 119, 11, 12, 13, 119, 158, 116,
1398 117, 193, 194, 325, 325, 61, 77, 8, 9, 10,
1399 11, 12, 13, 116, 15, 16, 450, 115, 289, 453,
1400 355, 471, 441, 77, 295, 92, 113, 81, 47, 11,
1401 117, 302, 192, 193, 194, 17, 18, 113, 515, 3,
1402 311, 117, 519, 18, 19, 113, 9, 88, 11, 117,
1403 242, 122, 53, 113, 62, 247, 248, 117, 250, 251,
1404 8, 9, 10, 11, 12, 13, 41, 15, 16, 17,
1405 18, 112, 54, 114, 266, 17, 18, 8, 9, 10,
1406 11, 12, 13, 14, 15, 16, 18, 17, 18, 19,
1407 20, 11, 12, 94, 111, 113, 28, 17, 18, 117,
1408 113, 29, 77, 295, 117, 53, 116, 299, 300, 112,
1409 302, 112, 304, 384, 19, 20, 308, 49, 119, 51,
1410 441, 392, 53, 71, 113, 113, 3, 113, 60, 117,
1411 113, 117, 116, 325, 117, 470, 112, 68, 113, 18,
1412 17, 18, 117, 113, 119, 22, 94, 339, 340, 37,
1413 38, 119, 312, 30, 31, 32, 122, 34, 112, 11,
1414 12, 13, 89, 94, 112, 17, 18, 44, 108, 109,
1415 89, 48, 443, 79, 445, 52, 19, 20, 55, 56,
1416 57, 58, 106, 107, 17, 18, 378, 19, 20, 66,
1417 67, 480, 481, 59, 71, 72, 73, 74, 75, 229,
1418 230, 393, 112, 395, 112, 82, 89, 84, 85, 3,
1419 112, 122, 3, 112, 91, 112, 93, 89, 11, 112,
1420 118, 98, 99, 100, 101, 102, 118, 12, 114, 113,
1421 117, 3, 424, 114, 114, 112, 118, 8, 9, 10,
1422 11, 12, 13, 14, 15, 16, 122, 120, 122, 441,
1423 112, 443, 76, 43, 25, 447, 114, 105, 113, 105,
1424 117, 7, 76, 33, 456, 76, 33, 96, 39, 40,
1425 115, 112, 103, 115, 111, 115, 115, 115, 112, 115,
1426 110, 7, 53, 54, 76, 477, 113, 113, 123, 90,
1427 112, 483, 63, 121, 117, 113, 115, 489, 69, 491,
1428 115, 117, 112, 124, 117, 3, 123, 78, 500, 18,
1429 122, 31, 85, 133, 64, 98, 60, 88, 295, 477,
1430 164, 192, 447, 94, 443, 336, 252, 308, 514, 303,
1431 230, 156, 103, 366, 296, 238, 363, 238, 233, 370,
1432 111, 112, 491, 114, 8, 9, 10, 11, 12, 13,
1433 14, 15, 16, 489, 487, 483, 250, 242, 247, 339,
1434 395, 25, -1, -1, -1, 8, 9, 10, 11, 12,
1435 13, 14, 15, 16, -1, -1, -1, -1, -1, -1,
1436 -1, -1, 25, -1, -1, -1, -1, -1, -1, 53,
1437 54, -1, -1, -1, -1, -1, -1, -1, -1, 63,
1438 -1, -1, -1, -1, -1, 69, -1, -1, -1, -1,
1439 53, 54, -1, -1, 78, -1, -1, -1, -1, -1,
1440 63, -1, -1, -1, 88, -1, 69, -1, -1, -1,
1441 94, -1, -1, -1, -1, 78, -1, -1, -1, 103,
1442 -1, -1, -1, -1, -1, 88, -1, 111, 112, -1,
1443 114, 94, -1, -1, -1, -1, -1, -1, -1, -1,
1444 103, -1, -1, -1, -1, -1, -1, -1, -1, 112,
1445 -1, 114, 8, 9, 10, 11, 12, 13, 14, 15,
1446 16, -1, -1, -1, 11, -1, -1, -1, -1, -1,
1447 17, 18, -1, -1, -1, -1, -1, -1, -1, -1,
1448 -1, -1, -1, -1, 31, -1, -1, -1, -1, -1,
1449 -1, -1, -1, -1, -1, -1, -1, 53, 54, 46,
1450 -1, -1, -1, -1, -1, -1, -1, 63, -1, 56,
1451 57, 58, -1, 69, -1, -1, -1, -1, -1, -1,
1452 67, -1, 78, -1, -1, 72, -1, 74, -1, -1,
1453 -1, -1, 88, -1, -1, 82, -1, -1, 94, -1,
1454 -1, -1, -1, -1, 91, -1, 93, 103, -1, -1,
1455 -1, 98, -1, 100, 101, 102, 112, -1, 114, 17,
1456 18, -1, -1, -1, 22, -1, -1, -1, 26, -1,
1457 -1, -1, 30, 31, 32, -1, 34, 35, -1, -1,
1458 -1, -1, -1, -1, -1, -1, 44, -1, -1, -1,
1459 48, -1, -1, -1, 52, -1, -1, 55, 56, 57,
1460 58, -1, -1, -1, -1, -1, 64, -1, 66, 67,
1461 -1, -1, -1, 71, 72, 73, 74, 75, -1, -1,
1462 -1, -1, -1, -1, 82, -1, 84, 85, 86, 87,
1463 -1, -1, -1, 91, -1, 93, 17, 18, -1, -1,
1464 98, 99, 100, 101, 102, -1, -1, -1, -1, 30,
1465 31, 32, -1, 34, -1, -1, -1, -1, -1, -1,
1466 -1, -1, -1, 44, -1, -1, -1, 48, -1, -1,
1467 -1, 52, -1, -1, 55, 56, 57, 58, -1, -1,
1468 -1, -1, -1, -1, -1, 66, 67, -1, -1, -1,
1469 71, 72, 73, 74, 75, -1, -1, -1, -1, -1,
1470 -1, 82, -1, 84, 85, -1, -1, -1, -1, -1,
1471 91, -1, 93, -1, -1, -1, -1, 98, 99, 100,
1472 101, 102
Lev Walkin418298d2006-07-13 08:24:20 +00001473};
1474
1475/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1476 symbol of state STATE-NUM. */
Lev Walkinbe518fa2017-09-07 02:05:28 -07001477static const yytype_uint16 yystos[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001478{
Lev Walkin0c686452017-09-07 22:59:36 -07001479 0, 17, 18, 104, 126, 127, 128, 263, 127, 0,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001480 128, 129, 112, 130, 131, 11, 12, 113, 132, 133,
Lev Walkin0c686452017-09-07 22:59:36 -07001481 266, 42, 113, 133, 114, 18, 28, 49, 51, 60,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001482 134, 135, 136, 12, 65, 92, 92, 61, 92, 3,
1483 136, 115, 29, 50, 137, 138, 150, 151, 25, 116,
Lev Walkin0c686452017-09-07 22:59:36 -07001484 152, 153, 263, 266, 47, 62, 142, 143, 116, 116,
1485 117, 112, 54, 144, 145, 147, 148, 149, 263, 266,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001486 31, 46, 56, 57, 58, 67, 72, 74, 82, 91,
1487 93, 98, 100, 101, 102, 139, 140, 155, 157, 187,
Lev Walkin0c686452017-09-07 22:59:36 -07001488 197, 263, 266, 153, 113, 116, 147, 54, 117, 112,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001489 18, 140, 3, 17, 18, 22, 30, 32, 34, 44,
1490 48, 52, 55, 66, 71, 73, 75, 84, 85, 99,
Lev Walkin0c686452017-09-07 22:59:36 -07001491 112, 156, 181, 194, 195, 196, 197, 264, 119, 177,
1492 258, 259, 260, 263, 149, 113, 141, 36, 167, 177,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001493 122, 112, 89, 89, 79, 112, 112, 59, 89, 30,
Lev Walkin0c686452017-09-07 22:59:36 -07001494 48, 66, 158, 159, 194, 263, 3, 112, 122, 27,
1495 83, 97, 261, 3, 178, 179, 49, 60, 262, 131,
1496 146, 112, 263, 266, 113, 247, 248, 266, 112, 12,
1497 13, 111, 253, 254, 255, 256, 266, 249, 250, 266,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001498 89, 113, 117, 118, 118, 112, 154, 8, 9, 10,
1499 15, 16, 53, 94, 154, 160, 161, 177, 190, 192,
Lev Walkin0c686452017-09-07 22:59:36 -07001500 256, 266, 19, 20, 182, 183, 184, 263, 12, 71,
1501 112, 188, 190, 191, 263, 266, 26, 35, 64, 86,
1502 87, 156, 180, 114, 201, 203, 204, 19, 20, 169,
1503 170, 113, 117, 251, 252, 266, 113, 117, 114, 113,
1504 117, 114, 3, 159, 263, 266, 263, 266, 8, 10,
1505 14, 25, 53, 54, 63, 69, 78, 88, 94, 103,
1506 111, 112, 114, 192, 207, 208, 209, 210, 211, 212,
1507 213, 215, 216, 217, 218, 219, 221, 222, 223, 224,
1508 225, 256, 257, 266, 113, 117, 122, 120, 189, 122,
1509 118, 43, 112, 76, 112, 202, 203, 216, 112, 202,
1510 39, 40, 112, 205, 206, 207, 234, 235, 237, 239,
1511 240, 241, 203, 18, 19, 41, 77, 177, 185, 186,
1512 245, 246, 177, 185, 186, 113, 117, 248, 113, 117,
1513 114, 255, 191, 256, 266, 250, 191, 256, 167, 177,
1514 105, 203, 9, 266, 203, 37, 38, 214, 208, 113,
1515 117, 108, 109, 198, 106, 107, 199, 105, 110, 123,
1516 238, 177, 161, 183, 7, 193, 266, 188, 33, 111,
1517 165, 166, 176, 177, 266, 181, 38, 162, 163, 164,
1518 176, 177, 266, 76, 162, 76, 33, 177, 263, 115,
1519 112, 188, 245, 122, 245, 245, 96, 168, 245, 245,
1520 103, 171, 172, 170, 252, 12, 191, 115, 115, 115,
1521 115, 212, 203, 226, 112, 227, 228, 229, 193, 115,
1522 111, 210, 211, 212, 123, 110, 68, 220, 221, 7,
1523 266, 121, 113, 117, 177, 76, 113, 117, 245, 177,
1524 265, 266, 113, 265, 112, 113, 124, 242, 243, 19,
1525 20, 245, 90, 115, 115, 111, 230, 231, 266, 267,
1526 268, 117, 123, 191, 256, 166, 177, 4, 164, 245,
1527 258, 258, 236, 122, 244, 266, 113, 117, 112, 117,
1528 113, 117, 200, 203, 208, 163, 179, 179, 193, 244,
1529 122, 243, 173, 230, 231, 23, 77, 81, 232, 233,
1530 5, 266, 6, 21, 119, 174, 175, 184, 113, 174,
1531 113, 175, 120
Lev Walkin418298d2006-07-13 08:24:20 +00001532};
1533
Lev Walkinf15320b2004-06-03 03:38:44 +00001534#define yyerrok (yyerrstatus = 0)
1535#define yyclearin (yychar = YYEMPTY)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001536#define YYEMPTY (-2)
Lev Walkinf15320b2004-06-03 03:38:44 +00001537#define YYEOF 0
Lev Walkin418298d2006-07-13 08:24:20 +00001538
Lev Walkinf15320b2004-06-03 03:38:44 +00001539#define YYACCEPT goto yyacceptlab
Lev Walkin418298d2006-07-13 08:24:20 +00001540#define YYABORT goto yyabortlab
Lev Walkin0e90aa02013-03-19 16:17:13 -07001541#define YYERROR goto yyerrorlab
1542
Lev Walkin418298d2006-07-13 08:24:20 +00001543
1544/* Like YYERROR except do call yyerror. This remains here temporarily
1545 to ease the transition to the new meaning of YYERROR, for GCC.
Lev Walkin752e9732017-08-04 02:06:22 -07001546 Once GCC version 2 has supplanted version 1, this can go. */
Lev Walkin418298d2006-07-13 08:24:20 +00001547
Lev Walkinf15320b2004-06-03 03:38:44 +00001548#define YYFAIL goto yyerrlab
Lev Walkin418298d2006-07-13 08:24:20 +00001549
Lev Walkinf15320b2004-06-03 03:38:44 +00001550#define YYRECOVERING() (!!yyerrstatus)
Lev Walkin418298d2006-07-13 08:24:20 +00001551
Lev Walkin752e9732017-08-04 02:06:22 -07001552#define YYBACKUP(Token, Value) \
1553do \
1554 if (yychar == YYEMPTY && yylen == 1) \
1555 { \
1556 yychar = (Token); \
1557 yylval = (Value); \
1558 yytoken = YYTRANSLATE (yychar); \
1559 YYPOPSTACK (1); \
1560 goto yybackup; \
1561 } \
1562 else \
1563 { \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001564 yyerror (YY_("syntax error: cannot back up")); \
Lev Walkin418298d2006-07-13 08:24:20 +00001565 YYERROR; \
1566 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001567while (YYID (0))
1568
Lev Walkin752e9732017-08-04 02:06:22 -07001569
Lev Walkinf15320b2004-06-03 03:38:44 +00001570#define YYTERROR 1
1571#define YYERRCODE 256
1572
Lev Walkin418298d2006-07-13 08:24:20 +00001573
Lev Walkin752e9732017-08-04 02:06:22 -07001574/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1575 If N is 0, then set CURRENT to the empty location which ends
1576 the previous symbol: RHS[0] (always defined). */
1577
1578#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1579#ifndef YYLLOC_DEFAULT
1580# define YYLLOC_DEFAULT(Current, Rhs, N) \
1581 do \
1582 if (YYID (N)) \
1583 { \
1584 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1585 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1586 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1587 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1588 } \
1589 else \
1590 { \
1591 (Current).first_line = (Current).last_line = \
1592 YYRHSLOC (Rhs, 0).last_line; \
1593 (Current).first_column = (Current).last_column = \
1594 YYRHSLOC (Rhs, 0).last_column; \
1595 } \
1596 while (YYID (0))
1597#endif
1598
1599
1600/* YY_LOCATION_PRINT -- Print the location on the stream.
1601 This macro was not mandated originally: define only if we know
1602 we won't break user code: when these are the locations we know. */
1603
Lev Walkin0e90aa02013-03-19 16:17:13 -07001604#ifndef YY_LOCATION_PRINT
Lev Walkin752e9732017-08-04 02:06:22 -07001605# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1606# define YY_LOCATION_PRINT(File, Loc) \
1607 fprintf (File, "%d.%d-%d.%d", \
1608 (Loc).first_line, (Loc).first_column, \
1609 (Loc).last_line, (Loc).last_column)
1610# else
1611# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1612# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07001613#endif
1614
1615
Lev Walkin418298d2006-07-13 08:24:20 +00001616/* YYLEX -- calling `yylex' with the right arguments. */
Lev Walkin752e9732017-08-04 02:06:22 -07001617
Lev Walkin0e90aa02013-03-19 16:17:13 -07001618#ifdef YYLEX_PARAM
1619# define YYLEX yylex (YYLEX_PARAM)
1620#else
1621# define YYLEX yylex ()
1622#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001623
Lev Walkin418298d2006-07-13 08:24:20 +00001624/* Enable debugging if requested. */
1625#if YYDEBUG
Lev Walkinfb872bd2006-03-18 06:53:11 +00001626
Lev Walkin418298d2006-07-13 08:24:20 +00001627# ifndef YYFPRINTF
1628# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1629# define YYFPRINTF fprintf
1630# endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001631
Lev Walkin418298d2006-07-13 08:24:20 +00001632# define YYDPRINTF(Args) \
1633do { \
1634 if (yydebug) \
1635 YYFPRINTF Args; \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001636} while (YYID (0))
1637
1638# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1639do { \
1640 if (yydebug) \
1641 { \
1642 YYFPRINTF (stderr, "%s ", Title); \
1643 yy_symbol_print (stderr, \
1644 Type, Value); \
1645 YYFPRINTF (stderr, "\n"); \
1646 } \
1647} while (YYID (0))
1648
1649
1650/*--------------------------------.
1651| Print this symbol on YYOUTPUT. |
1652`--------------------------------*/
1653
1654/*ARGSUSED*/
1655#if (defined __STDC__ || defined __C99__FUNC__ \
1656 || defined __cplusplus || defined _MSC_VER)
1657static void
1658yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1659#else
1660static void
1661yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1662 FILE *yyoutput;
1663 int yytype;
1664 YYSTYPE const * const yyvaluep;
1665#endif
1666{
1667 if (!yyvaluep)
1668 return;
1669# ifdef YYPRINT
1670 if (yytype < YYNTOKENS)
1671 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1672# else
1673 YYUSE (yyoutput);
1674# endif
Lev Walkin752e9732017-08-04 02:06:22 -07001675 switch (yytype)
1676 {
1677 default:
1678 break;
1679 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001680}
1681
1682
1683/*--------------------------------.
1684| Print this symbol on YYOUTPUT. |
1685`--------------------------------*/
1686
1687#if (defined __STDC__ || defined __C99__FUNC__ \
1688 || defined __cplusplus || defined _MSC_VER)
1689static void
1690yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1691#else
1692static void
1693yy_symbol_print (yyoutput, yytype, yyvaluep)
1694 FILE *yyoutput;
1695 int yytype;
1696 YYSTYPE const * const yyvaluep;
1697#endif
1698{
1699 if (yytype < YYNTOKENS)
1700 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1701 else
1702 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1703
1704 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1705 YYFPRINTF (yyoutput, ")");
1706}
1707
1708/*------------------------------------------------------------------.
1709| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1710| TOP (included). |
1711`------------------------------------------------------------------*/
1712
1713#if (defined __STDC__ || defined __C99__FUNC__ \
1714 || defined __cplusplus || defined _MSC_VER)
1715static void
Lev Walkin752e9732017-08-04 02:06:22 -07001716yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001717#else
1718static void
Lev Walkin752e9732017-08-04 02:06:22 -07001719yy_stack_print (bottom, top)
1720 yytype_int16 *bottom;
1721 yytype_int16 *top;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001722#endif
1723{
1724 YYFPRINTF (stderr, "Stack now");
Lev Walkin752e9732017-08-04 02:06:22 -07001725 for (; bottom <= top; ++bottom)
1726 YYFPRINTF (stderr, " %d", *bottom);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001727 YYFPRINTF (stderr, "\n");
1728}
1729
1730# define YY_STACK_PRINT(Bottom, Top) \
1731do { \
1732 if (yydebug) \
1733 yy_stack_print ((Bottom), (Top)); \
1734} while (YYID (0))
1735
1736
1737/*------------------------------------------------.
1738| Report that the YYRULE is going to be reduced. |
1739`------------------------------------------------*/
1740
1741#if (defined __STDC__ || defined __C99__FUNC__ \
1742 || defined __cplusplus || defined _MSC_VER)
1743static void
1744yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1745#else
1746static void
1747yy_reduce_print (yyvsp, yyrule)
1748 YYSTYPE *yyvsp;
1749 int yyrule;
1750#endif
1751{
1752 int yynrhs = yyr2[yyrule];
1753 int yyi;
1754 unsigned long int yylno = yyrline[yyrule];
1755 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1756 yyrule - 1, yylno);
1757 /* The symbols being reduced. */
1758 for (yyi = 0; yyi < yynrhs; yyi++)
1759 {
Lev Walkin752e9732017-08-04 02:06:22 -07001760 fprintf (stderr, " $%d = ", yyi + 1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001761 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1762 &(yyvsp[(yyi + 1) - (yynrhs)])
1763 );
Lev Walkin752e9732017-08-04 02:06:22 -07001764 fprintf (stderr, "\n");
Lev Walkin0e90aa02013-03-19 16:17:13 -07001765 }
1766}
1767
1768# define YY_REDUCE_PRINT(Rule) \
1769do { \
1770 if (yydebug) \
1771 yy_reduce_print (yyvsp, Rule); \
1772} while (YYID (0))
1773
Lev Walkin418298d2006-07-13 08:24:20 +00001774/* Nonzero means print parse trace. It is left uninitialized so that
1775 multiple parsers can coexist. */
1776int yydebug;
1777#else /* !YYDEBUG */
1778# define YYDPRINTF(Args)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001779# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1780# define YY_STACK_PRINT(Bottom, Top)
1781# define YY_REDUCE_PRINT(Rule)
Lev Walkin418298d2006-07-13 08:24:20 +00001782#endif /* !YYDEBUG */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001783
Lev Walkin0e90aa02013-03-19 16:17:13 -07001784
Lev Walkin418298d2006-07-13 08:24:20 +00001785/* YYINITDEPTH -- initial size of the parser's stacks. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001786#ifndef YYINITDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001787# define YYINITDEPTH 200
Lev Walkinf15320b2004-06-03 03:38:44 +00001788#endif
1789
Lev Walkin418298d2006-07-13 08:24:20 +00001790/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1791 if the built-in stack extension method is used).
1792
1793 Do not make this value too large; the results are undefined if
Lev Walkin0e90aa02013-03-19 16:17:13 -07001794 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Lev Walkin418298d2006-07-13 08:24:20 +00001795 evaluated with infinite-precision integer arithmetic. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001796
Lev Walkinf15320b2004-06-03 03:38:44 +00001797#ifndef YYMAXDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001798# define YYMAXDEPTH 10000
Lev Walkinf15320b2004-06-03 03:38:44 +00001799#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001800
Lev Walkin752e9732017-08-04 02:06:22 -07001801
Lev Walkinf15320b2004-06-03 03:38:44 +00001802
Lev Walkin418298d2006-07-13 08:24:20 +00001803#if YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +00001804
Lev Walkin418298d2006-07-13 08:24:20 +00001805# ifndef yystrlen
Lev Walkin0e90aa02013-03-19 16:17:13 -07001806# if defined __GLIBC__ && defined _STRING_H
Lev Walkin418298d2006-07-13 08:24:20 +00001807# define yystrlen strlen
1808# else
1809/* Return the length of YYSTR. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001810#if (defined __STDC__ || defined __C99__FUNC__ \
1811 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001812static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001813yystrlen (const char *yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001814#else
1815static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001816yystrlen (yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001817 const char *yystr;
1818#endif
Lev Walkina00d6b32006-03-21 03:40:38 +00001819{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001820 YYSIZE_T yylen;
1821 for (yylen = 0; yystr[yylen]; yylen++)
Lev Walkin418298d2006-07-13 08:24:20 +00001822 continue;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001823 return yylen;
Lev Walkin418298d2006-07-13 08:24:20 +00001824}
1825# endif
1826# endif
1827
1828# ifndef yystpcpy
Lev Walkin0e90aa02013-03-19 16:17:13 -07001829# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Lev Walkin418298d2006-07-13 08:24:20 +00001830# define yystpcpy stpcpy
1831# else
1832/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1833 YYDEST. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001834#if (defined __STDC__ || defined __C99__FUNC__ \
1835 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001836static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001837yystpcpy (char *yydest, const char *yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001838#else
1839static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001840yystpcpy (yydest, yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001841 char *yydest;
1842 const char *yysrc;
1843#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001844{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001845 char *yyd = yydest;
1846 const char *yys = yysrc;
Lev Walkin418298d2006-07-13 08:24:20 +00001847
1848 while ((*yyd++ = *yys++) != '\0')
1849 continue;
1850
1851 return yyd - 1;
1852}
1853# endif
1854# endif
1855
Lev Walkin0e90aa02013-03-19 16:17:13 -07001856# ifndef yytnamerr
1857/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1858 quotes and backslashes, so that it's suitable for yyerror. The
1859 heuristic is that double-quoting is unnecessary unless the string
1860 contains an apostrophe, a comma, or backslash (other than
1861 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1862 null, do not copy; instead, return the length of what the result
1863 would have been. */
1864static YYSIZE_T
1865yytnamerr (char *yyres, const char *yystr)
Lev Walkin418298d2006-07-13 08:24:20 +00001866{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001867 if (*yystr == '"')
Lev Walkin418298d2006-07-13 08:24:20 +00001868 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07001869 YYSIZE_T yyn = 0;
1870 char const *yyp = yystr;
Lev Walkin418298d2006-07-13 08:24:20 +00001871
Lev Walkin0e90aa02013-03-19 16:17:13 -07001872 for (;;)
1873 switch (*++yyp)
1874 {
1875 case '\'':
1876 case ',':
1877 goto do_not_strip_quotes;
1878
1879 case '\\':
1880 if (*++yyp != '\\')
1881 goto do_not_strip_quotes;
1882 /* Fall through. */
1883 default:
1884 if (yyres)
1885 yyres[yyn] = *yyp;
1886 yyn++;
1887 break;
1888
1889 case '"':
1890 if (yyres)
1891 yyres[yyn] = '\0';
1892 return yyn;
1893 }
1894 do_not_strip_quotes: ;
Lev Walkin418298d2006-07-13 08:24:20 +00001895 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001896
1897 if (! yyres)
1898 return yystrlen (yystr);
1899
1900 return yystpcpy (yyres, yystr) - yyres;
Lev Walkin418298d2006-07-13 08:24:20 +00001901}
Lev Walkin0e90aa02013-03-19 16:17:13 -07001902# endif
Lev Walkin418298d2006-07-13 08:24:20 +00001903
Lev Walkin752e9732017-08-04 02:06:22 -07001904/* Copy into YYRESULT an error message about the unexpected token
1905 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1906 including the terminating null byte. If YYRESULT is null, do not
1907 copy anything; just return the number of bytes that would be
1908 copied. As a special case, return 0 if an ordinary "syntax error"
1909 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1910 size calculation. */
1911static YYSIZE_T
1912yysyntax_error (char *yyresult, int yystate, int yychar)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001913{
Lev Walkin752e9732017-08-04 02:06:22 -07001914 int yyn = yypact[yystate];
Lev Walkin0e90aa02013-03-19 16:17:13 -07001915
Lev Walkin752e9732017-08-04 02:06:22 -07001916 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1917 return 0;
1918 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07001919 {
Lev Walkin752e9732017-08-04 02:06:22 -07001920 int yytype = YYTRANSLATE (yychar);
1921 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1922 YYSIZE_T yysize = yysize0;
1923 YYSIZE_T yysize1;
1924 int yysize_overflow = 0;
1925 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1926 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1927 int yyx;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001928
Lev Walkin752e9732017-08-04 02:06:22 -07001929# if 0
1930 /* This is so xgettext sees the translatable formats that are
1931 constructed on the fly. */
1932 YY_("syntax error, unexpected %s");
1933 YY_("syntax error, unexpected %s, expecting %s");
1934 YY_("syntax error, unexpected %s, expecting %s or %s");
1935 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1936 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1937# endif
1938 char *yyfmt;
1939 char const *yyf;
1940 static char const yyunexpected[] = "syntax error, unexpected %s";
1941 static char const yyexpecting[] = ", expecting %s";
1942 static char const yyor[] = " or %s";
1943 char yyformat[sizeof yyunexpected
1944 + sizeof yyexpecting - 1
1945 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1946 * (sizeof yyor - 1))];
1947 char const *yyprefix = yyexpecting;
1948
1949 /* Start YYX at -YYN if negative to avoid negative indexes in
1950 YYCHECK. */
1951 int yyxbegin = yyn < 0 ? -yyn : 0;
1952
1953 /* Stay within bounds of both yycheck and yytname. */
1954 int yychecklim = YYLAST - yyn + 1;
1955 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1956 int yycount = 1;
1957
1958 yyarg[0] = yytname[yytype];
1959 yyfmt = yystpcpy (yyformat, yyunexpected);
1960
1961 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1962 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1963 {
1964 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1965 {
1966 yycount = 1;
1967 yysize = yysize0;
1968 yyformat[sizeof yyunexpected - 1] = '\0';
1969 break;
1970 }
1971 yyarg[yycount++] = yytname[yyx];
1972 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1973 yysize_overflow |= (yysize1 < yysize);
1974 yysize = yysize1;
1975 yyfmt = yystpcpy (yyfmt, yyprefix);
1976 yyprefix = yyor;
1977 }
1978
1979 yyf = YY_(yyformat);
1980 yysize1 = yysize + yystrlen (yyf);
1981 yysize_overflow |= (yysize1 < yysize);
1982 yysize = yysize1;
1983
1984 if (yysize_overflow)
1985 return YYSIZE_MAXIMUM;
1986
1987 if (yyresult)
1988 {
1989 /* Avoid sprintf, as that infringes on the user's name space.
1990 Don't have undefined behavior even if the translation
1991 produced a string with the wrong number of "%s"s. */
1992 char *yyp = yyresult;
1993 int yyi = 0;
1994 while ((*yyp = *yyf) != '\0')
1995 {
1996 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1997 {
1998 yyp += yytnamerr (yyp, yyarg[yyi++]);
1999 yyf += 2;
2000 }
2001 else
2002 {
2003 yyp++;
2004 yyf++;
2005 }
2006 }
2007 }
2008 return yysize;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002009 }
2010}
2011#endif /* YYERROR_VERBOSE */
Lev Walkin752e9732017-08-04 02:06:22 -07002012
Lev Walkin418298d2006-07-13 08:24:20 +00002013
2014/*-----------------------------------------------.
2015| Release the memory associated to this symbol. |
2016`-----------------------------------------------*/
2017
Lev Walkin0e90aa02013-03-19 16:17:13 -07002018/*ARGSUSED*/
2019#if (defined __STDC__ || defined __C99__FUNC__ \
2020 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00002021static void
Lev Walkin0e90aa02013-03-19 16:17:13 -07002022yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Lev Walkin418298d2006-07-13 08:24:20 +00002023#else
Lev Walkin0e90aa02013-03-19 16:17:13 -07002024static void
2025yydestruct (yymsg, yytype, yyvaluep)
2026 const char *yymsg;
Lev Walkin418298d2006-07-13 08:24:20 +00002027 int yytype;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002028 YYSTYPE *yyvaluep;
Lev Walkin418298d2006-07-13 08:24:20 +00002029#endif
2030{
Lev Walkin0e90aa02013-03-19 16:17:13 -07002031 YYUSE (yyvaluep);
2032
2033 if (!yymsg)
2034 yymsg = "Deleting";
2035 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
Lev Walkin418298d2006-07-13 08:24:20 +00002036
Lev Walkin752e9732017-08-04 02:06:22 -07002037 switch (yytype)
2038 {
2039
2040 default:
2041 break;
2042 }
Lev Walkina00d6b32006-03-21 03:40:38 +00002043}
Lev Walkin752e9732017-08-04 02:06:22 -07002044
2045
2046/* Prevent warnings from -Wmissing-prototypes. */
2047
2048#ifdef YYPARSE_PARAM
2049#if defined __STDC__ || defined __cplusplus
2050int yyparse (void *YYPARSE_PARAM);
2051#else
2052int yyparse ();
2053#endif
2054#else /* ! YYPARSE_PARAM */
2055#if defined __STDC__ || defined __cplusplus
2056int yyparse (void);
2057#else
2058int yyparse ();
2059#endif
2060#endif /* ! YYPARSE_PARAM */
Lev Walkin418298d2006-07-13 08:24:20 +00002061
2062
Lev Walkin0e90aa02013-03-19 16:17:13 -07002063
Lev Walkin752e9732017-08-04 02:06:22 -07002064/* The look-ahead symbol. */
Lev Walkin418298d2006-07-13 08:24:20 +00002065int yychar;
2066
Lev Walkin752e9732017-08-04 02:06:22 -07002067/* The semantic value of the look-ahead symbol. */
2068YYSTYPE yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00002069
Lev Walkin0e90aa02013-03-19 16:17:13 -07002070/* Number of syntax errors so far. */
Lev Walkin418298d2006-07-13 08:24:20 +00002071int yynerrs;
2072
Lev Walkinfb872bd2006-03-18 06:53:11 +00002073
Lev Walkin752e9732017-08-04 02:06:22 -07002074
Lev Walkin0e90aa02013-03-19 16:17:13 -07002075/*----------.
2076| yyparse. |
2077`----------*/
2078
2079#ifdef YYPARSE_PARAM
2080#if (defined __STDC__ || defined __C99__FUNC__ \
2081 || defined __cplusplus || defined _MSC_VER)
Lev Walkinfb872bd2006-03-18 06:53:11 +00002082int
Lev Walkin0e90aa02013-03-19 16:17:13 -07002083yyparse (void *YYPARSE_PARAM)
2084#else
2085int
2086yyparse (YYPARSE_PARAM)
2087 void *YYPARSE_PARAM;
2088#endif
2089#else /* ! YYPARSE_PARAM */
2090#if (defined __STDC__ || defined __C99__FUNC__ \
2091 || defined __cplusplus || defined _MSC_VER)
2092int
2093yyparse (void)
2094#else
2095int
2096yyparse ()
2097
2098#endif
2099#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00002100{
Lev Walkin752e9732017-08-04 02:06:22 -07002101
2102 int yystate;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002103 int yyn;
Lev Walkin418298d2006-07-13 08:24:20 +00002104 int yyresult;
Lev Walkin752e9732017-08-04 02:06:22 -07002105 /* Number of tokens to shift before error messages enabled. */
2106 int yyerrstatus;
2107 /* Look-ahead token as an internal (translated) token number. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002108 int yytoken = 0;
2109#if YYERROR_VERBOSE
2110 /* Buffer for error messages, and its allocated size. */
2111 char yymsgbuf[128];
2112 char *yymsg = yymsgbuf;
2113 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2114#endif
Lev Walkin418298d2006-07-13 08:24:20 +00002115
Lev Walkin752e9732017-08-04 02:06:22 -07002116 /* Three stacks and their tools:
2117 `yyss': related to states,
2118 `yyvs': related to semantic values,
2119 `yyls': related to locations.
2120
2121 Refer to the stacks thru separate pointers, to allow yyoverflow
2122 to reallocate them elsewhere. */
2123
2124 /* The state stack. */
2125 yytype_int16 yyssa[YYINITDEPTH];
2126 yytype_int16 *yyss = yyssa;
2127 yytype_int16 *yyssp;
2128
2129 /* The semantic value stack. */
2130 YYSTYPE yyvsa[YYINITDEPTH];
2131 YYSTYPE *yyvs = yyvsa;
2132 YYSTYPE *yyvsp;
2133
2134
2135
Lev Walkin0e90aa02013-03-19 16:17:13 -07002136#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
Lev Walkinf15320b2004-06-03 03:38:44 +00002137
Lev Walkin752e9732017-08-04 02:06:22 -07002138 YYSIZE_T yystacksize = YYINITDEPTH;
2139
2140 /* The variables used to return semantic value and location from the
2141 action routines. */
2142 YYSTYPE yyval;
2143
2144
Lev Walkin0e90aa02013-03-19 16:17:13 -07002145 /* The number of symbols on the RHS of the reduced rule.
2146 Keep to zero when no symbol should be popped. */
2147 int yylen = 0;
Lev Walkinf15320b2004-06-03 03:38:44 +00002148
Lev Walkin418298d2006-07-13 08:24:20 +00002149 YYDPRINTF ((stderr, "Starting parse\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002150
2151 yystate = 0;
2152 yyerrstatus = 0;
2153 yynerrs = 0;
Lev Walkin752e9732017-08-04 02:06:22 -07002154 yychar = YYEMPTY; /* Cause a token to be read. */
2155
2156 /* Initialize stack pointers.
2157 Waste one element of value and location stack
2158 so that they stay on the same level as the state stack.
2159 The wasted elements are never initialized. */
2160
2161 yyssp = yyss;
2162 yyvsp = yyvs;
2163
Lev Walkin418298d2006-07-13 08:24:20 +00002164 goto yysetstate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002165
Lev Walkin418298d2006-07-13 08:24:20 +00002166/*------------------------------------------------------------.
2167| yynewstate -- Push a new state, which is found in yystate. |
2168`------------------------------------------------------------*/
2169 yynewstate:
2170 /* In all cases, when you get here, the value and location stacks
Lev Walkin0e90aa02013-03-19 16:17:13 -07002171 have just been pushed. So pushing a state here evens the stacks. */
Lev Walkin418298d2006-07-13 08:24:20 +00002172 yyssp++;
2173
2174 yysetstate:
2175 *yyssp = yystate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002176
Lev Walkin0e90aa02013-03-19 16:17:13 -07002177 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002178 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002179 /* Get the current used size of the three stacks, in elements. */
Lev Walkin418298d2006-07-13 08:24:20 +00002180 YYSIZE_T yysize = yyssp - yyss + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002181
2182#ifdef yyoverflow
Lev Walkin418298d2006-07-13 08:24:20 +00002183 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002184 /* Give user a chance to reallocate the stack. Use copies of
Lev Walkin418298d2006-07-13 08:24:20 +00002185 these so that the &'s don't force the real ones into
2186 memory. */
2187 YYSTYPE *yyvs1 = yyvs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002188 yytype_int16 *yyss1 = yyss;
Lev Walkinf15320b2004-06-03 03:38:44 +00002189
Lev Walkin752e9732017-08-04 02:06:22 -07002190
Lev Walkin418298d2006-07-13 08:24:20 +00002191 /* Each stack pointer address is followed by the size of the
2192 data in use in that stack, in bytes. This used to be a
2193 conditional around just the two extra args, but that might
2194 be undefined if yyoverflow is a macro. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002195 yyoverflow (YY_("memory exhausted"),
Lev Walkin418298d2006-07-13 08:24:20 +00002196 &yyss1, yysize * sizeof (*yyssp),
2197 &yyvs1, yysize * sizeof (*yyvsp),
Lev Walkin752e9732017-08-04 02:06:22 -07002198
Lev Walkin418298d2006-07-13 08:24:20 +00002199 &yystacksize);
2200
2201 yyss = yyss1;
2202 yyvs = yyvs1;
2203 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002204#else /* no yyoverflow */
Lev Walkin418298d2006-07-13 08:24:20 +00002205# ifndef YYSTACK_RELOCATE
Lev Walkin0e90aa02013-03-19 16:17:13 -07002206 goto yyexhaustedlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002207# else
Lev Walkinf15320b2004-06-03 03:38:44 +00002208 /* Extend the stack our own way. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002209 if (YYMAXDEPTH <= yystacksize)
2210 goto yyexhaustedlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002211 yystacksize *= 2;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002212 if (YYMAXDEPTH < yystacksize)
Lev Walkinf15320b2004-06-03 03:38:44 +00002213 yystacksize = YYMAXDEPTH;
Lev Walkin418298d2006-07-13 08:24:20 +00002214
2215 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002216 yytype_int16 *yyss1 = yyss;
Lev Walkin418298d2006-07-13 08:24:20 +00002217 union yyalloc *yyptr =
2218 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2219 if (! yyptr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07002220 goto yyexhaustedlab;
Lev Walkin752e9732017-08-04 02:06:22 -07002221 YYSTACK_RELOCATE (yyss);
2222 YYSTACK_RELOCATE (yyvs);
2223
Lev Walkin418298d2006-07-13 08:24:20 +00002224# undef YYSTACK_RELOCATE
2225 if (yyss1 != yyssa)
2226 YYSTACK_FREE (yyss1);
2227 }
2228# endif
Lev Walkinf15320b2004-06-03 03:38:44 +00002229#endif /* no yyoverflow */
2230
Lev Walkin418298d2006-07-13 08:24:20 +00002231 yyssp = yyss + yysize - 1;
2232 yyvsp = yyvs + yysize - 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002233
Lev Walkin752e9732017-08-04 02:06:22 -07002234
Lev Walkin418298d2006-07-13 08:24:20 +00002235 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2236 (unsigned long int) yystacksize));
Lev Walkinf15320b2004-06-03 03:38:44 +00002237
Lev Walkin0e90aa02013-03-19 16:17:13 -07002238 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002239 YYABORT;
2240 }
2241
Lev Walkin418298d2006-07-13 08:24:20 +00002242 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Lev Walkinf15320b2004-06-03 03:38:44 +00002243
2244 goto yybackup;
Lev Walkin418298d2006-07-13 08:24:20 +00002245
2246/*-----------.
2247| yybackup. |
2248`-----------*/
2249yybackup:
Lev Walkinf15320b2004-06-03 03:38:44 +00002250
Lev Walkin0e90aa02013-03-19 16:17:13 -07002251 /* Do appropriate processing given the current state. Read a
Lev Walkin752e9732017-08-04 02:06:22 -07002252 look-ahead token if we need one and don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002253
Lev Walkin752e9732017-08-04 02:06:22 -07002254 /* First try to decide what to do without reference to look-ahead token. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002255 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07002256 if (yyn == YYPACT_NINF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002257 goto yydefault;
2258
Lev Walkin752e9732017-08-04 02:06:22 -07002259 /* Not known => get a look-ahead token if don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002260
Lev Walkin752e9732017-08-04 02:06:22 -07002261 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002262 if (yychar == YYEMPTY)
2263 {
Lev Walkin418298d2006-07-13 08:24:20 +00002264 YYDPRINTF ((stderr, "Reading a token: "));
Lev Walkinf15320b2004-06-03 03:38:44 +00002265 yychar = YYLEX;
2266 }
2267
Lev Walkin0e90aa02013-03-19 16:17:13 -07002268 if (yychar <= YYEOF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002269 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002270 yychar = yytoken = YYEOF;
Lev Walkin418298d2006-07-13 08:24:20 +00002271 YYDPRINTF ((stderr, "Now at end of input.\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002272 }
2273 else
2274 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002275 yytoken = YYTRANSLATE (yychar);
2276 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Lev Walkinf15320b2004-06-03 03:38:44 +00002277 }
2278
Lev Walkin0e90aa02013-03-19 16:17:13 -07002279 /* If the proper action on seeing token YYTOKEN is to reduce or to
Lev Walkin418298d2006-07-13 08:24:20 +00002280 detect an error, take that action. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002281 yyn += yytoken;
2282 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Lev Walkinf15320b2004-06-03 03:38:44 +00002283 goto yydefault;
Lev Walkinf15320b2004-06-03 03:38:44 +00002284 yyn = yytable[yyn];
Lev Walkin418298d2006-07-13 08:24:20 +00002285 if (yyn <= 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00002286 {
Lev Walkin752e9732017-08-04 02:06:22 -07002287 if (yyn == 0 || yyn == YYTABLE_NINF)
2288 goto yyerrlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002289 yyn = -yyn;
2290 goto yyreduce;
2291 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002292
Lev Walkin752e9732017-08-04 02:06:22 -07002293 if (yyn == YYFINAL)
2294 YYACCEPT;
2295
Lev Walkin418298d2006-07-13 08:24:20 +00002296 /* Count tokens shifted since error; after three, turn off error
2297 status. */
2298 if (yyerrstatus)
2299 yyerrstatus--;
Lev Walkinf15320b2004-06-03 03:38:44 +00002300
Lev Walkin752e9732017-08-04 02:06:22 -07002301 /* Shift the look-ahead token. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002302 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2303
Lev Walkin752e9732017-08-04 02:06:22 -07002304 /* Discard the shifted token unless it is eof. */
2305 if (yychar != YYEOF)
2306 yychar = YYEMPTY;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002307
Lev Walkinf15320b2004-06-03 03:38:44 +00002308 yystate = yyn;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002309 *++yyvsp = yylval;
2310
Lev Walkinf15320b2004-06-03 03:38:44 +00002311 goto yynewstate;
2312
Lev Walkina00d6b32006-03-21 03:40:38 +00002313
Lev Walkin418298d2006-07-13 08:24:20 +00002314/*-----------------------------------------------------------.
2315| yydefault -- do the default action for the current state. |
2316`-----------------------------------------------------------*/
2317yydefault:
Lev Walkinf15320b2004-06-03 03:38:44 +00002318 yyn = yydefact[yystate];
2319 if (yyn == 0)
2320 goto yyerrlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002321 goto yyreduce;
Lev Walkinf15320b2004-06-03 03:38:44 +00002322
Lev Walkin418298d2006-07-13 08:24:20 +00002323
2324/*-----------------------------.
2325| yyreduce -- Do a reduction. |
2326`-----------------------------*/
Lev Walkinf15320b2004-06-03 03:38:44 +00002327yyreduce:
Lev Walkin418298d2006-07-13 08:24:20 +00002328 /* yyn is the number of a rule to reduce with. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002329 yylen = yyr2[yyn];
Lev Walkinf15320b2004-06-03 03:38:44 +00002330
Lev Walkin418298d2006-07-13 08:24:20 +00002331 /* If YYLEN is nonzero, implement the default value of the action:
2332 `$$ = $1'.
2333
2334 Otherwise, the following line sets YYVAL to garbage.
2335 This behavior is undocumented and Bison
2336 users should not rely upon it. Assigning to YYVAL
2337 unconditionally makes the parser a bit smaller, and it avoids a
2338 GCC warning that YYVAL may be used uninitialized. */
2339 yyval = yyvsp[1-yylen];
2340
2341
Lev Walkin0e90aa02013-03-19 16:17:13 -07002342 YY_REDUCE_PRINT (yyn);
Lev Walkin418298d2006-07-13 08:24:20 +00002343 switch (yyn)
2344 {
2345 case 2:
Lev Walkin0c686452017-09-07 22:59:36 -07002346#line 410 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002347 {
Lev Walkin752e9732017-08-04 02:06:22 -07002348 *(void **)param = (yyvsp[(2) - (2)].a_grammar);
2349 }
2350 break;
2351
2352 case 3:
Lev Walkin0c686452017-09-07 22:59:36 -07002353#line 413 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002354 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002355 *(void **)param = (yyvsp[(1) - (1)].a_grammar);
Lev Walkin418298d2006-07-13 08:24:20 +00002356 }
2357 break;
2358
Lev Walkin752e9732017-08-04 02:06:22 -07002359 case 4:
Lev Walkin0c686452017-09-07 22:59:36 -07002360#line 419 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002361 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002362 (yyval.a_grammar) = asn1p_new();
2363 checkmem((yyval.a_grammar));
2364 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(1) - (1)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002365 }
2366 break;
2367
Lev Walkin752e9732017-08-04 02:06:22 -07002368 case 5:
Lev Walkin0c686452017-09-07 22:59:36 -07002369#line 424 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002370 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002371 (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar);
2372 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002373 }
2374 break;
2375
Lev Walkin752e9732017-08-04 02:06:22 -07002376 case 6:
Lev Walkin0c686452017-09-07 22:59:36 -07002377#line 441 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002378 { currentModule = asn1p_module_new(); }
2379 break;
2380
Lev Walkin752e9732017-08-04 02:06:22 -07002381 case 7:
Lev Walkin0c686452017-09-07 22:59:36 -07002382#line 446 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002383 {
Lev Walkinfb872bd2006-03-18 06:53:11 +00002384
Lev Walkin0e90aa02013-03-19 16:17:13 -07002385 (yyval.a_module) = currentModule;
Lev Walkina9532f42006-09-17 04:52:50 +00002386
Lev Walkin0e90aa02013-03-19 16:17:13 -07002387 if((yyvsp[(8) - (9)].a_module)) {
2388 asn1p_module_t tmp = *((yyval.a_module));
2389 *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module));
2390 *((yyvsp[(8) - (9)].a_module)) = tmp;
2391 asn1p_module_free((yyvsp[(8) - (9)].a_module));
Lev Walkinf15320b2004-06-03 03:38:44 +00002392 } else {
2393 /* There's a chance that a module is just plain empty */
Lev Walkinf15320b2004-06-03 03:38:44 +00002394 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002395
Lev Walkin0e90aa02013-03-19 16:17:13 -07002396 (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str);
2397 (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid);
2398 (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002399 }
2400 break;
2401
Lev Walkin752e9732017-08-04 02:06:22 -07002402 case 8:
Lev Walkin0c686452017-09-07 22:59:36 -07002403#line 470 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002404 { (yyval.a_oid) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002405 break;
2406
Lev Walkin752e9732017-08-04 02:06:22 -07002407 case 9:
Lev Walkin0c686452017-09-07 22:59:36 -07002408#line 471 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002409 { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002410 break;
2411
Lev Walkin752e9732017-08-04 02:06:22 -07002412 case 10:
Lev Walkin0c686452017-09-07 22:59:36 -07002413#line 475 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002414 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002415 (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid);
Lev Walkin418298d2006-07-13 08:24:20 +00002416 }
2417 break;
2418
Lev Walkin752e9732017-08-04 02:06:22 -07002419 case 11:
Lev Walkin0c686452017-09-07 22:59:36 -07002420#line 478 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002421 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002422 (yyval.a_oid) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002423 }
2424 break;
2425
Lev Walkin752e9732017-08-04 02:06:22 -07002426 case 12:
Lev Walkin0c686452017-09-07 22:59:36 -07002427#line 484 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002428 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002429 (yyval.a_oid) = asn1p_oid_new();
2430 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002431 if((yyvsp[(1) - (1)].a_oid_arc).name)
2432 free((yyvsp[(1) - (1)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002433 }
2434 break;
2435
Lev Walkin752e9732017-08-04 02:06:22 -07002436 case 13:
Lev Walkin0c686452017-09-07 22:59:36 -07002437#line 490 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002438 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002439 (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid);
2440 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002441 if((yyvsp[(2) - (2)].a_oid_arc).name)
2442 free((yyvsp[(2) - (2)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002443 }
2444 break;
2445
Lev Walkin752e9732017-08-04 02:06:22 -07002446 case 14:
Lev Walkin0c686452017-09-07 22:59:36 -07002447#line 499 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002448 { /* iso */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002449 (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str);
2450 (yyval.a_oid_arc).number = -1;
Lev Walkin418298d2006-07-13 08:24:20 +00002451 }
2452 break;
2453
Lev Walkin752e9732017-08-04 02:06:22 -07002454 case 15:
Lev Walkin0c686452017-09-07 22:59:36 -07002455#line 503 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002456 { /* iso(1) */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002457 (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str);
2458 (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002459 }
2460 break;
2461
Lev Walkin752e9732017-08-04 02:06:22 -07002462 case 16:
Lev Walkin0c686452017-09-07 22:59:36 -07002463#line 507 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002464 { /* 1 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002465 (yyval.a_oid_arc).name = 0;
2466 (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002467 }
2468 break;
2469
Lev Walkin752e9732017-08-04 02:06:22 -07002470 case 17:
Lev Walkin0c686452017-09-07 22:59:36 -07002471#line 517 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002472 { (yyval.a_module_flags) = MSF_NOFLAGS; }
Lev Walkin418298d2006-07-13 08:24:20 +00002473 break;
2474
Lev Walkin418298d2006-07-13 08:24:20 +00002475 case 18:
Lev Walkin0c686452017-09-07 22:59:36 -07002476#line 518 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002477 {
Lev Walkin752e9732017-08-04 02:06:22 -07002478 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2479 }
2480 break;
2481
Lev Walkind523ea42017-09-06 22:15:08 -07002482 case 19:
Lev Walkin0c686452017-09-07 22:59:36 -07002483#line 527 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07002484 {
2485 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2486 }
2487 break;
2488
Lev Walkin752e9732017-08-04 02:06:22 -07002489 case 20:
Lev Walkin0c686452017-09-07 22:59:36 -07002490#line 530 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002491 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002492 (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002493 }
2494 break;
2495
Lev Walkin752e9732017-08-04 02:06:22 -07002496 case 21:
Lev Walkin0c686452017-09-07 22:59:36 -07002497#line 539 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002498 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002499 (yyval.a_module_flags) = MSF_EXPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002500 }
2501 break;
2502
Lev Walkin752e9732017-08-04 02:06:22 -07002503 case 22:
Lev Walkin0c686452017-09-07 22:59:36 -07002504#line 542 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002505 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002506 (yyval.a_module_flags) = MSF_IMPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002507 }
2508 break;
2509
Lev Walkin752e9732017-08-04 02:06:22 -07002510 case 23:
Lev Walkin0c686452017-09-07 22:59:36 -07002511#line 545 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002512 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002513 (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002514 }
2515 break;
2516
Lev Walkin752e9732017-08-04 02:06:22 -07002517 case 24:
Lev Walkin0c686452017-09-07 22:59:36 -07002518#line 548 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002519 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002520 (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED;
Lev Walkin418298d2006-07-13 08:24:20 +00002521 }
2522 break;
2523
Lev Walkin752e9732017-08-04 02:06:22 -07002524 case 25:
Lev Walkin0c686452017-09-07 22:59:36 -07002525#line 552 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002526 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002527 /* X.680Amd1 specifies TAG and XER */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002528 if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) {
2529 (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS;
2530 } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) {
2531 (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002532 } else {
2533 fprintf(stderr,
Lev Walkind523ea42017-09-06 22:15:08 -07002534 "WARNING: %s INSTRUCTIONS at %s:%d: "
Lev Walkinf59d0752004-08-18 04:59:12 +00002535 "Unrecognized encoding reference\n",
Lev Walkind523ea42017-09-06 22:15:08 -07002536 (yyvsp[(1) - (2)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002537 (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002538 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002539 free((yyvsp[(1) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00002540 }
2541 break;
2542
Lev Walkin752e9732017-08-04 02:06:22 -07002543 case 26:
Lev Walkin0c686452017-09-07 22:59:36 -07002544#line 573 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002545 { (yyval.a_module) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002546 break;
2547
Lev Walkin752e9732017-08-04 02:06:22 -07002548 case 27:
Lev Walkin0c686452017-09-07 22:59:36 -07002549#line 574 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002550 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002551 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002552 }
2553 break;
2554
Lev Walkin752e9732017-08-04 02:06:22 -07002555 case 28:
Lev Walkin0c686452017-09-07 22:59:36 -07002556#line 583 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002557 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002558 (yyval.a_module) = asn1p_module_new();
2559 AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next);
2560 AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next);
2561 AL_IMPORT((yyval.a_module), members, (yyvsp[(3) - (3)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002562
2563 asn1p_module_free((yyvsp[(1) - (3)].a_module));
2564 asn1p_module_free((yyvsp[(2) - (3)].a_module));
2565 asn1p_module_free((yyvsp[(3) - (3)].a_module));
Lev Walkin418298d2006-07-13 08:24:20 +00002566 }
2567 break;
2568
Lev Walkin752e9732017-08-04 02:06:22 -07002569 case 29:
Lev Walkin0c686452017-09-07 22:59:36 -07002570#line 596 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002571 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002572 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002573 }
2574 break;
2575
Lev Walkin752e9732017-08-04 02:06:22 -07002576 case 30:
Lev Walkin0c686452017-09-07 22:59:36 -07002577#line 599 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002578 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002579 if((yyvsp[(1) - (2)].a_module)) {
2580 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002581 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002582 (yyval.a_module) = (yyvsp[(2) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002583 break;
2584 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002585 AL_IMPORT((yyval.a_module), members, (yyvsp[(2) - (2)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002586 asn1p_module_free((yyvsp[(2) - (2)].a_module));
Lev Walkin866bd7f2006-09-14 10:35:20 +00002587 }
2588 break;
2589
Lev Walkin418298d2006-07-13 08:24:20 +00002590 case 31:
Lev Walkin0c686452017-09-07 22:59:36 -07002591#line 616 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002592 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002593 (yyval.a_module) = asn1p_module_new();
2594 checkmem((yyval.a_module));
2595 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2596 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2597 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002598 }
2599 break;
2600
2601 case 32:
Lev Walkin0c686452017-09-07 22:59:36 -07002602#line 623 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002603 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002604 (yyval.a_module) = asn1p_module_new();
2605 checkmem((yyval.a_module));
2606 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2607 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2608 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkina9532f42006-09-17 04:52:50 +00002609 }
Lev Walkin418298d2006-07-13 08:24:20 +00002610 break;
2611
Lev Walkin866bd7f2006-09-14 10:35:20 +00002612 case 33:
Lev Walkin0c686452017-09-07 22:59:36 -07002613#line 637 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002614 {
2615 (yyval.a_module) = asn1p_module_new();
2616 checkmem((yyval.a_module));
2617 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2618 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2619 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
2620 }
Lev Walkina9532f42006-09-17 04:52:50 +00002621 break;
2622
2623 case 34:
Lev Walkin0c686452017-09-07 22:59:36 -07002624#line 645 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002625 { asn1p_lexer_hack_push_encoding_control(); }
2626 break;
2627
2628 case 35:
Lev Walkin0c686452017-09-07 22:59:36 -07002629#line 646 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002630 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002631 fprintf(stderr,
2632 "WARNING: ENCODING-CONTROL %s "
Lev Walkind523ea42017-09-06 22:15:08 -07002633 "specification at %s:%d ignored\n",
2634 (yyvsp[(2) - (3)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002635 free((yyvsp[(2) - (3)].tv_str));
2636 (yyval.a_module) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002637 }
2638 break;
2639
Lev Walkin752e9732017-08-04 02:06:22 -07002640 case 36:
Lev Walkin0c686452017-09-07 22:59:36 -07002641#line 658 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002642 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002643 return yyerror(
Lev Walkin70853052005-11-26 11:21:55 +00002644 "Attempt to redefine a standard basic string type, "
2645 "please comment out or remove this type redefinition.");
Lev Walkin418298d2006-07-13 08:24:20 +00002646 }
2647 break;
2648
Lev Walkin752e9732017-08-04 02:06:22 -07002649 case 37:
Lev Walkin0c686452017-09-07 22:59:36 -07002650#line 671 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002651 { (yyval.a_module) = 0; }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002652 break;
2653
Lev Walkin752e9732017-08-04 02:06:22 -07002654 case 39:
Lev Walkin0c686452017-09-07 22:59:36 -07002655#line 675 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002656 {
Lev Walkinb36317c2005-08-12 10:09:10 +00002657 if(!saved_aid && 0)
2658 return yyerror("Unterminated IMPORTS FROM, "
2659 "expected semicolon ';'");
2660 saved_aid = 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002661 (yyval.a_module) = (yyvsp[(2) - (3)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002662 }
2663 break;
2664
Lev Walkin752e9732017-08-04 02:06:22 -07002665 case 40:
Lev Walkin0c686452017-09-07 22:59:36 -07002666#line 685 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002667 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002668 return yyerror("Empty IMPORTS list");
Lev Walkin418298d2006-07-13 08:24:20 +00002669 }
2670 break;
2671
Lev Walkin752e9732017-08-04 02:06:22 -07002672 case 41:
Lev Walkin0c686452017-09-07 22:59:36 -07002673#line 691 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002674 { (yyval.a_module) = asn1p_module_new(); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002675 break;
2676
Lev Walkin752e9732017-08-04 02:06:22 -07002677 case 43:
Lev Walkin0c686452017-09-07 22:59:36 -07002678#line 695 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002679 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002680 (yyval.a_module) = asn1p_module_new();
2681 checkmem((yyval.a_module));
2682 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002683 }
2684 break;
2685
Lev Walkin752e9732017-08-04 02:06:22 -07002686 case 44:
Lev Walkin0c686452017-09-07 22:59:36 -07002687#line 700 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002688 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002689 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
2690 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002691 }
2692 break;
2693
Lev Walkin752e9732017-08-04 02:06:22 -07002694 case 45:
Lev Walkin0c686452017-09-07 22:59:36 -07002695#line 707 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002696 { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); }
Lev Walkin418298d2006-07-13 08:24:20 +00002697 break;
2698
Lev Walkin752e9732017-08-04 02:06:22 -07002699 case 46:
Lev Walkin0c686452017-09-07 22:59:36 -07002700#line 708 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002701 { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002702 break;
2703
Lev Walkin752e9732017-08-04 02:06:22 -07002704 case 47:
Lev Walkin0c686452017-09-07 22:59:36 -07002705#line 712 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002706 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002707 (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports);
2708 (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str);
2709 (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid);
Lev Walkinb36317c2005-08-12 10:09:10 +00002710 /* This stupid thing is used for look-back hack. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002711 saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier);
2712 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002713 }
2714 break;
2715
Lev Walkin752e9732017-08-04 02:06:22 -07002716 case 48:
Lev Walkin0c686452017-09-07 22:59:36 -07002717#line 723 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002718 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002719 (yyval.a_xports) = asn1p_xports_new();
2720 checkmem((yyval.a_xports));
2721 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002722 }
2723 break;
2724
Lev Walkin752e9732017-08-04 02:06:22 -07002725 case 49:
Lev Walkin0c686452017-09-07 22:59:36 -07002726#line 728 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002727 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002728 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2729 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002730 }
2731 break;
2732
Lev Walkin752e9732017-08-04 02:06:22 -07002733 case 50:
Lev Walkin0c686452017-09-07 22:59:36 -07002734#line 735 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002735 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002736 (yyval.a_expr) = NEW_EXPR();
2737 checkmem((yyval.a_expr));
2738 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2739 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin418298d2006-07-13 08:24:20 +00002740 }
2741 break;
2742
Lev Walkin752e9732017-08-04 02:06:22 -07002743 case 51:
Lev Walkin0c686452017-09-07 22:59:36 -07002744#line 741 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002745 { /* Completely equivalent to above */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002746 (yyval.a_expr) = NEW_EXPR();
2747 checkmem((yyval.a_expr));
2748 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2749 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002750 }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002751 break;
2752
Lev Walkin752e9732017-08-04 02:06:22 -07002753 case 52:
Lev Walkin0c686452017-09-07 22:59:36 -07002754#line 747 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002755 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002756 (yyval.a_expr) = NEW_EXPR();
2757 checkmem((yyval.a_expr));
2758 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2759 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002760 }
2761 break;
2762
Lev Walkin752e9732017-08-04 02:06:22 -07002763 case 53:
Lev Walkin0c686452017-09-07 22:59:36 -07002764#line 757 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002765 { (yyval.a_module) = 0; }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002766 break;
2767
Lev Walkin752e9732017-08-04 02:06:22 -07002768 case 54:
Lev Walkin0c686452017-09-07 22:59:36 -07002769#line 758 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002770 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002771 (yyval.a_module) = asn1p_module_new();
2772 checkmem((yyval.a_module));
2773 if((yyvsp[(1) - (1)].a_xports)) {
2774 TQ_ADD(&((yyval.a_module)->exports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002775 } else {
2776 /* "EXPORTS ALL;" */
2777 }
2778 }
2779 break;
2780
Lev Walkin752e9732017-08-04 02:06:22 -07002781 case 55:
Lev Walkin0c686452017-09-07 22:59:36 -07002782#line 770 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002783 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002784 (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports);
Lev Walkin418298d2006-07-13 08:24:20 +00002785 }
2786 break;
2787
Lev Walkin752e9732017-08-04 02:06:22 -07002788 case 56:
Lev Walkin0c686452017-09-07 22:59:36 -07002789#line 773 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002790 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002791 (yyval.a_xports) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002792 }
2793 break;
2794
Lev Walkin752e9732017-08-04 02:06:22 -07002795 case 57:
Lev Walkin0c686452017-09-07 22:59:36 -07002796#line 776 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002797 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002798 /* Empty EXPORTS clause effectively prohibits export. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002799 (yyval.a_xports) = asn1p_xports_new();
2800 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002801 }
2802 break;
2803
Lev Walkin752e9732017-08-04 02:06:22 -07002804 case 58:
Lev Walkin0c686452017-09-07 22:59:36 -07002805#line 784 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002806 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002807 (yyval.a_xports) = asn1p_xports_new();
2808 assert((yyval.a_xports));
2809 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002810 }
2811 break;
2812
Lev Walkin752e9732017-08-04 02:06:22 -07002813 case 59:
Lev Walkin0c686452017-09-07 22:59:36 -07002814#line 789 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002815 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002816 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2817 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002818 }
2819 break;
2820
Lev Walkin752e9732017-08-04 02:06:22 -07002821 case 60:
Lev Walkin0c686452017-09-07 22:59:36 -07002822#line 796 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002823 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002824 (yyval.a_expr) = NEW_EXPR();
2825 checkmem((yyval.a_expr));
2826 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2827 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin418298d2006-07-13 08:24:20 +00002828 }
2829 break;
2830
Lev Walkin752e9732017-08-04 02:06:22 -07002831 case 61:
Lev Walkin0c686452017-09-07 22:59:36 -07002832#line 802 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002833 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002834 (yyval.a_expr) = NEW_EXPR();
2835 checkmem((yyval.a_expr));
2836 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2837 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002838 }
Lev Walkin418298d2006-07-13 08:24:20 +00002839 break;
2840
Lev Walkin752e9732017-08-04 02:06:22 -07002841 case 62:
Lev Walkin0c686452017-09-07 22:59:36 -07002842#line 808 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002843 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002844 (yyval.a_expr) = NEW_EXPR();
2845 checkmem((yyval.a_expr));
2846 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2847 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002848 }
2849 break;
2850
Lev Walkin752e9732017-08-04 02:06:22 -07002851 case 63:
Lev Walkin0c686452017-09-07 22:59:36 -07002852#line 817 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002853 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002854 break;
2855
Lev Walkin752e9732017-08-04 02:06:22 -07002856 case 64:
Lev Walkin0c686452017-09-07 22:59:36 -07002857#line 820 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002858 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002859 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
2860 assert((yyval.a_expr)->Identifier == 0);
2861 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
2862 (yyval.a_expr)->meta_type = AMT_VALUESET;
2863 (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002864 }
2865 break;
2866
Lev Walkin752e9732017-08-04 02:06:22 -07002867 case 65:
Lev Walkin0c686452017-09-07 22:59:36 -07002868#line 830 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002869 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002870 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00002871 }
2872 break;
2873
Lev Walkin752e9732017-08-04 02:06:22 -07002874 case 66:
Lev Walkin0c686452017-09-07 22:59:36 -07002875#line 843 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002876 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002877 (yyval.a_expr) = NEW_EXPR();
2878 checkmem((yyval.a_expr));
2879 (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref);
2880 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2881 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002882 }
2883 break;
2884
Lev Walkin752e9732017-08-04 02:06:22 -07002885 case 67:
Lev Walkin0c686452017-09-07 22:59:36 -07002886#line 853 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002887 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002888 (yyval.a_expr) = NEW_EXPR();
2889 checkmem((yyval.a_expr));
2890 (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref);
2891 (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr);
2892 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2893 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002894 }
2895 break;
2896
Lev Walkin752e9732017-08-04 02:06:22 -07002897 case 68:
Lev Walkin0c686452017-09-07 22:59:36 -07002898#line 873 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002899 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002900 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2901 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2902 assert((yyval.a_expr)->expr_type);
2903 assert((yyval.a_expr)->meta_type);
Lev Walkin418298d2006-07-13 08:24:20 +00002904 }
2905 break;
2906
Lev Walkin752e9732017-08-04 02:06:22 -07002907 case 69:
Lev Walkin0c686452017-09-07 22:59:36 -07002908#line 879 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002909 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002910 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2911 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2912 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
2913 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00002914 }
2915 break;
2916
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002917 case 70:
Lev Walkin0c686452017-09-07 22:59:36 -07002918#line 895 "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 Walkin0c686452017-09-07 22:59:36 -07002927#line 901 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002928 {
2929 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2930 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2931 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2932 }
2933 break;
2934
2935 case 72:
Lev Walkin0c686452017-09-07 22:59:36 -07002936#line 909 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002937 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002938 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002939 (yyval.a_plist) = asn1p_paramlist_new(yylineno);
2940 checkmem((yyval.a_plist));
2941 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 +00002942 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002943 asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002944 free((yyvsp[(1) - (1)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002945 }
2946 break;
2947
Lev Walkin752e9732017-08-04 02:06:22 -07002948 case 73:
Lev Walkin0c686452017-09-07 22:59:36 -07002949#line 918 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002950 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002951 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002952 (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist);
2953 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 +00002954 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002955 asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002956 free((yyvsp[(3) - (3)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002957 }
2958 break;
2959
Lev Walkin752e9732017-08-04 02:06:22 -07002960 case 74:
Lev Walkin0c686452017-09-07 22:59:36 -07002961#line 929 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002962 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002963 (yyval.a_parg).governor = NULL;
2964 (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00002965 }
2966 break;
2967
Lev Walkin866bd7f2006-09-14 10:35:20 +00002968 case 75:
Lev Walkin0c686452017-09-07 22:59:36 -07002969#line 933 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002970 {
2971 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002972 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002973 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002974 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002975 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002976 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00002977 }
2978 break;
2979
2980 case 76:
Lev Walkin0c686452017-09-07 22:59:36 -07002981#line 941 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002982 {
Lev Walkina9532f42006-09-17 04:52:50 +00002983 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002984 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin752e9732017-08-04 02:06:22 -07002985 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkina9532f42006-09-17 04:52:50 +00002986 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002987 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin752e9732017-08-04 02:06:22 -07002988 free((yyvsp[(1) - (3)].tv_str));
Lev Walkina9532f42006-09-17 04:52:50 +00002989 }
2990 break;
2991
Lev Walkin4a4543f2006-10-13 12:37:39 +00002992 case 77:
Lev Walkin0c686452017-09-07 22:59:36 -07002993#line 949 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002994 {
2995 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002996 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002997 ret = asn1p_ref_add_component((yyval.a_parg).governor,
2998 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002999 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003000 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003001 }
3002 break;
3003
3004 case 78:
Lev Walkin0c686452017-09-07 22:59:36 -07003005#line 957 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003006 {
3007 int ret;
3008 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
3009 ret = asn1p_ref_add_component((yyval.a_parg).governor,
3010 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
3011 checkmem(ret == 0);
3012 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
3013 }
3014 break;
3015
3016 case 79:
Lev Walkin0c686452017-09-07 22:59:36 -07003017#line 968 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003018 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003019 (yyval.a_expr) = NEW_EXPR();
3020 checkmem((yyval.a_expr));
3021 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003022 }
3023 break;
3024
Lev Walkin752e9732017-08-04 02:06:22 -07003025 case 80:
Lev Walkin0c686452017-09-07 22:59:36 -07003026#line 973 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003027 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003028 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3029 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003030 }
3031 break;
3032
Lev Walkin752e9732017-08-04 02:06:22 -07003033 case 81:
Lev Walkin0c686452017-09-07 22:59:36 -07003034#line 980 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003035 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003036 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003037 }
3038 break;
3039
Lev Walkin752e9732017-08-04 02:06:22 -07003040 case 82:
Lev Walkin0c686452017-09-07 22:59:36 -07003041#line 983 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003042 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003043 (yyval.a_expr) = NEW_EXPR();
3044 checkmem((yyval.a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003045 (yyval.a_expr)->Identifier = strdup("?");
Lev Walkin0e90aa02013-03-19 16:17:13 -07003046 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3047 (yyval.a_expr)->meta_type = AMT_VALUE;
3048 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003049 }
3050 break;
3051
Lev Walkin752e9732017-08-04 02:06:22 -07003052 case 83:
Lev Walkin0c686452017-09-07 22:59:36 -07003053#line 991 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003054 {
Lev Walkina00d6b32006-03-21 03:40:38 +00003055 asn1p_ref_t *ref;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003056 (yyval.a_expr) = NEW_EXPR();
3057 checkmem((yyval.a_expr));
3058 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
3059 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3060 (yyval.a_expr)->meta_type = AMT_VALUE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003061 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003062 asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
3063 (yyval.a_expr)->value = asn1p_value_fromref(ref, 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003064 }
3065 break;
3066
Lev Walkin752e9732017-08-04 02:06:22 -07003067 case 84:
Lev Walkin0c686452017-09-07 22:59:36 -07003068#line 1002 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003069 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003070 (yyval.a_expr) = NEW_EXPR();
3071 (yyval.a_expr)->expr_type = A1TC_VALUESET;
3072 (yyval.a_expr)->meta_type = AMT_VALUESET;
3073 (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00003074 }
3075 break;
3076
Lev Walkin752e9732017-08-04 02:06:22 -07003077 case 85:
Lev Walkin0c686452017-09-07 22:59:36 -07003078#line 1025 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003079 { (yyval.a_expr) = NEW_EXPR(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003080 break;
3081
Lev Walkin752e9732017-08-04 02:06:22 -07003082 case 86:
Lev Walkin0c686452017-09-07 22:59:36 -07003083#line 1026 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003084 { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); }
Lev Walkina9532f42006-09-17 04:52:50 +00003085 break;
3086
Lev Walkin752e9732017-08-04 02:06:22 -07003087 case 87:
Lev Walkin0c686452017-09-07 22:59:36 -07003088#line 1029 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003089 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003090 (yyval.a_expr) = NEW_EXPR();
3091 checkmem((yyval.a_expr));
3092 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003093 }
3094 break;
3095
Lev Walkin752e9732017-08-04 02:06:22 -07003096 case 88:
Lev Walkin0c686452017-09-07 22:59:36 -07003097#line 1034 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003098 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003099 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3100 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003101 }
3102 break;
3103
Lev Walkin752e9732017-08-04 02:06:22 -07003104 case 89:
Lev Walkin0c686452017-09-07 22:59:36 -07003105#line 1038 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003106 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003107 (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003108 asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003109 asn1p_expr_free((yyvsp[(4) - (5)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003110 }
3111 break;
3112
Lev Walkin752e9732017-08-04 02:06:22 -07003113 case 90:
Lev Walkin0c686452017-09-07 22:59:36 -07003114#line 1046 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003115 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003116 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3117 assert((yyval.a_expr)->Identifier == 0);
3118 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3119 (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3120 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003121 }
3122 break;
3123
Lev Walkin752e9732017-08-04 02:06:22 -07003124 case 91:
Lev Walkin0c686452017-09-07 22:59:36 -07003125#line 1053 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003126 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003127 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3128 (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3129 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
3130 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003131 }
3132 break;
3133
Lev Walkin752e9732017-08-04 02:06:22 -07003134 case 92:
Lev Walkin0c686452017-09-07 22:59:36 -07003135#line 1059 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003136 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003137 (yyval.a_expr) = NEW_EXPR();
3138 checkmem((yyval.a_expr));
3139 (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type;
3140 (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF;
3141 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003142 }
3143 break;
3144
Lev Walkin752e9732017-08-04 02:06:22 -07003145 case 93:
Lev Walkin0c686452017-09-07 22:59:36 -07003146#line 1066 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003147 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003148 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003149 }
3150 break;
3151
Lev Walkin752e9732017-08-04 02:06:22 -07003152 case 94:
Lev Walkin0c686452017-09-07 22:59:36 -07003153#line 1072 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003154 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003155 (yyval.a_expr) = NEW_EXPR();
3156 checkmem((yyval.a_expr));
3157 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003158 }
3159 break;
3160
Lev Walkin752e9732017-08-04 02:06:22 -07003161 case 95:
Lev Walkin0c686452017-09-07 22:59:36 -07003162#line 1077 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003163 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003164 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3165 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003166 }
3167 break;
3168
Lev Walkin752e9732017-08-04 02:06:22 -07003169 case 96:
Lev Walkin0c686452017-09-07 22:59:36 -07003170#line 1084 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003171 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003172 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3173 assert((yyval.a_expr)->Identifier == 0);
3174 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003175 }
3176 break;
3177
Lev Walkin752e9732017-08-04 02:06:22 -07003178 case 97:
Lev Walkin0c686452017-09-07 22:59:36 -07003179#line 1089 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003180 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003181 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003182 }
3183 break;
3184
Lev Walkin752e9732017-08-04 02:06:22 -07003185 case 98:
Lev Walkin0c686452017-09-07 22:59:36 -07003186#line 1092 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003187 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003188 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
3189 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003190 }
3191 break;
3192
Lev Walkin752e9732017-08-04 02:06:22 -07003193 case 99:
Lev Walkin0c686452017-09-07 22:59:36 -07003194#line 1099 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003195 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003196 (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr);
3197 checkmem((yyval.a_expr));
3198 (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt);
3199 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
3200 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00003201 }
3202 break;
3203
Lev Walkin752e9732017-08-04 02:06:22 -07003204 case 100:
Lev Walkin0c686452017-09-07 22:59:36 -07003205#line 1109 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003206 { (yyval.a_int) = 0; }
3207 break;
3208
Lev Walkin752e9732017-08-04 02:06:22 -07003209 case 101:
Lev Walkin0c686452017-09-07 22:59:36 -07003210#line 1110 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003211 { (yyval.a_int) = 1; }
3212 break;
3213
Lev Walkin752e9732017-08-04 02:06:22 -07003214 case 102:
Lev Walkin0c686452017-09-07 22:59:36 -07003215#line 1114 "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)->expr_type = A1TC_CLASSDEF;
3220 (yyval.a_expr)->meta_type = AMT_OBJECTCLASS;
3221 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003222 }
3223 break;
3224
Lev Walkin752e9732017-08-04 02:06:22 -07003225 case 103:
Lev Walkin0c686452017-09-07 22:59:36 -07003226#line 1121 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003227 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003228 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3229 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003230 }
3231 break;
3232
Lev Walkin752e9732017-08-04 02:06:22 -07003233 case 104:
Lev Walkin0c686452017-09-07 22:59:36 -07003234#line 1131 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003235 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003236 (yyval.a_expr) = NEW_EXPR();
3237 checkmem((yyval.a_expr));
3238 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
3239 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3240 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */
3241 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003242 }
3243 break;
3244
Lev Walkin752e9732017-08-04 02:06:22 -07003245 case 105:
Lev Walkin0c686452017-09-07 22:59:36 -07003246#line 1141 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003247 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003248 (yyval.a_expr) = NEW_EXPR();
3249 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3250 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3251 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */
3252 (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int);
3253 (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker);
3254 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003255 }
3256 break;
3257
Lev Walkin752e9732017-08-04 02:06:22 -07003258 case 106:
Lev Walkin0c686452017-09-07 22:59:36 -07003259#line 1152 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003260 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003261 (yyval.a_expr) = NEW_EXPR();
3262 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3263 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3264 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS;
3265 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3266 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003267 }
3268 break;
3269
Lev Walkin752e9732017-08-04 02:06:22 -07003270 case 107:
Lev Walkin0c686452017-09-07 22:59:36 -07003271#line 1162 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003272 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003273 (yyval.a_expr) = NEW_EXPR();
3274 checkmem((yyval.a_expr));
3275 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3276 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3277 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3278 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS;
3279 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003280 }
3281 break;
3282
Lev Walkin752e9732017-08-04 02:06:22 -07003283 case 108:
Lev Walkin0c686452017-09-07 22:59:36 -07003284#line 1173 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003285 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003286 (yyval.a_expr) = NEW_EXPR();
3287 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3288 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3289 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS;
3290 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3291 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003292 }
3293 break;
3294
Lev Walkin752e9732017-08-04 02:06:22 -07003295 case 109:
Lev Walkin0c686452017-09-07 22:59:36 -07003296#line 1183 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003297 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003298 (yyval.a_expr) = NEW_EXPR();
3299 checkmem((yyval.a_expr));
3300 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3301 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3302 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS;
3303 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr));
3304 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003305 }
3306 break;
3307
Lev Walkin752e9732017-08-04 02:06:22 -07003308 case 110:
Lev Walkin0c686452017-09-07 22:59:36 -07003309#line 1194 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003310 {
3311 (yyval.a_expr) = NEW_EXPR();
3312 checkmem((yyval.a_expr));
3313 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3314 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3315 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3316 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS;
3317 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
3318 }
Lev Walkin418298d2006-07-13 08:24:20 +00003319 break;
3320
Lev Walkin752e9732017-08-04 02:06:22 -07003321 case 111:
Lev Walkin0c686452017-09-07 22:59:36 -07003322#line 1206 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003323 { (yyval.a_wsynt) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00003324 break;
3325
Lev Walkin752e9732017-08-04 02:06:22 -07003326 case 112:
Lev Walkin0c686452017-09-07 22:59:36 -07003327#line 1207 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003328 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003329 (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003330 }
3331 break;
3332
Lev Walkin752e9732017-08-04 02:06:22 -07003333 case 113:
Lev Walkin0c686452017-09-07 22:59:36 -07003334#line 1214 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003335 { asn1p_lexer_hack_enable_with_syntax(); }
3336 break;
3337
Lev Walkin752e9732017-08-04 02:06:22 -07003338 case 114:
Lev Walkin0c686452017-09-07 22:59:36 -07003339#line 1216 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003340 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003341 (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003342 }
3343 break;
3344
Lev Walkin752e9732017-08-04 02:06:22 -07003345 case 115:
Lev Walkin0c686452017-09-07 22:59:36 -07003346#line 1222 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003347 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003348 (yyval.a_wsynt) = asn1p_wsyntx_new();
3349 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003350 }
3351 break;
3352
Lev Walkin752e9732017-08-04 02:06:22 -07003353 case 116:
Lev Walkin0c686452017-09-07 22:59:36 -07003354#line 1226 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003355 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003356 (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt);
3357 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003358 }
3359 break;
3360
Lev Walkin752e9732017-08-04 02:06:22 -07003361 case 117:
Lev Walkin0c686452017-09-07 22:59:36 -07003362#line 1233 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003363 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003364 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0);
3365 (yyval.a_wchunk)->type = WC_WHITESPACE;
Lev Walkin418298d2006-07-13 08:24:20 +00003366 }
3367 break;
3368
Lev Walkin752e9732017-08-04 02:06:22 -07003369 case 118:
Lev Walkin0c686452017-09-07 22:59:36 -07003370#line 1237 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003371 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003372 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003373 }
3374 break;
3375
Lev Walkin752e9732017-08-04 02:06:22 -07003376 case 119:
Lev Walkin0c686452017-09-07 22:59:36 -07003377#line 1240 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003378 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003379 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0);
3380 (yyval.a_wchunk)->type = WC_FIELD;
Lev Walkin418298d2006-07-13 08:24:20 +00003381 }
3382 break;
3383
Lev Walkin752e9732017-08-04 02:06:22 -07003384 case 120:
Lev Walkin0c686452017-09-07 22:59:36 -07003385#line 1244 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003386 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003387 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt));
Lev Walkin866bd7f2006-09-14 10:35:20 +00003388 }
3389 break;
3390
Lev Walkin4a4543f2006-10-13 12:37:39 +00003391 case 121:
Lev Walkin0c686452017-09-07 22:59:36 -07003392#line 1250 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003393 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003394 (yyval.a_expr) = NEW_EXPR();
3395 checkmem((yyval.a_expr));
3396 (yyval.a_expr)->Identifier = strdup("...");
3397 checkmem((yyval.a_expr)->Identifier);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003398 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3399 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003400 }
3401 break;
3402
3403 case 122:
Lev Walkin0c686452017-09-07 22:59:36 -07003404#line 1258 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003405 {
3406 (yyval.a_expr) = NEW_EXPR();
3407 checkmem((yyval.a_expr));
3408 (yyval.a_expr)->Identifier = strdup("...");
3409 checkmem((yyval.a_expr)->Identifier);
3410 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3411 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3412 (yyval.a_expr)->meta_type = AMT_TYPE;
3413 }
3414 break;
3415
3416 case 123:
Lev Walkin0c686452017-09-07 22:59:36 -07003417#line 1267 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003418 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003419 (yyval.a_expr) = NEW_EXPR();
3420 checkmem((yyval.a_expr));
3421 (yyval.a_expr)->Identifier = strdup("...");
3422 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3423 checkmem((yyval.a_expr)->Identifier);
3424 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3425 (yyval.a_expr)->meta_type = AMT_TYPE;
3426 }
3427 break;
3428
Lev Walkin752e9732017-08-04 02:06:22 -07003429 case 124:
Lev Walkin0c686452017-09-07 22:59:36 -07003430#line 1279 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003431 {
3432 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3433 (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag);
Lev Walkin070a52d2004-08-22 03:19:54 +00003434 /*
3435 * Outer constraint for SEQUENCE OF and SET OF applies
3436 * to the inner type.
3437 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07003438 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3439 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3440 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3441 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003442 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003443 if((yyval.a_expr)->constraints) {
3444 assert(!(yyvsp[(2) - (3)].a_expr));
Lev Walkin0c686452017-09-07 22:59:36 -07003445 /* Check this : optManyConstraints is not used ?! */
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003446 asn1p_constraint_free((yyvsp[(3) - (3)].a_constr));
Lev Walkin070a52d2004-08-22 03:19:54 +00003447 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003448 (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003449 }
3450 }
Lev Walkin418298d2006-07-13 08:24:20 +00003451 }
3452 break;
3453
Lev Walkin752e9732017-08-04 02:06:22 -07003454 case 125:
Lev Walkin0c686452017-09-07 22:59:36 -07003455#line 1303 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003456 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003457 (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0;
Lev Walkinfb872bd2006-03-18 06:53:11 +00003458 asn1p_as_pointer = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00003459 }
3460 break;
3461
Lev Walkin752e9732017-08-04 02:06:22 -07003462 case 126:
Lev Walkin0c686452017-09-07 22:59:36 -07003463#line 1310 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003464 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003465 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3466 (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int);
Lev Walkinfb872bd2006-03-18 06:53:11 +00003467
Lev Walkin0e90aa02013-03-19 16:17:13 -07003468 if(((yyval.a_expr)->marker.flags & EM_INDIRECT)
3469 && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) {
Lev Walkinef625402005-09-05 05:17:57 +00003470 fprintf(stderr,
3471 "INFO: Directive <ASN1C:RepresentAsPointer> "
Lev Walkind523ea42017-09-06 22:15:08 -07003472 "applied to %s at %s:%d\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003473 ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
3474 ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
Lev Walkinef625402005-09-05 05:17:57 +00003475 : "member",
Lev Walkind523ea42017-09-06 22:15:08 -07003476 ASN_FILENAME, (yyval.a_expr)->_lineno
Lev Walkinef625402005-09-05 05:17:57 +00003477 );
3478 }
Lev Walkin418298d2006-07-13 08:24:20 +00003479 }
3480 break;
3481
Lev Walkin752e9732017-08-04 02:06:22 -07003482 case 127:
Lev Walkin0c686452017-09-07 22:59:36 -07003483#line 1329 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003484 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003485 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003486 }
3487 break;
3488
Lev Walkin752e9732017-08-04 02:06:22 -07003489 case 128:
Lev Walkin0c686452017-09-07 22:59:36 -07003490#line 1332 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003491 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003492 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3493 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3494 (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE;
3495 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003496 }
3497 break;
3498
Lev Walkin752e9732017-08-04 02:06:22 -07003499 case 129:
Lev Walkin0c686452017-09-07 22:59:36 -07003500#line 1338 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003501 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003502 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3503 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3504 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE;
3505 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003506 }
3507 break;
3508
Lev Walkin752e9732017-08-04 02:06:22 -07003509 case 130:
Lev Walkin0c686452017-09-07 22:59:36 -07003510#line 1344 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003511 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003512 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3513 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3514 (yyval.a_expr)->expr_type = ASN_CONSTR_SET;
3515 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003516 }
3517 break;
3518
Lev Walkin752e9732017-08-04 02:06:22 -07003519 case 131:
Lev Walkin0c686452017-09-07 22:59:36 -07003520#line 1350 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003521 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003522 (yyval.a_expr) = NEW_EXPR();
3523 checkmem((yyval.a_expr));
3524 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3525 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF;
3526 (yyval.a_expr)->meta_type = AMT_TYPE;
3527 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3528 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3529 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003530 }
3531 break;
3532
Lev Walkin752e9732017-08-04 02:06:22 -07003533 case 132:
Lev Walkin0c686452017-09-07 22:59:36 -07003534#line 1360 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003535 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003536 (yyval.a_expr) = NEW_EXPR();
3537 checkmem((yyval.a_expr));
3538 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3539 (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF;
3540 (yyval.a_expr)->meta_type = AMT_TYPE;
3541 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3542 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3543 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003544 }
3545 break;
3546
Lev Walkin752e9732017-08-04 02:06:22 -07003547 case 133:
Lev Walkin0c686452017-09-07 22:59:36 -07003548#line 1370 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003549 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003550 (yyval.a_expr) = NEW_EXPR();
3551 checkmem((yyval.a_expr));
3552 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3553 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003554 }
3555 break;
3556
Lev Walkin752e9732017-08-04 02:06:22 -07003557 case 134:
Lev Walkin0c686452017-09-07 22:59:36 -07003558#line 1376 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003559 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003560 int ret;
3561 (yyval.a_expr) = NEW_EXPR();
3562 checkmem((yyval.a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003563 (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003564 ret = asn1p_ref_add_component((yyval.a_expr)->reference,
3565 (yyvsp[(4) - (4)].tv_str), RLT_lowercase);
3566 checkmem(ret == 0);
3567 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3568 (yyval.a_expr)->meta_type = AMT_TYPE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003569 free((yyvsp[(4) - (4)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003570 }
3571 break;
3572
Lev Walkin752e9732017-08-04 02:06:22 -07003573 case 135:
Lev Walkin0c686452017-09-07 22:59:36 -07003574#line 1388 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003575 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003576 (yyval.a_expr) = NEW_EXPR();
3577 checkmem((yyval.a_expr));
3578 (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref);
3579 (yyval.a_expr)->expr_type = A1TC_INSTANCE;
3580 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003581 }
3582 break;
3583
Lev Walkin752e9732017-08-04 02:06:22 -07003584 case 136:
Lev Walkin0c686452017-09-07 22:59:36 -07003585#line 1403 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003586 {
3587 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003588 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003589 checkmem((yyval.a_ref));
3590 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003591 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003592 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003593 }
3594 break;
3595
Lev Walkin4a4543f2006-10-13 12:37:39 +00003596 case 137:
Lev Walkin0c686452017-09-07 22:59:36 -07003597#line 1411 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003598 {
3599 int ret;
3600 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
3601 checkmem((yyval.a_ref));
3602 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3603 checkmem(ret == 0);
3604 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
3605 checkmem(ret == 0);
3606 free((yyvsp[(1) - (3)].tv_str));
3607 free((yyvsp[(3) - (3)].tv_str));
3608 }
3609 break;
3610
Lev Walkinbe518fa2017-09-07 02:05:28 -07003611 case 138:
Lev Walkin0c686452017-09-07 22:59:36 -07003612#line 1422 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003613 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003614 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003615 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003616 checkmem((yyval.a_ref));
3617 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9c974182004-09-15 11:59:51 +00003618 checkmem(ret == 0);
Lev Walkinbe518fa2017-09-07 02:05:28 -07003619 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
3620 checkmem(ret == 0);
3621 free((yyvsp[(1) - (3)].tv_str));
3622 free((yyvsp[(3) - (3)].tv_str));
3623 }
3624 break;
3625
3626 case 139:
Lev Walkin0c686452017-09-07 22:59:36 -07003627#line 1433 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07003628 {
3629 int ret;
3630 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
3631 checkmem((yyval.a_ref));
3632 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3633 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003634 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3635 checkmem(ret == 0);
3636 free((yyvsp[(1) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003637 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003638 }
3639 break;
3640
Lev Walkin752e9732017-08-04 02:06:22 -07003641 case 140:
Lev Walkin0c686452017-09-07 22:59:36 -07003642#line 1444 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003643 {
Lev Walkin9c974182004-09-15 11:59:51 +00003644 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003645 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003646 checkmem((yyval.a_ref));
3647 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
3648 free((yyvsp[(1) - (1)].tv_str));
3649 checkmem(ret == 0);
3650 }
3651 break;
3652
Lev Walkin752e9732017-08-04 02:06:22 -07003653 case 141:
Lev Walkin0c686452017-09-07 22:59:36 -07003654#line 1452 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003655 {
3656 int ret;
3657 (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref);
3658 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS);
3659 free((yyvsp[(1) - (3)].tv_str));
Lev Walkinf15320b2004-06-03 03:38:44 +00003660 checkmem(ret == 0);
3661 /*
3662 * Move the last element infront.
3663 */
3664 {
3665 struct asn1p_ref_component_s tmp_comp;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003666 tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1];
3667 memmove(&(yyval.a_ref)->components[1],
3668 &(yyval.a_ref)->components[0],
3669 sizeof((yyval.a_ref)->components[0])
3670 * ((yyval.a_ref)->comp_count - 1));
3671 (yyval.a_ref)->components[0] = tmp_comp;
Lev Walkinf15320b2004-06-03 03:38:44 +00003672 }
Lev Walkin418298d2006-07-13 08:24:20 +00003673 }
3674 break;
3675
Lev Walkin752e9732017-08-04 02:06:22 -07003676 case 142:
Lev Walkin0c686452017-09-07 22:59:36 -07003677#line 1474 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003678 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003679 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003680 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003681 checkmem((yyval.a_ref));
3682 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type);
3683 free((yyvsp[(1) - (1)].a_refcomp).name);
Lev Walkinf15320b2004-06-03 03:38:44 +00003684 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003685 }
3686 break;
3687
Lev Walkin752e9732017-08-04 02:06:22 -07003688 case 143:
Lev Walkin0c686452017-09-07 22:59:36 -07003689#line 1482 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003690 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003691 int ret;
3692 (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref);
3693 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type);
3694 free((yyvsp[(3) - (3)].a_refcomp).name);
3695 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003696 }
3697 break;
3698
Lev Walkin752e9732017-08-04 02:06:22 -07003699 case 145:
Lev Walkin0c686452017-09-07 22:59:36 -07003700#line 1495 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003701 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003702 (yyval.a_refcomp).lex_type = RLT_AmpUppercase;
3703 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003704 }
3705 break;
3706
Lev Walkin752e9732017-08-04 02:06:22 -07003707 case 146:
Lev Walkin0c686452017-09-07 22:59:36 -07003708#line 1500 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003709 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003710 (yyval.a_refcomp).lex_type = RLT_Amplowercase;
3711 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003712 }
3713 break;
3714
Lev Walkin752e9732017-08-04 02:06:22 -07003715 case 147:
Lev Walkin0c686452017-09-07 22:59:36 -07003716#line 1509 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003717 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003718 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003719 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003720 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003721 }
3722 break;
3723
Lev Walkin752e9732017-08-04 02:06:22 -07003724 case 148:
Lev Walkin0c686452017-09-07 22:59:36 -07003725#line 1514 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003726 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003727 (yyval.a_ref) = (yyval.a_ref);
3728 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003729 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003730 }
3731 break;
3732
Lev Walkin752e9732017-08-04 02:06:22 -07003733 case 149:
Lev Walkin0c686452017-09-07 22:59:36 -07003734#line 1519 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003735 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003736 (yyval.a_ref) = (yyval.a_ref);
3737 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003738 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003739 }
3740 break;
3741
Lev Walkin752e9732017-08-04 02:06:22 -07003742 case 150:
Lev Walkin0c686452017-09-07 22:59:36 -07003743#line 1527 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003744 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003745 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003746 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003747 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003748 }
3749 break;
3750
Lev Walkin752e9732017-08-04 02:06:22 -07003751 case 151:
Lev Walkin0c686452017-09-07 22:59:36 -07003752#line 1550 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003753 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003754 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
3755 assert((yyval.a_expr)->Identifier == NULL);
3756 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3757 (yyval.a_expr)->meta_type = AMT_VALUE;
3758 (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003759 }
3760 break;
3761
Lev Walkin752e9732017-08-04 02:06:22 -07003762 case 154:
Lev Walkin0c686452017-09-07 22:59:36 -07003763#line 1562 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003764 {
3765 (yyval.a_value) = asn1p_value_fromint(0);
3766 checkmem((yyval.a_value));
3767 (yyval.a_value)->type = ATV_CHOICE_IDENTIFIER;
3768 (yyval.a_value)->value.choice_identifier.identifier = (yyvsp[(1) - (3)].tv_str);
3769 (yyval.a_value)->value.choice_identifier.value = (yyvsp[(3) - (3)].a_value);
3770 }
Lev Walkin418298d2006-07-13 08:24:20 +00003771 break;
3772
Lev Walkin752e9732017-08-04 02:06:22 -07003773 case 155:
Lev Walkin0c686452017-09-07 22:59:36 -07003774#line 1569 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003775 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003776 break;
3777
Lev Walkin752e9732017-08-04 02:06:22 -07003778 case 156:
Lev Walkin0c686452017-09-07 22:59:36 -07003779#line 1569 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003780 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003781 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
3782 checkmem((yyval.a_value));
3783 (yyval.a_value)->type = ATV_UNPARSED;
Lev Walkin418298d2006-07-13 08:24:20 +00003784 }
3785 break;
3786
Lev Walkin752e9732017-08-04 02:06:22 -07003787 case 157:
Lev Walkin0c686452017-09-07 22:59:36 -07003788#line 1574 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003789 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003790 (yyval.a_value) = asn1p_value_fromint(0);
3791 checkmem((yyval.a_value));
3792 (yyval.a_value)->type = ATV_NULL;
Lev Walkin418298d2006-07-13 08:24:20 +00003793 }
3794 break;
3795
Lev Walkin752e9732017-08-04 02:06:22 -07003796 case 158:
Lev Walkin0c686452017-09-07 22:59:36 -07003797#line 1582 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003798 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003799 (yyval.a_value) = asn1p_value_fromint(0);
3800 checkmem((yyval.a_value));
3801 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00003802 }
3803 break;
3804
Lev Walkin752e9732017-08-04 02:06:22 -07003805 case 159:
Lev Walkin0c686452017-09-07 22:59:36 -07003806#line 1587 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003807 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003808 (yyval.a_value) = asn1p_value_fromint(0);
3809 checkmem((yyval.a_value));
3810 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00003811 }
3812 break;
3813
Lev Walkin752e9732017-08-04 02:06:22 -07003814 case 160:
Lev Walkin0c686452017-09-07 22:59:36 -07003815#line 1592 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003816 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003817 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
3818 checkmem((yyval.a_value));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003819 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003820 }
3821 break;
3822
Lev Walkin752e9732017-08-04 02:06:22 -07003823 case 161:
Lev Walkin0c686452017-09-07 22:59:36 -07003824#line 1597 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003825 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003826 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
3827 checkmem((yyval.a_value));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003828 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003829 }
3830 break;
3831
Lev Walkin752e9732017-08-04 02:06:22 -07003832 case 162:
Lev Walkin0c686452017-09-07 22:59:36 -07003833#line 1602 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003834 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003835 (yyval.a_value) = (yyval.a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003836 }
3837 break;
3838
Lev Walkin752e9732017-08-04 02:06:22 -07003839 case 163:
Lev Walkin0c686452017-09-07 22:59:36 -07003840#line 1605 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003841 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003842 (yyval.a_value) = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003843 }
3844 break;
3845
Lev Walkin752e9732017-08-04 02:06:22 -07003846 case 164:
Lev Walkin0c686452017-09-07 22:59:36 -07003847#line 1611 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003848 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003849 asn1p_ref_t *ref;
3850 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003851 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00003852 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003853 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinf15320b2004-06-03 03:38:44 +00003854 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003855 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3856 checkmem((yyval.a_value));
3857 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003858 }
3859 break;
3860
Lev Walkin752e9732017-08-04 02:06:22 -07003861 case 165:
Lev Walkin0c686452017-09-07 22:59:36 -07003862#line 1622 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003863 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003864 asn1p_ref_t *ref;
3865 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003866 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003867 checkmem(ref);
3868 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3869 checkmem(ret == 0);
3870 ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3871 checkmem(ret == 0);
3872 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3873 checkmem((yyval.a_value));
3874 free((yyvsp[(1) - (3)].tv_str));
3875 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003876 }
3877 break;
3878
Lev Walkin752e9732017-08-04 02:06:22 -07003879 case 166:
Lev Walkin0c686452017-09-07 22:59:36 -07003880#line 1640 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003881 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003882 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0);
3883 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003884 }
3885 break;
3886
Lev Walkin752e9732017-08-04 02:06:22 -07003887 case 167:
Lev Walkin0c686452017-09-07 22:59:36 -07003888#line 1644 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003889 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003890 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3891 checkmem((yyval.a_value));
3892 (yyval.a_value)->type = ATV_TUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003893 }
3894 break;
3895
Lev Walkin752e9732017-08-04 02:06:22 -07003896 case 168:
Lev Walkin0c686452017-09-07 22:59:36 -07003897#line 1649 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003898 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003899 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3900 checkmem((yyval.a_value));
3901 (yyval.a_value)->type = ATV_QUADRUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003902 }
3903 break;
3904
Lev Walkin752e9732017-08-04 02:06:22 -07003905 case 169:
Lev Walkin0c686452017-09-07 22:59:36 -07003906#line 1657 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003907 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003908 (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1;
3909 (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1);
3910 checkmem((yyval.tv_opaque).buf);
3911 (yyval.tv_opaque).buf[0] = '{';
3912 memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len);
3913 (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0';
3914 free((yyvsp[(1) - (1)].tv_opaque).buf);
Lev Walkin418298d2006-07-13 08:24:20 +00003915 }
3916 break;
3917
Lev Walkin752e9732017-08-04 02:06:22 -07003918 case 170:
Lev Walkin0c686452017-09-07 22:59:36 -07003919#line 1666 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003920 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003921 int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len;
3922 char *p = malloc(newsize + 1);
3923 checkmem(p);
3924 memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len);
3925 memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len);
3926 p[newsize] = '\0';
3927 free((yyvsp[(1) - (2)].tv_opaque).buf);
3928 free((yyvsp[(2) - (2)].tv_opaque).buf);
3929 (yyval.tv_opaque).buf = p;
3930 (yyval.tv_opaque).len = newsize;
Lev Walkin418298d2006-07-13 08:24:20 +00003931 }
3932 break;
3933
Lev Walkin752e9732017-08-04 02:06:22 -07003934 case 171:
Lev Walkin0c686452017-09-07 22:59:36 -07003935#line 1681 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003936 { (yyval.a_type) = ASN_BASIC_BOOLEAN; }
3937 break;
3938
Lev Walkin752e9732017-08-04 02:06:22 -07003939 case 172:
Lev Walkin0c686452017-09-07 22:59:36 -07003940#line 1682 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003941 { (yyval.a_type) = ASN_BASIC_NULL; }
3942 break;
3943
Lev Walkin752e9732017-08-04 02:06:22 -07003944 case 173:
Lev Walkin0c686452017-09-07 22:59:36 -07003945#line 1683 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003946 { (yyval.a_type) = ASN_BASIC_REAL; }
3947 break;
3948
Lev Walkin0e90aa02013-03-19 16:17:13 -07003949 case 174:
Lev Walkin0c686452017-09-07 22:59:36 -07003950#line 1684 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003951 { (yyval.a_type) = ASN_BASIC_OCTET_STRING; }
3952 break;
3953
Lev Walkinbe518fa2017-09-07 02:05:28 -07003954 case 175:
Lev Walkin0c686452017-09-07 22:59:36 -07003955#line 1685 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003956 { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; }
3957 break;
3958
Lev Walkinbe518fa2017-09-07 02:05:28 -07003959 case 176:
Lev Walkin0c686452017-09-07 22:59:36 -07003960#line 1686 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003961 { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; }
3962 break;
3963
Lev Walkinbe518fa2017-09-07 02:05:28 -07003964 case 177:
Lev Walkin0c686452017-09-07 22:59:36 -07003965#line 1687 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003966 { (yyval.a_type) = ASN_BASIC_EXTERNAL; }
3967 break;
3968
Lev Walkinbe518fa2017-09-07 02:05:28 -07003969 case 178:
Lev Walkin0c686452017-09-07 22:59:36 -07003970#line 1688 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003971 { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; }
3972 break;
3973
Lev Walkinbe518fa2017-09-07 02:05:28 -07003974 case 179:
Lev Walkin0c686452017-09-07 22:59:36 -07003975#line 1689 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003976 { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; }
3977 break;
3978
Lev Walkinbe518fa2017-09-07 02:05:28 -07003979 case 180:
Lev Walkin0c686452017-09-07 22:59:36 -07003980#line 1690 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003981 { (yyval.a_type) = ASN_BASIC_UTCTime; }
3982 break;
3983
Lev Walkinbe518fa2017-09-07 02:05:28 -07003984 case 181:
Lev Walkin0c686452017-09-07 22:59:36 -07003985#line 1691 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003986 { (yyval.a_type) = ASN_BASIC_GeneralizedTime; }
3987 break;
3988
Lev Walkind523ea42017-09-06 22:15:08 -07003989 case 184:
Lev Walkin0c686452017-09-07 22:59:36 -07003990#line 1700 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003991 { (yyval.a_type) = ASN_BASIC_INTEGER; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003992 break;
3993
3994 case 185:
Lev Walkin0c686452017-09-07 22:59:36 -07003995#line 1701 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07003996 { (yyval.a_type) = ASN_BASIC_INTEGER; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003997 break;
3998
Lev Walkin4a4543f2006-10-13 12:37:39 +00003999 case 186:
Lev Walkin0c686452017-09-07 22:59:36 -07004000#line 1702 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004001 { (yyval.a_type) = ASN_BASIC_BIT_STRING; }
4002 break;
4003
4004 case 187:
Lev Walkin0c686452017-09-07 22:59:36 -07004005#line 1706 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004006 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004007 (yyval.a_expr) = NEW_EXPR();
4008 checkmem((yyval.a_expr));
4009 (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type);
4010 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00004011 }
4012 break;
4013
Lev Walkin752e9732017-08-04 02:06:22 -07004014 case 188:
Lev Walkin0c686452017-09-07 22:59:36 -07004015#line 1712 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004016 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07004017 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
4018 (yyval.a_expr)->expr_type = ASN_BASIC_INTEGER;
4019 (yyval.a_expr)->meta_type = AMT_TYPE;
4020 }
Lev Walkin418298d2006-07-13 08:24:20 +00004021 break;
4022
Lev Walkin752e9732017-08-04 02:06:22 -07004023 case 189:
Lev Walkin0c686452017-09-07 22:59:36 -07004024#line 1717 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004025 {
4026 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
4027 (yyval.a_expr)->expr_type = ASN_BASIC_ENUMERATED;
4028 (yyval.a_expr)->meta_type = AMT_TYPE;
4029 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004030 break;
4031
Lev Walkin752e9732017-08-04 02:06:22 -07004032 case 190:
Lev Walkin0c686452017-09-07 22:59:36 -07004033#line 1722 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004034 {
4035 (yyval.a_expr) = (yyvsp[(4) - (5)].a_expr);
4036 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4037 (yyval.a_expr)->meta_type = AMT_TYPE;
4038 }
4039 break;
4040
4041 case 191:
Lev Walkin0c686452017-09-07 22:59:36 -07004042#line 1727 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004043 {
4044 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
4045 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4046 (yyval.a_expr)->meta_type = AMT_TYPE;
4047 }
4048 break;
4049
4050 case 192:
Lev Walkin0c686452017-09-07 22:59:36 -07004051#line 1732 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004052 {
4053 (yyval.a_expr) = NEW_EXPR();
4054 checkmem((yyval.a_expr));
4055 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4056 (yyval.a_expr)->meta_type = AMT_TYPE;
4057 }
4058 break;
4059
4060 case 193:
Lev Walkin0c686452017-09-07 22:59:36 -07004061#line 1741 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004062 { (yyval.a_type) = ASN_STRING_BMPString; }
4063 break;
4064
4065 case 194:
Lev Walkin0c686452017-09-07 22:59:36 -07004066#line 1742 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004067 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004068 (yyval.a_type) = ASN_STRING_GeneralString;
Lev Walkin9c974182004-09-15 11:59:51 +00004069 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004070 }
4071 break;
4072
Lev Walkinbe518fa2017-09-07 02:05:28 -07004073 case 195:
Lev Walkin0c686452017-09-07 22:59:36 -07004074#line 1746 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004075 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004076 (yyval.a_type) = ASN_STRING_GraphicString;
Lev Walkin9c974182004-09-15 11:59:51 +00004077 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004078 }
4079 break;
4080
Lev Walkinbe518fa2017-09-07 02:05:28 -07004081 case 196:
Lev Walkin0c686452017-09-07 22:59:36 -07004082#line 1750 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004083 { (yyval.a_type) = ASN_STRING_IA5String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004084 break;
4085
Lev Walkinbe518fa2017-09-07 02:05:28 -07004086 case 197:
Lev Walkin0c686452017-09-07 22:59:36 -07004087#line 1751 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004088 { (yyval.a_type) = ASN_STRING_ISO646String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004089 break;
4090
Lev Walkinbe518fa2017-09-07 02:05:28 -07004091 case 198:
Lev Walkin0c686452017-09-07 22:59:36 -07004092#line 1752 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004093 { (yyval.a_type) = ASN_STRING_NumericString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004094 break;
4095
Lev Walkinbe518fa2017-09-07 02:05:28 -07004096 case 199:
Lev Walkin0c686452017-09-07 22:59:36 -07004097#line 1753 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004098 { (yyval.a_type) = ASN_STRING_PrintableString; }
4099 break;
4100
Lev Walkinbe518fa2017-09-07 02:05:28 -07004101 case 200:
Lev Walkin0c686452017-09-07 22:59:36 -07004102#line 1754 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004103 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004104 (yyval.a_type) = ASN_STRING_T61String;
Lev Walkin9c974182004-09-15 11:59:51 +00004105 fprintf(stderr, "WARNING: T61String is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004106 }
4107 break;
4108
Lev Walkinbe518fa2017-09-07 02:05:28 -07004109 case 201:
Lev Walkin0c686452017-09-07 22:59:36 -07004110#line 1758 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004111 { (yyval.a_type) = ASN_STRING_TeletexString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004112 break;
4113
Lev Walkinbe518fa2017-09-07 02:05:28 -07004114 case 202:
Lev Walkin0c686452017-09-07 22:59:36 -07004115#line 1759 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004116 { (yyval.a_type) = ASN_STRING_UniversalString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004117 break;
4118
Lev Walkinbe518fa2017-09-07 02:05:28 -07004119 case 203:
Lev Walkin0c686452017-09-07 22:59:36 -07004120#line 1760 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004121 { (yyval.a_type) = ASN_STRING_UTF8String; }
4122 break;
4123
Lev Walkinbe518fa2017-09-07 02:05:28 -07004124 case 204:
Lev Walkin0c686452017-09-07 22:59:36 -07004125#line 1761 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004126 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004127 (yyval.a_type) = ASN_STRING_VideotexString;
Lev Walkin9c974182004-09-15 11:59:51 +00004128 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004129 }
4130 break;
4131
Lev Walkinbe518fa2017-09-07 02:05:28 -07004132 case 205:
Lev Walkin0c686452017-09-07 22:59:36 -07004133#line 1765 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004134 { (yyval.a_type) = ASN_STRING_VisibleString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004135 break;
4136
Lev Walkinbe518fa2017-09-07 02:05:28 -07004137 case 206:
Lev Walkin0c686452017-09-07 22:59:36 -07004138#line 1766 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004139 { (yyval.a_type) = ASN_STRING_ObjectDescriptor; }
Lev Walkin418298d2006-07-13 08:24:20 +00004140 break;
4141
Lev Walkin752e9732017-08-04 02:06:22 -07004142 case 211:
Lev Walkin0c686452017-09-07 22:59:36 -07004143#line 1778 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004144 { (yyval.a_constr) = 0; }
4145 break;
4146
4147 case 213:
Lev Walkin0c686452017-09-07 22:59:36 -07004148#line 1783 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004149 { (yyval.a_constr) = 0; }
4150 break;
4151
4152 case 215:
Lev Walkin0c686452017-09-07 22:59:36 -07004153#line 1788 "asn1p_y.y"
4154 { (yyval.a_constr) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00004155 break;
4156
Lev Walkinbe518fa2017-09-07 02:05:28 -07004157 case 218:
Lev Walkin0c686452017-09-07 22:59:36 -07004158#line 1794 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004159 {
Lev Walkin0c686452017-09-07 22:59:36 -07004160 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(2) - (3)].a_constr), 0);
4161 }
4162 break;
4163
4164 case 220:
4165#line 1801 "asn1p_y.y"
4166 {
4167 if((yyvsp[(2) - (2)].a_constr)->type == ACT_CA_SET && (yyvsp[(2) - (2)].a_constr)->el_count == 1) {
4168 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr)->elements[0]);
4169 } else {
4170 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr));
4171 }
Lev Walkin418298d2006-07-13 08:24:20 +00004172 }
4173 break;
4174
Lev Walkin0c686452017-09-07 22:59:36 -07004175 case 224:
4176#line 1815 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004177 {
4178 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4179 (yyval.a_constr)->type = ACT_EL_EXT;
4180 }
4181 break;
4182
Lev Walkin0c686452017-09-07 22:59:36 -07004183 case 226:
4184#line 1820 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004185 {
Lev Walkin0c686452017-09-07 22:59:36 -07004186 asn1p_constraint_t *ct;
4187 ct = asn1p_constraint_new(yylineno, currentModule);
4188 ct->type = ACT_EL_EXT;
4189 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
4190 }
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004191 break;
4192
Lev Walkinbe518fa2017-09-07 02:05:28 -07004193 case 227:
Lev Walkin0c686452017-09-07 22:59:36 -07004194#line 1826 "asn1p_y.y"
4195 {
4196 asn1p_constraint_t *ct;
4197 ct = asn1p_constraint_new(yylineno, currentModule);
4198 ct->type = ACT_EL_EXT;
4199 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct);
4200 ct = (yyval.a_constr);
4201 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr));
4202 }
4203 break;
4204
4205 case 229:
4206#line 1838 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004207 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004208 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004209 }
4210 break;
4211
Lev Walkin0c686452017-09-07 22:59:36 -07004212 case 231:
4213#line 1845 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004214 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004215 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 +00004216 }
4217 break;
4218
Lev Walkin0c686452017-09-07 22:59:36 -07004219 case 233:
4220#line 1852 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004221 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004222 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 +00004223 }
4224 break;
4225
Lev Walkin0c686452017-09-07 22:59:36 -07004226 case 235:
4227#line 1860 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004228 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004229 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004230 }
4231 break;
4232
Lev Walkin0c686452017-09-07 22:59:36 -07004233 case 237:
4234#line 1867 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004235 {
Lev Walkin0c686452017-09-07 22:59:36 -07004236 int ret;
4237 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4238 checkmem((yyval.a_constr));
4239 (yyval.a_constr)->type = ACT_CA_SET;
4240 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4241 checkmem(ret == 0);
4242 }
Lev Walkin418298d2006-07-13 08:24:20 +00004243 break;
4244
Lev Walkin0c686452017-09-07 22:59:36 -07004245 case 238:
4246#line 1878 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004247 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004248 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004249 checkmem((yyval.a_constr));
4250 (yyval.a_constr)->type = ACT_EL_VALUE;
4251 (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004252 }
4253 break;
4254
Lev Walkin0c686452017-09-07 22:59:36 -07004255 case 239:
4256#line 1884 "asn1p_y.y"
Lev Walkinf1727152006-09-21 01:50:37 +00004257 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004258 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004259 checkmem((yyval.a_constr));
4260 (yyval.a_constr)->type = ACT_EL_TYPE;
4261 (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value);
Lev Walkinf1727152006-09-21 01:50:37 +00004262 }
4263 break;
4264
Lev Walkin0c686452017-09-07 22:59:36 -07004265 case 245:
4266#line 1896 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004267 { asn1p_lexer_hack_push_opaque_state(); }
4268 break;
4269
Lev Walkin0c686452017-09-07 22:59:36 -07004270 case 246:
4271#line 1896 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004272 {
4273 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4274 checkmem((yyval.a_constr));
4275 (yyval.a_constr)->type = ACT_EL_VALUE;
4276 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
4277 (yyval.a_constr)->value->type = ATV_UNPARSED;
4278 }
4279 break;
4280
Lev Walkin0c686452017-09-07 22:59:36 -07004281 case 247:
4282#line 1907 "asn1p_y.y"
4283 {
4284 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_FROM, (yyvsp[(2) - (2)].a_constr), 0);
4285 }
4286 break;
4287
4288 case 248:
4289#line 1912 "asn1p_y.y"
4290 {
4291 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(2) - (2)].a_constr), 0);
4292 }
4293 break;
4294
4295 case 249:
4296#line 1917 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004297 {
4298 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004299 (yyval.a_constr)->type = ACT_CT_PATTERN;
4300 (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 +00004301 }
4302 break;
4303
Lev Walkin0c686452017-09-07 22:59:36 -07004304 case 250:
4305#line 1922 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004306 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004307 asn1p_ref_t *ref;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004308 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004309 (yyval.a_constr)->type = ACT_CT_PATTERN;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004310 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004311 asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase);
4312 (yyval.a_constr)->value = asn1p_value_fromref(ref, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004313 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin5c541f12006-10-18 18:40:14 +00004314 }
4315 break;
4316
Lev Walkin0c686452017-09-07 22:59:36 -07004317 case 251:
4318#line 1934 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004319 {
Lev Walkin0c686452017-09-07 22:59:36 -07004320 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4321 checkmem((yyval.a_constr));
4322 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4323 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
4324 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
4325 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004326 break;
4327
Lev Walkin0c686452017-09-07 22:59:36 -07004328 case 253:
4329#line 1944 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004330 {
Lev Walkin0c686452017-09-07 22:59:36 -07004331 (yyval.a_value) = asn1p_value_fromint(-123);
4332 (yyval.a_value)->type = ATV_MIN;
4333 }
Lev Walkin418298d2006-07-13 08:24:20 +00004334 break;
4335
Lev Walkin0c686452017-09-07 22:59:36 -07004336 case 255:
4337#line 1951 "asn1p_y.y"
4338 {
4339 (yyval.a_value) = asn1p_value_fromint(321);
4340 (yyval.a_value)->type = ATV_MAX;
4341 }
4342 break;
4343
4344 case 256:
4345#line 1957 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004346 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004347 (yyval.a_value) = asn1p_value_fromint(0);
4348 checkmem((yyval.a_value));
4349 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00004350 }
4351 break;
4352
Lev Walkin0c686452017-09-07 22:59:36 -07004353 case 257:
4354#line 1962 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004355 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004356 (yyval.a_value) = asn1p_value_fromint(1);
4357 checkmem((yyval.a_value));
4358 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00004359 }
4360 break;
4361
Lev Walkin0c686452017-09-07 22:59:36 -07004362 case 261:
4363#line 1970 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004364 {
Lev Walkinc8092cb2005-02-18 16:34:21 +00004365 asn1p_ref_t *ref;
4366 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004367 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkinc8092cb2005-02-18 16:34:21 +00004368 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004369 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinc8092cb2005-02-18 16:34:21 +00004370 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004371 (yyval.a_value) = asn1p_value_fromref(ref, 0);
4372 checkmem((yyval.a_value));
4373 free((yyvsp[(1) - (1)].tv_str));
4374 }
4375 break;
4376
Lev Walkin0c686452017-09-07 22:59:36 -07004377 case 262:
4378#line 1984 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004379 {
4380 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
4381 checkmem((yyval.a_value));
Lev Walkin0e90aa02013-03-19 16:17:13 -07004382 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004383 }
4384 break;
4385
Lev Walkin0c686452017-09-07 22:59:36 -07004386 case 263:
4387#line 1989 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004388 {
4389 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
4390 checkmem((yyval.a_value));
4391 free((yyvsp[(1) - (1)].tv_str));
4392 }
4393 break;
4394
Lev Walkin0c686452017-09-07 22:59:36 -07004395 case 264:
4396#line 1997 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004397 {
Lev Walkin0c686452017-09-07 22:59:36 -07004398 (yyval.a_value) = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004399 checkmem((yyval.a_value));
Lev Walkind523ea42017-09-06 22:15:08 -07004400 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004401 break;
4402
Lev Walkin0c686452017-09-07 22:59:36 -07004403 case 265:
4404#line 2004 "asn1p_y.y"
4405 { (yyval.a_int) = 0; }
4406 break;
4407
4408 case 266:
4409#line 2005 "asn1p_y.y"
4410 { (yyval.a_int) = 1; }
4411 break;
4412
4413 case 267:
4414#line 2013 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004415 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004416 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004417 }
4418 break;
4419
Lev Walkin0c686452017-09-07 22:59:36 -07004420 case 268:
4421#line 2016 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004422 {
Lev Walkind523ea42017-09-06 22:15:08 -07004423 assert((yyvsp[(3) - (3)].a_constr)->type == ACT_CA_CSV);
4424 (yyvsp[(3) - (3)].a_constr)->type = ACT_CT_WCOMPS;
4425 (yyval.a_constr) = (yyvsp[(3) - (3)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004426 }
4427 break;
4428
Lev Walkin0c686452017-09-07 22:59:36 -07004429 case 272:
4430#line 2024 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004431 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004432 break;
4433
Lev Walkin0c686452017-09-07 22:59:36 -07004434 case 273:
4435#line 2026 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004436 {
4437 assert((yyvsp[(4) - (5)].a_constr)->type == ACT_CA_CSV);
4438 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4439 (yyval.a_constr)->type = ACT_CA_CSV;
4440 asn1p_constraint_t *ct = asn1p_constraint_new(yylineno, currentModule);
4441 checkmem((yyval.a_constr));
4442 ct->type = ACT_EL_EXT;
4443 asn1p_constraint_insert((yyval.a_constr), ct);
4444 for(unsigned i = 0; i < (yyvsp[(4) - (5)].a_constr)->el_count; i++) {
4445 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(4) - (5)].a_constr)->elements[i]);
4446 }
4447 }
4448 break;
4449
Lev Walkin0c686452017-09-07 22:59:36 -07004450 case 274:
4451#line 2039 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004452 {
4453 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4454 (yyval.a_constr)->type = ACT_CA_CSV;
4455 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(1) - (1)].a_constr));
4456 }
4457 break;
4458
Lev Walkin0c686452017-09-07 22:59:36 -07004459 case 275:
4460#line 2044 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004461 {
4462 (yyval.a_constr) = (yyvsp[(1) - (3)].a_constr);
4463 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (3)].a_constr));
4464 }
4465 break;
4466
Lev Walkin0c686452017-09-07 22:59:36 -07004467 case 276:
4468#line 2050 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004469 {
4470 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4471 checkmem((yyval.a_constr));
4472 (yyval.a_constr)->type = ACT_EL_VALUE;
4473 (yyval.a_constr)->value = (yyvsp[(1) - (3)].a_value);
4474 if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4475 (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres);
4476 }
4477 break;
4478
Lev Walkin0c686452017-09-07 22:59:36 -07004479 case 277:
4480#line 2064 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004481 { (yyval.a_pres) = ACPRES_DEFAULT; }
4482 break;
4483
Lev Walkin0c686452017-09-07 22:59:36 -07004484 case 278:
4485#line 2065 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004486 { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); }
4487 break;
4488
Lev Walkin0c686452017-09-07 22:59:36 -07004489 case 279:
4490#line 2069 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004491 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004492 (yyval.a_pres) = ACPRES_PRESENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004493 }
4494 break;
4495
Lev Walkin0c686452017-09-07 22:59:36 -07004496 case 280:
4497#line 2072 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004498 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004499 (yyval.a_pres) = ACPRES_ABSENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004500 }
4501 break;
4502
Lev Walkin0c686452017-09-07 22:59:36 -07004503 case 281:
4504#line 2075 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004505 {
4506 (yyval.a_pres) = ACPRES_OPTIONAL;
4507 }
Lev Walkina9532f42006-09-17 04:52:50 +00004508 break;
4509
Lev Walkin0c686452017-09-07 22:59:36 -07004510 case 285:
4511#line 2090 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004512 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00004513 break;
4514
Lev Walkin0c686452017-09-07 22:59:36 -07004515 case 286:
4516#line 2090 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004517 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004518 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004519 checkmem((yyval.a_constr));
4520 (yyval.a_constr)->type = ACT_CT_CTDBY;
4521 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0);
4522 checkmem((yyval.a_constr)->value);
4523 (yyval.a_constr)->value->type = ATV_UNPARSED;
Lev Walkina9532f42006-09-17 04:52:50 +00004524 }
4525 break;
4526
Lev Walkin0c686452017-09-07 22:59:36 -07004527 case 287:
4528#line 2101 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004529 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004530 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004531 (yyval.a_constr)->type = ACT_CT_CTNG;
4532 (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08004533 asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
Lev Walkin4a4543f2006-10-13 12:37:39 +00004534 }
4535 break;
4536
Lev Walkin0c686452017-09-07 22:59:36 -07004537 case 288:
4538#line 2110 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004539 { (yyval.a_ctype) = ACT_EL_RANGE; }
4540 break;
4541
Lev Walkin0c686452017-09-07 22:59:36 -07004542 case 289:
4543#line 2111 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004544 { (yyval.a_ctype) = ACT_EL_RLRANGE; }
4545 break;
4546
Lev Walkin0c686452017-09-07 22:59:36 -07004547 case 290:
4548#line 2112 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004549 { (yyval.a_ctype) = ACT_EL_LLRANGE; }
4550 break;
4551
Lev Walkin0c686452017-09-07 22:59:36 -07004552 case 291:
4553#line 2113 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004554 { (yyval.a_ctype) = ACT_EL_ULRANGE; }
4555 break;
4556
Lev Walkin0c686452017-09-07 22:59:36 -07004557 case 292:
4558#line 2116 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004559 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004560 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004561 }
4562 break;
4563
Lev Walkin0c686452017-09-07 22:59:36 -07004564 case 293:
4565#line 2119 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004566 {
4567 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4568 }
4569 break;
4570
Lev Walkin0c686452017-09-07 22:59:36 -07004571 case 294:
4572#line 2128 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004573 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004574 asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004575 asn1p_constraint_t *ct;
4576 int ret;
4577 ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0);
4578 checkmem(ret == 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004579 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004580 checkmem((yyval.a_constr));
4581 ct->type = ACT_EL_VALUE;
4582 ct->value = asn1p_value_fromref(ref, 0);
4583 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004584 free((yyvsp[(2) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004585 }
4586 break;
4587
Lev Walkin0c686452017-09-07 22:59:36 -07004588 case 295:
4589#line 2144 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004590 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004591 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 +00004592 }
4593 break;
4594
Lev Walkin0c686452017-09-07 22:59:36 -07004595 case 296:
4596#line 2150 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004597 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004598 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004599 checkmem((yyval.a_constr));
4600 (yyval.a_constr)->type = ACT_EL_VALUE;
4601 (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4602 }
4603 break;
4604
Lev Walkin0c686452017-09-07 22:59:36 -07004605 case 297:
4606#line 2156 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004607 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004608 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004609 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00004610 checkmem(ct);
4611 ct->type = ACT_EL_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004612 ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0);
4613 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004614 }
4615 break;
4616
Lev Walkin0c686452017-09-07 22:59:36 -07004617 case 298:
4618#line 2170 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004619 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004620 char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2);
Lev Walkinf15320b2004-06-03 03:38:44 +00004621 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004622 *p = '@';
4623 strcpy(p + 1, (yyvsp[(2) - (2)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004624 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004625 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
Lev Walkinf15320b2004-06-03 03:38:44 +00004626 checkmem(ret == 0);
4627 free(p);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004628 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004629 }
4630 break;
4631
Lev Walkin0c686452017-09-07 22:59:36 -07004632 case 299:
4633#line 2181 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004634 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004635 char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3);
4636 int ret;
4637 p[0] = '@';
4638 p[1] = '.';
4639 strcpy(p + 2, (yyvsp[(3) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004640 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004641 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
4642 checkmem(ret == 0);
4643 free(p);
4644 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004645 }
4646 break;
4647
Lev Walkin0c686452017-09-07 22:59:36 -07004648 case 300:
4649#line 2197 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004650 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004651 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00004652 }
4653 break;
4654
Lev Walkin0c686452017-09-07 22:59:36 -07004655 case 301:
4656#line 2200 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004657 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004658 int l1 = strlen((yyvsp[(1) - (3)].tv_str));
4659 int l3 = strlen((yyvsp[(3) - (3)].tv_str));
4660 (yyval.tv_str) = malloc(l1 + 1 + l3 + 1);
4661 memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1);
4662 (yyval.tv_str)[l1] = '.';
4663 memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3);
4664 (yyval.tv_str)[l1 + 1 + l3] = '\0';
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004665 free((yyvsp[(1) - (3)].tv_str));
4666 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004667 }
4668 break;
4669
Lev Walkin0c686452017-09-07 22:59:36 -07004670 case 302:
4671#line 2220 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004672 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004673 (yyval.a_marker).flags = EM_NOMARK;
4674 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004675 }
4676 break;
4677
Lev Walkin0c686452017-09-07 22:59:36 -07004678 case 303:
4679#line 2224 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004680 { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); }
4681 break;
4682
Lev Walkin0c686452017-09-07 22:59:36 -07004683 case 304:
4684#line 2228 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004685 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004686 (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT;
4687 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004688 }
4689 break;
4690
Lev Walkin0c686452017-09-07 22:59:36 -07004691 case 305:
4692#line 2232 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004693 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004694 (yyval.a_marker).flags = EM_DEFAULT;
4695 (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004696 }
4697 break;
4698
Lev Walkin0c686452017-09-07 22:59:36 -07004699 case 306:
4700#line 2239 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004701 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004702 (yyval.a_expr) = NEW_EXPR();
4703 checkmem((yyval.a_expr));
Lev Walkinbe518fa2017-09-07 02:05:28 -07004704 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4705 }
Lev Walkin418298d2006-07-13 08:24:20 +00004706 break;
4707
Lev Walkin0c686452017-09-07 22:59:36 -07004708 case 307:
4709#line 2244 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004710 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07004711 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4712 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4713 }
Lev Walkin418298d2006-07-13 08:24:20 +00004714 break;
4715
Lev Walkin0c686452017-09-07 22:59:36 -07004716 case 308:
4717#line 2250 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004718 {
4719 (yyval.a_expr) = NEW_EXPR();
4720 checkmem((yyval.a_expr));
4721 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4722 (yyval.a_expr)->meta_type = AMT_VALUE;
4723 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
4724 }
4725 break;
4726
Lev Walkin0c686452017-09-07 22:59:36 -07004727 case 309:
Lev Walkinbe518fa2017-09-07 02:05:28 -07004728#line 2259 "asn1p_y.y"
4729 {
Lev Walkin0c686452017-09-07 22:59:36 -07004730 (yyval.a_expr) = NEW_EXPR();
4731 checkmem((yyval.a_expr));
4732 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4733 }
4734 break;
4735
4736 case 310:
4737#line 2264 "asn1p_y.y"
4738 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07004739 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4740 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4741 }
4742 break;
4743
Lev Walkin0c686452017-09-07 22:59:36 -07004744 case 311:
4745#line 2271 "asn1p_y.y"
4746 {
4747 (yyval.a_expr) = NEW_EXPR();
4748 checkmem((yyval.a_expr));
4749 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4750 (yyval.a_expr)->meta_type = AMT_VALUE;
4751 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4752 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4753 }
4754 break;
4755
4756 case 312:
4757#line 2279 "asn1p_y.y"
4758 {
4759 (yyval.a_expr) = NEW_EXPR();
4760 checkmem((yyval.a_expr));
4761 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4762 (yyval.a_expr)->meta_type = AMT_VALUE;
4763 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4764 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4765 }
4766 break;
4767
4768 case 313:
4769#line 2289 "asn1p_y.y"
4770 {
4771 (yyval.a_expr) = NEW_EXPR();
4772 checkmem((yyval.a_expr));
4773 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4774 }
4775 break;
4776
4777 case 314:
4778#line 2294 "asn1p_y.y"
4779 {
4780 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4781 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4782 }
4783 break;
4784
4785 case 315:
4786#line 2301 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004787 {
4788 (yyval.a_expr) = NEW_EXPR();
4789 checkmem((yyval.a_expr));
4790 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4791 (yyval.a_expr)->meta_type = AMT_VALUE;
4792 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4793 (yyval.a_expr)->value = asn1p_value_fromint((yyvsp[(3) - (4)].a_int));
4794 }
4795 break;
4796
Lev Walkin0c686452017-09-07 22:59:36 -07004797 case 316:
4798#line 2309 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004799 {
4800 (yyval.a_expr) = NEW_EXPR();
4801 checkmem((yyval.a_expr));
4802 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4803 (yyval.a_expr)->meta_type = AMT_VALUE;
4804 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4805 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4806 }
4807 break;
4808
Lev Walkin0c686452017-09-07 22:59:36 -07004809 case 317:
4810#line 2319 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004811 {
4812 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
4813 asn1p_expr_t *first_memb = TQ_FIRST(&((yyval.a_expr)->members));
4814 if(first_memb) {
4815 if(first_memb->expr_type == A1TC_EXTENSIBLE) {
4816 return yyerror(
4817 "The ENUMERATION cannot start with extension (...).");
4818 }
4819 } else {
4820 return yyerror(
4821 "The ENUMERATION list cannot be empty.");
4822 }
4823 }
4824 break;
4825
Lev Walkin0c686452017-09-07 22:59:36 -07004826 case 318:
4827#line 2334 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004828 {
4829 (yyval.a_expr) = NEW_EXPR();
4830 checkmem((yyval.a_expr));
4831 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4832 }
4833 break;
4834
Lev Walkin0c686452017-09-07 22:59:36 -07004835 case 319:
4836#line 2339 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004837 {
4838 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4839 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4840 }
4841 break;
4842
Lev Walkin0c686452017-09-07 22:59:36 -07004843 case 320:
4844#line 2346 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004845 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004846 (yyval.a_expr) = NEW_EXPR();
4847 checkmem((yyval.a_expr));
4848 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4849 (yyval.a_expr)->meta_type = AMT_VALUE;
4850 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004851 }
4852 break;
4853
Lev Walkin0c686452017-09-07 22:59:36 -07004854 case 321:
4855#line 2353 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004856 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004857 (yyval.a_expr) = NEW_EXPR();
4858 checkmem((yyval.a_expr));
4859 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4860 (yyval.a_expr)->meta_type = AMT_VALUE;
4861 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4862 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004863 }
4864 break;
4865
Lev Walkin0c686452017-09-07 22:59:36 -07004866 case 322:
4867#line 2361 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004868 {
4869 (yyval.a_expr) = NEW_EXPR();
4870 checkmem((yyval.a_expr));
4871 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4872 (yyval.a_expr)->meta_type = AMT_VALUE;
4873 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4874 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4875 }
4876 break;
4877
Lev Walkin0c686452017-09-07 22:59:36 -07004878 case 323:
4879#line 2369 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004880 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004881 (yyval.a_expr) = NEW_EXPR();
4882 checkmem((yyval.a_expr));
4883 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4884 (yyval.a_expr)->meta_type = AMT_VALUE;
4885 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004886 }
4887 break;
4888
Lev Walkin0c686452017-09-07 22:59:36 -07004889 case 324:
4890#line 2376 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004891 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004892 (yyval.a_expr) = NEW_EXPR();
4893 checkmem((yyval.a_expr));
4894 (yyval.a_expr)->Identifier = strdup("...");
4895 checkmem((yyval.a_expr)->Identifier);
4896 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
4897 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004898 }
4899 break;
4900
Lev Walkin0c686452017-09-07 22:59:36 -07004901 case 325:
4902#line 2387 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004903 {
4904 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4905 checkmem((yyval.a_value));
4906 }
4907 break;
4908
Lev Walkin0c686452017-09-07 22:59:36 -07004909 case 326:
4910#line 2391 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004911 {
4912 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4913 checkmem((yyval.a_value));
4914 }
4915 break;
4916
Lev Walkin0c686452017-09-07 22:59:36 -07004917 case 328:
4918#line 2399 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004919 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004920 (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl));
4921 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00004922 }
4923 break;
4924
Lev Walkin0c686452017-09-07 22:59:36 -07004925 case 329:
4926#line 2430 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004927 { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); }
4928 break;
4929
Lev Walkin0c686452017-09-07 22:59:36 -07004930 case 330:
4931#line 2431 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004932 { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); }
4933 break;
4934
Lev Walkin0c686452017-09-07 22:59:36 -07004935 case 331:
4936#line 2435 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004937 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004938 (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag);
4939 (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode;
Lev Walkin418298d2006-07-13 08:24:20 +00004940 }
4941 break;
4942
Lev Walkin0c686452017-09-07 22:59:36 -07004943 case 332:
4944#line 2442 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004945 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004946 (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag);
4947 (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int);
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004948 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004949 break;
4950
Lev Walkin0c686452017-09-07 22:59:36 -07004951 case 333:
4952#line 2448 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004953 { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; }
4954 break;
4955
Lev Walkin0c686452017-09-07 22:59:36 -07004956 case 334:
4957#line 2449 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004958 { (yyval.a_tag).tag_class = TC_UNIVERSAL; }
4959 break;
4960
Lev Walkin0c686452017-09-07 22:59:36 -07004961 case 335:
4962#line 2450 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004963 { (yyval.a_tag).tag_class = TC_APPLICATION; }
4964 break;
4965
Lev Walkin0c686452017-09-07 22:59:36 -07004966 case 336:
4967#line 2451 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004968 { (yyval.a_tag).tag_class = TC_PRIVATE; }
4969 break;
4970
Lev Walkin0c686452017-09-07 22:59:36 -07004971 case 337:
4972#line 2455 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004973 { (yyval.a_tag).tag_mode = TM_DEFAULT; }
4974 break;
4975
Lev Walkin0c686452017-09-07 22:59:36 -07004976 case 338:
4977#line 2456 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004978 { (yyval.a_tag).tag_mode = TM_IMPLICIT; }
4979 break;
4980
Lev Walkin0c686452017-09-07 22:59:36 -07004981 case 339:
4982#line 2457 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004983 { (yyval.a_tag).tag_mode = TM_EXPLICIT; }
4984 break;
4985
Lev Walkin0c686452017-09-07 22:59:36 -07004986 case 340:
4987#line 2461 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00004988 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004989 checkmem((yyvsp[(1) - (1)].tv_str));
Lev Walkin0e90aa02013-03-19 16:17:13 -07004990 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4991 }
4992 break;
4993
Lev Walkin0c686452017-09-07 22:59:36 -07004994 case 341:
4995#line 2465 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004996 {
4997 checkmem((yyvsp[(1) - (1)].tv_str));
4998 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4999 }
5000 break;
5001
Lev Walkin0c686452017-09-07 22:59:36 -07005002 case 342:
5003#line 2473 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07005004 {
5005 checkmem((yyvsp[(1) - (1)].tv_str));
5006 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
5007 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005008 break;
5009
Lev Walkin0c686452017-09-07 22:59:36 -07005010 case 343:
5011#line 2480 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07005012 { (yyval.tv_str) = 0; }
5013 break;
5014
Lev Walkin0c686452017-09-07 22:59:36 -07005015 case 344:
5016#line 2481 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005017 {
5018 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
5019 }
5020 break;
5021
Lev Walkin0c686452017-09-07 22:59:36 -07005022 case 345:
5023#line 2487 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005024 {
5025 checkmem((yyvsp[(1) - (1)].tv_str));
5026 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin866bd7f2006-09-14 10:35:20 +00005027 }
5028 break;
5029
Lev Walkin0c686452017-09-07 22:59:36 -07005030 case 346:
5031#line 2494 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07005032 {
5033 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
5034 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
5035 }
5036 break;
5037
Lev Walkin0c686452017-09-07 22:59:36 -07005038 case 347:
5039#line 2500 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07005040 {
5041 (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
5042 }
5043 break;
5044
Lev Walkin418298d2006-07-13 08:24:20 +00005045
Lev Walkin752e9732017-08-04 02:06:22 -07005046/* Line 1267 of yacc.c. */
Lev Walkin0c686452017-09-07 22:59:36 -07005047#line 5048 "asn1p_y.c"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005048 default: break;
Lev Walkin418298d2006-07-13 08:24:20 +00005049 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005050 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Lev Walkin418298d2006-07-13 08:24:20 +00005051
Lev Walkin0e90aa02013-03-19 16:17:13 -07005052 YYPOPSTACK (yylen);
5053 yylen = 0;
5054 YY_STACK_PRINT (yyss, yyssp);
Lev Walkinf15320b2004-06-03 03:38:44 +00005055
5056 *++yyvsp = yyval;
5057
Lev Walkin752e9732017-08-04 02:06:22 -07005058
Lev Walkin418298d2006-07-13 08:24:20 +00005059 /* Now `shift' the result of the reduction. Determine what state
5060 that goes to, based on the state we popped back to and the rule
5061 number reduced by. */
Lev Walkinf15320b2004-06-03 03:38:44 +00005062
5063 yyn = yyr1[yyn];
5064
Lev Walkin418298d2006-07-13 08:24:20 +00005065 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5066 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00005067 yystate = yytable[yystate];
5068 else
Lev Walkin418298d2006-07-13 08:24:20 +00005069 yystate = yydefgoto[yyn - YYNTOKENS];
Lev Walkinf15320b2004-06-03 03:38:44 +00005070
5071 goto yynewstate;
5072
Lev Walkinf15320b2004-06-03 03:38:44 +00005073
Lev Walkin418298d2006-07-13 08:24:20 +00005074/*------------------------------------.
5075| yyerrlab -- here on detecting error |
5076`------------------------------------*/
5077yyerrlab:
5078 /* If not already recovering from an error, report this error. */
5079 if (!yyerrstatus)
Lev Walkinf15320b2004-06-03 03:38:44 +00005080 {
5081 ++yynerrs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07005082#if ! YYERROR_VERBOSE
5083 yyerror (YY_("syntax error"));
5084#else
5085 {
Lev Walkin752e9732017-08-04 02:06:22 -07005086 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
5087 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
5088 {
5089 YYSIZE_T yyalloc = 2 * yysize;
5090 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5091 yyalloc = YYSTACK_ALLOC_MAXIMUM;
5092 if (yymsg != yymsgbuf)
5093 YYSTACK_FREE (yymsg);
5094 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5095 if (yymsg)
5096 yymsg_alloc = yyalloc;
5097 else
5098 {
5099 yymsg = yymsgbuf;
5100 yymsg_alloc = sizeof yymsgbuf;
5101 }
5102 }
5103
5104 if (0 < yysize && yysize <= yymsg_alloc)
5105 {
5106 (void) yysyntax_error (yymsg, yystate, yychar);
5107 yyerror (yymsg);
5108 }
5109 else
5110 {
5111 yyerror (YY_("syntax error"));
5112 if (yysize != 0)
5113 goto yyexhaustedlab;
5114 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005115 }
5116#endif
5117 }
5118
5119
5120
5121 if (yyerrstatus == 3)
5122 {
Lev Walkin752e9732017-08-04 02:06:22 -07005123 /* If just tried and failed to reuse look-ahead token after an
Lev Walkin0e90aa02013-03-19 16:17:13 -07005124 error, discard it. */
5125
5126 if (yychar <= YYEOF)
5127 {
5128 /* Return failure if at end of input. */
5129 if (yychar == YYEOF)
5130 YYABORT;
Lev Walkinf15320b2004-06-03 03:38:44 +00005131 }
5132 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07005133 {
5134 yydestruct ("Error: discarding",
5135 yytoken, &yylval);
5136 yychar = YYEMPTY;
5137 }
Lev Walkinf15320b2004-06-03 03:38:44 +00005138 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005139
Lev Walkin752e9732017-08-04 02:06:22 -07005140 /* Else will try to reuse look-ahead token after shifting the error
Lev Walkin0e90aa02013-03-19 16:17:13 -07005141 token. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005142 goto yyerrlab1;
Lev Walkinf15320b2004-06-03 03:38:44 +00005143
Lev Walkin418298d2006-07-13 08:24:20 +00005144
Lev Walkin0e90aa02013-03-19 16:17:13 -07005145/*---------------------------------------------------.
5146| yyerrorlab -- error raised explicitly by YYERROR. |
5147`---------------------------------------------------*/
5148yyerrorlab:
5149
5150 /* Pacify compilers like GCC when the user code never invokes
5151 YYERROR and the label yyerrorlab therefore never appears in user
5152 code. */
5153 if (/*CONSTCOND*/ 0)
5154 goto yyerrorlab;
5155
5156 /* Do not reclaim the symbols of the rule which action triggered
5157 this YYERROR. */
5158 YYPOPSTACK (yylen);
5159 yylen = 0;
5160 YY_STACK_PRINT (yyss, yyssp);
5161 yystate = *yyssp;
5162 goto yyerrlab1;
5163
5164
5165/*-------------------------------------------------------------.
5166| yyerrlab1 -- common code for both syntax error and YYERROR. |
5167`-------------------------------------------------------------*/
Lev Walkin418298d2006-07-13 08:24:20 +00005168yyerrlab1:
Lev Walkin418298d2006-07-13 08:24:20 +00005169 yyerrstatus = 3; /* Each real token shifted decrements this. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005170
Lev Walkin418298d2006-07-13 08:24:20 +00005171 for (;;)
Lev Walkina00d6b32006-03-21 03:40:38 +00005172 {
Lev Walkin418298d2006-07-13 08:24:20 +00005173 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07005174 if (yyn != YYPACT_NINF)
Lev Walkin418298d2006-07-13 08:24:20 +00005175 {
5176 yyn += YYTERROR;
5177 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5178 {
5179 yyn = yytable[yyn];
5180 if (0 < yyn)
5181 break;
5182 }
5183 }
5184
5185 /* Pop the current state because it cannot handle the error token. */
5186 if (yyssp == yyss)
5187 YYABORT;
5188
Lev Walkin418298d2006-07-13 08:24:20 +00005189
Lev Walkin0e90aa02013-03-19 16:17:13 -07005190 yydestruct ("Error: popping",
5191 yystos[yystate], yyvsp);
5192 YYPOPSTACK (1);
5193 yystate = *yyssp;
5194 YY_STACK_PRINT (yyss, yyssp);
Lev Walkina00d6b32006-03-21 03:40:38 +00005195 }
Lev Walkina00d6b32006-03-21 03:40:38 +00005196
Lev Walkin752e9732017-08-04 02:06:22 -07005197 if (yyn == YYFINAL)
5198 YYACCEPT;
5199
Lev Walkinf15320b2004-06-03 03:38:44 +00005200 *++yyvsp = yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00005201
Lev Walkinf15320b2004-06-03 03:38:44 +00005202
Lev Walkin0e90aa02013-03-19 16:17:13 -07005203 /* Shift the error token. */
5204 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5205
Lev Walkinf15320b2004-06-03 03:38:44 +00005206 yystate = yyn;
5207 goto yynewstate;
5208
Lev Walkina00d6b32006-03-21 03:40:38 +00005209
Lev Walkin418298d2006-07-13 08:24:20 +00005210/*-------------------------------------.
5211| yyacceptlab -- YYACCEPT comes here. |
5212`-------------------------------------*/
5213yyacceptlab:
5214 yyresult = 0;
5215 goto yyreturn;
5216
5217/*-----------------------------------.
5218| yyabortlab -- YYABORT comes here. |
5219`-----------------------------------*/
5220yyabortlab:
5221 yyresult = 1;
5222 goto yyreturn;
5223
Lev Walkin752e9732017-08-04 02:06:22 -07005224#ifndef yyoverflow
Lev Walkin0e90aa02013-03-19 16:17:13 -07005225/*-------------------------------------------------.
5226| yyexhaustedlab -- memory exhaustion comes here. |
5227`-------------------------------------------------*/
5228yyexhaustedlab:
5229 yyerror (YY_("memory exhausted"));
Lev Walkin418298d2006-07-13 08:24:20 +00005230 yyresult = 2;
5231 /* Fall through. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005232#endif
Lev Walkin418298d2006-07-13 08:24:20 +00005233
5234yyreturn:
Lev Walkin752e9732017-08-04 02:06:22 -07005235 if (yychar != YYEOF && yychar != YYEMPTY)
5236 yydestruct ("Cleanup: discarding lookahead",
5237 yytoken, &yylval);
Lev Walkin0e90aa02013-03-19 16:17:13 -07005238 /* Do not reclaim the symbols of the rule which action triggered
5239 this YYABORT or YYACCEPT. */
5240 YYPOPSTACK (yylen);
5241 YY_STACK_PRINT (yyss, yyssp);
5242 while (yyssp != yyss)
5243 {
5244 yydestruct ("Cleanup: popping",
5245 yystos[*yyssp], yyvsp);
5246 YYPOPSTACK (1);
5247 }
Lev Walkin418298d2006-07-13 08:24:20 +00005248#ifndef yyoverflow
5249 if (yyss != yyssa)
5250 YYSTACK_FREE (yyss);
5251#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07005252#if YYERROR_VERBOSE
5253 if (yymsg != yymsgbuf)
5254 YYSTACK_FREE (yymsg);
5255#endif
5256 /* Make sure YYID is used. */
5257 return YYID (yyresult);
Lev Walkinf15320b2004-06-03 03:38:44 +00005258}
Lev Walkin418298d2006-07-13 08:24:20 +00005259
5260
Lev Walkin0c686452017-09-07 22:59:36 -07005261#line 2504 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +00005262
5263
5264
5265/*
5266 * Convert Xstring ('0101'B or '5'H) to the binary vector.
5267 */
5268static asn1p_value_t *
5269_convert_bitstring2binary(char *str, int base) {
5270 asn1p_value_t *val;
5271 int slen;
5272 int memlen;
5273 int baselen;
5274 int bits;
5275 uint8_t *binary_vector;
5276 uint8_t *bv_ptr;
5277 uint8_t cur_val;
5278
5279 assert(str);
5280 assert(str[0] == '\'');
5281
5282 switch(base) {
5283 case 'B':
5284 baselen = 1;
5285 break;
5286 case 'H':
5287 baselen = 4;
5288 break;
5289 default:
5290 assert(base == 'B' || base == 'H');
5291 errno = EINVAL;
5292 return NULL;
5293 }
5294
5295 slen = strlen(str);
5296 assert(str[slen - 1] == base);
5297 assert(str[slen - 2] == '\'');
5298
5299 memlen = slen / (8 / baselen); /* Conservative estimate */
5300
5301 bv_ptr = binary_vector = malloc(memlen + 1);
5302 if(bv_ptr == NULL)
5303 /* ENOMEM */
5304 return NULL;
5305
5306 cur_val = 0;
5307 bits = 0;
5308 while(*(++str) != '\'') {
5309 switch(baselen) {
5310 case 1:
5311 switch(*str) {
5312 case '1':
5313 cur_val |= 1 << (7 - (bits % 8));
5314 case '0':
5315 break;
5316 default:
5317 assert(!"_y UNREACH1");
5318 case ' ': case '\r': case '\n':
5319 continue;
5320 }
5321 break;
5322 case 4:
5323 switch(*str) {
5324 case '0': case '1': case '2': case '3': case '4':
5325 case '5': case '6': case '7': case '8': case '9':
5326 cur_val |= (*str - '0') << (4 - (bits % 8));
5327 break;
5328 case 'A': case 'B': case 'C':
5329 case 'D': case 'E': case 'F':
5330 cur_val |= ((*str - 'A') + 10)
5331 << (4 - (bits % 8));
5332 break;
5333 default:
5334 assert(!"_y UNREACH2");
5335 case ' ': case '\r': case '\n':
5336 continue;
5337 }
5338 break;
5339 }
5340
5341 bits += baselen;
5342 if((bits % 8) == 0) {
5343 *bv_ptr++ = cur_val;
5344 cur_val = 0;
5345 }
5346 }
5347
5348 *bv_ptr = cur_val;
5349 assert((bv_ptr - binary_vector) <= memlen);
5350
5351 val = asn1p_value_frombits(binary_vector, bits, 0);
5352 if(val == NULL) {
5353 free(binary_vector);
5354 }
5355
5356 return val;
5357}
5358
Lev Walkin2e9bd5c2005-08-13 09:07:11 +00005359/*
5360 * For unnamed types (used in old X.208 compliant modules)
5361 * generate some sort of interim names, to not to force human being to fix
5362 * the specification's compliance to modern ASN.1 standards.
5363 */
5364static void
5365_fixup_anonymous_identifier(asn1p_expr_t *expr) {
5366 char *p;
5367 assert(expr->Identifier == 0);
5368
5369 /*
5370 * Try to figure out the type name
5371 * without going too much into details
5372 */
5373 expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
5374 if(expr->reference && expr->reference->comp_count > 0)
5375 expr->Identifier = expr->reference->components[0].name;
5376
5377 fprintf(stderr,
5378 "WARNING: Line %d: expected lower-case member identifier, "
5379 "found an unnamed %s.\n"
5380 "WARNING: Obsolete X.208 syntax detected, "
5381 "please give the member a name.\n",
5382 yylineno, expr->Identifier ? expr->Identifier : "type");
5383
5384 if(!expr->Identifier)
5385 expr->Identifier = "unnamed";
5386 expr->Identifier = strdup(expr->Identifier);
5387 assert(expr->Identifier);
5388 /* Make a lowercase identifier from the type name */
5389 for(p = expr->Identifier; *p; p++) {
5390 switch(*p) {
5391 case 'A' ... 'Z': *p += 32; break;
5392 case ' ': *p = '_'; break;
5393 case '-': *p = '_'; break;
5394 }
5395 }
5396 fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
5397 "Name clash may occur later.\n",
5398 expr->Identifier);
5399}
5400
Lev Walkinf15320b2004-06-03 03:38:44 +00005401int
5402yyerror(const char *msg) {
Lev Walkin9d542d22006-03-14 16:31:37 +00005403 extern char *asn1p_text;
Lev Walkinf15320b2004-06-03 03:38:44 +00005404 fprintf(stderr,
5405 "ASN.1 grammar parse error "
Lev Walkind523ea42017-09-06 22:15:08 -07005406 "near %s:%d (token \"%s\"): %s\n",
5407 ASN_FILENAME, yylineno, asn1p_text, msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00005408 return -1;
5409}
5410
Lev Walkin752e9732017-08-04 02:06:22 -07005411