blob: 305532e2081a1ccfcf4dd7511591c6209589fe28 [file] [log] [blame]
Lev Walkin752e9732017-08-04 02:06:22 -07001/* A Bison parser, made by GNU Bison 2.3. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002
Lev Walkin752e9732017-08-04 02:06:22 -07003/* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
7
8 This program is free software; you can redistribute it and/or modify
Lev Walkin418298d2006-07-13 08:24:20 +00009 it under the terms of the GNU General Public License as published by
Lev Walkin752e9732017-08-04 02:06:22 -070010 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
Lev Walkin418298d2006-07-13 08:24:20 +000013 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
Lev Walkin752e9732017-08-04 02:06:22 -070017
Lev Walkin418298d2006-07-13 08:24:20 +000018 You should have received a copy of the GNU General Public License
Lev Walkin752e9732017-08-04 02:06:22 -070019 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
Lev Walkin418298d2006-07-13 08:24:20 +000022
Lev Walkin0e90aa02013-03-19 16:17:13 -070023/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
Lev Walkin752e9732017-08-04 02:06:22 -070032
Lev Walkin0e90aa02013-03-19 16:17:13 -070033 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
35
36/* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
Lev Walkin418298d2006-07-13 08:24:20 +000038
39/* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
45
46/* Identify Bison output. */
Lev Walkin0e90aa02013-03-19 16:17:13 -070047#define YYBISON 1
48
49/* Bison version. */
Lev Walkin752e9732017-08-04 02:06:22 -070050#define YYBISON_VERSION "2.3"
Lev Walkin0e90aa02013-03-19 16:17:13 -070051
52/* Skeleton name. */
53#define YYSKELETON_NAME "yacc.c"
Lev Walkin418298d2006-07-13 08:24:20 +000054
55/* Pure parsers. */
Lev Walkin0e90aa02013-03-19 16:17:13 -070056#define YYPURE 0
Lev Walkin418298d2006-07-13 08:24:20 +000057
Lev Walkin752e9732017-08-04 02:06:22 -070058/* Using locations. */
59#define YYLSP_NEEDED 0
Lev Walkin418298d2006-07-13 08:24:20 +000060
Lev Walkin0e90aa02013-03-19 16:17:13 -070061/* Substitute the variable and function names. */
Lev Walkin752e9732017-08-04 02:06:22 -070062#define yyparse asn1p_parse
63#define yylex asn1p_lex
64#define yyerror asn1p_error
65#define yylval asn1p_lval
66#define yychar asn1p_char
67#define yydebug asn1p_debug
68#define yynerrs asn1p_nerrs
Lev Walkinf15320b2004-06-03 03:38:44 +000069
Lev Walkin418298d2006-07-13 08:24:20 +000070
71/* Tokens. */
72#ifndef YYTOKENTYPE
73# define YYTOKENTYPE
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
75 know about them. */
76 enum yytokentype {
77 TOK_PPEQ = 258,
Lev Walkin0e90aa02013-03-19 16:17:13 -070078 TOK_VBracketLeft = 259,
79 TOK_VBracketRight = 260,
80 TOK_whitespace = 261,
81 TOK_opaque = 262,
82 TOK_bstring = 263,
83 TOK_cstring = 264,
84 TOK_hstring = 265,
85 TOK_identifier = 266,
86 TOK_number = 267,
87 TOK_number_negative = 268,
88 TOK_realnumber = 269,
89 TOK_tuple = 270,
90 TOK_quadruple = 271,
91 TOK_typereference = 272,
92 TOK_capitalreference = 273,
93 TOK_typefieldreference = 274,
94 TOK_valuefieldreference = 275,
95 TOK_Literal = 276,
Lev Walkinbe518fa2017-09-07 02:05:28 -070096 TOK_ExtValue_BIT_STRING = 277,
97 TOK_ABSENT = 278,
98 TOK_ABSTRACT_SYNTAX = 279,
99 TOK_ALL = 280,
100 TOK_ANY = 281,
101 TOK_APPLICATION = 282,
102 TOK_AUTOMATIC = 283,
103 TOK_BEGIN = 284,
104 TOK_BIT = 285,
105 TOK_BMPString = 286,
106 TOK_BOOLEAN = 287,
107 TOK_BY = 288,
108 TOK_CHARACTER = 289,
109 TOK_CHOICE = 290,
110 TOK_CLASS = 291,
111 TOK_COMPONENT = 292,
112 TOK_COMPONENTS = 293,
113 TOK_CONSTRAINED = 294,
114 TOK_CONTAINING = 295,
115 TOK_DEFAULT = 296,
116 TOK_DEFINITIONS = 297,
117 TOK_DEFINED = 298,
118 TOK_EMBEDDED = 299,
119 TOK_ENCODED = 300,
120 TOK_ENCODING_CONTROL = 301,
121 TOK_END = 302,
122 TOK_ENUMERATED = 303,
123 TOK_EXPLICIT = 304,
124 TOK_EXPORTS = 305,
125 TOK_EXTENSIBILITY = 306,
126 TOK_EXTERNAL = 307,
127 TOK_FALSE = 308,
128 TOK_FROM = 309,
129 TOK_GeneralizedTime = 310,
130 TOK_GeneralString = 311,
131 TOK_GraphicString = 312,
132 TOK_IA5String = 313,
133 TOK_IDENTIFIER = 314,
134 TOK_IMPLICIT = 315,
135 TOK_IMPLIED = 316,
136 TOK_IMPORTS = 317,
137 TOK_INCLUDES = 318,
138 TOK_INSTANCE = 319,
139 TOK_INSTRUCTIONS = 320,
140 TOK_INTEGER = 321,
141 TOK_ISO646String = 322,
142 TOK_MAX = 323,
143 TOK_MIN = 324,
144 TOK_MINUS_INFINITY = 325,
145 TOK_NULL = 326,
146 TOK_NumericString = 327,
147 TOK_OBJECT = 328,
148 TOK_ObjectDescriptor = 329,
149 TOK_OCTET = 330,
150 TOK_OF = 331,
151 TOK_OPTIONAL = 332,
152 TOK_PATTERN = 333,
153 TOK_PDV = 334,
154 TOK_PLUS_INFINITY = 335,
155 TOK_PRESENT = 336,
156 TOK_PrintableString = 337,
157 TOK_PRIVATE = 338,
158 TOK_REAL = 339,
159 TOK_RELATIVE_OID = 340,
160 TOK_SEQUENCE = 341,
161 TOK_SET = 342,
162 TOK_SIZE = 343,
163 TOK_STRING = 344,
164 TOK_SYNTAX = 345,
165 TOK_T61String = 346,
166 TOK_TAGS = 347,
167 TOK_TeletexString = 348,
168 TOK_TRUE = 349,
169 TOK_TYPE_IDENTIFIER = 350,
170 TOK_UNIQUE = 351,
171 TOK_UNIVERSAL = 352,
172 TOK_UniversalString = 353,
173 TOK_UTCTime = 354,
174 TOK_UTF8String = 355,
175 TOK_VideotexString = 356,
176 TOK_VisibleString = 357,
177 TOK_WITH = 358,
178 UTF8_BOM = 359,
179 TOK_EXCEPT = 360,
180 TOK_INTERSECTION = 361,
181 TOK_UNION = 362,
182 TOK_TwoDots = 363,
183 TOK_ThreeDots = 364
Lev Walkin418298d2006-07-13 08:24:20 +0000184 };
185#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700186/* Tokens. */
Lev Walkin418298d2006-07-13 08:24:20 +0000187#define TOK_PPEQ 258
Lev Walkin0e90aa02013-03-19 16:17:13 -0700188#define TOK_VBracketLeft 259
189#define TOK_VBracketRight 260
190#define TOK_whitespace 261
191#define TOK_opaque 262
192#define TOK_bstring 263
193#define TOK_cstring 264
194#define TOK_hstring 265
195#define TOK_identifier 266
196#define TOK_number 267
197#define TOK_number_negative 268
198#define TOK_realnumber 269
199#define TOK_tuple 270
200#define TOK_quadruple 271
201#define TOK_typereference 272
202#define TOK_capitalreference 273
203#define TOK_typefieldreference 274
204#define TOK_valuefieldreference 275
205#define TOK_Literal 276
Lev Walkinbe518fa2017-09-07 02:05:28 -0700206#define TOK_ExtValue_BIT_STRING 277
207#define TOK_ABSENT 278
208#define TOK_ABSTRACT_SYNTAX 279
209#define TOK_ALL 280
210#define TOK_ANY 281
211#define TOK_APPLICATION 282
212#define TOK_AUTOMATIC 283
213#define TOK_BEGIN 284
214#define TOK_BIT 285
215#define TOK_BMPString 286
216#define TOK_BOOLEAN 287
217#define TOK_BY 288
218#define TOK_CHARACTER 289
219#define TOK_CHOICE 290
220#define TOK_CLASS 291
221#define TOK_COMPONENT 292
222#define TOK_COMPONENTS 293
223#define TOK_CONSTRAINED 294
224#define TOK_CONTAINING 295
225#define TOK_DEFAULT 296
226#define TOK_DEFINITIONS 297
227#define TOK_DEFINED 298
228#define TOK_EMBEDDED 299
229#define TOK_ENCODED 300
230#define TOK_ENCODING_CONTROL 301
231#define TOK_END 302
232#define TOK_ENUMERATED 303
233#define TOK_EXPLICIT 304
234#define TOK_EXPORTS 305
235#define TOK_EXTENSIBILITY 306
236#define TOK_EXTERNAL 307
237#define TOK_FALSE 308
238#define TOK_FROM 309
239#define TOK_GeneralizedTime 310
240#define TOK_GeneralString 311
241#define TOK_GraphicString 312
242#define TOK_IA5String 313
243#define TOK_IDENTIFIER 314
244#define TOK_IMPLICIT 315
245#define TOK_IMPLIED 316
246#define TOK_IMPORTS 317
247#define TOK_INCLUDES 318
248#define TOK_INSTANCE 319
249#define TOK_INSTRUCTIONS 320
250#define TOK_INTEGER 321
251#define TOK_ISO646String 322
252#define TOK_MAX 323
253#define TOK_MIN 324
254#define TOK_MINUS_INFINITY 325
255#define TOK_NULL 326
256#define TOK_NumericString 327
257#define TOK_OBJECT 328
258#define TOK_ObjectDescriptor 329
259#define TOK_OCTET 330
260#define TOK_OF 331
261#define TOK_OPTIONAL 332
262#define TOK_PATTERN 333
263#define TOK_PDV 334
264#define TOK_PLUS_INFINITY 335
265#define TOK_PRESENT 336
266#define TOK_PrintableString 337
267#define TOK_PRIVATE 338
268#define TOK_REAL 339
269#define TOK_RELATIVE_OID 340
270#define TOK_SEQUENCE 341
271#define TOK_SET 342
272#define TOK_SIZE 343
273#define TOK_STRING 344
274#define TOK_SYNTAX 345
275#define TOK_T61String 346
276#define TOK_TAGS 347
277#define TOK_TeletexString 348
278#define TOK_TRUE 349
279#define TOK_TYPE_IDENTIFIER 350
280#define TOK_UNIQUE 351
281#define TOK_UNIVERSAL 352
282#define TOK_UniversalString 353
283#define TOK_UTCTime 354
284#define TOK_UTF8String 355
285#define TOK_VideotexString 356
286#define TOK_VisibleString 357
287#define TOK_WITH 358
288#define UTF8_BOM 359
289#define TOK_EXCEPT 360
290#define TOK_INTERSECTION 361
291#define TOK_UNION 362
292#define TOK_TwoDots 363
293#define TOK_ThreeDots 364
Lev Walkin418298d2006-07-13 08:24:20 +0000294
295
296
Lev Walkin752e9732017-08-04 02:06:22 -0700297
298/* Copy the first part of user declarations. */
299#line 1 "asn1p_y.y"
300
301
302#include <stdlib.h>
303#include <stdio.h>
304#include <string.h>
Lev Walkin0c686452017-09-07 22:59:36 -0700305#include <stdarg.h>
Lev Walkin752e9732017-08-04 02:06:22 -0700306#include <errno.h>
307#include <assert.h>
308
309#include "asn1parser.h"
310
311#define YYPARSE_PARAM param
312#define YYPARSE_PARAM_TYPE void **
313#define YYERROR_VERBOSE
Lev Walkin0c686452017-09-07 22:59:36 -0700314#define YYDEBUG 1
315#define YYFPRINTF prefixed_fprintf
316
317/*
318 * Prefix parser debug with "PARSER: " for easier human eye scanning.
319 */
320static int
321__attribute__((format(printf, 2, 3)))
322prefixed_fprintf(FILE *f, const char *fmt, ...) {
323 static int line_ended = 1;
324 va_list ap;
325 va_start(ap, fmt);
326 if(line_ended) {
327 fprintf(f, "PARSER: ");
328 line_ended = 0;
329 }
330 size_t len = strlen(fmt);
331 if(len && fmt[len-1] == '\n') {
332 line_ended = 1;
333 }
334 int ret = vfprintf(f, fmt, ap);
335 va_end(ap);
336 return ret;
337}
Lev Walkin752e9732017-08-04 02:06:22 -0700338
339int yylex(void);
Lev Walkin59165cf2017-09-11 06:24:45 -0700340static int yyerror(const char *msg);
341
Lev Walkin752e9732017-08-04 02:06:22 -0700342#ifdef YYBYACC
343int yyparse(void **param); /* byacc does not produce a prototype */
344#endif
345void asn1p_lexer_hack_push_opaque_state(void);
346void asn1p_lexer_hack_enable_with_syntax(void);
347void asn1p_lexer_hack_push_encoding_control(void);
348#define yylineno asn1p_lineno
349extern int asn1p_lineno;
Lev Walkind523ea42017-09-06 22:15:08 -0700350const char *asn1p_parse_debug_filename;
351#define ASN_FILENAME asn1p_parse_debug_filename
Lev Walkin752e9732017-08-04 02:06:22 -0700352
353/*
354 * Process directives as <ASN1C:RepresentAsPointer>
355 */
356extern int asn1p_as_pointer;
357
358/*
359 * This temporary variable is used to solve the shortcomings of 1-lookahead
360 * parser.
361 */
362static struct AssignedIdentifier *saved_aid;
363
364static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
365static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
366
367static asn1p_module_t *currentModule;
368#define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule))
369
370#define checkmem(ptr) do { \
371 if(!(ptr)) \
372 return yyerror("Memory failure"); \
373 } while(0)
374
375#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
376 if(arg1->type != constr_type) { \
377 int __ret; \
378 root = asn1p_constraint_new(yylineno, currentModule); \
379 checkmem(root); \
380 root->type = constr_type; \
381 __ret = asn1p_constraint_insert(root, \
382 arg1); \
383 checkmem(__ret == 0); \
384 } else { \
385 root = arg1; \
386 } \
387 if(arg2) { \
388 int __ret \
389 = asn1p_constraint_insert(root, arg2); \
390 checkmem(__ret == 0); \
391 } \
392 } while(0)
393
394#ifdef AL_IMPORT
395#error AL_IMPORT DEFINED ELSEWHERE!
396#endif
397#define AL_IMPORT(to,where,from,field) do { \
398 if(!(from)) break; \
399 while(TQ_FIRST(&((from)->where))) { \
400 TQ_ADD(&((to)->where), \
401 TQ_REMOVE(&((from)->where), field), \
402 field); \
403 } \
404 assert(TQ_FIRST(&((from)->where)) == 0); \
405 } while(0)
406
407
408
409/* Enabling traces. */
410#ifndef YYDEBUG
411# define YYDEBUG 0
412#endif
413
414/* Enabling verbose error messages. */
415#ifdef YYERROR_VERBOSE
416# undef YYERROR_VERBOSE
417# define YYERROR_VERBOSE 1
418#else
419# define YYERROR_VERBOSE 0
420#endif
421
422/* Enabling the token table. */
423#ifndef YYTOKEN_TABLE
424# define YYTOKEN_TABLE 0
425#endif
426
Lev Walkin0e90aa02013-03-19 16:17:13 -0700427#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
428typedef union YYSTYPE
Lev Walkin59165cf2017-09-11 06:24:45 -0700429#line 116 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -0700430{
Lev Walkinf15320b2004-06-03 03:38:44 +0000431 asn1p_t *a_grammar;
432 asn1p_module_flags_e a_module_flags;
433 asn1p_module_t *a_module;
434 asn1p_expr_type_e a_type; /* ASN.1 Type */
435 asn1p_expr_t *a_expr; /* Constructed collection */
436 asn1p_constraint_t *a_constr; /* Constraint */
437 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
438 asn1p_xports_t *a_xports; /* IMports/EXports */
Lev Walkinb36317c2005-08-12 10:09:10 +0000439 struct AssignedIdentifier a_aid; /* Assigned Identifier */
Lev Walkinf15320b2004-06-03 03:38:44 +0000440 asn1p_oid_t *a_oid; /* Object Identifier */
441 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
442 struct asn1p_type_tag_s a_tag; /* A tag */
443 asn1p_ref_t *a_ref; /* Reference to custom type */
444 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
445 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
446 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
447 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
448 struct asn1p_param_s a_parg; /* A parameter argument */
449 asn1p_paramlist_t *a_plist; /* A pargs list */
Lev Walkin9c974182004-09-15 11:59:51 +0000450 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
Lev Walkinf15320b2004-06-03 03:38:44 +0000451 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
Lev Walkind21c5052004-09-29 13:18:09 +0000452 asn1c_integer_t a_int;
Lev Walkinadf863f2006-09-05 16:18:34 +0000453 double a_dbl;
Lev Walkinf15320b2004-06-03 03:38:44 +0000454 char *tv_str;
455 struct {
456 char *buf;
457 int len;
458 } tv_opaque;
459 struct {
460 char *name;
461 struct asn1p_type_tag_s tag;
462 } tv_nametag;
Lev Walkin752e9732017-08-04 02:06:22 -0700463}
464/* Line 193 of yacc.c. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700465#line 466 "asn1p_y.c"
Lev Walkin752e9732017-08-04 02:06:22 -0700466 YYSTYPE;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700467# define yystype YYSTYPE /* obsolescent; will be withdrawn */
468# define YYSTYPE_IS_DECLARED 1
Lev Walkin752e9732017-08-04 02:06:22 -0700469# define YYSTYPE_IS_TRIVIAL 1
Lev Walkinf15320b2004-06-03 03:38:44 +0000470#endif
471
Lev Walkin0e90aa02013-03-19 16:17:13 -0700472
Lev Walkin418298d2006-07-13 08:24:20 +0000473
474/* Copy the second part of user declarations. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000475
Lev Walkin752e9732017-08-04 02:06:22 -0700476
477/* Line 216 of yacc.c. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700478#line 479 "asn1p_y.c"
Lev Walkinf15320b2004-06-03 03:38:44 +0000479
Lev Walkin0e90aa02013-03-19 16:17:13 -0700480#ifdef short
481# undef short
482#endif
483
484#ifdef YYTYPE_UINT8
485typedef YYTYPE_UINT8 yytype_uint8;
486#else
487typedef unsigned char yytype_uint8;
488#endif
489
490#ifdef YYTYPE_INT8
491typedef YYTYPE_INT8 yytype_int8;
492#elif (defined __STDC__ || defined __C99__FUNC__ \
493 || defined __cplusplus || defined _MSC_VER)
494typedef signed char yytype_int8;
495#else
496typedef short int yytype_int8;
497#endif
498
499#ifdef YYTYPE_UINT16
500typedef YYTYPE_UINT16 yytype_uint16;
501#else
502typedef unsigned short int yytype_uint16;
503#endif
504
505#ifdef YYTYPE_INT16
506typedef YYTYPE_INT16 yytype_int16;
507#else
508typedef short int yytype_int16;
509#endif
510
511#ifndef YYSIZE_T
512# ifdef __SIZE_TYPE__
513# define YYSIZE_T __SIZE_TYPE__
514# elif defined size_t
515# define YYSIZE_T size_t
516# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
517 || defined __cplusplus || defined _MSC_VER)
518# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
519# define YYSIZE_T size_t
520# else
521# define YYSIZE_T unsigned int
522# endif
523#endif
524
525#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
526
527#ifndef YY_
528# if defined YYENABLE_NLS && YYENABLE_NLS
529# if ENABLE_NLS
530# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700531# define YY_(msgid) dgettext ("bison-runtime", msgid)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700532# endif
533# endif
534# ifndef YY_
Lev Walkin752e9732017-08-04 02:06:22 -0700535# define YY_(msgid) msgid
Lev Walkin0e90aa02013-03-19 16:17:13 -0700536# endif
537#endif
538
539/* Suppress unused-variable warnings by "using" E. */
540#if ! defined lint || defined __GNUC__
Lev Walkin752e9732017-08-04 02:06:22 -0700541# define YYUSE(e) ((void) (e))
Lev Walkin0e90aa02013-03-19 16:17:13 -0700542#else
Lev Walkin752e9732017-08-04 02:06:22 -0700543# define YYUSE(e) /* empty */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700544#endif
545
546/* Identity function, used to suppress warnings about constant conditions. */
547#ifndef lint
Lev Walkin752e9732017-08-04 02:06:22 -0700548# define YYID(n) (n)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700549#else
550#if (defined __STDC__ || defined __C99__FUNC__ \
551 || defined __cplusplus || defined _MSC_VER)
552static int
Lev Walkin752e9732017-08-04 02:06:22 -0700553YYID (int i)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700554#else
555static int
Lev Walkin752e9732017-08-04 02:06:22 -0700556YYID (i)
557 int i;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700558#endif
559{
Lev Walkin752e9732017-08-04 02:06:22 -0700560 return i;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700561}
562#endif
563
564#if ! defined yyoverflow || YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +0000565
Lev Walkin418298d2006-07-13 08:24:20 +0000566/* The parser invokes alloca or malloc; define the necessary symbols. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000567
Lev Walkin0e90aa02013-03-19 16:17:13 -0700568# ifdef YYSTACK_USE_ALLOCA
569# if YYSTACK_USE_ALLOCA
570# ifdef __GNUC__
571# define YYSTACK_ALLOC __builtin_alloca
572# elif defined __BUILTIN_VA_ARG_INCR
573# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
574# elif defined _AIX
575# define YYSTACK_ALLOC __alloca
576# elif defined _MSC_VER
577# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
578# define alloca _alloca
Lev Walkin418298d2006-07-13 08:24:20 +0000579# else
Lev Walkin0e90aa02013-03-19 16:17:13 -0700580# define YYSTACK_ALLOC alloca
Lev Walkin752e9732017-08-04 02:06:22 -0700581# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700582 || defined __cplusplus || defined _MSC_VER)
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
Lev Walkin418298d2006-07-13 08:24:20 +0000587# endif
588# endif
589# endif
590# endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000591
Lev Walkin418298d2006-07-13 08:24:20 +0000592# ifdef YYSTACK_ALLOC
Lev Walkin0e90aa02013-03-19 16:17:13 -0700593 /* Pacify GCC's `empty if-body' warning. */
594# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
595# ifndef YYSTACK_ALLOC_MAXIMUM
596 /* The OS might guarantee only one guard page at the bottom of the stack,
597 and a page size can be as small as 4096 bytes. So we cannot safely
598 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
599 to allow for a few compiler-allocated temporary stack slots. */
600# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
Lev Walkin418298d2006-07-13 08:24:20 +0000601# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700602# else
603# define YYSTACK_ALLOC YYMALLOC
604# define YYSTACK_FREE YYFREE
605# ifndef YYSTACK_ALLOC_MAXIMUM
606# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
607# endif
Lev Walkin752e9732017-08-04 02:06:22 -0700608# if (defined __cplusplus && ! defined _STDLIB_H \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700609 && ! ((defined YYMALLOC || defined malloc) \
610 && (defined YYFREE || defined free)))
611# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Lev Walkin752e9732017-08-04 02:06:22 -0700612# ifndef _STDLIB_H
613# define _STDLIB_H 1
Lev Walkin0e90aa02013-03-19 16:17:13 -0700614# endif
615# endif
616# ifndef YYMALLOC
617# define YYMALLOC malloc
Lev Walkin752e9732017-08-04 02:06:22 -0700618# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700619 || defined __cplusplus || defined _MSC_VER)
620void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
621# endif
622# endif
623# ifndef YYFREE
624# define YYFREE free
Lev Walkin752e9732017-08-04 02:06:22 -0700625# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700626 || defined __cplusplus || defined _MSC_VER)
627void free (void *); /* INFRINGES ON USER NAME SPACE */
628# endif
629# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000630# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700631#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
Lev Walkin418298d2006-07-13 08:24:20 +0000632
633
Lev Walkin0e90aa02013-03-19 16:17:13 -0700634#if (! defined yyoverflow \
635 && (! defined __cplusplus \
636 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Lev Walkin418298d2006-07-13 08:24:20 +0000637
638/* A type that is properly aligned for any stack member. */
639union yyalloc
640{
Lev Walkin752e9732017-08-04 02:06:22 -0700641 yytype_int16 yyss;
642 YYSTYPE yyvs;
643 };
Lev Walkin418298d2006-07-13 08:24:20 +0000644
645/* The size of the maximum gap between one aligned stack and the next. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700646# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
Lev Walkin418298d2006-07-13 08:24:20 +0000647
648/* The size of an array large to enough to hold all stacks, each with
649 N elements. */
650# define YYSTACK_BYTES(N) \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700651 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
652 + YYSTACK_GAP_MAXIMUM)
Lev Walkin418298d2006-07-13 08:24:20 +0000653
Lev Walkin752e9732017-08-04 02:06:22 -0700654/* Copy COUNT objects from FROM to TO. The source and destination do
655 not overlap. */
656# ifndef YYCOPY
657# if defined __GNUC__ && 1 < __GNUC__
658# define YYCOPY(To, From, Count) \
659 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
660# else
661# define YYCOPY(To, From, Count) \
662 do \
663 { \
664 YYSIZE_T yyi; \
665 for (yyi = 0; yyi < (Count); yyi++) \
666 (To)[yyi] = (From)[yyi]; \
667 } \
668 while (YYID (0))
669# endif
670# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000671
672/* Relocate STACK from its old location to the new one. The
673 local variables YYSIZE and YYSTACKSIZE give the old and new number of
674 elements in the stack, and YYPTR gives the new location of the
675 stack. Advance YYPTR to a properly aligned location for the next
676 stack. */
Lev Walkin752e9732017-08-04 02:06:22 -0700677# define YYSTACK_RELOCATE(Stack) \
Lev Walkin418298d2006-07-13 08:24:20 +0000678 do \
679 { \
680 YYSIZE_T yynewbytes; \
Lev Walkin752e9732017-08-04 02:06:22 -0700681 YYCOPY (&yyptr->Stack, Stack, yysize); \
682 Stack = &yyptr->Stack; \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700683 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
Lev Walkin418298d2006-07-13 08:24:20 +0000684 yyptr += yynewbytes / sizeof (*yyptr); \
685 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700686 while (YYID (0))
Lev Walkinf15320b2004-06-03 03:38:44 +0000687
688#endif
689
Lev Walkin0e90aa02013-03-19 16:17:13 -0700690/* YYFINAL -- State number of the termination state. */
Lev Walkin752e9732017-08-04 02:06:22 -0700691#define YYFINAL 9
Lev Walkin0e90aa02013-03-19 16:17:13 -0700692/* YYLAST -- Last index in YYTABLE. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700693#define YYLAST 919
Lev Walkin418298d2006-07-13 08:24:20 +0000694
Lev Walkin0e90aa02013-03-19 16:17:13 -0700695/* YYNTOKENS -- Number of terminals. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700696#define YYNTOKENS 126
Lev Walkin0e90aa02013-03-19 16:17:13 -0700697/* YYNNTS -- Number of nonterminals. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700698#define YYNNTS 147
Lev Walkin0e90aa02013-03-19 16:17:13 -0700699/* YYNRULES -- Number of rules. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700700#define YYNRULES 342
Lev Walkin0e90aa02013-03-19 16:17:13 -0700701/* YYNRULES -- Number of states. */
Lev Walkin59165cf2017-09-11 06:24:45 -0700702#define YYNSTATES 522
Lev Walkin418298d2006-07-13 08:24:20 +0000703
704/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
705#define YYUNDEFTOK 2
Lev Walkin59165cf2017-09-11 06:24:45 -0700706#define YYMAXUTOK 365
Lev Walkin418298d2006-07-13 08:24:20 +0000707
Lev Walkin0e90aa02013-03-19 16:17:13 -0700708#define YYTRANSLATE(YYX) \
709 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Lev Walkin418298d2006-07-13 08:24:20 +0000710
711/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700712static const yytype_uint8 yytranslate[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000713{
714 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
715 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
716 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin59165cf2017-09-11 06:24:45 -0700717 2, 2, 2, 122, 2, 2, 2, 2, 2, 2,
718 115, 116, 2, 2, 118, 2, 123, 2, 2, 2,
719 2, 2, 2, 2, 2, 2, 2, 2, 119, 117,
720 124, 2, 2, 2, 125, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000721 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
722 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin59165cf2017-09-11 06:24:45 -0700723 2, 120, 2, 121, 106, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000724 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
725 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin59165cf2017-09-11 06:24:45 -0700726 2, 2, 2, 113, 108, 114, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000727 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
728 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
729 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
730 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
731 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
732 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
733 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
734 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
735 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
736 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
739 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
740 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
741 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
742 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
743 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
744 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
745 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
746 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
747 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
748 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Lev Walkin752e9732017-08-04 02:06:22 -0700749 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Lev Walkin59165cf2017-09-11 06:24:45 -0700750 105, 107, 109, 110, 111, 112
Lev Walkin418298d2006-07-13 08:24:20 +0000751};
752
753#if YYDEBUG
754/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
755 YYRHS. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700756static const yytype_uint16 yyprhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000757{
Lev Walkin752e9732017-08-04 02:06:22 -0700758 0, 0, 3, 6, 8, 10, 13, 14, 24, 25,
759 27, 31, 34, 36, 39, 41, 46, 48, 49, 51,
760 53, 56, 59, 62, 65, 68, 71, 72, 74, 78,
761 80, 83, 85, 87, 89, 90, 94, 96, 97, 99,
762 103, 106, 107, 109, 111, 114, 115, 117, 122, 124,
763 128, 130, 134, 136, 137, 139, 143, 147, 150, 152,
Lev Walkin59165cf2017-09-11 06:24:45 -0700764 156, 158, 162, 164, 168, 173, 175, 180, 184, 188,
765 195, 202, 204, 208, 210, 214, 218, 222, 226, 228,
766 232, 234, 236, 238, 240, 241, 243, 245, 249, 255,
767 259, 262, 266, 268, 270, 274, 277, 279, 281, 287,
768 288, 290, 292, 296, 299, 304, 308, 312, 316, 320,
769 324, 325, 327, 328, 335, 337, 340, 342, 344, 346,
770 350, 352, 356, 360, 362, 365, 368, 371, 375, 376,
771 379, 381, 383, 385, 390, 395, 400, 407, 414, 416,
772 421, 425, 427, 429, 433, 437, 441, 443, 447, 449,
773 451, 453, 455, 459, 463, 465, 470, 472, 474, 475,
774 479, 481, 483, 485, 487, 489, 491, 493, 495, 499,
775 501, 503, 505, 507, 510, 512, 514, 516, 518, 520,
776 523, 526, 528, 530, 533, 536, 538, 540, 542, 544,
777 546, 548, 551, 553, 558, 563, 569, 574, 578, 580,
778 582, 584, 586, 588, 590, 592, 594, 596, 598, 600,
779 602, 604, 606, 608, 610, 612, 614, 615, 617, 618,
780 620, 621, 623, 625, 629, 631, 634, 636, 638, 640,
781 642, 644, 648, 654, 656, 660, 662, 666, 668, 672,
782 674, 678, 680, 684, 686, 688, 690, 692, 694, 696,
783 698, 701, 704, 707, 710, 714, 716, 718, 720, 722,
784 724, 726, 728, 731, 733, 737, 741, 743, 745, 747,
785 751, 757, 759, 763, 767, 768, 770, 772, 774, 776,
786 778, 780, 782, 783, 789, 792, 794, 797, 800, 804,
787 806, 808, 812, 817, 819, 823, 826, 830, 832, 836,
788 837, 839, 841, 844, 846, 850, 852, 854, 858, 863,
789 868, 870, 874, 879, 884, 886, 888, 892, 894, 899,
790 904, 906, 908, 910, 912, 914, 915, 917, 920, 925,
791 926, 928, 930, 932, 933, 935, 937, 939, 941, 942,
792 944, 946, 948
Lev Walkin418298d2006-07-13 08:24:20 +0000793};
794
Lev Walkin0e90aa02013-03-19 16:17:13 -0700795/* YYRHS -- A `-1'-separated list of the rules' RHS. */
796static const yytype_int16 yyrhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000797{
Lev Walkin59165cf2017-09-11 06:24:45 -0700798 127, 0, -1, 104, 128, -1, 128, -1, 129, -1,
799 128, 129, -1, -1, 268, 130, 131, 42, 135, 3,
800 29, 138, 47, -1, -1, 132, -1, 113, 133, 114,
801 -1, 113, 114, -1, 134, -1, 133, 134, -1, 270,
802 -1, 270, 115, 12, 116, -1, 12, -1, -1, 136,
803 -1, 137, -1, 136, 137, -1, 49, 92, -1, 60,
Lev Walkinbe518fa2017-09-07 02:05:28 -0700804 92, -1, 28, 92, -1, 51, 61, -1, 18, 65,
Lev Walkin59165cf2017-09-11 06:24:45 -0700805 -1, -1, 139, -1, 151, 143, 140, -1, 141, -1,
806 140, 141, -1, 158, -1, 193, -1, 156, -1, -1,
807 46, 18, 142, -1, 204, -1, -1, 144, -1, 62,
808 145, 117, -1, 62, 54, -1, -1, 146, -1, 148,
809 -1, 146, 148, -1, -1, 132, -1, 149, 54, 268,
810 147, -1, 150, -1, 149, 118, 150, -1, 268, -1,
811 268, 113, 114, -1, 270, -1, -1, 152, -1, 50,
812 153, 117, -1, 50, 25, 117, -1, 50, 117, -1,
813 154, -1, 153, 118, 154, -1, 268, -1, 268, 113,
814 114, -1, 270, -1, 113, 214, 114, -1, 268, 178,
815 3, 155, -1, 187, -1, 187, 113, 161, 114, -1,
816 268, 3, 178, -1, 268, 3, 168, -1, 268, 113,
817 159, 114, 3, 178, -1, 268, 113, 159, 114, 3,
818 168, -1, 160, -1, 159, 118, 160, -1, 268, -1,
819 268, 119, 270, -1, 268, 119, 268, -1, 201, 119,
820 270, -1, 201, 119, 268, -1, 162, -1, 161, 118,
821 162, -1, 181, -1, 196, -1, 197, -1, 155, -1,
822 -1, 164, -1, 165, -1, 164, 118, 165, -1, 164,
823 118, 4, 164, 5, -1, 270, 182, 250, -1, 182,
824 250, -1, 38, 76, 182, -1, 177, -1, 167, -1,
825 166, 118, 167, -1, 270, 182, -1, 177, -1, 182,
826 -1, 36, 113, 170, 114, 172, -1, -1, 96, -1,
827 171, -1, 170, 118, 171, -1, 19, 250, -1, 20,
828 178, 169, 250, -1, 20, 191, 250, -1, 20, 192,
829 250, -1, 19, 191, 250, -1, 19, 178, 250, -1,
830 19, 192, 250, -1, -1, 173, -1, -1, 103, 90,
831 113, 174, 175, 114, -1, 176, -1, 175, 176, -1,
832 6, -1, 21, -1, 190, -1, 120, 175, 121, -1,
833 111, -1, 111, 122, 197, -1, 111, 122, 261, -1,
834 179, -1, 263, 181, -1, 157, 208, -1, 185, 208,
835 -1, 263, 184, 208, -1, -1, 183, 185, -1, 186,
836 -1, 157, -1, 203, -1, 35, 113, 166, 114, -1,
837 86, 113, 163, 114, -1, 87, 113, 163, 114, -1,
838 86, 209, 76, 269, 263, 184, -1, 87, 209, 76,
839 269, 263, 184, -1, 26, -1, 26, 43, 33, 270,
840 -1, 64, 76, 187, -1, 17, -1, 18, -1, 17,
841 123, 268, -1, 18, 123, 268, -1, 18, 123, 188,
842 -1, 189, -1, 188, 123, 189, -1, 190, -1, 19,
843 -1, 20, -1, 19, -1, 191, 123, 19, -1, 191,
844 123, 20, -1, 18, -1, 270, 178, 3, 194, -1,
845 196, -1, 197, -1, -1, 113, 195, 199, -1, 71,
846 -1, 53, -1, 94, -1, 261, -1, 262, -1, 198,
847 -1, 228, -1, 272, -1, 268, 123, 270, -1, 9,
848 -1, 15, -1, 16, -1, 200, -1, 199, 7, -1,
849 7, -1, 270, -1, 32, -1, 71, -1, 84, -1,
850 75, 89, -1, 73, 59, -1, 85, -1, 52, -1,
851 44, 79, -1, 34, 89, -1, 99, -1, 55, -1,
852 204, -1, 202, -1, 66, -1, 48, -1, 30, 89,
853 -1, 201, -1, 66, 113, 254, 114, -1, 48, 113,
854 258, 114, -1, 30, 89, 113, 256, 114, -1, 22,
855 113, 252, 114, -1, 22, 113, 114, -1, 31, -1,
856 56, -1, 57, -1, 58, -1, 67, -1, 72, -1,
857 82, -1, 91, -1, 93, -1, 98, -1, 100, -1,
858 101, -1, 102, -1, 74, -1, 108, -1, 109, -1,
859 106, -1, 107, -1, -1, 210, -1, -1, 211, -1,
860 -1, 210, -1, 222, -1, 115, 212, 116, -1, 210,
861 -1, 211, 210, -1, 213, -1, 239, -1, 214, -1,
862 111, -1, 215, -1, 215, 118, 111, -1, 215, 118,
863 111, 118, 215, -1, 216, -1, 25, 105, 219, -1,
864 217, -1, 216, 205, 217, -1, 218, -1, 217, 206,
865 218, -1, 219, -1, 219, 105, 219, -1, 220, -1,
866 115, 215, 116, -1, 227, -1, 229, -1, 221, -1,
867 222, -1, 230, -1, 223, -1, 224, -1, 54, 210,
868 -1, 88, 210, -1, 78, 9, -1, 78, 270, -1,
869 225, 243, 226, -1, 227, -1, 69, -1, 227, -1,
870 68, -1, 194, -1, 8, -1, 10, -1, 63, 178,
871 -1, 180, -1, 103, 37, 231, -1, 103, 38, 232,
872 -1, 210, -1, 233, -1, 234, -1, 113, 235, 114,
873 -1, 113, 111, 118, 235, 114, -1, 236, -1, 235,
874 118, 236, -1, 272, 207, 237, -1, -1, 238, -1,
875 81, -1, 23, -1, 77, -1, 240, -1, 244, -1,
876 242, -1, -1, 39, 33, 113, 241, 199, -1, 40,
877 178, -1, 110, -1, 110, 124, -1, 124, 110, -1,
878 124, 110, 124, -1, 245, -1, 246, -1, 113, 268,
879 114, -1, 245, 113, 247, 114, -1, 248, -1, 247,
880 118, 248, -1, 125, 249, -1, 125, 123, 249, -1,
881 270, -1, 249, 123, 270, -1, -1, 251, -1, 77,
882 -1, 41, 194, -1, 253, -1, 252, 118, 253, -1,
883 270, -1, 255, -1, 254, 118, 255, -1, 270, 115,
884 261, 116, -1, 270, 115, 197, 116, -1, 257, -1,
885 256, 118, 257, -1, 270, 115, 12, 116, -1, 270,
886 115, 197, 116, -1, 259, -1, 260, -1, 259, 118,
887 260, -1, 270, -1, 270, 115, 261, 116, -1, 270,
888 115, 197, 116, -1, 261, -1, 111, -1, 12, -1,
889 13, -1, 14, -1, -1, 264, -1, 265, 267, -1,
890 120, 266, 12, 121, -1, -1, 97, -1, 27, -1,
891 83, -1, -1, 60, -1, 49, -1, 17, -1, 18,
892 -1, -1, 270, -1, 11, -1, 270, -1, 271, -1
Lev Walkin418298d2006-07-13 08:24:20 +0000893};
894
895/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700896static const yytype_uint16 yyrline[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000897{
Lev Walkin59165cf2017-09-11 06:24:45 -0700898 0, 415, 415, 418, 424, 429, 446, 446, 475, 476,
899 480, 483, 489, 495, 504, 508, 512, 522, 523, 532,
900 535, 544, 547, 550, 553, 557, 578, 579, 588, 601,
901 604, 621, 628, 642, 650, 649, 663, 676, 677, 680,
902 690, 696, 697, 700, 705, 712, 713, 717, 728, 733,
903 740, 746, 752, 762, 763, 775, 778, 781, 789, 794,
904 801, 807, 813, 822, 825, 845, 855, 875, 881, 897,
905 903, 911, 920, 931, 935, 943, 951, 959, 970, 975,
906 982, 983, 991, 999, 1022, 1023, 1026, 1031, 1035, 1043,
907 1050, 1056, 1063, 1069, 1074, 1081, 1086, 1089, 1096, 1106,
908 1107, 1111, 1118, 1128, 1138, 1149, 1159, 1170, 1180, 1191,
909 1203, 1204, 1211, 1210, 1219, 1223, 1230, 1234, 1237, 1241,
910 1247, 1255, 1264, 1275, 1278, 1285, 1308, 1331, 1355, 1362,
911 1381, 1382, 1385, 1386, 1392, 1398, 1404, 1414, 1424, 1430,
912 1442, 1457, 1465, 1473, 1484, 1495, 1517, 1525, 1534, 1538,
913 1543, 1552, 1557, 1562, 1570, 1593, 1603, 1604, 1605, 1605,
914 1613, 1618, 1623, 1628, 1629, 1630, 1631, 1635, 1636, 1654,
915 1658, 1663, 1671, 1680, 1695, 1696, 1702, 1703, 1704, 1705,
916 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1721,
917 1722, 1723, 1727, 1733, 1738, 1743, 1748, 1753, 1762, 1763,
918 1767, 1771, 1772, 1773, 1774, 1775, 1779, 1780, 1781, 1782,
919 1786, 1787, 1794, 1794, 1795, 1795, 1799, 1800, 1804, 1805,
920 1809, 1810, 1811, 1815, 1821, 1822, 1831, 1831, 1833, 1836,
921 1840, 1841, 1847, 1858, 1859, 1865, 1866, 1872, 1873, 1880,
922 1881, 1887, 1888, 1899, 1905, 1911, 1912, 1914, 1915, 1916,
923 1921, 1926, 1931, 1936, 1948, 1957, 1958, 1964, 1965, 1970,
Lev Walkina25584b2017-10-01 13:43:17 -0700924 1973, 1978, 1986, 1992, 2004, 2007, 2013, 2014, 2014, 2015,
925 2017, 2030, 2035, 2041, 2055, 2056, 2060, 2063, 2066, 2074,
926 2075, 2076, 2081, 2080, 2092, 2101, 2102, 2103, 2104, 2107,
927 2110, 2119, 2135, 2141, 2147, 2161, 2172, 2188, 2191, 2211,
928 2215, 2219, 2223, 2230, 2235, 2241, 2250, 2255, 2262, 2270,
929 2280, 2285, 2292, 2300, 2310, 2325, 2330, 2337, 2344, 2352,
930 2360, 2367, 2378, 2382, 2389, 2420, 2421, 2425, 2432, 2438,
931 2439, 2440, 2441, 2445, 2446, 2447, 2451, 2455, 2463, 2464,
932 2470, 2477, 2484
Lev Walkin418298d2006-07-13 08:24:20 +0000933};
934#endif
935
Lev Walkin752e9732017-08-04 02:06:22 -0700936#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
Lev Walkin0e90aa02013-03-19 16:17:13 -0700937/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
938 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
Lev Walkin418298d2006-07-13 08:24:20 +0000939static const char *const yytname[] =
940{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700941 "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft",
942 "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring",
Lev Walkinbe518fa2017-09-07 02:05:28 -0700943 "TOK_cstring", "TOK_hstring", "\"identifier\"", "\"number\"",
944 "\"negative number\"", "TOK_realnumber", "TOK_tuple", "TOK_quadruple",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700945 "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference",
Lev Walkinbe518fa2017-09-07 02:05:28 -0700946 "TOK_valuefieldreference", "TOK_Literal", "TOK_ExtValue_BIT_STRING",
947 "TOK_ABSENT", "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY",
948 "TOK_APPLICATION", "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT",
949 "TOK_BMPString", "TOK_BOOLEAN", "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE",
950 "TOK_CLASS", "TOK_COMPONENT", "TOK_COMPONENTS", "TOK_CONSTRAINED",
951 "TOK_CONTAINING", "TOK_DEFAULT", "TOK_DEFINITIONS", "TOK_DEFINED",
952 "TOK_EMBEDDED", "TOK_ENCODED", "TOK_ENCODING_CONTROL", "TOK_END",
953 "TOK_ENUMERATED", "TOK_EXPLICIT", "TOK_EXPORTS", "TOK_EXTENSIBILITY",
954 "TOK_EXTERNAL", "TOK_FALSE", "TOK_FROM", "TOK_GeneralizedTime",
955 "TOK_GeneralString", "TOK_GraphicString", "TOK_IA5String",
956 "TOK_IDENTIFIER", "TOK_IMPLICIT", "TOK_IMPLIED", "TOK_IMPORTS",
957 "TOK_INCLUDES", "TOK_INSTANCE", "TOK_INSTRUCTIONS", "TOK_INTEGER",
958 "TOK_ISO646String", "TOK_MAX", "TOK_MIN", "TOK_MINUS_INFINITY",
959 "TOK_NULL", "TOK_NumericString", "TOK_OBJECT", "TOK_ObjectDescriptor",
960 "TOK_OCTET", "TOK_OF", "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV",
961 "TOK_PLUS_INFINITY", "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE",
962 "TOK_REAL", "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE",
963 "TOK_STRING", "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS",
964 "TOK_TeletexString", "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE",
965 "TOK_UNIVERSAL", "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String",
Lev Walkin752e9732017-08-04 02:06:22 -0700966 "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH",
967 "\"UTF-8 byte order mark\"", "TOK_EXCEPT", "'^'", "TOK_INTERSECTION",
Lev Walkin59165cf2017-09-11 06:24:45 -0700968 "'|'", "TOK_UNION", "\"..\"", "\"...\"", "\"concrete TypeDeclaration\"",
969 "'{'", "'}'", "'('", "')'", "';'", "','", "':'", "'['", "']'", "'!'",
970 "'.'", "'<'", "'@'", "$accept", "ParsedGrammar", "ModuleList",
971 "ModuleDefinition", "@1", "optObjectIdentifier", "ObjectIdentifier",
972 "ObjectIdentifierBody", "ObjectIdentifierElement",
973 "optModuleDefinitionFlags", "ModuleDefinitionFlags",
974 "ModuleDefinitionFlag", "optModuleBody", "ModuleBody", "AssignmentList",
975 "Assignment", "@2", "optImports", "ImportsDefinition",
976 "optImportsBundleSet", "ImportsBundleSet", "AssignedIdentifier",
977 "ImportsBundle", "ImportsList", "ImportsElement", "optExports",
978 "ExportsDefinition", "ExportsBody", "ExportsElement", "ValueSet",
979 "ValueSetTypeAssignment", "DefinedType", "DataTypeReference",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700980 "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList",
981 "ActualParameter", "optComponentTypeLists", "ComponentTypeLists",
982 "ComponentType", "AlternativeTypeLists", "AlternativeType",
Lev Walkin0c686452017-09-07 22:59:36 -0700983 "ObjectClass", "optUNIQUE", "FieldSpec", "ClassField", "optWithSyntax",
Lev Walkin752e9732017-08-04 02:06:22 -0700984 "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken",
Lev Walkin59165cf2017-09-11 06:24:45 -0700985 "ExtensionAndException", "Type", "TaggedType", "DefinedUntaggedType",
986 "UntaggedType", "MaybeIndirectTaggedType", "NSTD_IndirectMarker",
987 "MaybeIndirectTypeDeclaration", "TypeDeclaration",
988 "ConcreteTypeDeclaration", "ComplexTypeReference",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700989 "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement",
990 "PrimitiveFieldReference", "FieldName", "DefinedObjectClass",
Lev Walkin752e9732017-08-04 02:06:22 -0700991 "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue",
Lev Walkinbf979152017-09-07 23:36:11 -0700992 "RestrictedCharacterStringValue", "Opaque", "OpaqueFirstToken",
Lev Walkin59165cf2017-09-11 06:24:45 -0700993 "BasicTypeId", "BasicTypeId_UniverationCompatible", "BuiltinType",
Lev Walkinbf979152017-09-07 23:36:11 -0700994 "BasicString", "UnionMark", "IntersectionMark", "optConstraint",
995 "optManyConstraints", "optSizeOrConstraint", "Constraint",
996 "ManyConstraints", "ConstraintSpec", "SubtypeConstraint",
997 "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections",
Lev Walkin59165cf2017-09-11 06:24:45 -0700998 "IntersectionElements", "Elements", "SubtypeElements",
Lev Walkinbf979152017-09-07 23:36:11 -0700999 "PermittedAlphabet", "SizeConstraint", "PatternConstraint", "ValueRange",
1000 "LowerEndValue", "UpperEndValue", "SingleValue", "BitStringValue",
Lev Walkin59165cf2017-09-11 06:24:45 -07001001 "ContainedSubtype", "InnerTypeConstraints", "SingleTypeConstraint",
1002 "MultipleTypeConstraints", "FullSpecification", "PartialSpecification",
1003 "TypeConstraints", "NamedConstraint", "optPresenceConstraint",
1004 "PresenceConstraint", "GeneralConstraint", "UserDefinedConstraint", "@5",
1005 "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint",
1006 "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList",
1007 "AtNotationElement", "ComponentIdList", "optMarker", "Marker",
1008 "IdentifierList", "IdentifierElement", "NamedNumberList", "NamedNumber",
1009 "NamedBitList", "NamedBit", "Enumerations", "UniverationList",
1010 "UniverationElement", "SignedNumber", "RealValue", "optTag", "Tag",
1011 "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName", "optIdentifier",
Lev Walkinbf979152017-09-07 23:36:11 -07001012 "Identifier", "IdentifierAsReference", "IdentifierAsValue", 0
Lev Walkin418298d2006-07-13 08:24:20 +00001013};
1014#endif
1015
1016# ifdef YYPRINT
1017/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1018 token YYLEX-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001019static const yytype_uint16 yytoknum[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001020{
1021 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1022 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1023 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1024 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1025 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1026 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1027 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1028 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1029 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1030 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001031 355, 356, 357, 358, 359, 360, 94, 361, 124, 362,
Lev Walkin59165cf2017-09-11 06:24:45 -07001032 363, 364, 365, 123, 125, 40, 41, 59, 44, 58,
1033 91, 93, 33, 46, 60, 64
Lev Walkin418298d2006-07-13 08:24:20 +00001034};
1035# endif
1036
1037/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Lev Walkinbe518fa2017-09-07 02:05:28 -07001038static const yytype_uint16 yyr1[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001039{
Lev Walkin59165cf2017-09-11 06:24:45 -07001040 0, 126, 127, 127, 128, 128, 130, 129, 131, 131,
1041 132, 132, 133, 133, 134, 134, 134, 135, 135, 136,
1042 136, 137, 137, 137, 137, 137, 138, 138, 139, 140,
1043 140, 141, 141, 141, 142, 141, 141, 143, 143, 144,
1044 144, 145, 145, 146, 146, 147, 147, 148, 149, 149,
1045 150, 150, 150, 151, 151, 152, 152, 152, 153, 153,
1046 154, 154, 154, 155, 156, 157, 157, 158, 158, 158,
1047 158, 159, 159, 160, 160, 160, 160, 160, 161, 161,
1048 162, 162, 162, 162, 163, 163, 164, 164, 164, 165,
1049 165, 165, 165, 166, 166, 167, 167, 167, 168, 169,
1050 169, 170, 170, 171, 171, 171, 171, 171, 171, 171,
1051 172, 172, 174, 173, 175, 175, 176, 176, 176, 176,
1052 177, 177, 177, 178, 179, 180, 181, 182, 183, 184,
1053 185, 185, 186, 186, 186, 186, 186, 186, 186, 186,
1054 186, 187, 187, 187, 187, 187, 188, 188, 189, 190,
1055 190, 191, 191, 191, 192, 193, 194, 194, 195, 194,
1056 196, 196, 196, 196, 196, 196, 196, 197, 197, 198,
1057 198, 198, 199, 199, 200, 200, 201, 201, 201, 201,
1058 201, 201, 201, 201, 201, 201, 201, 201, 201, 202,
1059 202, 202, 203, 203, 203, 203, 203, 203, 204, 204,
1060 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
1061 204, 204, 205, 205, 206, 206, 207, 207, 208, 208,
1062 209, 209, 209, 210, 211, 211, 212, 212, 213, 214,
1063 214, 214, 214, 215, 215, 216, 216, 217, 217, 218,
1064 218, 219, 219, 220, 220, 220, 220, 220, 220, 220,
1065 221, 222, 223, 223, 224, 225, 225, 226, 226, 227,
1066 228, 228, 229, 229, 230, 230, 231, 232, 232, 233,
1067 234, 235, 235, 236, 237, 237, 238, 238, 238, 239,
1068 239, 239, 241, 240, 242, 243, 243, 243, 243, 244,
1069 244, 245, 246, 247, 247, 248, 248, 249, 249, 250,
1070 250, 251, 251, 252, 252, 253, 254, 254, 255, 255,
1071 256, 256, 257, 257, 258, 259, 259, 260, 260, 260,
1072 260, 260, 261, 261, 262, 263, 263, 264, 265, 266,
1073 266, 266, 266, 267, 267, 267, 268, 268, 269, 269,
1074 270, 271, 272
Lev Walkin418298d2006-07-13 08:24:20 +00001075};
1076
1077/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001078static const yytype_uint8 yyr2[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001079{
Lev Walkin752e9732017-08-04 02:06:22 -07001080 0, 2, 2, 1, 1, 2, 0, 9, 0, 1,
1081 3, 2, 1, 2, 1, 4, 1, 0, 1, 1,
1082 2, 2, 2, 2, 2, 2, 0, 1, 3, 1,
1083 2, 1, 1, 1, 0, 3, 1, 0, 1, 3,
1084 2, 0, 1, 1, 2, 0, 1, 4, 1, 3,
1085 1, 3, 1, 0, 1, 3, 3, 2, 1, 3,
Lev Walkin59165cf2017-09-11 06:24:45 -07001086 1, 3, 1, 3, 4, 1, 4, 3, 3, 6,
1087 6, 1, 3, 1, 3, 3, 3, 3, 1, 3,
1088 1, 1, 1, 1, 0, 1, 1, 3, 5, 3,
1089 2, 3, 1, 1, 3, 2, 1, 1, 5, 0,
1090 1, 1, 3, 2, 4, 3, 3, 3, 3, 3,
1091 0, 1, 0, 6, 1, 2, 1, 1, 1, 3,
1092 1, 3, 3, 1, 2, 2, 2, 3, 0, 2,
1093 1, 1, 1, 4, 4, 4, 6, 6, 1, 4,
1094 3, 1, 1, 3, 3, 3, 1, 3, 1, 1,
1095 1, 1, 3, 3, 1, 4, 1, 1, 0, 3,
1096 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
1097 1, 1, 1, 2, 1, 1, 1, 1, 1, 2,
1098 2, 1, 1, 2, 2, 1, 1, 1, 1, 1,
1099 1, 2, 1, 4, 4, 5, 4, 3, 1, 1,
Lev Walkin418298d2006-07-13 08:24:20 +00001100 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin59165cf2017-09-11 06:24:45 -07001101 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
1102 0, 1, 1, 3, 1, 2, 1, 1, 1, 1,
1103 1, 3, 5, 1, 3, 1, 3, 1, 3, 1,
1104 3, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1105 2, 2, 2, 2, 3, 1, 1, 1, 1, 1,
1106 1, 1, 2, 1, 3, 3, 1, 1, 1, 3,
1107 5, 1, 3, 3, 0, 1, 1, 1, 1, 1,
1108 1, 1, 0, 5, 2, 1, 2, 2, 3, 1,
1109 1, 3, 4, 1, 3, 2, 3, 1, 3, 0,
1110 1, 1, 2, 1, 3, 1, 1, 3, 4, 4,
1111 1, 3, 4, 4, 1, 1, 3, 1, 4, 4,
1112 1, 1, 1, 1, 1, 0, 1, 2, 4, 0,
1113 1, 1, 1, 0, 1, 1, 1, 1, 0, 1,
1114 1, 1, 1
Lev Walkin418298d2006-07-13 08:24:20 +00001115};
1116
Lev Walkin752e9732017-08-04 02:06:22 -07001117/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1118 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
Lev Walkin418298d2006-07-13 08:24:20 +00001119 means the default is an error. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001120static const yytype_uint16 yydefact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001121{
Lev Walkin59165cf2017-09-11 06:24:45 -07001122 0, 336, 337, 0, 0, 3, 4, 6, 2, 1,
1123 5, 8, 0, 0, 9, 340, 16, 11, 0, 12,
Lev Walkin752e9732017-08-04 02:06:22 -07001124 14, 17, 10, 13, 0, 0, 0, 0, 0, 0,
1125 0, 18, 19, 0, 25, 23, 21, 24, 22, 0,
1126 20, 15, 53, 0, 0, 27, 37, 54, 0, 57,
1127 0, 58, 60, 62, 7, 41, 0, 38, 56, 55,
1128 0, 0, 40, 0, 42, 43, 0, 48, 50, 52,
Lev Walkin59165cf2017-09-11 06:24:45 -07001129 198, 0, 199, 200, 201, 202, 203, 211, 204, 205,
1130 206, 207, 208, 209, 210, 28, 29, 33, 31, 32,
1131 36, 325, 325, 59, 61, 39, 44, 0, 0, 0,
1132 34, 30, 325, 0, 329, 0, 123, 0, 326, 333,
1133 0, 45, 49, 51, 35, 0, 68, 67, 0, 176,
1134 0, 0, 190, 182, 186, 189, 177, 0, 0, 178,
1135 181, 185, 0, 71, 0, 188, 187, 73, 331, 332,
1136 330, 0, 0, 141, 142, 0, 138, 0, 0, 190,
1137 0, 189, 220, 220, 131, 124, 218, 130, 65, 192,
1138 132, 335, 334, 327, 0, 46, 47, 0, 191, 184,
1139 183, 180, 179, 0, 0, 0, 0, 0, 0, 64,
1140 0, 0, 0, 0, 191, 325, 0, 0, 0, 0,
1141 325, 0, 0, 221, 222, 325, 0, 126, 224, 219,
1142 0, 260, 169, 261, 322, 323, 324, 170, 171, 161,
1143 160, 162, 158, 155, 156, 157, 165, 166, 163, 164,
1144 0, 341, 342, 167, 325, 325, 0, 101, 325, 72,
1145 77, 76, 75, 74, 328, 141, 142, 0, 0, 325,
1146 256, 0, 0, 229, 0, 218, 263, 259, 0, 230,
1147 233, 235, 237, 239, 241, 245, 246, 248, 249, 0,
1148 243, 244, 247, 143, 149, 150, 145, 146, 148, 144,
1149 197, 0, 303, 305, 0, 0, 120, 0, 93, 96,
1150 97, 128, 325, 321, 0, 314, 315, 320, 317, 140,
1151 0, 306, 0, 251, 0, 0, 85, 86, 92, 299,
1152 325, 0, 325, 158, 0, 226, 228, 227, 279, 281,
1153 280, 289, 290, 338, 0, 338, 225, 160, 83, 0,
1154 78, 80, 81, 82, 0, 0, 154, 151, 0, 301,
1155 299, 299, 299, 103, 300, 99, 299, 299, 110, 0,
1156 70, 69, 0, 250, 262, 252, 253, 0, 0, 0,
1157 125, 63, 0, 212, 213, 0, 214, 215, 0, 0,
1158 285, 0, 0, 0, 196, 0, 139, 0, 310, 0,
1159 0, 133, 325, 0, 218, 95, 194, 0, 0, 193,
1160 0, 0, 325, 134, 325, 90, 299, 0, 284, 0,
1161 223, 0, 325, 339, 135, 325, 66, 0, 174, 159,
1162 172, 175, 168, 302, 108, 0, 107, 109, 100, 299,
1163 105, 106, 0, 98, 111, 102, 234, 266, 264, 0,
1164 265, 267, 268, 242, 231, 236, 238, 240, 286, 287,
1165 258, 254, 257, 147, 304, 195, 0, 0, 121, 122,
1166 94, 129, 127, 316, 0, 0, 307, 0, 0, 91,
1167 325, 87, 89, 282, 291, 0, 0, 293, 128, 128,
1168 79, 173, 152, 153, 104, 0, 0, 0, 271, 216,
1169 0, 288, 311, 0, 0, 319, 318, 309, 308, 0,
1170 0, 0, 295, 297, 292, 0, 136, 137, 112, 0,
1171 269, 0, 274, 217, 232, 312, 313, 88, 283, 296,
1172 0, 294, 0, 0, 272, 277, 278, 276, 273, 275,
1173 298, 116, 117, 0, 0, 114, 118, 270, 0, 113,
1174 115, 119
Lev Walkin418298d2006-07-13 08:24:20 +00001175};
1176
Lev Walkin0e90aa02013-03-19 16:17:13 -07001177/* YYDEFGOTO[NTERM-NUM]. */
1178static const yytype_int16 yydefgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001179{
Lev Walkin752e9732017-08-04 02:06:22 -07001180 -1, 4, 5, 6, 11, 13, 14, 18, 19, 30,
Lev Walkin59165cf2017-09-11 06:24:45 -07001181 31, 32, 44, 45, 85, 86, 114, 56, 57, 63,
1182 64, 166, 65, 66, 67, 46, 47, 50, 51, 318,
1183 87, 245, 88, 132, 133, 319, 320, 295, 296, 297,
1184 277, 278, 116, 409, 226, 227, 413, 414, 502, 514,
1185 515, 298, 105, 106, 246, 321, 299, 373, 374, 156,
1186 157, 158, 266, 267, 516, 331, 332, 89, 247, 324,
1187 214, 215, 216, 399, 400, 159, 135, 160, 136, 355,
1188 358, 492, 197, 192, 198, 199, 304, 305, 248, 249,
1189 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
1190 431, 260, 217, 261, 262, 418, 420, 421, 422, 467,
1191 468, 508, 509, 307, 308, 480, 309, 362, 310, 311,
1192 312, 456, 457, 482, 333, 334, 271, 272, 290, 291,
1193 367, 368, 284, 285, 286, 218, 219, 281, 108, 109,
1194 141, 163, 220, 392, 221, 222, 223
Lev Walkin418298d2006-07-13 08:24:20 +00001195};
1196
1197/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1198 STATE-NUM. */
Lev Walkin59165cf2017-09-11 06:24:45 -07001199#define YYPACT_NINF -296
Lev Walkin0e90aa02013-03-19 16:17:13 -07001200static const yytype_int16 yypact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001201{
Lev Walkin59165cf2017-09-11 06:24:45 -07001202 51, -296, -296, 217, 41, 217, -296, -296, 217, -296,
1203 -296, -63, 53, 43, -296, -296, -296, -296, 70, -296,
1204 -45, 204, -296, -296, 79, 32, 30, 38, 110, 87,
1205 200, 204, -296, 95, -296, -296, -296, -296, -296, 198,
1206 -296, -296, 247, 12, 178, -296, 174, -296, 134, -296,
1207 140, -296, 183, -296, -296, 72, 663, -296, -296, -296,
1208 213, 173, -296, 187, 213, -296, 50, -296, 211, -296,
1209 -296, 293, -296, -296, -296, -296, -296, -296, -296, -296,
1210 -296, -296, -296, -296, -296, 663, -296, -296, -296, -296,
1211 -296, 19, 219, -296, -296, -296, -296, 217, 213, 227,
1212 -296, -296, -2, 817, 68, 340, -296, 740, -296, 120,
1213 356, -63, -296, -296, -296, 249, -296, -296, 272, -296,
1214 274, 285, -296, -296, -296, -296, -296, 307, 278, -296,
1215 -296, -296, 13, -296, 250, -296, -296, 251, -296, -296,
1216 -296, 359, 260, 264, 265, 261, 346, 301, 279, 281,
1217 315, 294, 113, 135, -296, -296, 280, -296, 295, -296,
1218 -296, -296, -296, -296, 510, -296, -296, 290, -296, -296,
1219 -296, -296, -296, 406, 817, 213, 213, 289, 368, -296,
1220 217, 309, 14, 378, 299, 29, 108, 318, 403, 280,
1221 61, 229, 339, -296, -296, 61, 341, -296, -296, 280,
1222 604, -296, -296, -296, -296, -296, -296, -296, -296, -296,
1223 -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
1224 296, -296, -296, -296, 84, 28, 98, -296, -2, -296,
1225 -296, -296, -296, -296, -296, 264, 265, 311, 280, 219,
1226 -296, 104, 300, -296, 388, 280, -296, -296, 304, 302,
1227 237, 241, -296, 320, -296, -296, -296, -296, -296, -18,
1228 -17, -296, -296, -296, -296, -296, 303, -296, -296, -296,
1229 -296, 138, -296, -296, 403, 403, 305, 167, -296, -296,
1230 -296, -296, 219, -296, 314, 312, -296, -296, 308, -296,
1231 170, -296, 317, -296, 353, 319, 316, -296, -296, -3,
1232 219, 402, 219, 217, 324, -296, -296, -296, -296, -296,
1233 -296, 323, -296, 403, 331, 403, -296, 329, -296, 172,
1234 -296, -296, -296, -296, 282, 403, -296, -296, 510, -296,
1235 -3, 10, -3, -296, -296, 351, 10, -3, 345, 290,
1236 -296, -296, 496, -296, -296, -296, -296, 280, 336, 334,
1237 -296, -296, 342, -296, -296, 496, -296, -296, 496, 496,
1238 328, 344, 262, 330, -296, 403, -296, 181, -296, 343,
1239 248, -296, 29, 740, 280, -296, -296, 108, 248, -296,
1240 403, 248, 219, -296, 24, -296, -3, 347, -296, 349,
1241 -296, 348, 219, -296, -296, 219, -296, 604, -296, 448,
1242 -296, -296, -296, -296, -296, 332, -296, -296, -296, -3,
1243 -296, -296, 371, -296, -296, -296, -296, -296, -296, 25,
1244 -296, -296, -296, -296, 352, 241, -296, -296, -296, 350,
1245 -296, -296, -296, -296, -296, -296, 403, 196, -296, -296,
1246 -296, -296, -296, -296, 361, 362, -296, 364, 369, -296,
1247 42, -296, -296, -296, -296, 22, 188, -296, -296, -296,
1248 -296, -296, -296, -296, -296, 354, 357, 202, -296, 280,
1249 388, -296, -296, 370, 373, -296, -296, -296, -296, 16,
1250 282, 403, 367, -296, -296, 348, -296, -296, -296, 403,
1251 -296, 403, 77, -296, -296, -296, -296, -296, 448, 367,
1252 403, -296, 57, 207, -296, -296, -296, -296, -296, -296,
1253 -296, -296, -296, 57, 36, -296, -296, -296, 39, -296,
1254 -296, -296
Lev Walkin418298d2006-07-13 08:24:20 +00001255};
1256
1257/* YYPGOTO[NTERM-NUM]. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001258static const yytype_int16 yypgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001259{
Lev Walkin59165cf2017-09-11 06:24:45 -07001260 -296, -296, 461, 326, -296, -296, 376, -296, 447, -296,
1261 -296, 441, -296, -296, -296, 399, -296, -296, -296, -296,
1262 -296, -296, 428, -296, 395, -296, -296, -296, 434, 355,
1263 -296, -106, -296, -296, 321, -296, 99, 322, 48, 115,
1264 -296, 128, 287, -296, -296, 163, -296, -296, -296, 3,
1265 -196, -172, -82, -296, -296, 422, -177, -296, -104, 157,
1266 -296, 358, -296, 168, -164, 310, 313, -296, -140, -296,
1267 -191, -188, -296, 52, -296, -76, -296, -296, -24, -296,
1268 -296, -296, -227, 380, -150, -296, -296, -296, 360, -237,
1269 -296, 179, 182, -258, -296, -296, 205, -296, -296, -296,
1270 -296, 175, -296, -296, -296, -296, -296, -296, -296, 47,
1271 55, -296, -296, -296, -296, -296, -296, -296, -296, -296,
1272 -296, -296, 54, 60, -220, -296, -296, 177, -296, 164,
1273 -296, 107, -296, -296, 171, -160, -296, -87, -296, -296,
1274 -296, -296, 11, 232, -12, -296, -295
Lev Walkin418298d2006-07-13 08:24:20 +00001275};
1276
1277/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1278 positive, shift that token. If negative, reduce the rule which
Lev Walkin752e9732017-08-04 02:06:22 -07001279 number is the opposite. If zero, do what YYDEFACT says.
1280 If YYTABLE_NINF, syntax error. */
Lev Walkin59165cf2017-09-11 06:24:45 -07001281#define YYTABLE_NINF -300
Lev Walkin0e90aa02013-03-19 16:17:13 -07001282static const yytype_int16 yytable[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001283{
Lev Walkin59165cf2017-09-11 06:24:45 -07001284 20, 154, 193, 193, 107, 107, 20, 349, 280, 322,
1285 110, 7, 323, 279, 7, 107, 7, 268, 350, 7,
1286 117, 497, 102, 15, 213, 15, 287, 134, 450, 1,
1287 2, 53, 90, 15, 115, 15, 15, 48, 328, 293,
1288 15, 9, 511, 69, 92, 511, 326, 327, 53, 316,
1289 12, 328, 69, 15, 52, 264, 265, 512, 264, 265,
1290 512, 90, 294, 511, 15, 16, 68, 91, 1, 2,
1291 24, 52, 15, 92, 329, 68, 264, 265, 512, 385,
1292 294, 15, 16, 15, 416, 21, 69, 329, 343, 1,
1293 2, 33, 360, -255, 154, 138, 91, 34, 134, 294,
1294 505, 427, 326, 327, 97, 375, 361, -255, 111, 68,
1295 404, 406, 407, 345, 137, 15, 410, 411, 104, 15,
1296 204, 205, 35, 386, 469, 328, 62, 173, 270, 49,
1297 36, 174, 103, 405, 384, 276, 466, 107, 107, 104,
1298 276, 107, 330, 335, 104, 481, 341, 442, 104, 104,
1299 519, 139, 107, 276, 506, 3, 513, 344, 507, 513,
1300 521, 329, 104, 231, 233, 140, 452, 17, 98, 161,
1301 273, 37, 276, 282, 288, -84, 292, 513, 300, 38,
1302 162, 104, 438, 300, 22, 137, 230, 232, 403, 464,
1303 444, 263, 269, 447, 469, 280, 469, 417, -299, 268,
1304 279, 189, -299, 39, 104, 449, 322, 15, 473, 323,
1305 439, 41, 338, 1, 2, 107, 339, 287, 445, 283,
1306 388, 448, 25, 189, 15, 54, 190, 42, 191, 346,
1307 1, 2, 26, 494, 1, 2, 55, 201, 202, 203,
1308 15, 204, 205, 206, 207, 208, 235, 236, 195, 474,
1309 191, 58, 364, 27, 237, 28, 365, 59, 60, 15,
1310 204, 205, 366, 369, 29, 1, 2, 154, 301, 302,
1311 201, 202, 203, 15, 204, 205, 206, 207, 208, 1,
1312 2, 371, 209, 238, 379, 372, 396, 94, 380, 398,
1313 397, 154, 239, 15, -26, 435, 61, 43, 240, 436,
1314 210, 393, 484, 393, 95, 458, 485, 241, 459, 224,
1315 225, 100, 401, 402, 389, 209, 490, 189, 520, 493,
1316 491, 517, 520, 211, 99, 491, 1, 2, 264, 265,
1317 430, 10, 242, 210, 10, 143, 144, 347, 348, 104,
1318 243, 113, 303, 142, 244, 353, 354, 356, 357, 264,
1319 265, 462, 463, 273, 486, 487, 211, 194, 194, 164,
1320 282, 168, 167, 169, 170, 288, 171, 172, 292, 175,
1321 176, 177, 300, 178, 182, 212, 201, 202, 203, 15,
1322 204, 205, 206, 207, 208, 235, 236, 180, 181, 183,
1323 184, 187, 185, 237, 186, 191, 201, 202, 203, 15,
1324 204, 205, 206, 207, 208, 235, 236, 188, 200, 228,
1325 234, 274, 275, 237, 15, 313, 342, 315, 351, 325,
1326 352, 209, 238, 378, 369, 359, 363, 370, 376, 382,
1327 377, 239, 381, 383, 384, 387, 391, 240, 300, 210,
1328 390, 209, 238, 483, -177, 394, 241, 408, 412, 419,
1329 423, 239, 428, 424, 429, 461, 189, 240, 437, 210,
1330 453, 465, 211, 454, 8, 23, 241, 488, 401, 483,
1331 470, 242, 40, 455, 471, 489, 189, 475, 476, 243,
1332 477, 212, 211, 244, 101, 478, 495, 165, 510, 496,
1333 500, 242, 96, 112, 93, 229, 460, 179, 479, 451,
1334 440, 212, 415, 244, 201, 202, 203, 15, 204, 205,
1335 206, 207, 208, 235, 236, 340, 518, 314, 201, 202,
1336 203, 15, 204, 205, 206, 207, 208, 1, 2, 155,
1337 441, 433, 498, 196, 425, 336, 503, 432, 337, 501,
1338 426, 499, 434, 472, 446, 289, 504, 395, 443, 209,
1339 238, 306, 0, 0, 0, 0, 0, 0, 0, 239,
1340 0, 0, 0, 209, 0, 240, 0, 210, 0, 0,
1341 0, 0, 0, 0, 241, 0, 0, 0, 0, 0,
1342 0, 210, 0, 0, 189, 0, 0, 0, 0, 0,
1343 211, 0, 0, 0, 0, 0, 0, 0, 0, 242,
1344 0, 0, 0, 0, 211, 0, 0, 0, 0, 212,
1345 0, 244, 201, 202, 203, 15, 204, 205, 206, 207,
1346 208, 235, 236, 212, 0, 0, 145, 0, 0, 0,
1347 146, 0, 0, 0, 147, 70, 119, 0, 120, 148,
1348 0, 0, 0, 0, 0, 0, 0, 0, 121, 0,
1349 0, 0, 149, 0, 0, 0, 123, 209, 0, 124,
1350 72, 73, 74, 0, 0, 0, 0, 0, 150, 0,
1351 151, 75, 0, 0, 15, 317, 76, 127, 77, 128,
1352 1, 2, 0, 0, 0, 0, 78, 0, 129, 130,
1353 152, 153, 0, 0, 70, 79, 0, 80, 211, 0,
1354 0, 0, 81, 131, 82, 83, 84, 0, 0, 71,
1355 0, 0, 0, 0, 0, 0, 0, 178, 0, 72,
1356 73, 74, 0, 0, 0, 0, 0, 0, 0, 0,
1357 75, 0, 0, 0, 0, 76, 0, 77, 0, 0,
1358 0, 0, 0, 0, 0, 78, 0, 0, 0, 0,
1359 0, 0, 0, 0, 79, 0, 80, 143, 144, 0,
1360 0, 81, 145, 82, 83, 84, 146, 0, 0, 0,
1361 147, 70, 119, 0, 120, 148, 0, 0, 0, 0,
1362 0, 0, 0, 0, 121, 0, 0, 0, 149, 0,
1363 0, 0, 123, 0, 0, 124, 72, 73, 74, 0,
1364 0, 0, 0, 0, 150, 0, 151, 75, 0, 0,
1365 0, 126, 76, 127, 77, 128, 0, 0, 0, 0,
1366 0, 0, 78, 0, 129, 130, 152, 153, 0, 0,
1367 0, 79, 0, 80, 1, 2, 0, 0, 81, 131,
1368 82, 83, 84, 0, 0, 0, 0, 118, 70, 119,
1369 0, 120, 0, 0, 0, 0, 0, 0, 0, 0,
1370 0, 121, 0, 0, 0, 122, 0, 0, 0, 123,
1371 0, 0, 124, 72, 73, 74, 0, 0, 0, 0,
1372 0, 0, 0, 125, 75, 0, 0, 0, 126, 76,
1373 127, 77, 128, 0, 0, 0, 0, 0, 0, 78,
1374 0, 129, 130, 0, 0, 0, 0, 0, 79, 0,
1375 80, 0, 0, 0, 0, 81, 131, 82, 83, 84
Lev Walkin418298d2006-07-13 08:24:20 +00001376};
1377
Lev Walkin0e90aa02013-03-19 16:17:13 -07001378static const yytype_int16 yycheck[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001379{
Lev Walkin59165cf2017-09-11 06:24:45 -07001380 12, 107, 152, 153, 91, 92, 18, 244, 185, 200,
1381 92, 0, 200, 185, 3, 102, 5, 181, 245, 8,
1382 102, 5, 3, 11, 164, 11, 186, 103, 4, 17,
1383 18, 43, 56, 11, 36, 11, 11, 25, 41, 189,
1384 11, 0, 6, 55, 56, 6, 18, 19, 60, 199,
1385 113, 41, 64, 11, 43, 19, 20, 21, 19, 20,
1386 21, 85, 38, 6, 11, 12, 55, 56, 17, 18,
1387 115, 60, 11, 85, 77, 64, 19, 20, 21, 299,
1388 38, 11, 12, 11, 342, 42, 98, 77, 238, 17,
1389 18, 12, 110, 110, 200, 27, 85, 65, 174, 38,
1390 23, 359, 18, 19, 54, 282, 124, 124, 97, 98,
1391 330, 331, 332, 9, 103, 11, 336, 337, 120, 11,
1392 12, 13, 92, 300, 419, 41, 54, 114, 114, 117,
1393 92, 118, 113, 123, 118, 111, 111, 224, 225, 120,
1394 111, 228, 224, 225, 120, 123, 228, 374, 120, 120,
1395 114, 83, 239, 111, 77, 104, 120, 239, 81, 120,
1396 121, 77, 120, 175, 176, 97, 386, 114, 118, 49,
1397 182, 61, 111, 185, 186, 114, 188, 120, 190, 92,
1398 60, 120, 370, 195, 114, 174, 175, 176, 328, 409,
1399 378, 180, 181, 381, 489, 372, 491, 347, 114, 363,
1400 372, 88, 118, 3, 120, 382, 397, 11, 12, 397,
1401 370, 116, 114, 17, 18, 302, 118, 377, 378, 111,
1402 302, 381, 18, 88, 11, 47, 113, 29, 115, 241,
1403 17, 18, 28, 470, 17, 18, 62, 8, 9, 10,
1404 11, 12, 13, 14, 15, 16, 17, 18, 113, 437,
1405 115, 117, 114, 49, 25, 51, 118, 117, 118, 11,
1406 12, 13, 274, 275, 60, 17, 18, 373, 39, 40,
1407 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1408 18, 114, 53, 54, 114, 118, 114, 114, 118, 7,
1409 118, 397, 63, 11, 47, 114, 113, 50, 69, 118,
1410 71, 313, 114, 315, 117, 392, 118, 78, 395, 19,
1411 20, 18, 324, 325, 303, 53, 114, 88, 514, 469,
1412 118, 114, 518, 94, 113, 118, 17, 18, 19, 20,
1413 68, 5, 103, 71, 8, 17, 18, 37, 38, 120,
1414 111, 114, 113, 3, 115, 108, 109, 106, 107, 19,
1415 20, 19, 20, 365, 458, 459, 94, 152, 153, 3,
1416 372, 89, 113, 89, 79, 377, 59, 89, 380, 119,
1417 119, 12, 384, 113, 113, 113, 8, 9, 10, 11,
1418 12, 13, 14, 15, 16, 17, 18, 123, 123, 43,
1419 89, 76, 113, 25, 113, 115, 8, 9, 10, 11,
1420 12, 13, 14, 15, 16, 17, 18, 113, 113, 3,
1421 121, 33, 113, 25, 11, 76, 105, 76, 114, 123,
1422 118, 53, 54, 115, 436, 105, 123, 122, 114, 76,
1423 118, 63, 115, 114, 118, 33, 113, 69, 450, 71,
1424 116, 53, 54, 455, 115, 114, 78, 96, 103, 113,
1425 116, 63, 124, 111, 110, 7, 88, 69, 115, 71,
1426 113, 90, 94, 114, 3, 18, 78, 113, 480, 481,
1427 118, 103, 31, 125, 124, 118, 88, 116, 116, 111,
1428 116, 113, 94, 115, 85, 116, 116, 111, 500, 116,
1429 123, 103, 64, 98, 60, 174, 397, 142, 450, 384,
1430 372, 113, 339, 115, 8, 9, 10, 11, 12, 13,
1431 14, 15, 16, 17, 18, 228, 513, 195, 8, 9,
1432 10, 11, 12, 13, 14, 15, 16, 17, 18, 107,
1433 373, 363, 480, 153, 355, 225, 489, 362, 225, 485,
1434 358, 481, 365, 436, 380, 187, 491, 315, 377, 53,
1435 54, 191, -1, -1, -1, -1, -1, -1, -1, 63,
1436 -1, -1, -1, 53, -1, 69, -1, 71, -1, -1,
1437 -1, -1, -1, -1, 78, -1, -1, -1, -1, -1,
1438 -1, 71, -1, -1, 88, -1, -1, -1, -1, -1,
1439 94, -1, -1, -1, -1, -1, -1, -1, -1, 103,
1440 -1, -1, -1, -1, 94, -1, -1, -1, -1, 113,
1441 -1, 115, 8, 9, 10, 11, 12, 13, 14, 15,
1442 16, 17, 18, 113, -1, -1, 22, -1, -1, -1,
1443 26, -1, -1, -1, 30, 31, 32, -1, 34, 35,
1444 -1, -1, -1, -1, -1, -1, -1, -1, 44, -1,
1445 -1, -1, 48, -1, -1, -1, 52, 53, -1, 55,
1446 56, 57, 58, -1, -1, -1, -1, -1, 64, -1,
1447 66, 67, -1, -1, 11, 71, 72, 73, 74, 75,
1448 17, 18, -1, -1, -1, -1, 82, -1, 84, 85,
1449 86, 87, -1, -1, 31, 91, -1, 93, 94, -1,
1450 -1, -1, 98, 99, 100, 101, 102, -1, -1, 46,
1451 -1, -1, -1, -1, -1, -1, -1, 113, -1, 56,
1452 57, 58, -1, -1, -1, -1, -1, -1, -1, -1,
1453 67, -1, -1, -1, -1, 72, -1, 74, -1, -1,
1454 -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
1455 -1, -1, -1, -1, 91, -1, 93, 17, 18, -1,
1456 -1, 98, 22, 100, 101, 102, 26, -1, -1, -1,
1457 30, 31, 32, -1, 34, 35, -1, -1, -1, -1,
1458 -1, -1, -1, -1, 44, -1, -1, -1, 48, -1,
1459 -1, -1, 52, -1, -1, 55, 56, 57, 58, -1,
1460 -1, -1, -1, -1, 64, -1, 66, 67, -1, -1,
1461 -1, 71, 72, 73, 74, 75, -1, -1, -1, -1,
1462 -1, -1, 82, -1, 84, 85, 86, 87, -1, -1,
1463 -1, 91, -1, 93, 17, 18, -1, -1, 98, 99,
1464 100, 101, 102, -1, -1, -1, -1, 30, 31, 32,
1465 -1, 34, -1, -1, -1, -1, -1, -1, -1, -1,
1466 -1, 44, -1, -1, -1, 48, -1, -1, -1, 52,
1467 -1, -1, 55, 56, 57, 58, -1, -1, -1, -1,
1468 -1, -1, -1, 66, 67, -1, -1, -1, 71, 72,
1469 73, 74, 75, -1, -1, -1, -1, -1, -1, 82,
1470 -1, 84, 85, -1, -1, -1, -1, -1, 91, -1,
1471 93, -1, -1, -1, -1, 98, 99, 100, 101, 102
Lev Walkin418298d2006-07-13 08:24:20 +00001472};
1473
1474/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1475 symbol of state STATE-NUM. */
Lev Walkinbe518fa2017-09-07 02:05:28 -07001476static const yytype_uint16 yystos[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001477{
Lev Walkin59165cf2017-09-11 06:24:45 -07001478 0, 17, 18, 104, 127, 128, 129, 268, 128, 0,
1479 129, 130, 113, 131, 132, 11, 12, 114, 133, 134,
1480 270, 42, 114, 134, 115, 18, 28, 49, 51, 60,
1481 135, 136, 137, 12, 65, 92, 92, 61, 92, 3,
1482 137, 116, 29, 50, 138, 139, 151, 152, 25, 117,
1483 153, 154, 268, 270, 47, 62, 143, 144, 117, 117,
1484 118, 113, 54, 145, 146, 148, 149, 150, 268, 270,
Lev Walkinbe518fa2017-09-07 02:05:28 -07001485 31, 46, 56, 57, 58, 67, 72, 74, 82, 91,
Lev Walkin59165cf2017-09-11 06:24:45 -07001486 93, 98, 100, 101, 102, 140, 141, 156, 158, 193,
1487 204, 268, 270, 154, 114, 117, 148, 54, 118, 113,
1488 18, 141, 3, 113, 120, 178, 179, 263, 264, 265,
1489 178, 268, 150, 114, 142, 36, 168, 178, 30, 32,
1490 34, 44, 48, 52, 55, 66, 71, 73, 75, 84,
1491 85, 99, 159, 160, 201, 202, 204, 268, 27, 83,
1492 97, 266, 3, 17, 18, 22, 26, 30, 35, 48,
1493 64, 66, 86, 87, 157, 181, 185, 186, 187, 201,
1494 203, 49, 60, 267, 3, 132, 147, 113, 89, 89,
1495 79, 59, 89, 114, 118, 119, 119, 12, 113, 155,
1496 123, 123, 113, 43, 89, 113, 113, 76, 113, 88,
1497 113, 115, 209, 210, 222, 113, 209, 208, 210, 211,
1498 113, 8, 9, 10, 12, 13, 14, 15, 16, 53,
1499 71, 94, 113, 194, 196, 197, 198, 228, 261, 262,
1500 268, 270, 271, 272, 19, 20, 170, 171, 3, 160,
1501 268, 270, 268, 270, 121, 17, 18, 25, 54, 63,
1502 69, 78, 103, 111, 115, 157, 180, 194, 214, 215,
1503 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
1504 227, 229, 230, 268, 19, 20, 188, 189, 190, 268,
1505 114, 252, 253, 270, 33, 113, 111, 166, 167, 177,
1506 182, 263, 270, 111, 258, 259, 260, 261, 270, 187,
1507 254, 255, 270, 210, 38, 163, 164, 165, 177, 182,
1508 270, 39, 40, 113, 212, 213, 214, 239, 240, 242,
1509 244, 245, 246, 76, 163, 76, 210, 71, 155, 161,
1510 162, 181, 196, 197, 195, 123, 18, 19, 41, 77,
1511 178, 191, 192, 250, 251, 178, 191, 192, 114, 118,
1512 168, 178, 105, 210, 178, 9, 270, 37, 38, 215,
1513 208, 114, 118, 108, 109, 205, 106, 107, 206, 105,
1514 110, 124, 243, 123, 114, 118, 270, 256, 257, 270,
1515 122, 114, 118, 183, 184, 182, 114, 118, 115, 114,
1516 118, 115, 76, 114, 118, 250, 182, 33, 178, 268,
1517 116, 113, 269, 270, 114, 269, 114, 118, 7, 199,
1518 200, 270, 270, 194, 250, 123, 250, 250, 96, 169,
1519 250, 250, 103, 172, 173, 171, 219, 210, 231, 113,
1520 232, 233, 234, 116, 111, 217, 218, 219, 124, 110,
1521 68, 226, 227, 189, 253, 114, 118, 115, 197, 261,
1522 167, 185, 208, 260, 197, 261, 255, 197, 261, 182,
1523 4, 165, 250, 113, 114, 125, 247, 248, 263, 263,
1524 162, 7, 19, 20, 250, 90, 111, 235, 236, 272,
1525 118, 124, 257, 12, 197, 116, 116, 116, 116, 164,
1526 241, 123, 249, 270, 114, 118, 184, 184, 113, 118,
1527 114, 118, 207, 210, 215, 116, 116, 5, 199, 249,
1528 123, 248, 174, 235, 236, 23, 77, 81, 237, 238,
1529 270, 6, 21, 120, 175, 176, 190, 114, 175, 114,
1530 176, 121
Lev Walkin418298d2006-07-13 08:24:20 +00001531};
1532
Lev Walkinf15320b2004-06-03 03:38:44 +00001533#define yyerrok (yyerrstatus = 0)
1534#define yyclearin (yychar = YYEMPTY)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001535#define YYEMPTY (-2)
Lev Walkinf15320b2004-06-03 03:38:44 +00001536#define YYEOF 0
Lev Walkin418298d2006-07-13 08:24:20 +00001537
Lev Walkinf15320b2004-06-03 03:38:44 +00001538#define YYACCEPT goto yyacceptlab
Lev Walkin418298d2006-07-13 08:24:20 +00001539#define YYABORT goto yyabortlab
Lev Walkin0e90aa02013-03-19 16:17:13 -07001540#define YYERROR goto yyerrorlab
1541
Lev Walkin418298d2006-07-13 08:24:20 +00001542
1543/* Like YYERROR except do call yyerror. This remains here temporarily
1544 to ease the transition to the new meaning of YYERROR, for GCC.
Lev Walkin752e9732017-08-04 02:06:22 -07001545 Once GCC version 2 has supplanted version 1, this can go. */
Lev Walkin418298d2006-07-13 08:24:20 +00001546
Lev Walkinf15320b2004-06-03 03:38:44 +00001547#define YYFAIL goto yyerrlab
Lev Walkin418298d2006-07-13 08:24:20 +00001548
Lev Walkinf15320b2004-06-03 03:38:44 +00001549#define YYRECOVERING() (!!yyerrstatus)
Lev Walkin418298d2006-07-13 08:24:20 +00001550
Lev Walkin752e9732017-08-04 02:06:22 -07001551#define YYBACKUP(Token, Value) \
1552do \
1553 if (yychar == YYEMPTY && yylen == 1) \
1554 { \
1555 yychar = (Token); \
1556 yylval = (Value); \
1557 yytoken = YYTRANSLATE (yychar); \
1558 YYPOPSTACK (1); \
1559 goto yybackup; \
1560 } \
1561 else \
1562 { \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001563 yyerror (YY_("syntax error: cannot back up")); \
Lev Walkin418298d2006-07-13 08:24:20 +00001564 YYERROR; \
1565 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001566while (YYID (0))
1567
Lev Walkin752e9732017-08-04 02:06:22 -07001568
Lev Walkinf15320b2004-06-03 03:38:44 +00001569#define YYTERROR 1
1570#define YYERRCODE 256
1571
Lev Walkin418298d2006-07-13 08:24:20 +00001572
Lev Walkin752e9732017-08-04 02:06:22 -07001573/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1574 If N is 0, then set CURRENT to the empty location which ends
1575 the previous symbol: RHS[0] (always defined). */
1576
1577#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1578#ifndef YYLLOC_DEFAULT
1579# define YYLLOC_DEFAULT(Current, Rhs, N) \
1580 do \
1581 if (YYID (N)) \
1582 { \
1583 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1584 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1585 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1586 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1587 } \
1588 else \
1589 { \
1590 (Current).first_line = (Current).last_line = \
1591 YYRHSLOC (Rhs, 0).last_line; \
1592 (Current).first_column = (Current).last_column = \
1593 YYRHSLOC (Rhs, 0).last_column; \
1594 } \
1595 while (YYID (0))
1596#endif
1597
1598
1599/* YY_LOCATION_PRINT -- Print the location on the stream.
1600 This macro was not mandated originally: define only if we know
1601 we won't break user code: when these are the locations we know. */
1602
Lev Walkin0e90aa02013-03-19 16:17:13 -07001603#ifndef YY_LOCATION_PRINT
Lev Walkin752e9732017-08-04 02:06:22 -07001604# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1605# define YY_LOCATION_PRINT(File, Loc) \
1606 fprintf (File, "%d.%d-%d.%d", \
1607 (Loc).first_line, (Loc).first_column, \
1608 (Loc).last_line, (Loc).last_column)
1609# else
1610# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1611# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07001612#endif
1613
1614
Lev Walkin418298d2006-07-13 08:24:20 +00001615/* YYLEX -- calling `yylex' with the right arguments. */
Lev Walkin752e9732017-08-04 02:06:22 -07001616
Lev Walkin0e90aa02013-03-19 16:17:13 -07001617#ifdef YYLEX_PARAM
1618# define YYLEX yylex (YYLEX_PARAM)
1619#else
1620# define YYLEX yylex ()
1621#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001622
Lev Walkin418298d2006-07-13 08:24:20 +00001623/* Enable debugging if requested. */
1624#if YYDEBUG
Lev Walkinfb872bd2006-03-18 06:53:11 +00001625
Lev Walkin418298d2006-07-13 08:24:20 +00001626# ifndef YYFPRINTF
1627# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1628# define YYFPRINTF fprintf
1629# endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001630
Lev Walkin418298d2006-07-13 08:24:20 +00001631# define YYDPRINTF(Args) \
1632do { \
1633 if (yydebug) \
1634 YYFPRINTF Args; \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001635} while (YYID (0))
1636
1637# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1638do { \
1639 if (yydebug) \
1640 { \
1641 YYFPRINTF (stderr, "%s ", Title); \
1642 yy_symbol_print (stderr, \
1643 Type, Value); \
1644 YYFPRINTF (stderr, "\n"); \
1645 } \
1646} while (YYID (0))
1647
1648
1649/*--------------------------------.
1650| Print this symbol on YYOUTPUT. |
1651`--------------------------------*/
1652
1653/*ARGSUSED*/
1654#if (defined __STDC__ || defined __C99__FUNC__ \
1655 || defined __cplusplus || defined _MSC_VER)
1656static void
1657yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1658#else
1659static void
1660yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1661 FILE *yyoutput;
1662 int yytype;
1663 YYSTYPE const * const yyvaluep;
1664#endif
1665{
1666 if (!yyvaluep)
1667 return;
1668# ifdef YYPRINT
1669 if (yytype < YYNTOKENS)
1670 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1671# else
1672 YYUSE (yyoutput);
1673# endif
Lev Walkin752e9732017-08-04 02:06:22 -07001674 switch (yytype)
1675 {
1676 default:
1677 break;
1678 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001679}
1680
1681
1682/*--------------------------------.
1683| Print this symbol on YYOUTPUT. |
1684`--------------------------------*/
1685
1686#if (defined __STDC__ || defined __C99__FUNC__ \
1687 || defined __cplusplus || defined _MSC_VER)
1688static void
1689yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1690#else
1691static void
1692yy_symbol_print (yyoutput, yytype, yyvaluep)
1693 FILE *yyoutput;
1694 int yytype;
1695 YYSTYPE const * const yyvaluep;
1696#endif
1697{
1698 if (yytype < YYNTOKENS)
1699 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1700 else
1701 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1702
1703 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1704 YYFPRINTF (yyoutput, ")");
1705}
1706
1707/*------------------------------------------------------------------.
1708| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1709| TOP (included). |
1710`------------------------------------------------------------------*/
1711
1712#if (defined __STDC__ || defined __C99__FUNC__ \
1713 || defined __cplusplus || defined _MSC_VER)
1714static void
Lev Walkin752e9732017-08-04 02:06:22 -07001715yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001716#else
1717static void
Lev Walkin752e9732017-08-04 02:06:22 -07001718yy_stack_print (bottom, top)
1719 yytype_int16 *bottom;
1720 yytype_int16 *top;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001721#endif
1722{
1723 YYFPRINTF (stderr, "Stack now");
Lev Walkin752e9732017-08-04 02:06:22 -07001724 for (; bottom <= top; ++bottom)
1725 YYFPRINTF (stderr, " %d", *bottom);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001726 YYFPRINTF (stderr, "\n");
1727}
1728
1729# define YY_STACK_PRINT(Bottom, Top) \
1730do { \
1731 if (yydebug) \
1732 yy_stack_print ((Bottom), (Top)); \
1733} while (YYID (0))
1734
1735
1736/*------------------------------------------------.
1737| Report that the YYRULE is going to be reduced. |
1738`------------------------------------------------*/
1739
1740#if (defined __STDC__ || defined __C99__FUNC__ \
1741 || defined __cplusplus || defined _MSC_VER)
1742static void
1743yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1744#else
1745static void
1746yy_reduce_print (yyvsp, yyrule)
1747 YYSTYPE *yyvsp;
1748 int yyrule;
1749#endif
1750{
1751 int yynrhs = yyr2[yyrule];
1752 int yyi;
1753 unsigned long int yylno = yyrline[yyrule];
1754 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1755 yyrule - 1, yylno);
1756 /* The symbols being reduced. */
1757 for (yyi = 0; yyi < yynrhs; yyi++)
1758 {
Lev Walkin752e9732017-08-04 02:06:22 -07001759 fprintf (stderr, " $%d = ", yyi + 1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001760 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1761 &(yyvsp[(yyi + 1) - (yynrhs)])
1762 );
Lev Walkin752e9732017-08-04 02:06:22 -07001763 fprintf (stderr, "\n");
Lev Walkin0e90aa02013-03-19 16:17:13 -07001764 }
1765}
1766
1767# define YY_REDUCE_PRINT(Rule) \
1768do { \
1769 if (yydebug) \
1770 yy_reduce_print (yyvsp, Rule); \
1771} while (YYID (0))
1772
Lev Walkin418298d2006-07-13 08:24:20 +00001773/* Nonzero means print parse trace. It is left uninitialized so that
1774 multiple parsers can coexist. */
1775int yydebug;
1776#else /* !YYDEBUG */
1777# define YYDPRINTF(Args)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001778# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1779# define YY_STACK_PRINT(Bottom, Top)
1780# define YY_REDUCE_PRINT(Rule)
Lev Walkin418298d2006-07-13 08:24:20 +00001781#endif /* !YYDEBUG */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001782
Lev Walkin0e90aa02013-03-19 16:17:13 -07001783
Lev Walkin418298d2006-07-13 08:24:20 +00001784/* YYINITDEPTH -- initial size of the parser's stacks. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001785#ifndef YYINITDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001786# define YYINITDEPTH 200
Lev Walkinf15320b2004-06-03 03:38:44 +00001787#endif
1788
Lev Walkin418298d2006-07-13 08:24:20 +00001789/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1790 if the built-in stack extension method is used).
1791
1792 Do not make this value too large; the results are undefined if
Lev Walkin0e90aa02013-03-19 16:17:13 -07001793 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Lev Walkin418298d2006-07-13 08:24:20 +00001794 evaluated with infinite-precision integer arithmetic. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001795
Lev Walkinf15320b2004-06-03 03:38:44 +00001796#ifndef YYMAXDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001797# define YYMAXDEPTH 10000
Lev Walkinf15320b2004-06-03 03:38:44 +00001798#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001799
Lev Walkin752e9732017-08-04 02:06:22 -07001800
Lev Walkinf15320b2004-06-03 03:38:44 +00001801
Lev Walkin418298d2006-07-13 08:24:20 +00001802#if YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +00001803
Lev Walkin418298d2006-07-13 08:24:20 +00001804# ifndef yystrlen
Lev Walkin0e90aa02013-03-19 16:17:13 -07001805# if defined __GLIBC__ && defined _STRING_H
Lev Walkin418298d2006-07-13 08:24:20 +00001806# define yystrlen strlen
1807# else
1808/* Return the length of YYSTR. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001809#if (defined __STDC__ || defined __C99__FUNC__ \
1810 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001811static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001812yystrlen (const char *yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001813#else
1814static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001815yystrlen (yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001816 const char *yystr;
1817#endif
Lev Walkina00d6b32006-03-21 03:40:38 +00001818{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001819 YYSIZE_T yylen;
1820 for (yylen = 0; yystr[yylen]; yylen++)
Lev Walkin418298d2006-07-13 08:24:20 +00001821 continue;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001822 return yylen;
Lev Walkin418298d2006-07-13 08:24:20 +00001823}
1824# endif
1825# endif
1826
1827# ifndef yystpcpy
Lev Walkin0e90aa02013-03-19 16:17:13 -07001828# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Lev Walkin418298d2006-07-13 08:24:20 +00001829# define yystpcpy stpcpy
1830# else
1831/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1832 YYDEST. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001833#if (defined __STDC__ || defined __C99__FUNC__ \
1834 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001835static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001836yystpcpy (char *yydest, const char *yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001837#else
1838static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001839yystpcpy (yydest, yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001840 char *yydest;
1841 const char *yysrc;
1842#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001843{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001844 char *yyd = yydest;
1845 const char *yys = yysrc;
Lev Walkin418298d2006-07-13 08:24:20 +00001846
1847 while ((*yyd++ = *yys++) != '\0')
1848 continue;
1849
1850 return yyd - 1;
1851}
1852# endif
1853# endif
1854
Lev Walkin0e90aa02013-03-19 16:17:13 -07001855# ifndef yytnamerr
1856/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1857 quotes and backslashes, so that it's suitable for yyerror. The
1858 heuristic is that double-quoting is unnecessary unless the string
1859 contains an apostrophe, a comma, or backslash (other than
1860 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1861 null, do not copy; instead, return the length of what the result
1862 would have been. */
1863static YYSIZE_T
1864yytnamerr (char *yyres, const char *yystr)
Lev Walkin418298d2006-07-13 08:24:20 +00001865{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001866 if (*yystr == '"')
Lev Walkin418298d2006-07-13 08:24:20 +00001867 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07001868 YYSIZE_T yyn = 0;
1869 char const *yyp = yystr;
Lev Walkin418298d2006-07-13 08:24:20 +00001870
Lev Walkin0e90aa02013-03-19 16:17:13 -07001871 for (;;)
1872 switch (*++yyp)
1873 {
1874 case '\'':
1875 case ',':
1876 goto do_not_strip_quotes;
1877
1878 case '\\':
1879 if (*++yyp != '\\')
1880 goto do_not_strip_quotes;
1881 /* Fall through. */
1882 default:
1883 if (yyres)
1884 yyres[yyn] = *yyp;
1885 yyn++;
1886 break;
1887
1888 case '"':
1889 if (yyres)
1890 yyres[yyn] = '\0';
1891 return yyn;
1892 }
1893 do_not_strip_quotes: ;
Lev Walkin418298d2006-07-13 08:24:20 +00001894 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001895
1896 if (! yyres)
1897 return yystrlen (yystr);
1898
1899 return yystpcpy (yyres, yystr) - yyres;
Lev Walkin418298d2006-07-13 08:24:20 +00001900}
Lev Walkin0e90aa02013-03-19 16:17:13 -07001901# endif
Lev Walkin418298d2006-07-13 08:24:20 +00001902
Lev Walkin752e9732017-08-04 02:06:22 -07001903/* Copy into YYRESULT an error message about the unexpected token
1904 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1905 including the terminating null byte. If YYRESULT is null, do not
1906 copy anything; just return the number of bytes that would be
1907 copied. As a special case, return 0 if an ordinary "syntax error"
1908 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1909 size calculation. */
1910static YYSIZE_T
1911yysyntax_error (char *yyresult, int yystate, int yychar)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001912{
Lev Walkin752e9732017-08-04 02:06:22 -07001913 int yyn = yypact[yystate];
Lev Walkin0e90aa02013-03-19 16:17:13 -07001914
Lev Walkin752e9732017-08-04 02:06:22 -07001915 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1916 return 0;
1917 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07001918 {
Lev Walkin752e9732017-08-04 02:06:22 -07001919 int yytype = YYTRANSLATE (yychar);
1920 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1921 YYSIZE_T yysize = yysize0;
1922 YYSIZE_T yysize1;
1923 int yysize_overflow = 0;
1924 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1925 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1926 int yyx;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001927
Lev Walkin752e9732017-08-04 02:06:22 -07001928# if 0
1929 /* This is so xgettext sees the translatable formats that are
1930 constructed on the fly. */
1931 YY_("syntax error, unexpected %s");
1932 YY_("syntax error, unexpected %s, expecting %s");
1933 YY_("syntax error, unexpected %s, expecting %s or %s");
1934 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1935 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1936# endif
1937 char *yyfmt;
1938 char const *yyf;
1939 static char const yyunexpected[] = "syntax error, unexpected %s";
1940 static char const yyexpecting[] = ", expecting %s";
1941 static char const yyor[] = " or %s";
1942 char yyformat[sizeof yyunexpected
1943 + sizeof yyexpecting - 1
1944 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1945 * (sizeof yyor - 1))];
1946 char const *yyprefix = yyexpecting;
1947
1948 /* Start YYX at -YYN if negative to avoid negative indexes in
1949 YYCHECK. */
1950 int yyxbegin = yyn < 0 ? -yyn : 0;
1951
1952 /* Stay within bounds of both yycheck and yytname. */
1953 int yychecklim = YYLAST - yyn + 1;
1954 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1955 int yycount = 1;
1956
1957 yyarg[0] = yytname[yytype];
1958 yyfmt = yystpcpy (yyformat, yyunexpected);
1959
1960 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1961 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1962 {
1963 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1964 {
1965 yycount = 1;
1966 yysize = yysize0;
1967 yyformat[sizeof yyunexpected - 1] = '\0';
1968 break;
1969 }
1970 yyarg[yycount++] = yytname[yyx];
1971 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1972 yysize_overflow |= (yysize1 < yysize);
1973 yysize = yysize1;
1974 yyfmt = yystpcpy (yyfmt, yyprefix);
1975 yyprefix = yyor;
1976 }
1977
1978 yyf = YY_(yyformat);
1979 yysize1 = yysize + yystrlen (yyf);
1980 yysize_overflow |= (yysize1 < yysize);
1981 yysize = yysize1;
1982
1983 if (yysize_overflow)
1984 return YYSIZE_MAXIMUM;
1985
1986 if (yyresult)
1987 {
1988 /* Avoid sprintf, as that infringes on the user's name space.
1989 Don't have undefined behavior even if the translation
1990 produced a string with the wrong number of "%s"s. */
1991 char *yyp = yyresult;
1992 int yyi = 0;
1993 while ((*yyp = *yyf) != '\0')
1994 {
1995 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1996 {
1997 yyp += yytnamerr (yyp, yyarg[yyi++]);
1998 yyf += 2;
1999 }
2000 else
2001 {
2002 yyp++;
2003 yyf++;
2004 }
2005 }
2006 }
2007 return yysize;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002008 }
2009}
2010#endif /* YYERROR_VERBOSE */
Lev Walkin752e9732017-08-04 02:06:22 -07002011
Lev Walkin418298d2006-07-13 08:24:20 +00002012
2013/*-----------------------------------------------.
2014| Release the memory associated to this symbol. |
2015`-----------------------------------------------*/
2016
Lev Walkin0e90aa02013-03-19 16:17:13 -07002017/*ARGSUSED*/
2018#if (defined __STDC__ || defined __C99__FUNC__ \
2019 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00002020static void
Lev Walkin0e90aa02013-03-19 16:17:13 -07002021yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Lev Walkin418298d2006-07-13 08:24:20 +00002022#else
Lev Walkin0e90aa02013-03-19 16:17:13 -07002023static void
2024yydestruct (yymsg, yytype, yyvaluep)
2025 const char *yymsg;
Lev Walkin418298d2006-07-13 08:24:20 +00002026 int yytype;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002027 YYSTYPE *yyvaluep;
Lev Walkin418298d2006-07-13 08:24:20 +00002028#endif
2029{
Lev Walkin0e90aa02013-03-19 16:17:13 -07002030 YYUSE (yyvaluep);
2031
2032 if (!yymsg)
2033 yymsg = "Deleting";
2034 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
Lev Walkin418298d2006-07-13 08:24:20 +00002035
Lev Walkin752e9732017-08-04 02:06:22 -07002036 switch (yytype)
2037 {
2038
2039 default:
2040 break;
2041 }
Lev Walkina00d6b32006-03-21 03:40:38 +00002042}
Lev Walkin752e9732017-08-04 02:06:22 -07002043
2044
2045/* Prevent warnings from -Wmissing-prototypes. */
2046
2047#ifdef YYPARSE_PARAM
2048#if defined __STDC__ || defined __cplusplus
2049int yyparse (void *YYPARSE_PARAM);
2050#else
2051int yyparse ();
2052#endif
2053#else /* ! YYPARSE_PARAM */
2054#if defined __STDC__ || defined __cplusplus
2055int yyparse (void);
2056#else
2057int yyparse ();
2058#endif
2059#endif /* ! YYPARSE_PARAM */
Lev Walkin418298d2006-07-13 08:24:20 +00002060
2061
Lev Walkin0e90aa02013-03-19 16:17:13 -07002062
Lev Walkin752e9732017-08-04 02:06:22 -07002063/* The look-ahead symbol. */
Lev Walkin418298d2006-07-13 08:24:20 +00002064int yychar;
2065
Lev Walkin752e9732017-08-04 02:06:22 -07002066/* The semantic value of the look-ahead symbol. */
2067YYSTYPE yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00002068
Lev Walkin0e90aa02013-03-19 16:17:13 -07002069/* Number of syntax errors so far. */
Lev Walkin418298d2006-07-13 08:24:20 +00002070int yynerrs;
2071
Lev Walkinfb872bd2006-03-18 06:53:11 +00002072
Lev Walkin752e9732017-08-04 02:06:22 -07002073
Lev Walkin0e90aa02013-03-19 16:17:13 -07002074/*----------.
2075| yyparse. |
2076`----------*/
2077
2078#ifdef YYPARSE_PARAM
2079#if (defined __STDC__ || defined __C99__FUNC__ \
2080 || defined __cplusplus || defined _MSC_VER)
Lev Walkinfb872bd2006-03-18 06:53:11 +00002081int
Lev Walkin0e90aa02013-03-19 16:17:13 -07002082yyparse (void *YYPARSE_PARAM)
2083#else
2084int
2085yyparse (YYPARSE_PARAM)
2086 void *YYPARSE_PARAM;
2087#endif
2088#else /* ! YYPARSE_PARAM */
2089#if (defined __STDC__ || defined __C99__FUNC__ \
2090 || defined __cplusplus || defined _MSC_VER)
2091int
2092yyparse (void)
2093#else
2094int
2095yyparse ()
2096
2097#endif
2098#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00002099{
Lev Walkin752e9732017-08-04 02:06:22 -07002100
2101 int yystate;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002102 int yyn;
Lev Walkin418298d2006-07-13 08:24:20 +00002103 int yyresult;
Lev Walkin752e9732017-08-04 02:06:22 -07002104 /* Number of tokens to shift before error messages enabled. */
2105 int yyerrstatus;
2106 /* Look-ahead token as an internal (translated) token number. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002107 int yytoken = 0;
2108#if YYERROR_VERBOSE
2109 /* Buffer for error messages, and its allocated size. */
2110 char yymsgbuf[128];
2111 char *yymsg = yymsgbuf;
2112 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2113#endif
Lev Walkin418298d2006-07-13 08:24:20 +00002114
Lev Walkin752e9732017-08-04 02:06:22 -07002115 /* Three stacks and their tools:
2116 `yyss': related to states,
2117 `yyvs': related to semantic values,
2118 `yyls': related to locations.
2119
2120 Refer to the stacks thru separate pointers, to allow yyoverflow
2121 to reallocate them elsewhere. */
2122
2123 /* The state stack. */
2124 yytype_int16 yyssa[YYINITDEPTH];
2125 yytype_int16 *yyss = yyssa;
2126 yytype_int16 *yyssp;
2127
2128 /* The semantic value stack. */
2129 YYSTYPE yyvsa[YYINITDEPTH];
2130 YYSTYPE *yyvs = yyvsa;
2131 YYSTYPE *yyvsp;
2132
2133
2134
Lev Walkin0e90aa02013-03-19 16:17:13 -07002135#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
Lev Walkinf15320b2004-06-03 03:38:44 +00002136
Lev Walkin752e9732017-08-04 02:06:22 -07002137 YYSIZE_T yystacksize = YYINITDEPTH;
2138
2139 /* The variables used to return semantic value and location from the
2140 action routines. */
2141 YYSTYPE yyval;
2142
2143
Lev Walkin0e90aa02013-03-19 16:17:13 -07002144 /* The number of symbols on the RHS of the reduced rule.
2145 Keep to zero when no symbol should be popped. */
2146 int yylen = 0;
Lev Walkinf15320b2004-06-03 03:38:44 +00002147
Lev Walkin418298d2006-07-13 08:24:20 +00002148 YYDPRINTF ((stderr, "Starting parse\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002149
2150 yystate = 0;
2151 yyerrstatus = 0;
2152 yynerrs = 0;
Lev Walkin752e9732017-08-04 02:06:22 -07002153 yychar = YYEMPTY; /* Cause a token to be read. */
2154
2155 /* Initialize stack pointers.
2156 Waste one element of value and location stack
2157 so that they stay on the same level as the state stack.
2158 The wasted elements are never initialized. */
2159
2160 yyssp = yyss;
2161 yyvsp = yyvs;
2162
Lev Walkin418298d2006-07-13 08:24:20 +00002163 goto yysetstate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002164
Lev Walkin418298d2006-07-13 08:24:20 +00002165/*------------------------------------------------------------.
2166| yynewstate -- Push a new state, which is found in yystate. |
2167`------------------------------------------------------------*/
2168 yynewstate:
2169 /* In all cases, when you get here, the value and location stacks
Lev Walkin0e90aa02013-03-19 16:17:13 -07002170 have just been pushed. So pushing a state here evens the stacks. */
Lev Walkin418298d2006-07-13 08:24:20 +00002171 yyssp++;
2172
2173 yysetstate:
2174 *yyssp = yystate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002175
Lev Walkin0e90aa02013-03-19 16:17:13 -07002176 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002177 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002178 /* Get the current used size of the three stacks, in elements. */
Lev Walkin418298d2006-07-13 08:24:20 +00002179 YYSIZE_T yysize = yyssp - yyss + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002180
2181#ifdef yyoverflow
Lev Walkin418298d2006-07-13 08:24:20 +00002182 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002183 /* Give user a chance to reallocate the stack. Use copies of
Lev Walkin418298d2006-07-13 08:24:20 +00002184 these so that the &'s don't force the real ones into
2185 memory. */
2186 YYSTYPE *yyvs1 = yyvs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002187 yytype_int16 *yyss1 = yyss;
Lev Walkinf15320b2004-06-03 03:38:44 +00002188
Lev Walkin752e9732017-08-04 02:06:22 -07002189
Lev Walkin418298d2006-07-13 08:24:20 +00002190 /* Each stack pointer address is followed by the size of the
2191 data in use in that stack, in bytes. This used to be a
2192 conditional around just the two extra args, but that might
2193 be undefined if yyoverflow is a macro. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002194 yyoverflow (YY_("memory exhausted"),
Lev Walkin418298d2006-07-13 08:24:20 +00002195 &yyss1, yysize * sizeof (*yyssp),
2196 &yyvs1, yysize * sizeof (*yyvsp),
Lev Walkin752e9732017-08-04 02:06:22 -07002197
Lev Walkin418298d2006-07-13 08:24:20 +00002198 &yystacksize);
2199
2200 yyss = yyss1;
2201 yyvs = yyvs1;
2202 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002203#else /* no yyoverflow */
Lev Walkin418298d2006-07-13 08:24:20 +00002204# ifndef YYSTACK_RELOCATE
Lev Walkin0e90aa02013-03-19 16:17:13 -07002205 goto yyexhaustedlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002206# else
Lev Walkinf15320b2004-06-03 03:38:44 +00002207 /* Extend the stack our own way. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002208 if (YYMAXDEPTH <= yystacksize)
2209 goto yyexhaustedlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002210 yystacksize *= 2;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002211 if (YYMAXDEPTH < yystacksize)
Lev Walkinf15320b2004-06-03 03:38:44 +00002212 yystacksize = YYMAXDEPTH;
Lev Walkin418298d2006-07-13 08:24:20 +00002213
2214 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002215 yytype_int16 *yyss1 = yyss;
Lev Walkin418298d2006-07-13 08:24:20 +00002216 union yyalloc *yyptr =
2217 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2218 if (! yyptr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07002219 goto yyexhaustedlab;
Lev Walkin752e9732017-08-04 02:06:22 -07002220 YYSTACK_RELOCATE (yyss);
2221 YYSTACK_RELOCATE (yyvs);
2222
Lev Walkin418298d2006-07-13 08:24:20 +00002223# undef YYSTACK_RELOCATE
2224 if (yyss1 != yyssa)
2225 YYSTACK_FREE (yyss1);
2226 }
2227# endif
Lev Walkinf15320b2004-06-03 03:38:44 +00002228#endif /* no yyoverflow */
2229
Lev Walkin418298d2006-07-13 08:24:20 +00002230 yyssp = yyss + yysize - 1;
2231 yyvsp = yyvs + yysize - 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002232
Lev Walkin752e9732017-08-04 02:06:22 -07002233
Lev Walkin418298d2006-07-13 08:24:20 +00002234 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2235 (unsigned long int) yystacksize));
Lev Walkinf15320b2004-06-03 03:38:44 +00002236
Lev Walkin0e90aa02013-03-19 16:17:13 -07002237 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002238 YYABORT;
2239 }
2240
Lev Walkin418298d2006-07-13 08:24:20 +00002241 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Lev Walkinf15320b2004-06-03 03:38:44 +00002242
2243 goto yybackup;
Lev Walkin418298d2006-07-13 08:24:20 +00002244
2245/*-----------.
2246| yybackup. |
2247`-----------*/
2248yybackup:
Lev Walkinf15320b2004-06-03 03:38:44 +00002249
Lev Walkin0e90aa02013-03-19 16:17:13 -07002250 /* Do appropriate processing given the current state. Read a
Lev Walkin752e9732017-08-04 02:06:22 -07002251 look-ahead token if we need one and don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002252
Lev Walkin752e9732017-08-04 02:06:22 -07002253 /* First try to decide what to do without reference to look-ahead token. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002254 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07002255 if (yyn == YYPACT_NINF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002256 goto yydefault;
2257
Lev Walkin752e9732017-08-04 02:06:22 -07002258 /* Not known => get a look-ahead token if don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002259
Lev Walkin752e9732017-08-04 02:06:22 -07002260 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002261 if (yychar == YYEMPTY)
2262 {
Lev Walkin418298d2006-07-13 08:24:20 +00002263 YYDPRINTF ((stderr, "Reading a token: "));
Lev Walkinf15320b2004-06-03 03:38:44 +00002264 yychar = YYLEX;
2265 }
2266
Lev Walkin0e90aa02013-03-19 16:17:13 -07002267 if (yychar <= YYEOF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002268 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002269 yychar = yytoken = YYEOF;
Lev Walkin418298d2006-07-13 08:24:20 +00002270 YYDPRINTF ((stderr, "Now at end of input.\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002271 }
2272 else
2273 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002274 yytoken = YYTRANSLATE (yychar);
2275 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Lev Walkinf15320b2004-06-03 03:38:44 +00002276 }
2277
Lev Walkin0e90aa02013-03-19 16:17:13 -07002278 /* If the proper action on seeing token YYTOKEN is to reduce or to
Lev Walkin418298d2006-07-13 08:24:20 +00002279 detect an error, take that action. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002280 yyn += yytoken;
2281 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Lev Walkinf15320b2004-06-03 03:38:44 +00002282 goto yydefault;
Lev Walkinf15320b2004-06-03 03:38:44 +00002283 yyn = yytable[yyn];
Lev Walkin418298d2006-07-13 08:24:20 +00002284 if (yyn <= 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00002285 {
Lev Walkin752e9732017-08-04 02:06:22 -07002286 if (yyn == 0 || yyn == YYTABLE_NINF)
2287 goto yyerrlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002288 yyn = -yyn;
2289 goto yyreduce;
2290 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002291
Lev Walkin752e9732017-08-04 02:06:22 -07002292 if (yyn == YYFINAL)
2293 YYACCEPT;
2294
Lev Walkin418298d2006-07-13 08:24:20 +00002295 /* Count tokens shifted since error; after three, turn off error
2296 status. */
2297 if (yyerrstatus)
2298 yyerrstatus--;
Lev Walkinf15320b2004-06-03 03:38:44 +00002299
Lev Walkin752e9732017-08-04 02:06:22 -07002300 /* Shift the look-ahead token. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002301 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2302
Lev Walkin752e9732017-08-04 02:06:22 -07002303 /* Discard the shifted token unless it is eof. */
2304 if (yychar != YYEOF)
2305 yychar = YYEMPTY;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002306
Lev Walkinf15320b2004-06-03 03:38:44 +00002307 yystate = yyn;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002308 *++yyvsp = yylval;
2309
Lev Walkinf15320b2004-06-03 03:38:44 +00002310 goto yynewstate;
2311
Lev Walkina00d6b32006-03-21 03:40:38 +00002312
Lev Walkin418298d2006-07-13 08:24:20 +00002313/*-----------------------------------------------------------.
2314| yydefault -- do the default action for the current state. |
2315`-----------------------------------------------------------*/
2316yydefault:
Lev Walkinf15320b2004-06-03 03:38:44 +00002317 yyn = yydefact[yystate];
2318 if (yyn == 0)
2319 goto yyerrlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002320 goto yyreduce;
Lev Walkinf15320b2004-06-03 03:38:44 +00002321
Lev Walkin418298d2006-07-13 08:24:20 +00002322
2323/*-----------------------------.
2324| yyreduce -- Do a reduction. |
2325`-----------------------------*/
Lev Walkinf15320b2004-06-03 03:38:44 +00002326yyreduce:
Lev Walkin418298d2006-07-13 08:24:20 +00002327 /* yyn is the number of a rule to reduce with. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002328 yylen = yyr2[yyn];
Lev Walkinf15320b2004-06-03 03:38:44 +00002329
Lev Walkin418298d2006-07-13 08:24:20 +00002330 /* If YYLEN is nonzero, implement the default value of the action:
2331 `$$ = $1'.
2332
2333 Otherwise, the following line sets YYVAL to garbage.
2334 This behavior is undocumented and Bison
2335 users should not rely upon it. Assigning to YYVAL
2336 unconditionally makes the parser a bit smaller, and it avoids a
2337 GCC warning that YYVAL may be used uninitialized. */
2338 yyval = yyvsp[1-yylen];
2339
2340
Lev Walkin0e90aa02013-03-19 16:17:13 -07002341 YY_REDUCE_PRINT (yyn);
Lev Walkin418298d2006-07-13 08:24:20 +00002342 switch (yyn)
2343 {
2344 case 2:
Lev Walkin59165cf2017-09-11 06:24:45 -07002345#line 415 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002346 {
Lev Walkin752e9732017-08-04 02:06:22 -07002347 *(void **)param = (yyvsp[(2) - (2)].a_grammar);
2348 }
2349 break;
2350
2351 case 3:
Lev Walkin59165cf2017-09-11 06:24:45 -07002352#line 418 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002353 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002354 *(void **)param = (yyvsp[(1) - (1)].a_grammar);
Lev Walkin418298d2006-07-13 08:24:20 +00002355 }
2356 break;
2357
Lev Walkin752e9732017-08-04 02:06:22 -07002358 case 4:
Lev Walkin59165cf2017-09-11 06:24:45 -07002359#line 424 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002360 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002361 (yyval.a_grammar) = asn1p_new();
2362 checkmem((yyval.a_grammar));
2363 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(1) - (1)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002364 }
2365 break;
2366
Lev Walkin752e9732017-08-04 02:06:22 -07002367 case 5:
Lev Walkin59165cf2017-09-11 06:24:45 -07002368#line 429 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002369 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002370 (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar);
2371 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002372 }
2373 break;
2374
Lev Walkin752e9732017-08-04 02:06:22 -07002375 case 6:
Lev Walkin59165cf2017-09-11 06:24:45 -07002376#line 446 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002377 { currentModule = asn1p_module_new(); }
2378 break;
2379
Lev Walkin752e9732017-08-04 02:06:22 -07002380 case 7:
Lev Walkin59165cf2017-09-11 06:24:45 -07002381#line 451 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002382 {
Lev Walkinfb872bd2006-03-18 06:53:11 +00002383
Lev Walkin0e90aa02013-03-19 16:17:13 -07002384 (yyval.a_module) = currentModule;
Lev Walkina9532f42006-09-17 04:52:50 +00002385
Lev Walkin0e90aa02013-03-19 16:17:13 -07002386 if((yyvsp[(8) - (9)].a_module)) {
2387 asn1p_module_t tmp = *((yyval.a_module));
2388 *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module));
2389 *((yyvsp[(8) - (9)].a_module)) = tmp;
2390 asn1p_module_free((yyvsp[(8) - (9)].a_module));
Lev Walkinf15320b2004-06-03 03:38:44 +00002391 } else {
2392 /* There's a chance that a module is just plain empty */
Lev Walkinf15320b2004-06-03 03:38:44 +00002393 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002394
Lev Walkin0e90aa02013-03-19 16:17:13 -07002395 (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str);
2396 (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid);
2397 (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002398 }
2399 break;
2400
Lev Walkin752e9732017-08-04 02:06:22 -07002401 case 8:
Lev Walkin59165cf2017-09-11 06:24:45 -07002402#line 475 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002403 { (yyval.a_oid) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002404 break;
2405
Lev Walkin752e9732017-08-04 02:06:22 -07002406 case 9:
Lev Walkin59165cf2017-09-11 06:24:45 -07002407#line 476 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002408 { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002409 break;
2410
Lev Walkin752e9732017-08-04 02:06:22 -07002411 case 10:
Lev Walkin59165cf2017-09-11 06:24:45 -07002412#line 480 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002413 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002414 (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid);
Lev Walkin418298d2006-07-13 08:24:20 +00002415 }
2416 break;
2417
Lev Walkin752e9732017-08-04 02:06:22 -07002418 case 11:
Lev Walkin59165cf2017-09-11 06:24:45 -07002419#line 483 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002420 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002421 (yyval.a_oid) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002422 }
2423 break;
2424
Lev Walkin752e9732017-08-04 02:06:22 -07002425 case 12:
Lev Walkin59165cf2017-09-11 06:24:45 -07002426#line 489 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002427 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002428 (yyval.a_oid) = asn1p_oid_new();
2429 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002430 if((yyvsp[(1) - (1)].a_oid_arc).name)
2431 free((yyvsp[(1) - (1)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002432 }
2433 break;
2434
Lev Walkin752e9732017-08-04 02:06:22 -07002435 case 13:
Lev Walkin59165cf2017-09-11 06:24:45 -07002436#line 495 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002437 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002438 (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid);
2439 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002440 if((yyvsp[(2) - (2)].a_oid_arc).name)
2441 free((yyvsp[(2) - (2)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002442 }
2443 break;
2444
Lev Walkin752e9732017-08-04 02:06:22 -07002445 case 14:
Lev Walkin59165cf2017-09-11 06:24:45 -07002446#line 504 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002447 { /* iso */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002448 (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str);
2449 (yyval.a_oid_arc).number = -1;
Lev Walkin418298d2006-07-13 08:24:20 +00002450 }
2451 break;
2452
Lev Walkin752e9732017-08-04 02:06:22 -07002453 case 15:
Lev Walkin59165cf2017-09-11 06:24:45 -07002454#line 508 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002455 { /* iso(1) */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002456 (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str);
2457 (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002458 }
2459 break;
2460
Lev Walkin752e9732017-08-04 02:06:22 -07002461 case 16:
Lev Walkin59165cf2017-09-11 06:24:45 -07002462#line 512 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002463 { /* 1 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002464 (yyval.a_oid_arc).name = 0;
2465 (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002466 }
2467 break;
2468
Lev Walkin752e9732017-08-04 02:06:22 -07002469 case 17:
Lev Walkin59165cf2017-09-11 06:24:45 -07002470#line 522 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002471 { (yyval.a_module_flags) = MSF_NOFLAGS; }
Lev Walkin418298d2006-07-13 08:24:20 +00002472 break;
2473
Lev Walkin418298d2006-07-13 08:24:20 +00002474 case 18:
Lev Walkin59165cf2017-09-11 06:24:45 -07002475#line 523 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002476 {
Lev Walkin752e9732017-08-04 02:06:22 -07002477 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2478 }
2479 break;
2480
Lev Walkind523ea42017-09-06 22:15:08 -07002481 case 19:
Lev Walkin59165cf2017-09-11 06:24:45 -07002482#line 532 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07002483 {
2484 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
2485 }
2486 break;
2487
Lev Walkin752e9732017-08-04 02:06:22 -07002488 case 20:
Lev Walkin59165cf2017-09-11 06:24:45 -07002489#line 535 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002490 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002491 (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002492 }
2493 break;
2494
Lev Walkin752e9732017-08-04 02:06:22 -07002495 case 21:
Lev Walkin59165cf2017-09-11 06:24:45 -07002496#line 544 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002497 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002498 (yyval.a_module_flags) = MSF_EXPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002499 }
2500 break;
2501
Lev Walkin752e9732017-08-04 02:06:22 -07002502 case 22:
Lev Walkin59165cf2017-09-11 06:24:45 -07002503#line 547 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002504 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002505 (yyval.a_module_flags) = MSF_IMPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002506 }
2507 break;
2508
Lev Walkin752e9732017-08-04 02:06:22 -07002509 case 23:
Lev Walkin59165cf2017-09-11 06:24:45 -07002510#line 550 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002511 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002512 (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002513 }
2514 break;
2515
Lev Walkin752e9732017-08-04 02:06:22 -07002516 case 24:
Lev Walkin59165cf2017-09-11 06:24:45 -07002517#line 553 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002518 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002519 (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED;
Lev Walkin418298d2006-07-13 08:24:20 +00002520 }
2521 break;
2522
Lev Walkin752e9732017-08-04 02:06:22 -07002523 case 25:
Lev Walkin59165cf2017-09-11 06:24:45 -07002524#line 557 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002525 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002526 /* X.680Amd1 specifies TAG and XER */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002527 if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) {
2528 (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS;
2529 } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) {
2530 (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002531 } else {
2532 fprintf(stderr,
Lev Walkind523ea42017-09-06 22:15:08 -07002533 "WARNING: %s INSTRUCTIONS at %s:%d: "
Lev Walkinf59d0752004-08-18 04:59:12 +00002534 "Unrecognized encoding reference\n",
Lev Walkind523ea42017-09-06 22:15:08 -07002535 (yyvsp[(1) - (2)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002536 (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002537 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002538 free((yyvsp[(1) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00002539 }
2540 break;
2541
Lev Walkin752e9732017-08-04 02:06:22 -07002542 case 26:
Lev Walkin59165cf2017-09-11 06:24:45 -07002543#line 578 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002544 { (yyval.a_module) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002545 break;
2546
Lev Walkin752e9732017-08-04 02:06:22 -07002547 case 27:
Lev Walkin59165cf2017-09-11 06:24:45 -07002548#line 579 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002549 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002550 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002551 }
2552 break;
2553
Lev Walkin752e9732017-08-04 02:06:22 -07002554 case 28:
Lev Walkin59165cf2017-09-11 06:24:45 -07002555#line 588 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002556 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002557 (yyval.a_module) = asn1p_module_new();
2558 AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next);
2559 AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next);
2560 AL_IMPORT((yyval.a_module), members, (yyvsp[(3) - (3)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002561
2562 asn1p_module_free((yyvsp[(1) - (3)].a_module));
2563 asn1p_module_free((yyvsp[(2) - (3)].a_module));
2564 asn1p_module_free((yyvsp[(3) - (3)].a_module));
Lev Walkin418298d2006-07-13 08:24:20 +00002565 }
2566 break;
2567
Lev Walkin752e9732017-08-04 02:06:22 -07002568 case 29:
Lev Walkin59165cf2017-09-11 06:24:45 -07002569#line 601 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002570 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002571 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002572 }
2573 break;
2574
Lev Walkin752e9732017-08-04 02:06:22 -07002575 case 30:
Lev Walkin59165cf2017-09-11 06:24:45 -07002576#line 604 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002577 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002578 if((yyvsp[(1) - (2)].a_module)) {
2579 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002580 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002581 (yyval.a_module) = (yyvsp[(2) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002582 break;
2583 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002584 AL_IMPORT((yyval.a_module), members, (yyvsp[(2) - (2)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002585 asn1p_module_free((yyvsp[(2) - (2)].a_module));
Lev Walkin866bd7f2006-09-14 10:35:20 +00002586 }
2587 break;
2588
Lev Walkin418298d2006-07-13 08:24:20 +00002589 case 31:
Lev Walkin59165cf2017-09-11 06:24:45 -07002590#line 621 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002591 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002592 (yyval.a_module) = asn1p_module_new();
2593 checkmem((yyval.a_module));
2594 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2595 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2596 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002597 }
2598 break;
2599
2600 case 32:
Lev Walkin59165cf2017-09-11 06:24:45 -07002601#line 628 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002602 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002603 (yyval.a_module) = asn1p_module_new();
2604 checkmem((yyval.a_module));
2605 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2606 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2607 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkina9532f42006-09-17 04:52:50 +00002608 }
Lev Walkin418298d2006-07-13 08:24:20 +00002609 break;
2610
Lev Walkin866bd7f2006-09-14 10:35:20 +00002611 case 33:
Lev Walkin59165cf2017-09-11 06:24:45 -07002612#line 642 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002613 {
2614 (yyval.a_module) = asn1p_module_new();
2615 checkmem((yyval.a_module));
2616 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2617 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2618 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
2619 }
Lev Walkina9532f42006-09-17 04:52:50 +00002620 break;
2621
2622 case 34:
Lev Walkin59165cf2017-09-11 06:24:45 -07002623#line 650 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07002624 { asn1p_lexer_hack_push_encoding_control(); }
2625 break;
2626
2627 case 35:
Lev Walkin59165cf2017-09-11 06:24:45 -07002628#line 651 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002629 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002630 fprintf(stderr,
2631 "WARNING: ENCODING-CONTROL %s "
Lev Walkind523ea42017-09-06 22:15:08 -07002632 "specification at %s:%d ignored\n",
2633 (yyvsp[(2) - (3)].tv_str), ASN_FILENAME, yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002634 free((yyvsp[(2) - (3)].tv_str));
2635 (yyval.a_module) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002636 }
2637 break;
2638
Lev Walkin752e9732017-08-04 02:06:22 -07002639 case 36:
Lev Walkin59165cf2017-09-11 06:24:45 -07002640#line 663 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002641 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002642 return yyerror(
Lev Walkin70853052005-11-26 11:21:55 +00002643 "Attempt to redefine a standard basic string type, "
2644 "please comment out or remove this type redefinition.");
Lev Walkin418298d2006-07-13 08:24:20 +00002645 }
2646 break;
2647
Lev Walkin752e9732017-08-04 02:06:22 -07002648 case 37:
Lev Walkin59165cf2017-09-11 06:24:45 -07002649#line 676 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002650 { (yyval.a_module) = 0; }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002651 break;
2652
Lev Walkin752e9732017-08-04 02:06:22 -07002653 case 39:
Lev Walkin59165cf2017-09-11 06:24:45 -07002654#line 680 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002655 {
Lev Walkinb36317c2005-08-12 10:09:10 +00002656 if(!saved_aid && 0)
2657 return yyerror("Unterminated IMPORTS FROM, "
2658 "expected semicolon ';'");
2659 saved_aid = 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002660 (yyval.a_module) = (yyvsp[(2) - (3)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002661 }
2662 break;
2663
Lev Walkin752e9732017-08-04 02:06:22 -07002664 case 40:
Lev Walkin59165cf2017-09-11 06:24:45 -07002665#line 690 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002666 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002667 return yyerror("Empty IMPORTS list");
Lev Walkin418298d2006-07-13 08:24:20 +00002668 }
2669 break;
2670
Lev Walkin752e9732017-08-04 02:06:22 -07002671 case 41:
Lev Walkin59165cf2017-09-11 06:24:45 -07002672#line 696 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002673 { (yyval.a_module) = asn1p_module_new(); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002674 break;
2675
Lev Walkin752e9732017-08-04 02:06:22 -07002676 case 43:
Lev Walkin59165cf2017-09-11 06:24:45 -07002677#line 700 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002678 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002679 (yyval.a_module) = asn1p_module_new();
2680 checkmem((yyval.a_module));
2681 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002682 }
2683 break;
2684
Lev Walkin752e9732017-08-04 02:06:22 -07002685 case 44:
Lev Walkin59165cf2017-09-11 06:24:45 -07002686#line 705 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002687 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002688 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
2689 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002690 }
2691 break;
2692
Lev Walkin752e9732017-08-04 02:06:22 -07002693 case 45:
Lev Walkin59165cf2017-09-11 06:24:45 -07002694#line 712 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002695 { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); }
Lev Walkin418298d2006-07-13 08:24:20 +00002696 break;
2697
Lev Walkin752e9732017-08-04 02:06:22 -07002698 case 46:
Lev Walkin59165cf2017-09-11 06:24:45 -07002699#line 713 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002700 { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002701 break;
2702
Lev Walkin752e9732017-08-04 02:06:22 -07002703 case 47:
Lev Walkin59165cf2017-09-11 06:24:45 -07002704#line 717 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002705 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002706 (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports);
2707 (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str);
2708 (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid);
Lev Walkinb36317c2005-08-12 10:09:10 +00002709 /* This stupid thing is used for look-back hack. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002710 saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier);
2711 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002712 }
2713 break;
2714
Lev Walkin752e9732017-08-04 02:06:22 -07002715 case 48:
Lev Walkin59165cf2017-09-11 06:24:45 -07002716#line 728 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002717 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002718 (yyval.a_xports) = asn1p_xports_new();
2719 checkmem((yyval.a_xports));
2720 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002721 }
2722 break;
2723
Lev Walkin752e9732017-08-04 02:06:22 -07002724 case 49:
Lev Walkin59165cf2017-09-11 06:24:45 -07002725#line 733 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002726 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002727 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2728 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002729 }
2730 break;
2731
Lev Walkin752e9732017-08-04 02:06:22 -07002732 case 50:
Lev Walkin59165cf2017-09-11 06:24:45 -07002733#line 740 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002734 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002735 (yyval.a_expr) = NEW_EXPR();
2736 checkmem((yyval.a_expr));
2737 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2738 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin418298d2006-07-13 08:24:20 +00002739 }
2740 break;
2741
Lev Walkin752e9732017-08-04 02:06:22 -07002742 case 51:
Lev Walkin59165cf2017-09-11 06:24:45 -07002743#line 746 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002744 { /* Completely equivalent to above */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002745 (yyval.a_expr) = NEW_EXPR();
2746 checkmem((yyval.a_expr));
2747 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2748 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002749 }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002750 break;
2751
Lev Walkin752e9732017-08-04 02:06:22 -07002752 case 52:
Lev Walkin59165cf2017-09-11 06:24:45 -07002753#line 752 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002754 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002755 (yyval.a_expr) = NEW_EXPR();
2756 checkmem((yyval.a_expr));
2757 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2758 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002759 }
2760 break;
2761
Lev Walkin752e9732017-08-04 02:06:22 -07002762 case 53:
Lev Walkin59165cf2017-09-11 06:24:45 -07002763#line 762 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002764 { (yyval.a_module) = 0; }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002765 break;
2766
Lev Walkin752e9732017-08-04 02:06:22 -07002767 case 54:
Lev Walkin59165cf2017-09-11 06:24:45 -07002768#line 763 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002769 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002770 (yyval.a_module) = asn1p_module_new();
2771 checkmem((yyval.a_module));
2772 if((yyvsp[(1) - (1)].a_xports)) {
2773 TQ_ADD(&((yyval.a_module)->exports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002774 } else {
2775 /* "EXPORTS ALL;" */
2776 }
2777 }
2778 break;
2779
Lev Walkin752e9732017-08-04 02:06:22 -07002780 case 55:
Lev Walkin59165cf2017-09-11 06:24:45 -07002781#line 775 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002782 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002783 (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports);
Lev Walkin418298d2006-07-13 08:24:20 +00002784 }
2785 break;
2786
Lev Walkin752e9732017-08-04 02:06:22 -07002787 case 56:
Lev Walkin59165cf2017-09-11 06:24:45 -07002788#line 778 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002789 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002790 (yyval.a_xports) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002791 }
2792 break;
2793
Lev Walkin752e9732017-08-04 02:06:22 -07002794 case 57:
Lev Walkin59165cf2017-09-11 06:24:45 -07002795#line 781 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002796 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002797 /* Empty EXPORTS clause effectively prohibits export. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002798 (yyval.a_xports) = asn1p_xports_new();
2799 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002800 }
2801 break;
2802
Lev Walkin752e9732017-08-04 02:06:22 -07002803 case 58:
Lev Walkin59165cf2017-09-11 06:24:45 -07002804#line 789 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002805 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002806 (yyval.a_xports) = asn1p_xports_new();
2807 assert((yyval.a_xports));
2808 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002809 }
2810 break;
2811
Lev Walkin752e9732017-08-04 02:06:22 -07002812 case 59:
Lev Walkin59165cf2017-09-11 06:24:45 -07002813#line 794 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002814 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002815 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2816 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002817 }
2818 break;
2819
Lev Walkin752e9732017-08-04 02:06:22 -07002820 case 60:
Lev Walkin59165cf2017-09-11 06:24:45 -07002821#line 801 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002822 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002823 (yyval.a_expr) = NEW_EXPR();
2824 checkmem((yyval.a_expr));
2825 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2826 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin418298d2006-07-13 08:24:20 +00002827 }
2828 break;
2829
Lev Walkin752e9732017-08-04 02:06:22 -07002830 case 61:
Lev Walkin59165cf2017-09-11 06:24:45 -07002831#line 807 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002832 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002833 (yyval.a_expr) = NEW_EXPR();
2834 checkmem((yyval.a_expr));
2835 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2836 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002837 }
Lev Walkin418298d2006-07-13 08:24:20 +00002838 break;
2839
Lev Walkin752e9732017-08-04 02:06:22 -07002840 case 62:
Lev Walkin59165cf2017-09-11 06:24:45 -07002841#line 813 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002842 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002843 (yyval.a_expr) = NEW_EXPR();
2844 checkmem((yyval.a_expr));
2845 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2846 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002847 }
2848 break;
2849
Lev Walkin752e9732017-08-04 02:06:22 -07002850 case 63:
Lev Walkin59165cf2017-09-11 06:24:45 -07002851#line 822 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002852 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002853 break;
2854
Lev Walkin752e9732017-08-04 02:06:22 -07002855 case 64:
Lev Walkin59165cf2017-09-11 06:24:45 -07002856#line 825 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002857 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002858 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
2859 assert((yyval.a_expr)->Identifier == 0);
2860 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
2861 (yyval.a_expr)->meta_type = AMT_VALUESET;
2862 (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002863 }
2864 break;
2865
Lev Walkin752e9732017-08-04 02:06:22 -07002866 case 65:
Lev Walkin59165cf2017-09-11 06:24:45 -07002867#line 845 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002868 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002869 (yyval.a_expr) = NEW_EXPR();
2870 checkmem((yyval.a_expr));
2871 (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref);
2872 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2873 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002874 }
2875 break;
2876
Lev Walkin59165cf2017-09-11 06:24:45 -07002877 case 66:
2878#line 855 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002879 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002880 (yyval.a_expr) = NEW_EXPR();
2881 checkmem((yyval.a_expr));
2882 (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref);
2883 (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr);
2884 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2885 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002886 }
2887 break;
2888
Lev Walkin59165cf2017-09-11 06:24:45 -07002889 case 67:
2890#line 875 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002891 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002892 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2893 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2894 assert((yyval.a_expr)->expr_type);
2895 assert((yyval.a_expr)->meta_type);
Lev Walkin418298d2006-07-13 08:24:20 +00002896 }
2897 break;
2898
Lev Walkin59165cf2017-09-11 06:24:45 -07002899 case 68:
2900#line 881 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002901 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002902 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2903 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2904 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
2905 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00002906 }
2907 break;
2908
Lev Walkin59165cf2017-09-11 06:24:45 -07002909 case 69:
2910#line 897 "asn1p_y.y"
2911 {
2912 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2913 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2914 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2915 }
2916 break;
2917
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002918 case 70:
Lev Walkin59165cf2017-09-11 06:24:45 -07002919#line 903 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002920 {
2921 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2922 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2923 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2924 }
2925 break;
2926
Lev Walkin4a4543f2006-10-13 12:37:39 +00002927 case 71:
Lev Walkin59165cf2017-09-11 06:24:45 -07002928#line 911 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002929 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002930 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002931 (yyval.a_plist) = asn1p_paramlist_new(yylineno);
2932 checkmem((yyval.a_plist));
2933 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 +00002934 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002935 asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002936 free((yyvsp[(1) - (1)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002937 }
2938 break;
2939
Lev Walkin59165cf2017-09-11 06:24:45 -07002940 case 72:
2941#line 920 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002942 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002943 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002944 (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist);
2945 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 +00002946 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002947 asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002948 free((yyvsp[(3) - (3)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002949 }
2950 break;
2951
Lev Walkin59165cf2017-09-11 06:24:45 -07002952 case 73:
2953#line 931 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002954 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002955 (yyval.a_parg).governor = NULL;
2956 (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00002957 }
2958 break;
2959
Lev Walkin59165cf2017-09-11 06:24:45 -07002960 case 74:
2961#line 935 "asn1p_y.y"
2962 {
2963 int ret;
2964 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
2965 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
2966 checkmem(ret == 0);
2967 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
2968 free((yyvsp[(1) - (3)].tv_str));
2969 }
2970 break;
2971
Lev Walkin866bd7f2006-09-14 10:35:20 +00002972 case 75:
Lev Walkin59165cf2017-09-11 06:24:45 -07002973#line 943 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002974 {
2975 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002976 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002977 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002978 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002979 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002980 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00002981 }
2982 break;
2983
2984 case 76:
Lev Walkin59165cf2017-09-11 06:24:45 -07002985#line 951 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002986 {
Lev Walkina9532f42006-09-17 04:52:50 +00002987 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002988 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin59165cf2017-09-11 06:24:45 -07002989 ret = asn1p_ref_add_component((yyval.a_parg).governor,
2990 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkina9532f42006-09-17 04:52:50 +00002991 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002992 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkina9532f42006-09-17 04:52:50 +00002993 }
2994 break;
2995
Lev Walkin4a4543f2006-10-13 12:37:39 +00002996 case 77:
Lev Walkin59165cf2017-09-11 06:24:45 -07002997#line 959 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002998 {
2999 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003000 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003001 ret = asn1p_ref_add_component((yyval.a_parg).governor,
3002 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003003 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003004 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003005 }
3006 break;
3007
3008 case 78:
Lev Walkin59165cf2017-09-11 06:24:45 -07003009#line 970 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003010 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003011 (yyval.a_expr) = NEW_EXPR();
3012 checkmem((yyval.a_expr));
3013 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003014 }
3015 break;
3016
Lev Walkin59165cf2017-09-11 06:24:45 -07003017 case 79:
3018#line 975 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003019 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003020 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3021 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003022 }
3023 break;
3024
Lev Walkin752e9732017-08-04 02:06:22 -07003025 case 81:
Lev Walkin59165cf2017-09-11 06:24:45 -07003026#line 983 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003027 {
Lev Walkin59165cf2017-09-11 06:24:45 -07003028 (yyval.a_expr) = NEW_EXPR();
3029 checkmem((yyval.a_expr));
3030 (yyval.a_expr)->Identifier = strdup("?");
3031 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3032 (yyval.a_expr)->meta_type = AMT_VALUE;
3033 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003034 }
3035 break;
3036
Lev Walkin752e9732017-08-04 02:06:22 -07003037 case 82:
Lev Walkin59165cf2017-09-11 06:24:45 -07003038#line 991 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003039 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003040 (yyval.a_expr) = NEW_EXPR();
3041 checkmem((yyval.a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003042 (yyval.a_expr)->Identifier = strdup("?");
Lev Walkin0e90aa02013-03-19 16:17:13 -07003043 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3044 (yyval.a_expr)->meta_type = AMT_VALUE;
3045 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003046 }
3047 break;
3048
Lev Walkin752e9732017-08-04 02:06:22 -07003049 case 83:
Lev Walkin59165cf2017-09-11 06:24:45 -07003050#line 999 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003051 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003052 (yyval.a_expr) = NEW_EXPR();
3053 (yyval.a_expr)->expr_type = A1TC_VALUESET;
3054 (yyval.a_expr)->meta_type = AMT_VALUESET;
3055 (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00003056 }
3057 break;
3058
Lev Walkin59165cf2017-09-11 06:24:45 -07003059 case 84:
3060#line 1022 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003061 { (yyval.a_expr) = NEW_EXPR(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003062 break;
3063
Lev Walkin59165cf2017-09-11 06:24:45 -07003064 case 85:
3065#line 1023 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003066 { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); }
Lev Walkina9532f42006-09-17 04:52:50 +00003067 break;
3068
Lev Walkin59165cf2017-09-11 06:24:45 -07003069 case 86:
3070#line 1026 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003071 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003072 (yyval.a_expr) = NEW_EXPR();
3073 checkmem((yyval.a_expr));
3074 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003075 }
3076 break;
3077
Lev Walkin59165cf2017-09-11 06:24:45 -07003078 case 87:
3079#line 1031 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003080 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003081 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3082 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003083 }
3084 break;
3085
Lev Walkin59165cf2017-09-11 06:24:45 -07003086 case 88:
3087#line 1035 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003088 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003089 (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003090 asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003091 asn1p_expr_free((yyvsp[(4) - (5)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003092 }
3093 break;
3094
Lev Walkin59165cf2017-09-11 06:24:45 -07003095 case 89:
3096#line 1043 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003097 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003098 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3099 assert((yyval.a_expr)->Identifier == 0);
3100 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3101 (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3102 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003103 }
3104 break;
3105
Lev Walkin59165cf2017-09-11 06:24:45 -07003106 case 90:
3107#line 1050 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003108 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003109 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3110 (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3111 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
3112 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003113 }
3114 break;
3115
Lev Walkin59165cf2017-09-11 06:24:45 -07003116 case 91:
3117#line 1056 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003118 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003119 (yyval.a_expr) = NEW_EXPR();
3120 checkmem((yyval.a_expr));
3121 (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type;
3122 (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF;
3123 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003124 }
3125 break;
3126
Lev Walkin59165cf2017-09-11 06:24:45 -07003127 case 92:
3128#line 1063 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003129 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003130 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003131 }
3132 break;
3133
Lev Walkin59165cf2017-09-11 06:24:45 -07003134 case 93:
3135#line 1069 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003136 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003137 (yyval.a_expr) = NEW_EXPR();
3138 checkmem((yyval.a_expr));
3139 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003140 }
3141 break;
3142
Lev Walkin59165cf2017-09-11 06:24:45 -07003143 case 94:
3144#line 1074 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003145 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003146 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3147 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003148 }
3149 break;
3150
Lev Walkin59165cf2017-09-11 06:24:45 -07003151 case 95:
3152#line 1081 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003153 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003154 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3155 assert((yyval.a_expr)->Identifier == 0);
3156 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003157 }
3158 break;
3159
Lev Walkin59165cf2017-09-11 06:24:45 -07003160 case 96:
3161#line 1086 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003162 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003163 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003164 }
3165 break;
3166
Lev Walkin59165cf2017-09-11 06:24:45 -07003167 case 97:
3168#line 1089 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003169 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003170 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
3171 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003172 }
3173 break;
3174
Lev Walkin59165cf2017-09-11 06:24:45 -07003175 case 98:
3176#line 1096 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003177 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003178 (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr);
3179 checkmem((yyval.a_expr));
3180 (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt);
3181 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
3182 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00003183 }
3184 break;
3185
Lev Walkin59165cf2017-09-11 06:24:45 -07003186 case 99:
3187#line 1106 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003188 { (yyval.a_int) = 0; }
3189 break;
3190
Lev Walkin59165cf2017-09-11 06:24:45 -07003191 case 100:
3192#line 1107 "asn1p_y.y"
3193 { (yyval.a_int) = 1; }
3194 break;
3195
Lev Walkin752e9732017-08-04 02:06:22 -07003196 case 101:
Lev Walkinbf979152017-09-07 23:36:11 -07003197#line 1111 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003198 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003199 (yyval.a_expr) = NEW_EXPR();
3200 checkmem((yyval.a_expr));
3201 (yyval.a_expr)->expr_type = A1TC_CLASSDEF;
3202 (yyval.a_expr)->meta_type = AMT_OBJECTCLASS;
3203 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003204 }
3205 break;
3206
Lev Walkin59165cf2017-09-11 06:24:45 -07003207 case 102:
3208#line 1118 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003209 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003210 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3211 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003212 }
3213 break;
3214
Lev Walkin59165cf2017-09-11 06:24:45 -07003215 case 103:
3216#line 1128 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003217 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003218 (yyval.a_expr) = NEW_EXPR();
3219 checkmem((yyval.a_expr));
3220 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
3221 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3222 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */
3223 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003224 }
3225 break;
3226
Lev Walkin59165cf2017-09-11 06:24:45 -07003227 case 104:
3228#line 1138 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003229 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003230 (yyval.a_expr) = NEW_EXPR();
3231 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3232 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3233 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */
3234 (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int);
3235 (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker);
3236 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003237 }
3238 break;
3239
Lev Walkin59165cf2017-09-11 06:24:45 -07003240 case 105:
3241#line 1149 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003242 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003243 (yyval.a_expr) = NEW_EXPR();
3244 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3245 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3246 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS;
3247 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3248 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003249 }
3250 break;
3251
Lev Walkin59165cf2017-09-11 06:24:45 -07003252 case 106:
3253#line 1159 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003254 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003255 (yyval.a_expr) = NEW_EXPR();
3256 checkmem((yyval.a_expr));
3257 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3258 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3259 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3260 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS;
3261 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003262 }
3263 break;
3264
Lev Walkin59165cf2017-09-11 06:24:45 -07003265 case 107:
3266#line 1170 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003267 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003268 (yyval.a_expr) = NEW_EXPR();
3269 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3270 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3271 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS;
3272 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3273 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003274 }
3275 break;
3276
Lev Walkin59165cf2017-09-11 06:24:45 -07003277 case 108:
3278#line 1180 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003279 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003280 (yyval.a_expr) = NEW_EXPR();
3281 checkmem((yyval.a_expr));
3282 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3283 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3284 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS;
3285 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr));
3286 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003287 }
3288 break;
3289
Lev Walkin59165cf2017-09-11 06:24:45 -07003290 case 109:
3291#line 1191 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003292 {
3293 (yyval.a_expr) = NEW_EXPR();
3294 checkmem((yyval.a_expr));
3295 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3296 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3297 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3298 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS;
3299 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
3300 }
Lev Walkin418298d2006-07-13 08:24:20 +00003301 break;
3302
Lev Walkin59165cf2017-09-11 06:24:45 -07003303 case 110:
3304#line 1203 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003305 { (yyval.a_wsynt) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00003306 break;
3307
Lev Walkin59165cf2017-09-11 06:24:45 -07003308 case 111:
3309#line 1204 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003310 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003311 (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003312 }
3313 break;
3314
Lev Walkin59165cf2017-09-11 06:24:45 -07003315 case 112:
3316#line 1211 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003317 { asn1p_lexer_hack_enable_with_syntax(); }
3318 break;
3319
Lev Walkin59165cf2017-09-11 06:24:45 -07003320 case 113:
3321#line 1213 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003322 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003323 (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003324 }
3325 break;
3326
Lev Walkin59165cf2017-09-11 06:24:45 -07003327 case 114:
3328#line 1219 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003329 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003330 (yyval.a_wsynt) = asn1p_wsyntx_new();
3331 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003332 }
3333 break;
3334
Lev Walkin59165cf2017-09-11 06:24:45 -07003335 case 115:
3336#line 1223 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003337 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003338 (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt);
3339 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003340 }
3341 break;
3342
Lev Walkin59165cf2017-09-11 06:24:45 -07003343 case 116:
3344#line 1230 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003345 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003346 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0);
3347 (yyval.a_wchunk)->type = WC_WHITESPACE;
Lev Walkin418298d2006-07-13 08:24:20 +00003348 }
3349 break;
3350
Lev Walkin59165cf2017-09-11 06:24:45 -07003351 case 117:
3352#line 1234 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003353 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003354 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003355 }
3356 break;
3357
Lev Walkin59165cf2017-09-11 06:24:45 -07003358 case 118:
3359#line 1237 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003360 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003361 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0);
3362 (yyval.a_wchunk)->type = WC_FIELD;
Lev Walkin418298d2006-07-13 08:24:20 +00003363 }
3364 break;
3365
Lev Walkin59165cf2017-09-11 06:24:45 -07003366 case 119:
3367#line 1241 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003368 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003369 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt));
Lev Walkin866bd7f2006-09-14 10:35:20 +00003370 }
3371 break;
3372
Lev Walkin59165cf2017-09-11 06:24:45 -07003373 case 120:
3374#line 1247 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003375 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003376 (yyval.a_expr) = NEW_EXPR();
3377 checkmem((yyval.a_expr));
3378 (yyval.a_expr)->Identifier = strdup("...");
3379 checkmem((yyval.a_expr)->Identifier);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003380 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3381 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003382 }
3383 break;
3384
Lev Walkin59165cf2017-09-11 06:24:45 -07003385 case 121:
3386#line 1255 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07003387 {
3388 (yyval.a_expr) = NEW_EXPR();
3389 checkmem((yyval.a_expr));
3390 (yyval.a_expr)->Identifier = strdup("...");
3391 checkmem((yyval.a_expr)->Identifier);
3392 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3393 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3394 (yyval.a_expr)->meta_type = AMT_TYPE;
3395 }
3396 break;
3397
Lev Walkin59165cf2017-09-11 06:24:45 -07003398 case 122:
3399#line 1264 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003400 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003401 (yyval.a_expr) = NEW_EXPR();
3402 checkmem((yyval.a_expr));
3403 (yyval.a_expr)->Identifier = strdup("...");
3404 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3405 checkmem((yyval.a_expr)->Identifier);
3406 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3407 (yyval.a_expr)->meta_type = AMT_TYPE;
3408 }
3409 break;
3410
Lev Walkin752e9732017-08-04 02:06:22 -07003411 case 124:
Lev Walkin59165cf2017-09-11 06:24:45 -07003412#line 1278 "asn1p_y.y"
3413 {
3414 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3415 (yyval.a_expr)->tag = (yyvsp[(1) - (2)].a_tag);
3416 }
3417 break;
3418
3419 case 125:
3420#line 1285 "asn1p_y.y"
3421 {
3422 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3423 /*
3424 * Outer constraint for SEQUENCE OF and SET OF applies
3425 * to the inner type.
3426 */
3427 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3428 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3429 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3430 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(2) - (2)].a_constr);
3431 } else {
3432 if((yyval.a_expr)->constraints) {
3433 assert(!(yyvsp[(2) - (2)].a_constr));
3434 /* Check this : optManyConstraints is not used ?! */
3435 asn1p_constraint_free((yyvsp[(2) - (2)].a_constr));
3436 } else {
3437 (yyval.a_expr)->constraints = (yyvsp[(2) - (2)].a_constr);
3438 }
3439 }
3440 }
3441 break;
3442
3443 case 126:
3444#line 1308 "asn1p_y.y"
3445 {
3446 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3447 /*
3448 * Outer constraint for SEQUENCE OF and SET OF applies
3449 * to the inner type.
3450 */
3451 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3452 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3453 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3454 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(2) - (2)].a_constr);
3455 } else {
3456 if((yyval.a_expr)->constraints) {
3457 assert(!(yyvsp[(2) - (2)].a_constr));
3458 /* Check this : optManyConstraints is not used ?! */
3459 asn1p_constraint_free((yyvsp[(2) - (2)].a_constr));
3460 } else {
3461 (yyval.a_expr)->constraints = (yyvsp[(2) - (2)].a_constr);
3462 }
3463 }
3464 }
3465 break;
3466
3467 case 127:
3468#line 1331 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003469 {
3470 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3471 (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag);
Lev Walkin070a52d2004-08-22 03:19:54 +00003472 /*
3473 * Outer constraint for SEQUENCE OF and SET OF applies
3474 * to the inner type.
3475 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07003476 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3477 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3478 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3479 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003480 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003481 if((yyval.a_expr)->constraints) {
3482 assert(!(yyvsp[(2) - (3)].a_expr));
Lev Walkin0c686452017-09-07 22:59:36 -07003483 /* Check this : optManyConstraints is not used ?! */
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003484 asn1p_constraint_free((yyvsp[(3) - (3)].a_constr));
Lev Walkin070a52d2004-08-22 03:19:54 +00003485 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003486 (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003487 }
3488 }
Lev Walkin418298d2006-07-13 08:24:20 +00003489 }
3490 break;
3491
Lev Walkin59165cf2017-09-11 06:24:45 -07003492 case 128:
3493#line 1355 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003494 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003495 (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0;
Lev Walkinfb872bd2006-03-18 06:53:11 +00003496 asn1p_as_pointer = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00003497 }
3498 break;
3499
Lev Walkin59165cf2017-09-11 06:24:45 -07003500 case 129:
3501#line 1362 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003502 {
Lev Walkin59165cf2017-09-11 06:24:45 -07003503 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003504 (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int);
Lev Walkinfb872bd2006-03-18 06:53:11 +00003505
Lev Walkin0e90aa02013-03-19 16:17:13 -07003506 if(((yyval.a_expr)->marker.flags & EM_INDIRECT)
3507 && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) {
Lev Walkinef625402005-09-05 05:17:57 +00003508 fprintf(stderr,
3509 "INFO: Directive <ASN1C:RepresentAsPointer> "
Lev Walkind523ea42017-09-06 22:15:08 -07003510 "applied to %s at %s:%d\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003511 ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
3512 ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
Lev Walkinef625402005-09-05 05:17:57 +00003513 : "member",
Lev Walkind523ea42017-09-06 22:15:08 -07003514 ASN_FILENAME, (yyval.a_expr)->_lineno
Lev Walkinef625402005-09-05 05:17:57 +00003515 );
3516 }
Lev Walkin59165cf2017-09-11 06:24:45 -07003517 }
Lev Walkin418298d2006-07-13 08:24:20 +00003518 break;
3519
Lev Walkin59165cf2017-09-11 06:24:45 -07003520 case 133:
3521#line 1386 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003522 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003523 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3524 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3525 (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE;
3526 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003527 }
3528 break;
3529
Lev Walkin59165cf2017-09-11 06:24:45 -07003530 case 134:
3531#line 1392 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003532 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003533 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3534 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3535 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE;
3536 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003537 }
3538 break;
3539
Lev Walkin59165cf2017-09-11 06:24:45 -07003540 case 135:
3541#line 1398 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003542 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003543 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3544 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3545 (yyval.a_expr)->expr_type = ASN_CONSTR_SET;
3546 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003547 }
3548 break;
3549
Lev Walkin59165cf2017-09-11 06:24:45 -07003550 case 136:
3551#line 1404 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003552 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003553 (yyval.a_expr) = NEW_EXPR();
3554 checkmem((yyval.a_expr));
3555 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3556 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF;
3557 (yyval.a_expr)->meta_type = AMT_TYPE;
3558 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3559 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3560 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003561 }
3562 break;
3563
Lev Walkin59165cf2017-09-11 06:24:45 -07003564 case 137:
3565#line 1414 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003566 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003567 (yyval.a_expr) = NEW_EXPR();
3568 checkmem((yyval.a_expr));
3569 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3570 (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF;
3571 (yyval.a_expr)->meta_type = AMT_TYPE;
3572 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3573 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3574 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003575 }
3576 break;
3577
Lev Walkin59165cf2017-09-11 06:24:45 -07003578 case 138:
3579#line 1424 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003580 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003581 (yyval.a_expr) = NEW_EXPR();
3582 checkmem((yyval.a_expr));
3583 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3584 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003585 }
3586 break;
3587
Lev Walkin59165cf2017-09-11 06:24:45 -07003588 case 139:
3589#line 1430 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003590 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003591 int ret;
3592 (yyval.a_expr) = NEW_EXPR();
3593 checkmem((yyval.a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003594 (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003595 ret = asn1p_ref_add_component((yyval.a_expr)->reference,
3596 (yyvsp[(4) - (4)].tv_str), RLT_lowercase);
3597 checkmem(ret == 0);
3598 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3599 (yyval.a_expr)->meta_type = AMT_TYPE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003600 free((yyvsp[(4) - (4)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003601 }
3602 break;
3603
Lev Walkin59165cf2017-09-11 06:24:45 -07003604 case 140:
3605#line 1442 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003606 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003607 (yyval.a_expr) = NEW_EXPR();
3608 checkmem((yyval.a_expr));
3609 (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref);
3610 (yyval.a_expr)->expr_type = A1TC_INSTANCE;
3611 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003612 }
3613 break;
3614
Lev Walkin59165cf2017-09-11 06:24:45 -07003615 case 141:
3616#line 1457 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003617 {
3618 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003619 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003620 checkmem((yyval.a_ref));
3621 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003622 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003623 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003624 }
3625 break;
3626
Lev Walkin59165cf2017-09-11 06:24:45 -07003627 case 142:
3628#line 1465 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003629 {
Lev Walkin9c974182004-09-15 11:59:51 +00003630 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003631 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003632 checkmem((yyval.a_ref));
3633 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
3634 free((yyvsp[(1) - (1)].tv_str));
3635 checkmem(ret == 0);
3636 }
3637 break;
3638
Lev Walkin59165cf2017-09-11 06:24:45 -07003639 case 143:
3640#line 1473 "asn1p_y.y"
3641 {
3642 int ret;
3643 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
3644 checkmem((yyval.a_ref));
3645 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3646 checkmem(ret == 0);
3647 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
3648 checkmem(ret == 0);
3649 free((yyvsp[(1) - (3)].tv_str));
3650 free((yyvsp[(3) - (3)].tv_str));
3651 }
3652 break;
3653
3654 case 144:
3655#line 1484 "asn1p_y.y"
3656 {
3657 int ret;
3658 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
3659 checkmem((yyval.a_ref));
3660 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3661 checkmem(ret == 0);
3662 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
3663 checkmem(ret == 0);
3664 free((yyvsp[(1) - (3)].tv_str));
3665 free((yyvsp[(3) - (3)].tv_str));
3666 }
3667 break;
3668
3669 case 145:
3670#line 1495 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003671 {
3672 int ret;
3673 (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref);
3674 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS);
3675 free((yyvsp[(1) - (3)].tv_str));
Lev Walkinf15320b2004-06-03 03:38:44 +00003676 checkmem(ret == 0);
3677 /*
3678 * Move the last element infront.
3679 */
3680 {
3681 struct asn1p_ref_component_s tmp_comp;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003682 tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1];
3683 memmove(&(yyval.a_ref)->components[1],
3684 &(yyval.a_ref)->components[0],
3685 sizeof((yyval.a_ref)->components[0])
3686 * ((yyval.a_ref)->comp_count - 1));
3687 (yyval.a_ref)->components[0] = tmp_comp;
Lev Walkinf15320b2004-06-03 03:38:44 +00003688 }
Lev Walkin418298d2006-07-13 08:24:20 +00003689 }
3690 break;
3691
Lev Walkin59165cf2017-09-11 06:24:45 -07003692 case 146:
3693#line 1517 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003694 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003695 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003696 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003697 checkmem((yyval.a_ref));
3698 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type);
3699 free((yyvsp[(1) - (1)].a_refcomp).name);
Lev Walkinf15320b2004-06-03 03:38:44 +00003700 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003701 }
3702 break;
3703
Lev Walkin59165cf2017-09-11 06:24:45 -07003704 case 147:
3705#line 1525 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003706 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003707 int ret;
3708 (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref);
3709 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type);
3710 free((yyvsp[(3) - (3)].a_refcomp).name);
3711 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003712 }
3713 break;
3714
Lev Walkin59165cf2017-09-11 06:24:45 -07003715 case 149:
3716#line 1538 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003717 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003718 (yyval.a_refcomp).lex_type = RLT_AmpUppercase;
3719 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003720 }
3721 break;
3722
Lev Walkin59165cf2017-09-11 06:24:45 -07003723 case 150:
3724#line 1543 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003725 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003726 (yyval.a_refcomp).lex_type = RLT_Amplowercase;
3727 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003728 }
3729 break;
3730
Lev Walkin59165cf2017-09-11 06:24:45 -07003731 case 151:
3732#line 1552 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003733 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003734 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003735 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003736 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003737 }
3738 break;
3739
Lev Walkin59165cf2017-09-11 06:24:45 -07003740 case 152:
3741#line 1557 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003742 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003743 (yyval.a_ref) = (yyval.a_ref);
3744 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003745 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003746 }
3747 break;
3748
Lev Walkin59165cf2017-09-11 06:24:45 -07003749 case 153:
3750#line 1562 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003751 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003752 (yyval.a_ref) = (yyval.a_ref);
3753 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003754 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003755 }
3756 break;
3757
Lev Walkin59165cf2017-09-11 06:24:45 -07003758 case 154:
3759#line 1570 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003760 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003761 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003762 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003763 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003764 }
3765 break;
3766
Lev Walkin59165cf2017-09-11 06:24:45 -07003767 case 155:
3768#line 1593 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003769 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003770 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
3771 assert((yyval.a_expr)->Identifier == NULL);
3772 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3773 (yyval.a_expr)->meta_type = AMT_VALUE;
3774 (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003775 }
3776 break;
3777
Lev Walkin59165cf2017-09-11 06:24:45 -07003778 case 158:
3779#line 1605 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003780 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003781 break;
3782
Lev Walkin59165cf2017-09-11 06:24:45 -07003783 case 159:
3784#line 1605 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003785 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003786 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
3787 checkmem((yyval.a_value));
3788 (yyval.a_value)->type = ATV_UNPARSED;
Lev Walkin418298d2006-07-13 08:24:20 +00003789 }
3790 break;
3791
Lev Walkin59165cf2017-09-11 06:24:45 -07003792 case 160:
3793#line 1613 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003794 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003795 (yyval.a_value) = asn1p_value_fromint(0);
3796 checkmem((yyval.a_value));
3797 (yyval.a_value)->type = ATV_NULL;
Lev Walkin418298d2006-07-13 08:24:20 +00003798 }
3799 break;
3800
Lev Walkin59165cf2017-09-11 06:24:45 -07003801 case 161:
3802#line 1618 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003803 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003804 (yyval.a_value) = asn1p_value_fromint(0);
3805 checkmem((yyval.a_value));
3806 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00003807 }
3808 break;
3809
Lev Walkin59165cf2017-09-11 06:24:45 -07003810 case 162:
3811#line 1623 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003812 {
Lev Walkin59165cf2017-09-11 06:24:45 -07003813 (yyval.a_value) = asn1p_value_fromint(1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003814 checkmem((yyval.a_value));
3815 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00003816 }
3817 break;
3818
Lev Walkin59165cf2017-09-11 06:24:45 -07003819 case 168:
3820#line 1636 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003821 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003822 asn1p_ref_t *ref;
3823 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003824 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003825 checkmem(ref);
3826 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3827 checkmem(ret == 0);
3828 ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3829 checkmem(ret == 0);
3830 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3831 checkmem((yyval.a_value));
3832 free((yyvsp[(1) - (3)].tv_str));
3833 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003834 }
3835 break;
3836
Lev Walkin59165cf2017-09-11 06:24:45 -07003837 case 169:
3838#line 1654 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003839 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003840 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0);
3841 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003842 }
3843 break;
3844
Lev Walkin59165cf2017-09-11 06:24:45 -07003845 case 170:
3846#line 1658 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003847 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003848 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3849 checkmem((yyval.a_value));
3850 (yyval.a_value)->type = ATV_TUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003851 }
3852 break;
3853
Lev Walkin59165cf2017-09-11 06:24:45 -07003854 case 171:
3855#line 1663 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003856 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003857 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3858 checkmem((yyval.a_value));
3859 (yyval.a_value)->type = ATV_QUADRUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003860 }
3861 break;
3862
Lev Walkin59165cf2017-09-11 06:24:45 -07003863 case 172:
3864#line 1671 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003865 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003866 (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1;
Lev Walkinbf979152017-09-07 23:36:11 -07003867 (yyval.tv_opaque).buf = malloc(1 + (yyval.tv_opaque).len + 1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003868 checkmem((yyval.tv_opaque).buf);
3869 (yyval.tv_opaque).buf[0] = '{';
3870 memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len);
3871 (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0';
3872 free((yyvsp[(1) - (1)].tv_opaque).buf);
Lev Walkinbf979152017-09-07 23:36:11 -07003873 }
Lev Walkin418298d2006-07-13 08:24:20 +00003874 break;
3875
Lev Walkin59165cf2017-09-11 06:24:45 -07003876 case 173:
3877#line 1680 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003878 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003879 int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len;
3880 char *p = malloc(newsize + 1);
3881 checkmem(p);
3882 memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len);
3883 memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len);
3884 p[newsize] = '\0';
3885 free((yyvsp[(1) - (2)].tv_opaque).buf);
3886 free((yyvsp[(2) - (2)].tv_opaque).buf);
3887 (yyval.tv_opaque).buf = p;
3888 (yyval.tv_opaque).len = newsize;
Lev Walkin418298d2006-07-13 08:24:20 +00003889 }
3890 break;
3891
Lev Walkin59165cf2017-09-11 06:24:45 -07003892 case 175:
3893#line 1696 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003894 {
3895 (yyval.tv_opaque).len = strlen((yyvsp[(1) - (1)].tv_str));
3896 (yyval.tv_opaque).buf = (yyvsp[(1) - (1)].tv_str);
3897 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003898 break;
3899
Lev Walkin59165cf2017-09-11 06:24:45 -07003900 case 176:
3901#line 1702 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003902 { (yyval.a_type) = ASN_BASIC_BOOLEAN; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003903 break;
3904
Lev Walkin59165cf2017-09-11 06:24:45 -07003905 case 177:
3906#line 1703 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003907 { (yyval.a_type) = ASN_BASIC_NULL; }
Lev Walkind523ea42017-09-06 22:15:08 -07003908 break;
3909
Lev Walkin59165cf2017-09-11 06:24:45 -07003910 case 178:
3911#line 1704 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003912 { (yyval.a_type) = ASN_BASIC_REAL; }
Lev Walkind523ea42017-09-06 22:15:08 -07003913 break;
3914
Lev Walkin59165cf2017-09-11 06:24:45 -07003915 case 179:
3916#line 1705 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003917 { (yyval.a_type) = ASN_BASIC_OCTET_STRING; }
Lev Walkind523ea42017-09-06 22:15:08 -07003918 break;
3919
Lev Walkin59165cf2017-09-11 06:24:45 -07003920 case 180:
3921#line 1706 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003922 { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; }
Lev Walkind523ea42017-09-06 22:15:08 -07003923 break;
3924
Lev Walkin59165cf2017-09-11 06:24:45 -07003925 case 181:
3926#line 1707 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003927 { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; }
Lev Walkind523ea42017-09-06 22:15:08 -07003928 break;
3929
Lev Walkin59165cf2017-09-11 06:24:45 -07003930 case 182:
3931#line 1708 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003932 { (yyval.a_type) = ASN_BASIC_EXTERNAL; }
Lev Walkind523ea42017-09-06 22:15:08 -07003933 break;
3934
Lev Walkin59165cf2017-09-11 06:24:45 -07003935 case 183:
3936#line 1709 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003937 { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; }
Lev Walkind523ea42017-09-06 22:15:08 -07003938 break;
3939
Lev Walkin59165cf2017-09-11 06:24:45 -07003940 case 184:
3941#line 1710 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003942 { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; }
3943 break;
3944
Lev Walkin59165cf2017-09-11 06:24:45 -07003945 case 185:
3946#line 1711 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003947 { (yyval.a_type) = ASN_BASIC_UTCTime; }
3948 break;
3949
Lev Walkin59165cf2017-09-11 06:24:45 -07003950 case 186:
3951#line 1712 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07003952 { (yyval.a_type) = ASN_BASIC_GeneralizedTime; }
3953 break;
3954
Lev Walkin59165cf2017-09-11 06:24:45 -07003955 case 189:
3956#line 1721 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003957 { (yyval.a_type) = ASN_BASIC_INTEGER; }
Lev Walkin752e9732017-08-04 02:06:22 -07003958 break;
3959
Lev Walkin59165cf2017-09-11 06:24:45 -07003960 case 190:
3961#line 1722 "asn1p_y.y"
Lev Walkina25584b2017-10-01 13:43:17 -07003962 { (yyval.a_type) = ASN_BASIC_ENUMERATED; }
Lev Walkinbf979152017-09-07 23:36:11 -07003963 break;
3964
Lev Walkin59165cf2017-09-11 06:24:45 -07003965 case 191:
3966#line 1723 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07003967 { (yyval.a_type) = ASN_BASIC_BIT_STRING; }
3968 break;
3969
Lev Walkin59165cf2017-09-11 06:24:45 -07003970 case 192:
3971#line 1727 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003972 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003973 (yyval.a_expr) = NEW_EXPR();
3974 checkmem((yyval.a_expr));
3975 (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type);
3976 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003977 }
3978 break;
3979
Lev Walkin59165cf2017-09-11 06:24:45 -07003980 case 193:
3981#line 1733 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003982 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07003983 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3984 (yyval.a_expr)->expr_type = ASN_BASIC_INTEGER;
3985 (yyval.a_expr)->meta_type = AMT_TYPE;
3986 }
Lev Walkin418298d2006-07-13 08:24:20 +00003987 break;
3988
Lev Walkin59165cf2017-09-11 06:24:45 -07003989 case 194:
3990#line 1738 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07003991 {
3992 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3993 (yyval.a_expr)->expr_type = ASN_BASIC_ENUMERATED;
3994 (yyval.a_expr)->meta_type = AMT_TYPE;
3995 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07003996 break;
3997
Lev Walkin59165cf2017-09-11 06:24:45 -07003998 case 195:
3999#line 1743 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004000 {
4001 (yyval.a_expr) = (yyvsp[(4) - (5)].a_expr);
4002 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4003 (yyval.a_expr)->meta_type = AMT_TYPE;
4004 }
4005 break;
4006
Lev Walkin59165cf2017-09-11 06:24:45 -07004007 case 196:
4008#line 1748 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004009 {
4010 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
4011 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4012 (yyval.a_expr)->meta_type = AMT_TYPE;
4013 }
4014 break;
4015
Lev Walkin59165cf2017-09-11 06:24:45 -07004016 case 197:
4017#line 1753 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004018 {
4019 (yyval.a_expr) = NEW_EXPR();
4020 checkmem((yyval.a_expr));
4021 (yyval.a_expr)->expr_type = ASN_BASIC_BIT_STRING;
4022 (yyval.a_expr)->meta_type = AMT_TYPE;
4023 }
4024 break;
4025
Lev Walkin59165cf2017-09-11 06:24:45 -07004026 case 198:
4027#line 1762 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004028 { (yyval.a_type) = ASN_STRING_BMPString; }
4029 break;
4030
Lev Walkin59165cf2017-09-11 06:24:45 -07004031 case 199:
4032#line 1763 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004033 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004034 (yyval.a_type) = ASN_STRING_GeneralString;
Lev Walkin9c974182004-09-15 11:59:51 +00004035 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004036 }
4037 break;
4038
Lev Walkin59165cf2017-09-11 06:24:45 -07004039 case 200:
4040#line 1767 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004041 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004042 (yyval.a_type) = ASN_STRING_GraphicString;
Lev Walkin9c974182004-09-15 11:59:51 +00004043 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004044 }
4045 break;
4046
Lev Walkin59165cf2017-09-11 06:24:45 -07004047 case 201:
4048#line 1771 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004049 { (yyval.a_type) = ASN_STRING_IA5String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004050 break;
4051
Lev Walkin59165cf2017-09-11 06:24:45 -07004052 case 202:
4053#line 1772 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004054 { (yyval.a_type) = ASN_STRING_ISO646String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004055 break;
4056
Lev Walkin59165cf2017-09-11 06:24:45 -07004057 case 203:
4058#line 1773 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004059 { (yyval.a_type) = ASN_STRING_NumericString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004060 break;
4061
Lev Walkin59165cf2017-09-11 06:24:45 -07004062 case 204:
4063#line 1774 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004064 { (yyval.a_type) = ASN_STRING_PrintableString; }
4065 break;
4066
Lev Walkin59165cf2017-09-11 06:24:45 -07004067 case 205:
4068#line 1775 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004069 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004070 (yyval.a_type) = ASN_STRING_T61String;
Lev Walkin9c974182004-09-15 11:59:51 +00004071 fprintf(stderr, "WARNING: T61String is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004072 }
4073 break;
4074
Lev Walkin59165cf2017-09-11 06:24:45 -07004075 case 206:
4076#line 1779 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004077 { (yyval.a_type) = ASN_STRING_TeletexString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004078 break;
4079
Lev Walkin59165cf2017-09-11 06:24:45 -07004080 case 207:
4081#line 1780 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004082 { (yyval.a_type) = ASN_STRING_UniversalString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004083 break;
4084
Lev Walkin59165cf2017-09-11 06:24:45 -07004085 case 208:
4086#line 1781 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004087 { (yyval.a_type) = ASN_STRING_UTF8String; }
4088 break;
4089
Lev Walkin59165cf2017-09-11 06:24:45 -07004090 case 209:
4091#line 1782 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004092 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004093 (yyval.a_type) = ASN_STRING_VideotexString;
Lev Walkin9c974182004-09-15 11:59:51 +00004094 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004095 }
4096 break;
4097
Lev Walkin59165cf2017-09-11 06:24:45 -07004098 case 210:
4099#line 1786 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004100 { (yyval.a_type) = ASN_STRING_VisibleString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004101 break;
4102
Lev Walkin59165cf2017-09-11 06:24:45 -07004103 case 211:
4104#line 1787 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004105 { (yyval.a_type) = ASN_STRING_ObjectDescriptor; }
Lev Walkin418298d2006-07-13 08:24:20 +00004106 break;
4107
Lev Walkin59165cf2017-09-11 06:24:45 -07004108 case 216:
4109#line 1799 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004110 { (yyval.a_constr) = 0; }
4111 break;
4112
Lev Walkin59165cf2017-09-11 06:24:45 -07004113 case 218:
4114#line 1804 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004115 { (yyval.a_constr) = 0; }
4116 break;
4117
4118 case 220:
Lev Walkin59165cf2017-09-11 06:24:45 -07004119#line 1809 "asn1p_y.y"
4120 { (yyval.a_constr) = 0; }
4121 break;
4122
4123 case 223:
4124#line 1815 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004125 {
Lev Walkin0c686452017-09-07 22:59:36 -07004126 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(2) - (3)].a_constr), 0);
4127 }
4128 break;
4129
Lev Walkin59165cf2017-09-11 06:24:45 -07004130 case 225:
4131#line 1822 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004132 {
4133 if((yyvsp[(2) - (2)].a_constr)->type == ACT_CA_SET && (yyvsp[(2) - (2)].a_constr)->el_count == 1) {
4134 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr)->elements[0]);
4135 } else {
4136 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (2)].a_constr), (yyvsp[(2) - (2)].a_constr));
4137 }
Lev Walkin418298d2006-07-13 08:24:20 +00004138 }
4139 break;
4140
Lev Walkin59165cf2017-09-11 06:24:45 -07004141 case 229:
4142#line 1836 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004143 {
4144 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4145 (yyval.a_constr)->type = ACT_EL_EXT;
4146 }
4147 break;
4148
Lev Walkin59165cf2017-09-11 06:24:45 -07004149 case 231:
4150#line 1841 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004151 {
Lev Walkin0c686452017-09-07 22:59:36 -07004152 asn1p_constraint_t *ct;
4153 ct = asn1p_constraint_new(yylineno, currentModule);
4154 ct->type = ACT_EL_EXT;
4155 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
4156 }
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004157 break;
4158
Lev Walkin59165cf2017-09-11 06:24:45 -07004159 case 232:
4160#line 1847 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004161 {
4162 asn1p_constraint_t *ct;
4163 ct = asn1p_constraint_new(yylineno, currentModule);
4164 ct->type = ACT_EL_EXT;
4165 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct);
4166 ct = (yyval.a_constr);
4167 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr));
4168 }
4169 break;
4170
Lev Walkin59165cf2017-09-11 06:24:45 -07004171 case 234:
4172#line 1859 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004173 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004174 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004175 }
4176 break;
4177
Lev Walkin59165cf2017-09-11 06:24:45 -07004178 case 236:
4179#line 1866 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004180 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004181 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 +00004182 }
4183 break;
4184
Lev Walkin59165cf2017-09-11 06:24:45 -07004185 case 238:
4186#line 1873 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004187 {
Lev Walkinbf979152017-09-07 23:36:11 -07004188 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 +00004189 }
4190 break;
4191
Lev Walkin59165cf2017-09-11 06:24:45 -07004192 case 240:
4193#line 1881 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004194 {
4195 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr));
4196 }
4197 break;
4198
Lev Walkin59165cf2017-09-11 06:24:45 -07004199 case 242:
4200#line 1888 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004201 {
Lev Walkin0c686452017-09-07 22:59:36 -07004202 int ret;
4203 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4204 checkmem((yyval.a_constr));
4205 (yyval.a_constr)->type = ACT_CA_SET;
4206 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4207 checkmem(ret == 0);
4208 }
Lev Walkin418298d2006-07-13 08:24:20 +00004209 break;
4210
Lev Walkin59165cf2017-09-11 06:24:45 -07004211 case 243:
4212#line 1899 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004213 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004214 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004215 checkmem((yyval.a_constr));
4216 (yyval.a_constr)->type = ACT_EL_VALUE;
4217 (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004218 }
4219 break;
4220
Lev Walkin59165cf2017-09-11 06:24:45 -07004221 case 244:
4222#line 1905 "asn1p_y.y"
Lev Walkinf1727152006-09-21 01:50:37 +00004223 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004224 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004225 checkmem((yyval.a_constr));
4226 (yyval.a_constr)->type = ACT_EL_TYPE;
4227 (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value);
Lev Walkinf1727152006-09-21 01:50:37 +00004228 }
4229 break;
4230
Lev Walkin59165cf2017-09-11 06:24:45 -07004231 case 250:
4232#line 1921 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004233 {
4234 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_FROM, (yyvsp[(2) - (2)].a_constr), 0);
4235 }
4236 break;
4237
Lev Walkin59165cf2017-09-11 06:24:45 -07004238 case 251:
4239#line 1926 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004240 {
4241 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(2) - (2)].a_constr), 0);
4242 }
4243 break;
4244
Lev Walkin59165cf2017-09-11 06:24:45 -07004245 case 252:
4246#line 1931 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004247 {
4248 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004249 (yyval.a_constr)->type = ACT_CT_PATTERN;
4250 (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 +00004251 }
4252 break;
4253
Lev Walkin59165cf2017-09-11 06:24:45 -07004254 case 253:
4255#line 1936 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004256 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004257 asn1p_ref_t *ref;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004258 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004259 (yyval.a_constr)->type = ACT_CT_PATTERN;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004260 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004261 asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase);
4262 (yyval.a_constr)->value = asn1p_value_fromref(ref, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004263 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin5c541f12006-10-18 18:40:14 +00004264 }
4265 break;
4266
Lev Walkin59165cf2017-09-11 06:24:45 -07004267 case 254:
4268#line 1948 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004269 {
Lev Walkin0c686452017-09-07 22:59:36 -07004270 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4271 checkmem((yyval.a_constr));
4272 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4273 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
4274 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
4275 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004276 break;
4277
Lev Walkin59165cf2017-09-11 06:24:45 -07004278 case 256:
4279#line 1958 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004280 {
Lev Walkin0c686452017-09-07 22:59:36 -07004281 (yyval.a_value) = asn1p_value_fromint(-123);
4282 (yyval.a_value)->type = ATV_MIN;
4283 }
Lev Walkin418298d2006-07-13 08:24:20 +00004284 break;
4285
Lev Walkin59165cf2017-09-11 06:24:45 -07004286 case 258:
4287#line 1965 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004288 {
4289 (yyval.a_value) = asn1p_value_fromint(321);
4290 (yyval.a_value)->type = ATV_MAX;
4291 }
4292 break;
4293
Lev Walkin59165cf2017-09-11 06:24:45 -07004294 case 260:
4295#line 1973 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004296 {
4297 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
4298 checkmem((yyval.a_value));
Lev Walkin0e90aa02013-03-19 16:17:13 -07004299 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004300 }
4301 break;
4302
Lev Walkin59165cf2017-09-11 06:24:45 -07004303 case 261:
4304#line 1978 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004305 {
4306 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
4307 checkmem((yyval.a_value));
4308 free((yyvsp[(1) - (1)].tv_str));
4309 }
4310 break;
4311
Lev Walkin59165cf2017-09-11 06:24:45 -07004312 case 262:
4313#line 1986 "asn1p_y.y"
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004314 {
Lev Walkin0c686452017-09-07 22:59:36 -07004315 (yyval.a_value) = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004316 checkmem((yyval.a_value));
Lev Walkined409e22017-09-26 18:07:40 -07004317 asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
Lev Walkind523ea42017-09-06 22:15:08 -07004318 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004319 break;
4320
Lev Walkin59165cf2017-09-11 06:24:45 -07004321 case 263:
Lev Walkina25584b2017-10-01 13:43:17 -07004322#line 1992 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004323 {
4324 (yyval.a_value) = asn1p_value_fromtype((yyvsp[(1) - (1)].a_expr));
4325 checkmem((yyval.a_value));
Lev Walkined409e22017-09-26 18:07:40 -07004326 asn1p_expr_free((yyvsp[(1) - (1)].a_expr));
Lev Walkin59165cf2017-09-11 06:24:45 -07004327 }
Lev Walkin0c686452017-09-07 22:59:36 -07004328 break;
4329
Lev Walkin59165cf2017-09-11 06:24:45 -07004330 case 264:
Lev Walkina25584b2017-10-01 13:43:17 -07004331#line 2004 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004332 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004333 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004334 }
4335 break;
4336
Lev Walkin59165cf2017-09-11 06:24:45 -07004337 case 265:
Lev Walkina25584b2017-10-01 13:43:17 -07004338#line 2007 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004339 {
Lev Walkind523ea42017-09-06 22:15:08 -07004340 assert((yyvsp[(3) - (3)].a_constr)->type == ACT_CA_CSV);
4341 (yyvsp[(3) - (3)].a_constr)->type = ACT_CT_WCOMPS;
4342 (yyval.a_constr) = (yyvsp[(3) - (3)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004343 }
4344 break;
4345
Lev Walkin59165cf2017-09-11 06:24:45 -07004346 case 269:
Lev Walkina25584b2017-10-01 13:43:17 -07004347#line 2015 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004348 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004349 break;
4350
Lev Walkin59165cf2017-09-11 06:24:45 -07004351 case 270:
Lev Walkina25584b2017-10-01 13:43:17 -07004352#line 2017 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004353 {
4354 assert((yyvsp[(4) - (5)].a_constr)->type == ACT_CA_CSV);
4355 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4356 (yyval.a_constr)->type = ACT_CA_CSV;
4357 asn1p_constraint_t *ct = asn1p_constraint_new(yylineno, currentModule);
4358 checkmem((yyval.a_constr));
4359 ct->type = ACT_EL_EXT;
4360 asn1p_constraint_insert((yyval.a_constr), ct);
4361 for(unsigned i = 0; i < (yyvsp[(4) - (5)].a_constr)->el_count; i++) {
4362 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(4) - (5)].a_constr)->elements[i]);
4363 }
4364 }
4365 break;
4366
Lev Walkin59165cf2017-09-11 06:24:45 -07004367 case 271:
Lev Walkina25584b2017-10-01 13:43:17 -07004368#line 2030 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004369 {
4370 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4371 (yyval.a_constr)->type = ACT_CA_CSV;
4372 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(1) - (1)].a_constr));
4373 }
4374 break;
4375
Lev Walkin59165cf2017-09-11 06:24:45 -07004376 case 272:
Lev Walkina25584b2017-10-01 13:43:17 -07004377#line 2035 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004378 {
4379 (yyval.a_constr) = (yyvsp[(1) - (3)].a_constr);
4380 asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (3)].a_constr));
4381 }
4382 break;
4383
Lev Walkin59165cf2017-09-11 06:24:45 -07004384 case 273:
Lev Walkina25584b2017-10-01 13:43:17 -07004385#line 2041 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004386 {
4387 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4388 checkmem((yyval.a_constr));
4389 (yyval.a_constr)->type = ACT_EL_VALUE;
4390 (yyval.a_constr)->value = (yyvsp[(1) - (3)].a_value);
4391 if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4392 (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres);
4393 }
4394 break;
4395
Lev Walkin59165cf2017-09-11 06:24:45 -07004396 case 274:
Lev Walkina25584b2017-10-01 13:43:17 -07004397#line 2055 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004398 { (yyval.a_pres) = ACPRES_DEFAULT; }
4399 break;
4400
Lev Walkin59165cf2017-09-11 06:24:45 -07004401 case 275:
Lev Walkina25584b2017-10-01 13:43:17 -07004402#line 2056 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004403 { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); }
4404 break;
4405
Lev Walkin59165cf2017-09-11 06:24:45 -07004406 case 276:
Lev Walkina25584b2017-10-01 13:43:17 -07004407#line 2060 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004408 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004409 (yyval.a_pres) = ACPRES_PRESENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004410 }
4411 break;
4412
Lev Walkin59165cf2017-09-11 06:24:45 -07004413 case 277:
Lev Walkina25584b2017-10-01 13:43:17 -07004414#line 2063 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004415 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004416 (yyval.a_pres) = ACPRES_ABSENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004417 }
4418 break;
4419
Lev Walkin59165cf2017-09-11 06:24:45 -07004420 case 278:
Lev Walkina25584b2017-10-01 13:43:17 -07004421#line 2066 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004422 {
4423 (yyval.a_pres) = ACPRES_OPTIONAL;
4424 }
Lev Walkina9532f42006-09-17 04:52:50 +00004425 break;
4426
Lev Walkin59165cf2017-09-11 06:24:45 -07004427 case 282:
Lev Walkina25584b2017-10-01 13:43:17 -07004428#line 2081 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004429 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00004430 break;
4431
Lev Walkin59165cf2017-09-11 06:24:45 -07004432 case 283:
Lev Walkina25584b2017-10-01 13:43:17 -07004433#line 2081 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004434 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004435 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004436 checkmem((yyval.a_constr));
4437 (yyval.a_constr)->type = ACT_CT_CTDBY;
4438 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0);
4439 checkmem((yyval.a_constr)->value);
4440 (yyval.a_constr)->value->type = ATV_UNPARSED;
Lev Walkina9532f42006-09-17 04:52:50 +00004441 }
4442 break;
4443
Lev Walkin59165cf2017-09-11 06:24:45 -07004444 case 284:
Lev Walkina25584b2017-10-01 13:43:17 -07004445#line 2092 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +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 (yyval.a_constr)->type = ACT_CT_CTNG;
4449 (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08004450 asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
Lev Walkin4a4543f2006-10-13 12:37:39 +00004451 }
4452 break;
4453
Lev Walkin59165cf2017-09-11 06:24:45 -07004454 case 285:
Lev Walkina25584b2017-10-01 13:43:17 -07004455#line 2101 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004456 { (yyval.a_ctype) = ACT_EL_RANGE; }
4457 break;
4458
Lev Walkin59165cf2017-09-11 06:24:45 -07004459 case 286:
Lev Walkina25584b2017-10-01 13:43:17 -07004460#line 2102 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004461 { (yyval.a_ctype) = ACT_EL_RLRANGE; }
4462 break;
4463
Lev Walkin59165cf2017-09-11 06:24:45 -07004464 case 287:
Lev Walkina25584b2017-10-01 13:43:17 -07004465#line 2103 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004466 { (yyval.a_ctype) = ACT_EL_LLRANGE; }
4467 break;
4468
Lev Walkin59165cf2017-09-11 06:24:45 -07004469 case 288:
Lev Walkina25584b2017-10-01 13:43:17 -07004470#line 2104 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004471 { (yyval.a_ctype) = ACT_EL_ULRANGE; }
4472 break;
4473
Lev Walkin59165cf2017-09-11 06:24:45 -07004474 case 289:
Lev Walkina25584b2017-10-01 13:43:17 -07004475#line 2107 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004476 {
4477 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4478 }
4479 break;
4480
Lev Walkin59165cf2017-09-11 06:24:45 -07004481 case 290:
Lev Walkina25584b2017-10-01 13:43:17 -07004482#line 2110 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004483 {
4484 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4485 }
4486 break;
4487
Lev Walkin59165cf2017-09-11 06:24:45 -07004488 case 291:
Lev Walkina25584b2017-10-01 13:43:17 -07004489#line 2119 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004490 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004491 asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004492 asn1p_constraint_t *ct;
4493 int ret;
4494 ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0);
4495 checkmem(ret == 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004496 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004497 checkmem((yyval.a_constr));
4498 ct->type = ACT_EL_VALUE;
4499 ct->value = asn1p_value_fromref(ref, 0);
4500 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004501 free((yyvsp[(2) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004502 }
4503 break;
4504
Lev Walkin59165cf2017-09-11 06:24:45 -07004505 case 292:
Lev Walkina25584b2017-10-01 13:43:17 -07004506#line 2135 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004507 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004508 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 +00004509 }
4510 break;
4511
Lev Walkin59165cf2017-09-11 06:24:45 -07004512 case 293:
Lev Walkina25584b2017-10-01 13:43:17 -07004513#line 2141 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004514 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004515 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004516 checkmem((yyval.a_constr));
4517 (yyval.a_constr)->type = ACT_EL_VALUE;
4518 (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4519 }
4520 break;
4521
Lev Walkin59165cf2017-09-11 06:24:45 -07004522 case 294:
Lev Walkina25584b2017-10-01 13:43:17 -07004523#line 2147 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004524 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004525 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004526 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00004527 checkmem(ct);
4528 ct->type = ACT_EL_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004529 ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0);
4530 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004531 }
4532 break;
4533
Lev Walkin59165cf2017-09-11 06:24:45 -07004534 case 295:
Lev Walkina25584b2017-10-01 13:43:17 -07004535#line 2161 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004536 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004537 char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2);
Lev Walkinf15320b2004-06-03 03:38:44 +00004538 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004539 *p = '@';
4540 strcpy(p + 1, (yyvsp[(2) - (2)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004541 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004542 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
Lev Walkinf15320b2004-06-03 03:38:44 +00004543 checkmem(ret == 0);
4544 free(p);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004545 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004546 }
4547 break;
4548
Lev Walkin59165cf2017-09-11 06:24:45 -07004549 case 296:
Lev Walkina25584b2017-10-01 13:43:17 -07004550#line 2172 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004551 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004552 char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3);
4553 int ret;
4554 p[0] = '@';
4555 p[1] = '.';
4556 strcpy(p + 2, (yyvsp[(3) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004557 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004558 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
4559 checkmem(ret == 0);
4560 free(p);
4561 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004562 }
4563 break;
4564
Lev Walkin59165cf2017-09-11 06:24:45 -07004565 case 297:
Lev Walkina25584b2017-10-01 13:43:17 -07004566#line 2188 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004567 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004568 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00004569 }
4570 break;
4571
Lev Walkin59165cf2017-09-11 06:24:45 -07004572 case 298:
Lev Walkina25584b2017-10-01 13:43:17 -07004573#line 2191 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004574 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004575 int l1 = strlen((yyvsp[(1) - (3)].tv_str));
4576 int l3 = strlen((yyvsp[(3) - (3)].tv_str));
4577 (yyval.tv_str) = malloc(l1 + 1 + l3 + 1);
4578 memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1);
4579 (yyval.tv_str)[l1] = '.';
4580 memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3);
4581 (yyval.tv_str)[l1 + 1 + l3] = '\0';
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004582 free((yyvsp[(1) - (3)].tv_str));
4583 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004584 }
4585 break;
4586
Lev Walkin59165cf2017-09-11 06:24:45 -07004587 case 299:
Lev Walkina25584b2017-10-01 13:43:17 -07004588#line 2211 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004589 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004590 (yyval.a_marker).flags = EM_NOMARK;
4591 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004592 }
4593 break;
4594
Lev Walkin59165cf2017-09-11 06:24:45 -07004595 case 300:
Lev Walkina25584b2017-10-01 13:43:17 -07004596#line 2215 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004597 { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); }
4598 break;
4599
Lev Walkin59165cf2017-09-11 06:24:45 -07004600 case 301:
Lev Walkina25584b2017-10-01 13:43:17 -07004601#line 2219 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004602 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004603 (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT;
4604 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004605 }
4606 break;
4607
Lev Walkin59165cf2017-09-11 06:24:45 -07004608 case 302:
Lev Walkina25584b2017-10-01 13:43:17 -07004609#line 2223 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004610 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004611 (yyval.a_marker).flags = EM_DEFAULT;
4612 (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004613 }
4614 break;
4615
Lev Walkin59165cf2017-09-11 06:24:45 -07004616 case 303:
Lev Walkina25584b2017-10-01 13:43:17 -07004617#line 2230 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004618 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004619 (yyval.a_expr) = NEW_EXPR();
4620 checkmem((yyval.a_expr));
Lev Walkinbe518fa2017-09-07 02:05:28 -07004621 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4622 }
Lev Walkin418298d2006-07-13 08:24:20 +00004623 break;
4624
Lev Walkin59165cf2017-09-11 06:24:45 -07004625 case 304:
Lev Walkina25584b2017-10-01 13:43:17 -07004626#line 2235 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004627 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07004628 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4629 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4630 }
Lev Walkin418298d2006-07-13 08:24:20 +00004631 break;
4632
Lev Walkin59165cf2017-09-11 06:24:45 -07004633 case 305:
Lev Walkina25584b2017-10-01 13:43:17 -07004634#line 2241 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004635 {
4636 (yyval.a_expr) = NEW_EXPR();
4637 checkmem((yyval.a_expr));
4638 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4639 (yyval.a_expr)->meta_type = AMT_VALUE;
4640 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
4641 }
4642 break;
4643
Lev Walkin59165cf2017-09-11 06:24:45 -07004644 case 306:
Lev Walkina25584b2017-10-01 13:43:17 -07004645#line 2250 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004646 {
Lev Walkin0c686452017-09-07 22:59:36 -07004647 (yyval.a_expr) = NEW_EXPR();
4648 checkmem((yyval.a_expr));
4649 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4650 }
4651 break;
4652
Lev Walkin59165cf2017-09-11 06:24:45 -07004653 case 307:
Lev Walkina25584b2017-10-01 13:43:17 -07004654#line 2255 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004655 {
Lev Walkinbe518fa2017-09-07 02:05:28 -07004656 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4657 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4658 }
4659 break;
4660
Lev Walkin59165cf2017-09-11 06:24:45 -07004661 case 308:
Lev Walkina25584b2017-10-01 13:43:17 -07004662#line 2262 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004663 {
4664 (yyval.a_expr) = NEW_EXPR();
4665 checkmem((yyval.a_expr));
4666 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4667 (yyval.a_expr)->meta_type = AMT_VALUE;
4668 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4669 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4670 }
4671 break;
4672
4673 case 309:
Lev Walkina25584b2017-10-01 13:43:17 -07004674#line 2270 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004675 {
4676 (yyval.a_expr) = NEW_EXPR();
4677 checkmem((yyval.a_expr));
4678 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4679 (yyval.a_expr)->meta_type = AMT_VALUE;
4680 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4681 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4682 }
4683 break;
4684
4685 case 310:
Lev Walkina25584b2017-10-01 13:43:17 -07004686#line 2280 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004687 {
4688 (yyval.a_expr) = NEW_EXPR();
4689 checkmem((yyval.a_expr));
4690 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4691 }
4692 break;
4693
4694 case 311:
Lev Walkina25584b2017-10-01 13:43:17 -07004695#line 2285 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004696 {
4697 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4698 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4699 }
4700 break;
4701
4702 case 312:
Lev Walkina25584b2017-10-01 13:43:17 -07004703#line 2292 "asn1p_y.y"
Lev Walkin59165cf2017-09-11 06:24:45 -07004704 {
4705 (yyval.a_expr) = NEW_EXPR();
4706 checkmem((yyval.a_expr));
4707 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4708 (yyval.a_expr)->meta_type = AMT_VALUE;
4709 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4710 (yyval.a_expr)->value = asn1p_value_fromint((yyvsp[(3) - (4)].a_int));
4711 }
4712 break;
4713
Lev Walkinbf979152017-09-07 23:36:11 -07004714 case 313:
Lev Walkina25584b2017-10-01 13:43:17 -07004715#line 2300 "asn1p_y.y"
Lev Walkin0c686452017-09-07 22:59:36 -07004716 {
4717 (yyval.a_expr) = NEW_EXPR();
4718 checkmem((yyval.a_expr));
4719 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4720 (yyval.a_expr)->meta_type = AMT_VALUE;
4721 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4722 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4723 }
4724 break;
4725
Lev Walkin0c686452017-09-07 22:59:36 -07004726 case 314:
Lev Walkina25584b2017-10-01 13:43:17 -07004727#line 2310 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004728 {
4729 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
4730 asn1p_expr_t *first_memb = TQ_FIRST(&((yyval.a_expr)->members));
4731 if(first_memb) {
4732 if(first_memb->expr_type == A1TC_EXTENSIBLE) {
4733 return yyerror(
4734 "The ENUMERATION cannot start with extension (...).");
4735 }
4736 } else {
4737 return yyerror(
4738 "The ENUMERATION list cannot be empty.");
4739 }
4740 }
4741 break;
4742
Lev Walkin59165cf2017-09-11 06:24:45 -07004743 case 315:
Lev Walkina25584b2017-10-01 13:43:17 -07004744#line 2325 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004745 {
4746 (yyval.a_expr) = NEW_EXPR();
4747 checkmem((yyval.a_expr));
4748 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
4749 }
4750 break;
4751
Lev Walkin59165cf2017-09-11 06:24:45 -07004752 case 316:
Lev Walkina25584b2017-10-01 13:43:17 -07004753#line 2330 "asn1p_y.y"
Lev Walkinbe518fa2017-09-07 02:05:28 -07004754 {
4755 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4756 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
4757 }
4758 break;
4759
Lev Walkin59165cf2017-09-11 06:24:45 -07004760 case 317:
Lev Walkina25584b2017-10-01 13:43:17 -07004761#line 2337 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004762 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004763 (yyval.a_expr) = NEW_EXPR();
4764 checkmem((yyval.a_expr));
4765 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4766 (yyval.a_expr)->meta_type = AMT_VALUE;
4767 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004768 }
4769 break;
4770
Lev Walkin59165cf2017-09-11 06:24:45 -07004771 case 318:
Lev Walkina25584b2017-10-01 13:43:17 -07004772#line 2344 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004773 {
4774 (yyval.a_expr) = NEW_EXPR();
4775 checkmem((yyval.a_expr));
4776 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4777 (yyval.a_expr)->meta_type = AMT_VALUE;
4778 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4779 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4780 }
4781 break;
4782
Lev Walkin59165cf2017-09-11 06:24:45 -07004783 case 319:
Lev Walkina25584b2017-10-01 13:43:17 -07004784#line 2352 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004785 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004786 (yyval.a_expr) = NEW_EXPR();
4787 checkmem((yyval.a_expr));
4788 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4789 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkinbf979152017-09-07 23:36:11 -07004790 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4791 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
4792 }
4793 break;
4794
Lev Walkin59165cf2017-09-11 06:24:45 -07004795 case 320:
Lev Walkina25584b2017-10-01 13:43:17 -07004796#line 2360 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004797 {
4798 (yyval.a_expr) = NEW_EXPR();
4799 checkmem((yyval.a_expr));
4800 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4801 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004802 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004803 }
4804 break;
4805
Lev Walkin59165cf2017-09-11 06:24:45 -07004806 case 321:
Lev Walkina25584b2017-10-01 13:43:17 -07004807#line 2367 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004808 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004809 (yyval.a_expr) = NEW_EXPR();
4810 checkmem((yyval.a_expr));
4811 (yyval.a_expr)->Identifier = strdup("...");
4812 checkmem((yyval.a_expr)->Identifier);
4813 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
4814 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004815 }
4816 break;
4817
Lev Walkin59165cf2017-09-11 06:24:45 -07004818 case 322:
Lev Walkina25584b2017-10-01 13:43:17 -07004819#line 2378 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004820 {
4821 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4822 checkmem((yyval.a_value));
4823 }
4824 break;
4825
Lev Walkin59165cf2017-09-11 06:24:45 -07004826 case 323:
Lev Walkina25584b2017-10-01 13:43:17 -07004827#line 2382 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004828 {
Lev Walkinbf979152017-09-07 23:36:11 -07004829 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4830 checkmem((yyval.a_value));
4831 }
4832 break;
4833
Lev Walkin59165cf2017-09-11 06:24:45 -07004834 case 324:
Lev Walkina25584b2017-10-01 13:43:17 -07004835#line 2389 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004836 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004837 (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl));
4838 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00004839 }
4840 break;
4841
Lev Walkin59165cf2017-09-11 06:24:45 -07004842 case 325:
Lev Walkina25584b2017-10-01 13:43:17 -07004843#line 2420 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004844 { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); }
4845 break;
4846
Lev Walkin59165cf2017-09-11 06:24:45 -07004847 case 326:
Lev Walkina25584b2017-10-01 13:43:17 -07004848#line 2421 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004849 { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); }
4850 break;
4851
Lev Walkin59165cf2017-09-11 06:24:45 -07004852 case 327:
Lev Walkina25584b2017-10-01 13:43:17 -07004853#line 2425 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004854 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004855 (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag);
4856 (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode;
Lev Walkin418298d2006-07-13 08:24:20 +00004857 }
4858 break;
4859
Lev Walkin59165cf2017-09-11 06:24:45 -07004860 case 328:
Lev Walkina25584b2017-10-01 13:43:17 -07004861#line 2432 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004862 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004863 (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag);
4864 (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int);
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004865 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004866 break;
4867
Lev Walkin59165cf2017-09-11 06:24:45 -07004868 case 329:
Lev Walkina25584b2017-10-01 13:43:17 -07004869#line 2438 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004870 { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; }
4871 break;
4872
Lev Walkin59165cf2017-09-11 06:24:45 -07004873 case 330:
Lev Walkina25584b2017-10-01 13:43:17 -07004874#line 2439 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004875 { (yyval.a_tag).tag_class = TC_UNIVERSAL; }
4876 break;
4877
Lev Walkin59165cf2017-09-11 06:24:45 -07004878 case 331:
Lev Walkina25584b2017-10-01 13:43:17 -07004879#line 2440 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004880 { (yyval.a_tag).tag_class = TC_APPLICATION; }
4881 break;
4882
Lev Walkin59165cf2017-09-11 06:24:45 -07004883 case 332:
Lev Walkina25584b2017-10-01 13:43:17 -07004884#line 2441 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004885 { (yyval.a_tag).tag_class = TC_PRIVATE; }
4886 break;
4887
Lev Walkin59165cf2017-09-11 06:24:45 -07004888 case 333:
Lev Walkina25584b2017-10-01 13:43:17 -07004889#line 2445 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004890 { (yyval.a_tag).tag_mode = TM_DEFAULT; }
4891 break;
4892
Lev Walkin59165cf2017-09-11 06:24:45 -07004893 case 334:
Lev Walkina25584b2017-10-01 13:43:17 -07004894#line 2446 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004895 { (yyval.a_tag).tag_mode = TM_IMPLICIT; }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004896 break;
4897
Lev Walkin59165cf2017-09-11 06:24:45 -07004898 case 335:
Lev Walkina25584b2017-10-01 13:43:17 -07004899#line 2447 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004900 { (yyval.a_tag).tag_mode = TM_EXPLICIT; }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004901 break;
4902
Lev Walkin59165cf2017-09-11 06:24:45 -07004903 case 336:
Lev Walkina25584b2017-10-01 13:43:17 -07004904#line 2451 "asn1p_y.y"
Lev Walkin752e9732017-08-04 02:06:22 -07004905 {
4906 checkmem((yyvsp[(1) - (1)].tv_str));
4907 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4908 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004909 break;
4910
Lev Walkin59165cf2017-09-11 06:24:45 -07004911 case 337:
Lev Walkina25584b2017-10-01 13:43:17 -07004912#line 2455 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004913 {
4914 checkmem((yyvsp[(1) - (1)].tv_str));
4915 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin866bd7f2006-09-14 10:35:20 +00004916 }
4917 break;
4918
Lev Walkin59165cf2017-09-11 06:24:45 -07004919 case 338:
Lev Walkina25584b2017-10-01 13:43:17 -07004920#line 2463 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004921 { (yyval.tv_str) = 0; }
4922 break;
4923
Lev Walkin59165cf2017-09-11 06:24:45 -07004924 case 339:
Lev Walkina25584b2017-10-01 13:43:17 -07004925#line 2464 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004926 {
4927 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4928 }
4929 break;
4930
Lev Walkin59165cf2017-09-11 06:24:45 -07004931 case 340:
Lev Walkina25584b2017-10-01 13:43:17 -07004932#line 2470 "asn1p_y.y"
Lev Walkinbf979152017-09-07 23:36:11 -07004933 {
4934 checkmem((yyvsp[(1) - (1)].tv_str));
4935 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4936 }
4937 break;
4938
Lev Walkin59165cf2017-09-11 06:24:45 -07004939 case 341:
Lev Walkina25584b2017-10-01 13:43:17 -07004940#line 2477 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004941 {
4942 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
4943 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkined409e22017-09-26 18:07:40 -07004944 free((yyvsp[(1) - (1)].tv_str));
Lev Walkind523ea42017-09-06 22:15:08 -07004945 }
4946 break;
4947
Lev Walkin59165cf2017-09-11 06:24:45 -07004948 case 342:
Lev Walkina25584b2017-10-01 13:43:17 -07004949#line 2484 "asn1p_y.y"
Lev Walkind523ea42017-09-06 22:15:08 -07004950 {
4951 (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4952 }
4953 break;
4954
Lev Walkin418298d2006-07-13 08:24:20 +00004955
Lev Walkin752e9732017-08-04 02:06:22 -07004956/* Line 1267 of yacc.c. */
Lev Walkina25584b2017-10-01 13:43:17 -07004957#line 4958 "asn1p_y.c"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004958 default: break;
Lev Walkin418298d2006-07-13 08:24:20 +00004959 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004960 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Lev Walkin418298d2006-07-13 08:24:20 +00004961
Lev Walkin0e90aa02013-03-19 16:17:13 -07004962 YYPOPSTACK (yylen);
4963 yylen = 0;
4964 YY_STACK_PRINT (yyss, yyssp);
Lev Walkinf15320b2004-06-03 03:38:44 +00004965
4966 *++yyvsp = yyval;
4967
Lev Walkin752e9732017-08-04 02:06:22 -07004968
Lev Walkin418298d2006-07-13 08:24:20 +00004969 /* Now `shift' the result of the reduction. Determine what state
4970 that goes to, based on the state we popped back to and the rule
4971 number reduced by. */
Lev Walkinf15320b2004-06-03 03:38:44 +00004972
4973 yyn = yyr1[yyn];
4974
Lev Walkin418298d2006-07-13 08:24:20 +00004975 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4976 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00004977 yystate = yytable[yystate];
4978 else
Lev Walkin418298d2006-07-13 08:24:20 +00004979 yystate = yydefgoto[yyn - YYNTOKENS];
Lev Walkinf15320b2004-06-03 03:38:44 +00004980
4981 goto yynewstate;
4982
Lev Walkinf15320b2004-06-03 03:38:44 +00004983
Lev Walkin418298d2006-07-13 08:24:20 +00004984/*------------------------------------.
4985| yyerrlab -- here on detecting error |
4986`------------------------------------*/
4987yyerrlab:
4988 /* If not already recovering from an error, report this error. */
4989 if (!yyerrstatus)
Lev Walkinf15320b2004-06-03 03:38:44 +00004990 {
4991 ++yynerrs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004992#if ! YYERROR_VERBOSE
4993 yyerror (YY_("syntax error"));
4994#else
4995 {
Lev Walkin752e9732017-08-04 02:06:22 -07004996 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4997 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4998 {
4999 YYSIZE_T yyalloc = 2 * yysize;
5000 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5001 yyalloc = YYSTACK_ALLOC_MAXIMUM;
5002 if (yymsg != yymsgbuf)
5003 YYSTACK_FREE (yymsg);
5004 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5005 if (yymsg)
5006 yymsg_alloc = yyalloc;
5007 else
5008 {
5009 yymsg = yymsgbuf;
5010 yymsg_alloc = sizeof yymsgbuf;
5011 }
5012 }
5013
5014 if (0 < yysize && yysize <= yymsg_alloc)
5015 {
5016 (void) yysyntax_error (yymsg, yystate, yychar);
5017 yyerror (yymsg);
5018 }
5019 else
5020 {
5021 yyerror (YY_("syntax error"));
5022 if (yysize != 0)
5023 goto yyexhaustedlab;
5024 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005025 }
5026#endif
5027 }
5028
5029
5030
5031 if (yyerrstatus == 3)
5032 {
Lev Walkin752e9732017-08-04 02:06:22 -07005033 /* If just tried and failed to reuse look-ahead token after an
Lev Walkin0e90aa02013-03-19 16:17:13 -07005034 error, discard it. */
5035
5036 if (yychar <= YYEOF)
5037 {
5038 /* Return failure if at end of input. */
5039 if (yychar == YYEOF)
5040 YYABORT;
Lev Walkinf15320b2004-06-03 03:38:44 +00005041 }
5042 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07005043 {
5044 yydestruct ("Error: discarding",
5045 yytoken, &yylval);
5046 yychar = YYEMPTY;
5047 }
Lev Walkinf15320b2004-06-03 03:38:44 +00005048 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005049
Lev Walkin752e9732017-08-04 02:06:22 -07005050 /* Else will try to reuse look-ahead token after shifting the error
Lev Walkin0e90aa02013-03-19 16:17:13 -07005051 token. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005052 goto yyerrlab1;
Lev Walkinf15320b2004-06-03 03:38:44 +00005053
Lev Walkin418298d2006-07-13 08:24:20 +00005054
Lev Walkin0e90aa02013-03-19 16:17:13 -07005055/*---------------------------------------------------.
5056| yyerrorlab -- error raised explicitly by YYERROR. |
5057`---------------------------------------------------*/
5058yyerrorlab:
5059
5060 /* Pacify compilers like GCC when the user code never invokes
5061 YYERROR and the label yyerrorlab therefore never appears in user
5062 code. */
5063 if (/*CONSTCOND*/ 0)
5064 goto yyerrorlab;
5065
5066 /* Do not reclaim the symbols of the rule which action triggered
5067 this YYERROR. */
5068 YYPOPSTACK (yylen);
5069 yylen = 0;
5070 YY_STACK_PRINT (yyss, yyssp);
5071 yystate = *yyssp;
5072 goto yyerrlab1;
5073
5074
5075/*-------------------------------------------------------------.
5076| yyerrlab1 -- common code for both syntax error and YYERROR. |
5077`-------------------------------------------------------------*/
Lev Walkin418298d2006-07-13 08:24:20 +00005078yyerrlab1:
Lev Walkin418298d2006-07-13 08:24:20 +00005079 yyerrstatus = 3; /* Each real token shifted decrements this. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005080
Lev Walkin418298d2006-07-13 08:24:20 +00005081 for (;;)
Lev Walkina00d6b32006-03-21 03:40:38 +00005082 {
Lev Walkin418298d2006-07-13 08:24:20 +00005083 yyn = yypact[yystate];
Lev Walkin752e9732017-08-04 02:06:22 -07005084 if (yyn != YYPACT_NINF)
Lev Walkin418298d2006-07-13 08:24:20 +00005085 {
5086 yyn += YYTERROR;
5087 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5088 {
5089 yyn = yytable[yyn];
5090 if (0 < yyn)
5091 break;
5092 }
5093 }
5094
5095 /* Pop the current state because it cannot handle the error token. */
5096 if (yyssp == yyss)
5097 YYABORT;
5098
Lev Walkin418298d2006-07-13 08:24:20 +00005099
Lev Walkin0e90aa02013-03-19 16:17:13 -07005100 yydestruct ("Error: popping",
5101 yystos[yystate], yyvsp);
5102 YYPOPSTACK (1);
5103 yystate = *yyssp;
5104 YY_STACK_PRINT (yyss, yyssp);
Lev Walkina00d6b32006-03-21 03:40:38 +00005105 }
Lev Walkina00d6b32006-03-21 03:40:38 +00005106
Lev Walkin752e9732017-08-04 02:06:22 -07005107 if (yyn == YYFINAL)
5108 YYACCEPT;
5109
Lev Walkinf15320b2004-06-03 03:38:44 +00005110 *++yyvsp = yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00005111
Lev Walkinf15320b2004-06-03 03:38:44 +00005112
Lev Walkin0e90aa02013-03-19 16:17:13 -07005113 /* Shift the error token. */
5114 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5115
Lev Walkinf15320b2004-06-03 03:38:44 +00005116 yystate = yyn;
5117 goto yynewstate;
5118
Lev Walkina00d6b32006-03-21 03:40:38 +00005119
Lev Walkin418298d2006-07-13 08:24:20 +00005120/*-------------------------------------.
5121| yyacceptlab -- YYACCEPT comes here. |
5122`-------------------------------------*/
5123yyacceptlab:
5124 yyresult = 0;
5125 goto yyreturn;
5126
5127/*-----------------------------------.
5128| yyabortlab -- YYABORT comes here. |
5129`-----------------------------------*/
5130yyabortlab:
5131 yyresult = 1;
5132 goto yyreturn;
5133
Lev Walkin752e9732017-08-04 02:06:22 -07005134#ifndef yyoverflow
Lev Walkin0e90aa02013-03-19 16:17:13 -07005135/*-------------------------------------------------.
5136| yyexhaustedlab -- memory exhaustion comes here. |
5137`-------------------------------------------------*/
5138yyexhaustedlab:
5139 yyerror (YY_("memory exhausted"));
Lev Walkin418298d2006-07-13 08:24:20 +00005140 yyresult = 2;
5141 /* Fall through. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005142#endif
Lev Walkin418298d2006-07-13 08:24:20 +00005143
5144yyreturn:
Lev Walkin752e9732017-08-04 02:06:22 -07005145 if (yychar != YYEOF && yychar != YYEMPTY)
5146 yydestruct ("Cleanup: discarding lookahead",
5147 yytoken, &yylval);
Lev Walkin0e90aa02013-03-19 16:17:13 -07005148 /* Do not reclaim the symbols of the rule which action triggered
5149 this YYABORT or YYACCEPT. */
5150 YYPOPSTACK (yylen);
5151 YY_STACK_PRINT (yyss, yyssp);
5152 while (yyssp != yyss)
5153 {
5154 yydestruct ("Cleanup: popping",
5155 yystos[*yyssp], yyvsp);
5156 YYPOPSTACK (1);
5157 }
Lev Walkin418298d2006-07-13 08:24:20 +00005158#ifndef yyoverflow
5159 if (yyss != yyssa)
5160 YYSTACK_FREE (yyss);
5161#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07005162#if YYERROR_VERBOSE
5163 if (yymsg != yymsgbuf)
5164 YYSTACK_FREE (yymsg);
5165#endif
5166 /* Make sure YYID is used. */
5167 return YYID (yyresult);
Lev Walkinf15320b2004-06-03 03:38:44 +00005168}
Lev Walkin418298d2006-07-13 08:24:20 +00005169
5170
Lev Walkina25584b2017-10-01 13:43:17 -07005171#line 2488 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +00005172
5173
5174
5175/*
5176 * Convert Xstring ('0101'B or '5'H) to the binary vector.
5177 */
5178static asn1p_value_t *
5179_convert_bitstring2binary(char *str, int base) {
5180 asn1p_value_t *val;
5181 int slen;
5182 int memlen;
5183 int baselen;
5184 int bits;
5185 uint8_t *binary_vector;
5186 uint8_t *bv_ptr;
5187 uint8_t cur_val;
5188
5189 assert(str);
5190 assert(str[0] == '\'');
5191
5192 switch(base) {
5193 case 'B':
5194 baselen = 1;
5195 break;
5196 case 'H':
5197 baselen = 4;
5198 break;
5199 default:
5200 assert(base == 'B' || base == 'H');
5201 errno = EINVAL;
5202 return NULL;
5203 }
5204
5205 slen = strlen(str);
5206 assert(str[slen - 1] == base);
5207 assert(str[slen - 2] == '\'');
5208
5209 memlen = slen / (8 / baselen); /* Conservative estimate */
5210
5211 bv_ptr = binary_vector = malloc(memlen + 1);
5212 if(bv_ptr == NULL)
5213 /* ENOMEM */
5214 return NULL;
5215
5216 cur_val = 0;
5217 bits = 0;
5218 while(*(++str) != '\'') {
5219 switch(baselen) {
5220 case 1:
5221 switch(*str) {
5222 case '1':
5223 cur_val |= 1 << (7 - (bits % 8));
5224 case '0':
5225 break;
5226 default:
5227 assert(!"_y UNREACH1");
5228 case ' ': case '\r': case '\n':
5229 continue;
5230 }
5231 break;
5232 case 4:
5233 switch(*str) {
5234 case '0': case '1': case '2': case '3': case '4':
5235 case '5': case '6': case '7': case '8': case '9':
5236 cur_val |= (*str - '0') << (4 - (bits % 8));
5237 break;
5238 case 'A': case 'B': case 'C':
5239 case 'D': case 'E': case 'F':
5240 cur_val |= ((*str - 'A') + 10)
5241 << (4 - (bits % 8));
5242 break;
5243 default:
5244 assert(!"_y UNREACH2");
5245 case ' ': case '\r': case '\n':
5246 continue;
5247 }
5248 break;
5249 }
5250
5251 bits += baselen;
5252 if((bits % 8) == 0) {
5253 *bv_ptr++ = cur_val;
5254 cur_val = 0;
5255 }
5256 }
5257
5258 *bv_ptr = cur_val;
5259 assert((bv_ptr - binary_vector) <= memlen);
5260
5261 val = asn1p_value_frombits(binary_vector, bits, 0);
5262 if(val == NULL) {
5263 free(binary_vector);
5264 }
5265
5266 return val;
5267}
5268
Lev Walkin2e9bd5c2005-08-13 09:07:11 +00005269/*
5270 * For unnamed types (used in old X.208 compliant modules)
5271 * generate some sort of interim names, to not to force human being to fix
5272 * the specification's compliance to modern ASN.1 standards.
5273 */
5274static void
5275_fixup_anonymous_identifier(asn1p_expr_t *expr) {
5276 char *p;
5277 assert(expr->Identifier == 0);
5278
5279 /*
5280 * Try to figure out the type name
5281 * without going too much into details
5282 */
5283 expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
5284 if(expr->reference && expr->reference->comp_count > 0)
5285 expr->Identifier = expr->reference->components[0].name;
5286
5287 fprintf(stderr,
5288 "WARNING: Line %d: expected lower-case member identifier, "
5289 "found an unnamed %s.\n"
5290 "WARNING: Obsolete X.208 syntax detected, "
5291 "please give the member a name.\n",
5292 yylineno, expr->Identifier ? expr->Identifier : "type");
5293
5294 if(!expr->Identifier)
5295 expr->Identifier = "unnamed";
5296 expr->Identifier = strdup(expr->Identifier);
5297 assert(expr->Identifier);
5298 /* Make a lowercase identifier from the type name */
5299 for(p = expr->Identifier; *p; p++) {
5300 switch(*p) {
5301 case 'A' ... 'Z': *p += 32; break;
5302 case ' ': *p = '_'; break;
5303 case '-': *p = '_'; break;
5304 }
5305 }
5306 fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
5307 "Name clash may occur later.\n",
5308 expr->Identifier);
5309}
5310
Lev Walkin59165cf2017-09-11 06:24:45 -07005311static int
Lev Walkinf15320b2004-06-03 03:38:44 +00005312yyerror(const char *msg) {
Lev Walkin9d542d22006-03-14 16:31:37 +00005313 extern char *asn1p_text;
Lev Walkinf15320b2004-06-03 03:38:44 +00005314 fprintf(stderr,
5315 "ASN.1 grammar parse error "
Lev Walkind523ea42017-09-06 22:15:08 -07005316 "near %s:%d (token \"%s\"): %s\n",
5317 ASN_FILENAME, yylineno, asn1p_text, msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00005318 return -1;
5319}
5320
Lev Walkin752e9732017-08-04 02:06:22 -07005321