blob: 5f71f3f01fd6e07b7d97f57bf17415c4f43ae086 [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,
96 TOK_ABSENT = 277,
97 TOK_ABSTRACT_SYNTAX = 278,
98 TOK_ALL = 279,
99 TOK_ANY = 280,
100 TOK_APPLICATION = 281,
101 TOK_AUTOMATIC = 282,
102 TOK_BEGIN = 283,
103 TOK_BIT = 284,
104 TOK_BMPString = 285,
105 TOK_BOOLEAN = 286,
106 TOK_BY = 287,
107 TOK_CHARACTER = 288,
108 TOK_CHOICE = 289,
109 TOK_CLASS = 290,
110 TOK_COMPONENT = 291,
111 TOK_COMPONENTS = 292,
112 TOK_CONSTRAINED = 293,
113 TOK_CONTAINING = 294,
114 TOK_DEFAULT = 295,
115 TOK_DEFINITIONS = 296,
116 TOK_DEFINED = 297,
117 TOK_EMBEDDED = 298,
118 TOK_ENCODED = 299,
119 TOK_ENCODING_CONTROL = 300,
120 TOK_END = 301,
121 TOK_ENUMERATED = 302,
122 TOK_EXPLICIT = 303,
123 TOK_EXPORTS = 304,
124 TOK_EXTENSIBILITY = 305,
125 TOK_EXTERNAL = 306,
126 TOK_FALSE = 307,
127 TOK_FROM = 308,
128 TOK_GeneralizedTime = 309,
129 TOK_GeneralString = 310,
130 TOK_GraphicString = 311,
131 TOK_IA5String = 312,
132 TOK_IDENTIFIER = 313,
133 TOK_IMPLICIT = 314,
134 TOK_IMPLIED = 315,
135 TOK_IMPORTS = 316,
136 TOK_INCLUDES = 317,
137 TOK_INSTANCE = 318,
138 TOK_INSTRUCTIONS = 319,
139 TOK_INTEGER = 320,
140 TOK_ISO646String = 321,
141 TOK_MAX = 322,
142 TOK_MIN = 323,
143 TOK_MINUS_INFINITY = 324,
144 TOK_NULL = 325,
145 TOK_NumericString = 326,
146 TOK_OBJECT = 327,
147 TOK_ObjectDescriptor = 328,
148 TOK_OCTET = 329,
149 TOK_OF = 330,
150 TOK_OPTIONAL = 331,
151 TOK_PATTERN = 332,
152 TOK_PDV = 333,
153 TOK_PLUS_INFINITY = 334,
154 TOK_PRESENT = 335,
155 TOK_PrintableString = 336,
156 TOK_PRIVATE = 337,
157 TOK_REAL = 338,
158 TOK_RELATIVE_OID = 339,
159 TOK_SEQUENCE = 340,
160 TOK_SET = 341,
161 TOK_SIZE = 342,
162 TOK_STRING = 343,
163 TOK_SYNTAX = 344,
164 TOK_T61String = 345,
165 TOK_TAGS = 346,
166 TOK_TeletexString = 347,
167 TOK_TRUE = 348,
168 TOK_TYPE_IDENTIFIER = 349,
169 TOK_UNIQUE = 350,
170 TOK_UNIVERSAL = 351,
171 TOK_UniversalString = 352,
172 TOK_UTCTime = 353,
173 TOK_UTF8String = 354,
174 TOK_VideotexString = 355,
175 TOK_VisibleString = 356,
176 TOK_WITH = 357,
Lev Walkin752e9732017-08-04 02:06:22 -0700177 UTF8_BOM = 358,
178 TOK_EXCEPT = 359,
179 TOK_INTERSECTION = 360,
180 TOK_UNION = 361,
181 TOK_TwoDots = 362,
182 TOK_ThreeDots = 363
Lev Walkin418298d2006-07-13 08:24:20 +0000183 };
184#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700185/* Tokens. */
Lev Walkin418298d2006-07-13 08:24:20 +0000186#define TOK_PPEQ 258
Lev Walkin0e90aa02013-03-19 16:17:13 -0700187#define TOK_VBracketLeft 259
188#define TOK_VBracketRight 260
189#define TOK_whitespace 261
190#define TOK_opaque 262
191#define TOK_bstring 263
192#define TOK_cstring 264
193#define TOK_hstring 265
194#define TOK_identifier 266
195#define TOK_number 267
196#define TOK_number_negative 268
197#define TOK_realnumber 269
198#define TOK_tuple 270
199#define TOK_quadruple 271
200#define TOK_typereference 272
201#define TOK_capitalreference 273
202#define TOK_typefieldreference 274
203#define TOK_valuefieldreference 275
204#define TOK_Literal 276
205#define TOK_ABSENT 277
206#define TOK_ABSTRACT_SYNTAX 278
207#define TOK_ALL 279
208#define TOK_ANY 280
209#define TOK_APPLICATION 281
210#define TOK_AUTOMATIC 282
211#define TOK_BEGIN 283
212#define TOK_BIT 284
213#define TOK_BMPString 285
214#define TOK_BOOLEAN 286
215#define TOK_BY 287
216#define TOK_CHARACTER 288
217#define TOK_CHOICE 289
218#define TOK_CLASS 290
219#define TOK_COMPONENT 291
220#define TOK_COMPONENTS 292
221#define TOK_CONSTRAINED 293
222#define TOK_CONTAINING 294
223#define TOK_DEFAULT 295
224#define TOK_DEFINITIONS 296
225#define TOK_DEFINED 297
226#define TOK_EMBEDDED 298
227#define TOK_ENCODED 299
228#define TOK_ENCODING_CONTROL 300
229#define TOK_END 301
230#define TOK_ENUMERATED 302
231#define TOK_EXPLICIT 303
232#define TOK_EXPORTS 304
233#define TOK_EXTENSIBILITY 305
234#define TOK_EXTERNAL 306
235#define TOK_FALSE 307
236#define TOK_FROM 308
237#define TOK_GeneralizedTime 309
238#define TOK_GeneralString 310
239#define TOK_GraphicString 311
240#define TOK_IA5String 312
241#define TOK_IDENTIFIER 313
242#define TOK_IMPLICIT 314
243#define TOK_IMPLIED 315
244#define TOK_IMPORTS 316
245#define TOK_INCLUDES 317
246#define TOK_INSTANCE 318
247#define TOK_INSTRUCTIONS 319
248#define TOK_INTEGER 320
249#define TOK_ISO646String 321
250#define TOK_MAX 322
251#define TOK_MIN 323
252#define TOK_MINUS_INFINITY 324
253#define TOK_NULL 325
254#define TOK_NumericString 326
255#define TOK_OBJECT 327
256#define TOK_ObjectDescriptor 328
257#define TOK_OCTET 329
258#define TOK_OF 330
259#define TOK_OPTIONAL 331
260#define TOK_PATTERN 332
261#define TOK_PDV 333
262#define TOK_PLUS_INFINITY 334
263#define TOK_PRESENT 335
264#define TOK_PrintableString 336
265#define TOK_PRIVATE 337
266#define TOK_REAL 338
267#define TOK_RELATIVE_OID 339
268#define TOK_SEQUENCE 340
269#define TOK_SET 341
270#define TOK_SIZE 342
271#define TOK_STRING 343
272#define TOK_SYNTAX 344
273#define TOK_T61String 345
274#define TOK_TAGS 346
275#define TOK_TeletexString 347
276#define TOK_TRUE 348
277#define TOK_TYPE_IDENTIFIER 349
278#define TOK_UNIQUE 350
279#define TOK_UNIVERSAL 351
280#define TOK_UniversalString 352
281#define TOK_UTCTime 353
282#define TOK_UTF8String 354
283#define TOK_VideotexString 355
284#define TOK_VisibleString 356
285#define TOK_WITH 357
Lev Walkin752e9732017-08-04 02:06:22 -0700286#define UTF8_BOM 358
287#define TOK_EXCEPT 359
288#define TOK_INTERSECTION 360
289#define TOK_UNION 361
290#define TOK_TwoDots 362
291#define TOK_ThreeDots 363
Lev Walkin418298d2006-07-13 08:24:20 +0000292
293
294
Lev Walkin752e9732017-08-04 02:06:22 -0700295
296/* Copy the first part of user declarations. */
297#line 1 "asn1p_y.y"
298
299
300#include <stdlib.h>
301#include <stdio.h>
302#include <string.h>
303#include <errno.h>
304#include <assert.h>
305
306#include "asn1parser.h"
307
308#define YYPARSE_PARAM param
309#define YYPARSE_PARAM_TYPE void **
310#define YYERROR_VERBOSE
311
312int yylex(void);
313int yyerror(const char *msg);
314#ifdef YYBYACC
315int yyparse(void **param); /* byacc does not produce a prototype */
316#endif
317void asn1p_lexer_hack_push_opaque_state(void);
318void asn1p_lexer_hack_enable_with_syntax(void);
319void asn1p_lexer_hack_push_encoding_control(void);
320#define yylineno asn1p_lineno
321extern int asn1p_lineno;
Lev Walkind523ea42017-09-06 22:15:08 -0700322const char *asn1p_parse_debug_filename;
323#define ASN_FILENAME asn1p_parse_debug_filename
Lev Walkin752e9732017-08-04 02:06:22 -0700324
325/*
326 * Process directives as <ASN1C:RepresentAsPointer>
327 */
328extern int asn1p_as_pointer;
329
330/*
331 * This temporary variable is used to solve the shortcomings of 1-lookahead
332 * parser.
333 */
334static struct AssignedIdentifier *saved_aid;
335
336static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
337static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
338
339static asn1p_module_t *currentModule;
340#define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule))
341
342#define checkmem(ptr) do { \
343 if(!(ptr)) \
344 return yyerror("Memory failure"); \
345 } while(0)
346
347#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
348 if(arg1->type != constr_type) { \
349 int __ret; \
350 root = asn1p_constraint_new(yylineno, currentModule); \
351 checkmem(root); \
352 root->type = constr_type; \
353 __ret = asn1p_constraint_insert(root, \
354 arg1); \
355 checkmem(__ret == 0); \
356 } else { \
357 root = arg1; \
358 } \
359 if(arg2) { \
360 int __ret \
361 = asn1p_constraint_insert(root, arg2); \
362 checkmem(__ret == 0); \
363 } \
364 } while(0)
365
366#ifdef AL_IMPORT
367#error AL_IMPORT DEFINED ELSEWHERE!
368#endif
369#define AL_IMPORT(to,where,from,field) do { \
370 if(!(from)) break; \
371 while(TQ_FIRST(&((from)->where))) { \
372 TQ_ADD(&((to)->where), \
373 TQ_REMOVE(&((from)->where), field), \
374 field); \
375 } \
376 assert(TQ_FIRST(&((from)->where)) == 0); \
377 } while(0)
378
379
380
381/* Enabling traces. */
382#ifndef YYDEBUG
383# define YYDEBUG 0
384#endif
385
386/* Enabling verbose error messages. */
387#ifdef YYERROR_VERBOSE
388# undef YYERROR_VERBOSE
389# define YYERROR_VERBOSE 1
390#else
391# define YYERROR_VERBOSE 0
392#endif
393
394/* Enabling the token table. */
395#ifndef YYTOKEN_TABLE
396# define YYTOKEN_TABLE 0
397#endif
398
Lev Walkin0e90aa02013-03-19 16:17:13 -0700399#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
400typedef union YYSTYPE
Lev Walkind523ea42017-09-06 22:15:08 -0700401#line 90 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -0700402{
Lev Walkinf15320b2004-06-03 03:38:44 +0000403 asn1p_t *a_grammar;
404 asn1p_module_flags_e a_module_flags;
405 asn1p_module_t *a_module;
406 asn1p_expr_type_e a_type; /* ASN.1 Type */
407 asn1p_expr_t *a_expr; /* Constructed collection */
408 asn1p_constraint_t *a_constr; /* Constraint */
409 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
410 asn1p_xports_t *a_xports; /* IMports/EXports */
Lev Walkinb36317c2005-08-12 10:09:10 +0000411 struct AssignedIdentifier a_aid; /* Assigned Identifier */
Lev Walkinf15320b2004-06-03 03:38:44 +0000412 asn1p_oid_t *a_oid; /* Object Identifier */
413 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
414 struct asn1p_type_tag_s a_tag; /* A tag */
415 asn1p_ref_t *a_ref; /* Reference to custom type */
416 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
417 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
418 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
419 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
420 struct asn1p_param_s a_parg; /* A parameter argument */
421 asn1p_paramlist_t *a_plist; /* A pargs list */
Lev Walkin9c974182004-09-15 11:59:51 +0000422 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
Lev Walkinf15320b2004-06-03 03:38:44 +0000423 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
Lev Walkind21c5052004-09-29 13:18:09 +0000424 asn1c_integer_t a_int;
Lev Walkinadf863f2006-09-05 16:18:34 +0000425 double a_dbl;
Lev Walkinf15320b2004-06-03 03:38:44 +0000426 char *tv_str;
427 struct {
428 char *buf;
429 int len;
430 } tv_opaque;
431 struct {
432 char *name;
433 struct asn1p_type_tag_s tag;
434 } tv_nametag;
Lev Walkin752e9732017-08-04 02:06:22 -0700435}
436/* Line 193 of yacc.c. */
Lev Walkind523ea42017-09-06 22:15:08 -0700437#line 438 "asn1p_y.c"
Lev Walkin752e9732017-08-04 02:06:22 -0700438 YYSTYPE;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700439# define yystype YYSTYPE /* obsolescent; will be withdrawn */
440# define YYSTYPE_IS_DECLARED 1
Lev Walkin752e9732017-08-04 02:06:22 -0700441# define YYSTYPE_IS_TRIVIAL 1
Lev Walkinf15320b2004-06-03 03:38:44 +0000442#endif
443
Lev Walkin0e90aa02013-03-19 16:17:13 -0700444
Lev Walkin418298d2006-07-13 08:24:20 +0000445
446/* Copy the second part of user declarations. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000447
Lev Walkin752e9732017-08-04 02:06:22 -0700448
449/* Line 216 of yacc.c. */
Lev Walkind523ea42017-09-06 22:15:08 -0700450#line 451 "asn1p_y.c"
Lev Walkinf15320b2004-06-03 03:38:44 +0000451
Lev Walkin0e90aa02013-03-19 16:17:13 -0700452#ifdef short
453# undef short
454#endif
455
456#ifdef YYTYPE_UINT8
457typedef YYTYPE_UINT8 yytype_uint8;
458#else
459typedef unsigned char yytype_uint8;
460#endif
461
462#ifdef YYTYPE_INT8
463typedef YYTYPE_INT8 yytype_int8;
464#elif (defined __STDC__ || defined __C99__FUNC__ \
465 || defined __cplusplus || defined _MSC_VER)
466typedef signed char yytype_int8;
467#else
468typedef short int yytype_int8;
469#endif
470
471#ifdef YYTYPE_UINT16
472typedef YYTYPE_UINT16 yytype_uint16;
473#else
474typedef unsigned short int yytype_uint16;
475#endif
476
477#ifdef YYTYPE_INT16
478typedef YYTYPE_INT16 yytype_int16;
479#else
480typedef short int yytype_int16;
481#endif
482
483#ifndef YYSIZE_T
484# ifdef __SIZE_TYPE__
485# define YYSIZE_T __SIZE_TYPE__
486# elif defined size_t
487# define YYSIZE_T size_t
488# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
489 || defined __cplusplus || defined _MSC_VER)
490# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
491# define YYSIZE_T size_t
492# else
493# define YYSIZE_T unsigned int
494# endif
495#endif
496
497#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
498
499#ifndef YY_
500# if defined YYENABLE_NLS && YYENABLE_NLS
501# if ENABLE_NLS
502# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700503# define YY_(msgid) dgettext ("bison-runtime", msgid)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700504# endif
505# endif
506# ifndef YY_
Lev Walkin752e9732017-08-04 02:06:22 -0700507# define YY_(msgid) msgid
Lev Walkin0e90aa02013-03-19 16:17:13 -0700508# endif
509#endif
510
511/* Suppress unused-variable warnings by "using" E. */
512#if ! defined lint || defined __GNUC__
Lev Walkin752e9732017-08-04 02:06:22 -0700513# define YYUSE(e) ((void) (e))
Lev Walkin0e90aa02013-03-19 16:17:13 -0700514#else
Lev Walkin752e9732017-08-04 02:06:22 -0700515# define YYUSE(e) /* empty */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700516#endif
517
518/* Identity function, used to suppress warnings about constant conditions. */
519#ifndef lint
Lev Walkin752e9732017-08-04 02:06:22 -0700520# define YYID(n) (n)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700521#else
522#if (defined __STDC__ || defined __C99__FUNC__ \
523 || defined __cplusplus || defined _MSC_VER)
524static int
Lev Walkin752e9732017-08-04 02:06:22 -0700525YYID (int i)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700526#else
527static int
Lev Walkin752e9732017-08-04 02:06:22 -0700528YYID (i)
529 int i;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700530#endif
531{
Lev Walkin752e9732017-08-04 02:06:22 -0700532 return i;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700533}
534#endif
535
536#if ! defined yyoverflow || YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +0000537
Lev Walkin418298d2006-07-13 08:24:20 +0000538/* The parser invokes alloca or malloc; define the necessary symbols. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000539
Lev Walkin0e90aa02013-03-19 16:17:13 -0700540# ifdef YYSTACK_USE_ALLOCA
541# if YYSTACK_USE_ALLOCA
542# ifdef __GNUC__
543# define YYSTACK_ALLOC __builtin_alloca
544# elif defined __BUILTIN_VA_ARG_INCR
545# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
546# elif defined _AIX
547# define YYSTACK_ALLOC __alloca
548# elif defined _MSC_VER
549# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
550# define alloca _alloca
Lev Walkin418298d2006-07-13 08:24:20 +0000551# else
Lev Walkin0e90aa02013-03-19 16:17:13 -0700552# define YYSTACK_ALLOC alloca
Lev Walkin752e9732017-08-04 02:06:22 -0700553# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700554 || defined __cplusplus || defined _MSC_VER)
555# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700556# ifndef _STDLIB_H
557# define _STDLIB_H 1
Lev Walkin0e90aa02013-03-19 16:17:13 -0700558# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000559# endif
560# endif
561# endif
562# endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000563
Lev Walkin418298d2006-07-13 08:24:20 +0000564# ifdef YYSTACK_ALLOC
Lev Walkin0e90aa02013-03-19 16:17:13 -0700565 /* Pacify GCC's `empty if-body' warning. */
566# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
567# ifndef YYSTACK_ALLOC_MAXIMUM
568 /* The OS might guarantee only one guard page at the bottom of the stack,
569 and a page size can be as small as 4096 bytes. So we cannot safely
570 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
571 to allow for a few compiler-allocated temporary stack slots. */
572# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
Lev Walkin418298d2006-07-13 08:24:20 +0000573# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700574# else
575# define YYSTACK_ALLOC YYMALLOC
576# define YYSTACK_FREE YYFREE
577# ifndef YYSTACK_ALLOC_MAXIMUM
578# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
579# endif
Lev Walkin752e9732017-08-04 02:06:22 -0700580# if (defined __cplusplus && ! defined _STDLIB_H \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700581 && ! ((defined YYMALLOC || defined malloc) \
582 && (defined YYFREE || defined free)))
583# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700584# ifndef _STDLIB_H
585# define _STDLIB_H 1
Lev Walkin0e90aa02013-03-19 16:17:13 -0700586# endif
587# endif
588# ifndef YYMALLOC
589# define YYMALLOC malloc
Lev Walkin752e9732017-08-04 02:06:22 -0700590# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700591 || defined __cplusplus || defined _MSC_VER)
592void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
593# endif
594# endif
595# ifndef YYFREE
596# define YYFREE free
Lev Walkin752e9732017-08-04 02:06:22 -0700597# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700598 || defined __cplusplus || defined _MSC_VER)
599void free (void *); /* INFRINGES ON USER NAME SPACE */
600# endif
601# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000602# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700603#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
Lev Walkin418298d2006-07-13 08:24:20 +0000604
605
Lev Walkin0e90aa02013-03-19 16:17:13 -0700606#if (! defined yyoverflow \
607 && (! defined __cplusplus \
608 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Lev Walkin418298d2006-07-13 08:24:20 +0000609
610/* A type that is properly aligned for any stack member. */
611union yyalloc
612{
Lev Walkin752e9732017-08-04 02:06:22 -0700613 yytype_int16 yyss;
614 YYSTYPE yyvs;
615 };
Lev Walkin418298d2006-07-13 08:24:20 +0000616
617/* The size of the maximum gap between one aligned stack and the next. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700618# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
Lev Walkin418298d2006-07-13 08:24:20 +0000619
620/* The size of an array large to enough to hold all stacks, each with
621 N elements. */
622# define YYSTACK_BYTES(N) \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700623 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
624 + YYSTACK_GAP_MAXIMUM)
Lev Walkin418298d2006-07-13 08:24:20 +0000625
Lev Walkin752e9732017-08-04 02:06:22 -0700626/* Copy COUNT objects from FROM to TO. The source and destination do
627 not overlap. */
628# ifndef YYCOPY
629# if defined __GNUC__ && 1 < __GNUC__
630# define YYCOPY(To, From, Count) \
631 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
632# else
633# define YYCOPY(To, From, Count) \
634 do \
635 { \
636 YYSIZE_T yyi; \
637 for (yyi = 0; yyi < (Count); yyi++) \
638 (To)[yyi] = (From)[yyi]; \
639 } \
640 while (YYID (0))
641# endif
642# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000643
644/* Relocate STACK from its old location to the new one. The
645 local variables YYSIZE and YYSTACKSIZE give the old and new number of
646 elements in the stack, and YYPTR gives the new location of the
647 stack. Advance YYPTR to a properly aligned location for the next
648 stack. */
Lev Walkin752e9732017-08-04 02:06:22 -0700649# define YYSTACK_RELOCATE(Stack) \
Lev Walkin418298d2006-07-13 08:24:20 +0000650 do \
651 { \
652 YYSIZE_T yynewbytes; \
Lev Walkin752e9732017-08-04 02:06:22 -0700653 YYCOPY (&yyptr->Stack, Stack, yysize); \
654 Stack = &yyptr->Stack; \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700655 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
Lev Walkin418298d2006-07-13 08:24:20 +0000656 yyptr += yynewbytes / sizeof (*yyptr); \
657 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700658 while (YYID (0))
Lev Walkinf15320b2004-06-03 03:38:44 +0000659
660#endif
661
Lev Walkin0e90aa02013-03-19 16:17:13 -0700662/* YYFINAL -- State number of the termination state. */
Lev Walkin752e9732017-08-04 02:06:22 -0700663#define YYFINAL 9
Lev Walkin0e90aa02013-03-19 16:17:13 -0700664/* YYLAST -- Last index in YYTABLE. */
Lev Walkind523ea42017-09-06 22:15:08 -0700665#define YYLAST 839
Lev Walkin418298d2006-07-13 08:24:20 +0000666
Lev Walkin0e90aa02013-03-19 16:17:13 -0700667/* YYNTOKENS -- Number of terminals. */
Lev Walkin752e9732017-08-04 02:06:22 -0700668#define YYNTOKENS 124
Lev Walkin0e90aa02013-03-19 16:17:13 -0700669/* YYNNTS -- Number of nonterminals. */
Lev Walkind523ea42017-09-06 22:15:08 -0700670#define YYNNTS 131
Lev Walkin0e90aa02013-03-19 16:17:13 -0700671/* YYNRULES -- Number of rules. */
Lev Walkind523ea42017-09-06 22:15:08 -0700672#define YYNRULES 325
Lev Walkin0e90aa02013-03-19 16:17:13 -0700673/* YYNRULES -- Number of states. */
Lev Walkind523ea42017-09-06 22:15:08 -0700674#define YYNSTATES 489
Lev Walkin418298d2006-07-13 08:24:20 +0000675
676/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
677#define YYUNDEFTOK 2
Lev Walkin752e9732017-08-04 02:06:22 -0700678#define YYMAXUTOK 363
Lev Walkin418298d2006-07-13 08:24:20 +0000679
Lev Walkin0e90aa02013-03-19 16:17:13 -0700680#define YYTRANSLATE(YYX) \
681 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Lev Walkin418298d2006-07-13 08:24:20 +0000682
683/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700684static const yytype_uint8 yytranslate[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000685{
686 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
687 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
688 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin752e9732017-08-04 02:06:22 -0700689 2, 2, 2, 120, 2, 2, 2, 2, 2, 2,
690 113, 114, 2, 2, 116, 2, 121, 2, 2, 2,
691 2, 2, 2, 2, 2, 2, 2, 2, 117, 115,
692 122, 2, 2, 2, 123, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000693 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
694 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin752e9732017-08-04 02:06:22 -0700695 2, 118, 2, 119, 105, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000696 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
697 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin752e9732017-08-04 02:06:22 -0700698 2, 2, 2, 111, 107, 112, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000699 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
700 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
701 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
702 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
703 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
704 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
705 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
706 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
707 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
708 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
709 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
710 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
711 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
712 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
713 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
714 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
715 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
716 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
717 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
718 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
719 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
720 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Lev Walkin752e9732017-08-04 02:06:22 -0700721 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
722 106, 108, 109, 110
Lev Walkin418298d2006-07-13 08:24:20 +0000723};
724
725#if YYDEBUG
726/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
727 YYRHS. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700728static const yytype_uint16 yyprhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000729{
Lev Walkin752e9732017-08-04 02:06:22 -0700730 0, 0, 3, 6, 8, 10, 13, 14, 24, 25,
731 27, 31, 34, 36, 39, 41, 46, 48, 49, 51,
732 53, 56, 59, 62, 65, 68, 71, 72, 74, 78,
733 80, 83, 85, 87, 89, 90, 94, 96, 97, 99,
734 103, 106, 107, 109, 111, 114, 115, 117, 122, 124,
735 128, 130, 134, 136, 137, 139, 143, 147, 150, 152,
736 156, 158, 162, 164, 168, 173, 175, 177, 182, 186,
737 190, 197, 204, 206, 210, 212, 216, 220, 224, 228,
738 230, 234, 236, 238, 240, 242, 243, 245, 247, 251,
739 257, 261, 264, 268, 270, 272, 276, 279, 281, 283,
740 289, 290, 292, 294, 298, 301, 306, 310, 314, 318,
741 322, 326, 327, 329, 330, 337, 339, 342, 344, 346,
742 348, 352, 354, 358, 362, 366, 367, 370, 372, 377,
743 382, 387, 394, 401, 403, 408, 412, 414, 418, 422,
744 426, 428, 432, 434, 438, 440, 442, 444, 446, 450,
745 454, 456, 461, 463, 465, 469, 470, 474, 476, 478,
746 480, 482, 484, 486, 488, 490, 494, 496, 498, 500,
747 502, 505, 507, 509, 511, 513, 516, 519, 521, 523,
748 526, 529, 531, 533, 535, 537, 539, 542, 544, 547,
749 549, 551, 553, 555, 557, 559, 561, 563, 565, 567,
750 569, 571, 573, 575, 577, 579, 581, 583, 584, 586,
Lev Walkind523ea42017-09-06 22:15:08 -0700751 587, 589, 594, 596, 600, 605, 607, 609, 611, 613,
752 615, 619, 625, 627, 631, 633, 637, 639, 643, 645,
753 649, 654, 658, 660, 662, 666, 670, 674, 678, 680,
754 682, 683, 687, 690, 693, 695, 697, 699, 701, 703,
755 705, 707, 709, 711, 713, 715, 719, 723, 725, 727,
756 729, 733, 739, 741, 745, 749, 750, 752, 754, 756,
757 758, 760, 762, 764, 765, 771, 774, 776, 779, 782,
758 786, 788, 790, 794, 799, 801, 805, 808, 812, 814,
759 818, 819, 821, 823, 826, 829, 833, 835, 839, 841,
760 846, 851, 853, 855, 857, 859, 861, 863, 864, 866,
761 869, 874, 875, 877, 879, 881, 882, 884, 886, 888,
762 890, 892, 893, 895, 897, 899
Lev Walkin418298d2006-07-13 08:24:20 +0000763};
764
Lev Walkin0e90aa02013-03-19 16:17:13 -0700765/* YYRHS -- A `-1'-separated list of the rules' RHS. */
766static const yytype_int16 yyrhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000767{
Lev Walkin752e9732017-08-04 02:06:22 -0700768 125, 0, -1, 103, 126, -1, 126, -1, 127, -1,
Lev Walkind523ea42017-09-06 22:15:08 -0700769 126, 127, -1, -1, 249, 128, 129, 41, 133, 3,
Lev Walkin752e9732017-08-04 02:06:22 -0700770 28, 136, 46, -1, -1, 130, -1, 111, 131, 112,
Lev Walkind523ea42017-09-06 22:15:08 -0700771 -1, 111, 112, -1, 132, -1, 131, 132, -1, 252,
772 -1, 252, 113, 12, 114, -1, 12, -1, -1, 134,
Lev Walkin752e9732017-08-04 02:06:22 -0700773 -1, 135, -1, 134, 135, -1, 48, 91, -1, 59,
774 91, -1, 27, 91, -1, 50, 60, -1, 18, 64,
775 -1, -1, 137, -1, 149, 141, 138, -1, 139, -1,
776 138, 139, -1, 156, -1, 186, -1, 154, -1, -1,
777 45, 18, 140, -1, 196, -1, -1, 142, -1, 61,
778 143, 115, -1, 61, 53, -1, -1, 144, -1, 146,
Lev Walkind523ea42017-09-06 22:15:08 -0700779 -1, 144, 146, -1, -1, 130, -1, 147, 53, 249,
780 145, -1, 148, -1, 147, 116, 148, -1, 249, -1,
781 249, 111, 112, -1, 252, -1, -1, 150, -1, 49,
Lev Walkin752e9732017-08-04 02:06:22 -0700782 151, 115, -1, 49, 24, 115, -1, 49, 115, -1,
Lev Walkind523ea42017-09-06 22:15:08 -0700783 152, -1, 151, 116, 152, -1, 249, -1, 249, 111,
784 112, -1, 252, -1, 111, 205, 112, -1, 249, 155,
Lev Walkin752e9732017-08-04 02:06:22 -0700785 3, 153, -1, 195, -1, 180, -1, 180, 111, 159,
Lev Walkind523ea42017-09-06 22:15:08 -0700786 112, -1, 249, 3, 176, -1, 249, 3, 166, -1,
787 249, 111, 157, 112, 3, 176, -1, 249, 111, 157,
Lev Walkin752e9732017-08-04 02:06:22 -0700788 112, 3, 166, -1, 158, -1, 157, 116, 158, -1,
Lev Walkind523ea42017-09-06 22:15:08 -0700789 249, -1, 249, 117, 252, -1, 249, 117, 249, -1,
790 193, 117, 252, -1, 193, 117, 249, -1, 160, -1,
791 159, 116, 160, -1, 176, -1, 189, -1, 252, -1,
Lev Walkin752e9732017-08-04 02:06:22 -0700792 153, -1, -1, 162, -1, 163, -1, 162, 116, 163,
Lev Walkind523ea42017-09-06 22:15:08 -0700793 -1, 162, 116, 4, 162, 5, -1, 252, 176, 237,
794 -1, 176, 237, -1, 37, 75, 176, -1, 175, -1,
795 165, -1, 164, 116, 165, -1, 252, 176, -1, 175,
Lev Walkin752e9732017-08-04 02:06:22 -0700796 -1, 176, -1, 35, 111, 168, 112, 170, -1, -1,
Lev Walkind523ea42017-09-06 22:15:08 -0700797 95, -1, 169, -1, 168, 116, 169, -1, 19, 237,
798 -1, 20, 176, 167, 237, -1, 20, 184, 237, -1,
799 20, 185, 237, -1, 19, 184, 237, -1, 19, 176,
800 237, -1, 19, 185, 237, -1, -1, 171, -1, -1,
Lev Walkin752e9732017-08-04 02:06:22 -0700801 102, 89, 111, 172, 173, 112, -1, 174, -1, 173,
802 174, -1, 6, -1, 21, -1, 183, -1, 118, 173,
803 119, -1, 110, -1, 110, 120, 190, -1, 110, 120,
Lev Walkind523ea42017-09-06 22:15:08 -0700804 242, -1, 244, 178, 199, -1, -1, 177, 179, -1,
Lev Walkin752e9732017-08-04 02:06:22 -0700805 155, -1, 34, 111, 164, 112, -1, 85, 111, 161,
Lev Walkind523ea42017-09-06 22:15:08 -0700806 112, -1, 86, 111, 161, 112, -1, 85, 200, 75,
807 251, 244, 178, -1, 86, 200, 75, 251, 244, 178,
808 -1, 25, -1, 25, 42, 32, 252, -1, 63, 75,
809 180, -1, 17, -1, 17, 121, 249, -1, 250, 121,
810 249, -1, 17, 121, 252, -1, 250, -1, 250, 121,
Lev Walkin752e9732017-08-04 02:06:22 -0700811 181, -1, 182, -1, 181, 121, 182, -1, 183, -1,
812 19, -1, 20, -1, 19, -1, 184, 121, 19, -1,
Lev Walkind523ea42017-09-06 22:15:08 -0700813 184, 121, 20, -1, 18, -1, 252, 176, 3, 187,
814 -1, 189, -1, 190, -1, 252, 117, 187, -1, -1,
Lev Walkin752e9732017-08-04 02:06:22 -0700815 111, 188, 192, -1, 70, -1, 52, -1, 93, -1,
Lev Walkind523ea42017-09-06 22:15:08 -0700816 8, -1, 10, -1, 191, -1, 242, -1, 252, -1,
817 249, 121, 252, -1, 9, -1, 15, -1, 16, -1,
Lev Walkin752e9732017-08-04 02:06:22 -0700818 7, -1, 192, 7, -1, 31, -1, 70, -1, 83,
819 -1, 194, -1, 74, 88, -1, 72, 58, -1, 84,
820 -1, 51, -1, 43, 78, -1, 33, 88, -1, 98,
821 -1, 54, -1, 196, -1, 65, -1, 47, -1, 29,
Lev Walkind523ea42017-09-06 22:15:08 -0700822 88, -1, 193, -1, 194, 239, -1, 30, -1, 55,
Lev Walkin752e9732017-08-04 02:06:22 -0700823 -1, 56, -1, 57, -1, 66, -1, 71, -1, 81,
824 -1, 90, -1, 92, -1, 97, -1, 99, -1, 100,
825 -1, 101, -1, 73, -1, 107, -1, 108, -1, 105,
Lev Walkind523ea42017-09-06 22:15:08 -0700826 -1, 106, -1, -1, 201, -1, -1, 201, -1, 87,
827 113, 203, 114, -1, 202, -1, 113, 203, 114, -1,
828 202, 113, 203, 114, -1, 204, -1, 226, -1, 205,
829 -1, 110, -1, 206, -1, 206, 116, 110, -1, 206,
830 116, 110, 116, 206, -1, 207, -1, 24, 104, 210,
831 -1, 208, -1, 207, 197, 208, -1, 209, -1, 208,
832 198, 209, -1, 210, -1, 210, 104, 210, -1, 213,
833 113, 205, 114, -1, 113, 205, 114, -1, 214, -1,
834 216, -1, 214, 230, 214, -1, 68, 230, 214, -1,
835 214, 230, 67, -1, 68, 230, 67, -1, 217, -1,
836 212, -1, -1, 111, 211, 192, -1, 77, 9, -1,
837 77, 252, -1, 87, -1, 53, -1, 52, -1, 93,
838 -1, 243, -1, 191, -1, 215, -1, 252, -1, 8,
839 -1, 10, -1, 176, -1, 102, 36, 218, -1, 102,
840 37, 219, -1, 201, -1, 220, -1, 221, -1, 111,
841 222, 112, -1, 111, 110, 116, 222, 112, -1, 223,
842 -1, 222, 116, 223, -1, 254, 199, 224, -1, -1,
843 225, -1, 80, -1, 22, -1, 76, -1, 227, -1,
844 231, -1, 229, -1, -1, 38, 32, 111, 228, 192,
845 -1, 39, 176, -1, 109, -1, 109, 122, -1, 122,
846 109, -1, 122, 109, 122, -1, 232, -1, 233, -1,
847 111, 249, 112, -1, 232, 111, 234, 112, -1, 235,
848 -1, 234, 116, 235, -1, 123, 236, -1, 123, 121,
849 236, -1, 252, -1, 236, 121, 252, -1, -1, 238,
850 -1, 76, -1, 40, 187, -1, 111, 112, -1, 111,
851 240, 112, -1, 241, -1, 240, 116, 241, -1, 252,
852 -1, 252, 113, 242, 114, -1, 252, 113, 190, 114,
853 -1, 242, -1, 110, -1, 12, -1, 13, -1, 242,
854 -1, 14, -1, -1, 245, -1, 246, 248, -1, 118,
855 247, 12, 119, -1, -1, 96, -1, 26, -1, 82,
856 -1, -1, 59, -1, 48, -1, 17, -1, 18, -1,
857 18, -1, -1, 252, -1, 11, -1, 252, -1, 253,
858 -1
Lev Walkin418298d2006-07-13 08:24:20 +0000859};
860
861/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700862static const yytype_uint16 yyrline[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000863{
Lev Walkind523ea42017-09-06 22:15:08 -0700864 0, 367, 367, 370, 376, 381, 398, 398, 427, 428,
865 432, 435, 441, 447, 456, 460, 464, 474, 475, 484,
866 487, 496, 499, 502, 505, 509, 530, 531, 540, 553,
867 556, 573, 580, 594, 602, 601, 615, 628, 629, 632,
868 642, 648, 649, 652, 657, 664, 665, 669, 680, 685,
869 692, 698, 704, 714, 715, 727, 730, 733, 741, 746,
870 753, 759, 765, 774, 777, 787, 800, 810, 830, 836,
871 852, 858, 866, 875, 886, 890, 898, 906, 914, 925,
872 930, 937, 940, 948, 959, 982, 983, 986, 991, 995,
873 1003, 1010, 1016, 1023, 1029, 1034, 1041, 1046, 1049, 1056,
874 1066, 1067, 1071, 1078, 1088, 1098, 1109, 1119, 1130, 1140,
875 1151, 1163, 1164, 1171, 1170, 1179, 1183, 1190, 1194, 1197,
876 1201, 1207, 1215, 1224, 1236, 1260, 1267, 1286, 1289, 1295,
877 1301, 1307, 1317, 1327, 1333, 1345, 1360, 1368, 1379, 1390,
878 1401, 1409, 1431, 1439, 1448, 1452, 1457, 1466, 1471, 1476,
879 1484, 1507, 1517, 1518, 1519, 1526, 1526, 1531, 1539, 1544,
880 1549, 1554, 1559, 1562, 1568, 1579, 1597, 1601, 1606, 1614,
881 1623, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646,
882 1647, 1648, 1649, 1650, 1657, 1658, 1659, 1663, 1669, 1682,
883 1683, 1687, 1691, 1692, 1693, 1694, 1695, 1699, 1700, 1701,
884 1702, 1706, 1707, 1714, 1714, 1715, 1715, 1719, 1720, 1724,
885 1725, 1726, 1732, 1738, 1741, 1746, 1746, 1748, 1751, 1755,
886 1756, 1762, 1773, 1774, 1780, 1781, 1787, 1788, 1795, 1796,
887 1802, 1810, 1818, 1824, 1830, 1837, 1845, 1853, 1862, 1863,
888 1864, 1864, 1874, 1879, 1891, 1894, 1900, 1905, 1910, 1911,
889 1912, 1913, 1927, 1932, 1940, 1951, 1954, 1960, 1961, 1961,
890 1962, 1964, 1977, 1982, 1988, 2002, 2003, 2007, 2010, 2013,
891 2021, 2022, 2023, 2028, 2027, 2039, 2048, 2049, 2050, 2051,
892 2054, 2057, 2066, 2082, 2088, 2094, 2108, 2119, 2135, 2138,
893 2158, 2162, 2166, 2170, 2193, 2197, 2203, 2208, 2215, 2222,
894 2230, 2238, 2245, 2256, 2260, 2267, 2268, 2299, 2300, 2304,
895 2311, 2317, 2318, 2319, 2320, 2324, 2325, 2326, 2330, 2334,
896 2342, 2349, 2350, 2356, 2363, 2369
Lev Walkin418298d2006-07-13 08:24:20 +0000897};
898#endif
899
Lev Walkin752e9732017-08-04 02:06:22 -0700900#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
Lev Walkin0e90aa02013-03-19 16:17:13 -0700901/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
902 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
Lev Walkin418298d2006-07-13 08:24:20 +0000903static const char *const yytname[] =
904{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700905 "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft",
906 "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring",
907 "TOK_cstring", "TOK_hstring", "TOK_identifier", "TOK_number",
908 "TOK_number_negative", "TOK_realnumber", "TOK_tuple", "TOK_quadruple",
909 "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference",
910 "TOK_valuefieldreference", "TOK_Literal", "TOK_ABSENT",
911 "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY", "TOK_APPLICATION",
912 "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT", "TOK_BMPString", "TOK_BOOLEAN",
913 "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE", "TOK_CLASS", "TOK_COMPONENT",
914 "TOK_COMPONENTS", "TOK_CONSTRAINED", "TOK_CONTAINING", "TOK_DEFAULT",
915 "TOK_DEFINITIONS", "TOK_DEFINED", "TOK_EMBEDDED", "TOK_ENCODED",
916 "TOK_ENCODING_CONTROL", "TOK_END", "TOK_ENUMERATED", "TOK_EXPLICIT",
917 "TOK_EXPORTS", "TOK_EXTENSIBILITY", "TOK_EXTERNAL", "TOK_FALSE",
918 "TOK_FROM", "TOK_GeneralizedTime", "TOK_GeneralString",
919 "TOK_GraphicString", "TOK_IA5String", "TOK_IDENTIFIER", "TOK_IMPLICIT",
920 "TOK_IMPLIED", "TOK_IMPORTS", "TOK_INCLUDES", "TOK_INSTANCE",
921 "TOK_INSTRUCTIONS", "TOK_INTEGER", "TOK_ISO646String", "TOK_MAX",
922 "TOK_MIN", "TOK_MINUS_INFINITY", "TOK_NULL", "TOK_NumericString",
923 "TOK_OBJECT", "TOK_ObjectDescriptor", "TOK_OCTET", "TOK_OF",
924 "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV", "TOK_PLUS_INFINITY",
925 "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE", "TOK_REAL",
926 "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE", "TOK_STRING",
927 "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS", "TOK_TeletexString",
928 "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE", "TOK_UNIVERSAL",
929 "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String",
Lev Walkin752e9732017-08-04 02:06:22 -0700930 "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH",
931 "\"UTF-8 byte order mark\"", "TOK_EXCEPT", "'^'", "TOK_INTERSECTION",
932 "'|'", "TOK_UNION", "TOK_TwoDots", "TOK_ThreeDots", "'{'", "'}'", "'('",
933 "')'", "';'", "','", "':'", "'['", "']'", "'!'", "'.'", "'<'", "'@'",
934 "$accept", "ParsedGrammar", "ModuleList", "ModuleDefinition", "@1",
935 "optObjectIdentifier", "ObjectIdentifier", "ObjectIdentifierBody",
936 "ObjectIdentifierElement", "optModuleDefinitionFlags",
937 "ModuleDefinitionFlags", "ModuleDefinitionFlag", "optModuleBody",
938 "ModuleBody", "AssignmentList", "Assignment", "@2", "optImports",
939 "ImportsDefinition", "optImportsBundleSet", "ImportsBundleSet",
940 "AssignedIdentifier", "ImportsBundle", "ImportsList", "ImportsElement",
941 "optExports", "ExportsDefinition", "ExportsBody", "ExportsElement",
942 "ValueSet", "ValueSetTypeAssignment", "DefinedType", "DataTypeReference",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700943 "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList",
944 "ActualParameter", "optComponentTypeLists", "ComponentTypeLists",
945 "ComponentType", "AlternativeTypeLists", "AlternativeType",
946 "ObjectClass", "optUnique", "FieldSpec", "ClassField", "optWithSyntax",
Lev Walkin752e9732017-08-04 02:06:22 -0700947 "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700948 "ExtensionAndException", "Type", "NSTD_IndirectMarker",
949 "TypeDeclaration", "TypeDeclarationSet", "ComplexTypeReference",
950 "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement",
951 "PrimitiveFieldReference", "FieldName", "DefinedObjectClass",
Lev Walkin752e9732017-08-04 02:06:22 -0700952 "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700953 "RestrictedCharacterStringValue", "Opaque", "BasicTypeId",
954 "BasicTypeId_UniverationCompatible", "BasicType", "BasicString",
Lev Walkind523ea42017-09-06 22:15:08 -0700955 "UnionMark", "IntersectionMark", "optConstraints", "optSizeConstraints",
956 "Constraint", "SetOfConstraints", "ConstraintSpec", "SubtypeConstraint",
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800957 "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections",
Lev Walkin752e9732017-08-04 02:06:22 -0700958 "IntersectionElements", "ConstraintSubtypeElement", "@5",
Lev Walkind523ea42017-09-06 22:15:08 -0700959 "PatternConstraint", "ConstraintType", "SingleValue", "BitStringValue",
960 "ContainedSubtype", "InnerTypeConstraint", "SingleTypeConstraint",
961 "MultipleTypeConstraints", "FullSpecification", "PartialSpecification",
962 "TypeConstraints", "NamedConstraint", "optPresenceConstraint",
963 "PresenceConstraint", "GeneralConstraint", "UserDefinedConstraint", "@6",
964 "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint",
965 "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList",
966 "AtNotationElement", "ComponentIdList", "optMarker", "Marker",
967 "UniverationDefinition", "UniverationList", "UniverationElement",
968 "SignedNumber", "RealValue", "optTag", "Tag", "TagTypeValue", "TagClass",
969 "TagPlicit", "TypeRefName", "ObjectClassReference", "optIdentifier",
970 "Identifier", "IdentifierAsReference", "IdentifierAsValue", 0
Lev Walkin418298d2006-07-13 08:24:20 +0000971};
972#endif
973
974# ifdef YYPRINT
975/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
976 token YYLEX-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700977static const yytype_uint16 yytoknum[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000978{
979 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
980 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
981 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
982 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
983 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
984 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
985 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
986 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
987 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
988 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Lev Walkin752e9732017-08-04 02:06:22 -0700989 355, 356, 357, 358, 359, 94, 360, 124, 361, 362,
990 363, 123, 125, 40, 41, 59, 44, 58, 91, 93,
991 33, 46, 60, 64
Lev Walkin418298d2006-07-13 08:24:20 +0000992};
993# endif
994
995/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700996static const yytype_uint8 yyr1[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000997{
Lev Walkin752e9732017-08-04 02:06:22 -0700998 0, 124, 125, 125, 126, 126, 128, 127, 129, 129,
999 130, 130, 131, 131, 132, 132, 132, 133, 133, 134,
1000 134, 135, 135, 135, 135, 135, 136, 136, 137, 138,
1001 138, 139, 139, 139, 140, 139, 139, 141, 141, 142,
1002 142, 143, 143, 144, 144, 145, 145, 146, 147, 147,
1003 148, 148, 148, 149, 149, 150, 150, 150, 151, 151,
1004 152, 152, 152, 153, 154, 155, 155, 155, 156, 156,
1005 156, 156, 157, 157, 158, 158, 158, 158, 158, 159,
1006 159, 160, 160, 160, 160, 161, 161, 162, 162, 162,
1007 163, 163, 163, 163, 164, 164, 165, 165, 165, 166,
1008 167, 167, 168, 168, 169, 169, 169, 169, 169, 169,
1009 169, 170, 170, 172, 171, 173, 173, 174, 174, 174,
1010 174, 175, 175, 175, 176, 177, 178, 179, 179, 179,
1011 179, 179, 179, 179, 179, 179, 180, 180, 180, 180,
1012 180, 180, 181, 181, 182, 183, 183, 184, 184, 184,
1013 185, 186, 187, 187, 187, 188, 187, 187, 189, 189,
1014 189, 189, 189, 189, 190, 190, 191, 191, 191, 192,
1015 192, 193, 193, 193, 193, 193, 193, 193, 193, 193,
1016 193, 193, 193, 193, 194, 194, 194, 195, 195, 196,
1017 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
1018 196, 196, 196, 197, 197, 198, 198, 199, 199, 200,
Lev Walkind523ea42017-09-06 22:15:08 -07001019 200, 200, 201, 202, 202, 203, 203, 204, 205, 205,
Lev Walkin752e9732017-08-04 02:06:22 -07001020 205, 205, 206, 206, 207, 207, 208, 208, 209, 209,
Lev Walkind523ea42017-09-06 22:15:08 -07001021 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
1022 211, 210, 212, 212, 213, 213, 214, 214, 214, 214,
1023 214, 214, 215, 215, 216, 217, 217, 218, 219, 219,
1024 220, 221, 222, 222, 223, 224, 224, 225, 225, 225,
1025 226, 226, 226, 228, 227, 229, 230, 230, 230, 230,
1026 231, 231, 232, 233, 234, 234, 235, 235, 236, 236,
1027 237, 237, 238, 238, 239, 239, 240, 240, 241, 241,
1028 241, 241, 241, 242, 242, 243, 243, 244, 244, 245,
1029 246, 247, 247, 247, 247, 248, 248, 248, 249, 249,
1030 250, 251, 251, 252, 253, 254
Lev Walkin418298d2006-07-13 08:24:20 +00001031};
1032
1033/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001034static const yytype_uint8 yyr2[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001035{
Lev Walkin752e9732017-08-04 02:06:22 -07001036 0, 2, 2, 1, 1, 2, 0, 9, 0, 1,
1037 3, 2, 1, 2, 1, 4, 1, 0, 1, 1,
1038 2, 2, 2, 2, 2, 2, 0, 1, 3, 1,
1039 2, 1, 1, 1, 0, 3, 1, 0, 1, 3,
1040 2, 0, 1, 1, 2, 0, 1, 4, 1, 3,
1041 1, 3, 1, 0, 1, 3, 3, 2, 1, 3,
1042 1, 3, 1, 3, 4, 1, 1, 4, 3, 3,
1043 6, 6, 1, 3, 1, 3, 3, 3, 3, 1,
1044 3, 1, 1, 1, 1, 0, 1, 1, 3, 5,
1045 3, 2, 3, 1, 1, 3, 2, 1, 1, 5,
1046 0, 1, 1, 3, 2, 4, 3, 3, 3, 3,
1047 3, 0, 1, 0, 6, 1, 2, 1, 1, 1,
1048 3, 1, 3, 3, 3, 0, 2, 1, 4, 4,
1049 4, 6, 6, 1, 4, 3, 1, 3, 3, 3,
1050 1, 3, 1, 3, 1, 1, 1, 1, 3, 3,
1051 1, 4, 1, 1, 3, 0, 3, 1, 1, 1,
1052 1, 1, 1, 1, 1, 3, 1, 1, 1, 1,
1053 2, 1, 1, 1, 1, 2, 2, 1, 1, 2,
1054 2, 1, 1, 1, 1, 1, 2, 1, 2, 1,
Lev Walkin418298d2006-07-13 08:24:20 +00001055 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkind523ea42017-09-06 22:15:08 -07001056 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
1057 1, 4, 1, 3, 4, 1, 1, 1, 1, 1,
1058 3, 5, 1, 3, 1, 3, 1, 3, 1, 3,
1059 4, 3, 1, 1, 3, 3, 3, 3, 1, 1,
1060 0, 3, 2, 2, 1, 1, 1, 1, 1, 1,
1061 1, 1, 1, 1, 1, 3, 3, 1, 1, 1,
1062 3, 5, 1, 3, 3, 0, 1, 1, 1, 1,
1063 1, 1, 1, 0, 5, 2, 1, 2, 2, 3,
1064 1, 1, 3, 4, 1, 3, 2, 3, 1, 3,
1065 0, 1, 1, 2, 2, 3, 1, 3, 1, 4,
1066 4, 1, 1, 1, 1, 1, 1, 0, 1, 2,
1067 4, 0, 1, 1, 1, 0, 1, 1, 1, 1,
1068 1, 0, 1, 1, 1, 1
Lev Walkin418298d2006-07-13 08:24:20 +00001069};
1070
Lev Walkin752e9732017-08-04 02:06:22 -07001071/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1072 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
Lev Walkin418298d2006-07-13 08:24:20 +00001073 means the default is an error. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001074static const yytype_uint16 yydefact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001075{
Lev Walkind523ea42017-09-06 22:15:08 -07001076 0, 318, 319, 0, 0, 3, 4, 6, 2, 1,
1077 5, 8, 0, 0, 9, 323, 16, 11, 0, 12,
Lev Walkin752e9732017-08-04 02:06:22 -07001078 14, 17, 10, 13, 0, 0, 0, 0, 0, 0,
1079 0, 18, 19, 0, 25, 23, 21, 24, 22, 0,
1080 20, 15, 53, 0, 0, 27, 37, 54, 0, 57,
1081 0, 58, 60, 62, 7, 41, 0, 38, 56, 55,
1082 0, 0, 40, 0, 42, 43, 0, 48, 50, 52,
1083 189, 0, 190, 191, 192, 193, 194, 202, 195, 196,
1084 197, 198, 199, 200, 201, 28, 29, 33, 31, 32,
Lev Walkind523ea42017-09-06 22:15:08 -07001085 36, 0, 307, 59, 61, 39, 44, 0, 0, 0,
1086 34, 30, 307, 136, 320, 0, 171, 0, 0, 185,
Lev Walkin752e9732017-08-04 02:06:22 -07001087 178, 182, 184, 172, 0, 0, 173, 177, 181, 0,
Lev Walkind523ea42017-09-06 22:15:08 -07001088 0, 66, 187, 174, 65, 183, 140, 311, 0, 125,
1089 308, 315, 45, 49, 51, 35, 0, 69, 68, 0,
Lev Walkin752e9732017-08-04 02:06:22 -07001090 186, 180, 179, 176, 175, 0, 72, 0, 174, 74,
Lev Walkind523ea42017-09-06 22:15:08 -07001091 0, 307, 0, 188, 0, 313, 314, 312, 0, 0,
1092 0, 207, 317, 316, 309, 46, 47, 0, 137, 139,
1093 0, 0, 0, 0, 307, 64, 160, 166, 161, 303,
1094 304, 167, 168, 158, 159, 84, 0, 79, 81, 82,
1095 162, 163, 83, 302, 294, 0, 296, 301, 298, 145,
Lev Walkin752e9732017-08-04 02:06:22 -07001096 146, 141, 142, 144, 138, 0, 157, 155, 151, 152,
Lev Walkind523ea42017-09-06 22:15:08 -07001097 153, 0, 164, 133, 0, 0, 209, 209, 127, 126,
1098 307, 124, 208, 212, 307, 307, 0, 102, 307, 73,
1099 78, 77, 76, 75, 252, 253, 306, 0, 246, 245,
1100 0, 0, 244, 247, 0, 218, 240, 307, 254, 249,
1101 0, 219, 222, 224, 226, 228, 239, 0, 232, 250,
1102 233, 238, 305, 248, 251, 67, 307, 295, 0, 0,
1103 0, 310, 0, 0, 0, 0, 307, 0, 0, 307,
1104 0, 210, 307, 0, 0, 307, 240, 0, 215, 217,
1105 216, 270, 272, 271, 280, 281, 307, 150, 147, 0,
1106 292, 290, 290, 290, 104, 291, 100, 290, 290, 111,
1107 0, 71, 70, 307, 276, 0, 0, 242, 243, 0,
1108 0, 0, 0, 63, 0, 203, 204, 307, 205, 206,
1109 307, 307, 307, 0, 80, 297, 0, 0, 164, 143,
Lev Walkin752e9732017-08-04 02:06:22 -07001110 169, 156, 165, 154, 0, 121, 0, 94, 97, 98,
Lev Walkind523ea42017-09-06 22:15:08 -07001111 307, 135, 307, 0, 0, 86, 87, 93, 290, 307,
1112 321, 0, 321, 0, 275, 0, 213, 0, 0, 293,
1113 109, 0, 108, 110, 101, 290, 106, 107, 0, 99,
1114 112, 103, 223, 277, 278, 237, 235, 257, 255, 0,
1115 256, 258, 259, 241, 231, 220, 225, 227, 229, 0,
1116 236, 234, 300, 299, 170, 134, 0, 128, 307, 96,
1117 0, 307, 129, 307, 91, 290, 307, 322, 130, 307,
1118 273, 282, 0, 0, 284, 214, 148, 149, 105, 0,
1119 279, 0, 0, 262, 324, 325, 207, 307, 230, 122,
1120 123, 95, 211, 92, 307, 88, 90, 125, 125, 0,
1121 0, 286, 288, 283, 0, 113, 0, 260, 0, 265,
1122 221, 0, 131, 132, 274, 287, 0, 285, 0, 0,
1123 263, 268, 269, 267, 264, 266, 89, 289, 117, 118,
1124 0, 0, 115, 119, 261, 0, 114, 116, 120
Lev Walkin418298d2006-07-13 08:24:20 +00001125};
1126
Lev Walkin0e90aa02013-03-19 16:17:13 -07001127/* YYDEFGOTO[NTERM-NUM]. */
1128static const yytype_int16 yydefgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001129{
Lev Walkin752e9732017-08-04 02:06:22 -07001130 -1, 4, 5, 6, 11, 13, 14, 18, 19, 30,
1131 31, 32, 44, 45, 85, 86, 135, 56, 57, 63,
1132 64, 166, 65, 66, 67, 46, 47, 50, 51, 185,
Lev Walkind523ea42017-09-06 22:15:08 -07001133 87, 120, 88, 145, 146, 186, 187, 354, 355, 356,
1134 346, 347, 137, 375, 226, 227, 379, 380, 468, 481,
1135 482, 357, 248, 160, 161, 219, 121, 201, 202, 483,
1136 302, 303, 89, 208, 272, 209, 210, 249, 341, 122,
1137 123, 124, 125, 327, 330, 221, 280, 222, 223, 287,
1138 288, 289, 251, 252, 253, 254, 255, 321, 256, 257,
1139 258, 259, 260, 261, 388, 390, 391, 392, 432, 433,
1140 474, 475, 290, 291, 449, 292, 316, 293, 294, 295,
1141 423, 424, 451, 304, 305, 153, 195, 196, 262, 263,
1142 129, 130, 131, 158, 164, 211, 126, 416, 264, 435,
1143 436
Lev Walkin418298d2006-07-13 08:24:20 +00001144};
1145
1146/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1147 STATE-NUM. */
Lev Walkind523ea42017-09-06 22:15:08 -07001148#define YYPACT_NINF -320
Lev Walkin0e90aa02013-03-19 16:17:13 -07001149static const yytype_int16 yypact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001150{
Lev Walkind523ea42017-09-06 22:15:08 -07001151 70, -320, -320, 95, 24, 95, -320, -320, 95, -320,
1152 -320, -81, 46, 4, -320, -320, -320, -320, 64, -320,
1153 -52, 199, -320, -320, 93, 86, 68, 74, 149, 123,
1154 224, 199, -320, 159, -320, -320, -320, -320, -320, 214,
1155 -320, -320, 246, 72, 202, -320, 222, -320, 138, -320,
1156 150, -320, 180, -320, -320, 92, 585, -320, -320, -320,
1157 207, 209, -320, 220, 207, -320, 53, -320, 231, -320,
1158 -320, 301, -320, -320, -320, -320, -320, -320, -320, -320,
1159 -320, -320, -320, -320, -320, 585, -320, -320, -320, -320,
1160 -320, 535, 226, -320, -320, -320, -320, 95, 207, 233,
1161 -320, -320, -16, 228, -320, 258, -320, 259, 273, -320,
1162 -320, -320, -320, -320, 294, 266, -320, -320, -320, 738,
1163 361, 254, -320, 255, -320, -320, 248, 90, 367, -320,
1164 -320, 164, -81, -320, -320, -320, 261, -320, -320, 207,
1165 -320, -320, -320, -320, -320, 77, -320, 256, -320, 257,
1166 264, 225, 80, -320, 280, -320, -320, -320, 364, 469,
1167 662, 265, -320, -320, -320, -320, -320, 252, -320, -320,
1168 376, 738, 207, 207, 315, -320, -320, -320, -320, -320,
1169 -320, -320, -320, -320, -320, -320, 99, -320, -320, -320,
1170 -320, -320, -320, -320, -320, 116, -320, -320, 267, -320,
1171 -320, 260, -320, -320, -320, 268, -320, -320, -320, -320,
1172 -320, 269, 272, 340, 274, 309, 108, 109, -320, -320,
1173 192, -320, -320, 275, 134, 62, 127, -320, -16, -320,
1174 -320, -320, -320, -320, -320, -320, -320, 282, -320, -320,
1175 29, 188, -320, -320, 271, -320, -320, 315, -320, -320,
1176 279, 277, 204, 208, -320, 291, -320, 284, 29, -320,
1177 -320, -320, -320, -320, -320, -320, 225, -320, 88, 263,
1178 314, -320, 391, 392, 469, 372, 60, 298, 292, 45,
1179 331, -320, 45, 332, 377, 226, 95, 297, -320, -320,
1180 -320, -320, -320, -320, 302, -320, 192, -320, -320, 469,
1181 -320, 39, -17, 39, -320, -320, 317, -17, 39, 312,
1182 252, -320, -320, 458, 299, 307, 480, -320, -320, 265,
1183 308, 391, 304, -320, 310, -320, -320, 458, -320, -320,
1184 458, 458, 315, 490, -320, -320, 313, 316, -320, -320,
1185 -320, 415, -320, -320, 392, 303, 139, -320, -320, -320,
1186 226, -320, 192, 354, 319, 320, -320, -320, 39, 226,
1187 392, 323, 392, 326, -320, 327, -320, 322, 328, -320,
1188 -320, 318, -320, -320, -320, 39, -320, -320, 352, -320,
1189 -320, -320, -320, -320, 321, -320, -320, -320, -320, 67,
1190 -320, -320, -320, 415, -320, 334, 208, -320, -320, 333,
1191 -320, -320, -320, -320, -320, -320, 263, -320, 60, -320,
1192 337, 226, -320, 18, -320, 39, 226, -320, -320, 226,
1193 -320, -320, 23, 166, -320, -320, -320, -320, -320, 341,
1194 -320, 339, 172, -320, -320, -320, 265, 347, -320, -320,
1195 -320, -320, -320, -320, 61, -320, -320, -320, -320, 391,
1196 392, 335, -320, -320, 322, -320, 392, -320, 392, 41,
1197 -320, 16, -320, -320, 415, 335, 392, -320, 30, 174,
1198 -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
1199 30, 6, -320, -320, -320, 48, -320, -320, -320
Lev Walkin418298d2006-07-13 08:24:20 +00001200};
1201
1202/* YYPGOTO[NTERM-NUM]. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001203static const yytype_int16 yypgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001204{
Lev Walkind523ea42017-09-06 22:15:08 -07001205 -320, -320, 445, 296, -320, -320, 325, -320, 435, -320,
1206 -320, 428, -320, -320, -320, 378, -320, -320, -320, -320,
1207 -320, -320, 397, -320, 366, -320, -320, -320, 402, 357,
1208 -320, 348, -320, -320, 305, -320, 217, 193, 65, 84,
1209 -320, 104, 285, -320, -320, 205, -320, -320, -320, 34,
1210 -192, -262, -91, -320, -107, -320, 239, -320, 247, -151,
1211 293, 295, -320, -237, -320, -144, -264, -131, -319, -87,
1212 -86, -320, 128, -320, -320, 83, 306, -178, -320, -232,
1213 -320, -170, 85, -320, 197, 195, -296, -320, -320, -320,
1214 -222, -320, -320, -320, -320, -320, -320, -320, 71, 73,
1215 -320, -320, -320, -320, -320, -320, 270, -320, -320, -320,
1216 -320, 75, 87, -261, -320, -320, -320, 262, -143, -320,
1217 -110, -320, -320, -320, -320, 10, -320, 171, -12, -320,
1218 -320
Lev Walkin418298d2006-07-13 08:24:20 +00001219};
1220
1221/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1222 positive, shift that token. If negative, reduce the rule which
Lev Walkin752e9732017-08-04 02:06:22 -07001223 number is the opposite. If zero, do what YYDEFACT says.
1224 If YYTABLE_NINF, syntax error. */
Lev Walkind523ea42017-09-06 22:15:08 -07001225#define YYTABLE_NINF -291
Lev Walkin0e90aa02013-03-19 16:17:13 -07001226static const yytype_int16 yytable[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001227{
Lev Walkind523ea42017-09-06 22:15:08 -07001228 20, 128, 393, 203, 250, 336, 20, 189, 191, 197,
1229 7, 138, 478, 7, 348, 7, 191, 382, 7, 136,
1230 190, 476, 444, 299, 9, 199, 200, 479, 190, 15,
1231 12, 53, 147, 148, 15, 398, 478, 343, 281, 281,
1232 370, 372, 373, 69, 92, 21, 376, 377, 53, 199,
1233 200, 479, 69, 52, 478, 353, 15, 15, 16, 300,
1234 188, 24, 369, 471, 368, 68, 91, 199, 200, 479,
1235 52, 15, 15, 92, 68, 15, 16, 322, 15, 299,
1236 297, 298, 353, 15, 147, 148, 69, 1, 2, 1,
1237 2, 15, 179, 180, 386, 91, 48, 414, 353, 15,
1238 179, 180, 127, 15, 371, 33, 97, 132, 68, 1,
1239 2, 401, 1, 2, 428, 300, 155, 472, 486, 203,
1240 410, 473, 189, 191, 480, 197, 337, 169, 345, 149,
1241 464, 191, 413, 301, 306, 190, 127, 312, 314, 192,
1242 198, 387, 439, 190, 450, 62, 348, 212, 480, 168,
1243 34, 315, 297, 298, 446, 345, 191, -85, 17, 35,
1244 231, 233, 399, 127, 204, 36, 480, 488, 190, 98,
1245 345, 345, 156, 3, 299, 188, 22, 431, 127, 127,
1246 127, 149, 230, 232, 90, 349, 157, 49, 358, 170,
1247 193, 358, 194, 171, 364, 278, 278, 317, 193, 15,
1248 234, 177, 235, 15, 179, 180, 236, 181, 182, 37,
1249 300, 265, 162, 90, 38, 266, 237, 25, 15, 279,
1250 282, 220, 220, 163, 1, 2, 26, 39, 267, 318,
1251 284, 285, 268, 176, 177, 178, 15, 179, 180, 309,
1252 181, 182, 42, 310, 238, 239, -290, 27, 54, 28,
1253 -290, 407, 127, 58, 192, 408, 198, 338, 29, 409,
1254 240, 342, 212, 440, 350, 59, 60, 359, 415, 241,
1255 359, 224, 225, 41, 15, 179, 180, 183, 453, 242,
1256 1, 2, 454, 55, 457, 243, 484, 212, 458, 487,
1257 458, 61, -26, 487, 244, 43, 365, 1, 2, 199,
1258 200, 10, 245, 286, 10, 247, 447, 319, 320, 448,
1259 127, 325, 326, 328, 329, 103, 104, 349, 184, 100,
1260 443, 94, 358, 234, 177, 235, 15, 179, 180, 236,
1261 181, 182, 405, 199, 200, 95, 174, 426, 427, 237,
1262 462, 463, 99, 127, 127, 134, 140, 141, 417, 139,
1263 417, 142, 143, 358, 144, 234, 177, 235, 15, 179,
1264 180, 236, 181, 182, 150, 151, 152, 238, 239, 154,
1265 159, 237, 167, 172, 173, 174, 205, 434, 220, 228,
1266 269, 270, 275, 240, 277, 276, 313, 271, 296, 274,
1267 273, 323, 241, 324, 338, 331, 350, 332, 340, 238,
1268 239, 359, 242, 15, 344, 352, 360, 362, 243, 363,
1269 452, 366, 374, 367, 378, 240, 384, 244, 394, 389,
1270 395, 383, 404, 406, 241, 245, 246, 402, 247, 411,
1271 403, 412, 359, 127, 242, 418, 413, 420, 452, 421,
1272 243, 429, 425, 430, 434, 422, 434, 438, 8, 244,
1273 437, 442, 455, 23, 477, 456, 466, 165, 246, 40,
1274 247, 96, 93, 101, 133, 127, 234, 177, 235, 15,
1275 179, 180, 236, 181, 182, 361, 229, 176, 177, 178,
1276 15, 179, 180, 334, 181, 182, 1, 2, 234, 177,
1277 235, 15, 179, 180, 236, 181, 182, 445, 234, 177,
1278 235, 15, 179, 180, 236, 181, 182, 175, 218, 461,
1279 238, 239, 441, 311, 485, 381, 351, 339, 307, 459,
1280 308, 183, 460, 283, 396, 397, 240, 469, 333, 467,
1281 335, 470, 238, 419, 0, 241, 0, 465, 102, 206,
1282 0, 0, 238, 0, 0, 242, 0, 385, 0, 0,
1283 0, 243, 103, 104, 0, 0, 0, 400, 0, 0,
1284 244, 0, 184, 0, 105, 70, 106, 0, 107, 246,
1285 0, 247, 0, 243, 0, 0, 127, 0, 108, 0,
1286 207, 0, 109, 243, 0, 0, 110, 0, 0, 111,
1287 72, 73, 74, 0, 0, 0, 15, 0, 0, 0,
1288 112, 75, 1, 2, 0, 113, 76, 114, 77, 115,
1289 0, 0, 0, 0, 0, 70, 78, 0, 116, 117,
1290 0, 0, 0, 0, 0, 79, 0, 80, 0, 0,
1291 71, 0, 81, 118, 82, 83, 84, 0, 0, 0,
1292 72, 73, 74, 0, 0, 0, 119, 0, 0, 0,
1293 0, 75, 0, 0, 0, 0, 76, 0, 77, 0,
1294 0, 0, 0, 0, 0, 0, 78, 0, 0, 0,
1295 0, 0, 0, 0, 0, 79, 0, 80, 0, 103,
1296 104, 0, 81, 0, 82, 83, 84, 213, 0, 0,
1297 0, 105, 70, 106, 0, 107, 214, 0, 0, 0,
1298 0, 0, 0, 0, 0, 108, 0, 0, 0, 109,
1299 0, 0, 0, 110, 0, 0, 111, 72, 73, 74,
1300 0, 0, 0, 0, 0, 215, 0, 112, 75, 0,
1301 0, 0, 113, 76, 114, 77, 115, 0, 0, 0,
1302 0, 0, 0, 78, 0, 116, 117, 216, 217, 0,
1303 0, 0, 79, 0, 80, 1, 2, 0, 0, 81,
1304 118, 82, 83, 84, 0, 0, 0, 105, 70, 106,
1305 0, 107, 0, 0, 0, 0, 0, 0, 0, 0,
1306 0, 108, 0, 0, 0, 109, 0, 0, 0, 110,
1307 0, 0, 111, 72, 73, 74, 0, 0, 0, 0,
1308 0, 0, 0, 112, 75, 0, 0, 0, 113, 76,
1309 114, 77, 115, 0, 0, 0, 0, 0, 0, 78,
1310 0, 116, 117, 0, 0, 0, 0, 0, 79, 0,
1311 80, 0, 0, 0, 0, 81, 118, 82, 83, 84
Lev Walkin418298d2006-07-13 08:24:20 +00001312};
1313
Lev Walkin0e90aa02013-03-19 16:17:13 -07001314static const yytype_int16 yycheck[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001315{
Lev Walkind523ea42017-09-06 22:15:08 -07001316 12, 92, 321, 154, 174, 269, 18, 151, 151, 152,
1317 0, 102, 6, 3, 276, 5, 159, 313, 8, 35,
1318 151, 5, 4, 40, 0, 19, 20, 21, 159, 11,
1319 111, 43, 119, 119, 11, 331, 6, 274, 216, 217,
1320 301, 302, 303, 55, 56, 41, 307, 308, 60, 19,
1321 20, 21, 64, 43, 6, 37, 11, 11, 12, 76,
1322 151, 113, 299, 22, 296, 55, 56, 19, 20, 21,
1323 60, 11, 11, 85, 64, 11, 12, 247, 11, 40,
1324 18, 19, 37, 11, 171, 171, 98, 17, 18, 17,
1325 18, 11, 12, 13, 316, 85, 24, 358, 37, 11,
1326 12, 13, 118, 11, 121, 12, 53, 97, 98, 17,
1327 18, 333, 17, 18, 375, 76, 26, 76, 112, 270,
1328 352, 80, 266, 266, 118, 268, 269, 139, 110, 119,
1329 449, 274, 116, 224, 225, 266, 118, 228, 109, 151,
1330 152, 319, 406, 274, 121, 53, 408, 159, 118, 139,
1331 64, 122, 18, 19, 415, 110, 299, 112, 112, 91,
1332 172, 173, 332, 118, 154, 91, 118, 119, 299, 116,
1333 110, 110, 82, 103, 40, 266, 112, 110, 118, 118,
1334 118, 171, 172, 173, 56, 276, 96, 115, 279, 112,
1335 110, 282, 112, 116, 285, 87, 87, 9, 110, 11,
1336 8, 9, 10, 11, 12, 13, 14, 15, 16, 60,
1337 76, 112, 48, 85, 91, 116, 24, 18, 11, 111,
1338 111, 113, 113, 59, 17, 18, 27, 3, 112, 241,
1339 38, 39, 116, 8, 9, 10, 11, 12, 13, 112,
1340 15, 16, 28, 116, 52, 53, 112, 48, 46, 50,
1341 116, 112, 118, 115, 266, 116, 268, 269, 59, 350,
1342 68, 273, 274, 406, 276, 115, 116, 279, 359, 77,
1343 282, 19, 20, 114, 11, 12, 13, 52, 112, 87,
1344 17, 18, 116, 61, 112, 93, 112, 299, 116, 481,
1345 116, 111, 46, 485, 102, 49, 286, 17, 18, 19,
1346 20, 5, 110, 111, 8, 113, 416, 36, 37, 419,
1347 118, 107, 108, 105, 106, 17, 18, 408, 93, 18,
1348 411, 112, 413, 8, 9, 10, 11, 12, 13, 14,
1349 15, 16, 344, 19, 20, 115, 111, 19, 20, 24,
1350 447, 448, 111, 118, 118, 112, 88, 88, 360, 121,
1351 362, 78, 58, 444, 88, 8, 9, 10, 11, 12,
1352 13, 14, 15, 16, 3, 111, 111, 52, 53, 121,
1353 3, 24, 111, 117, 117, 111, 12, 389, 113, 3,
1354 113, 121, 42, 68, 75, 111, 104, 119, 113, 117,
1355 121, 112, 77, 116, 406, 104, 408, 113, 7, 52,
1356 53, 413, 87, 11, 32, 113, 75, 75, 93, 32,
1357 422, 114, 95, 111, 102, 68, 109, 102, 114, 111,
1358 110, 122, 7, 120, 77, 110, 111, 114, 113, 75,
1359 114, 112, 444, 118, 87, 112, 116, 111, 450, 112,
1360 93, 89, 114, 122, 456, 123, 458, 114, 3, 102,
1361 116, 114, 111, 18, 466, 116, 121, 132, 111, 31,
1362 113, 64, 60, 85, 98, 118, 8, 9, 10, 11,
1363 12, 13, 14, 15, 16, 282, 171, 8, 9, 10,
1364 11, 12, 13, 266, 15, 16, 17, 18, 8, 9,
1365 10, 11, 12, 13, 14, 15, 16, 413, 8, 9,
1366 10, 11, 12, 13, 14, 15, 16, 150, 160, 444,
1367 52, 53, 408, 228, 480, 310, 277, 270, 225, 436,
1368 225, 52, 437, 217, 327, 330, 68, 456, 258, 454,
1369 268, 458, 52, 362, -1, 77, -1, 450, 3, 70,
1370 -1, -1, 52, -1, -1, 87, -1, 67, -1, -1,
1371 -1, 93, 17, 18, -1, -1, -1, 67, -1, -1,
1372 102, -1, 93, -1, 29, 30, 31, -1, 33, 111,
1373 -1, 113, -1, 93, -1, -1, 118, -1, 43, -1,
1374 111, -1, 47, 93, -1, -1, 51, -1, -1, 54,
1375 55, 56, 57, -1, -1, -1, 11, -1, -1, -1,
1376 65, 66, 17, 18, -1, 70, 71, 72, 73, 74,
1377 -1, -1, -1, -1, -1, 30, 81, -1, 83, 84,
1378 -1, -1, -1, -1, -1, 90, -1, 92, -1, -1,
1379 45, -1, 97, 98, 99, 100, 101, -1, -1, -1,
1380 55, 56, 57, -1, -1, -1, 111, -1, -1, -1,
1381 -1, 66, -1, -1, -1, -1, 71, -1, 73, -1,
1382 -1, -1, -1, -1, -1, -1, 81, -1, -1, -1,
1383 -1, -1, -1, -1, -1, 90, -1, 92, -1, 17,
1384 18, -1, 97, -1, 99, 100, 101, 25, -1, -1,
1385 -1, 29, 30, 31, -1, 33, 34, -1, -1, -1,
1386 -1, -1, -1, -1, -1, 43, -1, -1, -1, 47,
1387 -1, -1, -1, 51, -1, -1, 54, 55, 56, 57,
1388 -1, -1, -1, -1, -1, 63, -1, 65, 66, -1,
1389 -1, -1, 70, 71, 72, 73, 74, -1, -1, -1,
1390 -1, -1, -1, 81, -1, 83, 84, 85, 86, -1,
1391 -1, -1, 90, -1, 92, 17, 18, -1, -1, 97,
1392 98, 99, 100, 101, -1, -1, -1, 29, 30, 31,
1393 -1, 33, -1, -1, -1, -1, -1, -1, -1, -1,
1394 -1, 43, -1, -1, -1, 47, -1, -1, -1, 51,
1395 -1, -1, 54, 55, 56, 57, -1, -1, -1, -1,
1396 -1, -1, -1, 65, 66, -1, -1, -1, 70, 71,
1397 72, 73, 74, -1, -1, -1, -1, -1, -1, 81,
1398 -1, 83, 84, -1, -1, -1, -1, -1, 90, -1,
1399 92, -1, -1, -1, -1, 97, 98, 99, 100, 101
Lev Walkin418298d2006-07-13 08:24:20 +00001400};
1401
1402/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1403 symbol of state STATE-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001404static const yytype_uint8 yystos[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001405{
Lev Walkind523ea42017-09-06 22:15:08 -07001406 0, 17, 18, 103, 125, 126, 127, 249, 126, 0,
Lev Walkin752e9732017-08-04 02:06:22 -07001407 127, 128, 111, 129, 130, 11, 12, 112, 131, 132,
Lev Walkind523ea42017-09-06 22:15:08 -07001408 252, 41, 112, 132, 113, 18, 27, 48, 50, 59,
Lev Walkin752e9732017-08-04 02:06:22 -07001409 133, 134, 135, 12, 64, 91, 91, 60, 91, 3,
1410 135, 114, 28, 49, 136, 137, 149, 150, 24, 115,
Lev Walkind523ea42017-09-06 22:15:08 -07001411 151, 152, 249, 252, 46, 61, 141, 142, 115, 115,
1412 116, 111, 53, 143, 144, 146, 147, 148, 249, 252,
Lev Walkin752e9732017-08-04 02:06:22 -07001413 30, 45, 55, 56, 57, 66, 71, 73, 81, 90,
1414 92, 97, 99, 100, 101, 138, 139, 154, 156, 186,
Lev Walkind523ea42017-09-06 22:15:08 -07001415 196, 249, 252, 152, 112, 115, 146, 53, 116, 111,
Lev Walkin752e9732017-08-04 02:06:22 -07001416 18, 139, 3, 17, 18, 29, 31, 33, 43, 47,
1417 51, 54, 65, 70, 72, 74, 83, 84, 98, 111,
Lev Walkind523ea42017-09-06 22:15:08 -07001418 155, 180, 193, 194, 195, 196, 250, 118, 176, 244,
1419 245, 246, 249, 148, 112, 140, 35, 166, 176, 121,
1420 88, 88, 78, 58, 88, 157, 158, 193, 194, 249,
1421 3, 111, 111, 239, 121, 26, 82, 96, 247, 3,
1422 177, 178, 48, 59, 248, 130, 145, 111, 249, 252,
Lev Walkin752e9732017-08-04 02:06:22 -07001423 112, 116, 117, 117, 111, 153, 8, 9, 10, 12,
1424 13, 15, 16, 52, 93, 153, 159, 160, 176, 189,
Lev Walkind523ea42017-09-06 22:15:08 -07001425 191, 242, 252, 110, 112, 240, 241, 242, 252, 19,
1426 20, 181, 182, 183, 249, 12, 70, 111, 187, 189,
1427 190, 249, 252, 25, 34, 63, 85, 86, 155, 179,
1428 113, 199, 201, 202, 19, 20, 168, 169, 3, 158,
1429 249, 252, 249, 252, 8, 10, 14, 24, 52, 53,
1430 68, 77, 87, 93, 102, 110, 111, 113, 176, 191,
1431 205, 206, 207, 208, 209, 210, 212, 213, 214, 215,
1432 216, 217, 242, 243, 252, 112, 116, 112, 116, 113,
1433 121, 119, 188, 121, 117, 42, 111, 75, 87, 111,
1434 200, 201, 111, 200, 38, 39, 111, 203, 204, 205,
1435 226, 227, 229, 231, 232, 233, 113, 18, 19, 40,
1436 76, 176, 184, 185, 237, 238, 176, 184, 185, 112,
1437 116, 166, 176, 104, 109, 122, 230, 9, 252, 36,
1438 37, 211, 205, 112, 116, 107, 108, 197, 105, 106,
1439 198, 104, 113, 230, 160, 241, 190, 242, 252, 182,
1440 7, 192, 252, 187, 32, 110, 164, 165, 175, 176,
1441 252, 180, 113, 37, 161, 162, 163, 175, 176, 252,
1442 75, 161, 75, 32, 176, 249, 114, 111, 203, 187,
1443 237, 121, 237, 237, 95, 167, 237, 237, 102, 170,
1444 171, 169, 210, 122, 109, 67, 214, 201, 218, 111,
1445 219, 220, 221, 192, 114, 110, 208, 209, 210, 205,
1446 67, 214, 114, 114, 7, 252, 120, 112, 116, 176,
1447 203, 75, 112, 116, 237, 176, 251, 252, 112, 251,
1448 111, 112, 123, 234, 235, 114, 19, 20, 237, 89,
1449 122, 110, 222, 223, 252, 253, 254, 116, 114, 190,
1450 242, 165, 114, 176, 4, 163, 237, 244, 244, 228,
1451 121, 236, 252, 112, 116, 111, 116, 112, 116, 199,
1452 206, 162, 178, 178, 192, 236, 121, 235, 172, 222,
1453 223, 22, 76, 80, 224, 225, 5, 252, 6, 21,
1454 118, 173, 174, 183, 112, 173, 112, 174, 119
Lev Walkin418298d2006-07-13 08:24:20 +00001455};
1456
Lev Walkinf15320b2004-06-03 03:38:44 +00001457#define yyerrok (yyerrstatus = 0)
1458#define yyclearin (yychar = YYEMPTY)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001459#define YYEMPTY (-2)
Lev Walkinf15320b2004-06-03 03:38:44 +00001460#define YYEOF 0
Lev Walkin418298d2006-07-13 08:24:20 +00001461
Lev Walkinf15320b2004-06-03 03:38:44 +00001462#define YYACCEPT goto yyacceptlab
Lev Walkin418298d2006-07-13 08:24:20 +00001463#define YYABORT goto yyabortlab
Lev Walkin0e90aa02013-03-19 16:17:13 -07001464#define YYERROR goto yyerrorlab
1465
Lev Walkin418298d2006-07-13 08:24:20 +00001466
1467/* Like YYERROR except do call yyerror. This remains here temporarily
1468 to ease the transition to the new meaning of YYERROR, for GCC.
Lev Walkin752e9732017-08-04 02:06:22 -07001469 Once GCC version 2 has supplanted version 1, this can go. */
Lev Walkin418298d2006-07-13 08:24:20 +00001470
Lev Walkinf15320b2004-06-03 03:38:44 +00001471#define YYFAIL goto yyerrlab
Lev Walkin418298d2006-07-13 08:24:20 +00001472
Lev Walkinf15320b2004-06-03 03:38:44 +00001473#define YYRECOVERING() (!!yyerrstatus)
Lev Walkin418298d2006-07-13 08:24:20 +00001474
Lev Walkin752e9732017-08-04 02:06:22 -07001475#define YYBACKUP(Token, Value) \
1476do \
1477 if (yychar == YYEMPTY && yylen == 1) \
1478 { \
1479 yychar = (Token); \
1480 yylval = (Value); \
1481 yytoken = YYTRANSLATE (yychar); \
1482 YYPOPSTACK (1); \
1483 goto yybackup; \
1484 } \
1485 else \
1486 { \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001487 yyerror (YY_("syntax error: cannot back up")); \
Lev Walkin418298d2006-07-13 08:24:20 +00001488 YYERROR; \
1489 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001490while (YYID (0))
1491
Lev Walkin752e9732017-08-04 02:06:22 -07001492
Lev Walkinf15320b2004-06-03 03:38:44 +00001493#define YYTERROR 1
1494#define YYERRCODE 256
1495
Lev Walkin418298d2006-07-13 08:24:20 +00001496
Lev Walkin752e9732017-08-04 02:06:22 -07001497/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1498 If N is 0, then set CURRENT to the empty location which ends
1499 the previous symbol: RHS[0] (always defined). */
1500
1501#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1502#ifndef YYLLOC_DEFAULT
1503# define YYLLOC_DEFAULT(Current, Rhs, N) \
1504 do \
1505 if (YYID (N)) \
1506 { \
1507 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1508 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1509 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1510 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1511 } \
1512 else \
1513 { \
1514 (Current).first_line = (Current).last_line = \
1515 YYRHSLOC (Rhs, 0).last_line; \
1516 (Current).first_column = (Current).last_column = \
1517 YYRHSLOC (Rhs, 0).last_column; \
1518 } \
1519 while (YYID (0))
1520#endif
1521
1522
1523/* YY_LOCATION_PRINT -- Print the location on the stream.
1524 This macro was not mandated originally: define only if we know
1525 we won't break user code: when these are the locations we know. */
1526
Lev Walkin0e90aa02013-03-19 16:17:13 -07001527#ifndef YY_LOCATION_PRINT
Lev Walkin752e9732017-08-04 02:06:22 -07001528# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1529# define YY_LOCATION_PRINT(File, Loc) \
1530 fprintf (File, "%d.%d-%d.%d", \
1531 (Loc).first_line, (Loc).first_column, \
1532 (Loc).last_line, (Loc).last_column)
1533# else
1534# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1535# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07001536#endif
1537
1538
Lev Walkin418298d2006-07-13 08:24:20 +00001539/* YYLEX -- calling `yylex' with the right arguments. */
Lev Walkin752e9732017-08-04 02:06:22 -07001540
Lev Walkin0e90aa02013-03-19 16:17:13 -07001541#ifdef YYLEX_PARAM
1542# define YYLEX yylex (YYLEX_PARAM)
1543#else
1544# define YYLEX yylex ()
1545#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001546
Lev Walkin418298d2006-07-13 08:24:20 +00001547/* Enable debugging if requested. */
1548#if YYDEBUG
Lev Walkinfb872bd2006-03-18 06:53:11 +00001549
Lev Walkin418298d2006-07-13 08:24:20 +00001550# ifndef YYFPRINTF
1551# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1552# define YYFPRINTF fprintf
1553# endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001554
Lev Walkin418298d2006-07-13 08:24:20 +00001555# define YYDPRINTF(Args) \
1556do { \
1557 if (yydebug) \
1558 YYFPRINTF Args; \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001559} while (YYID (0))
1560
1561# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1562do { \
1563 if (yydebug) \
1564 { \
1565 YYFPRINTF (stderr, "%s ", Title); \
1566 yy_symbol_print (stderr, \
1567 Type, Value); \
1568 YYFPRINTF (stderr, "\n"); \
1569 } \
1570} while (YYID (0))
1571
1572
1573/*--------------------------------.
1574| Print this symbol on YYOUTPUT. |
1575`--------------------------------*/
1576
1577/*ARGSUSED*/
1578#if (defined __STDC__ || defined __C99__FUNC__ \
1579 || defined __cplusplus || defined _MSC_VER)
1580static void
1581yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1582#else
1583static void
1584yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1585 FILE *yyoutput;
1586 int yytype;
1587 YYSTYPE const * const yyvaluep;
1588#endif
1589{
1590 if (!yyvaluep)
1591 return;
1592# ifdef YYPRINT
1593 if (yytype < YYNTOKENS)
1594 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1595# else
1596 YYUSE (yyoutput);
1597# endif
Lev Walkin752e9732017-08-04 02:06:22 -07001598 switch (yytype)
1599 {
1600 default:
1601 break;
1602 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001603}
1604
1605
1606/*--------------------------------.
1607| Print this symbol on YYOUTPUT. |
1608`--------------------------------*/
1609
1610#if (defined __STDC__ || defined __C99__FUNC__ \
1611 || defined __cplusplus || defined _MSC_VER)
1612static void
1613yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1614#else
1615static void
1616yy_symbol_print (yyoutput, yytype, yyvaluep)
1617 FILE *yyoutput;
1618 int yytype;
1619 YYSTYPE const * const yyvaluep;
1620#endif
1621{
1622 if (yytype < YYNTOKENS)
1623 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1624 else
1625 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1626
1627 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1628 YYFPRINTF (yyoutput, ")");
1629}
1630
1631/*------------------------------------------------------------------.
1632| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1633| TOP (included). |
1634`------------------------------------------------------------------*/
1635
1636#if (defined __STDC__ || defined __C99__FUNC__ \
1637 || defined __cplusplus || defined _MSC_VER)
1638static void
Lev Walkin752e9732017-08-04 02:06:22 -07001639yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001640#else
1641static void
Lev Walkin752e9732017-08-04 02:06:22 -07001642yy_stack_print (bottom, top)
1643 yytype_int16 *bottom;
1644 yytype_int16 *top;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001645#endif
1646{
1647 YYFPRINTF (stderr, "Stack now");
Lev Walkin752e9732017-08-04 02:06:22 -07001648 for (; bottom <= top; ++bottom)
1649 YYFPRINTF (stderr, " %d", *bottom);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001650 YYFPRINTF (stderr, "\n");
1651}
1652
1653# define YY_STACK_PRINT(Bottom, Top) \
1654do { \
1655 if (yydebug) \
1656 yy_stack_print ((Bottom), (Top)); \
1657} while (YYID (0))
1658
1659
1660/*------------------------------------------------.
1661| Report that the YYRULE is going to be reduced. |
1662`------------------------------------------------*/
1663
1664#if (defined __STDC__ || defined __C99__FUNC__ \
1665 || defined __cplusplus || defined _MSC_VER)
1666static void
1667yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1668#else
1669static void
1670yy_reduce_print (yyvsp, yyrule)
1671 YYSTYPE *yyvsp;
1672 int yyrule;
1673#endif
1674{
1675 int yynrhs = yyr2[yyrule];
1676 int yyi;
1677 unsigned long int yylno = yyrline[yyrule];
1678 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1679 yyrule - 1, yylno);
1680 /* The symbols being reduced. */
1681 for (yyi = 0; yyi < yynrhs; yyi++)
1682 {
Lev Walkin752e9732017-08-04 02:06:22 -07001683 fprintf (stderr, " $%d = ", yyi + 1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001684 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1685 &(yyvsp[(yyi + 1) - (yynrhs)])
1686 );
Lev Walkin752e9732017-08-04 02:06:22 -07001687 fprintf (stderr, "\n");
Lev Walkin0e90aa02013-03-19 16:17:13 -07001688 }
1689}
1690
1691# define YY_REDUCE_PRINT(Rule) \
1692do { \
1693 if (yydebug) \
1694 yy_reduce_print (yyvsp, Rule); \
1695} while (YYID (0))
1696
Lev Walkin418298d2006-07-13 08:24:20 +00001697/* Nonzero means print parse trace. It is left uninitialized so that
1698 multiple parsers can coexist. */
1699int yydebug;
1700#else /* !YYDEBUG */
1701# define YYDPRINTF(Args)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001702# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1703# define YY_STACK_PRINT(Bottom, Top)
1704# define YY_REDUCE_PRINT(Rule)
Lev Walkin418298d2006-07-13 08:24:20 +00001705#endif /* !YYDEBUG */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001706
Lev Walkin0e90aa02013-03-19 16:17:13 -07001707
Lev Walkin418298d2006-07-13 08:24:20 +00001708/* YYINITDEPTH -- initial size of the parser's stacks. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001709#ifndef YYINITDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001710# define YYINITDEPTH 200
Lev Walkinf15320b2004-06-03 03:38:44 +00001711#endif
1712
Lev Walkin418298d2006-07-13 08:24:20 +00001713/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1714 if the built-in stack extension method is used).
1715
1716 Do not make this value too large; the results are undefined if
Lev Walkin0e90aa02013-03-19 16:17:13 -07001717 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Lev Walkin418298d2006-07-13 08:24:20 +00001718 evaluated with infinite-precision integer arithmetic. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001719
Lev Walkinf15320b2004-06-03 03:38:44 +00001720#ifndef YYMAXDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001721# define YYMAXDEPTH 10000
Lev Walkinf15320b2004-06-03 03:38:44 +00001722#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001723
Lev Walkin752e9732017-08-04 02:06:22 -07001724
Lev Walkinf15320b2004-06-03 03:38:44 +00001725
Lev Walkin418298d2006-07-13 08:24:20 +00001726#if YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +00001727
Lev Walkin418298d2006-07-13 08:24:20 +00001728# ifndef yystrlen
Lev Walkin0e90aa02013-03-19 16:17:13 -07001729# if defined __GLIBC__ && defined _STRING_H
Lev Walkin418298d2006-07-13 08:24:20 +00001730# define yystrlen strlen
1731# else
1732/* Return the length of YYSTR. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001733#if (defined __STDC__ || defined __C99__FUNC__ \
1734 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001735static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001736yystrlen (const char *yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001737#else
1738static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001739yystrlen (yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001740 const char *yystr;
1741#endif
Lev Walkina00d6b32006-03-21 03:40:38 +00001742{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001743 YYSIZE_T yylen;
1744 for (yylen = 0; yystr[yylen]; yylen++)
Lev Walkin418298d2006-07-13 08:24:20 +00001745 continue;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001746 return yylen;
Lev Walkin418298d2006-07-13 08:24:20 +00001747}
1748# endif
1749# endif
1750
1751# ifndef yystpcpy
Lev Walkin0e90aa02013-03-19 16:17:13 -07001752# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Lev Walkin418298d2006-07-13 08:24:20 +00001753# define yystpcpy stpcpy
1754# else
1755/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1756 YYDEST. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001757#if (defined __STDC__ || defined __C99__FUNC__ \
1758 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001759static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001760yystpcpy (char *yydest, const char *yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001761#else
1762static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001763yystpcpy (yydest, yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001764 char *yydest;
1765 const char *yysrc;
1766#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001767{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001768 char *yyd = yydest;
1769 const char *yys = yysrc;
Lev Walkin418298d2006-07-13 08:24:20 +00001770
1771 while ((*yyd++ = *yys++) != '\0')
1772 continue;
1773
1774 return yyd - 1;
1775}
1776# endif
1777# endif
1778
Lev Walkin0e90aa02013-03-19 16:17:13 -07001779# ifndef yytnamerr
1780/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1781 quotes and backslashes, so that it's suitable for yyerror. The
1782 heuristic is that double-quoting is unnecessary unless the string
1783 contains an apostrophe, a comma, or backslash (other than
1784 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1785 null, do not copy; instead, return the length of what the result
1786 would have been. */
1787static YYSIZE_T
1788yytnamerr (char *yyres, const char *yystr)
Lev Walkin418298d2006-07-13 08:24:20 +00001789{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001790 if (*yystr == '"')
Lev Walkin418298d2006-07-13 08:24:20 +00001791 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07001792 YYSIZE_T yyn = 0;
1793 char const *yyp = yystr;
Lev Walkin418298d2006-07-13 08:24:20 +00001794
Lev Walkin0e90aa02013-03-19 16:17:13 -07001795 for (;;)
1796 switch (*++yyp)
1797 {
1798 case '\'':
1799 case ',':
1800 goto do_not_strip_quotes;
1801
1802 case '\\':
1803 if (*++yyp != '\\')
1804 goto do_not_strip_quotes;
1805 /* Fall through. */
1806 default:
1807 if (yyres)
1808 yyres[yyn] = *yyp;
1809 yyn++;
1810 break;
1811
1812 case '"':
1813 if (yyres)
1814 yyres[yyn] = '\0';
1815 return yyn;
1816 }
1817 do_not_strip_quotes: ;
Lev Walkin418298d2006-07-13 08:24:20 +00001818 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001819
1820 if (! yyres)
1821 return yystrlen (yystr);
1822
1823 return yystpcpy (yyres, yystr) - yyres;
Lev Walkin418298d2006-07-13 08:24:20 +00001824}
Lev Walkin0e90aa02013-03-19 16:17:13 -07001825# endif
Lev Walkin418298d2006-07-13 08:24:20 +00001826
Lev Walkin752e9732017-08-04 02:06:22 -07001827/* Copy into YYRESULT an error message about the unexpected token
1828 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1829 including the terminating null byte. If YYRESULT is null, do not
1830 copy anything; just return the number of bytes that would be
1831 copied. As a special case, return 0 if an ordinary "syntax error"
1832 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1833 size calculation. */
1834static YYSIZE_T
1835yysyntax_error (char *yyresult, int yystate, int yychar)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001836{
Lev Walkin752e9732017-08-04 02:06:22 -07001837 int yyn = yypact[yystate];
Lev Walkin0e90aa02013-03-19 16:17:13 -07001838
Lev Walkin752e9732017-08-04 02:06:22 -07001839 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1840 return 0;
1841 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07001842 {
Lev Walkin752e9732017-08-04 02:06:22 -07001843 int yytype = YYTRANSLATE (yychar);
1844 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1845 YYSIZE_T yysize = yysize0;
1846 YYSIZE_T yysize1;
1847 int yysize_overflow = 0;
1848 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1849 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1850 int yyx;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001851
Lev Walkin752e9732017-08-04 02:06:22 -07001852# if 0
1853 /* This is so xgettext sees the translatable formats that are
1854 constructed on the fly. */
1855 YY_("syntax error, unexpected %s");
1856 YY_("syntax error, unexpected %s, expecting %s");
1857 YY_("syntax error, unexpected %s, expecting %s or %s");
1858 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1859 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1860# endif
1861 char *yyfmt;
1862 char const *yyf;
1863 static char const yyunexpected[] = "syntax error, unexpected %s";
1864 static char const yyexpecting[] = ", expecting %s";
1865 static char const yyor[] = " or %s";
1866 char yyformat[sizeof yyunexpected
1867 + sizeof yyexpecting - 1
1868 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1869 * (sizeof yyor - 1))];
1870 char const *yyprefix = yyexpecting;
1871
1872 /* Start YYX at -YYN if negative to avoid negative indexes in
1873 YYCHECK. */
1874 int yyxbegin = yyn < 0 ? -yyn : 0;
1875
1876 /* Stay within bounds of both yycheck and yytname. */
1877 int yychecklim = YYLAST - yyn + 1;
1878 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1879 int yycount = 1;
1880
1881 yyarg[0] = yytname[yytype];
1882 yyfmt = yystpcpy (yyformat, yyunexpected);
1883
1884 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1885 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1886 {
1887 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1888 {
1889 yycount = 1;
1890 yysize = yysize0;
1891 yyformat[sizeof yyunexpected - 1] = '\0';
1892 break;
1893 }
1894 yyarg[yycount++] = yytname[yyx];
1895 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1896 yysize_overflow |= (yysize1 < yysize);
1897 yysize = yysize1;
1898 yyfmt = yystpcpy (yyfmt, yyprefix);
1899 yyprefix = yyor;
1900 }
1901
1902 yyf = YY_(yyformat);
1903 yysize1 = yysize + yystrlen (yyf);
1904 yysize_overflow |= (yysize1 < yysize);
1905 yysize = yysize1;
1906
1907 if (yysize_overflow)
1908 return YYSIZE_MAXIMUM;
1909
1910 if (yyresult)
1911 {
1912 /* Avoid sprintf, as that infringes on the user's name space.
1913 Don't have undefined behavior even if the translation
1914 produced a string with the wrong number of "%s"s. */
1915 char *yyp = yyresult;
1916 int yyi = 0;
1917 while ((*yyp = *yyf) != '\0')
1918 {
1919 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1920 {
1921 yyp += yytnamerr (yyp, yyarg[yyi++]);
1922 yyf += 2;
1923 }
1924 else
1925 {
1926 yyp++;
1927 yyf++;
1928 }
1929 }
1930 }
1931 return yysize;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001932 }
1933}
1934#endif /* YYERROR_VERBOSE */
Lev Walkin752e9732017-08-04 02:06:22 -07001935
Lev Walkin418298d2006-07-13 08:24:20 +00001936
1937/*-----------------------------------------------.
1938| Release the memory associated to this symbol. |
1939`-----------------------------------------------*/
1940
Lev Walkin0e90aa02013-03-19 16:17:13 -07001941/*ARGSUSED*/
1942#if (defined __STDC__ || defined __C99__FUNC__ \
1943 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001944static void
Lev Walkin0e90aa02013-03-19 16:17:13 -07001945yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Lev Walkin418298d2006-07-13 08:24:20 +00001946#else
Lev Walkin0e90aa02013-03-19 16:17:13 -07001947static void
1948yydestruct (yymsg, yytype, yyvaluep)
1949 const char *yymsg;
Lev Walkin418298d2006-07-13 08:24:20 +00001950 int yytype;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001951 YYSTYPE *yyvaluep;
Lev Walkin418298d2006-07-13 08:24:20 +00001952#endif
1953{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001954 YYUSE (yyvaluep);
1955
1956 if (!yymsg)
1957 yymsg = "Deleting";
1958 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
Lev Walkin418298d2006-07-13 08:24:20 +00001959
Lev Walkin752e9732017-08-04 02:06:22 -07001960 switch (yytype)
1961 {
1962
1963 default:
1964 break;
1965 }
Lev Walkina00d6b32006-03-21 03:40:38 +00001966}
Lev Walkin752e9732017-08-04 02:06:22 -07001967
1968
1969/* Prevent warnings from -Wmissing-prototypes. */
1970
1971#ifdef YYPARSE_PARAM
1972#if defined __STDC__ || defined __cplusplus
1973int yyparse (void *YYPARSE_PARAM);
1974#else
1975int yyparse ();
1976#endif
1977#else /* ! YYPARSE_PARAM */
1978#if defined __STDC__ || defined __cplusplus
1979int yyparse (void);
1980#else
1981int yyparse ();
1982#endif
1983#endif /* ! YYPARSE_PARAM */
Lev Walkin418298d2006-07-13 08:24:20 +00001984
1985
Lev Walkin0e90aa02013-03-19 16:17:13 -07001986
Lev Walkin752e9732017-08-04 02:06:22 -07001987/* The look-ahead symbol. */
Lev Walkin418298d2006-07-13 08:24:20 +00001988int yychar;
1989
Lev Walkin752e9732017-08-04 02:06:22 -07001990/* The semantic value of the look-ahead symbol. */
1991YYSTYPE yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00001992
Lev Walkin0e90aa02013-03-19 16:17:13 -07001993/* Number of syntax errors so far. */
Lev Walkin418298d2006-07-13 08:24:20 +00001994int yynerrs;
1995
Lev Walkinfb872bd2006-03-18 06:53:11 +00001996
Lev Walkin752e9732017-08-04 02:06:22 -07001997
Lev Walkin0e90aa02013-03-19 16:17:13 -07001998/*----------.
1999| yyparse. |
2000`----------*/
2001
2002#ifdef YYPARSE_PARAM
2003#if (defined __STDC__ || defined __C99__FUNC__ \
2004 || defined __cplusplus || defined _MSC_VER)
Lev Walkinfb872bd2006-03-18 06:53:11 +00002005int
Lev Walkin0e90aa02013-03-19 16:17:13 -07002006yyparse (void *YYPARSE_PARAM)
2007#else
2008int
2009yyparse (YYPARSE_PARAM)
2010 void *YYPARSE_PARAM;
2011#endif
2012#else /* ! YYPARSE_PARAM */
2013#if (defined __STDC__ || defined __C99__FUNC__ \
2014 || defined __cplusplus || defined _MSC_VER)
2015int
2016yyparse (void)
2017#else
2018int
2019yyparse ()
2020
2021#endif
2022#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00002023{
Lev Walkin752e9732017-08-04 02:06:22 -07002024
2025 int yystate;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002026 int yyn;
Lev Walkin418298d2006-07-13 08:24:20 +00002027 int yyresult;
Lev Walkin752e9732017-08-04 02:06:22 -07002028 /* Number of tokens to shift before error messages enabled. */
2029 int yyerrstatus;
2030 /* Look-ahead token as an internal (translated) token number. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002031 int yytoken = 0;
2032#if YYERROR_VERBOSE
2033 /* Buffer for error messages, and its allocated size. */
2034 char yymsgbuf[128];
2035 char *yymsg = yymsgbuf;
2036 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2037#endif
Lev Walkin418298d2006-07-13 08:24:20 +00002038
Lev Walkin752e9732017-08-04 02:06:22 -07002039 /* Three stacks and their tools:
2040 `yyss': related to states,
2041 `yyvs': related to semantic values,
2042 `yyls': related to locations.
2043
2044 Refer to the stacks thru separate pointers, to allow yyoverflow
2045 to reallocate them elsewhere. */
2046
2047 /* The state stack. */
2048 yytype_int16 yyssa[YYINITDEPTH];
2049 yytype_int16 *yyss = yyssa;
2050 yytype_int16 *yyssp;
2051
2052 /* The semantic value stack. */
2053 YYSTYPE yyvsa[YYINITDEPTH];
2054 YYSTYPE *yyvs = yyvsa;
2055 YYSTYPE *yyvsp;
2056
2057
2058
Lev Walkin0e90aa02013-03-19 16:17:13 -07002059#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
Lev Walkinf15320b2004-06-03 03:38:44 +00002060
Lev Walkin752e9732017-08-04 02:06:22 -07002061 YYSIZE_T yystacksize = YYINITDEPTH;
2062
2063 /* The variables used to return semantic value and location from the
2064 action routines. */
2065 YYSTYPE yyval;
2066
2067
Lev Walkin0e90aa02013-03-19 16:17:13 -07002068 /* The number of symbols on the RHS of the reduced rule.
2069 Keep to zero when no symbol should be popped. */
2070 int yylen = 0;
Lev Walkinf15320b2004-06-03 03:38:44 +00002071
Lev Walkin418298d2006-07-13 08:24:20 +00002072 YYDPRINTF ((stderr, "Starting parse\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002073
2074 yystate = 0;
2075 yyerrstatus = 0;
2076 yynerrs = 0;
Lev Walkin752e9732017-08-04 02:06:22 -07002077 yychar = YYEMPTY; /* Cause a token to be read. */
2078
2079 /* Initialize stack pointers.
2080 Waste one element of value and location stack
2081 so that they stay on the same level as the state stack.
2082 The wasted elements are never initialized. */
2083
2084 yyssp = yyss;
2085 yyvsp = yyvs;
2086
Lev Walkin418298d2006-07-13 08:24:20 +00002087 goto yysetstate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002088
Lev Walkin418298d2006-07-13 08:24:20 +00002089/*------------------------------------------------------------.
2090| yynewstate -- Push a new state, which is found in yystate. |
2091`------------------------------------------------------------*/
2092 yynewstate:
2093 /* In all cases, when you get here, the value and location stacks
Lev Walkin0e90aa02013-03-19 16:17:13 -07002094 have just been pushed. So pushing a state here evens the stacks. */
Lev Walkin418298d2006-07-13 08:24:20 +00002095 yyssp++;
2096
2097 yysetstate:
2098 *yyssp = yystate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002099
Lev Walkin0e90aa02013-03-19 16:17:13 -07002100 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002101 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002102 /* Get the current used size of the three stacks, in elements. */
Lev Walkin418298d2006-07-13 08:24:20 +00002103 YYSIZE_T yysize = yyssp - yyss + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002104
2105#ifdef yyoverflow
Lev Walkin418298d2006-07-13 08:24:20 +00002106 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002107 /* Give user a chance to reallocate the stack. Use copies of
Lev Walkin418298d2006-07-13 08:24:20 +00002108 these so that the &'s don't force the real ones into
2109 memory. */
2110 YYSTYPE *yyvs1 = yyvs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002111 yytype_int16 *yyss1 = yyss;
Lev Walkinf15320b2004-06-03 03:38:44 +00002112
Lev Walkin752e9732017-08-04 02:06:22 -07002113
Lev Walkin418298d2006-07-13 08:24:20 +00002114 /* Each stack pointer address is followed by the size of the
2115 data in use in that stack, in bytes. This used to be a
2116 conditional around just the two extra args, but that might
2117 be undefined if yyoverflow is a macro. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002118 yyoverflow (YY_("memory exhausted"),
Lev Walkin418298d2006-07-13 08:24:20 +00002119 &yyss1, yysize * sizeof (*yyssp),
2120 &yyvs1, yysize * sizeof (*yyvsp),
Lev Walkin752e9732017-08-04 02:06:22 -07002121
Lev Walkin418298d2006-07-13 08:24:20 +00002122 &yystacksize);
2123
2124 yyss = yyss1;
2125 yyvs = yyvs1;
2126 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002127#else /* no yyoverflow */
Lev Walkin418298d2006-07-13 08:24:20 +00002128# ifndef YYSTACK_RELOCATE
Lev Walkin0e90aa02013-03-19 16:17:13 -07002129 goto yyexhaustedlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002130# else
Lev Walkinf15320b2004-06-03 03:38:44 +00002131 /* Extend the stack our own way. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002132 if (YYMAXDEPTH <= yystacksize)
2133 goto yyexhaustedlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002134 yystacksize *= 2;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002135 if (YYMAXDEPTH < yystacksize)
Lev Walkinf15320b2004-06-03 03:38:44 +00002136 yystacksize = YYMAXDEPTH;
Lev Walkin418298d2006-07-13 08:24:20 +00002137
2138 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002139 yytype_int16 *yyss1 = yyss;
Lev Walkin418298d2006-07-13 08:24:20 +00002140 union yyalloc *yyptr =
2141 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2142 if (! yyptr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07002143 goto yyexhaustedlab;
Lev Walkin752e9732017-08-04 02:06:22 -07002144 YYSTACK_RELOCATE (yyss);
2145 YYSTACK_RELOCATE (yyvs);
2146
Lev Walkin418298d2006-07-13 08:24:20 +00002147# undef YYSTACK_RELOCATE
2148 if (yyss1 != yyssa)
2149 YYSTACK_FREE (yyss1);
2150 }
2151# endif
Lev Walkinf15320b2004-06-03 03:38:44 +00002152#endif /* no yyoverflow */
2153
Lev Walkin418298d2006-07-13 08:24:20 +00002154 yyssp = yyss + yysize - 1;
2155 yyvsp = yyvs + yysize - 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002156
Lev Walkin752e9732017-08-04 02:06:22 -07002157
Lev Walkin418298d2006-07-13 08:24:20 +00002158 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2159 (unsigned long int) yystacksize));
Lev Walkinf15320b2004-06-03 03:38:44 +00002160
Lev Walkin0e90aa02013-03-19 16:17:13 -07002161 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002162 YYABORT;
2163 }
2164
Lev Walkin418298d2006-07-13 08:24:20 +00002165 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Lev Walkinf15320b2004-06-03 03:38:44 +00002166
2167 goto yybackup;
Lev Walkin418298d2006-07-13 08:24:20 +00002168
2169/*-----------.
2170| yybackup. |
2171`-----------*/
2172yybackup:
Lev Walkinf15320b2004-06-03 03:38:44 +00002173
Lev Walkin0e90aa02013-03-19 16:17:13 -07002174 /* Do appropriate processing given the current state. Read a
Lev Walkin752e9732017-08-04 02:06:22 -07002175 look-ahead token if we need one and don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002176
Lev Walkin752e9732017-08-04 02:06:22 -07002177 /* First try to decide what to do without reference to look-ahead token. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002178 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07002179 if (yyn == YYPACT_NINF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002180 goto yydefault;
2181
Lev Walkin752e9732017-08-04 02:06:22 -07002182 /* Not known => get a look-ahead token if don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002183
Lev Walkin752e9732017-08-04 02:06:22 -07002184 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002185 if (yychar == YYEMPTY)
2186 {
Lev Walkin418298d2006-07-13 08:24:20 +00002187 YYDPRINTF ((stderr, "Reading a token: "));
Lev Walkinf15320b2004-06-03 03:38:44 +00002188 yychar = YYLEX;
2189 }
2190
Lev Walkin0e90aa02013-03-19 16:17:13 -07002191 if (yychar <= YYEOF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002192 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002193 yychar = yytoken = YYEOF;
Lev Walkin418298d2006-07-13 08:24:20 +00002194 YYDPRINTF ((stderr, "Now at end of input.\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002195 }
2196 else
2197 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002198 yytoken = YYTRANSLATE (yychar);
2199 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Lev Walkinf15320b2004-06-03 03:38:44 +00002200 }
2201
Lev Walkin0e90aa02013-03-19 16:17:13 -07002202 /* If the proper action on seeing token YYTOKEN is to reduce or to
Lev Walkin418298d2006-07-13 08:24:20 +00002203 detect an error, take that action. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002204 yyn += yytoken;
2205 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Lev Walkinf15320b2004-06-03 03:38:44 +00002206 goto yydefault;
Lev Walkinf15320b2004-06-03 03:38:44 +00002207 yyn = yytable[yyn];
Lev Walkin418298d2006-07-13 08:24:20 +00002208 if (yyn <= 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00002209 {
Lev Walkin752e9732017-08-04 02:06:22 -07002210 if (yyn == 0 || yyn == YYTABLE_NINF)
2211 goto yyerrlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002212 yyn = -yyn;
2213 goto yyreduce;
2214 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002215
Lev Walkin752e9732017-08-04 02:06:22 -07002216 if (yyn == YYFINAL)
2217 YYACCEPT;
2218
Lev Walkin418298d2006-07-13 08:24:20 +00002219 /* Count tokens shifted since error; after three, turn off error
2220 status. */
2221 if (yyerrstatus)
2222 yyerrstatus--;
Lev Walkinf15320b2004-06-03 03:38:44 +00002223
Lev Walkin752e9732017-08-04 02:06:22 -07002224 /* Shift the look-ahead token. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002225 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2226
Lev Walkin752e9732017-08-04 02:06:22 -07002227 /* Discard the shifted token unless it is eof. */
2228 if (yychar != YYEOF)
2229 yychar = YYEMPTY;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002230
Lev Walkinf15320b2004-06-03 03:38:44 +00002231 yystate = yyn;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002232 *++yyvsp = yylval;
2233
Lev Walkinf15320b2004-06-03 03:38:44 +00002234 goto yynewstate;
2235
Lev Walkina00d6b32006-03-21 03:40:38 +00002236
Lev Walkin418298d2006-07-13 08:24:20 +00002237/*-----------------------------------------------------------.
2238| yydefault -- do the default action for the current state. |
2239`-----------------------------------------------------------*/
2240yydefault:
Lev Walkinf15320b2004-06-03 03:38:44 +00002241 yyn = yydefact[yystate];
2242 if (yyn == 0)
2243 goto yyerrlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002244 goto yyreduce;
Lev Walkinf15320b2004-06-03 03:38:44 +00002245
Lev Walkin418298d2006-07-13 08:24:20 +00002246
2247/*-----------------------------.
2248| yyreduce -- Do a reduction. |
2249`-----------------------------*/
Lev Walkinf15320b2004-06-03 03:38:44 +00002250yyreduce:
Lev Walkin418298d2006-07-13 08:24:20 +00002251 /* yyn is the number of a rule to reduce with. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002252 yylen = yyr2[yyn];
Lev Walkinf15320b2004-06-03 03:38:44 +00002253
Lev Walkin418298d2006-07-13 08:24:20 +00002254 /* If YYLEN is nonzero, implement the default value of the action:
2255 `$$ = $1'.
2256
2257 Otherwise, the following line sets YYVAL to garbage.
2258 This behavior is undocumented and Bison
2259 users should not rely upon it. Assigning to YYVAL
2260 unconditionally makes the parser a bit smaller, and it avoids a
2261 GCC warning that YYVAL may be used uninitialized. */
2262 yyval = yyvsp[1-yylen];
2263
2264
Lev Walkin0e90aa02013-03-19 16:17:13 -07002265 YY_REDUCE_PRINT (yyn);
Lev Walkin418298d2006-07-13 08:24:20 +00002266 switch (yyn)
2267 {
2268 case 2:
Lev Walkind523ea42017-09-06 22:15:08 -07002269#line 367 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002270 {
Lev Walkin752e9732017-08-04 02:06:22 -07002271 *(void **)param = (yyvsp[(2) - (2)].a_grammar);
2272 }
2273 break;
2274
2275 case 3:
Lev Walkind523ea42017-09-06 22:15:08 -07002276#line 370 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002277 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002278 *(void **)param = (yyvsp[(1) - (1)].a_grammar);
Lev Walkin418298d2006-07-13 08:24:20 +00002279 }
2280 break;
2281
Lev Walkin752e9732017-08-04 02:06:22 -07002282 case 4:
Lev Walkind523ea42017-09-06 22:15:08 -07002283#line 376 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002284 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002285 (yyval.a_grammar) = asn1p_new();
2286 checkmem((yyval.a_grammar));
2287 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(1) - (1)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002288 }
2289 break;
2290
Lev Walkin752e9732017-08-04 02:06:22 -07002291 case 5:
Lev Walkind523ea42017-09-06 22:15:08 -07002292#line 381 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002293 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002294 (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar);
2295 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002296 }
2297 break;
2298
Lev Walkin752e9732017-08-04 02:06:22 -07002299 case 6:
Lev Walkind523ea42017-09-06 22:15:08 -07002300#line 398 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002301 { currentModule = asn1p_module_new(); }
2302 break;
2303
Lev Walkin752e9732017-08-04 02:06:22 -07002304 case 7:
Lev Walkind523ea42017-09-06 22:15:08 -07002305#line 403 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002306 {
Lev Walkinfb872bd2006-03-18 06:53:11 +00002307
Lev Walkin0e90aa02013-03-19 16:17:13 -07002308 (yyval.a_module) = currentModule;
Lev Walkina9532f42006-09-17 04:52:50 +00002309
Lev Walkin0e90aa02013-03-19 16:17:13 -07002310 if((yyvsp[(8) - (9)].a_module)) {
2311 asn1p_module_t tmp = *((yyval.a_module));
2312 *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module));
2313 *((yyvsp[(8) - (9)].a_module)) = tmp;
2314 asn1p_module_free((yyvsp[(8) - (9)].a_module));
Lev Walkinf15320b2004-06-03 03:38:44 +00002315 } else {
2316 /* There's a chance that a module is just plain empty */
Lev Walkinf15320b2004-06-03 03:38:44 +00002317 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002318
Lev Walkin0e90aa02013-03-19 16:17:13 -07002319 (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str);
2320 (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid);
2321 (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002322 }
2323 break;
2324
Lev Walkin752e9732017-08-04 02:06:22 -07002325 case 8:
Lev Walkind523ea42017-09-06 22:15:08 -07002326#line 427 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002327 { (yyval.a_oid) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002328 break;
2329
Lev Walkin752e9732017-08-04 02:06:22 -07002330 case 9:
Lev Walkind523ea42017-09-06 22:15:08 -07002331#line 428 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002332 { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002333 break;
2334
Lev Walkin752e9732017-08-04 02:06:22 -07002335 case 10:
Lev Walkind523ea42017-09-06 22:15:08 -07002336#line 432 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002337 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002338 (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid);
Lev Walkin418298d2006-07-13 08:24:20 +00002339 }
2340 break;
2341
Lev Walkin752e9732017-08-04 02:06:22 -07002342 case 11:
Lev Walkind523ea42017-09-06 22:15:08 -07002343#line 435 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002344 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002345 (yyval.a_oid) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002346 }
2347 break;
2348
Lev Walkin752e9732017-08-04 02:06:22 -07002349 case 12:
Lev Walkind523ea42017-09-06 22:15:08 -07002350#line 441 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002351 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002352 (yyval.a_oid) = asn1p_oid_new();
2353 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002354 if((yyvsp[(1) - (1)].a_oid_arc).name)
2355 free((yyvsp[(1) - (1)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002356 }
2357 break;
2358
Lev Walkin752e9732017-08-04 02:06:22 -07002359 case 13:
Lev Walkind523ea42017-09-06 22:15:08 -07002360#line 447 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002361 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002362 (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid);
2363 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002364 if((yyvsp[(2) - (2)].a_oid_arc).name)
2365 free((yyvsp[(2) - (2)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002366 }
2367 break;
2368
Lev Walkin752e9732017-08-04 02:06:22 -07002369 case 14:
Lev Walkind523ea42017-09-06 22:15:08 -07002370#line 456 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002371 { /* iso */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002372 (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str);
2373 (yyval.a_oid_arc).number = -1;
Lev Walkin418298d2006-07-13 08:24:20 +00002374 }
2375 break;
2376
Lev Walkin752e9732017-08-04 02:06:22 -07002377 case 15:
Lev Walkind523ea42017-09-06 22:15:08 -07002378#line 460 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002379 { /* iso(1) */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002380 (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str);
2381 (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002382 }
2383 break;
2384
Lev Walkin752e9732017-08-04 02:06:22 -07002385 case 16:
Lev Walkind523ea42017-09-06 22:15:08 -07002386#line 464 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002387 { /* 1 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002388 (yyval.a_oid_arc).name = 0;
2389 (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002390 }
2391 break;
2392
Lev Walkin752e9732017-08-04 02:06:22 -07002393 case 17:
Lev Walkind523ea42017-09-06 22:15:08 -07002394#line 474 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002395 { (yyval.a_module_flags) = MSF_NOFLAGS; }
Lev Walkin418298d2006-07-13 08:24:20 +00002396 break;
2397
Lev Walkin418298d2006-07-13 08:24:20 +00002398 case 18:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002399#line 475 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002400 {
Lev Walkin752e9732017-08-04 02:06:22 -07002401 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2402 }
2403 break;
2404
Lev Walkind523ea42017-09-06 22:15:08 -07002405 case 19:
2406#line 484 "asn1p_y.y"
2407 {
2408 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2409 }
2410 break;
2411
Lev Walkin752e9732017-08-04 02:06:22 -07002412 case 20:
Lev Walkind523ea42017-09-06 22:15:08 -07002413#line 487 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002414 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002415 (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002416 }
2417 break;
2418
Lev Walkin752e9732017-08-04 02:06:22 -07002419 case 21:
Lev Walkind523ea42017-09-06 22:15:08 -07002420#line 496 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002421 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002422 (yyval.a_module_flags) = MSF_EXPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002423 }
2424 break;
2425
Lev Walkin752e9732017-08-04 02:06:22 -07002426 case 22:
Lev Walkind523ea42017-09-06 22:15:08 -07002427#line 499 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002428 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002429 (yyval.a_module_flags) = MSF_IMPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002430 }
2431 break;
2432
Lev Walkin752e9732017-08-04 02:06:22 -07002433 case 23:
Lev Walkind523ea42017-09-06 22:15:08 -07002434#line 502 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002435 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002436 (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002437 }
2438 break;
2439
Lev Walkin752e9732017-08-04 02:06:22 -07002440 case 24:
Lev Walkind523ea42017-09-06 22:15:08 -07002441#line 505 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002442 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002443 (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED;
Lev Walkin418298d2006-07-13 08:24:20 +00002444 }
2445 break;
2446
Lev Walkin752e9732017-08-04 02:06:22 -07002447 case 25:
Lev Walkind523ea42017-09-06 22:15:08 -07002448#line 509 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002449 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002450 /* X.680Amd1 specifies TAG and XER */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002451 if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) {
2452 (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS;
2453 } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) {
2454 (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002455 } else {
2456 fprintf(stderr,
Lev Walkind523ea42017-09-06 22:15:08 -07002457 "WARNING: %s INSTRUCTIONS at %s:%d: "
Lev Walkinf59d0752004-08-18 04:59:12 +00002458 "Unrecognized encoding reference\n",
Lev Walkind523ea42017-09-06 22:15:08 -07002459 (yyvsp[(1) - (2)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002460 (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002461 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002462 free((yyvsp[(1) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00002463 }
2464 break;
2465
Lev Walkin752e9732017-08-04 02:06:22 -07002466 case 26:
Lev Walkind523ea42017-09-06 22:15:08 -07002467#line 530 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002468 { (yyval.a_module) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002469 break;
2470
Lev Walkin752e9732017-08-04 02:06:22 -07002471 case 27:
Lev Walkind523ea42017-09-06 22:15:08 -07002472#line 531 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002473 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002474 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002475 }
2476 break;
2477
Lev Walkin752e9732017-08-04 02:06:22 -07002478 case 28:
Lev Walkind523ea42017-09-06 22:15:08 -07002479#line 540 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002480 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002481 (yyval.a_module) = asn1p_module_new();
2482 AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next);
2483 AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next);
2484 AL_IMPORT((yyval.a_module), members, (yyvsp[(3) - (3)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002485
2486 asn1p_module_free((yyvsp[(1) - (3)].a_module));
2487 asn1p_module_free((yyvsp[(2) - (3)].a_module));
2488 asn1p_module_free((yyvsp[(3) - (3)].a_module));
Lev Walkin418298d2006-07-13 08:24:20 +00002489 }
2490 break;
2491
Lev Walkin752e9732017-08-04 02:06:22 -07002492 case 29:
Lev Walkind523ea42017-09-06 22:15:08 -07002493#line 553 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002494 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002495 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002496 }
2497 break;
2498
Lev Walkin752e9732017-08-04 02:06:22 -07002499 case 30:
Lev Walkind523ea42017-09-06 22:15:08 -07002500#line 556 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002501 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002502 if((yyvsp[(1) - (2)].a_module)) {
2503 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002504 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002505 (yyval.a_module) = (yyvsp[(2) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002506 break;
2507 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002508 AL_IMPORT((yyval.a_module), members, (yyvsp[(2) - (2)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002509 asn1p_module_free((yyvsp[(2) - (2)].a_module));
Lev Walkin866bd7f2006-09-14 10:35:20 +00002510 }
2511 break;
2512
Lev Walkin418298d2006-07-13 08:24:20 +00002513 case 31:
Lev Walkind523ea42017-09-06 22:15:08 -07002514#line 573 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002515 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002516 (yyval.a_module) = asn1p_module_new();
2517 checkmem((yyval.a_module));
2518 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2519 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2520 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002521 }
2522 break;
2523
2524 case 32:
Lev Walkind523ea42017-09-06 22:15:08 -07002525#line 580 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002526 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002527 (yyval.a_module) = asn1p_module_new();
2528 checkmem((yyval.a_module));
2529 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2530 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2531 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkina9532f42006-09-17 04:52:50 +00002532 }
Lev Walkin418298d2006-07-13 08:24:20 +00002533 break;
2534
Lev Walkin866bd7f2006-09-14 10:35:20 +00002535 case 33:
Lev Walkind523ea42017-09-06 22:15:08 -07002536#line 594 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002537 {
2538 (yyval.a_module) = asn1p_module_new();
2539 checkmem((yyval.a_module));
2540 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2541 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2542 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
2543 }
Lev Walkina9532f42006-09-17 04:52:50 +00002544 break;
2545
2546 case 34:
Lev Walkind523ea42017-09-06 22:15:08 -07002547#line 602 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002548 { asn1p_lexer_hack_push_encoding_control(); }
2549 break;
2550
2551 case 35:
Lev Walkind523ea42017-09-06 22:15:08 -07002552#line 603 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002553 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002554 fprintf(stderr,
2555 "WARNING: ENCODING-CONTROL %s "
Lev Walkind523ea42017-09-06 22:15:08 -07002556 "specification at %s:%d ignored\n",
2557 (yyvsp[(2) - (3)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002558 free((yyvsp[(2) - (3)].tv_str));
2559 (yyval.a_module) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002560 }
2561 break;
2562
Lev Walkin752e9732017-08-04 02:06:22 -07002563 case 36:
Lev Walkind523ea42017-09-06 22:15:08 -07002564#line 615 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002565 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002566 return yyerror(
Lev Walkin70853052005-11-26 11:21:55 +00002567 "Attempt to redefine a standard basic string type, "
2568 "please comment out or remove this type redefinition.");
Lev Walkin418298d2006-07-13 08:24:20 +00002569 }
2570 break;
2571
Lev Walkin752e9732017-08-04 02:06:22 -07002572 case 37:
Lev Walkind523ea42017-09-06 22:15:08 -07002573#line 628 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002574 { (yyval.a_module) = 0; }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002575 break;
2576
Lev Walkin752e9732017-08-04 02:06:22 -07002577 case 39:
Lev Walkind523ea42017-09-06 22:15:08 -07002578#line 632 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002579 {
Lev Walkinb36317c2005-08-12 10:09:10 +00002580 if(!saved_aid && 0)
2581 return yyerror("Unterminated IMPORTS FROM, "
2582 "expected semicolon ';'");
2583 saved_aid = 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002584 (yyval.a_module) = (yyvsp[(2) - (3)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002585 }
2586 break;
2587
Lev Walkin752e9732017-08-04 02:06:22 -07002588 case 40:
Lev Walkind523ea42017-09-06 22:15:08 -07002589#line 642 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002590 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002591 return yyerror("Empty IMPORTS list");
Lev Walkin418298d2006-07-13 08:24:20 +00002592 }
2593 break;
2594
Lev Walkin752e9732017-08-04 02:06:22 -07002595 case 41:
Lev Walkind523ea42017-09-06 22:15:08 -07002596#line 648 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002597 { (yyval.a_module) = asn1p_module_new(); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002598 break;
2599
Lev Walkin752e9732017-08-04 02:06:22 -07002600 case 43:
Lev Walkind523ea42017-09-06 22:15:08 -07002601#line 652 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002602 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002603 (yyval.a_module) = asn1p_module_new();
2604 checkmem((yyval.a_module));
2605 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002606 }
2607 break;
2608
Lev Walkin752e9732017-08-04 02:06:22 -07002609 case 44:
Lev Walkind523ea42017-09-06 22:15:08 -07002610#line 657 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002611 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002612 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
2613 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002614 }
2615 break;
2616
Lev Walkin752e9732017-08-04 02:06:22 -07002617 case 45:
Lev Walkind523ea42017-09-06 22:15:08 -07002618#line 664 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002619 { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); }
Lev Walkin418298d2006-07-13 08:24:20 +00002620 break;
2621
Lev Walkin752e9732017-08-04 02:06:22 -07002622 case 46:
Lev Walkind523ea42017-09-06 22:15:08 -07002623#line 665 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002624 { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002625 break;
2626
Lev Walkin752e9732017-08-04 02:06:22 -07002627 case 47:
Lev Walkind523ea42017-09-06 22:15:08 -07002628#line 669 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002629 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002630 (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports);
2631 (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str);
2632 (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid);
Lev Walkinb36317c2005-08-12 10:09:10 +00002633 /* This stupid thing is used for look-back hack. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002634 saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier);
2635 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002636 }
2637 break;
2638
Lev Walkin752e9732017-08-04 02:06:22 -07002639 case 48:
Lev Walkind523ea42017-09-06 22:15:08 -07002640#line 680 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002641 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002642 (yyval.a_xports) = asn1p_xports_new();
2643 checkmem((yyval.a_xports));
2644 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002645 }
2646 break;
2647
Lev Walkin752e9732017-08-04 02:06:22 -07002648 case 49:
Lev Walkind523ea42017-09-06 22:15:08 -07002649#line 685 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002650 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002651 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2652 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002653 }
2654 break;
2655
Lev Walkin752e9732017-08-04 02:06:22 -07002656 case 50:
Lev Walkind523ea42017-09-06 22:15:08 -07002657#line 692 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002658 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002659 (yyval.a_expr) = NEW_EXPR();
2660 checkmem((yyval.a_expr));
2661 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2662 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin418298d2006-07-13 08:24:20 +00002663 }
2664 break;
2665
Lev Walkin752e9732017-08-04 02:06:22 -07002666 case 51:
Lev Walkind523ea42017-09-06 22:15:08 -07002667#line 698 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002668 { /* Completely equivalent to above */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002669 (yyval.a_expr) = NEW_EXPR();
2670 checkmem((yyval.a_expr));
2671 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2672 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002673 }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002674 break;
2675
Lev Walkin752e9732017-08-04 02:06:22 -07002676 case 52:
Lev Walkind523ea42017-09-06 22:15:08 -07002677#line 704 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002678 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002679 (yyval.a_expr) = NEW_EXPR();
2680 checkmem((yyval.a_expr));
2681 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2682 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002683 }
2684 break;
2685
Lev Walkin752e9732017-08-04 02:06:22 -07002686 case 53:
Lev Walkind523ea42017-09-06 22:15:08 -07002687#line 714 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002688 { (yyval.a_module) = 0; }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002689 break;
2690
Lev Walkin752e9732017-08-04 02:06:22 -07002691 case 54:
Lev Walkind523ea42017-09-06 22:15:08 -07002692#line 715 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002693 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002694 (yyval.a_module) = asn1p_module_new();
2695 checkmem((yyval.a_module));
2696 if((yyvsp[(1) - (1)].a_xports)) {
2697 TQ_ADD(&((yyval.a_module)->exports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002698 } else {
2699 /* "EXPORTS ALL;" */
2700 }
2701 }
2702 break;
2703
Lev Walkin752e9732017-08-04 02:06:22 -07002704 case 55:
Lev Walkind523ea42017-09-06 22:15:08 -07002705#line 727 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002706 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002707 (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports);
Lev Walkin418298d2006-07-13 08:24:20 +00002708 }
2709 break;
2710
Lev Walkin752e9732017-08-04 02:06:22 -07002711 case 56:
Lev Walkind523ea42017-09-06 22:15:08 -07002712#line 730 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002713 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002714 (yyval.a_xports) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002715 }
2716 break;
2717
Lev Walkin752e9732017-08-04 02:06:22 -07002718 case 57:
Lev Walkind523ea42017-09-06 22:15:08 -07002719#line 733 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002720 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002721 /* Empty EXPORTS clause effectively prohibits export. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002722 (yyval.a_xports) = asn1p_xports_new();
2723 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002724 }
2725 break;
2726
Lev Walkin752e9732017-08-04 02:06:22 -07002727 case 58:
Lev Walkind523ea42017-09-06 22:15:08 -07002728#line 741 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002729 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002730 (yyval.a_xports) = asn1p_xports_new();
2731 assert((yyval.a_xports));
2732 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002733 }
2734 break;
2735
Lev Walkin752e9732017-08-04 02:06:22 -07002736 case 59:
Lev Walkind523ea42017-09-06 22:15:08 -07002737#line 746 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002738 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002739 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2740 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002741 }
2742 break;
2743
Lev Walkin752e9732017-08-04 02:06:22 -07002744 case 60:
Lev Walkind523ea42017-09-06 22:15:08 -07002745#line 753 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002746 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002747 (yyval.a_expr) = NEW_EXPR();
2748 checkmem((yyval.a_expr));
2749 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2750 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin418298d2006-07-13 08:24:20 +00002751 }
2752 break;
2753
Lev Walkin752e9732017-08-04 02:06:22 -07002754 case 61:
Lev Walkind523ea42017-09-06 22:15:08 -07002755#line 759 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002756 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002757 (yyval.a_expr) = NEW_EXPR();
2758 checkmem((yyval.a_expr));
2759 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2760 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002761 }
Lev Walkin418298d2006-07-13 08:24:20 +00002762 break;
2763
Lev Walkin752e9732017-08-04 02:06:22 -07002764 case 62:
Lev Walkind523ea42017-09-06 22:15:08 -07002765#line 765 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002766 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002767 (yyval.a_expr) = NEW_EXPR();
2768 checkmem((yyval.a_expr));
2769 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2770 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002771 }
2772 break;
2773
Lev Walkin752e9732017-08-04 02:06:22 -07002774 case 63:
Lev Walkind523ea42017-09-06 22:15:08 -07002775#line 774 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002776 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002777 break;
2778
Lev Walkin752e9732017-08-04 02:06:22 -07002779 case 64:
Lev Walkind523ea42017-09-06 22:15:08 -07002780#line 777 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002781 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002782 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
2783 assert((yyval.a_expr)->Identifier == 0);
2784 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
2785 (yyval.a_expr)->meta_type = AMT_VALUESET;
2786 (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002787 }
2788 break;
2789
Lev Walkin752e9732017-08-04 02:06:22 -07002790 case 65:
Lev Walkind523ea42017-09-06 22:15:08 -07002791#line 787 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002792 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002793 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00002794 }
2795 break;
2796
Lev Walkin752e9732017-08-04 02:06:22 -07002797 case 66:
Lev Walkind523ea42017-09-06 22:15:08 -07002798#line 800 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002799 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002800 (yyval.a_expr) = NEW_EXPR();
2801 checkmem((yyval.a_expr));
2802 (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref);
2803 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2804 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002805 }
2806 break;
2807
Lev Walkin752e9732017-08-04 02:06:22 -07002808 case 67:
Lev Walkind523ea42017-09-06 22:15:08 -07002809#line 810 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002810 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002811 (yyval.a_expr) = NEW_EXPR();
2812 checkmem((yyval.a_expr));
2813 (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref);
2814 (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr);
2815 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2816 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002817 }
2818 break;
2819
Lev Walkin752e9732017-08-04 02:06:22 -07002820 case 68:
Lev Walkind523ea42017-09-06 22:15:08 -07002821#line 830 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002822 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002823 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2824 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2825 assert((yyval.a_expr)->expr_type);
2826 assert((yyval.a_expr)->meta_type);
Lev Walkin418298d2006-07-13 08:24:20 +00002827 }
2828 break;
2829
Lev Walkin752e9732017-08-04 02:06:22 -07002830 case 69:
Lev Walkind523ea42017-09-06 22:15:08 -07002831#line 836 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002832 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002833 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2834 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2835 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
2836 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00002837 }
2838 break;
2839
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002840 case 70:
Lev Walkind523ea42017-09-06 22:15:08 -07002841#line 852 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002842 {
2843 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2844 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2845 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2846 }
2847 break;
2848
Lev Walkin4a4543f2006-10-13 12:37:39 +00002849 case 71:
Lev Walkind523ea42017-09-06 22:15:08 -07002850#line 858 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002851 {
2852 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2853 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2854 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2855 }
2856 break;
2857
2858 case 72:
Lev Walkind523ea42017-09-06 22:15:08 -07002859#line 866 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002860 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002861 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002862 (yyval.a_plist) = asn1p_paramlist_new(yylineno);
2863 checkmem((yyval.a_plist));
2864 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 +00002865 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002866 asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002867 free((yyvsp[(1) - (1)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002868 }
2869 break;
2870
Lev Walkin752e9732017-08-04 02:06:22 -07002871 case 73:
Lev Walkind523ea42017-09-06 22:15:08 -07002872#line 875 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002873 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002874 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002875 (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist);
2876 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 +00002877 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002878 asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002879 free((yyvsp[(3) - (3)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002880 }
2881 break;
2882
Lev Walkin752e9732017-08-04 02:06:22 -07002883 case 74:
Lev Walkind523ea42017-09-06 22:15:08 -07002884#line 886 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002885 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002886 (yyval.a_parg).governor = NULL;
2887 (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00002888 }
2889 break;
2890
Lev Walkin866bd7f2006-09-14 10:35:20 +00002891 case 75:
Lev Walkind523ea42017-09-06 22:15:08 -07002892#line 890 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002893 {
2894 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002895 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002896 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002897 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002898 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002899 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00002900 }
2901 break;
2902
2903 case 76:
Lev Walkind523ea42017-09-06 22:15:08 -07002904#line 898 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002905 {
Lev Walkina9532f42006-09-17 04:52:50 +00002906 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002907 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin752e9732017-08-04 02:06:22 -07002908 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkina9532f42006-09-17 04:52:50 +00002909 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002910 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin752e9732017-08-04 02:06:22 -07002911 free((yyvsp[(1) - (3)].tv_str));
Lev Walkina9532f42006-09-17 04:52:50 +00002912 }
2913 break;
2914
Lev Walkin4a4543f2006-10-13 12:37:39 +00002915 case 77:
Lev Walkind523ea42017-09-06 22:15:08 -07002916#line 906 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002917 {
2918 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002919 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002920 ret = asn1p_ref_add_component((yyval.a_parg).governor,
2921 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002922 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002923 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002924 }
2925 break;
2926
2927 case 78:
Lev Walkind523ea42017-09-06 22:15:08 -07002928#line 914 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002929 {
2930 int ret;
2931 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
2932 ret = asn1p_ref_add_component((yyval.a_parg).governor,
2933 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
2934 checkmem(ret == 0);
2935 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
2936 }
2937 break;
2938
2939 case 79:
Lev Walkind523ea42017-09-06 22:15:08 -07002940#line 925 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002941 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002942 (yyval.a_expr) = NEW_EXPR();
2943 checkmem((yyval.a_expr));
2944 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002945 }
2946 break;
2947
Lev Walkin752e9732017-08-04 02:06:22 -07002948 case 80:
Lev Walkind523ea42017-09-06 22:15:08 -07002949#line 930 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002950 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002951 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
2952 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002953 }
2954 break;
2955
Lev Walkin752e9732017-08-04 02:06:22 -07002956 case 81:
Lev Walkind523ea42017-09-06 22:15:08 -07002957#line 937 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002958 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002959 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00002960 }
2961 break;
2962
Lev Walkin752e9732017-08-04 02:06:22 -07002963 case 82:
Lev Walkind523ea42017-09-06 22:15:08 -07002964#line 940 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002965 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002966 (yyval.a_expr) = NEW_EXPR();
2967 checkmem((yyval.a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002968 (yyval.a_expr)->Identifier = strdup("?");
Lev Walkin0e90aa02013-03-19 16:17:13 -07002969 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2970 (yyval.a_expr)->meta_type = AMT_VALUE;
2971 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00002972 }
2973 break;
2974
Lev Walkin752e9732017-08-04 02:06:22 -07002975 case 83:
Lev Walkind523ea42017-09-06 22:15:08 -07002976#line 948 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002977 {
Lev Walkina00d6b32006-03-21 03:40:38 +00002978 asn1p_ref_t *ref;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002979 (yyval.a_expr) = NEW_EXPR();
2980 checkmem((yyval.a_expr));
2981 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2982 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2983 (yyval.a_expr)->meta_type = AMT_VALUE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002984 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002985 asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
2986 (yyval.a_expr)->value = asn1p_value_fromref(ref, 0);
Lev Walkin418298d2006-07-13 08:24:20 +00002987 }
2988 break;
2989
Lev Walkin752e9732017-08-04 02:06:22 -07002990 case 84:
Lev Walkind523ea42017-09-06 22:15:08 -07002991#line 959 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002992 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002993 (yyval.a_expr) = NEW_EXPR();
2994 (yyval.a_expr)->expr_type = A1TC_VALUESET;
2995 (yyval.a_expr)->meta_type = AMT_VALUESET;
2996 (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002997 }
2998 break;
2999
Lev Walkin752e9732017-08-04 02:06:22 -07003000 case 85:
Lev Walkind523ea42017-09-06 22:15:08 -07003001#line 982 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003002 { (yyval.a_expr) = NEW_EXPR(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003003 break;
3004
Lev Walkin752e9732017-08-04 02:06:22 -07003005 case 86:
Lev Walkind523ea42017-09-06 22:15:08 -07003006#line 983 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003007 { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); }
Lev Walkina9532f42006-09-17 04:52:50 +00003008 break;
3009
Lev Walkin752e9732017-08-04 02:06:22 -07003010 case 87:
Lev Walkind523ea42017-09-06 22:15:08 -07003011#line 986 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003012 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003013 (yyval.a_expr) = NEW_EXPR();
3014 checkmem((yyval.a_expr));
3015 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003016 }
3017 break;
3018
Lev Walkin752e9732017-08-04 02:06:22 -07003019 case 88:
Lev Walkind523ea42017-09-06 22:15:08 -07003020#line 991 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003021 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003022 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3023 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003024 }
3025 break;
3026
Lev Walkin752e9732017-08-04 02:06:22 -07003027 case 89:
Lev Walkind523ea42017-09-06 22:15:08 -07003028#line 995 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003029 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003030 (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003031 asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003032 asn1p_expr_free((yyvsp[(4) - (5)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003033 }
3034 break;
3035
Lev Walkin752e9732017-08-04 02:06:22 -07003036 case 90:
Lev Walkind523ea42017-09-06 22:15:08 -07003037#line 1003 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003038 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003039 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3040 assert((yyval.a_expr)->Identifier == 0);
3041 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3042 (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3043 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003044 }
3045 break;
3046
Lev Walkin752e9732017-08-04 02:06:22 -07003047 case 91:
Lev Walkind523ea42017-09-06 22:15:08 -07003048#line 1010 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003049 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003050 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3051 (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3052 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
3053 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003054 }
3055 break;
3056
Lev Walkin752e9732017-08-04 02:06:22 -07003057 case 92:
Lev Walkind523ea42017-09-06 22:15:08 -07003058#line 1016 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003059 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003060 (yyval.a_expr) = NEW_EXPR();
3061 checkmem((yyval.a_expr));
3062 (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type;
3063 (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF;
3064 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003065 }
3066 break;
3067
Lev Walkin752e9732017-08-04 02:06:22 -07003068 case 93:
Lev Walkind523ea42017-09-06 22:15:08 -07003069#line 1023 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003070 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003071 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003072 }
3073 break;
3074
Lev Walkin752e9732017-08-04 02:06:22 -07003075 case 94:
Lev Walkind523ea42017-09-06 22:15:08 -07003076#line 1029 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003077 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003078 (yyval.a_expr) = NEW_EXPR();
3079 checkmem((yyval.a_expr));
3080 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003081 }
3082 break;
3083
Lev Walkin752e9732017-08-04 02:06:22 -07003084 case 95:
Lev Walkind523ea42017-09-06 22:15:08 -07003085#line 1034 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003086 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003087 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3088 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003089 }
3090 break;
3091
Lev Walkin752e9732017-08-04 02:06:22 -07003092 case 96:
Lev Walkind523ea42017-09-06 22:15:08 -07003093#line 1041 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003094 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003095 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3096 assert((yyval.a_expr)->Identifier == 0);
3097 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003098 }
3099 break;
3100
Lev Walkin752e9732017-08-04 02:06:22 -07003101 case 97:
Lev Walkind523ea42017-09-06 22:15:08 -07003102#line 1046 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003103 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003104 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003105 }
3106 break;
3107
Lev Walkin752e9732017-08-04 02:06:22 -07003108 case 98:
Lev Walkind523ea42017-09-06 22:15:08 -07003109#line 1049 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003110 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003111 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
3112 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003113 }
3114 break;
3115
Lev Walkin752e9732017-08-04 02:06:22 -07003116 case 99:
Lev Walkind523ea42017-09-06 22:15:08 -07003117#line 1056 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003118 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003119 (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr);
3120 checkmem((yyval.a_expr));
3121 (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt);
3122 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
3123 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00003124 }
3125 break;
3126
Lev Walkin752e9732017-08-04 02:06:22 -07003127 case 100:
Lev Walkind523ea42017-09-06 22:15:08 -07003128#line 1066 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003129 { (yyval.a_int) = 0; }
3130 break;
3131
Lev Walkin752e9732017-08-04 02:06:22 -07003132 case 101:
Lev Walkind523ea42017-09-06 22:15:08 -07003133#line 1067 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003134 { (yyval.a_int) = 1; }
3135 break;
3136
Lev Walkin752e9732017-08-04 02:06:22 -07003137 case 102:
Lev Walkind523ea42017-09-06 22:15:08 -07003138#line 1071 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003139 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003140 (yyval.a_expr) = NEW_EXPR();
3141 checkmem((yyval.a_expr));
3142 (yyval.a_expr)->expr_type = A1TC_CLASSDEF;
3143 (yyval.a_expr)->meta_type = AMT_OBJECTCLASS;
3144 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003145 }
3146 break;
3147
Lev Walkin752e9732017-08-04 02:06:22 -07003148 case 103:
Lev Walkind523ea42017-09-06 22:15:08 -07003149#line 1078 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003150 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003151 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3152 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003153 }
3154 break;
3155
Lev Walkin752e9732017-08-04 02:06:22 -07003156 case 104:
Lev Walkind523ea42017-09-06 22:15:08 -07003157#line 1088 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003158 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003159 (yyval.a_expr) = NEW_EXPR();
3160 checkmem((yyval.a_expr));
3161 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
3162 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3163 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */
3164 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003165 }
3166 break;
3167
Lev Walkin752e9732017-08-04 02:06:22 -07003168 case 105:
Lev Walkind523ea42017-09-06 22:15:08 -07003169#line 1098 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003170 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003171 (yyval.a_expr) = NEW_EXPR();
3172 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3173 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3174 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */
3175 (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int);
3176 (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker);
3177 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003178 }
3179 break;
3180
Lev Walkin752e9732017-08-04 02:06:22 -07003181 case 106:
Lev Walkind523ea42017-09-06 22:15:08 -07003182#line 1109 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003183 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003184 (yyval.a_expr) = NEW_EXPR();
3185 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3186 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3187 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS;
3188 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3189 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003190 }
3191 break;
3192
Lev Walkin752e9732017-08-04 02:06:22 -07003193 case 107:
Lev Walkind523ea42017-09-06 22:15:08 -07003194#line 1119 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003195 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003196 (yyval.a_expr) = NEW_EXPR();
3197 checkmem((yyval.a_expr));
3198 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3199 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3200 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3201 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS;
3202 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003203 }
3204 break;
3205
Lev Walkin752e9732017-08-04 02:06:22 -07003206 case 108:
Lev Walkind523ea42017-09-06 22:15:08 -07003207#line 1130 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003208 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003209 (yyval.a_expr) = NEW_EXPR();
3210 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3211 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3212 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS;
3213 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3214 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003215 }
3216 break;
3217
Lev Walkin752e9732017-08-04 02:06:22 -07003218 case 109:
Lev Walkind523ea42017-09-06 22:15:08 -07003219#line 1140 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003220 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003221 (yyval.a_expr) = NEW_EXPR();
3222 checkmem((yyval.a_expr));
3223 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3224 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3225 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS;
3226 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr));
3227 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003228 }
3229 break;
3230
Lev Walkin752e9732017-08-04 02:06:22 -07003231 case 110:
Lev Walkind523ea42017-09-06 22:15:08 -07003232#line 1151 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003233 {
3234 (yyval.a_expr) = NEW_EXPR();
3235 checkmem((yyval.a_expr));
3236 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3237 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3238 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3239 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS;
3240 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
3241 }
Lev Walkin418298d2006-07-13 08:24:20 +00003242 break;
3243
Lev Walkin752e9732017-08-04 02:06:22 -07003244 case 111:
Lev Walkind523ea42017-09-06 22:15:08 -07003245#line 1163 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003246 { (yyval.a_wsynt) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00003247 break;
3248
Lev Walkin752e9732017-08-04 02:06:22 -07003249 case 112:
Lev Walkind523ea42017-09-06 22:15:08 -07003250#line 1164 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003251 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003252 (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003253 }
3254 break;
3255
Lev Walkin752e9732017-08-04 02:06:22 -07003256 case 113:
Lev Walkind523ea42017-09-06 22:15:08 -07003257#line 1171 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003258 { asn1p_lexer_hack_enable_with_syntax(); }
3259 break;
3260
Lev Walkin752e9732017-08-04 02:06:22 -07003261 case 114:
Lev Walkind523ea42017-09-06 22:15:08 -07003262#line 1173 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003263 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003264 (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003265 }
3266 break;
3267
Lev Walkin752e9732017-08-04 02:06:22 -07003268 case 115:
Lev Walkind523ea42017-09-06 22:15:08 -07003269#line 1179 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003270 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003271 (yyval.a_wsynt) = asn1p_wsyntx_new();
3272 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003273 }
3274 break;
3275
Lev Walkin752e9732017-08-04 02:06:22 -07003276 case 116:
Lev Walkind523ea42017-09-06 22:15:08 -07003277#line 1183 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003278 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003279 (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt);
3280 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003281 }
3282 break;
3283
Lev Walkin752e9732017-08-04 02:06:22 -07003284 case 117:
Lev Walkind523ea42017-09-06 22:15:08 -07003285#line 1190 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003286 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003287 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0);
3288 (yyval.a_wchunk)->type = WC_WHITESPACE;
Lev Walkin418298d2006-07-13 08:24:20 +00003289 }
3290 break;
3291
Lev Walkin752e9732017-08-04 02:06:22 -07003292 case 118:
Lev Walkind523ea42017-09-06 22:15:08 -07003293#line 1194 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003294 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003295 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003296 }
3297 break;
3298
Lev Walkin752e9732017-08-04 02:06:22 -07003299 case 119:
Lev Walkind523ea42017-09-06 22:15:08 -07003300#line 1197 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003301 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003302 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0);
3303 (yyval.a_wchunk)->type = WC_FIELD;
Lev Walkin418298d2006-07-13 08:24:20 +00003304 }
3305 break;
3306
Lev Walkin752e9732017-08-04 02:06:22 -07003307 case 120:
Lev Walkind523ea42017-09-06 22:15:08 -07003308#line 1201 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003309 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003310 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt));
Lev Walkin866bd7f2006-09-14 10:35:20 +00003311 }
3312 break;
3313
Lev Walkin4a4543f2006-10-13 12:37:39 +00003314 case 121:
Lev Walkind523ea42017-09-06 22:15:08 -07003315#line 1207 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003316 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003317 (yyval.a_expr) = NEW_EXPR();
3318 checkmem((yyval.a_expr));
3319 (yyval.a_expr)->Identifier = strdup("...");
3320 checkmem((yyval.a_expr)->Identifier);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003321 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3322 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003323 }
3324 break;
3325
3326 case 122:
Lev Walkind523ea42017-09-06 22:15:08 -07003327#line 1215 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003328 {
3329 (yyval.a_expr) = NEW_EXPR();
3330 checkmem((yyval.a_expr));
3331 (yyval.a_expr)->Identifier = strdup("...");
3332 checkmem((yyval.a_expr)->Identifier);
3333 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3334 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3335 (yyval.a_expr)->meta_type = AMT_TYPE;
3336 }
3337 break;
3338
3339 case 123:
Lev Walkind523ea42017-09-06 22:15:08 -07003340#line 1224 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003341 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003342 (yyval.a_expr) = NEW_EXPR();
3343 checkmem((yyval.a_expr));
3344 (yyval.a_expr)->Identifier = strdup("...");
3345 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3346 checkmem((yyval.a_expr)->Identifier);
3347 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3348 (yyval.a_expr)->meta_type = AMT_TYPE;
3349 }
3350 break;
3351
Lev Walkin752e9732017-08-04 02:06:22 -07003352 case 124:
Lev Walkind523ea42017-09-06 22:15:08 -07003353#line 1236 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003354 {
3355 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3356 (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag);
Lev Walkin070a52d2004-08-22 03:19:54 +00003357 /*
3358 * Outer constraint for SEQUENCE OF and SET OF applies
3359 * to the inner type.
3360 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07003361 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3362 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3363 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3364 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003365 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003366 if((yyval.a_expr)->constraints) {
3367 assert(!(yyvsp[(2) - (3)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003368 /* Check this : optConstraints is not used ?! */
3369 asn1p_constraint_free((yyvsp[(3) - (3)].a_constr));
Lev Walkin070a52d2004-08-22 03:19:54 +00003370 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003371 (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003372 }
3373 }
Lev Walkin418298d2006-07-13 08:24:20 +00003374 }
3375 break;
3376
Lev Walkin752e9732017-08-04 02:06:22 -07003377 case 125:
Lev Walkind523ea42017-09-06 22:15:08 -07003378#line 1260 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003379 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003380 (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0;
Lev Walkinfb872bd2006-03-18 06:53:11 +00003381 asn1p_as_pointer = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00003382 }
3383 break;
3384
Lev Walkin752e9732017-08-04 02:06:22 -07003385 case 126:
Lev Walkind523ea42017-09-06 22:15:08 -07003386#line 1267 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003387 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003388 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3389 (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int);
Lev Walkinfb872bd2006-03-18 06:53:11 +00003390
Lev Walkin0e90aa02013-03-19 16:17:13 -07003391 if(((yyval.a_expr)->marker.flags & EM_INDIRECT)
3392 && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) {
Lev Walkinef625402005-09-05 05:17:57 +00003393 fprintf(stderr,
3394 "INFO: Directive <ASN1C:RepresentAsPointer> "
Lev Walkind523ea42017-09-06 22:15:08 -07003395 "applied to %s at %s:%d\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003396 ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
3397 ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
Lev Walkinef625402005-09-05 05:17:57 +00003398 : "member",
Lev Walkind523ea42017-09-06 22:15:08 -07003399 ASN_FILENAME, (yyval.a_expr)->_lineno
Lev Walkinef625402005-09-05 05:17:57 +00003400 );
3401 }
Lev Walkin418298d2006-07-13 08:24:20 +00003402 }
3403 break;
3404
Lev Walkin752e9732017-08-04 02:06:22 -07003405 case 127:
Lev Walkind523ea42017-09-06 22:15:08 -07003406#line 1286 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003407 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003408 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003409 }
3410 break;
3411
Lev Walkin752e9732017-08-04 02:06:22 -07003412 case 128:
Lev Walkind523ea42017-09-06 22:15:08 -07003413#line 1289 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003414 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003415 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3416 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3417 (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE;
3418 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003419 }
3420 break;
3421
Lev Walkin752e9732017-08-04 02:06:22 -07003422 case 129:
Lev Walkind523ea42017-09-06 22:15:08 -07003423#line 1295 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003424 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003425 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3426 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3427 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE;
3428 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003429 }
3430 break;
3431
Lev Walkin752e9732017-08-04 02:06:22 -07003432 case 130:
Lev Walkind523ea42017-09-06 22:15:08 -07003433#line 1301 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003434 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003435 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3436 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3437 (yyval.a_expr)->expr_type = ASN_CONSTR_SET;
3438 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003439 }
3440 break;
3441
Lev Walkin752e9732017-08-04 02:06:22 -07003442 case 131:
Lev Walkind523ea42017-09-06 22:15:08 -07003443#line 1307 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003444 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003445 (yyval.a_expr) = NEW_EXPR();
3446 checkmem((yyval.a_expr));
3447 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3448 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF;
3449 (yyval.a_expr)->meta_type = AMT_TYPE;
3450 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3451 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3452 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003453 }
3454 break;
3455
Lev Walkin752e9732017-08-04 02:06:22 -07003456 case 132:
Lev Walkind523ea42017-09-06 22:15:08 -07003457#line 1317 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003458 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003459 (yyval.a_expr) = NEW_EXPR();
3460 checkmem((yyval.a_expr));
3461 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3462 (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF;
3463 (yyval.a_expr)->meta_type = AMT_TYPE;
3464 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3465 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3466 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003467 }
3468 break;
3469
Lev Walkin752e9732017-08-04 02:06:22 -07003470 case 133:
Lev Walkind523ea42017-09-06 22:15:08 -07003471#line 1327 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003472 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003473 (yyval.a_expr) = NEW_EXPR();
3474 checkmem((yyval.a_expr));
3475 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3476 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003477 }
3478 break;
3479
Lev Walkin752e9732017-08-04 02:06:22 -07003480 case 134:
Lev Walkind523ea42017-09-06 22:15:08 -07003481#line 1333 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003482 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003483 int ret;
3484 (yyval.a_expr) = NEW_EXPR();
3485 checkmem((yyval.a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003486 (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003487 ret = asn1p_ref_add_component((yyval.a_expr)->reference,
3488 (yyvsp[(4) - (4)].tv_str), RLT_lowercase);
3489 checkmem(ret == 0);
3490 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3491 (yyval.a_expr)->meta_type = AMT_TYPE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003492 free((yyvsp[(4) - (4)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003493 }
3494 break;
3495
Lev Walkin752e9732017-08-04 02:06:22 -07003496 case 135:
Lev Walkind523ea42017-09-06 22:15:08 -07003497#line 1345 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003498 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003499 (yyval.a_expr) = NEW_EXPR();
3500 checkmem((yyval.a_expr));
3501 (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref);
3502 (yyval.a_expr)->expr_type = A1TC_INSTANCE;
3503 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003504 }
3505 break;
3506
Lev Walkin752e9732017-08-04 02:06:22 -07003507 case 136:
Lev Walkind523ea42017-09-06 22:15:08 -07003508#line 1360 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003509 {
3510 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003511 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003512 checkmem((yyval.a_ref));
3513 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003514 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003515 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003516 }
3517 break;
3518
Lev Walkin4a4543f2006-10-13 12:37:39 +00003519 case 137:
Lev Walkind523ea42017-09-06 22:15:08 -07003520#line 1368 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003521 {
Lev Walkin9d542d22006-03-14 16:31:37 +00003522 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003523 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003524 checkmem((yyval.a_ref));
3525 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9d542d22006-03-14 16:31:37 +00003526 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003527 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9d542d22006-03-14 16:31:37 +00003528 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003529 free((yyvsp[(1) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003530 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003531 }
3532 break;
3533
Lev Walkin4a4543f2006-10-13 12:37:39 +00003534 case 138:
Lev Walkind523ea42017-09-06 22:15:08 -07003535#line 1379 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003536 {
3537 int ret;
3538 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
3539 checkmem((yyval.a_ref));
3540 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3541 checkmem(ret == 0);
3542 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
3543 checkmem(ret == 0);
3544 free((yyvsp[(1) - (3)].tv_str));
3545 free((yyvsp[(3) - (3)].tv_str));
3546 }
3547 break;
3548
3549 case 139:
Lev Walkind523ea42017-09-06 22:15:08 -07003550#line 1390 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003551 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003552 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003553 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003554 checkmem((yyval.a_ref));
3555 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9c974182004-09-15 11:59:51 +00003556 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003557 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3558 checkmem(ret == 0);
3559 free((yyvsp[(1) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003560 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003561 }
3562 break;
3563
Lev Walkin752e9732017-08-04 02:06:22 -07003564 case 140:
Lev Walkind523ea42017-09-06 22:15:08 -07003565#line 1401 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003566 {
Lev Walkin9c974182004-09-15 11:59:51 +00003567 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003568 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003569 checkmem((yyval.a_ref));
3570 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
3571 free((yyvsp[(1) - (1)].tv_str));
3572 checkmem(ret == 0);
3573 }
3574 break;
3575
Lev Walkin752e9732017-08-04 02:06:22 -07003576 case 141:
Lev Walkind523ea42017-09-06 22:15:08 -07003577#line 1409 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003578 {
3579 int ret;
3580 (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref);
3581 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS);
3582 free((yyvsp[(1) - (3)].tv_str));
Lev Walkinf15320b2004-06-03 03:38:44 +00003583 checkmem(ret == 0);
3584 /*
3585 * Move the last element infront.
3586 */
3587 {
3588 struct asn1p_ref_component_s tmp_comp;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003589 tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1];
3590 memmove(&(yyval.a_ref)->components[1],
3591 &(yyval.a_ref)->components[0],
3592 sizeof((yyval.a_ref)->components[0])
3593 * ((yyval.a_ref)->comp_count - 1));
3594 (yyval.a_ref)->components[0] = tmp_comp;
Lev Walkinf15320b2004-06-03 03:38:44 +00003595 }
Lev Walkin418298d2006-07-13 08:24:20 +00003596 }
3597 break;
3598
Lev Walkin752e9732017-08-04 02:06:22 -07003599 case 142:
Lev Walkind523ea42017-09-06 22:15:08 -07003600#line 1431 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003601 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003602 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003603 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003604 checkmem((yyval.a_ref));
3605 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type);
3606 free((yyvsp[(1) - (1)].a_refcomp).name);
Lev Walkinf15320b2004-06-03 03:38:44 +00003607 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003608 }
3609 break;
3610
Lev Walkin752e9732017-08-04 02:06:22 -07003611 case 143:
Lev Walkind523ea42017-09-06 22:15:08 -07003612#line 1439 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003613 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003614 int ret;
3615 (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref);
3616 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type);
3617 free((yyvsp[(3) - (3)].a_refcomp).name);
3618 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003619 }
3620 break;
3621
Lev Walkin752e9732017-08-04 02:06:22 -07003622 case 145:
Lev Walkind523ea42017-09-06 22:15:08 -07003623#line 1452 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003624 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003625 (yyval.a_refcomp).lex_type = RLT_AmpUppercase;
3626 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003627 }
3628 break;
3629
Lev Walkin752e9732017-08-04 02:06:22 -07003630 case 146:
Lev Walkind523ea42017-09-06 22:15:08 -07003631#line 1457 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003632 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003633 (yyval.a_refcomp).lex_type = RLT_Amplowercase;
3634 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003635 }
3636 break;
3637
Lev Walkin752e9732017-08-04 02:06:22 -07003638 case 147:
Lev Walkind523ea42017-09-06 22:15:08 -07003639#line 1466 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003640 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003641 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003642 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003643 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003644 }
3645 break;
3646
Lev Walkin752e9732017-08-04 02:06:22 -07003647 case 148:
Lev Walkind523ea42017-09-06 22:15:08 -07003648#line 1471 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003649 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003650 (yyval.a_ref) = (yyval.a_ref);
3651 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003652 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003653 }
3654 break;
3655
Lev Walkin752e9732017-08-04 02:06:22 -07003656 case 149:
Lev Walkind523ea42017-09-06 22:15:08 -07003657#line 1476 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003658 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003659 (yyval.a_ref) = (yyval.a_ref);
3660 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003661 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003662 }
3663 break;
3664
Lev Walkin752e9732017-08-04 02:06:22 -07003665 case 150:
Lev Walkind523ea42017-09-06 22:15:08 -07003666#line 1484 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003667 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003668 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003669 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003670 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003671 }
3672 break;
3673
Lev Walkin752e9732017-08-04 02:06:22 -07003674 case 151:
Lev Walkind523ea42017-09-06 22:15:08 -07003675#line 1507 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003676 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003677 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
3678 assert((yyval.a_expr)->Identifier == NULL);
3679 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3680 (yyval.a_expr)->meta_type = AMT_VALUE;
3681 (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003682 }
3683 break;
3684
Lev Walkin752e9732017-08-04 02:06:22 -07003685 case 154:
Lev Walkind523ea42017-09-06 22:15:08 -07003686#line 1519 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003687 {
3688 (yyval.a_value) = asn1p_value_fromint(0);
3689 checkmem((yyval.a_value));
3690 (yyval.a_value)->type = ATV_CHOICE_IDENTIFIER;
3691 (yyval.a_value)->value.choice_identifier.identifier = (yyvsp[(1) - (3)].tv_str);
3692 (yyval.a_value)->value.choice_identifier.value = (yyvsp[(3) - (3)].a_value);
3693 }
Lev Walkin418298d2006-07-13 08:24:20 +00003694 break;
3695
Lev Walkin752e9732017-08-04 02:06:22 -07003696 case 155:
Lev Walkind523ea42017-09-06 22:15:08 -07003697#line 1526 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003698 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003699 break;
3700
Lev Walkin752e9732017-08-04 02:06:22 -07003701 case 156:
Lev Walkind523ea42017-09-06 22:15:08 -07003702#line 1526 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003703 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003704 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
3705 checkmem((yyval.a_value));
3706 (yyval.a_value)->type = ATV_UNPARSED;
Lev Walkin418298d2006-07-13 08:24:20 +00003707 }
3708 break;
3709
Lev Walkin752e9732017-08-04 02:06:22 -07003710 case 157:
Lev Walkind523ea42017-09-06 22:15:08 -07003711#line 1531 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003712 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003713 (yyval.a_value) = asn1p_value_fromint(0);
3714 checkmem((yyval.a_value));
3715 (yyval.a_value)->type = ATV_NULL;
Lev Walkin418298d2006-07-13 08:24:20 +00003716 }
3717 break;
3718
Lev Walkin752e9732017-08-04 02:06:22 -07003719 case 158:
Lev Walkind523ea42017-09-06 22:15:08 -07003720#line 1539 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003721 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003722 (yyval.a_value) = asn1p_value_fromint(0);
3723 checkmem((yyval.a_value));
3724 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00003725 }
3726 break;
3727
Lev Walkin752e9732017-08-04 02:06:22 -07003728 case 159:
Lev Walkind523ea42017-09-06 22:15:08 -07003729#line 1544 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003730 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003731 (yyval.a_value) = asn1p_value_fromint(0);
3732 checkmem((yyval.a_value));
3733 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00003734 }
3735 break;
3736
Lev Walkin752e9732017-08-04 02:06:22 -07003737 case 160:
Lev Walkind523ea42017-09-06 22:15:08 -07003738#line 1549 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003739 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003740 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
3741 checkmem((yyval.a_value));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003742 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003743 }
3744 break;
3745
Lev Walkin752e9732017-08-04 02:06:22 -07003746 case 161:
Lev Walkind523ea42017-09-06 22:15:08 -07003747#line 1554 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003748 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003749 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
3750 checkmem((yyval.a_value));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003751 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003752 }
3753 break;
3754
Lev Walkin752e9732017-08-04 02:06:22 -07003755 case 162:
Lev Walkind523ea42017-09-06 22:15:08 -07003756#line 1559 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003757 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003758 (yyval.a_value) = (yyval.a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003759 }
3760 break;
3761
Lev Walkin752e9732017-08-04 02:06:22 -07003762 case 163:
Lev Walkind523ea42017-09-06 22:15:08 -07003763#line 1562 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003764 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003765 (yyval.a_value) = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003766 }
3767 break;
3768
Lev Walkin752e9732017-08-04 02:06:22 -07003769 case 164:
Lev Walkind523ea42017-09-06 22:15:08 -07003770#line 1568 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003771 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003772 asn1p_ref_t *ref;
3773 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003774 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00003775 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003776 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinf15320b2004-06-03 03:38:44 +00003777 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003778 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3779 checkmem((yyval.a_value));
3780 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003781 }
3782 break;
3783
Lev Walkin752e9732017-08-04 02:06:22 -07003784 case 165:
Lev Walkind523ea42017-09-06 22:15:08 -07003785#line 1579 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003786 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003787 asn1p_ref_t *ref;
3788 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003789 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003790 checkmem(ref);
3791 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3792 checkmem(ret == 0);
3793 ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3794 checkmem(ret == 0);
3795 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3796 checkmem((yyval.a_value));
3797 free((yyvsp[(1) - (3)].tv_str));
3798 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003799 }
3800 break;
3801
Lev Walkin752e9732017-08-04 02:06:22 -07003802 case 166:
Lev Walkind523ea42017-09-06 22:15:08 -07003803#line 1597 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003804 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003805 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0);
3806 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003807 }
3808 break;
3809
Lev Walkin752e9732017-08-04 02:06:22 -07003810 case 167:
Lev Walkind523ea42017-09-06 22:15:08 -07003811#line 1601 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003812 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003813 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3814 checkmem((yyval.a_value));
3815 (yyval.a_value)->type = ATV_TUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003816 }
3817 break;
3818
Lev Walkin752e9732017-08-04 02:06:22 -07003819 case 168:
Lev Walkind523ea42017-09-06 22:15:08 -07003820#line 1606 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003821 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003822 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3823 checkmem((yyval.a_value));
3824 (yyval.a_value)->type = ATV_QUADRUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003825 }
3826 break;
3827
Lev Walkin752e9732017-08-04 02:06:22 -07003828 case 169:
Lev Walkind523ea42017-09-06 22:15:08 -07003829#line 1614 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003830 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003831 (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1;
3832 (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1);
3833 checkmem((yyval.tv_opaque).buf);
3834 (yyval.tv_opaque).buf[0] = '{';
3835 memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len);
3836 (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0';
3837 free((yyvsp[(1) - (1)].tv_opaque).buf);
Lev Walkin418298d2006-07-13 08:24:20 +00003838 }
3839 break;
3840
Lev Walkin752e9732017-08-04 02:06:22 -07003841 case 170:
Lev Walkind523ea42017-09-06 22:15:08 -07003842#line 1623 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003843 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003844 int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len;
3845 char *p = malloc(newsize + 1);
3846 checkmem(p);
3847 memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len);
3848 memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len);
3849 p[newsize] = '\0';
3850 free((yyvsp[(1) - (2)].tv_opaque).buf);
3851 free((yyvsp[(2) - (2)].tv_opaque).buf);
3852 (yyval.tv_opaque).buf = p;
3853 (yyval.tv_opaque).len = newsize;
Lev Walkin418298d2006-07-13 08:24:20 +00003854 }
3855 break;
3856
Lev Walkin752e9732017-08-04 02:06:22 -07003857 case 171:
Lev Walkind523ea42017-09-06 22:15:08 -07003858#line 1638 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003859 { (yyval.a_type) = ASN_BASIC_BOOLEAN; }
3860 break;
3861
Lev Walkin752e9732017-08-04 02:06:22 -07003862 case 172:
Lev Walkind523ea42017-09-06 22:15:08 -07003863#line 1639 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003864 { (yyval.a_type) = ASN_BASIC_NULL; }
3865 break;
3866
Lev Walkin752e9732017-08-04 02:06:22 -07003867 case 173:
Lev Walkind523ea42017-09-06 22:15:08 -07003868#line 1640 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003869 { (yyval.a_type) = ASN_BASIC_REAL; }
3870 break;
3871
Lev Walkin0e90aa02013-03-19 16:17:13 -07003872 case 174:
Lev Walkine700b202017-08-06 23:21:32 -07003873#line 1641 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003874 { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003875 break;
3876
Lev Walkind523ea42017-09-06 22:15:08 -07003877 case 175:
3878#line 1642 "asn1p_y.y"
3879 { (yyval.a_type) = ASN_BASIC_OCTET_STRING; }
3880 break;
3881
3882 case 176:
3883#line 1643 "asn1p_y.y"
3884 { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; }
3885 break;
3886
3887 case 177:
3888#line 1644 "asn1p_y.y"
3889 { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; }
3890 break;
3891
3892 case 178:
3893#line 1645 "asn1p_y.y"
3894 { (yyval.a_type) = ASN_BASIC_EXTERNAL; }
3895 break;
3896
3897 case 179:
3898#line 1646 "asn1p_y.y"
3899 { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; }
3900 break;
3901
3902 case 180:
3903#line 1647 "asn1p_y.y"
3904 { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; }
3905 break;
3906
3907 case 181:
Lev Walkine700b202017-08-06 23:21:32 -07003908#line 1648 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003909 { (yyval.a_type) = ASN_BASIC_UTCTime; }
3910 break;
3911
3912 case 182:
3913#line 1649 "asn1p_y.y"
3914 { (yyval.a_type) = ASN_BASIC_GeneralizedTime; }
3915 break;
3916
3917 case 183:
3918#line 1650 "asn1p_y.y"
3919 { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); }
3920 break;
3921
3922 case 184:
3923#line 1657 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003924 { (yyval.a_type) = ASN_BASIC_INTEGER; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003925 break;
3926
3927 case 185:
Lev Walkind523ea42017-09-06 22:15:08 -07003928#line 1658 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003929 { (yyval.a_type) = ASN_BASIC_ENUMERATED; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003930 break;
3931
Lev Walkin4a4543f2006-10-13 12:37:39 +00003932 case 186:
Lev Walkind523ea42017-09-06 22:15:08 -07003933#line 1659 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003934 { (yyval.a_type) = ASN_BASIC_BIT_STRING; }
3935 break;
3936
3937 case 187:
Lev Walkind523ea42017-09-06 22:15:08 -07003938#line 1663 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003939 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003940 (yyval.a_expr) = NEW_EXPR();
3941 checkmem((yyval.a_expr));
3942 (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type);
3943 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003944 }
3945 break;
3946
Lev Walkin752e9732017-08-04 02:06:22 -07003947 case 188:
Lev Walkind523ea42017-09-06 22:15:08 -07003948#line 1669 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003949 {
3950 if((yyvsp[(2) - (2)].a_expr)) {
3951 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3952 } else {
3953 (yyval.a_expr) = NEW_EXPR();
3954 checkmem((yyval.a_expr));
3955 }
3956 (yyval.a_expr)->expr_type = (yyvsp[(1) - (2)].a_type);
3957 (yyval.a_expr)->meta_type = AMT_TYPE;
3958 }
Lev Walkin418298d2006-07-13 08:24:20 +00003959 break;
3960
Lev Walkin752e9732017-08-04 02:06:22 -07003961 case 189:
Lev Walkind523ea42017-09-06 22:15:08 -07003962#line 1682 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003963 { (yyval.a_type) = ASN_STRING_BMPString; }
3964 break;
3965
Lev Walkin752e9732017-08-04 02:06:22 -07003966 case 190:
Lev Walkind523ea42017-09-06 22:15:08 -07003967#line 1683 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003968 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003969 (yyval.a_type) = ASN_STRING_GeneralString;
Lev Walkin9c974182004-09-15 11:59:51 +00003970 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00003971 }
3972 break;
3973
Lev Walkin752e9732017-08-04 02:06:22 -07003974 case 191:
Lev Walkind523ea42017-09-06 22:15:08 -07003975#line 1687 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003976 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003977 (yyval.a_type) = ASN_STRING_GraphicString;
Lev Walkin9c974182004-09-15 11:59:51 +00003978 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00003979 }
3980 break;
3981
Lev Walkin752e9732017-08-04 02:06:22 -07003982 case 192:
Lev Walkind523ea42017-09-06 22:15:08 -07003983#line 1691 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003984 { (yyval.a_type) = ASN_STRING_IA5String; }
Lev Walkin418298d2006-07-13 08:24:20 +00003985 break;
3986
Lev Walkin752e9732017-08-04 02:06:22 -07003987 case 193:
Lev Walkind523ea42017-09-06 22:15:08 -07003988#line 1692 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003989 { (yyval.a_type) = ASN_STRING_ISO646String; }
Lev Walkin418298d2006-07-13 08:24:20 +00003990 break;
3991
Lev Walkin752e9732017-08-04 02:06:22 -07003992 case 194:
Lev Walkind523ea42017-09-06 22:15:08 -07003993#line 1693 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003994 { (yyval.a_type) = ASN_STRING_NumericString; }
Lev Walkin418298d2006-07-13 08:24:20 +00003995 break;
3996
Lev Walkin752e9732017-08-04 02:06:22 -07003997 case 195:
Lev Walkind523ea42017-09-06 22:15:08 -07003998#line 1694 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003999 { (yyval.a_type) = ASN_STRING_PrintableString; }
4000 break;
4001
Lev Walkin752e9732017-08-04 02:06:22 -07004002 case 196:
Lev Walkind523ea42017-09-06 22:15:08 -07004003#line 1695 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004004 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004005 (yyval.a_type) = ASN_STRING_T61String;
Lev Walkin9c974182004-09-15 11:59:51 +00004006 fprintf(stderr, "WARNING: T61String is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004007 }
4008 break;
4009
Lev Walkin752e9732017-08-04 02:06:22 -07004010 case 197:
Lev Walkind523ea42017-09-06 22:15:08 -07004011#line 1699 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004012 { (yyval.a_type) = ASN_STRING_TeletexString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004013 break;
4014
Lev Walkin752e9732017-08-04 02:06:22 -07004015 case 198:
Lev Walkind523ea42017-09-06 22:15:08 -07004016#line 1700 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004017 { (yyval.a_type) = ASN_STRING_UniversalString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004018 break;
4019
Lev Walkin752e9732017-08-04 02:06:22 -07004020 case 199:
Lev Walkind523ea42017-09-06 22:15:08 -07004021#line 1701 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004022 { (yyval.a_type) = ASN_STRING_UTF8String; }
4023 break;
4024
Lev Walkin752e9732017-08-04 02:06:22 -07004025 case 200:
Lev Walkind523ea42017-09-06 22:15:08 -07004026#line 1702 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004027 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004028 (yyval.a_type) = ASN_STRING_VideotexString;
Lev Walkin9c974182004-09-15 11:59:51 +00004029 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004030 }
4031 break;
4032
Lev Walkin752e9732017-08-04 02:06:22 -07004033 case 201:
Lev Walkind523ea42017-09-06 22:15:08 -07004034#line 1706 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004035 { (yyval.a_type) = ASN_STRING_VisibleString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004036 break;
4037
Lev Walkin752e9732017-08-04 02:06:22 -07004038 case 202:
Lev Walkind523ea42017-09-06 22:15:08 -07004039#line 1707 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004040 { (yyval.a_type) = ASN_STRING_ObjectDescriptor; }
Lev Walkin418298d2006-07-13 08:24:20 +00004041 break;
4042
Lev Walkin752e9732017-08-04 02:06:22 -07004043 case 207:
Lev Walkind523ea42017-09-06 22:15:08 -07004044#line 1719 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004045 { (yyval.a_constr) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00004046 break;
4047
Lev Walkind523ea42017-09-06 22:15:08 -07004048 case 209:
4049#line 1724 "asn1p_y.y"
4050 { (yyval.a_constr) = 0; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004051 break;
4052
Lev Walkin752e9732017-08-04 02:06:22 -07004053 case 211:
Lev Walkind523ea42017-09-06 22:15:08 -07004054#line 1726 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004055 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004056 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(3) - (4)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004057 }
4058 break;
4059
Lev Walkin752e9732017-08-04 02:06:22 -07004060 case 212:
Lev Walkind523ea42017-09-06 22:15:08 -07004061#line 1732 "asn1p_y.y"
4062 {
4063 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0);
4064 }
4065 break;
4066
4067 case 213:
4068#line 1738 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004069 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004070 (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004071 }
4072 break;
4073
Lev Walkind523ea42017-09-06 22:15:08 -07004074 case 214:
4075#line 1741 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004076 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004077 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004078 }
4079 break;
4080
Lev Walkind523ea42017-09-06 22:15:08 -07004081 case 218:
Lev Walkine700b202017-08-06 23:21:32 -07004082#line 1751 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004083 {
4084 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4085 (yyval.a_constr)->type = ACT_EL_EXT;
4086 }
4087 break;
4088
Lev Walkind523ea42017-09-06 22:15:08 -07004089 case 220:
4090#line 1756 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004091 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004092 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004093 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00004094 ct->type = ACT_EL_EXT;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004095 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004096 }
4097 break;
4098
Lev Walkind523ea42017-09-06 22:15:08 -07004099 case 221:
4100#line 1762 "asn1p_y.y"
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004101 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004102 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004103 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004104 ct->type = ACT_EL_EXT;
4105 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct);
4106 ct = (yyval.a_constr);
4107 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr));
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004108 }
4109 break;
4110
Lev Walkind523ea42017-09-06 22:15:08 -07004111 case 223:
4112#line 1774 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004113 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004114 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004115 }
4116 break;
4117
Lev Walkind523ea42017-09-06 22:15:08 -07004118 case 225:
4119#line 1781 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004120 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004121 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 +00004122 }
4123 break;
4124
Lev Walkind523ea42017-09-06 22:15:08 -07004125 case 227:
4126#line 1788 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004127 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004128 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 +00004129 }
4130 break;
4131
Lev Walkind523ea42017-09-06 22:15:08 -07004132 case 229:
4133#line 1796 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004134 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004135 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 +00004136 }
4137 break;
4138
Lev Walkind523ea42017-09-06 22:15:08 -07004139 case 230:
4140#line 1802 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004141 {
Lev Walkinf59d0752004-08-18 04:59:12 +00004142 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004143 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004144 checkmem((yyval.a_constr));
4145 (yyval.a_constr)->type = (yyvsp[(1) - (4)].a_ctype);
4146 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (4)].a_constr));
Lev Walkinf59d0752004-08-18 04:59:12 +00004147 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004148 }
4149 break;
4150
Lev Walkind523ea42017-09-06 22:15:08 -07004151 case 231:
4152#line 1810 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004153 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004154 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004155 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004156 checkmem((yyval.a_constr));
4157 (yyval.a_constr)->type = ACT_CA_SET;
4158 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4159 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004160 }
4161 break;
4162
Lev Walkind523ea42017-09-06 22:15:08 -07004163 case 232:
4164#line 1818 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004165 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004166 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004167 checkmem((yyval.a_constr));
4168 (yyval.a_constr)->type = ACT_EL_VALUE;
4169 (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004170 }
4171 break;
4172
Lev Walkind523ea42017-09-06 22:15:08 -07004173 case 233:
4174#line 1824 "asn1p_y.y"
Lev Walkinf1727152006-09-21 01:50:37 +00004175 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004176 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004177 checkmem((yyval.a_constr));
4178 (yyval.a_constr)->type = ACT_EL_TYPE;
4179 (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value);
Lev Walkinf1727152006-09-21 01:50:37 +00004180 }
4181 break;
4182
Lev Walkin752e9732017-08-04 02:06:22 -07004183 case 234:
Lev Walkind523ea42017-09-06 22:15:08 -07004184#line 1830 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00004185 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004186 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004187 checkmem((yyval.a_constr));
4188 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004189 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
Lev Walkind523ea42017-09-06 22:15:08 -07004190 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
Lev Walkin866bd7f2006-09-14 10:35:20 +00004191 }
4192 break;
4193
Lev Walkin4a4543f2006-10-13 12:37:39 +00004194 case 235:
Lev Walkind523ea42017-09-06 22:15:08 -07004195#line 1837 "asn1p_y.y"
4196 {
4197 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4198 checkmem((yyval.a_constr));
4199 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4200 (yyval.a_constr)->range_start = asn1p_value_fromint(-123);
4201 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
4202 (yyval.a_constr)->range_start->type = ATV_MIN;
4203 }
4204 break;
4205
4206 case 236:
4207#line 1845 "asn1p_y.y"
4208 {
4209 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4210 checkmem((yyval.a_constr));
4211 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4212 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
4213 (yyval.a_constr)->range_stop = asn1p_value_fromint(321);
4214 (yyval.a_constr)->range_stop->type = ATV_MAX;
4215 }
4216 break;
4217
4218 case 237:
4219#line 1853 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004220 {
Lev Walkin752e9732017-08-04 02:06:22 -07004221 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4222 checkmem((yyval.a_constr));
4223 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4224 (yyval.a_constr)->range_start = asn1p_value_fromint(-123);
4225 (yyval.a_constr)->range_stop = asn1p_value_fromint(321);
4226 (yyval.a_constr)->range_start->type = ATV_MIN;
4227 (yyval.a_constr)->range_stop->type = ATV_MAX;
Lev Walkin418298d2006-07-13 08:24:20 +00004228 }
4229 break;
4230
Lev Walkind523ea42017-09-06 22:15:08 -07004231 case 240:
Lev Walkine700b202017-08-06 23:21:32 -07004232#line 1864 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004233 { asn1p_lexer_hack_push_opaque_state(); }
4234 break;
4235
Lev Walkind523ea42017-09-06 22:15:08 -07004236 case 241:
4237#line 1864 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004238 {
4239 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4240 checkmem((yyval.a_constr));
4241 (yyval.a_constr)->type = ACT_EL_VALUE;
4242 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
4243 (yyval.a_constr)->value->type = ATV_UNPARSED;
4244 }
4245 break;
4246
Lev Walkind523ea42017-09-06 22:15:08 -07004247 case 242:
4248#line 1874 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004249 {
4250 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004251 (yyval.a_constr)->type = ACT_CT_PATTERN;
4252 (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 +00004253 }
4254 break;
4255
Lev Walkind523ea42017-09-06 22:15:08 -07004256 case 243:
4257#line 1879 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004258 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004259 asn1p_ref_t *ref;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004260 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004261 (yyval.a_constr)->type = ACT_CT_PATTERN;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004262 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004263 asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase);
4264 (yyval.a_constr)->value = asn1p_value_fromref(ref, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004265 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin5c541f12006-10-18 18:40:14 +00004266 }
4267 break;
4268
Lev Walkind523ea42017-09-06 22:15:08 -07004269 case 244:
4270#line 1891 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004271 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004272 (yyval.a_ctype) = ACT_CT_SIZE;
Lev Walkin5c541f12006-10-18 18:40:14 +00004273 }
4274 break;
4275
Lev Walkind523ea42017-09-06 22:15:08 -07004276 case 245:
4277#line 1894 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004278 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004279 (yyval.a_ctype) = ACT_CT_FROM;
Lev Walkin418298d2006-07-13 08:24:20 +00004280 }
4281 break;
4282
Lev Walkind523ea42017-09-06 22:15:08 -07004283 case 246:
4284#line 1900 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004285 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004286 (yyval.a_value) = asn1p_value_fromint(0);
4287 checkmem((yyval.a_value));
4288 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00004289 }
4290 break;
4291
Lev Walkind523ea42017-09-06 22:15:08 -07004292 case 247:
4293#line 1905 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004294 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004295 (yyval.a_value) = asn1p_value_fromint(1);
4296 checkmem((yyval.a_value));
4297 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00004298 }
4299 break;
4300
Lev Walkind523ea42017-09-06 22:15:08 -07004301 case 251:
4302#line 1913 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004303 {
Lev Walkinc8092cb2005-02-18 16:34:21 +00004304 asn1p_ref_t *ref;
4305 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004306 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkinc8092cb2005-02-18 16:34:21 +00004307 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004308 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinc8092cb2005-02-18 16:34:21 +00004309 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004310 (yyval.a_value) = asn1p_value_fromref(ref, 0);
4311 checkmem((yyval.a_value));
4312 free((yyvsp[(1) - (1)].tv_str));
4313 }
4314 break;
4315
Lev Walkind523ea42017-09-06 22:15:08 -07004316 case 252:
4317#line 1927 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004318 {
4319 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
4320 checkmem((yyval.a_value));
Lev Walkin0e90aa02013-03-19 16:17:13 -07004321 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004322 }
4323 break;
4324
Lev Walkind523ea42017-09-06 22:15:08 -07004325 case 253:
4326#line 1932 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004327 {
4328 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
4329 checkmem((yyval.a_value));
4330 free((yyvsp[(1) - (1)].tv_str));
4331 }
4332 break;
4333
Lev Walkind523ea42017-09-06 22:15:08 -07004334 case 254:
4335#line 1940 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004336 {
Lev Walkind523ea42017-09-06 22:15:08 -07004337 (yyval.a_value) = asn1p_value_fromtype((yyvsp[(1) - (1)].a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004338 checkmem((yyval.a_value));
Lev Walkind523ea42017-09-06 22:15:08 -07004339 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004340 break;
4341
Lev Walkind523ea42017-09-06 22:15:08 -07004342 case 255:
4343#line 1951 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004344 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004345 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004346 }
4347 break;
4348
Lev Walkin752e9732017-08-04 02:06:22 -07004349 case 256:
Lev Walkind523ea42017-09-06 22:15:08 -07004350#line 1954 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004351 {
Lev Walkind523ea42017-09-06 22:15:08 -07004352 assert((yyvsp[(3) - (3)].a_constr)->type == ACT_CA_CSV);
4353 (yyvsp[(3) - (3)].a_constr)->type = ACT_CT_WCOMPS;
4354 (yyval.a_constr) = (yyvsp[(3) - (3)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004355 }
4356 break;
4357
Lev Walkin752e9732017-08-04 02:06:22 -07004358 case 260:
Lev Walkind523ea42017-09-06 22:15:08 -07004359#line 1962 "asn1p_y.y"
4360 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004361 break;
4362
Lev Walkin752e9732017-08-04 02:06:22 -07004363 case 261:
Lev Walkind523ea42017-09-06 22:15:08 -07004364#line 1964 "asn1p_y.y"
4365 {
4366 assert((yyvsp[(4) - (5)].a_constr)->type == ACT_CA_CSV);
4367 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4368 (yyval.a_constr)->type = ACT_CA_CSV;
4369 asn1p_constraint_t *ct = asn1p_constraint_new(yylineno, currentModule);
4370 checkmem((yyval.a_constr));
4371 ct->type = ACT_EL_EXT;
4372 asn1p_constraint_insert((yyval.a_constr), ct);
4373 for(unsigned i = 0; i < (yyvsp[(4) - (5)].a_constr)->el_count; i++) {
4374 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(4) - (5)].a_constr)->elements[i]);
4375 }
4376 }
4377 break;
4378
4379 case 262:
4380#line 1977 "asn1p_y.y"
4381 {
4382 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4383 (yyval.a_constr)->type = ACT_CA_CSV;
4384 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(1) - (1)].a_constr));
4385 }
4386 break;
4387
4388 case 263:
4389#line 1982 "asn1p_y.y"
4390 {
4391 (yyval.a_constr) = (yyvsp[(1) - (3)].a_constr);
4392 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (3)].a_constr));
4393 }
4394 break;
4395
4396 case 264:
4397#line 1988 "asn1p_y.y"
4398 {
4399 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4400 checkmem((yyval.a_constr));
4401 (yyval.a_constr)->type = ACT_EL_VALUE;
4402 (yyval.a_constr)->value = (yyvsp[(1) - (3)].a_value);
4403 if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4404 (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres);
4405 }
4406 break;
4407
4408 case 265:
4409#line 2002 "asn1p_y.y"
4410 { (yyval.a_pres) = ACPRES_DEFAULT; }
4411 break;
4412
4413 case 266:
4414#line 2003 "asn1p_y.y"
4415 { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); }
4416 break;
4417
4418 case 267:
4419#line 2007 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004420 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004421 (yyval.a_pres) = ACPRES_PRESENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004422 }
4423 break;
4424
Lev Walkind523ea42017-09-06 22:15:08 -07004425 case 268:
4426#line 2010 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004427 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004428 (yyval.a_pres) = ACPRES_ABSENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004429 }
4430 break;
4431
Lev Walkind523ea42017-09-06 22:15:08 -07004432 case 269:
4433#line 2013 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004434 {
4435 (yyval.a_pres) = ACPRES_OPTIONAL;
4436 }
Lev Walkina9532f42006-09-17 04:52:50 +00004437 break;
4438
Lev Walkind523ea42017-09-06 22:15:08 -07004439 case 273:
4440#line 2028 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004441 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00004442 break;
4443
Lev Walkind523ea42017-09-06 22:15:08 -07004444 case 274:
4445#line 2028 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004446 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004447 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004448 checkmem((yyval.a_constr));
4449 (yyval.a_constr)->type = ACT_CT_CTDBY;
4450 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0);
4451 checkmem((yyval.a_constr)->value);
4452 (yyval.a_constr)->value->type = ATV_UNPARSED;
Lev Walkina9532f42006-09-17 04:52:50 +00004453 }
4454 break;
4455
Lev Walkind523ea42017-09-06 22:15:08 -07004456 case 275:
4457#line 2039 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004458 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004459 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004460 (yyval.a_constr)->type = ACT_CT_CTNG;
4461 (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08004462 asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
Lev Walkin4a4543f2006-10-13 12:37:39 +00004463 }
4464 break;
4465
Lev Walkind523ea42017-09-06 22:15:08 -07004466 case 276:
4467#line 2048 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004468 { (yyval.a_ctype) = ACT_EL_RANGE; }
4469 break;
4470
Lev Walkind523ea42017-09-06 22:15:08 -07004471 case 277:
4472#line 2049 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004473 { (yyval.a_ctype) = ACT_EL_RLRANGE; }
4474 break;
4475
Lev Walkind523ea42017-09-06 22:15:08 -07004476 case 278:
4477#line 2050 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004478 { (yyval.a_ctype) = ACT_EL_LLRANGE; }
4479 break;
4480
Lev Walkind523ea42017-09-06 22:15:08 -07004481 case 279:
4482#line 2051 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004483 { (yyval.a_ctype) = ACT_EL_ULRANGE; }
4484 break;
4485
Lev Walkind523ea42017-09-06 22:15:08 -07004486 case 280:
4487#line 2054 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004488 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004489 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004490 }
4491 break;
4492
Lev Walkind523ea42017-09-06 22:15:08 -07004493 case 281:
4494#line 2057 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004495 {
4496 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4497 }
4498 break;
4499
Lev Walkind523ea42017-09-06 22:15:08 -07004500 case 282:
4501#line 2066 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004502 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004503 asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004504 asn1p_constraint_t *ct;
4505 int ret;
4506 ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0);
4507 checkmem(ret == 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004508 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004509 checkmem((yyval.a_constr));
4510 ct->type = ACT_EL_VALUE;
4511 ct->value = asn1p_value_fromref(ref, 0);
4512 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004513 free((yyvsp[(2) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004514 }
4515 break;
4516
Lev Walkind523ea42017-09-06 22:15:08 -07004517 case 283:
4518#line 2082 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004519 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004520 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 +00004521 }
4522 break;
4523
Lev Walkind523ea42017-09-06 22:15:08 -07004524 case 284:
4525#line 2088 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004526 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004527 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004528 checkmem((yyval.a_constr));
4529 (yyval.a_constr)->type = ACT_EL_VALUE;
4530 (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4531 }
4532 break;
4533
Lev Walkind523ea42017-09-06 22:15:08 -07004534 case 285:
4535#line 2094 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004536 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004537 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004538 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00004539 checkmem(ct);
4540 ct->type = ACT_EL_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004541 ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0);
4542 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004543 }
4544 break;
4545
Lev Walkind523ea42017-09-06 22:15:08 -07004546 case 286:
4547#line 2108 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004548 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004549 char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2);
Lev Walkinf15320b2004-06-03 03:38:44 +00004550 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004551 *p = '@';
4552 strcpy(p + 1, (yyvsp[(2) - (2)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004553 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004554 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
Lev Walkinf15320b2004-06-03 03:38:44 +00004555 checkmem(ret == 0);
4556 free(p);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004557 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004558 }
4559 break;
4560
Lev Walkind523ea42017-09-06 22:15:08 -07004561 case 287:
4562#line 2119 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004563 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004564 char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3);
4565 int ret;
4566 p[0] = '@';
4567 p[1] = '.';
4568 strcpy(p + 2, (yyvsp[(3) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004569 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004570 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
4571 checkmem(ret == 0);
4572 free(p);
4573 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004574 }
4575 break;
4576
Lev Walkind523ea42017-09-06 22:15:08 -07004577 case 288:
4578#line 2135 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004579 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004580 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00004581 }
4582 break;
4583
Lev Walkind523ea42017-09-06 22:15:08 -07004584 case 289:
4585#line 2138 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004586 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004587 int l1 = strlen((yyvsp[(1) - (3)].tv_str));
4588 int l3 = strlen((yyvsp[(3) - (3)].tv_str));
4589 (yyval.tv_str) = malloc(l1 + 1 + l3 + 1);
4590 memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1);
4591 (yyval.tv_str)[l1] = '.';
4592 memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3);
4593 (yyval.tv_str)[l1 + 1 + l3] = '\0';
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004594 free((yyvsp[(1) - (3)].tv_str));
4595 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004596 }
4597 break;
4598
Lev Walkind523ea42017-09-06 22:15:08 -07004599 case 290:
4600#line 2158 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004601 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004602 (yyval.a_marker).flags = EM_NOMARK;
4603 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004604 }
4605 break;
4606
Lev Walkind523ea42017-09-06 22:15:08 -07004607 case 291:
4608#line 2162 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004609 { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); }
4610 break;
4611
Lev Walkind523ea42017-09-06 22:15:08 -07004612 case 292:
4613#line 2166 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004614 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004615 (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT;
4616 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004617 }
4618 break;
4619
Lev Walkind523ea42017-09-06 22:15:08 -07004620 case 293:
4621#line 2170 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004622 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004623 (yyval.a_marker).flags = EM_DEFAULT;
4624 (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004625 }
4626 break;
4627
Lev Walkind523ea42017-09-06 22:15:08 -07004628 case 294:
4629#line 2193 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004630 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004631 (yyval.a_expr) = NEW_EXPR();
4632 checkmem((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004633 }
4634 break;
4635
Lev Walkind523ea42017-09-06 22:15:08 -07004636 case 295:
4637#line 2197 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004638 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004639 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00004640 }
4641 break;
4642
Lev Walkind523ea42017-09-06 22:15:08 -07004643 case 296:
4644#line 2203 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004645 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004646 (yyval.a_expr) = NEW_EXPR();
4647 checkmem((yyval.a_expr));
4648 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004649 }
4650 break;
4651
Lev Walkind523ea42017-09-06 22:15:08 -07004652 case 297:
4653#line 2208 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004654 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004655 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4656 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004657 }
4658 break;
4659
Lev Walkind523ea42017-09-06 22:15:08 -07004660 case 298:
4661#line 2215 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004662 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004663 (yyval.a_expr) = NEW_EXPR();
4664 checkmem((yyval.a_expr));
4665 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4666 (yyval.a_expr)->meta_type = AMT_VALUE;
4667 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004668 }
4669 break;
4670
Lev Walkind523ea42017-09-06 22:15:08 -07004671 case 299:
4672#line 2222 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004673 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004674 (yyval.a_expr) = NEW_EXPR();
4675 checkmem((yyval.a_expr));
4676 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4677 (yyval.a_expr)->meta_type = AMT_VALUE;
4678 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4679 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004680 }
4681 break;
4682
Lev Walkind523ea42017-09-06 22:15:08 -07004683 case 300:
4684#line 2230 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004685 {
4686 (yyval.a_expr) = NEW_EXPR();
4687 checkmem((yyval.a_expr));
4688 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4689 (yyval.a_expr)->meta_type = AMT_VALUE;
4690 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4691 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4692 }
4693 break;
4694
Lev Walkind523ea42017-09-06 22:15:08 -07004695 case 301:
4696#line 2238 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004697 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004698 (yyval.a_expr) = NEW_EXPR();
4699 checkmem((yyval.a_expr));
4700 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4701 (yyval.a_expr)->meta_type = AMT_VALUE;
4702 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004703 }
4704 break;
4705
Lev Walkind523ea42017-09-06 22:15:08 -07004706 case 302:
4707#line 2245 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004708 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004709 (yyval.a_expr) = NEW_EXPR();
4710 checkmem((yyval.a_expr));
4711 (yyval.a_expr)->Identifier = strdup("...");
4712 checkmem((yyval.a_expr)->Identifier);
4713 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
4714 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004715 }
4716 break;
4717
Lev Walkind523ea42017-09-06 22:15:08 -07004718 case 303:
4719#line 2256 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004720 {
4721 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4722 checkmem((yyval.a_value));
4723 }
4724 break;
4725
Lev Walkind523ea42017-09-06 22:15:08 -07004726 case 304:
4727#line 2260 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004728 {
4729 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4730 checkmem((yyval.a_value));
4731 }
4732 break;
4733
Lev Walkind523ea42017-09-06 22:15:08 -07004734 case 306:
4735#line 2268 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004736 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004737 (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl));
4738 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00004739 }
4740 break;
4741
Lev Walkind523ea42017-09-06 22:15:08 -07004742 case 307:
4743#line 2299 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004744 { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); }
4745 break;
4746
Lev Walkind523ea42017-09-06 22:15:08 -07004747 case 308:
4748#line 2300 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004749 { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); }
4750 break;
4751
Lev Walkind523ea42017-09-06 22:15:08 -07004752 case 309:
4753#line 2304 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004754 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004755 (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag);
4756 (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode;
Lev Walkin418298d2006-07-13 08:24:20 +00004757 }
4758 break;
4759
Lev Walkind523ea42017-09-06 22:15:08 -07004760 case 310:
4761#line 2311 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004762 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004763 (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag);
4764 (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int);
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004765 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004766 break;
4767
Lev Walkind523ea42017-09-06 22:15:08 -07004768 case 311:
4769#line 2317 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004770 { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; }
4771 break;
4772
Lev Walkind523ea42017-09-06 22:15:08 -07004773 case 312:
4774#line 2318 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004775 { (yyval.a_tag).tag_class = TC_UNIVERSAL; }
4776 break;
4777
Lev Walkind523ea42017-09-06 22:15:08 -07004778 case 313:
4779#line 2319 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004780 { (yyval.a_tag).tag_class = TC_APPLICATION; }
4781 break;
4782
Lev Walkind523ea42017-09-06 22:15:08 -07004783 case 314:
4784#line 2320 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004785 { (yyval.a_tag).tag_class = TC_PRIVATE; }
4786 break;
4787
Lev Walkind523ea42017-09-06 22:15:08 -07004788 case 315:
4789#line 2324 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004790 { (yyval.a_tag).tag_mode = TM_DEFAULT; }
4791 break;
4792
Lev Walkind523ea42017-09-06 22:15:08 -07004793 case 316:
4794#line 2325 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004795 { (yyval.a_tag).tag_mode = TM_IMPLICIT; }
4796 break;
4797
Lev Walkind523ea42017-09-06 22:15:08 -07004798 case 317:
4799#line 2326 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004800 { (yyval.a_tag).tag_mode = TM_EXPLICIT; }
4801 break;
4802
Lev Walkind523ea42017-09-06 22:15:08 -07004803 case 318:
4804#line 2330 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00004805 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004806 checkmem((yyvsp[(1) - (1)].tv_str));
Lev Walkin0e90aa02013-03-19 16:17:13 -07004807 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4808 }
4809 break;
4810
Lev Walkind523ea42017-09-06 22:15:08 -07004811 case 319:
4812#line 2334 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004813 {
4814 checkmem((yyvsp[(1) - (1)].tv_str));
4815 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4816 }
4817 break;
4818
Lev Walkind523ea42017-09-06 22:15:08 -07004819 case 320:
4820#line 2342 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004821 {
4822 checkmem((yyvsp[(1) - (1)].tv_str));
4823 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4824 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004825 break;
4826
Lev Walkind523ea42017-09-06 22:15:08 -07004827 case 321:
4828#line 2349 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004829 { (yyval.tv_str) = 0; }
4830 break;
4831
Lev Walkind523ea42017-09-06 22:15:08 -07004832 case 322:
4833#line 2350 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004834 {
4835 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4836 }
4837 break;
4838
Lev Walkind523ea42017-09-06 22:15:08 -07004839 case 323:
4840#line 2356 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004841 {
4842 checkmem((yyvsp[(1) - (1)].tv_str));
4843 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin866bd7f2006-09-14 10:35:20 +00004844 }
4845 break;
4846
Lev Walkind523ea42017-09-06 22:15:08 -07004847 case 324:
4848#line 2363 "asn1p_y.y"
4849 {
4850 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
4851 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
4852 }
4853 break;
4854
4855 case 325:
4856#line 2369 "asn1p_y.y"
4857 {
4858 (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4859 }
4860 break;
4861
Lev Walkin418298d2006-07-13 08:24:20 +00004862
Lev Walkin752e9732017-08-04 02:06:22 -07004863/* Line 1267 of yacc.c. */
Lev Walkind523ea42017-09-06 22:15:08 -07004864#line 4865 "asn1p_y.c"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004865 default: break;
Lev Walkin418298d2006-07-13 08:24:20 +00004866 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004867 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Lev Walkin418298d2006-07-13 08:24:20 +00004868
Lev Walkin0e90aa02013-03-19 16:17:13 -07004869 YYPOPSTACK (yylen);
4870 yylen = 0;
4871 YY_STACK_PRINT (yyss, yyssp);
Lev Walkinf15320b2004-06-03 03:38:44 +00004872
4873 *++yyvsp = yyval;
4874
Lev Walkin752e9732017-08-04 02:06:22 -07004875
Lev Walkin418298d2006-07-13 08:24:20 +00004876 /* Now `shift' the result of the reduction. Determine what state
4877 that goes to, based on the state we popped back to and the rule
4878 number reduced by. */
Lev Walkinf15320b2004-06-03 03:38:44 +00004879
4880 yyn = yyr1[yyn];
4881
Lev Walkin418298d2006-07-13 08:24:20 +00004882 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4883 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00004884 yystate = yytable[yystate];
4885 else
Lev Walkin418298d2006-07-13 08:24:20 +00004886 yystate = yydefgoto[yyn - YYNTOKENS];
Lev Walkinf15320b2004-06-03 03:38:44 +00004887
4888 goto yynewstate;
4889
Lev Walkinf15320b2004-06-03 03:38:44 +00004890
Lev Walkin418298d2006-07-13 08:24:20 +00004891/*------------------------------------.
4892| yyerrlab -- here on detecting error |
4893`------------------------------------*/
4894yyerrlab:
4895 /* If not already recovering from an error, report this error. */
4896 if (!yyerrstatus)
Lev Walkinf15320b2004-06-03 03:38:44 +00004897 {
4898 ++yynerrs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004899#if ! YYERROR_VERBOSE
4900 yyerror (YY_("syntax error"));
4901#else
4902 {
Lev Walkin752e9732017-08-04 02:06:22 -07004903 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4904 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4905 {
4906 YYSIZE_T yyalloc = 2 * yysize;
4907 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4908 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4909 if (yymsg != yymsgbuf)
4910 YYSTACK_FREE (yymsg);
4911 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4912 if (yymsg)
4913 yymsg_alloc = yyalloc;
4914 else
4915 {
4916 yymsg = yymsgbuf;
4917 yymsg_alloc = sizeof yymsgbuf;
4918 }
4919 }
4920
4921 if (0 < yysize && yysize <= yymsg_alloc)
4922 {
4923 (void) yysyntax_error (yymsg, yystate, yychar);
4924 yyerror (yymsg);
4925 }
4926 else
4927 {
4928 yyerror (YY_("syntax error"));
4929 if (yysize != 0)
4930 goto yyexhaustedlab;
4931 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004932 }
4933#endif
4934 }
4935
4936
4937
4938 if (yyerrstatus == 3)
4939 {
Lev Walkin752e9732017-08-04 02:06:22 -07004940 /* If just tried and failed to reuse look-ahead token after an
Lev Walkin0e90aa02013-03-19 16:17:13 -07004941 error, discard it. */
4942
4943 if (yychar <= YYEOF)
4944 {
4945 /* Return failure if at end of input. */
4946 if (yychar == YYEOF)
4947 YYABORT;
Lev Walkinf15320b2004-06-03 03:38:44 +00004948 }
4949 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07004950 {
4951 yydestruct ("Error: discarding",
4952 yytoken, &yylval);
4953 yychar = YYEMPTY;
4954 }
Lev Walkinf15320b2004-06-03 03:38:44 +00004955 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004956
Lev Walkin752e9732017-08-04 02:06:22 -07004957 /* Else will try to reuse look-ahead token after shifting the error
Lev Walkin0e90aa02013-03-19 16:17:13 -07004958 token. */
Lev Walkina00d6b32006-03-21 03:40:38 +00004959 goto yyerrlab1;
Lev Walkinf15320b2004-06-03 03:38:44 +00004960
Lev Walkin418298d2006-07-13 08:24:20 +00004961
Lev Walkin0e90aa02013-03-19 16:17:13 -07004962/*---------------------------------------------------.
4963| yyerrorlab -- error raised explicitly by YYERROR. |
4964`---------------------------------------------------*/
4965yyerrorlab:
4966
4967 /* Pacify compilers like GCC when the user code never invokes
4968 YYERROR and the label yyerrorlab therefore never appears in user
4969 code. */
4970 if (/*CONSTCOND*/ 0)
4971 goto yyerrorlab;
4972
4973 /* Do not reclaim the symbols of the rule which action triggered
4974 this YYERROR. */
4975 YYPOPSTACK (yylen);
4976 yylen = 0;
4977 YY_STACK_PRINT (yyss, yyssp);
4978 yystate = *yyssp;
4979 goto yyerrlab1;
4980
4981
4982/*-------------------------------------------------------------.
4983| yyerrlab1 -- common code for both syntax error and YYERROR. |
4984`-------------------------------------------------------------*/
Lev Walkin418298d2006-07-13 08:24:20 +00004985yyerrlab1:
Lev Walkin418298d2006-07-13 08:24:20 +00004986 yyerrstatus = 3; /* Each real token shifted decrements this. */
Lev Walkina00d6b32006-03-21 03:40:38 +00004987
Lev Walkin418298d2006-07-13 08:24:20 +00004988 for (;;)
Lev Walkina00d6b32006-03-21 03:40:38 +00004989 {
Lev Walkin418298d2006-07-13 08:24:20 +00004990 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07004991 if (yyn != YYPACT_NINF)
Lev Walkin418298d2006-07-13 08:24:20 +00004992 {
4993 yyn += YYTERROR;
4994 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4995 {
4996 yyn = yytable[yyn];
4997 if (0 < yyn)
4998 break;
4999 }
5000 }
5001
5002 /* Pop the current state because it cannot handle the error token. */
5003 if (yyssp == yyss)
5004 YYABORT;
5005
Lev Walkin418298d2006-07-13 08:24:20 +00005006
Lev Walkin0e90aa02013-03-19 16:17:13 -07005007 yydestruct ("Error: popping",
5008 yystos[yystate], yyvsp);
5009 YYPOPSTACK (1);
5010 yystate = *yyssp;
5011 YY_STACK_PRINT (yyss, yyssp);
Lev Walkina00d6b32006-03-21 03:40:38 +00005012 }
Lev Walkina00d6b32006-03-21 03:40:38 +00005013
Lev Walkin752e9732017-08-04 02:06:22 -07005014 if (yyn == YYFINAL)
5015 YYACCEPT;
5016
Lev Walkinf15320b2004-06-03 03:38:44 +00005017 *++yyvsp = yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00005018
Lev Walkinf15320b2004-06-03 03:38:44 +00005019
Lev Walkin0e90aa02013-03-19 16:17:13 -07005020 /* Shift the error token. */
5021 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5022
Lev Walkinf15320b2004-06-03 03:38:44 +00005023 yystate = yyn;
5024 goto yynewstate;
5025
Lev Walkina00d6b32006-03-21 03:40:38 +00005026
Lev Walkin418298d2006-07-13 08:24:20 +00005027/*-------------------------------------.
5028| yyacceptlab -- YYACCEPT comes here. |
5029`-------------------------------------*/
5030yyacceptlab:
5031 yyresult = 0;
5032 goto yyreturn;
5033
5034/*-----------------------------------.
5035| yyabortlab -- YYABORT comes here. |
5036`-----------------------------------*/
5037yyabortlab:
5038 yyresult = 1;
5039 goto yyreturn;
5040
Lev Walkin752e9732017-08-04 02:06:22 -07005041#ifndef yyoverflow
Lev Walkin0e90aa02013-03-19 16:17:13 -07005042/*-------------------------------------------------.
5043| yyexhaustedlab -- memory exhaustion comes here. |
5044`-------------------------------------------------*/
5045yyexhaustedlab:
5046 yyerror (YY_("memory exhausted"));
Lev Walkin418298d2006-07-13 08:24:20 +00005047 yyresult = 2;
5048 /* Fall through. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005049#endif
Lev Walkin418298d2006-07-13 08:24:20 +00005050
5051yyreturn:
Lev Walkin752e9732017-08-04 02:06:22 -07005052 if (yychar != YYEOF && yychar != YYEMPTY)
5053 yydestruct ("Cleanup: discarding lookahead",
5054 yytoken, &yylval);
Lev Walkin0e90aa02013-03-19 16:17:13 -07005055 /* Do not reclaim the symbols of the rule which action triggered
5056 this YYABORT or YYACCEPT. */
5057 YYPOPSTACK (yylen);
5058 YY_STACK_PRINT (yyss, yyssp);
5059 while (yyssp != yyss)
5060 {
5061 yydestruct ("Cleanup: popping",
5062 yystos[*yyssp], yyvsp);
5063 YYPOPSTACK (1);
5064 }
Lev Walkin418298d2006-07-13 08:24:20 +00005065#ifndef yyoverflow
5066 if (yyss != yyssa)
5067 YYSTACK_FREE (yyss);
5068#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07005069#if YYERROR_VERBOSE
5070 if (yymsg != yymsgbuf)
5071 YYSTACK_FREE (yymsg);
5072#endif
5073 /* Make sure YYID is used. */
5074 return YYID (yyresult);
Lev Walkinf15320b2004-06-03 03:38:44 +00005075}
Lev Walkin418298d2006-07-13 08:24:20 +00005076
5077
Lev Walkind523ea42017-09-06 22:15:08 -07005078#line 2373 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +00005079
5080
5081
5082/*
5083 * Convert Xstring ('0101'B or '5'H) to the binary vector.
5084 */
5085static asn1p_value_t *
5086_convert_bitstring2binary(char *str, int base) {
5087 asn1p_value_t *val;
5088 int slen;
5089 int memlen;
5090 int baselen;
5091 int bits;
5092 uint8_t *binary_vector;
5093 uint8_t *bv_ptr;
5094 uint8_t cur_val;
5095
5096 assert(str);
5097 assert(str[0] == '\'');
5098
5099 switch(base) {
5100 case 'B':
5101 baselen = 1;
5102 break;
5103 case 'H':
5104 baselen = 4;
5105 break;
5106 default:
5107 assert(base == 'B' || base == 'H');
5108 errno = EINVAL;
5109 return NULL;
5110 }
5111
5112 slen = strlen(str);
5113 assert(str[slen - 1] == base);
5114 assert(str[slen - 2] == '\'');
5115
5116 memlen = slen / (8 / baselen); /* Conservative estimate */
5117
5118 bv_ptr = binary_vector = malloc(memlen + 1);
5119 if(bv_ptr == NULL)
5120 /* ENOMEM */
5121 return NULL;
5122
5123 cur_val = 0;
5124 bits = 0;
5125 while(*(++str) != '\'') {
5126 switch(baselen) {
5127 case 1:
5128 switch(*str) {
5129 case '1':
5130 cur_val |= 1 << (7 - (bits % 8));
5131 case '0':
5132 break;
5133 default:
5134 assert(!"_y UNREACH1");
5135 case ' ': case '\r': case '\n':
5136 continue;
5137 }
5138 break;
5139 case 4:
5140 switch(*str) {
5141 case '0': case '1': case '2': case '3': case '4':
5142 case '5': case '6': case '7': case '8': case '9':
5143 cur_val |= (*str - '0') << (4 - (bits % 8));
5144 break;
5145 case 'A': case 'B': case 'C':
5146 case 'D': case 'E': case 'F':
5147 cur_val |= ((*str - 'A') + 10)
5148 << (4 - (bits % 8));
5149 break;
5150 default:
5151 assert(!"_y UNREACH2");
5152 case ' ': case '\r': case '\n':
5153 continue;
5154 }
5155 break;
5156 }
5157
5158 bits += baselen;
5159 if((bits % 8) == 0) {
5160 *bv_ptr++ = cur_val;
5161 cur_val = 0;
5162 }
5163 }
5164
5165 *bv_ptr = cur_val;
5166 assert((bv_ptr - binary_vector) <= memlen);
5167
5168 val = asn1p_value_frombits(binary_vector, bits, 0);
5169 if(val == NULL) {
5170 free(binary_vector);
5171 }
5172
5173 return val;
5174}
5175
Lev Walkin2e9bd5c2005-08-13 09:07:11 +00005176/*
5177 * For unnamed types (used in old X.208 compliant modules)
5178 * generate some sort of interim names, to not to force human being to fix
5179 * the specification's compliance to modern ASN.1 standards.
5180 */
5181static void
5182_fixup_anonymous_identifier(asn1p_expr_t *expr) {
5183 char *p;
5184 assert(expr->Identifier == 0);
5185
5186 /*
5187 * Try to figure out the type name
5188 * without going too much into details
5189 */
5190 expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
5191 if(expr->reference && expr->reference->comp_count > 0)
5192 expr->Identifier = expr->reference->components[0].name;
5193
5194 fprintf(stderr,
5195 "WARNING: Line %d: expected lower-case member identifier, "
5196 "found an unnamed %s.\n"
5197 "WARNING: Obsolete X.208 syntax detected, "
5198 "please give the member a name.\n",
5199 yylineno, expr->Identifier ? expr->Identifier : "type");
5200
5201 if(!expr->Identifier)
5202 expr->Identifier = "unnamed";
5203 expr->Identifier = strdup(expr->Identifier);
5204 assert(expr->Identifier);
5205 /* Make a lowercase identifier from the type name */
5206 for(p = expr->Identifier; *p; p++) {
5207 switch(*p) {
5208 case 'A' ... 'Z': *p += 32; break;
5209 case ' ': *p = '_'; break;
5210 case '-': *p = '_'; break;
5211 }
5212 }
5213 fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
5214 "Name clash may occur later.\n",
5215 expr->Identifier);
5216}
5217
Lev Walkinf15320b2004-06-03 03:38:44 +00005218int
5219yyerror(const char *msg) {
Lev Walkin9d542d22006-03-14 16:31:37 +00005220 extern char *asn1p_text;
Lev Walkinf15320b2004-06-03 03:38:44 +00005221 fprintf(stderr,
5222 "ASN.1 grammar parse error "
Lev Walkind523ea42017-09-06 22:15:08 -07005223 "near %s:%d (token \"%s\"): %s\n",
5224 ASN_FILENAME, yylineno, asn1p_text, msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00005225 return -1;
5226}
5227
Lev Walkin752e9732017-08-04 02:06:22 -07005228