blob: e15fc02d19be9b86ab564e96946fede41237f95c [file] [log] [blame]
Lev Walkin0e90aa02013-03-19 16:17:13 -07001/* A Bison parser, made by GNU Bison 2.3. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002
Lev Walkin0e90aa02013-03-19 16:17:13 -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.
Lev Walkinf15320b2004-06-03 03:38:44 +00007
Lev Walkin418298d2006-07-13 08:24:20 +00008 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
Lev Walkinf15320b2004-06-03 03:38:44 +000012
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.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
Lev Walkin0e90aa02013-03-19 16:17:13 -070020 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 Walkin418298d2006-07-13 08:24:20 +000032
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. */
50#define YYBISON_VERSION "2.3"
51
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
58/* Using locations. */
59#define YYLSP_NEEDED 0
60
Lev Walkin0e90aa02013-03-19 16:17:13 -070061/* Substitute the variable and function names. */
Lev Walkinf15320b2004-06-03 03:38:44 +000062#define yyparse asn1p_parse
Lev Walkin418298d2006-07-13 08:24:20 +000063#define yylex asn1p_lex
Lev Walkinf15320b2004-06-03 03:38:44 +000064#define yyerror asn1p_error
Lev Walkin418298d2006-07-13 08:24:20 +000065#define yylval asn1p_lval
66#define yychar asn1p_char
Lev Walkinf15320b2004-06-03 03:38:44 +000067#define yydebug asn1p_debug
68#define yynerrs asn1p_nerrs
Lev Walkinf15320b2004-06-03 03:38:44 +000069
Lev Walkin418298d2006-07-13 08:24:20 +000070
71/* Tokens. */
72#ifndef YYTOKENTYPE
73# define YYTOKENTYPE
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
75 know about them. */
76 enum yytokentype {
77 TOK_PPEQ = 258,
Lev Walkin0e90aa02013-03-19 16:17:13 -070078 TOK_VBracketLeft = 259,
79 TOK_VBracketRight = 260,
80 TOK_whitespace = 261,
81 TOK_opaque = 262,
82 TOK_bstring = 263,
83 TOK_cstring = 264,
84 TOK_hstring = 265,
85 TOK_identifier = 266,
86 TOK_number = 267,
87 TOK_number_negative = 268,
88 TOK_realnumber = 269,
89 TOK_tuple = 270,
90 TOK_quadruple = 271,
91 TOK_typereference = 272,
92 TOK_capitalreference = 273,
93 TOK_typefieldreference = 274,
94 TOK_valuefieldreference = 275,
95 TOK_Literal = 276,
96 TOK_ABSENT = 277,
97 TOK_ABSTRACT_SYNTAX = 278,
98 TOK_ALL = 279,
99 TOK_ANY = 280,
100 TOK_APPLICATION = 281,
101 TOK_AUTOMATIC = 282,
102 TOK_BEGIN = 283,
103 TOK_BIT = 284,
104 TOK_BMPString = 285,
105 TOK_BOOLEAN = 286,
106 TOK_BY = 287,
107 TOK_CHARACTER = 288,
108 TOK_CHOICE = 289,
109 TOK_CLASS = 290,
110 TOK_COMPONENT = 291,
111 TOK_COMPONENTS = 292,
112 TOK_CONSTRAINED = 293,
113 TOK_CONTAINING = 294,
114 TOK_DEFAULT = 295,
115 TOK_DEFINITIONS = 296,
116 TOK_DEFINED = 297,
117 TOK_EMBEDDED = 298,
118 TOK_ENCODED = 299,
119 TOK_ENCODING_CONTROL = 300,
120 TOK_END = 301,
121 TOK_ENUMERATED = 302,
122 TOK_EXPLICIT = 303,
123 TOK_EXPORTS = 304,
124 TOK_EXTENSIBILITY = 305,
125 TOK_EXTERNAL = 306,
126 TOK_FALSE = 307,
127 TOK_FROM = 308,
128 TOK_GeneralizedTime = 309,
129 TOK_GeneralString = 310,
130 TOK_GraphicString = 311,
131 TOK_IA5String = 312,
132 TOK_IDENTIFIER = 313,
133 TOK_IMPLICIT = 314,
134 TOK_IMPLIED = 315,
135 TOK_IMPORTS = 316,
136 TOK_INCLUDES = 317,
137 TOK_INSTANCE = 318,
138 TOK_INSTRUCTIONS = 319,
139 TOK_INTEGER = 320,
140 TOK_ISO646String = 321,
141 TOK_MAX = 322,
142 TOK_MIN = 323,
143 TOK_MINUS_INFINITY = 324,
144 TOK_NULL = 325,
145 TOK_NumericString = 326,
146 TOK_OBJECT = 327,
147 TOK_ObjectDescriptor = 328,
148 TOK_OCTET = 329,
149 TOK_OF = 330,
150 TOK_OPTIONAL = 331,
151 TOK_PATTERN = 332,
152 TOK_PDV = 333,
153 TOK_PLUS_INFINITY = 334,
154 TOK_PRESENT = 335,
155 TOK_PrintableString = 336,
156 TOK_PRIVATE = 337,
157 TOK_REAL = 338,
158 TOK_RELATIVE_OID = 339,
159 TOK_SEQUENCE = 340,
160 TOK_SET = 341,
161 TOK_SIZE = 342,
162 TOK_STRING = 343,
163 TOK_SYNTAX = 344,
164 TOK_T61String = 345,
165 TOK_TAGS = 346,
166 TOK_TeletexString = 347,
167 TOK_TRUE = 348,
168 TOK_TYPE_IDENTIFIER = 349,
169 TOK_UNIQUE = 350,
170 TOK_UNIVERSAL = 351,
171 TOK_UniversalString = 352,
172 TOK_UTCTime = 353,
173 TOK_UTF8String = 354,
174 TOK_VideotexString = 355,
175 TOK_VisibleString = 356,
176 TOK_WITH = 357,
177 TOK_EXCEPT = 358,
178 TOK_INTERSECTION = 359,
179 TOK_UNION = 360,
180 TOK_TwoDots = 361,
181 TOK_ThreeDots = 362
Lev Walkin418298d2006-07-13 08:24:20 +0000182 };
183#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700184/* Tokens. */
Lev Walkin418298d2006-07-13 08:24:20 +0000185#define TOK_PPEQ 258
Lev Walkin0e90aa02013-03-19 16:17:13 -0700186#define TOK_VBracketLeft 259
187#define TOK_VBracketRight 260
188#define TOK_whitespace 261
189#define TOK_opaque 262
190#define TOK_bstring 263
191#define TOK_cstring 264
192#define TOK_hstring 265
193#define TOK_identifier 266
194#define TOK_number 267
195#define TOK_number_negative 268
196#define TOK_realnumber 269
197#define TOK_tuple 270
198#define TOK_quadruple 271
199#define TOK_typereference 272
200#define TOK_capitalreference 273
201#define TOK_typefieldreference 274
202#define TOK_valuefieldreference 275
203#define TOK_Literal 276
204#define TOK_ABSENT 277
205#define TOK_ABSTRACT_SYNTAX 278
206#define TOK_ALL 279
207#define TOK_ANY 280
208#define TOK_APPLICATION 281
209#define TOK_AUTOMATIC 282
210#define TOK_BEGIN 283
211#define TOK_BIT 284
212#define TOK_BMPString 285
213#define TOK_BOOLEAN 286
214#define TOK_BY 287
215#define TOK_CHARACTER 288
216#define TOK_CHOICE 289
217#define TOK_CLASS 290
218#define TOK_COMPONENT 291
219#define TOK_COMPONENTS 292
220#define TOK_CONSTRAINED 293
221#define TOK_CONTAINING 294
222#define TOK_DEFAULT 295
223#define TOK_DEFINITIONS 296
224#define TOK_DEFINED 297
225#define TOK_EMBEDDED 298
226#define TOK_ENCODED 299
227#define TOK_ENCODING_CONTROL 300
228#define TOK_END 301
229#define TOK_ENUMERATED 302
230#define TOK_EXPLICIT 303
231#define TOK_EXPORTS 304
232#define TOK_EXTENSIBILITY 305
233#define TOK_EXTERNAL 306
234#define TOK_FALSE 307
235#define TOK_FROM 308
236#define TOK_GeneralizedTime 309
237#define TOK_GeneralString 310
238#define TOK_GraphicString 311
239#define TOK_IA5String 312
240#define TOK_IDENTIFIER 313
241#define TOK_IMPLICIT 314
242#define TOK_IMPLIED 315
243#define TOK_IMPORTS 316
244#define TOK_INCLUDES 317
245#define TOK_INSTANCE 318
246#define TOK_INSTRUCTIONS 319
247#define TOK_INTEGER 320
248#define TOK_ISO646String 321
249#define TOK_MAX 322
250#define TOK_MIN 323
251#define TOK_MINUS_INFINITY 324
252#define TOK_NULL 325
253#define TOK_NumericString 326
254#define TOK_OBJECT 327
255#define TOK_ObjectDescriptor 328
256#define TOK_OCTET 329
257#define TOK_OF 330
258#define TOK_OPTIONAL 331
259#define TOK_PATTERN 332
260#define TOK_PDV 333
261#define TOK_PLUS_INFINITY 334
262#define TOK_PRESENT 335
263#define TOK_PrintableString 336
264#define TOK_PRIVATE 337
265#define TOK_REAL 338
266#define TOK_RELATIVE_OID 339
267#define TOK_SEQUENCE 340
268#define TOK_SET 341
269#define TOK_SIZE 342
270#define TOK_STRING 343
271#define TOK_SYNTAX 344
272#define TOK_T61String 345
273#define TOK_TAGS 346
274#define TOK_TeletexString 347
275#define TOK_TRUE 348
276#define TOK_TYPE_IDENTIFIER 349
277#define TOK_UNIQUE 350
278#define TOK_UNIVERSAL 351
279#define TOK_UniversalString 352
280#define TOK_UTCTime 353
281#define TOK_UTF8String 354
282#define TOK_VideotexString 355
283#define TOK_VisibleString 356
284#define TOK_WITH 357
285#define TOK_EXCEPT 358
286#define TOK_INTERSECTION 359
287#define TOK_UNION 360
288#define TOK_TwoDots 361
289#define TOK_ThreeDots 362
Lev Walkin418298d2006-07-13 08:24:20 +0000290
291
292
293
294/* Copy the first part of user declarations. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000295#line 1 "asn1p_y.y"
296
297
298#include <stdlib.h>
299#include <stdio.h>
300#include <string.h>
301#include <errno.h>
302#include <assert.h>
303
304#include "asn1parser.h"
305
306#define YYPARSE_PARAM param
Lev Walkin4a4bdf72005-06-07 21:43:32 +0000307#define YYPARSE_PARAM_TYPE void **
Lev Walkinf15320b2004-06-03 03:38:44 +0000308#define YYERROR_VERBOSE
309
310int yylex(void);
311int yyerror(const char *msg);
Lev Walkin4a4bdf72005-06-07 21:43:32 +0000312#ifdef YYBYACC
313int yyparse(void **param); /* byacc does not produce a prototype */
314#endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000315void asn1p_lexer_hack_push_opaque_state(void);
316void asn1p_lexer_hack_enable_with_syntax(void);
Lev Walkinf59d0752004-08-18 04:59:12 +0000317void asn1p_lexer_hack_push_encoding_control(void);
Lev Walkinf15320b2004-06-03 03:38:44 +0000318#define yylineno asn1p_lineno
319extern int asn1p_lineno;
320
Lev Walkinb36317c2005-08-12 10:09:10 +0000321/*
Lev Walkinef625402005-09-05 05:17:57 +0000322 * Process directives as <ASN1C:RepresentAsPointer>
Lev Walkin4696c742005-08-22 12:23:54 +0000323 */
324extern int asn1p_as_pointer;
Lev Walkin4696c742005-08-22 12:23:54 +0000325
326/*
Lev Walkinb36317c2005-08-12 10:09:10 +0000327 * This temporary variable is used to solve the shortcomings of 1-lookahead
328 * parser.
329 */
330static struct AssignedIdentifier *saved_aid;
Lev Walkinf15320b2004-06-03 03:38:44 +0000331
Lev Walkin2e9bd5c2005-08-13 09:07:11 +0000332static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
333static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
Lev Walkinf15320b2004-06-03 03:38:44 +0000334
Lev Walkina9532f42006-09-17 04:52:50 +0000335static asn1p_module_t *currentModule;
336#define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule))
337
Lev Walkinb36317c2005-08-12 10:09:10 +0000338#define checkmem(ptr) do { \
339 if(!(ptr)) \
340 return yyerror("Memory failure"); \
Lev Walkinf15320b2004-06-03 03:38:44 +0000341 } while(0)
342
Lev Walkinb36317c2005-08-12 10:09:10 +0000343#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
344 if(arg1->type != constr_type) { \
345 int __ret; \
346 root = asn1p_constraint_new(yylineno); \
347 checkmem(root); \
348 root->type = constr_type; \
349 __ret = asn1p_constraint_insert(root, \
350 arg1); \
351 checkmem(__ret == 0); \
352 } else { \
353 root = arg1; \
354 } \
355 if(arg2) { \
356 int __ret \
357 = asn1p_constraint_insert(root, arg2); \
358 checkmem(__ret == 0); \
359 } \
Lev Walkinf15320b2004-06-03 03:38:44 +0000360 } while(0)
361
Lev Walkin866bd7f2006-09-14 10:35:20 +0000362#ifdef AL_IMPORT
363#error AL_IMPORT DEFINED ELSEWHERE!
364#endif
365#define AL_IMPORT(to,where,from,field) do { \
366 if(!(from)) break; \
367 while(TQ_FIRST(&((from)->where))) { \
368 TQ_ADD(&((to)->where), \
369 TQ_REMOVE(&((from)->where), field), \
370 field); \
371 } \
372 assert(TQ_FIRST(&((from)->where)) == 0); \
373 } while(0)
374
Lev Walkinf15320b2004-06-03 03:38:44 +0000375
Lev Walkin418298d2006-07-13 08:24:20 +0000376
377/* Enabling traces. */
378#ifndef YYDEBUG
379# define YYDEBUG 0
380#endif
381
382/* Enabling verbose error messages. */
383#ifdef YYERROR_VERBOSE
384# undef YYERROR_VERBOSE
385# define YYERROR_VERBOSE 1
386#else
387# define YYERROR_VERBOSE 0
388#endif
389
Lev Walkin0e90aa02013-03-19 16:17:13 -0700390/* Enabling the token table. */
391#ifndef YYTOKEN_TABLE
392# define YYTOKEN_TABLE 0
393#endif
394
395#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
396typedef union YYSTYPE
Lev Walkina9532f42006-09-17 04:52:50 +0000397#line 88 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -0700398{
Lev Walkinf15320b2004-06-03 03:38:44 +0000399 asn1p_t *a_grammar;
400 asn1p_module_flags_e a_module_flags;
401 asn1p_module_t *a_module;
402 asn1p_expr_type_e a_type; /* ASN.1 Type */
403 asn1p_expr_t *a_expr; /* Constructed collection */
404 asn1p_constraint_t *a_constr; /* Constraint */
405 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
406 asn1p_xports_t *a_xports; /* IMports/EXports */
Lev Walkinb36317c2005-08-12 10:09:10 +0000407 struct AssignedIdentifier a_aid; /* Assigned Identifier */
Lev Walkinf15320b2004-06-03 03:38:44 +0000408 asn1p_oid_t *a_oid; /* Object Identifier */
409 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
410 struct asn1p_type_tag_s a_tag; /* A tag */
411 asn1p_ref_t *a_ref; /* Reference to custom type */
412 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
413 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
414 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
415 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
416 struct asn1p_param_s a_parg; /* A parameter argument */
417 asn1p_paramlist_t *a_plist; /* A pargs list */
Lev Walkin9c974182004-09-15 11:59:51 +0000418 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
Lev Walkinf15320b2004-06-03 03:38:44 +0000419 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
Lev Walkind21c5052004-09-29 13:18:09 +0000420 asn1c_integer_t a_int;
Lev Walkinadf863f2006-09-05 16:18:34 +0000421 double a_dbl;
Lev Walkinf15320b2004-06-03 03:38:44 +0000422 char *tv_str;
423 struct {
424 char *buf;
425 int len;
426 } tv_opaque;
427 struct {
428 char *name;
429 struct asn1p_type_tag_s tag;
430 } tv_nametag;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700431}
432/* Line 193 of yacc.c. */
433#line 434 "y.tab.c"
434 YYSTYPE;
435# define yystype YYSTYPE /* obsolescent; will be withdrawn */
436# define YYSTYPE_IS_DECLARED 1
Lev Walkin418298d2006-07-13 08:24:20 +0000437# define YYSTYPE_IS_TRIVIAL 1
Lev Walkinf15320b2004-06-03 03:38:44 +0000438#endif
439
Lev Walkin0e90aa02013-03-19 16:17:13 -0700440
Lev Walkin418298d2006-07-13 08:24:20 +0000441
442/* Copy the second part of user declarations. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000443
444
Lev Walkin0e90aa02013-03-19 16:17:13 -0700445/* Line 216 of yacc.c. */
446#line 447 "y.tab.c"
Lev Walkinf15320b2004-06-03 03:38:44 +0000447
Lev Walkin0e90aa02013-03-19 16:17:13 -0700448#ifdef short
449# undef short
450#endif
451
452#ifdef YYTYPE_UINT8
453typedef YYTYPE_UINT8 yytype_uint8;
454#else
455typedef unsigned char yytype_uint8;
456#endif
457
458#ifdef YYTYPE_INT8
459typedef YYTYPE_INT8 yytype_int8;
460#elif (defined __STDC__ || defined __C99__FUNC__ \
461 || defined __cplusplus || defined _MSC_VER)
462typedef signed char yytype_int8;
463#else
464typedef short int yytype_int8;
465#endif
466
467#ifdef YYTYPE_UINT16
468typedef YYTYPE_UINT16 yytype_uint16;
469#else
470typedef unsigned short int yytype_uint16;
471#endif
472
473#ifdef YYTYPE_INT16
474typedef YYTYPE_INT16 yytype_int16;
475#else
476typedef short int yytype_int16;
477#endif
478
479#ifndef YYSIZE_T
480# ifdef __SIZE_TYPE__
481# define YYSIZE_T __SIZE_TYPE__
482# elif defined size_t
483# define YYSIZE_T size_t
484# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
485 || defined __cplusplus || defined _MSC_VER)
486# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
487# define YYSIZE_T size_t
488# else
489# define YYSIZE_T unsigned int
490# endif
491#endif
492
493#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
494
495#ifndef YY_
496# if defined YYENABLE_NLS && YYENABLE_NLS
497# if ENABLE_NLS
498# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
499# define YY_(msgid) dgettext ("bison-runtime", msgid)
500# endif
501# endif
502# ifndef YY_
503# define YY_(msgid) msgid
504# endif
505#endif
506
507/* Suppress unused-variable warnings by "using" E. */
508#if ! defined lint || defined __GNUC__
509# define YYUSE(e) ((void) (e))
510#else
511# define YYUSE(e) /* empty */
512#endif
513
514/* Identity function, used to suppress warnings about constant conditions. */
515#ifndef lint
516# define YYID(n) (n)
517#else
518#if (defined __STDC__ || defined __C99__FUNC__ \
519 || defined __cplusplus || defined _MSC_VER)
520static int
521YYID (int i)
522#else
523static int
524YYID (i)
525 int i;
526#endif
527{
528 return i;
529}
530#endif
531
532#if ! defined yyoverflow || YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +0000533
Lev Walkin418298d2006-07-13 08:24:20 +0000534/* The parser invokes alloca or malloc; define the necessary symbols. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000535
Lev Walkin0e90aa02013-03-19 16:17:13 -0700536# ifdef YYSTACK_USE_ALLOCA
537# if YYSTACK_USE_ALLOCA
538# ifdef __GNUC__
539# define YYSTACK_ALLOC __builtin_alloca
540# elif defined __BUILTIN_VA_ARG_INCR
541# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
542# elif defined _AIX
543# define YYSTACK_ALLOC __alloca
544# elif defined _MSC_VER
545# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
546# define alloca _alloca
Lev Walkin418298d2006-07-13 08:24:20 +0000547# else
Lev Walkin0e90aa02013-03-19 16:17:13 -0700548# define YYSTACK_ALLOC alloca
549# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
550 || defined __cplusplus || defined _MSC_VER)
551# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
552# ifndef _STDLIB_H
553# define _STDLIB_H 1
554# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000555# endif
556# endif
557# endif
558# endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000559
Lev Walkin418298d2006-07-13 08:24:20 +0000560# ifdef YYSTACK_ALLOC
Lev Walkin0e90aa02013-03-19 16:17:13 -0700561 /* Pacify GCC's `empty if-body' warning. */
562# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
563# ifndef YYSTACK_ALLOC_MAXIMUM
564 /* The OS might guarantee only one guard page at the bottom of the stack,
565 and a page size can be as small as 4096 bytes. So we cannot safely
566 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
567 to allow for a few compiler-allocated temporary stack slots. */
568# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
Lev Walkin418298d2006-07-13 08:24:20 +0000569# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700570# else
571# define YYSTACK_ALLOC YYMALLOC
572# define YYSTACK_FREE YYFREE
573# ifndef YYSTACK_ALLOC_MAXIMUM
574# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
575# endif
576# if (defined __cplusplus && ! defined _STDLIB_H \
577 && ! ((defined YYMALLOC || defined malloc) \
578 && (defined YYFREE || defined free)))
579# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
580# ifndef _STDLIB_H
581# define _STDLIB_H 1
582# endif
583# endif
584# ifndef YYMALLOC
585# define YYMALLOC malloc
586# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
587 || defined __cplusplus || defined _MSC_VER)
588void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
589# endif
590# endif
591# ifndef YYFREE
592# define YYFREE free
593# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
594 || defined __cplusplus || defined _MSC_VER)
595void free (void *); /* INFRINGES ON USER NAME SPACE */
596# endif
597# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000598# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700599#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
Lev Walkin418298d2006-07-13 08:24:20 +0000600
601
Lev Walkin0e90aa02013-03-19 16:17:13 -0700602#if (! defined yyoverflow \
603 && (! defined __cplusplus \
604 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Lev Walkin418298d2006-07-13 08:24:20 +0000605
606/* A type that is properly aligned for any stack member. */
607union yyalloc
608{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700609 yytype_int16 yyss;
Lev Walkin418298d2006-07-13 08:24:20 +0000610 YYSTYPE yyvs;
611 };
612
613/* The size of the maximum gap between one aligned stack and the next. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700614# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
Lev Walkin418298d2006-07-13 08:24:20 +0000615
616/* The size of an array large to enough to hold all stacks, each with
617 N elements. */
618# define YYSTACK_BYTES(N) \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700619 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
620 + YYSTACK_GAP_MAXIMUM)
Lev Walkin418298d2006-07-13 08:24:20 +0000621
622/* Copy COUNT objects from FROM to TO. The source and destination do
623 not overlap. */
624# ifndef YYCOPY
Lev Walkin0e90aa02013-03-19 16:17:13 -0700625# if defined __GNUC__ && 1 < __GNUC__
Lev Walkin418298d2006-07-13 08:24:20 +0000626# define YYCOPY(To, From, Count) \
627 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
628# else
629# define YYCOPY(To, From, Count) \
630 do \
631 { \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700632 YYSIZE_T yyi; \
Lev Walkin418298d2006-07-13 08:24:20 +0000633 for (yyi = 0; yyi < (Count); yyi++) \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700634 (To)[yyi] = (From)[yyi]; \
Lev Walkin418298d2006-07-13 08:24:20 +0000635 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700636 while (YYID (0))
Lev Walkin418298d2006-07-13 08:24:20 +0000637# endif
638# endif
639
640/* Relocate STACK from its old location to the new one. The
641 local variables YYSIZE and YYSTACKSIZE give the old and new number of
642 elements in the stack, and YYPTR gives the new location of the
643 stack. Advance YYPTR to a properly aligned location for the next
644 stack. */
645# define YYSTACK_RELOCATE(Stack) \
646 do \
647 { \
648 YYSIZE_T yynewbytes; \
649 YYCOPY (&yyptr->Stack, Stack, yysize); \
650 Stack = &yyptr->Stack; \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700651 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
Lev Walkin418298d2006-07-13 08:24:20 +0000652 yyptr += yynewbytes / sizeof (*yyptr); \
653 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700654 while (YYID (0))
Lev Walkinf15320b2004-06-03 03:38:44 +0000655
656#endif
657
Lev Walkin0e90aa02013-03-19 16:17:13 -0700658/* YYFINAL -- State number of the termination state. */
Lev Walkin418298d2006-07-13 08:24:20 +0000659#define YYFINAL 7
Lev Walkin0e90aa02013-03-19 16:17:13 -0700660/* YYLAST -- Last index in YYTABLE. */
661#define YYLAST 793
Lev Walkin418298d2006-07-13 08:24:20 +0000662
Lev Walkin0e90aa02013-03-19 16:17:13 -0700663/* YYNTOKENS -- Number of terminals. */
664#define YYNTOKENS 123
665/* YYNNTS -- Number of nonterminals. */
Lev Walkin1c8d5aa2006-10-27 05:37:39 +0000666#define YYNNTS 122
Lev Walkin0e90aa02013-03-19 16:17:13 -0700667/* YYNRULES -- Number of rules. */
668#define YYNRULES 313
669/* YYNRULES -- Number of states. */
670#define YYNSTATES 473
Lev Walkin418298d2006-07-13 08:24:20 +0000671
672/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
673#define YYUNDEFTOK 2
Lev Walkin0e90aa02013-03-19 16:17:13 -0700674#define YYMAXUTOK 362
Lev Walkin418298d2006-07-13 08:24:20 +0000675
Lev Walkin0e90aa02013-03-19 16:17:13 -0700676#define YYTRANSLATE(YYX) \
677 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Lev Walkin418298d2006-07-13 08:24:20 +0000678
679/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700680static const yytype_uint8 yytranslate[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000681{
682 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
683 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
684 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700685 2, 2, 2, 119, 2, 2, 2, 2, 2, 2,
686 112, 113, 2, 2, 115, 2, 120, 2, 2, 2,
687 2, 2, 2, 2, 2, 2, 2, 2, 116, 114,
688 121, 2, 2, 2, 122, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000689 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
690 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700691 2, 117, 2, 118, 104, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000692 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
693 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700694 2, 2, 2, 110, 106, 111, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000695 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
696 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
697 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
698 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
699 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
700 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
701 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
702 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
703 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
704 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
705 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
706 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
707 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
708 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
709 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
710 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
711 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
712 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
713 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
714 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
715 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
716 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700717 95, 96, 97, 98, 99, 100, 101, 102, 103, 105,
718 107, 108, 109
Lev Walkin418298d2006-07-13 08:24:20 +0000719};
720
721#if YYDEBUG
722/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
723 YYRHS. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700724static const yytype_uint16 yyprhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000725{
Lev Walkina9532f42006-09-17 04:52:50 +0000726 0, 0, 3, 5, 7, 10, 11, 21, 22, 24,
727 28, 31, 33, 36, 38, 43, 45, 46, 48, 50,
728 53, 56, 59, 62, 65, 68, 69, 71, 75, 77,
729 80, 82, 84, 86, 87, 91, 93, 94, 96, 100,
Lev Walkin4a4543f2006-10-13 12:37:39 +0000730 103, 104, 106, 108, 111, 112, 114, 119, 121, 125,
731 127, 131, 133, 134, 136, 140, 144, 147, 149, 153,
732 155, 159, 161, 165, 170, 172, 174, 179, 183, 187,
733 194, 201, 203, 207, 209, 213, 217, 221, 225, 227,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700734 231, 233, 235, 237, 239, 240, 242, 244, 248, 254,
735 258, 261, 265, 267, 269, 273, 276, 278, 280, 286,
736 287, 289, 291, 295, 298, 303, 307, 311, 315, 319,
737 323, 324, 326, 327, 334, 336, 339, 341, 343, 345,
738 349, 351, 355, 359, 363, 364, 367, 369, 374, 379,
739 384, 391, 398, 400, 405, 409, 411, 415, 419, 423,
740 425, 429, 431, 435, 437, 439, 441, 443, 447, 451,
741 453, 458, 460, 462, 466, 467, 471, 473, 475, 477,
742 479, 481, 483, 485, 487, 491, 493, 495, 497, 499,
743 502, 504, 506, 508, 510, 513, 516, 518, 520, 523,
744 526, 528, 530, 532, 534, 536, 539, 541, 544, 546,
745 548, 550, 552, 554, 556, 558, 560, 562, 564, 566,
746 568, 570, 572, 574, 576, 578, 580, 581, 583, 585,
747 587, 592, 596, 601, 603, 605, 609, 615, 617, 619,
748 623, 625, 629, 631, 635, 637, 641, 646, 650, 652,
749 654, 658, 662, 666, 670, 672, 674, 677, 680, 682,
750 684, 686, 688, 690, 692, 694, 696, 698, 700, 702,
751 706, 712, 714, 718, 720, 724, 725, 727, 729, 731,
752 733, 735, 737, 739, 740, 746, 749, 751, 754, 757,
753 761, 763, 765, 769, 774, 776, 780, 783, 787, 789,
754 793, 794, 796, 798, 801, 804, 808, 810, 814, 816,
755 821, 826, 828, 830, 832, 834, 836, 838, 839, 841,
756 844, 849, 850, 852, 854, 856, 857, 859, 861, 863,
757 865, 867, 868, 870
Lev Walkin418298d2006-07-13 08:24:20 +0000758};
759
Lev Walkin0e90aa02013-03-19 16:17:13 -0700760/* YYRHS -- A `-1'-separated list of the rules' RHS. */
761static const yytype_int16 yyrhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000762{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700763 124, 0, -1, 125, -1, 126, -1, 125, 126, -1,
764 -1, 241, 127, 128, 41, 132, 3, 28, 135, 46,
765 -1, -1, 129, -1, 110, 130, 111, -1, 110, 111,
766 -1, 131, -1, 130, 131, -1, 244, -1, 244, 112,
767 12, 113, -1, 12, -1, -1, 133, -1, 134, -1,
768 133, 134, -1, 48, 91, -1, 59, 91, -1, 27,
769 91, -1, 50, 60, -1, 18, 64, -1, -1, 136,
770 -1, 148, 140, 137, -1, 138, -1, 137, 138, -1,
771 155, -1, 185, -1, 153, -1, -1, 45, 18, 139,
772 -1, 195, -1, -1, 141, -1, 61, 142, 114, -1,
773 61, 53, -1, -1, 143, -1, 145, -1, 143, 145,
774 -1, -1, 129, -1, 146, 53, 241, 144, -1, 147,
775 -1, 146, 115, 147, -1, 241, -1, 241, 110, 111,
776 -1, 244, -1, -1, 149, -1, 49, 150, 114, -1,
777 49, 24, 114, -1, 49, 114, -1, 151, -1, 150,
778 115, 151, -1, 241, -1, 241, 110, 111, -1, 244,
779 -1, 110, 202, 111, -1, 241, 154, 3, 152, -1,
780 194, -1, 179, -1, 179, 110, 158, 111, -1, 241,
781 3, 175, -1, 241, 3, 165, -1, 241, 110, 156,
782 111, 3, 175, -1, 241, 110, 156, 111, 3, 165,
783 -1, 157, -1, 156, 115, 157, -1, 241, -1, 241,
784 116, 244, -1, 241, 116, 241, -1, 192, 116, 244,
785 -1, 192, 116, 241, -1, 159, -1, 158, 115, 159,
786 -1, 175, -1, 188, -1, 244, -1, 152, -1, -1,
787 161, -1, 162, -1, 161, 115, 162, -1, 161, 115,
788 4, 161, 5, -1, 244, 175, 229, -1, 175, 229,
789 -1, 37, 75, 175, -1, 174, -1, 164, -1, 163,
790 115, 164, -1, 244, 175, -1, 174, -1, 175, -1,
791 35, 110, 167, 111, 169, -1, -1, 95, -1, 168,
792 -1, 167, 115, 168, -1, 19, 229, -1, 20, 175,
793 166, 229, -1, 20, 183, 229, -1, 20, 184, 229,
794 -1, 19, 183, 229, -1, 19, 175, 229, -1, 19,
795 184, 229, -1, -1, 170, -1, -1, 102, 89, 110,
796 171, 172, 111, -1, 173, -1, 172, 173, -1, 6,
797 -1, 21, -1, 182, -1, 117, 172, 118, -1, 109,
798 -1, 109, 119, 189, -1, 109, 119, 234, -1, 236,
799 177, 198, -1, -1, 176, 178, -1, 154, -1, 34,
800 110, 163, 111, -1, 85, 110, 160, 111, -1, 86,
801 110, 160, 111, -1, 85, 198, 75, 243, 236, 177,
802 -1, 86, 198, 75, 243, 236, 177, -1, 25, -1,
803 25, 42, 32, 244, -1, 63, 75, 179, -1, 17,
804 -1, 17, 120, 241, -1, 242, 120, 241, -1, 17,
805 120, 244, -1, 242, -1, 242, 120, 180, -1, 181,
806 -1, 180, 120, 181, -1, 182, -1, 19, -1, 20,
807 -1, 19, -1, 183, 120, 19, -1, 183, 120, 20,
808 -1, 18, -1, 244, 175, 3, 186, -1, 188, -1,
809 189, -1, 244, 116, 186, -1, -1, 110, 187, 191,
810 -1, 70, -1, 52, -1, 93, -1, 8, -1, 10,
811 -1, 190, -1, 234, -1, 244, -1, 241, 120, 244,
812 -1, 9, -1, 15, -1, 16, -1, 7, -1, 191,
813 7, -1, 31, -1, 70, -1, 83, -1, 193, -1,
814 74, 88, -1, 72, 58, -1, 84, -1, 51, -1,
815 43, 78, -1, 33, 88, -1, 98, -1, 54, -1,
816 195, -1, 65, -1, 47, -1, 29, 88, -1, 192,
817 -1, 193, 231, -1, 30, -1, 55, -1, 56, -1,
818 57, -1, 66, -1, 71, -1, 81, -1, 90, -1,
819 92, -1, 97, -1, 99, -1, 100, -1, 101, -1,
820 73, -1, 106, -1, 107, -1, 104, -1, 105, -1,
821 -1, 199, -1, 200, -1, 201, -1, 87, 112, 202,
822 113, -1, 112, 202, 113, -1, 201, 112, 202, 113,
823 -1, 109, -1, 203, -1, 203, 115, 109, -1, 203,
824 115, 109, 115, 203, -1, 218, -1, 204, -1, 24,
825 103, 207, -1, 205, -1, 204, 196, 205, -1, 206,
826 -1, 205, 197, 206, -1, 207, -1, 207, 103, 207,
827 -1, 209, 112, 202, 113, -1, 112, 202, 113, -1,
828 210, -1, 212, -1, 210, 222, 210, -1, 68, 222,
829 210, -1, 210, 222, 67, -1, 68, 222, 67, -1,
830 213, -1, 208, -1, 77, 9, -1, 77, 244, -1,
831 87, -1, 53, -1, 52, -1, 93, -1, 235, -1,
832 190, -1, 211, -1, 244, -1, 8, -1, 10, -1,
833 241, -1, 102, 36, 201, -1, 102, 37, 110, 214,
834 111, -1, 215, -1, 214, 115, 215, -1, 109, -1,
835 244, 198, 216, -1, -1, 217, -1, 80, -1, 22,
836 -1, 76, -1, 219, -1, 223, -1, 221, -1, -1,
837 38, 32, 110, 220, 191, -1, 39, 175, -1, 108,
838 -1, 108, 121, -1, 121, 108, -1, 121, 108, 121,
839 -1, 224, -1, 225, -1, 110, 241, 111, -1, 224,
840 110, 226, 111, -1, 227, -1, 226, 115, 227, -1,
841 122, 228, -1, 122, 120, 228, -1, 244, -1, 228,
842 120, 244, -1, -1, 230, -1, 76, -1, 40, 186,
843 -1, 110, 111, -1, 110, 232, 111, -1, 233, -1,
844 232, 115, 233, -1, 244, -1, 244, 112, 234, 113,
845 -1, 244, 112, 189, 113, -1, 234, -1, 109, -1,
846 12, -1, 13, -1, 234, -1, 14, -1, -1, 237,
847 -1, 238, 240, -1, 117, 239, 12, 118, -1, -1,
848 96, -1, 26, -1, 82, -1, -1, 59, -1, 48,
849 -1, 17, -1, 18, -1, 18, -1, -1, 244, -1,
850 11, -1
Lev Walkin418298d2006-07-13 08:24:20 +0000851};
852
853/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700854static const yytype_uint16 yyrline[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000855{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700856 0, 357, 357, 363, 368, 385, 385, 414, 415, 419,
857 422, 428, 434, 443, 447, 451, 461, 462, 471, 474,
858 483, 486, 489, 492, 496, 517, 518, 527, 536, 539,
859 555, 562, 575, 583, 582, 596, 609, 610, 613, 623,
860 629, 630, 633, 638, 645, 646, 650, 661, 666, 673,
861 679, 685, 695, 696, 708, 711, 714, 722, 727, 734,
862 740, 746, 755, 758, 768, 781, 791, 811, 817, 833,
863 839, 847, 856, 867, 871, 878, 885, 893, 904, 909,
864 916, 919, 927, 938, 961, 962, 965, 970, 974, 981,
865 988, 994, 1001, 1007, 1012, 1019, 1024, 1027, 1034, 1044,
866 1045, 1049, 1056, 1066, 1076, 1087, 1097, 1108, 1118, 1129,
867 1141, 1142, 1149, 1148, 1157, 1161, 1168, 1172, 1175, 1179,
868 1185, 1193, 1202, 1214, 1236, 1243, 1262, 1265, 1271, 1277,
869 1283, 1293, 1303, 1309, 1320, 1335, 1343, 1353, 1363, 1373,
870 1381, 1403, 1411, 1420, 1424, 1429, 1438, 1442, 1446, 1453,
871 1473, 1483, 1484, 1485, 1492, 1492, 1497, 1505, 1510, 1515,
872 1519, 1523, 1526, 1532, 1543, 1561, 1565, 1570, 1578, 1587,
873 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611,
874 1612, 1613, 1614, 1621, 1622, 1623, 1627, 1633, 1646, 1647,
875 1651, 1655, 1656, 1657, 1658, 1659, 1663, 1664, 1665, 1666,
876 1670, 1671, 1678, 1678, 1679, 1679, 1682, 1683, 1689, 1693,
877 1696, 1706, 1709, 1715, 1719, 1722, 1728, 1736, 1742, 1743,
878 1749, 1750, 1756, 1757, 1764, 1765, 1771, 1779, 1787, 1793,
879 1799, 1806, 1814, 1822, 1831, 1834, 1840, 1845, 1856, 1859,
880 1865, 1870, 1875, 1876, 1877, 1878, 1892, 1896, 1903, 1917,
881 1920, 1926, 1929, 1935, 1941, 1955, 1956, 1960, 1963, 1966,
882 1974, 1975, 1976, 1981, 1980, 1992, 2000, 2001, 2002, 2003,
883 2006, 2009, 2018, 2033, 2039, 2045, 2059, 2070, 2086, 2089,
884 2107, 2111, 2115, 2119, 2142, 2146, 2152, 2157, 2164, 2171,
885 2179, 2187, 2194, 2205, 2209, 2216, 2217, 2248, 2249, 2253,
886 2260, 2266, 2267, 2268, 2269, 2273, 2274, 2275, 2279, 2283,
887 2291, 2298, 2299, 2305
Lev Walkin418298d2006-07-13 08:24:20 +0000888};
889#endif
890
Lev Walkin0e90aa02013-03-19 16:17:13 -0700891#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
892/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
893 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
Lev Walkin418298d2006-07-13 08:24:20 +0000894static const char *const yytname[] =
895{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700896 "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft",
897 "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring",
898 "TOK_cstring", "TOK_hstring", "TOK_identifier", "TOK_number",
899 "TOK_number_negative", "TOK_realnumber", "TOK_tuple", "TOK_quadruple",
900 "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference",
901 "TOK_valuefieldreference", "TOK_Literal", "TOK_ABSENT",
902 "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY", "TOK_APPLICATION",
903 "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT", "TOK_BMPString", "TOK_BOOLEAN",
904 "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE", "TOK_CLASS", "TOK_COMPONENT",
905 "TOK_COMPONENTS", "TOK_CONSTRAINED", "TOK_CONTAINING", "TOK_DEFAULT",
906 "TOK_DEFINITIONS", "TOK_DEFINED", "TOK_EMBEDDED", "TOK_ENCODED",
907 "TOK_ENCODING_CONTROL", "TOK_END", "TOK_ENUMERATED", "TOK_EXPLICIT",
908 "TOK_EXPORTS", "TOK_EXTENSIBILITY", "TOK_EXTERNAL", "TOK_FALSE",
909 "TOK_FROM", "TOK_GeneralizedTime", "TOK_GeneralString",
910 "TOK_GraphicString", "TOK_IA5String", "TOK_IDENTIFIER", "TOK_IMPLICIT",
911 "TOK_IMPLIED", "TOK_IMPORTS", "TOK_INCLUDES", "TOK_INSTANCE",
912 "TOK_INSTRUCTIONS", "TOK_INTEGER", "TOK_ISO646String", "TOK_MAX",
913 "TOK_MIN", "TOK_MINUS_INFINITY", "TOK_NULL", "TOK_NumericString",
914 "TOK_OBJECT", "TOK_ObjectDescriptor", "TOK_OCTET", "TOK_OF",
915 "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV", "TOK_PLUS_INFINITY",
916 "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE", "TOK_REAL",
917 "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE", "TOK_STRING",
918 "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS", "TOK_TeletexString",
919 "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE", "TOK_UNIVERSAL",
920 "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String",
921 "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH", "TOK_EXCEPT",
922 "'^'", "TOK_INTERSECTION", "'|'", "TOK_UNION", "TOK_TwoDots",
923 "TOK_ThreeDots", "'{'", "'}'", "'('", "')'", "';'", "','", "':'", "'['",
924 "']'", "'!'", "'.'", "'<'", "'@'", "$accept", "ParsedGrammar",
925 "ModuleList", "ModuleDefinition", "@1", "optObjectIdentifier",
926 "ObjectIdentifier", "ObjectIdentifierBody", "ObjectIdentifierElement",
927 "optModuleDefinitionFlags", "ModuleDefinitionFlags",
928 "ModuleDefinitionFlag", "optModuleBody", "ModuleBody", "AssignmentList",
929 "Assignment", "@2", "optImports", "ImportsDefinition",
930 "optImportsBundleSet", "ImportsBundleSet", "AssignedIdentifier",
931 "ImportsBundle", "ImportsList", "ImportsElement", "optExports",
932 "ExportsDefinition", "ExportsBody", "ExportsElement", "ValueSet",
933 "ValueSetTypeAssignment", "DefinedType", "DataTypeReference",
934 "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList",
935 "ActualParameter", "optComponentTypeLists", "ComponentTypeLists",
936 "ComponentType", "AlternativeTypeLists", "AlternativeType",
937 "ObjectClass", "optUnique", "FieldSpec", "ClassField", "optWithSyntax",
938 "WithSyntax", "@3", "WithSyntaxList", "WithSyntaxToken",
939 "ExtensionAndException", "Type", "NSTD_IndirectMarker",
940 "TypeDeclaration", "TypeDeclarationSet", "ComplexTypeReference",
941 "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement",
942 "PrimitiveFieldReference", "FieldName", "DefinedObjectClass",
943 "ValueAssignment", "Value", "@4", "SimpleValue", "DefinedValue",
944 "RestrictedCharacterStringValue", "Opaque", "BasicTypeId",
945 "BasicTypeId_UniverationCompatible", "BasicType", "BasicString",
946 "UnionMark", "IntersectionMark", "optConstraints", "Constraint",
947 "SubtypeConstraint", "SetOfConstraints", "ElementSetSpecs",
948 "ElementSetSpec", "Unions", "Intersections", "IntersectionElements",
949 "ConstraintSubtypeElement", "PatternConstraint", "ConstraintSpec",
950 "SingleValue", "BitStringValue", "ContainedSubtype",
951 "InnerTypeConstraint", "WithComponentsList", "WithComponentsElement",
952 "optPresenceConstraint", "PresenceConstraint", "GeneralConstraint",
953 "UserDefinedConstraint", "@5", "ContentsConstraint",
954 "ConstraintRangeSpec", "TableConstraint", "SimpleTableConstraint",
955 "ComponentRelationConstraint", "AtNotationList", "AtNotationElement",
956 "ComponentIdList", "optMarker", "Marker", "UniverationDefinition",
957 "UniverationList", "UniverationElement", "SignedNumber", "RealValue",
958 "optTag", "Tag", "TagTypeValue", "TagClass", "TagPlicit", "TypeRefName",
Lev Walkinadf863f2006-09-05 16:18:34 +0000959 "ObjectClassReference", "optIdentifier", "Identifier", 0
Lev Walkin418298d2006-07-13 08:24:20 +0000960};
961#endif
962
963# ifdef YYPRINT
964/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
965 token YYLEX-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700966static const yytype_uint16 yytoknum[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000967{
968 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
969 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
970 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
971 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
972 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
973 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
974 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
975 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
976 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
977 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700978 355, 356, 357, 358, 94, 359, 124, 360, 361, 362,
979 123, 125, 40, 41, 59, 44, 58, 91, 93, 33,
980 46, 60, 64
Lev Walkin418298d2006-07-13 08:24:20 +0000981};
982# endif
983
984/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700985static const yytype_uint8 yyr1[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000986{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700987 0, 123, 124, 125, 125, 127, 126, 128, 128, 129,
988 129, 130, 130, 131, 131, 131, 132, 132, 133, 133,
989 134, 134, 134, 134, 134, 135, 135, 136, 137, 137,
990 138, 138, 138, 139, 138, 138, 140, 140, 141, 141,
991 142, 142, 143, 143, 144, 144, 145, 146, 146, 147,
992 147, 147, 148, 148, 149, 149, 149, 150, 150, 151,
993 151, 151, 152, 153, 154, 154, 154, 155, 155, 155,
994 155, 156, 156, 157, 157, 157, 157, 157, 158, 158,
995 159, 159, 159, 159, 160, 160, 161, 161, 161, 162,
996 162, 162, 162, 163, 163, 164, 164, 164, 165, 166,
997 166, 167, 167, 168, 168, 168, 168, 168, 168, 168,
998 169, 169, 171, 170, 172, 172, 173, 173, 173, 173,
999 174, 174, 174, 175, 176, 177, 178, 178, 178, 178,
1000 178, 178, 178, 178, 178, 179, 179, 179, 179, 179,
1001 179, 180, 180, 181, 182, 182, 183, 183, 183, 184,
1002 185, 186, 186, 186, 187, 186, 186, 188, 188, 188,
1003 188, 188, 188, 189, 189, 190, 190, 190, 191, 191,
1004 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
1005 192, 192, 192, 193, 193, 193, 194, 194, 195, 195,
1006 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
1007 195, 195, 196, 196, 197, 197, 198, 198, 199, 200,
1008 200, 201, 201, 202, 202, 202, 202, 202, 203, 203,
1009 204, 204, 205, 205, 206, 206, 207, 207, 207, 207,
1010 207, 207, 207, 207, 207, 207, 208, 208, 209, 209,
1011 210, 210, 210, 210, 210, 210, 211, 211, 212, 213,
1012 213, 214, 214, 215, 215, 216, 216, 217, 217, 217,
1013 218, 218, 218, 220, 219, 221, 222, 222, 222, 222,
1014 223, 223, 224, 225, 226, 226, 227, 227, 228, 228,
1015 229, 229, 230, 230, 231, 231, 232, 232, 233, 233,
1016 233, 233, 233, 234, 234, 235, 235, 236, 236, 237,
1017 238, 239, 239, 239, 239, 240, 240, 240, 241, 241,
1018 242, 243, 243, 244
Lev Walkin418298d2006-07-13 08:24:20 +00001019};
1020
1021/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001022static const yytype_uint8 yyr2[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001023{
Lev Walkina9532f42006-09-17 04:52:50 +00001024 0, 2, 1, 1, 2, 0, 9, 0, 1, 3,
1025 2, 1, 2, 1, 4, 1, 0, 1, 1, 2,
1026 2, 2, 2, 2, 2, 0, 1, 3, 1, 2,
1027 1, 1, 1, 0, 3, 1, 0, 1, 3, 2,
Lev Walkin4a4543f2006-10-13 12:37:39 +00001028 0, 1, 1, 2, 0, 1, 4, 1, 3, 1,
1029 3, 1, 0, 1, 3, 3, 2, 1, 3, 1,
1030 3, 1, 3, 4, 1, 1, 4, 3, 3, 6,
1031 6, 1, 3, 1, 3, 3, 3, 3, 1, 3,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001032 1, 1, 1, 1, 0, 1, 1, 3, 5, 3,
1033 2, 3, 1, 1, 3, 2, 1, 1, 5, 0,
1034 1, 1, 3, 2, 4, 3, 3, 3, 3, 3,
1035 0, 1, 0, 6, 1, 2, 1, 1, 1, 3,
1036 1, 3, 3, 3, 0, 2, 1, 4, 4, 4,
1037 6, 6, 1, 4, 3, 1, 3, 3, 3, 1,
1038 3, 1, 3, 1, 1, 1, 1, 3, 3, 1,
1039 4, 1, 1, 3, 0, 3, 1, 1, 1, 1,
1040 1, 1, 1, 1, 3, 1, 1, 1, 1, 2,
1041 1, 1, 1, 1, 2, 2, 1, 1, 2, 2,
1042 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
Lev Walkin418298d2006-07-13 08:24:20 +00001043 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001044 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
1045 4, 3, 4, 1, 1, 3, 5, 1, 1, 3,
1046 1, 3, 1, 3, 1, 3, 4, 3, 1, 1,
1047 3, 3, 3, 3, 1, 1, 2, 2, 1, 1,
1048 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
1049 5, 1, 3, 1, 3, 0, 1, 1, 1, 1,
1050 1, 1, 1, 0, 5, 2, 1, 2, 2, 3,
1051 1, 1, 3, 4, 1, 3, 2, 3, 1, 3,
1052 0, 1, 1, 2, 2, 3, 1, 3, 1, 4,
1053 4, 1, 1, 1, 1, 1, 1, 0, 1, 2,
1054 4, 0, 1, 1, 1, 0, 1, 1, 1, 1,
1055 1, 0, 1, 1
Lev Walkin418298d2006-07-13 08:24:20 +00001056};
1057
1058/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1059 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1060 means the default is an error. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001061static const yytype_uint16 yydefact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001062{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001063 0, 308, 309, 0, 2, 3, 5, 1, 4, 7,
1064 0, 0, 8, 313, 15, 10, 0, 11, 13, 16,
Lev Walkina9532f42006-09-17 04:52:50 +00001065 9, 12, 0, 0, 0, 0, 0, 0, 0, 17,
1066 18, 0, 24, 22, 20, 23, 21, 0, 19, 14,
Lev Walkin4a4543f2006-10-13 12:37:39 +00001067 52, 0, 0, 26, 36, 53, 0, 56, 0, 57,
1068 59, 61, 6, 40, 0, 37, 55, 54, 0, 0,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001069 39, 0, 41, 42, 0, 47, 49, 51, 188, 0,
1070 189, 190, 191, 192, 193, 201, 194, 195, 196, 197,
1071 198, 199, 200, 27, 28, 32, 30, 31, 35, 0,
1072 297, 58, 60, 38, 43, 0, 0, 0, 33, 29,
1073 297, 135, 310, 0, 170, 0, 0, 184, 177, 181,
1074 183, 171, 0, 0, 172, 176, 180, 0, 0, 65,
1075 186, 173, 64, 182, 139, 301, 0, 124, 298, 305,
1076 44, 48, 50, 34, 0, 68, 67, 0, 185, 179,
1077 178, 175, 174, 0, 71, 0, 173, 73, 0, 297,
1078 0, 187, 0, 303, 304, 302, 0, 0, 0, 206,
1079 307, 306, 299, 45, 46, 0, 136, 138, 0, 0,
1080 0, 0, 0, 63, 159, 165, 160, 293, 294, 166,
1081 167, 157, 158, 83, 0, 78, 80, 81, 161, 162,
1082 82, 292, 284, 0, 286, 291, 288, 144, 145, 140,
1083 141, 143, 137, 0, 156, 154, 150, 151, 152, 0,
1084 163, 132, 0, 0, 206, 206, 126, 125, 0, 0,
1085 123, 207, 208, 209, 297, 297, 0, 101, 297, 72,
1086 77, 76, 75, 74, 246, 247, 296, 0, 0, 297,
1087 240, 239, 0, 0, 238, 241, 0, 213, 0, 0,
1088 243, 0, 214, 218, 220, 222, 224, 235, 0, 228,
1089 244, 229, 234, 217, 260, 262, 261, 270, 271, 295,
1090 242, 248, 245, 66, 297, 285, 0, 0, 0, 300,
1091 0, 0, 0, 0, 297, 0, 297, 0, 297, 0,
1092 0, 0, 0, 149, 146, 0, 282, 280, 280, 280,
1093 103, 281, 99, 280, 280, 110, 0, 70, 69, 0,
1094 0, 265, 266, 0, 0, 236, 237, 0, 0, 0,
1095 0, 62, 0, 202, 203, 0, 204, 205, 0, 0,
1096 0, 0, 0, 79, 287, 0, 0, 163, 142, 168,
1097 155, 164, 153, 0, 120, 0, 93, 96, 97, 297,
1098 134, 0, 0, 85, 86, 92, 280, 297, 311, 0,
1099 311, 0, 211, 0, 283, 108, 0, 107, 109, 100,
1100 280, 105, 106, 0, 98, 111, 102, 219, 263, 267,
1101 268, 233, 231, 249, 0, 272, 227, 215, 221, 223,
1102 225, 0, 232, 230, 0, 0, 274, 290, 289, 169,
1103 133, 0, 127, 297, 95, 297, 128, 297, 90, 280,
1104 297, 312, 129, 297, 210, 212, 147, 148, 104, 0,
1105 0, 269, 253, 0, 251, 206, 0, 226, 0, 276,
1106 278, 273, 0, 121, 122, 94, 91, 297, 87, 89,
1107 124, 124, 112, 264, 250, 0, 255, 216, 277, 0,
1108 275, 0, 130, 131, 0, 252, 258, 259, 257, 254,
1109 256, 279, 88, 116, 117, 0, 0, 114, 118, 0,
1110 113, 115, 119
Lev Walkin418298d2006-07-13 08:24:20 +00001111};
1112
Lev Walkin0e90aa02013-03-19 16:17:13 -07001113/* YYDEFGOTO[NTERM-NUM]. */
1114static const yytype_int16 yydefgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001115{
Lev Walkina9532f42006-09-17 04:52:50 +00001116 -1, 3, 4, 5, 9, 11, 12, 16, 17, 28,
Lev Walkinc6ab03c2006-10-21 05:54:49 +00001117 29, 30, 42, 43, 83, 84, 133, 54, 55, 61,
1118 62, 164, 63, 64, 65, 44, 45, 48, 49, 183,
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00001119 85, 118, 86, 143, 144, 184, 185, 352, 353, 354,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001120 345, 346, 135, 370, 226, 227, 374, 375, 454, 466,
1121 467, 355, 356, 158, 159, 217, 119, 199, 200, 468,
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00001122 298, 299, 87, 206, 280, 207, 208, 250, 340, 120,
1123 121, 122, 123, 325, 328, 220, 221, 222, 223, 251,
1124 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001125 262, 423, 424, 459, 460, 263, 264, 420, 265, 314,
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00001126 266, 267, 268, 395, 396, 429, 300, 301, 151, 193,
1127 194, 269, 270, 127, 128, 129, 156, 162, 271, 124,
1128 410, 272
Lev Walkin418298d2006-07-13 08:24:20 +00001129};
1130
1131/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1132 STATE-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001133#define YYPACT_NINF -276
1134static const yytype_int16 yypact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001135{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001136 223, -276, -276, 28, 223, -276, -276, -276, -276, -61,
1137 13, 25, -276, -276, -276, -276, 42, -276, -56, 229,
1138 -276, -276, 90, 54, 32, 64, 129, 79, 193, 229,
1139 -276, 104, -276, -276, -276, -276, -276, 197, -276, -276,
1140 133, 66, 185, -276, 191, -276, 144, -276, 154, -276,
1141 176, -276, -276, 196, 524, -276, -276, -276, 237, 149,
1142 -276, 177, 237, -276, -26, -276, 189, -276, -276, 291,
1143 -276, -276, -276, -276, -276, -276, -276, -276, -276, -276,
1144 -276, -276, -276, 524, -276, -276, -276, -276, -276, 272,
1145 200, -276, -276, -276, -276, 223, 237, 209, -276, -276,
1146 -18, 202, -276, 247, -276, 253, 269, -276, -276, -276,
1147 -276, -276, 296, 261, -276, -276, -276, 692, 356, 255,
1148 -276, 258, -276, -276, 243, 77, 372, -276, -276, 184,
1149 -61, -276, -276, -276, 266, -276, -276, 237, -276, -276,
1150 -276, -276, -276, -64, -276, 262, -276, 263, 267, 99,
1151 84, -276, 294, -276, -276, -276, 368, 211, 616, -57,
1152 -276, -276, -276, -276, -276, 288, -276, -276, 378, 692,
1153 237, 237, 399, -276, -276, -276, -276, -276, -276, -276,
1154 -276, -276, -276, -276, 150, -276, -276, -276, -276, -276,
1155 -276, -276, -276, 169, -276, -276, 271, -276, -276, 265,
1156 -276, -276, -276, 268, -276, -276, -276, -276, -276, 270,
1157 273, 345, 278, 317, 78, 124, -276, -276, 282, 399,
1158 -276, -276, -276, 283, 219, 46, 181, -276, -18, -276,
1159 -276, -276, -276, -276, -276, -276, -276, 293, 366, 200,
1160 -276, -276, 63, 199, -276, -276, 295, -276, 223, 399,
1161 -276, 289, 284, 218, 235, -276, 298, -276, 290, 63,
1162 -276, -276, -276, -276, -276, -276, -276, 309, -276, -276,
1163 -276, -276, -276, -276, 99, -276, 69, 233, 332, -276,
1164 396, 393, 211, 373, 49, 340, 8, 346, 8, 347,
1165 399, 307, 399, -276, -276, 211, -276, -8, 110, -8,
1166 -276, -276, 329, 110, -8, 323, 288, -276, -276, 550,
1167 316, -276, 308, 320, 190, -276, -276, 318, 321, 322,
1168 319, -276, 325, -276, -276, 550, -276, -276, 550, 550,
1169 399, 432, 314, -276, -276, 336, 337, -276, -276, -276,
1170 457, -276, -276, 393, 349, 182, -276, -276, -276, 200,
1171 -276, 390, 355, 357, -276, -276, -8, 200, 393, 359,
1172 393, 358, -276, 360, -276, -276, 341, -276, -276, -276,
1173 -8, -276, -276, 385, -276, -276, -276, -276, -276, -276,
1174 354, -276, -276, 283, 74, -276, -276, 362, 235, -276,
1175 -276, 365, -276, -276, 0, 183, -276, -276, -276, -276,
1176 -276, 233, -276, 49, -276, 200, -276, 4, -276, -8,
1177 200, -276, -276, 200, -276, -276, -276, -276, -276, 369,
1178 396, -276, -276, 195, -276, -57, 445, -276, 393, 361,
1179 -276, -276, 314, -276, -276, -276, -276, 68, -276, -276,
1180 -276, -276, -276, 457, -276, 74, 159, -276, 361, 393,
1181 -276, 11, -276, -276, 55, -276, -276, -276, -276, -276,
1182 -276, -276, -276, -276, -276, 55, 17, -276, -276, 51,
1183 -276, -276, -276
Lev Walkin418298d2006-07-13 08:24:20 +00001184};
1185
1186/* YYPGOTO[NTERM-NUM]. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001187static const yytype_int16 yypgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001188{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001189 -276, -276, -276, 476, -276, -276, 352, -276, 467, -276,
1190 -276, 456, -276, -276, -276, 404, -276, -276, -276, -276,
1191 -276, -276, 426, -276, 394, -276, -276, -276, 431, 343,
1192 -276, 335, -276, -276, 326, -276, 220, 208, 65, 93,
1193 -276, 100, 276, -276, -276, 201, -276, -276, -276, 40,
1194 -275, -270, -87, -276, -74, -276, 221, -276, 232, -148,
1195 287, 292, -276, -166, -276, -142, -265, -139, 94, -91,
1196 -75, -276, 15, -276, -276, -213, -276, -276, 198, -199,
1197 92, -276, 194, 188, -165, -276, -276, -227, -276, -276,
1198 -276, -276, 75, -276, -276, -276, -276, -276, -276, 264,
1199 -276, -276, -276, -276, 89, 96, -264, -276, -276, -276,
1200 250, -128, -276, -195, -276, -276, -276, -276, 5, -276,
1201 167, -10
Lev Walkin418298d2006-07-13 08:24:20 +00001202};
1203
1204/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1205 positive, shift that token. If negative, reduce the rule which
1206 number is the opposite. If zero, do what YYDEFACT says.
Lev Walkin0e90aa02013-03-19 16:17:13 -07001207 If YYTABLE_NINF, syntax error. */
1208#define YYTABLE_NINF -281
1209static const yytype_int16 yytable[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001210{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001211 18, 287, 289, 126, 201, 6, 18, 187, 437, 6,
1212 188, 13, 335, 136, 347, 13, 462, 134, 188, 13,
1213 291, 189, 195, 463, 13, 14, 145, 95, 7, 189,
1214 218, 51, 295, 365, 367, 368, 197, 198, 464, 371,
1215 372, 351, 146, 67, 90, 351, 50, 168, 51, 10,
1216 320, 169, 67, 13, 14, 219, 22, 463, 66, 89,
1217 13, 463, 186, 50, 293, 294, 19, 66, 296, 88,
1218 197, 198, 464, 90, 197, 198, 464, 13, 145, 13,
1219 13, 177, 178, 1, 2, 13, 67, 382, 89, 96,
1220 46, 361, 408, 363, 146, 13, 177, 178, 88, 125,
1221 130, 66, 31, 153, 393, 351, 418, 174, 175, 176,
1222 13, 177, 178, 344, 179, 180, 342, 344, 32, -84,
1223 428, 125, 147, 33, 15, 125, 407, 167, 470, 364,
1224 201, 391, 187, 347, 465, 188, 433, 297, 302, 190,
1225 196, 308, 166, 188, 377, 439, 189, 210, 195, 336,
1226 295, 181, 311, 20, 189, 34, 188, 202, 344, 154,
1227 231, 233, 209, 125, 390, 218, 125, 189, 465, 472,
1228 36, 312, 465, 155, 147, 230, 232, 344, 191, -25,
1229 47, 456, 41, 422, 313, 125, 296, 186, 286, 35,
1230 219, 471, 182, 191, 471, 192, 37, 348, 234, 175,
1231 235, 13, 177, 178, 236, 179, 180, 13, 315, 172,
1232 13, 218, 446, 1, 2, 440, 125, 39, 441, 174,
1233 175, 176, 13, 177, 178, 40, 179, 180, 1, 2,
1234 366, 52, 160, 316, 288, 457, 219, 293, 294, 458,
1235 1, 2, 240, 161, 13, 177, 178, 23, 13, 60,
1236 1, 2, 53, 319, 1, 2, 24, 381, 56, 295,
1237 92, 273, 404, 181, 190, 274, 196, 337, 57, 58,
1238 409, 341, 210, 434, 349, 100, 357, 25, 357, 26,
1239 275, 204, 209, 245, 276, 210, 59, 209, 27, 101,
1240 102, 93, 305, 402, 431, 296, 306, 403, 432, 97,
1241 209, 103, 68, 104, 182, 105, 444, 224, 225, 98,
1242 445, 1, 2, 197, 198, 106, 348, 125, 436, 107,
1243 132, 205, 137, 108, 323, 324, 109, 70, 71, 72,
1244 -280, 317, 318, 400, -280, 138, 125, 110, 73, 326,
1245 327, 139, 111, 74, 112, 75, 113, 140, 411, 142,
1246 411, 197, 198, 76, 141, 114, 115, 101, 102, 148,
1247 416, 417, 77, 152, 78, 149, 452, 453, 150, 79,
1248 116, 80, 81, 82, 425, 157, 165, 172, 170, 171,
1249 203, 228, 117, 277, 430, 278, 279, 283, 284, 282,
1250 281, 337, 285, 349, 290, 292, 309, 357, 310, 322,
1251 321, 329, 330, 339, 13, 343, 209, 234, 175, 235,
1252 13, 177, 178, 236, 179, 180, 1, 2, 430, 332,
1253 362, 358, 360, 237, 369, 373, 378, 357, 380, 379,
1254 219, 384, 386, 385, 387, 425, 394, 238, 239, 461,
1255 234, 175, 235, 13, 177, 178, 236, 179, 180, 397,
1256 398, 240, 241, 234, 175, 235, 13, 177, 178, 236,
1257 179, 180, 1, 2, 399, 405, 406, 242, 401, 237,
1258 412, 414, 407, 415, 419, 421, 243, 426, 427, 442,
1259 8, 449, 163, 21, 240, 38, 244, 99, 94, 91,
1260 131, 173, 245, 216, 333, 229, 359, 240, 241, 392,
1261 438, 246, 451, 435, 307, 469, 350, 376, 247, 248,
1262 338, 249, 303, 242, 443, 383, 389, 304, 447, 388,
1263 455, 450, 243, 331, 448, 245, 334, 413, 0, 0,
1264 0, 0, 244, 0, 0, 13, 0, 0, 245, 0,
1265 0, 1, 2, 0, 0, 0, 0, 246, 0, 0,
1266 0, 0, 0, 0, 68, 0, 0, 249, 234, 175,
1267 235, 13, 177, 178, 236, 179, 180, 1, 2, 69,
1268 0, 0, 0, 0, 0, 0, 0, 0, 0, 70,
1269 71, 72, 0, 0, 0, 0, 0, 0, 0, 0,
1270 73, 0, 0, 0, 0, 74, 0, 75, 0, 0,
1271 0, 0, 240, 241, 0, 76, 0, 0, 0, 0,
1272 0, 0, 0, 0, 77, 0, 78, 0, 242, 0,
1273 0, 79, 0, 80, 81, 82, 0, 243, 0, 0,
1274 0, 0, 0, 101, 102, 0, 0, 244, 0, 0,
1275 0, 211, 0, 245, 0, 103, 68, 104, 0, 105,
1276 212, 0, 246, 0, 0, 0, 0, 0, 0, 106,
1277 0, 0, 249, 107, 0, 0, 0, 108, 0, 0,
1278 109, 70, 71, 72, 0, 0, 0, 0, 0, 213,
1279 0, 110, 73, 0, 0, 0, 111, 74, 112, 75,
1280 113, 0, 0, 0, 0, 0, 0, 76, 0, 114,
1281 115, 214, 215, 0, 0, 0, 77, 0, 78, 1,
1282 2, 0, 0, 79, 116, 80, 81, 82, 0, 0,
1283 0, 103, 68, 104, 0, 105, 0, 0, 0, 0,
1284 0, 0, 0, 0, 0, 106, 0, 0, 0, 107,
1285 0, 0, 0, 108, 0, 0, 109, 70, 71, 72,
1286 0, 0, 0, 0, 0, 0, 0, 110, 73, 0,
1287 0, 0, 111, 74, 112, 75, 113, 0, 0, 0,
1288 0, 0, 0, 76, 0, 114, 115, 0, 0, 0,
1289 0, 0, 77, 0, 78, 0, 0, 0, 0, 79,
1290 116, 80, 81, 82
Lev Walkin418298d2006-07-13 08:24:20 +00001291};
1292
Lev Walkin0e90aa02013-03-19 16:17:13 -07001293static const yytype_int16 yycheck[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001294{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001295 10, 214, 215, 90, 152, 0, 16, 149, 4, 4,
1296 149, 11, 277, 100, 284, 11, 5, 35, 157, 11,
1297 219, 149, 150, 6, 11, 12, 117, 53, 0, 157,
1298 87, 41, 40, 297, 298, 299, 19, 20, 21, 303,
1299 304, 37, 117, 53, 54, 37, 41, 111, 58, 110,
1300 249, 115, 62, 11, 12, 112, 112, 6, 53, 54,
1301 11, 6, 149, 58, 18, 19, 41, 62, 76, 54,
1302 19, 20, 21, 83, 19, 20, 21, 11, 169, 11,
1303 11, 12, 13, 17, 18, 11, 96, 314, 83, 115,
1304 24, 290, 356, 292, 169, 11, 12, 13, 83, 117,
1305 95, 96, 12, 26, 331, 37, 370, 8, 9, 10,
1306 11, 12, 13, 109, 15, 16, 282, 109, 64, 111,
1307 120, 117, 117, 91, 111, 117, 115, 137, 111, 295,
1308 278, 330, 274, 403, 117, 274, 401, 224, 225, 149,
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00001309 150, 228, 137, 282, 309, 409, 274, 157, 276, 277,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001310 40, 52, 239, 111, 282, 91, 295, 152, 109, 82,
1311 170, 171, 157, 117, 329, 87, 117, 295, 117, 118,
1312 91, 108, 117, 96, 169, 170, 171, 109, 109, 46,
1313 114, 22, 49, 109, 121, 117, 76, 274, 110, 60,
1314 112, 466, 93, 109, 469, 111, 3, 284, 8, 9,
1315 10, 11, 12, 13, 14, 15, 16, 11, 9, 110,
1316 11, 87, 425, 17, 18, 410, 117, 113, 413, 8,
1317 9, 10, 11, 12, 13, 28, 15, 16, 17, 18,
1318 120, 46, 48, 243, 110, 76, 112, 18, 19, 80,
1319 17, 18, 52, 59, 11, 12, 13, 18, 11, 53,
1320 17, 18, 61, 248, 17, 18, 27, 67, 114, 40,
1321 111, 111, 349, 52, 274, 115, 276, 277, 114, 115,
1322 357, 281, 282, 401, 284, 3, 286, 48, 288, 50,
1323 111, 70, 277, 93, 115, 295, 110, 282, 59, 17,
1324 18, 114, 111, 111, 111, 76, 115, 115, 115, 110,
1325 295, 29, 30, 31, 93, 33, 111, 19, 20, 18,
1326 115, 17, 18, 19, 20, 43, 403, 117, 405, 47,
1327 111, 110, 120, 51, 106, 107, 54, 55, 56, 57,
1328 111, 36, 37, 343, 115, 88, 117, 65, 66, 104,
1329 105, 88, 70, 71, 72, 73, 74, 78, 358, 88,
1330 360, 19, 20, 81, 58, 83, 84, 17, 18, 3,
1331 19, 20, 90, 120, 92, 110, 440, 441, 110, 97,
1332 98, 99, 100, 101, 384, 3, 110, 110, 116, 116,
1333 12, 3, 110, 112, 394, 120, 118, 42, 110, 116,
1334 120, 401, 75, 403, 112, 112, 103, 407, 32, 115,
1335 111, 103, 112, 7, 11, 32, 401, 8, 9, 10,
1336 11, 12, 13, 14, 15, 16, 17, 18, 428, 110,
1337 113, 75, 75, 24, 95, 102, 110, 437, 108, 121,
1338 112, 110, 113, 111, 109, 445, 122, 38, 39, 449,
1339 8, 9, 10, 11, 12, 13, 14, 15, 16, 113,
1340 113, 52, 53, 8, 9, 10, 11, 12, 13, 14,
1341 15, 16, 17, 18, 7, 75, 111, 68, 119, 24,
1342 111, 113, 115, 113, 89, 121, 77, 115, 113, 110,
1343 4, 120, 130, 16, 52, 29, 87, 83, 62, 58,
1344 96, 148, 93, 158, 274, 169, 288, 52, 53, 67,
1345 407, 102, 437, 403, 228, 465, 285, 306, 109, 110,
1346 278, 112, 225, 68, 420, 317, 328, 225, 426, 325,
1347 445, 432, 77, 259, 428, 93, 276, 360, -1, -1,
1348 -1, -1, 87, -1, -1, 11, -1, -1, 93, -1,
1349 -1, 17, 18, -1, -1, -1, -1, 102, -1, -1,
1350 -1, -1, -1, -1, 30, -1, -1, 112, 8, 9,
1351 10, 11, 12, 13, 14, 15, 16, 17, 18, 45,
1352 -1, -1, -1, -1, -1, -1, -1, -1, -1, 55,
1353 56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
1354 66, -1, -1, -1, -1, 71, -1, 73, -1, -1,
1355 -1, -1, 52, 53, -1, 81, -1, -1, -1, -1,
1356 -1, -1, -1, -1, 90, -1, 92, -1, 68, -1,
1357 -1, 97, -1, 99, 100, 101, -1, 77, -1, -1,
1358 -1, -1, -1, 17, 18, -1, -1, 87, -1, -1,
1359 -1, 25, -1, 93, -1, 29, 30, 31, -1, 33,
1360 34, -1, 102, -1, -1, -1, -1, -1, -1, 43,
1361 -1, -1, 112, 47, -1, -1, -1, 51, -1, -1,
1362 54, 55, 56, 57, -1, -1, -1, -1, -1, 63,
1363 -1, 65, 66, -1, -1, -1, 70, 71, 72, 73,
1364 74, -1, -1, -1, -1, -1, -1, 81, -1, 83,
1365 84, 85, 86, -1, -1, -1, 90, -1, 92, 17,
1366 18, -1, -1, 97, 98, 99, 100, 101, -1, -1,
1367 -1, 29, 30, 31, -1, 33, -1, -1, -1, -1,
1368 -1, -1, -1, -1, -1, 43, -1, -1, -1, 47,
1369 -1, -1, -1, 51, -1, -1, 54, 55, 56, 57,
1370 -1, -1, -1, -1, -1, -1, -1, 65, 66, -1,
1371 -1, -1, 70, 71, 72, 73, 74, -1, -1, -1,
1372 -1, -1, -1, 81, -1, 83, 84, -1, -1, -1,
1373 -1, -1, 90, -1, 92, -1, -1, -1, -1, 97,
1374 98, 99, 100, 101
Lev Walkin418298d2006-07-13 08:24:20 +00001375};
1376
1377/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1378 symbol of state STATE-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001379static const yytype_uint8 yystos[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001380{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001381 0, 17, 18, 124, 125, 126, 241, 0, 126, 127,
1382 110, 128, 129, 11, 12, 111, 130, 131, 244, 41,
1383 111, 131, 112, 18, 27, 48, 50, 59, 132, 133,
1384 134, 12, 64, 91, 91, 60, 91, 3, 134, 113,
1385 28, 49, 135, 136, 148, 149, 24, 114, 150, 151,
1386 241, 244, 46, 61, 140, 141, 114, 114, 115, 110,
1387 53, 142, 143, 145, 146, 147, 241, 244, 30, 45,
1388 55, 56, 57, 66, 71, 73, 81, 90, 92, 97,
1389 99, 100, 101, 137, 138, 153, 155, 185, 195, 241,
1390 244, 151, 111, 114, 145, 53, 115, 110, 18, 138,
1391 3, 17, 18, 29, 31, 33, 43, 47, 51, 54,
1392 65, 70, 72, 74, 83, 84, 98, 110, 154, 179,
1393 192, 193, 194, 195, 242, 117, 175, 236, 237, 238,
1394 241, 147, 111, 139, 35, 165, 175, 120, 88, 88,
1395 78, 58, 88, 156, 157, 192, 193, 241, 3, 110,
1396 110, 231, 120, 26, 82, 96, 239, 3, 176, 177,
1397 48, 59, 240, 129, 144, 110, 241, 244, 111, 115,
1398 116, 116, 110, 152, 8, 9, 10, 12, 13, 15,
1399 16, 52, 93, 152, 158, 159, 175, 188, 190, 234,
1400 244, 109, 111, 232, 233, 234, 244, 19, 20, 180,
1401 181, 182, 241, 12, 70, 110, 186, 188, 189, 241,
1402 244, 25, 34, 63, 85, 86, 154, 178, 87, 112,
1403 198, 199, 200, 201, 19, 20, 167, 168, 3, 157,
1404 241, 244, 241, 244, 8, 10, 14, 24, 38, 39,
1405 52, 53, 68, 77, 87, 93, 102, 109, 110, 112,
1406 190, 202, 203, 204, 205, 206, 207, 208, 209, 210,
1407 211, 212, 213, 218, 219, 221, 223, 224, 225, 234,
1408 235, 241, 244, 111, 115, 111, 115, 112, 120, 118,
1409 187, 120, 116, 42, 110, 75, 110, 198, 110, 198,
1410 112, 202, 112, 18, 19, 40, 76, 175, 183, 184,
1411 229, 230, 175, 183, 184, 111, 115, 165, 175, 103,
1412 32, 175, 108, 121, 222, 9, 244, 36, 37, 241,
1413 202, 111, 115, 106, 107, 196, 104, 105, 197, 103,
1414 112, 222, 110, 159, 233, 189, 234, 244, 181, 7,
1415 191, 244, 186, 32, 109, 163, 164, 174, 175, 244,
1416 179, 37, 160, 161, 162, 174, 175, 244, 75, 160,
1417 75, 202, 113, 202, 186, 229, 120, 229, 229, 95,
1418 166, 229, 229, 102, 169, 170, 168, 207, 110, 121,
1419 108, 67, 210, 201, 110, 111, 113, 109, 205, 206,
1420 207, 202, 67, 210, 122, 226, 227, 113, 113, 7,
1421 244, 119, 111, 115, 175, 75, 111, 115, 229, 175,
1422 243, 244, 111, 243, 113, 113, 19, 20, 229, 89,
1423 220, 121, 109, 214, 215, 244, 115, 113, 120, 228,
1424 244, 111, 115, 189, 234, 164, 175, 4, 162, 229,
1425 236, 236, 110, 191, 111, 115, 198, 203, 228, 120,
1426 227, 161, 177, 177, 171, 215, 22, 76, 80, 216,
1427 217, 244, 5, 6, 21, 117, 172, 173, 182, 172,
1428 111, 173, 118
Lev Walkin418298d2006-07-13 08:24:20 +00001429};
1430
Lev Walkinf15320b2004-06-03 03:38:44 +00001431#define yyerrok (yyerrstatus = 0)
1432#define yyclearin (yychar = YYEMPTY)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001433#define YYEMPTY (-2)
Lev Walkinf15320b2004-06-03 03:38:44 +00001434#define YYEOF 0
Lev Walkin418298d2006-07-13 08:24:20 +00001435
Lev Walkinf15320b2004-06-03 03:38:44 +00001436#define YYACCEPT goto yyacceptlab
Lev Walkin418298d2006-07-13 08:24:20 +00001437#define YYABORT goto yyabortlab
Lev Walkin0e90aa02013-03-19 16:17:13 -07001438#define YYERROR goto yyerrorlab
1439
Lev Walkin418298d2006-07-13 08:24:20 +00001440
1441/* Like YYERROR except do call yyerror. This remains here temporarily
1442 to ease the transition to the new meaning of YYERROR, for GCC.
Lev Walkinf15320b2004-06-03 03:38:44 +00001443 Once GCC version 2 has supplanted version 1, this can go. */
Lev Walkin418298d2006-07-13 08:24:20 +00001444
Lev Walkinf15320b2004-06-03 03:38:44 +00001445#define YYFAIL goto yyerrlab
Lev Walkin418298d2006-07-13 08:24:20 +00001446
Lev Walkinf15320b2004-06-03 03:38:44 +00001447#define YYRECOVERING() (!!yyerrstatus)
Lev Walkin418298d2006-07-13 08:24:20 +00001448
1449#define YYBACKUP(Token, Value) \
Lev Walkinf15320b2004-06-03 03:38:44 +00001450do \
1451 if (yychar == YYEMPTY && yylen == 1) \
Lev Walkin418298d2006-07-13 08:24:20 +00001452 { \
1453 yychar = (Token); \
1454 yylval = (Value); \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001455 yytoken = YYTRANSLATE (yychar); \
1456 YYPOPSTACK (1); \
Lev Walkinf15320b2004-06-03 03:38:44 +00001457 goto yybackup; \
1458 } \
1459 else \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001460 { \
1461 yyerror (YY_("syntax error: cannot back up")); \
Lev Walkin418298d2006-07-13 08:24:20 +00001462 YYERROR; \
1463 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001464while (YYID (0))
1465
Lev Walkinf15320b2004-06-03 03:38:44 +00001466
1467#define YYTERROR 1
1468#define YYERRCODE 256
1469
Lev Walkin418298d2006-07-13 08:24:20 +00001470
Lev Walkin0e90aa02013-03-19 16:17:13 -07001471/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1472 If N is 0, then set CURRENT to the empty location which ends
1473 the previous symbol: RHS[0] (always defined). */
1474
1475#define YYRHSLOC(Rhs, K) ((Rhs)[K])
Lev Walkin418298d2006-07-13 08:24:20 +00001476#ifndef YYLLOC_DEFAULT
Lev Walkin0e90aa02013-03-19 16:17:13 -07001477# define YYLLOC_DEFAULT(Current, Rhs, N) \
1478 do \
1479 if (YYID (N)) \
1480 { \
1481 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1482 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1483 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1484 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1485 } \
1486 else \
1487 { \
1488 (Current).first_line = (Current).last_line = \
1489 YYRHSLOC (Rhs, 0).last_line; \
1490 (Current).first_column = (Current).last_column = \
1491 YYRHSLOC (Rhs, 0).last_column; \
1492 } \
1493 while (YYID (0))
Lev Walkinf15320b2004-06-03 03:38:44 +00001494#endif
1495
Lev Walkin0e90aa02013-03-19 16:17:13 -07001496
1497/* YY_LOCATION_PRINT -- Print the location on the stream.
1498 This macro was not mandated originally: define only if we know
1499 we won't break user code: when these are the locations we know. */
1500
1501#ifndef YY_LOCATION_PRINT
1502# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1503# define YY_LOCATION_PRINT(File, Loc) \
1504 fprintf (File, "%d.%d-%d.%d", \
1505 (Loc).first_line, (Loc).first_column, \
1506 (Loc).last_line, (Loc).last_column)
1507# else
1508# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1509# endif
1510#endif
1511
1512
Lev Walkin418298d2006-07-13 08:24:20 +00001513/* YYLEX -- calling `yylex' with the right arguments. */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001514
Lev Walkin0e90aa02013-03-19 16:17:13 -07001515#ifdef YYLEX_PARAM
1516# define YYLEX yylex (YYLEX_PARAM)
1517#else
1518# define YYLEX yylex ()
1519#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001520
Lev Walkin418298d2006-07-13 08:24:20 +00001521/* Enable debugging if requested. */
1522#if YYDEBUG
Lev Walkinfb872bd2006-03-18 06:53:11 +00001523
Lev Walkin418298d2006-07-13 08:24:20 +00001524# ifndef YYFPRINTF
1525# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1526# define YYFPRINTF fprintf
1527# endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001528
Lev Walkin418298d2006-07-13 08:24:20 +00001529# define YYDPRINTF(Args) \
1530do { \
1531 if (yydebug) \
1532 YYFPRINTF Args; \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001533} while (YYID (0))
1534
1535# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1536do { \
1537 if (yydebug) \
1538 { \
1539 YYFPRINTF (stderr, "%s ", Title); \
1540 yy_symbol_print (stderr, \
1541 Type, Value); \
1542 YYFPRINTF (stderr, "\n"); \
1543 } \
1544} while (YYID (0))
1545
1546
1547/*--------------------------------.
1548| Print this symbol on YYOUTPUT. |
1549`--------------------------------*/
1550
1551/*ARGSUSED*/
1552#if (defined __STDC__ || defined __C99__FUNC__ \
1553 || defined __cplusplus || defined _MSC_VER)
1554static void
1555yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1556#else
1557static void
1558yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1559 FILE *yyoutput;
1560 int yytype;
1561 YYSTYPE const * const yyvaluep;
1562#endif
1563{
1564 if (!yyvaluep)
1565 return;
1566# ifdef YYPRINT
1567 if (yytype < YYNTOKENS)
1568 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1569# else
1570 YYUSE (yyoutput);
1571# endif
1572 switch (yytype)
1573 {
1574 default:
1575 break;
1576 }
1577}
1578
1579
1580/*--------------------------------.
1581| Print this symbol on YYOUTPUT. |
1582`--------------------------------*/
1583
1584#if (defined __STDC__ || defined __C99__FUNC__ \
1585 || defined __cplusplus || defined _MSC_VER)
1586static void
1587yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1588#else
1589static void
1590yy_symbol_print (yyoutput, yytype, yyvaluep)
1591 FILE *yyoutput;
1592 int yytype;
1593 YYSTYPE const * const yyvaluep;
1594#endif
1595{
1596 if (yytype < YYNTOKENS)
1597 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1598 else
1599 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1600
1601 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1602 YYFPRINTF (yyoutput, ")");
1603}
1604
1605/*------------------------------------------------------------------.
1606| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1607| TOP (included). |
1608`------------------------------------------------------------------*/
1609
1610#if (defined __STDC__ || defined __C99__FUNC__ \
1611 || defined __cplusplus || defined _MSC_VER)
1612static void
1613yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1614#else
1615static void
1616yy_stack_print (bottom, top)
1617 yytype_int16 *bottom;
1618 yytype_int16 *top;
1619#endif
1620{
1621 YYFPRINTF (stderr, "Stack now");
1622 for (; bottom <= top; ++bottom)
1623 YYFPRINTF (stderr, " %d", *bottom);
1624 YYFPRINTF (stderr, "\n");
1625}
1626
1627# define YY_STACK_PRINT(Bottom, Top) \
1628do { \
1629 if (yydebug) \
1630 yy_stack_print ((Bottom), (Top)); \
1631} while (YYID (0))
1632
1633
1634/*------------------------------------------------.
1635| Report that the YYRULE is going to be reduced. |
1636`------------------------------------------------*/
1637
1638#if (defined __STDC__ || defined __C99__FUNC__ \
1639 || defined __cplusplus || defined _MSC_VER)
1640static void
1641yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1642#else
1643static void
1644yy_reduce_print (yyvsp, yyrule)
1645 YYSTYPE *yyvsp;
1646 int yyrule;
1647#endif
1648{
1649 int yynrhs = yyr2[yyrule];
1650 int yyi;
1651 unsigned long int yylno = yyrline[yyrule];
1652 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1653 yyrule - 1, yylno);
1654 /* The symbols being reduced. */
1655 for (yyi = 0; yyi < yynrhs; yyi++)
1656 {
1657 fprintf (stderr, " $%d = ", yyi + 1);
1658 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1659 &(yyvsp[(yyi + 1) - (yynrhs)])
1660 );
1661 fprintf (stderr, "\n");
1662 }
1663}
1664
1665# define YY_REDUCE_PRINT(Rule) \
1666do { \
1667 if (yydebug) \
1668 yy_reduce_print (yyvsp, Rule); \
1669} while (YYID (0))
1670
Lev Walkin418298d2006-07-13 08:24:20 +00001671/* Nonzero means print parse trace. It is left uninitialized so that
1672 multiple parsers can coexist. */
1673int yydebug;
1674#else /* !YYDEBUG */
1675# define YYDPRINTF(Args)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001676# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1677# define YY_STACK_PRINT(Bottom, Top)
1678# define YY_REDUCE_PRINT(Rule)
Lev Walkin418298d2006-07-13 08:24:20 +00001679#endif /* !YYDEBUG */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001680
Lev Walkin0e90aa02013-03-19 16:17:13 -07001681
Lev Walkin418298d2006-07-13 08:24:20 +00001682/* YYINITDEPTH -- initial size of the parser's stacks. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001683#ifndef YYINITDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001684# define YYINITDEPTH 200
Lev Walkinf15320b2004-06-03 03:38:44 +00001685#endif
1686
Lev Walkin418298d2006-07-13 08:24:20 +00001687/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1688 if the built-in stack extension method is used).
1689
1690 Do not make this value too large; the results are undefined if
Lev Walkin0e90aa02013-03-19 16:17:13 -07001691 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Lev Walkin418298d2006-07-13 08:24:20 +00001692 evaluated with infinite-precision integer arithmetic. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001693
Lev Walkinf15320b2004-06-03 03:38:44 +00001694#ifndef YYMAXDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001695# define YYMAXDEPTH 10000
Lev Walkinf15320b2004-06-03 03:38:44 +00001696#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001697
Lev Walkinf15320b2004-06-03 03:38:44 +00001698
Lev Walkinf15320b2004-06-03 03:38:44 +00001699
Lev Walkin418298d2006-07-13 08:24:20 +00001700#if YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +00001701
Lev Walkin418298d2006-07-13 08:24:20 +00001702# ifndef yystrlen
Lev Walkin0e90aa02013-03-19 16:17:13 -07001703# if defined __GLIBC__ && defined _STRING_H
Lev Walkin418298d2006-07-13 08:24:20 +00001704# define yystrlen strlen
1705# else
1706/* Return the length of YYSTR. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001707#if (defined __STDC__ || defined __C99__FUNC__ \
1708 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001709static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001710yystrlen (const char *yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001711#else
1712static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001713yystrlen (yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001714 const char *yystr;
1715#endif
Lev Walkina00d6b32006-03-21 03:40:38 +00001716{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001717 YYSIZE_T yylen;
1718 for (yylen = 0; yystr[yylen]; yylen++)
Lev Walkin418298d2006-07-13 08:24:20 +00001719 continue;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001720 return yylen;
Lev Walkin418298d2006-07-13 08:24:20 +00001721}
1722# endif
1723# endif
1724
1725# ifndef yystpcpy
Lev Walkin0e90aa02013-03-19 16:17:13 -07001726# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Lev Walkin418298d2006-07-13 08:24:20 +00001727# define yystpcpy stpcpy
1728# else
1729/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1730 YYDEST. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001731#if (defined __STDC__ || defined __C99__FUNC__ \
1732 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001733static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001734yystpcpy (char *yydest, const char *yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001735#else
1736static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001737yystpcpy (yydest, yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001738 char *yydest;
1739 const char *yysrc;
1740#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001741{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001742 char *yyd = yydest;
1743 const char *yys = yysrc;
Lev Walkin418298d2006-07-13 08:24:20 +00001744
1745 while ((*yyd++ = *yys++) != '\0')
1746 continue;
1747
1748 return yyd - 1;
1749}
1750# endif
1751# endif
1752
Lev Walkin0e90aa02013-03-19 16:17:13 -07001753# ifndef yytnamerr
1754/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1755 quotes and backslashes, so that it's suitable for yyerror. The
1756 heuristic is that double-quoting is unnecessary unless the string
1757 contains an apostrophe, a comma, or backslash (other than
1758 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1759 null, do not copy; instead, return the length of what the result
1760 would have been. */
1761static YYSIZE_T
1762yytnamerr (char *yyres, const char *yystr)
Lev Walkin418298d2006-07-13 08:24:20 +00001763{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001764 if (*yystr == '"')
Lev Walkin418298d2006-07-13 08:24:20 +00001765 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07001766 YYSIZE_T yyn = 0;
1767 char const *yyp = yystr;
Lev Walkin418298d2006-07-13 08:24:20 +00001768
Lev Walkin0e90aa02013-03-19 16:17:13 -07001769 for (;;)
1770 switch (*++yyp)
1771 {
1772 case '\'':
1773 case ',':
1774 goto do_not_strip_quotes;
1775
1776 case '\\':
1777 if (*++yyp != '\\')
1778 goto do_not_strip_quotes;
1779 /* Fall through. */
1780 default:
1781 if (yyres)
1782 yyres[yyn] = *yyp;
1783 yyn++;
1784 break;
1785
1786 case '"':
1787 if (yyres)
1788 yyres[yyn] = '\0';
1789 return yyn;
1790 }
1791 do_not_strip_quotes: ;
Lev Walkin418298d2006-07-13 08:24:20 +00001792 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001793
1794 if (! yyres)
1795 return yystrlen (yystr);
1796
1797 return yystpcpy (yyres, yystr) - yyres;
Lev Walkin418298d2006-07-13 08:24:20 +00001798}
Lev Walkin0e90aa02013-03-19 16:17:13 -07001799# endif
Lev Walkin418298d2006-07-13 08:24:20 +00001800
Lev Walkin0e90aa02013-03-19 16:17:13 -07001801/* Copy into YYRESULT an error message about the unexpected token
1802 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1803 including the terminating null byte. If YYRESULT is null, do not
1804 copy anything; just return the number of bytes that would be
1805 copied. As a special case, return 0 if an ordinary "syntax error"
1806 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1807 size calculation. */
1808static YYSIZE_T
1809yysyntax_error (char *yyresult, int yystate, int yychar)
1810{
1811 int yyn = yypact[yystate];
1812
1813 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1814 return 0;
1815 else
1816 {
1817 int yytype = YYTRANSLATE (yychar);
1818 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1819 YYSIZE_T yysize = yysize0;
1820 YYSIZE_T yysize1;
1821 int yysize_overflow = 0;
1822 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1823 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1824 int yyx;
1825
1826# if 0
1827 /* This is so xgettext sees the translatable formats that are
1828 constructed on the fly. */
1829 YY_("syntax error, unexpected %s");
1830 YY_("syntax error, unexpected %s, expecting %s");
1831 YY_("syntax error, unexpected %s, expecting %s or %s");
1832 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1833 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1834# endif
1835 char *yyfmt;
1836 char const *yyf;
1837 static char const yyunexpected[] = "syntax error, unexpected %s";
1838 static char const yyexpecting[] = ", expecting %s";
1839 static char const yyor[] = " or %s";
1840 char yyformat[sizeof yyunexpected
1841 + sizeof yyexpecting - 1
1842 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1843 * (sizeof yyor - 1))];
1844 char const *yyprefix = yyexpecting;
1845
1846 /* Start YYX at -YYN if negative to avoid negative indexes in
1847 YYCHECK. */
1848 int yyxbegin = yyn < 0 ? -yyn : 0;
1849
1850 /* Stay within bounds of both yycheck and yytname. */
1851 int yychecklim = YYLAST - yyn + 1;
1852 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1853 int yycount = 1;
1854
1855 yyarg[0] = yytname[yytype];
1856 yyfmt = yystpcpy (yyformat, yyunexpected);
1857
1858 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1859 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1860 {
1861 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1862 {
1863 yycount = 1;
1864 yysize = yysize0;
1865 yyformat[sizeof yyunexpected - 1] = '\0';
1866 break;
1867 }
1868 yyarg[yycount++] = yytname[yyx];
1869 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1870 yysize_overflow |= (yysize1 < yysize);
1871 yysize = yysize1;
1872 yyfmt = yystpcpy (yyfmt, yyprefix);
1873 yyprefix = yyor;
1874 }
1875
1876 yyf = YY_(yyformat);
1877 yysize1 = yysize + yystrlen (yyf);
1878 yysize_overflow |= (yysize1 < yysize);
1879 yysize = yysize1;
1880
1881 if (yysize_overflow)
1882 return YYSIZE_MAXIMUM;
1883
1884 if (yyresult)
1885 {
1886 /* Avoid sprintf, as that infringes on the user's name space.
1887 Don't have undefined behavior even if the translation
1888 produced a string with the wrong number of "%s"s. */
1889 char *yyp = yyresult;
1890 int yyi = 0;
1891 while ((*yyp = *yyf) != '\0')
1892 {
1893 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1894 {
1895 yyp += yytnamerr (yyp, yyarg[yyi++]);
1896 yyf += 2;
1897 }
1898 else
1899 {
1900 yyp++;
1901 yyf++;
1902 }
1903 }
1904 }
1905 return yysize;
1906 }
1907}
1908#endif /* YYERROR_VERBOSE */
1909
Lev Walkin418298d2006-07-13 08:24:20 +00001910
1911/*-----------------------------------------------.
1912| Release the memory associated to this symbol. |
1913`-----------------------------------------------*/
1914
Lev Walkin0e90aa02013-03-19 16:17:13 -07001915/*ARGSUSED*/
1916#if (defined __STDC__ || defined __C99__FUNC__ \
1917 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001918static void
Lev Walkin0e90aa02013-03-19 16:17:13 -07001919yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Lev Walkin418298d2006-07-13 08:24:20 +00001920#else
Lev Walkin0e90aa02013-03-19 16:17:13 -07001921static void
1922yydestruct (yymsg, yytype, yyvaluep)
1923 const char *yymsg;
Lev Walkin418298d2006-07-13 08:24:20 +00001924 int yytype;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001925 YYSTYPE *yyvaluep;
Lev Walkin418298d2006-07-13 08:24:20 +00001926#endif
1927{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001928 YYUSE (yyvaluep);
1929
1930 if (!yymsg)
1931 yymsg = "Deleting";
1932 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
Lev Walkin418298d2006-07-13 08:24:20 +00001933
1934 switch (yytype)
1935 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07001936
Lev Walkin418298d2006-07-13 08:24:20 +00001937 default:
Lev Walkin0e90aa02013-03-19 16:17:13 -07001938 break;
Lev Walkin418298d2006-07-13 08:24:20 +00001939 }
Lev Walkina00d6b32006-03-21 03:40:38 +00001940}
Lev Walkinfb872bd2006-03-18 06:53:11 +00001941
1942
Lev Walkin0e90aa02013-03-19 16:17:13 -07001943/* Prevent warnings from -Wmissing-prototypes. */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001944
1945#ifdef YYPARSE_PARAM
Lev Walkin0e90aa02013-03-19 16:17:13 -07001946#if defined __STDC__ || defined __cplusplus
1947int yyparse (void *YYPARSE_PARAM);
1948#else
1949int yyparse ();
Lev Walkinfb872bd2006-03-18 06:53:11 +00001950#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07001951#else /* ! YYPARSE_PARAM */
1952#if defined __STDC__ || defined __cplusplus
1953int yyparse (void);
1954#else
1955int yyparse ();
1956#endif
1957#endif /* ! YYPARSE_PARAM */
Lev Walkin418298d2006-07-13 08:24:20 +00001958
1959
Lev Walkin0e90aa02013-03-19 16:17:13 -07001960
1961/* The look-ahead symbol. */
Lev Walkin418298d2006-07-13 08:24:20 +00001962int yychar;
1963
Lev Walkin0e90aa02013-03-19 16:17:13 -07001964/* The semantic value of the look-ahead symbol. */
Lev Walkin418298d2006-07-13 08:24:20 +00001965YYSTYPE yylval;
1966
Lev Walkin0e90aa02013-03-19 16:17:13 -07001967/* Number of syntax errors so far. */
Lev Walkin418298d2006-07-13 08:24:20 +00001968int yynerrs;
1969
Lev Walkinfb872bd2006-03-18 06:53:11 +00001970
Lev Walkin0e90aa02013-03-19 16:17:13 -07001971
1972/*----------.
1973| yyparse. |
1974`----------*/
1975
1976#ifdef YYPARSE_PARAM
1977#if (defined __STDC__ || defined __C99__FUNC__ \
1978 || defined __cplusplus || defined _MSC_VER)
Lev Walkinfb872bd2006-03-18 06:53:11 +00001979int
Lev Walkin0e90aa02013-03-19 16:17:13 -07001980yyparse (void *YYPARSE_PARAM)
1981#else
1982int
1983yyparse (YYPARSE_PARAM)
1984 void *YYPARSE_PARAM;
1985#endif
1986#else /* ! YYPARSE_PARAM */
1987#if (defined __STDC__ || defined __C99__FUNC__ \
1988 || defined __cplusplus || defined _MSC_VER)
1989int
1990yyparse (void)
1991#else
1992int
1993yyparse ()
1994
1995#endif
1996#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001997{
Lev Walkin418298d2006-07-13 08:24:20 +00001998
Lev Walkin0e90aa02013-03-19 16:17:13 -07001999 int yystate;
2000 int yyn;
Lev Walkin418298d2006-07-13 08:24:20 +00002001 int yyresult;
2002 /* Number of tokens to shift before error messages enabled. */
2003 int yyerrstatus;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002004 /* Look-ahead token as an internal (translated) token number. */
2005 int yytoken = 0;
2006#if YYERROR_VERBOSE
2007 /* Buffer for error messages, and its allocated size. */
2008 char yymsgbuf[128];
2009 char *yymsg = yymsgbuf;
2010 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2011#endif
Lev Walkin418298d2006-07-13 08:24:20 +00002012
2013 /* Three stacks and their tools:
2014 `yyss': related to states,
2015 `yyvs': related to semantic values,
2016 `yyls': related to locations.
2017
2018 Refer to the stacks thru separate pointers, to allow yyoverflow
2019 to reallocate them elsewhere. */
2020
2021 /* The state stack. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002022 yytype_int16 yyssa[YYINITDEPTH];
2023 yytype_int16 *yyss = yyssa;
2024 yytype_int16 *yyssp;
Lev Walkin418298d2006-07-13 08:24:20 +00002025
2026 /* The semantic value stack. */
2027 YYSTYPE yyvsa[YYINITDEPTH];
2028 YYSTYPE *yyvs = yyvsa;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002029 YYSTYPE *yyvsp;
Lev Walkinfb872bd2006-03-18 06:53:11 +00002030
Lev Walkinfb872bd2006-03-18 06:53:11 +00002031
Lev Walkinfb872bd2006-03-18 06:53:11 +00002032
Lev Walkin0e90aa02013-03-19 16:17:13 -07002033#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
Lev Walkinf15320b2004-06-03 03:38:44 +00002034
Lev Walkin418298d2006-07-13 08:24:20 +00002035 YYSIZE_T yystacksize = YYINITDEPTH;
Lev Walkinf15320b2004-06-03 03:38:44 +00002036
Lev Walkin418298d2006-07-13 08:24:20 +00002037 /* The variables used to return semantic value and location from the
2038 action routines. */
2039 YYSTYPE yyval;
Lev Walkinf15320b2004-06-03 03:38:44 +00002040
Lev Walkinf15320b2004-06-03 03:38:44 +00002041
Lev Walkin0e90aa02013-03-19 16:17:13 -07002042 /* The number of symbols on the RHS of the reduced rule.
2043 Keep to zero when no symbol should be popped. */
2044 int yylen = 0;
Lev Walkinf15320b2004-06-03 03:38:44 +00002045
Lev Walkin418298d2006-07-13 08:24:20 +00002046 YYDPRINTF ((stderr, "Starting parse\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002047
2048 yystate = 0;
2049 yyerrstatus = 0;
2050 yynerrs = 0;
2051 yychar = YYEMPTY; /* Cause a token to be read. */
2052
2053 /* Initialize stack pointers.
2054 Waste one element of value and location stack
2055 so that they stay on the same level as the state stack.
2056 The wasted elements are never initialized. */
2057
Lev Walkin418298d2006-07-13 08:24:20 +00002058 yyssp = yyss;
Lev Walkinf15320b2004-06-03 03:38:44 +00002059 yyvsp = yyvs;
Lev Walkinf15320b2004-06-03 03:38:44 +00002060
Lev Walkin418298d2006-07-13 08:24:20 +00002061 goto yysetstate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002062
Lev Walkin418298d2006-07-13 08:24:20 +00002063/*------------------------------------------------------------.
2064| yynewstate -- Push a new state, which is found in yystate. |
2065`------------------------------------------------------------*/
2066 yynewstate:
2067 /* In all cases, when you get here, the value and location stacks
Lev Walkin0e90aa02013-03-19 16:17:13 -07002068 have just been pushed. So pushing a state here evens the stacks. */
Lev Walkin418298d2006-07-13 08:24:20 +00002069 yyssp++;
2070
2071 yysetstate:
2072 *yyssp = yystate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002073
Lev Walkin0e90aa02013-03-19 16:17:13 -07002074 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002075 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002076 /* Get the current used size of the three stacks, in elements. */
Lev Walkin418298d2006-07-13 08:24:20 +00002077 YYSIZE_T yysize = yyssp - yyss + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002078
2079#ifdef yyoverflow
Lev Walkin418298d2006-07-13 08:24:20 +00002080 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002081 /* Give user a chance to reallocate the stack. Use copies of
Lev Walkin418298d2006-07-13 08:24:20 +00002082 these so that the &'s don't force the real ones into
2083 memory. */
2084 YYSTYPE *yyvs1 = yyvs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002085 yytype_int16 *yyss1 = yyss;
Lev Walkinf15320b2004-06-03 03:38:44 +00002086
Lev Walkin418298d2006-07-13 08:24:20 +00002087
2088 /* Each stack pointer address is followed by the size of the
2089 data in use in that stack, in bytes. This used to be a
2090 conditional around just the two extra args, but that might
2091 be undefined if yyoverflow is a macro. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002092 yyoverflow (YY_("memory exhausted"),
Lev Walkin418298d2006-07-13 08:24:20 +00002093 &yyss1, yysize * sizeof (*yyssp),
2094 &yyvs1, yysize * sizeof (*yyvsp),
2095
2096 &yystacksize);
2097
2098 yyss = yyss1;
2099 yyvs = yyvs1;
2100 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002101#else /* no yyoverflow */
Lev Walkin418298d2006-07-13 08:24:20 +00002102# ifndef YYSTACK_RELOCATE
Lev Walkin0e90aa02013-03-19 16:17:13 -07002103 goto yyexhaustedlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002104# else
Lev Walkinf15320b2004-06-03 03:38:44 +00002105 /* Extend the stack our own way. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002106 if (YYMAXDEPTH <= yystacksize)
2107 goto yyexhaustedlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002108 yystacksize *= 2;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002109 if (YYMAXDEPTH < yystacksize)
Lev Walkinf15320b2004-06-03 03:38:44 +00002110 yystacksize = YYMAXDEPTH;
Lev Walkin418298d2006-07-13 08:24:20 +00002111
2112 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002113 yytype_int16 *yyss1 = yyss;
Lev Walkin418298d2006-07-13 08:24:20 +00002114 union yyalloc *yyptr =
2115 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2116 if (! yyptr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07002117 goto yyexhaustedlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002118 YYSTACK_RELOCATE (yyss);
2119 YYSTACK_RELOCATE (yyvs);
2120
2121# undef YYSTACK_RELOCATE
2122 if (yyss1 != yyssa)
2123 YYSTACK_FREE (yyss1);
2124 }
2125# endif
Lev Walkinf15320b2004-06-03 03:38:44 +00002126#endif /* no yyoverflow */
2127
Lev Walkin418298d2006-07-13 08:24:20 +00002128 yyssp = yyss + yysize - 1;
2129 yyvsp = yyvs + yysize - 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002130
Lev Walkin418298d2006-07-13 08:24:20 +00002131
2132 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2133 (unsigned long int) yystacksize));
Lev Walkinf15320b2004-06-03 03:38:44 +00002134
Lev Walkin0e90aa02013-03-19 16:17:13 -07002135 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002136 YYABORT;
2137 }
2138
Lev Walkin418298d2006-07-13 08:24:20 +00002139 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Lev Walkinf15320b2004-06-03 03:38:44 +00002140
2141 goto yybackup;
Lev Walkin418298d2006-07-13 08:24:20 +00002142
2143/*-----------.
2144| yybackup. |
2145`-----------*/
2146yybackup:
Lev Walkinf15320b2004-06-03 03:38:44 +00002147
Lev Walkin0e90aa02013-03-19 16:17:13 -07002148 /* Do appropriate processing given the current state. Read a
2149 look-ahead token if we need one and don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002150
Lev Walkin0e90aa02013-03-19 16:17:13 -07002151 /* First try to decide what to do without reference to look-ahead token. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002152 yyn = yypact[yystate];
Lev Walkin418298d2006-07-13 08:24:20 +00002153 if (yyn == YYPACT_NINF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002154 goto yydefault;
2155
Lev Walkin0e90aa02013-03-19 16:17:13 -07002156 /* Not known => get a look-ahead token if don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002157
Lev Walkin0e90aa02013-03-19 16:17:13 -07002158 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002159 if (yychar == YYEMPTY)
2160 {
Lev Walkin418298d2006-07-13 08:24:20 +00002161 YYDPRINTF ((stderr, "Reading a token: "));
Lev Walkinf15320b2004-06-03 03:38:44 +00002162 yychar = YYLEX;
2163 }
2164
Lev Walkin0e90aa02013-03-19 16:17:13 -07002165 if (yychar <= YYEOF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002166 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002167 yychar = yytoken = YYEOF;
Lev Walkin418298d2006-07-13 08:24:20 +00002168 YYDPRINTF ((stderr, "Now at end of input.\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002169 }
2170 else
2171 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002172 yytoken = YYTRANSLATE (yychar);
2173 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Lev Walkinf15320b2004-06-03 03:38:44 +00002174 }
2175
Lev Walkin0e90aa02013-03-19 16:17:13 -07002176 /* If the proper action on seeing token YYTOKEN is to reduce or to
Lev Walkin418298d2006-07-13 08:24:20 +00002177 detect an error, take that action. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002178 yyn += yytoken;
2179 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Lev Walkinf15320b2004-06-03 03:38:44 +00002180 goto yydefault;
Lev Walkinf15320b2004-06-03 03:38:44 +00002181 yyn = yytable[yyn];
Lev Walkin418298d2006-07-13 08:24:20 +00002182 if (yyn <= 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00002183 {
Lev Walkin418298d2006-07-13 08:24:20 +00002184 if (yyn == 0 || yyn == YYTABLE_NINF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002185 goto yyerrlab;
2186 yyn = -yyn;
2187 goto yyreduce;
2188 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002189
2190 if (yyn == YYFINAL)
2191 YYACCEPT;
2192
Lev Walkin418298d2006-07-13 08:24:20 +00002193 /* Count tokens shifted since error; after three, turn off error
2194 status. */
2195 if (yyerrstatus)
2196 yyerrstatus--;
Lev Walkinf15320b2004-06-03 03:38:44 +00002197
Lev Walkin0e90aa02013-03-19 16:17:13 -07002198 /* Shift the look-ahead token. */
2199 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2200
2201 /* Discard the shifted token unless it is eof. */
2202 if (yychar != YYEOF)
2203 yychar = YYEMPTY;
2204
Lev Walkinf15320b2004-06-03 03:38:44 +00002205 yystate = yyn;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002206 *++yyvsp = yylval;
2207
Lev Walkinf15320b2004-06-03 03:38:44 +00002208 goto yynewstate;
2209
Lev Walkina00d6b32006-03-21 03:40:38 +00002210
Lev Walkin418298d2006-07-13 08:24:20 +00002211/*-----------------------------------------------------------.
2212| yydefault -- do the default action for the current state. |
2213`-----------------------------------------------------------*/
2214yydefault:
Lev Walkinf15320b2004-06-03 03:38:44 +00002215 yyn = yydefact[yystate];
2216 if (yyn == 0)
2217 goto yyerrlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002218 goto yyreduce;
Lev Walkinf15320b2004-06-03 03:38:44 +00002219
Lev Walkin418298d2006-07-13 08:24:20 +00002220
2221/*-----------------------------.
2222| yyreduce -- Do a reduction. |
2223`-----------------------------*/
Lev Walkinf15320b2004-06-03 03:38:44 +00002224yyreduce:
Lev Walkin418298d2006-07-13 08:24:20 +00002225 /* yyn is the number of a rule to reduce with. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002226 yylen = yyr2[yyn];
Lev Walkinf15320b2004-06-03 03:38:44 +00002227
Lev Walkin418298d2006-07-13 08:24:20 +00002228 /* If YYLEN is nonzero, implement the default value of the action:
2229 `$$ = $1'.
2230
2231 Otherwise, the following line sets YYVAL to garbage.
2232 This behavior is undocumented and Bison
2233 users should not rely upon it. Assigning to YYVAL
2234 unconditionally makes the parser a bit smaller, and it avoids a
2235 GCC warning that YYVAL may be used uninitialized. */
2236 yyval = yyvsp[1-yylen];
2237
2238
Lev Walkin0e90aa02013-03-19 16:17:13 -07002239 YY_REDUCE_PRINT (yyn);
Lev Walkin418298d2006-07-13 08:24:20 +00002240 switch (yyn)
2241 {
2242 case 2:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002243#line 357 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002244 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002245 *(void **)param = (yyvsp[(1) - (1)].a_grammar);
Lev Walkin418298d2006-07-13 08:24:20 +00002246 }
2247 break;
2248
2249 case 3:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002250#line 363 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002251 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002252 (yyval.a_grammar) = asn1p_new();
2253 checkmem((yyval.a_grammar));
2254 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(1) - (1)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002255 }
2256 break;
2257
2258 case 4:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002259#line 368 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002260 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002261 (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar);
2262 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002263 }
2264 break;
2265
2266 case 5:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002267#line 385 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002268 { currentModule = asn1p_module_new(); }
2269 break;
2270
2271 case 6:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002272#line 390 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002273 {
Lev Walkinfb872bd2006-03-18 06:53:11 +00002274
Lev Walkin0e90aa02013-03-19 16:17:13 -07002275 (yyval.a_module) = currentModule;
Lev Walkina9532f42006-09-17 04:52:50 +00002276
Lev Walkin0e90aa02013-03-19 16:17:13 -07002277 if((yyvsp[(8) - (9)].a_module)) {
2278 asn1p_module_t tmp = *((yyval.a_module));
2279 *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module));
2280 *((yyvsp[(8) - (9)].a_module)) = tmp;
2281 asn1p_module_free((yyvsp[(8) - (9)].a_module));
Lev Walkinf15320b2004-06-03 03:38:44 +00002282 } else {
2283 /* There's a chance that a module is just plain empty */
Lev Walkinf15320b2004-06-03 03:38:44 +00002284 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002285
Lev Walkin0e90aa02013-03-19 16:17:13 -07002286 (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str);
2287 (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid);
2288 (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002289 }
2290 break;
2291
Lev Walkina9532f42006-09-17 04:52:50 +00002292 case 7:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002293#line 414 "asn1p_y.y"
2294 { (yyval.a_oid) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002295 break;
2296
Lev Walkina9532f42006-09-17 04:52:50 +00002297 case 8:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002298#line 415 "asn1p_y.y"
2299 { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002300 break;
2301
Lev Walkina9532f42006-09-17 04:52:50 +00002302 case 9:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002303#line 419 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002304 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002305 (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid);
Lev Walkin418298d2006-07-13 08:24:20 +00002306 }
2307 break;
2308
Lev Walkina9532f42006-09-17 04:52:50 +00002309 case 10:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002310#line 422 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002311 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002312 (yyval.a_oid) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002313 }
2314 break;
2315
Lev Walkina9532f42006-09-17 04:52:50 +00002316 case 11:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002317#line 428 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002318 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002319 (yyval.a_oid) = asn1p_oid_new();
2320 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc));
2321 if((yyvsp[(1) - (1)].a_oid_arc).name)
2322 free((yyvsp[(1) - (1)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002323 }
2324 break;
2325
Lev Walkina9532f42006-09-17 04:52:50 +00002326 case 12:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002327#line 434 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002328 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002329 (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid);
2330 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc));
2331 if((yyvsp[(2) - (2)].a_oid_arc).name)
2332 free((yyvsp[(2) - (2)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002333 }
2334 break;
2335
Lev Walkina9532f42006-09-17 04:52:50 +00002336 case 13:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002337#line 443 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002338 { /* iso */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002339 (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str);
2340 (yyval.a_oid_arc).number = -1;
Lev Walkin418298d2006-07-13 08:24:20 +00002341 }
2342 break;
2343
Lev Walkina9532f42006-09-17 04:52:50 +00002344 case 14:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002345#line 447 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002346 { /* iso(1) */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002347 (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str);
2348 (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002349 }
2350 break;
2351
Lev Walkina9532f42006-09-17 04:52:50 +00002352 case 15:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002353#line 451 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002354 { /* 1 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002355 (yyval.a_oid_arc).name = 0;
2356 (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002357 }
2358 break;
2359
Lev Walkina9532f42006-09-17 04:52:50 +00002360 case 16:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002361#line 461 "asn1p_y.y"
2362 { (yyval.a_module_flags) = MSF_NOFLAGS; }
Lev Walkin418298d2006-07-13 08:24:20 +00002363 break;
2364
Lev Walkin418298d2006-07-13 08:24:20 +00002365 case 17:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002366#line 462 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002367 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002368 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002369 }
2370 break;
2371
2372 case 18:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002373#line 471 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002374 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002375 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
Lev Walkina9532f42006-09-17 04:52:50 +00002376 }
2377 break;
2378
2379 case 19:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002380#line 474 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002381 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002382 (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002383 }
2384 break;
2385
Lev Walkina9532f42006-09-17 04:52:50 +00002386 case 20:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002387#line 483 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002388 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002389 (yyval.a_module_flags) = MSF_EXPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002390 }
2391 break;
2392
Lev Walkina9532f42006-09-17 04:52:50 +00002393 case 21:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002394#line 486 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002395 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002396 (yyval.a_module_flags) = MSF_IMPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002397 }
2398 break;
2399
Lev Walkina9532f42006-09-17 04:52:50 +00002400 case 22:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002401#line 489 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002402 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002403 (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002404 }
2405 break;
2406
Lev Walkina9532f42006-09-17 04:52:50 +00002407 case 23:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002408#line 492 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002409 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002410 (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED;
Lev Walkin418298d2006-07-13 08:24:20 +00002411 }
2412 break;
2413
Lev Walkina9532f42006-09-17 04:52:50 +00002414 case 24:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002415#line 496 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002416 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002417 /* X.680Amd1 specifies TAG and XER */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002418 if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) {
2419 (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS;
2420 } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) {
2421 (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002422 } else {
2423 fprintf(stderr,
2424 "WARNING: %s INSTRUCTIONS at line %d: "
2425 "Unrecognized encoding reference\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07002426 (yyvsp[(1) - (2)].tv_str), yylineno);
2427 (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002428 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002429 free((yyvsp[(1) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00002430 }
2431 break;
2432
Lev Walkina9532f42006-09-17 04:52:50 +00002433 case 25:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002434#line 517 "asn1p_y.y"
2435 { (yyval.a_module) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002436 break;
2437
Lev Walkina9532f42006-09-17 04:52:50 +00002438 case 26:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002439#line 518 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002440 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002441 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002442 }
2443 break;
2444
Lev Walkina9532f42006-09-17 04:52:50 +00002445 case 27:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002446#line 527 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002447 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002448 (yyval.a_module) = asn1p_module_new();
2449 AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next);
2450 AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next);
2451 AL_IMPORT((yyval.a_module), members, (yyvsp[(3) - (3)].a_module), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002452 }
2453 break;
2454
Lev Walkina9532f42006-09-17 04:52:50 +00002455 case 28:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002456#line 536 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002457 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002458 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002459 }
2460 break;
2461
Lev Walkina9532f42006-09-17 04:52:50 +00002462 case 29:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002463#line 539 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002464 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002465 if((yyvsp[(1) - (2)].a_module)) {
2466 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002467 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002468 (yyval.a_module) = (yyvsp[(2) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002469 break;
2470 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002471 AL_IMPORT((yyval.a_module), members, (yyvsp[(2) - (2)].a_module), next);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002472 }
2473 break;
2474
Lev Walkin418298d2006-07-13 08:24:20 +00002475 case 30:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002476#line 555 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002477 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002478 (yyval.a_module) = asn1p_module_new();
2479 checkmem((yyval.a_module));
2480 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2481 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2482 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002483 }
2484 break;
2485
2486 case 31:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002487#line 562 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002488 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002489 (yyval.a_module) = asn1p_module_new();
2490 checkmem((yyval.a_module));
2491 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2492 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2493 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002494 }
2495 break;
2496
2497 case 32:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002498#line 575 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002499 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002500 (yyval.a_module) = asn1p_module_new();
2501 checkmem((yyval.a_module));
2502 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2503 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2504 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkina9532f42006-09-17 04:52:50 +00002505 }
Lev Walkin418298d2006-07-13 08:24:20 +00002506 break;
2507
Lev Walkin866bd7f2006-09-14 10:35:20 +00002508 case 33:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002509#line 583 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002510 { asn1p_lexer_hack_push_encoding_control(); }
2511 break;
2512
2513 case 34:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002514#line 584 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002515 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002516 fprintf(stderr,
2517 "WARNING: ENCODING-CONTROL %s "
2518 "specification at line %d ignored\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07002519 (yyvsp[(2) - (3)].tv_str), yylineno);
2520 free((yyvsp[(2) - (3)].tv_str));
2521 (yyval.a_module) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002522 }
2523 break;
2524
Lev Walkina9532f42006-09-17 04:52:50 +00002525 case 35:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002526#line 596 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002527 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002528 return yyerror(
Lev Walkin70853052005-11-26 11:21:55 +00002529 "Attempt to redefine a standard basic string type, "
2530 "please comment out or remove this type redefinition.");
Lev Walkin418298d2006-07-13 08:24:20 +00002531 }
2532 break;
2533
Lev Walkina9532f42006-09-17 04:52:50 +00002534 case 36:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002535#line 609 "asn1p_y.y"
2536 { (yyval.a_module) = 0; }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002537 break;
2538
Lev Walkina9532f42006-09-17 04:52:50 +00002539 case 38:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002540#line 613 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002541 {
Lev Walkinb36317c2005-08-12 10:09:10 +00002542 if(!saved_aid && 0)
2543 return yyerror("Unterminated IMPORTS FROM, "
2544 "expected semicolon ';'");
2545 saved_aid = 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002546 (yyval.a_module) = (yyvsp[(2) - (3)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002547 }
2548 break;
2549
Lev Walkina9532f42006-09-17 04:52:50 +00002550 case 39:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002551#line 623 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002552 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002553 return yyerror("Empty IMPORTS list");
Lev Walkin418298d2006-07-13 08:24:20 +00002554 }
2555 break;
2556
Lev Walkina9532f42006-09-17 04:52:50 +00002557 case 40:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002558#line 629 "asn1p_y.y"
2559 { (yyval.a_module) = asn1p_module_new(); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002560 break;
2561
2562 case 42:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002563#line 633 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002564 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002565 (yyval.a_module) = asn1p_module_new();
2566 checkmem((yyval.a_module));
2567 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002568 }
2569 break;
2570
Lev Walkin4a4543f2006-10-13 12:37:39 +00002571 case 43:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002572#line 638 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002573 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002574 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
2575 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002576 }
2577 break;
2578
Lev Walkin4a4543f2006-10-13 12:37:39 +00002579 case 44:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002580#line 645 "asn1p_y.y"
2581 { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); }
Lev Walkin418298d2006-07-13 08:24:20 +00002582 break;
2583
Lev Walkin4a4543f2006-10-13 12:37:39 +00002584 case 45:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002585#line 646 "asn1p_y.y"
2586 { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002587 break;
2588
Lev Walkin4a4543f2006-10-13 12:37:39 +00002589 case 46:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002590#line 650 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002591 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002592 (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports);
2593 (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str);
2594 (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid);
Lev Walkinb36317c2005-08-12 10:09:10 +00002595 /* This stupid thing is used for look-back hack. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002596 saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier);
2597 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002598 }
2599 break;
2600
Lev Walkin4a4543f2006-10-13 12:37:39 +00002601 case 47:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002602#line 661 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002603 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002604 (yyval.a_xports) = asn1p_xports_new();
2605 checkmem((yyval.a_xports));
2606 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002607 }
2608 break;
2609
Lev Walkin4a4543f2006-10-13 12:37:39 +00002610 case 48:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002611#line 666 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002612 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002613 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2614 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002615 }
2616 break;
2617
Lev Walkina9532f42006-09-17 04:52:50 +00002618 case 49:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002619#line 673 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002620 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002621 (yyval.a_expr) = NEW_EXPR();
2622 checkmem((yyval.a_expr));
2623 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2624 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin418298d2006-07-13 08:24:20 +00002625 }
2626 break;
2627
Lev Walkina9532f42006-09-17 04:52:50 +00002628 case 50:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002629#line 679 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002630 { /* Completely equivalent to above */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002631 (yyval.a_expr) = NEW_EXPR();
2632 checkmem((yyval.a_expr));
2633 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2634 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002635 }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002636 break;
2637
Lev Walkina9532f42006-09-17 04:52:50 +00002638 case 51:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002639#line 685 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002640 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002641 (yyval.a_expr) = NEW_EXPR();
2642 checkmem((yyval.a_expr));
2643 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2644 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002645 }
2646 break;
2647
2648 case 52:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002649#line 695 "asn1p_y.y"
2650 { (yyval.a_module) = 0; }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002651 break;
2652
2653 case 53:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002654#line 696 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002655 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002656 (yyval.a_module) = asn1p_module_new();
2657 checkmem((yyval.a_module));
2658 if((yyvsp[(1) - (1)].a_xports)) {
2659 TQ_ADD(&((yyval.a_module)->exports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002660 } else {
2661 /* "EXPORTS ALL;" */
2662 }
2663 }
2664 break;
2665
Lev Walkin4a4543f2006-10-13 12:37:39 +00002666 case 54:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002667#line 708 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002668 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002669 (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports);
Lev Walkin418298d2006-07-13 08:24:20 +00002670 }
2671 break;
2672
Lev Walkin4a4543f2006-10-13 12:37:39 +00002673 case 55:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002674#line 711 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002675 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002676 (yyval.a_xports) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002677 }
2678 break;
2679
Lev Walkin4a4543f2006-10-13 12:37:39 +00002680 case 56:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002681#line 714 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002682 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002683 /* Empty EXPORTS clause effectively prohibits export. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002684 (yyval.a_xports) = asn1p_xports_new();
2685 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002686 }
2687 break;
2688
Lev Walkin4a4543f2006-10-13 12:37:39 +00002689 case 57:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002690#line 722 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002691 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002692 (yyval.a_xports) = asn1p_xports_new();
2693 assert((yyval.a_xports));
2694 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002695 }
2696 break;
2697
Lev Walkin4a4543f2006-10-13 12:37:39 +00002698 case 58:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002699#line 727 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002700 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002701 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2702 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002703 }
2704 break;
2705
Lev Walkina9532f42006-09-17 04:52:50 +00002706 case 59:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002707#line 734 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002708 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002709 (yyval.a_expr) = NEW_EXPR();
2710 checkmem((yyval.a_expr));
2711 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2712 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin418298d2006-07-13 08:24:20 +00002713 }
2714 break;
2715
Lev Walkina9532f42006-09-17 04:52:50 +00002716 case 60:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002717#line 740 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002718 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002719 (yyval.a_expr) = NEW_EXPR();
2720 checkmem((yyval.a_expr));
2721 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2722 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002723 }
Lev Walkin418298d2006-07-13 08:24:20 +00002724 break;
2725
Lev Walkina9532f42006-09-17 04:52:50 +00002726 case 61:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002727#line 746 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002728 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002729 (yyval.a_expr) = NEW_EXPR();
2730 checkmem((yyval.a_expr));
2731 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2732 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002733 }
2734 break;
2735
2736 case 62:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002737#line 755 "asn1p_y.y"
2738 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002739 break;
2740
2741 case 63:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002742#line 758 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002743 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002744 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
2745 assert((yyval.a_expr)->Identifier == 0);
2746 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
2747 (yyval.a_expr)->meta_type = AMT_VALUESET;
2748 (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002749 }
2750 break;
2751
Lev Walkin4a4543f2006-10-13 12:37:39 +00002752 case 64:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002753#line 768 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002754 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002755 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00002756 }
2757 break;
2758
Lev Walkin4a4543f2006-10-13 12:37:39 +00002759 case 65:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002760#line 781 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002761 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002762 (yyval.a_expr) = NEW_EXPR();
2763 checkmem((yyval.a_expr));
2764 (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref);
2765 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2766 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002767 }
2768 break;
2769
Lev Walkin4a4543f2006-10-13 12:37:39 +00002770 case 66:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002771#line 791 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002772 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002773 (yyval.a_expr) = NEW_EXPR();
2774 checkmem((yyval.a_expr));
2775 (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref);
2776 (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr);
2777 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2778 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002779 }
2780 break;
2781
Lev Walkin4a4543f2006-10-13 12:37:39 +00002782 case 67:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002783#line 811 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002784 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002785 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2786 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2787 assert((yyval.a_expr)->expr_type);
2788 assert((yyval.a_expr)->meta_type);
Lev Walkin418298d2006-07-13 08:24:20 +00002789 }
2790 break;
2791
Lev Walkin4a4543f2006-10-13 12:37:39 +00002792 case 68:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002793#line 817 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002794 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002795 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2796 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2797 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
2798 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00002799 }
2800 break;
2801
Lev Walkina9532f42006-09-17 04:52:50 +00002802 case 69:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002803#line 833 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002804 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002805 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2806 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2807 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002808 }
2809 break;
2810
2811 case 70:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002812#line 839 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002813 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002814 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2815 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2816 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002817 }
2818 break;
2819
2820 case 71:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002821#line 847 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002822 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002823 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002824 (yyval.a_plist) = asn1p_paramlist_new(yylineno);
2825 checkmem((yyval.a_plist));
2826 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 +00002827 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002828 if((yyvsp[(1) - (1)].a_parg).governor) asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor);
2829 if((yyvsp[(1) - (1)].a_parg).argument) free((yyvsp[(1) - (1)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002830 }
2831 break;
2832
Lev Walkin4a4543f2006-10-13 12:37:39 +00002833 case 72:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002834#line 856 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002835 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002836 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002837 (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist);
2838 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 +00002839 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002840 if((yyvsp[(3) - (3)].a_parg).governor) asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor);
2841 if((yyvsp[(3) - (3)].a_parg).argument) free((yyvsp[(3) - (3)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002842 }
2843 break;
2844
Lev Walkin4a4543f2006-10-13 12:37:39 +00002845 case 73:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002846#line 867 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002847 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002848 (yyval.a_parg).governor = NULL;
2849 (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00002850 }
2851 break;
2852
Lev Walkin866bd7f2006-09-14 10:35:20 +00002853 case 74:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002854#line 871 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002855 {
2856 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002857 (yyval.a_parg).governor = asn1p_ref_new(yylineno);
2858 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002859 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002860 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002861 }
2862 break;
2863
2864 case 75:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002865#line 878 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002866 {
2867 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002868 (yyval.a_parg).governor = asn1p_ref_new(yylineno);
2869 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002870 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002871 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002872 }
2873 break;
2874
2875 case 76:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002876#line 885 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002877 {
Lev Walkina9532f42006-09-17 04:52:50 +00002878 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002879 (yyval.a_parg).governor = asn1p_ref_new(yylineno);
2880 ret = asn1p_ref_add_component((yyval.a_parg).governor,
2881 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkina9532f42006-09-17 04:52:50 +00002882 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002883 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkina9532f42006-09-17 04:52:50 +00002884 }
2885 break;
2886
Lev Walkin4a4543f2006-10-13 12:37:39 +00002887 case 77:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002888#line 893 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002889 {
2890 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002891 (yyval.a_parg).governor = asn1p_ref_new(yylineno);
2892 ret = asn1p_ref_add_component((yyval.a_parg).governor,
2893 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002894 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002895 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002896 }
2897 break;
2898
2899 case 78:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002900#line 904 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002901 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002902 (yyval.a_expr) = NEW_EXPR();
2903 checkmem((yyval.a_expr));
2904 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002905 }
2906 break;
2907
Lev Walkin4a4543f2006-10-13 12:37:39 +00002908 case 79:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002909#line 909 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002910 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002911 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
2912 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002913 }
2914 break;
2915
Lev Walkin4a4543f2006-10-13 12:37:39 +00002916 case 80:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002917#line 916 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002918 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002919 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00002920 }
2921 break;
2922
Lev Walkin4a4543f2006-10-13 12:37:39 +00002923 case 81:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002924#line 919 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002925 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002926 (yyval.a_expr) = NEW_EXPR();
2927 checkmem((yyval.a_expr));
2928 (yyval.a_expr)->Identifier = "?";
2929 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2930 (yyval.a_expr)->meta_type = AMT_VALUE;
2931 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00002932 }
2933 break;
2934
Lev Walkin4a4543f2006-10-13 12:37:39 +00002935 case 82:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002936#line 927 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002937 {
Lev Walkina00d6b32006-03-21 03:40:38 +00002938 asn1p_ref_t *ref;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002939 (yyval.a_expr) = NEW_EXPR();
2940 checkmem((yyval.a_expr));
2941 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2942 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2943 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkina00d6b32006-03-21 03:40:38 +00002944 ref = asn1p_ref_new(yylineno);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002945 asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
2946 (yyval.a_expr)->value = asn1p_value_fromref(ref, 0);
Lev Walkin418298d2006-07-13 08:24:20 +00002947 }
2948 break;
2949
Lev Walkin4a4543f2006-10-13 12:37:39 +00002950 case 83:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002951#line 938 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002952 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002953 (yyval.a_expr) = NEW_EXPR();
2954 (yyval.a_expr)->expr_type = A1TC_VALUESET;
2955 (yyval.a_expr)->meta_type = AMT_VALUESET;
2956 (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002957 }
2958 break;
2959
Lev Walkin4a4543f2006-10-13 12:37:39 +00002960 case 84:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002961#line 961 "asn1p_y.y"
2962 { (yyval.a_expr) = NEW_EXPR(); }
Lev Walkin418298d2006-07-13 08:24:20 +00002963 break;
2964
Lev Walkin4a4543f2006-10-13 12:37:39 +00002965 case 85:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002966#line 962 "asn1p_y.y"
2967 { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); }
Lev Walkina9532f42006-09-17 04:52:50 +00002968 break;
2969
Lev Walkin4a4543f2006-10-13 12:37:39 +00002970 case 86:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002971#line 965 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002972 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002973 (yyval.a_expr) = NEW_EXPR();
2974 checkmem((yyval.a_expr));
2975 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002976 }
2977 break;
2978
Lev Walkin4a4543f2006-10-13 12:37:39 +00002979 case 87:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002980#line 970 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002981 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002982 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
2983 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002984 }
2985 break;
2986
Lev Walkin4a4543f2006-10-13 12:37:39 +00002987 case 88:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002988#line 974 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002989 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002990 (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr);
2991 asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00002992 }
2993 break;
2994
Lev Walkin4a4543f2006-10-13 12:37:39 +00002995 case 89:
Lev Walkin0e90aa02013-03-19 16:17:13 -07002996#line 981 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002997 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002998 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
2999 assert((yyval.a_expr)->Identifier == 0);
3000 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3001 (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3002 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003003 }
3004 break;
3005
Lev Walkin4a4543f2006-10-13 12:37:39 +00003006 case 90:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003007#line 988 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003008 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003009 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3010 (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3011 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
3012 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003013 }
3014 break;
3015
Lev Walkin4a4543f2006-10-13 12:37:39 +00003016 case 91:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003017#line 994 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003018 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003019 (yyval.a_expr) = NEW_EXPR();
3020 checkmem((yyval.a_expr));
3021 (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type;
3022 (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF;
3023 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003024 }
3025 break;
3026
Lev Walkin4a4543f2006-10-13 12:37:39 +00003027 case 92:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003028#line 1001 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003029 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003030 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003031 }
3032 break;
3033
Lev Walkin4a4543f2006-10-13 12:37:39 +00003034 case 93:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00003035#line 1007 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003036 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003037 (yyval.a_expr) = NEW_EXPR();
3038 checkmem((yyval.a_expr));
3039 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003040 }
3041 break;
3042
Lev Walkin4a4543f2006-10-13 12:37:39 +00003043 case 94:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003044#line 1012 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003045 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003046 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3047 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003048 }
3049 break;
3050
Lev Walkin4a4543f2006-10-13 12:37:39 +00003051 case 95:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00003052#line 1019 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003053 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003054 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3055 assert((yyval.a_expr)->Identifier == 0);
3056 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003057 }
3058 break;
3059
Lev Walkin4a4543f2006-10-13 12:37:39 +00003060 case 96:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003061#line 1024 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003062 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003063 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003064 }
3065 break;
3066
Lev Walkin4a4543f2006-10-13 12:37:39 +00003067 case 97:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003068#line 1027 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003069 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003070 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
3071 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003072 }
3073 break;
3074
Lev Walkin4a4543f2006-10-13 12:37:39 +00003075 case 98:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003076#line 1034 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003077 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003078 (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr);
3079 checkmem((yyval.a_expr));
3080 (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt);
3081 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
3082 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00003083 }
3084 break;
3085
Lev Walkin0e90aa02013-03-19 16:17:13 -07003086 case 99:
3087#line 1044 "asn1p_y.y"
3088 { (yyval.a_int) = 0; }
3089 break;
3090
3091 case 100:
3092#line 1045 "asn1p_y.y"
3093 { (yyval.a_int) = 1; }
3094 break;
3095
Lev Walkin4a4543f2006-10-13 12:37:39 +00003096 case 101:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003097#line 1049 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003098 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003099 (yyval.a_expr) = NEW_EXPR();
3100 checkmem((yyval.a_expr));
3101 (yyval.a_expr)->expr_type = A1TC_CLASSDEF;
3102 (yyval.a_expr)->meta_type = AMT_OBJECTCLASS;
3103 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003104 }
3105 break;
3106
Lev Walkin4a4543f2006-10-13 12:37:39 +00003107 case 102:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003108#line 1056 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003109 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003110 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3111 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003112 }
3113 break;
3114
Lev Walkin4a4543f2006-10-13 12:37:39 +00003115 case 103:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003116#line 1066 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003117 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003118 (yyval.a_expr) = NEW_EXPR();
3119 checkmem((yyval.a_expr));
3120 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
3121 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3122 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */
3123 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003124 }
3125 break;
3126
Lev Walkin4a4543f2006-10-13 12:37:39 +00003127 case 104:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003128#line 1076 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003129 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003130 (yyval.a_expr) = NEW_EXPR();
3131 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3132 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3133 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */
3134 (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int);
3135 (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker);
3136 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003137 }
3138 break;
3139
Lev Walkin4a4543f2006-10-13 12:37:39 +00003140 case 105:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003141#line 1087 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003142 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003143 (yyval.a_expr) = NEW_EXPR();
3144 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3145 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3146 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS;
3147 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3148 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003149 }
3150 break;
3151
Lev Walkin4a4543f2006-10-13 12:37:39 +00003152 case 106:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003153#line 1097 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003154 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003155 (yyval.a_expr) = NEW_EXPR();
3156 checkmem((yyval.a_expr));
3157 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3158 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3159 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3160 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS;
3161 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003162 }
3163 break;
3164
Lev Walkin4a4543f2006-10-13 12:37:39 +00003165 case 107:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003166#line 1108 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003167 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003168 (yyval.a_expr) = NEW_EXPR();
3169 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3170 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3171 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS;
3172 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3173 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003174 }
3175 break;
3176
Lev Walkin4a4543f2006-10-13 12:37:39 +00003177 case 108:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003178#line 1118 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003179 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003180 (yyval.a_expr) = NEW_EXPR();
3181 checkmem((yyval.a_expr));
3182 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3183 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3184 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS;
3185 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr));
3186 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003187 }
3188 break;
3189
Lev Walkin4a4543f2006-10-13 12:37:39 +00003190 case 109:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003191#line 1129 "asn1p_y.y"
3192 {
3193 (yyval.a_expr) = NEW_EXPR();
3194 checkmem((yyval.a_expr));
3195 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3196 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3197 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3198 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS;
3199 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
3200 }
Lev Walkin418298d2006-07-13 08:24:20 +00003201 break;
3202
Lev Walkin4a4543f2006-10-13 12:37:39 +00003203 case 110:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003204#line 1141 "asn1p_y.y"
3205 { (yyval.a_wsynt) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00003206 break;
3207
Lev Walkin4a4543f2006-10-13 12:37:39 +00003208 case 111:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003209#line 1142 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003210 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003211 (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003212 }
3213 break;
3214
Lev Walkin0e90aa02013-03-19 16:17:13 -07003215 case 112:
3216#line 1149 "asn1p_y.y"
3217 { asn1p_lexer_hack_enable_with_syntax(); }
3218 break;
3219
Lev Walkin4a4543f2006-10-13 12:37:39 +00003220 case 113:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003221#line 1151 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003222 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003223 (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003224 }
3225 break;
3226
Lev Walkin4a4543f2006-10-13 12:37:39 +00003227 case 114:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003228#line 1157 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003229 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003230 (yyval.a_wsynt) = asn1p_wsyntx_new();
3231 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003232 }
3233 break;
3234
Lev Walkin4a4543f2006-10-13 12:37:39 +00003235 case 115:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003236#line 1161 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003237 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003238 (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt);
3239 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003240 }
3241 break;
3242
Lev Walkin4a4543f2006-10-13 12:37:39 +00003243 case 116:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003244#line 1168 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003245 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003246 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0);
3247 (yyval.a_wchunk)->type = WC_WHITESPACE;
Lev Walkin418298d2006-07-13 08:24:20 +00003248 }
3249 break;
3250
Lev Walkin4a4543f2006-10-13 12:37:39 +00003251 case 117:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003252#line 1172 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003253 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003254 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003255 }
3256 break;
3257
Lev Walkin4a4543f2006-10-13 12:37:39 +00003258 case 118:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003259#line 1175 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003260 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003261 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0);
3262 (yyval.a_wchunk)->type = WC_FIELD;
Lev Walkin418298d2006-07-13 08:24:20 +00003263 }
3264 break;
3265
Lev Walkina9532f42006-09-17 04:52:50 +00003266 case 119:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003267#line 1179 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003268 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003269 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt));
Lev Walkin866bd7f2006-09-14 10:35:20 +00003270 }
3271 break;
3272
Lev Walkina9532f42006-09-17 04:52:50 +00003273 case 120:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003274#line 1185 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003275 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003276 (yyval.a_expr) = NEW_EXPR();
3277 checkmem((yyval.a_expr));
3278 (yyval.a_expr)->Identifier = strdup("...");
3279 checkmem((yyval.a_expr)->Identifier);
3280 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3281 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003282 }
3283 break;
3284
3285 case 121:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003286#line 1193 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003287 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003288 (yyval.a_expr) = NEW_EXPR();
3289 checkmem((yyval.a_expr));
3290 (yyval.a_expr)->Identifier = strdup("...");
3291 checkmem((yyval.a_expr)->Identifier);
3292 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3293 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3294 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003295 }
3296 break;
3297
3298 case 122:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003299#line 1202 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003300 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003301 (yyval.a_expr) = NEW_EXPR();
3302 checkmem((yyval.a_expr));
3303 (yyval.a_expr)->Identifier = strdup("...");
3304 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3305 checkmem((yyval.a_expr)->Identifier);
3306 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3307 (yyval.a_expr)->meta_type = AMT_TYPE;
3308 }
3309 break;
3310
3311 case 123:
3312#line 1214 "asn1p_y.y"
3313 {
3314 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3315 (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag);
Lev Walkin070a52d2004-08-22 03:19:54 +00003316 /*
3317 * Outer constraint for SEQUENCE OF and SET OF applies
3318 * to the inner type.
3319 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07003320 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3321 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3322 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3323 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003324 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003325 if((yyval.a_expr)->constraints) {
3326 assert(!(yyvsp[(2) - (3)].a_expr));
Lev Walkin070a52d2004-08-22 03:19:54 +00003327 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003328 (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003329 }
3330 }
Lev Walkin418298d2006-07-13 08:24:20 +00003331 }
3332 break;
3333
Lev Walkin0e90aa02013-03-19 16:17:13 -07003334 case 124:
3335#line 1236 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003336 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003337 (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0;
Lev Walkinfb872bd2006-03-18 06:53:11 +00003338 asn1p_as_pointer = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00003339 }
3340 break;
3341
Lev Walkin0e90aa02013-03-19 16:17:13 -07003342 case 125:
3343#line 1243 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003344 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003345 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3346 (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int);
Lev Walkinfb872bd2006-03-18 06:53:11 +00003347
Lev Walkin0e90aa02013-03-19 16:17:13 -07003348 if(((yyval.a_expr)->marker.flags & EM_INDIRECT)
3349 && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) {
Lev Walkinef625402005-09-05 05:17:57 +00003350 fprintf(stderr,
3351 "INFO: Directive <ASN1C:RepresentAsPointer> "
3352 "applied to %s at line %d\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003353 ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
3354 ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
Lev Walkinef625402005-09-05 05:17:57 +00003355 : "member",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003356 (yyval.a_expr)->_lineno
Lev Walkinef625402005-09-05 05:17:57 +00003357 );
3358 }
Lev Walkin418298d2006-07-13 08:24:20 +00003359 }
3360 break;
3361
Lev Walkin4a4543f2006-10-13 12:37:39 +00003362 case 126:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003363#line 1262 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003364 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003365 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003366 }
3367 break;
3368
Lev Walkin4a4543f2006-10-13 12:37:39 +00003369 case 127:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003370#line 1265 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003371 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003372 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3373 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3374 (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE;
3375 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003376 }
3377 break;
3378
Lev Walkin4a4543f2006-10-13 12:37:39 +00003379 case 128:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003380#line 1271 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003381 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003382 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3383 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3384 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE;
3385 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003386 }
3387 break;
3388
Lev Walkin4a4543f2006-10-13 12:37:39 +00003389 case 129:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003390#line 1277 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003391 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003392 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3393 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3394 (yyval.a_expr)->expr_type = ASN_CONSTR_SET;
3395 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003396 }
3397 break;
3398
Lev Walkin4a4543f2006-10-13 12:37:39 +00003399 case 130:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003400#line 1283 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003401 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003402 (yyval.a_expr) = NEW_EXPR();
3403 checkmem((yyval.a_expr));
3404 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3405 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF;
3406 (yyval.a_expr)->meta_type = AMT_TYPE;
3407 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3408 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3409 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003410 }
3411 break;
3412
Lev Walkin4a4543f2006-10-13 12:37:39 +00003413 case 131:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003414#line 1293 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003415 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003416 (yyval.a_expr) = NEW_EXPR();
3417 checkmem((yyval.a_expr));
3418 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3419 (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF;
3420 (yyval.a_expr)->meta_type = AMT_TYPE;
3421 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3422 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3423 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003424 }
3425 break;
3426
Lev Walkin4a4543f2006-10-13 12:37:39 +00003427 case 132:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003428#line 1303 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003429 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003430 (yyval.a_expr) = NEW_EXPR();
3431 checkmem((yyval.a_expr));
3432 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3433 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003434 }
3435 break;
3436
Lev Walkin4a4543f2006-10-13 12:37:39 +00003437 case 133:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003438#line 1309 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003439 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003440 int ret;
3441 (yyval.a_expr) = NEW_EXPR();
3442 checkmem((yyval.a_expr));
3443 (yyval.a_expr)->reference = asn1p_ref_new(yylineno);
3444 ret = asn1p_ref_add_component((yyval.a_expr)->reference,
3445 (yyvsp[(4) - (4)].tv_str), RLT_lowercase);
3446 checkmem(ret == 0);
3447 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3448 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003449 }
3450 break;
3451
Lev Walkin4a4543f2006-10-13 12:37:39 +00003452 case 134:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003453#line 1320 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003454 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003455 (yyval.a_expr) = NEW_EXPR();
3456 checkmem((yyval.a_expr));
3457 (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref);
3458 (yyval.a_expr)->expr_type = A1TC_INSTANCE;
3459 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003460 }
3461 break;
3462
Lev Walkina9532f42006-09-17 04:52:50 +00003463 case 135:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003464#line 1335 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003465 {
3466 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003467 (yyval.a_ref) = asn1p_ref_new(yylineno);
3468 checkmem((yyval.a_ref));
3469 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003470 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003471 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003472 }
3473 break;
3474
3475 case 136:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003476#line 1343 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003477 {
3478 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003479 (yyval.a_ref) = asn1p_ref_new(yylineno);
3480 checkmem((yyval.a_ref));
3481 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003482 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003483 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003484 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003485 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003486 }
3487 break;
3488
3489 case 137:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003490#line 1353 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003491 {
Lev Walkin9d542d22006-03-14 16:31:37 +00003492 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003493 (yyval.a_ref) = asn1p_ref_new(yylineno);
3494 checkmem((yyval.a_ref));
3495 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9d542d22006-03-14 16:31:37 +00003496 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003497 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9d542d22006-03-14 16:31:37 +00003498 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003499 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003500 }
3501 break;
3502
Lev Walkin4a4543f2006-10-13 12:37:39 +00003503 case 138:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003504#line 1363 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003505 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003506 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003507 (yyval.a_ref) = asn1p_ref_new(yylineno);
3508 checkmem((yyval.a_ref));
3509 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9c974182004-09-15 11:59:51 +00003510 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003511 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3512 checkmem(ret == 0);
3513 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003514 }
3515 break;
3516
Lev Walkin4a4543f2006-10-13 12:37:39 +00003517 case 139:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003518#line 1373 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003519 {
Lev Walkin9c974182004-09-15 11:59:51 +00003520 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003521 (yyval.a_ref) = asn1p_ref_new(yylineno);
3522 checkmem((yyval.a_ref));
3523 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
3524 free((yyvsp[(1) - (1)].tv_str));
3525 checkmem(ret == 0);
3526 }
3527 break;
3528
3529 case 140:
3530#line 1381 "asn1p_y.y"
3531 {
3532 int ret;
3533 (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref);
3534 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS);
3535 free((yyvsp[(1) - (3)].tv_str));
Lev Walkinf15320b2004-06-03 03:38:44 +00003536 checkmem(ret == 0);
3537 /*
3538 * Move the last element infront.
3539 */
3540 {
3541 struct asn1p_ref_component_s tmp_comp;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003542 tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1];
3543 memmove(&(yyval.a_ref)->components[1],
3544 &(yyval.a_ref)->components[0],
3545 sizeof((yyval.a_ref)->components[0])
3546 * ((yyval.a_ref)->comp_count - 1));
3547 (yyval.a_ref)->components[0] = tmp_comp;
Lev Walkinf15320b2004-06-03 03:38:44 +00003548 }
Lev Walkin418298d2006-07-13 08:24:20 +00003549 }
3550 break;
3551
Lev Walkin4a4543f2006-10-13 12:37:39 +00003552 case 141:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003553#line 1403 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003554 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003555 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003556 (yyval.a_ref) = asn1p_ref_new(yylineno);
3557 checkmem((yyval.a_ref));
3558 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type);
3559 free((yyvsp[(1) - (1)].a_refcomp).name);
Lev Walkinf15320b2004-06-03 03:38:44 +00003560 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003561 }
3562 break;
3563
Lev Walkin0e90aa02013-03-19 16:17:13 -07003564 case 142:
3565#line 1411 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003566 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003567 int ret;
3568 (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref);
3569 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type);
3570 free((yyvsp[(3) - (3)].a_refcomp).name);
3571 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003572 }
3573 break;
3574
Lev Walkin4a4543f2006-10-13 12:37:39 +00003575 case 144:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00003576#line 1424 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003577 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003578 (yyval.a_refcomp).lex_type = RLT_AmpUppercase;
3579 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003580 }
3581 break;
3582
Lev Walkin4a4543f2006-10-13 12:37:39 +00003583 case 145:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003584#line 1429 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003585 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003586 (yyval.a_refcomp).lex_type = RLT_Amplowercase;
3587 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003588 }
3589 break;
3590
Lev Walkin4a4543f2006-10-13 12:37:39 +00003591 case 146:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003592#line 1438 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003593 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003594 (yyval.a_ref) = asn1p_ref_new(yylineno);
3595 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase);
Lev Walkin418298d2006-07-13 08:24:20 +00003596 }
3597 break;
3598
Lev Walkin4a4543f2006-10-13 12:37:39 +00003599 case 147:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003600#line 1442 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003601 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003602 (yyval.a_ref) = (yyval.a_ref);
3603 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase);
Lev Walkin418298d2006-07-13 08:24:20 +00003604 }
3605 break;
3606
Lev Walkin4a4543f2006-10-13 12:37:39 +00003607 case 148:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003608#line 1446 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003609 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003610 (yyval.a_ref) = (yyval.a_ref);
3611 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase);
Lev Walkin418298d2006-07-13 08:24:20 +00003612 }
3613 break;
3614
Lev Walkin4a4543f2006-10-13 12:37:39 +00003615 case 149:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003616#line 1453 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003617 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003618 (yyval.a_ref) = asn1p_ref_new(yylineno);
3619 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
Lev Walkin418298d2006-07-13 08:24:20 +00003620 }
3621 break;
3622
Lev Walkin0e90aa02013-03-19 16:17:13 -07003623 case 150:
3624#line 1473 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003625 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003626 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
3627 assert((yyval.a_expr)->Identifier == NULL);
3628 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3629 (yyval.a_expr)->meta_type = AMT_VALUE;
3630 (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003631 }
3632 break;
3633
Lev Walkin4a4543f2006-10-13 12:37:39 +00003634 case 153:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003635#line 1485 "asn1p_y.y"
3636 {
3637 (yyval.a_value) = asn1p_value_fromint(0);
3638 checkmem((yyval.a_value));
3639 (yyval.a_value)->type = ATV_CHOICE_IDENTIFIER;
3640 (yyval.a_value)->value.choice_identifier.identifier = (yyvsp[(1) - (3)].tv_str);
3641 (yyval.a_value)->value.choice_identifier.value = (yyvsp[(3) - (3)].a_value);
3642 }
Lev Walkin418298d2006-07-13 08:24:20 +00003643 break;
3644
Lev Walkin4a4543f2006-10-13 12:37:39 +00003645 case 154:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003646#line 1492 "asn1p_y.y"
3647 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003648 break;
3649
Lev Walkin4a4543f2006-10-13 12:37:39 +00003650 case 155:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00003651#line 1492 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003652 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003653 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
3654 checkmem((yyval.a_value));
3655 (yyval.a_value)->type = ATV_UNPARSED;
Lev Walkin418298d2006-07-13 08:24:20 +00003656 }
3657 break;
3658
Lev Walkin4a4543f2006-10-13 12:37:39 +00003659 case 156:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003660#line 1497 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003661 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003662 (yyval.a_value) = asn1p_value_fromint(0);
3663 checkmem((yyval.a_value));
3664 (yyval.a_value)->type = ATV_NULL;
Lev Walkin418298d2006-07-13 08:24:20 +00003665 }
3666 break;
3667
Lev Walkin4a4543f2006-10-13 12:37:39 +00003668 case 157:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00003669#line 1505 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003670 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003671 (yyval.a_value) = asn1p_value_fromint(0);
3672 checkmem((yyval.a_value));
3673 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00003674 }
3675 break;
3676
Lev Walkin4a4543f2006-10-13 12:37:39 +00003677 case 158:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00003678#line 1510 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003679 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003680 (yyval.a_value) = asn1p_value_fromint(0);
3681 checkmem((yyval.a_value));
3682 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00003683 }
3684 break;
3685
Lev Walkin4a4543f2006-10-13 12:37:39 +00003686 case 159:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003687#line 1515 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003688 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003689 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
3690 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003691 }
3692 break;
3693
Lev Walkin4a4543f2006-10-13 12:37:39 +00003694 case 160:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003695#line 1519 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003696 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003697 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
3698 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003699 }
3700 break;
3701
Lev Walkin4a4543f2006-10-13 12:37:39 +00003702 case 161:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003703#line 1523 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003704 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003705 (yyval.a_value) = (yyval.a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003706 }
3707 break;
3708
Lev Walkin4a4543f2006-10-13 12:37:39 +00003709 case 162:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003710#line 1526 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003711 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003712 (yyval.a_value) = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003713 }
3714 break;
3715
Lev Walkin4a4543f2006-10-13 12:37:39 +00003716 case 163:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003717#line 1532 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003718 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003719 asn1p_ref_t *ref;
3720 int ret;
3721 ref = asn1p_ref_new(yylineno);
3722 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003723 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinf15320b2004-06-03 03:38:44 +00003724 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003725 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3726 checkmem((yyval.a_value));
3727 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003728 }
3729 break;
3730
Lev Walkin4a4543f2006-10-13 12:37:39 +00003731 case 164:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003732#line 1543 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003733 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003734 asn1p_ref_t *ref;
3735 int ret;
3736 ref = asn1p_ref_new(yylineno);
3737 checkmem(ref);
3738 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3739 checkmem(ret == 0);
3740 ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3741 checkmem(ret == 0);
3742 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3743 checkmem((yyval.a_value));
3744 free((yyvsp[(1) - (3)].tv_str));
3745 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003746 }
3747 break;
3748
Lev Walkin4a4543f2006-10-13 12:37:39 +00003749 case 165:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003750#line 1561 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003751 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003752 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0);
3753 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003754 }
3755 break;
3756
Lev Walkin4a4543f2006-10-13 12:37:39 +00003757 case 166:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00003758#line 1565 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003759 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003760 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3761 checkmem((yyval.a_value));
3762 (yyval.a_value)->type = ATV_TUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003763 }
3764 break;
3765
Lev Walkin4a4543f2006-10-13 12:37:39 +00003766 case 167:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003767#line 1570 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003768 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003769 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3770 checkmem((yyval.a_value));
3771 (yyval.a_value)->type = ATV_QUADRUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003772 }
3773 break;
3774
Lev Walkin4a4543f2006-10-13 12:37:39 +00003775 case 168:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003776#line 1578 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003777 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003778 (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1;
3779 (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1);
3780 checkmem((yyval.tv_opaque).buf);
3781 (yyval.tv_opaque).buf[0] = '{';
3782 memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len);
3783 (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0';
3784 free((yyvsp[(1) - (1)].tv_opaque).buf);
Lev Walkin418298d2006-07-13 08:24:20 +00003785 }
3786 break;
3787
Lev Walkin4a4543f2006-10-13 12:37:39 +00003788 case 169:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003789#line 1587 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003790 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003791 int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len;
3792 char *p = malloc(newsize + 1);
3793 checkmem(p);
3794 memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len);
3795 memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len);
3796 p[newsize] = '\0';
3797 free((yyvsp[(1) - (2)].tv_opaque).buf);
3798 free((yyvsp[(2) - (2)].tv_opaque).buf);
3799 (yyval.tv_opaque).buf = p;
3800 (yyval.tv_opaque).len = newsize;
Lev Walkin418298d2006-07-13 08:24:20 +00003801 }
3802 break;
3803
Lev Walkin0e90aa02013-03-19 16:17:13 -07003804 case 170:
3805#line 1602 "asn1p_y.y"
3806 { (yyval.a_type) = ASN_BASIC_BOOLEAN; }
3807 break;
3808
3809 case 171:
3810#line 1603 "asn1p_y.y"
3811 { (yyval.a_type) = ASN_BASIC_NULL; }
3812 break;
3813
3814 case 172:
3815#line 1604 "asn1p_y.y"
3816 { (yyval.a_type) = ASN_BASIC_REAL; }
3817 break;
3818
3819 case 173:
3820#line 1605 "asn1p_y.y"
3821 { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); }
3822 break;
3823
3824 case 174:
3825#line 1606 "asn1p_y.y"
3826 { (yyval.a_type) = ASN_BASIC_OCTET_STRING; }
3827 break;
3828
3829 case 175:
3830#line 1607 "asn1p_y.y"
3831 { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; }
3832 break;
3833
3834 case 176:
3835#line 1608 "asn1p_y.y"
3836 { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; }
3837 break;
3838
3839 case 177:
3840#line 1609 "asn1p_y.y"
3841 { (yyval.a_type) = ASN_BASIC_EXTERNAL; }
3842 break;
3843
3844 case 178:
3845#line 1610 "asn1p_y.y"
3846 { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; }
3847 break;
3848
3849 case 179:
3850#line 1611 "asn1p_y.y"
3851 { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; }
3852 break;
3853
3854 case 180:
3855#line 1612 "asn1p_y.y"
3856 { (yyval.a_type) = ASN_BASIC_UTCTime; }
3857 break;
3858
3859 case 181:
3860#line 1613 "asn1p_y.y"
3861 { (yyval.a_type) = ASN_BASIC_GeneralizedTime; }
3862 break;
3863
3864 case 182:
3865#line 1614 "asn1p_y.y"
3866 { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); }
3867 break;
3868
3869 case 183:
3870#line 1621 "asn1p_y.y"
3871 { (yyval.a_type) = ASN_BASIC_INTEGER; }
3872 break;
3873
3874 case 184:
3875#line 1622 "asn1p_y.y"
3876 { (yyval.a_type) = ASN_BASIC_ENUMERATED; }
3877 break;
3878
3879 case 185:
3880#line 1623 "asn1p_y.y"
3881 { (yyval.a_type) = ASN_BASIC_BIT_STRING; }
3882 break;
3883
Lev Walkin4a4543f2006-10-13 12:37:39 +00003884 case 186:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003885#line 1627 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003886 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003887 (yyval.a_expr) = NEW_EXPR();
3888 checkmem((yyval.a_expr));
3889 (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type);
3890 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003891 }
3892 break;
3893
Lev Walkin4a4543f2006-10-13 12:37:39 +00003894 case 187:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003895#line 1633 "asn1p_y.y"
3896 {
3897 if((yyvsp[(2) - (2)].a_expr)) {
3898 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3899 } else {
3900 (yyval.a_expr) = NEW_EXPR();
3901 checkmem((yyval.a_expr));
3902 }
3903 (yyval.a_expr)->expr_type = (yyvsp[(1) - (2)].a_type);
3904 (yyval.a_expr)->meta_type = AMT_TYPE;
3905 }
Lev Walkin418298d2006-07-13 08:24:20 +00003906 break;
3907
Lev Walkin4a4543f2006-10-13 12:37:39 +00003908 case 188:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003909#line 1646 "asn1p_y.y"
3910 { (yyval.a_type) = ASN_STRING_BMPString; }
3911 break;
3912
3913 case 189:
3914#line 1647 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003915 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003916 (yyval.a_type) = ASN_STRING_GeneralString;
Lev Walkin9c974182004-09-15 11:59:51 +00003917 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00003918 }
3919 break;
3920
Lev Walkin0e90aa02013-03-19 16:17:13 -07003921 case 190:
3922#line 1651 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003923 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003924 (yyval.a_type) = ASN_STRING_GraphicString;
Lev Walkin9c974182004-09-15 11:59:51 +00003925 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00003926 }
3927 break;
3928
Lev Walkin4a4543f2006-10-13 12:37:39 +00003929 case 191:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003930#line 1655 "asn1p_y.y"
3931 { (yyval.a_type) = ASN_STRING_IA5String; }
Lev Walkin418298d2006-07-13 08:24:20 +00003932 break;
3933
Lev Walkin4a4543f2006-10-13 12:37:39 +00003934 case 192:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003935#line 1656 "asn1p_y.y"
3936 { (yyval.a_type) = ASN_STRING_ISO646String; }
Lev Walkin418298d2006-07-13 08:24:20 +00003937 break;
3938
Lev Walkin4a4543f2006-10-13 12:37:39 +00003939 case 193:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003940#line 1657 "asn1p_y.y"
3941 { (yyval.a_type) = ASN_STRING_NumericString; }
Lev Walkin418298d2006-07-13 08:24:20 +00003942 break;
3943
Lev Walkin4a4543f2006-10-13 12:37:39 +00003944 case 194:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003945#line 1658 "asn1p_y.y"
3946 { (yyval.a_type) = ASN_STRING_PrintableString; }
3947 break;
3948
3949 case 195:
3950#line 1659 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003951 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003952 (yyval.a_type) = ASN_STRING_T61String;
Lev Walkin9c974182004-09-15 11:59:51 +00003953 fprintf(stderr, "WARNING: T61String is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00003954 }
3955 break;
3956
Lev Walkin4a4543f2006-10-13 12:37:39 +00003957 case 196:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003958#line 1663 "asn1p_y.y"
3959 { (yyval.a_type) = ASN_STRING_TeletexString; }
Lev Walkin418298d2006-07-13 08:24:20 +00003960 break;
3961
Lev Walkin4a4543f2006-10-13 12:37:39 +00003962 case 197:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003963#line 1664 "asn1p_y.y"
3964 { (yyval.a_type) = ASN_STRING_UniversalString; }
Lev Walkin418298d2006-07-13 08:24:20 +00003965 break;
3966
Lev Walkin4a4543f2006-10-13 12:37:39 +00003967 case 198:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003968#line 1665 "asn1p_y.y"
3969 { (yyval.a_type) = ASN_STRING_UTF8String; }
3970 break;
3971
3972 case 199:
3973#line 1666 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003974 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003975 (yyval.a_type) = ASN_STRING_VideotexString;
Lev Walkin9c974182004-09-15 11:59:51 +00003976 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00003977 }
3978 break;
3979
Lev Walkin4a4543f2006-10-13 12:37:39 +00003980 case 200:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003981#line 1670 "asn1p_y.y"
3982 { (yyval.a_type) = ASN_STRING_VisibleString; }
Lev Walkin418298d2006-07-13 08:24:20 +00003983 break;
3984
Lev Walkin0e90aa02013-03-19 16:17:13 -07003985 case 201:
3986#line 1671 "asn1p_y.y"
3987 { (yyval.a_type) = ASN_STRING_ObjectDescriptor; }
Lev Walkin418298d2006-07-13 08:24:20 +00003988 break;
3989
Lev Walkin4a4543f2006-10-13 12:37:39 +00003990 case 206:
Lev Walkin0e90aa02013-03-19 16:17:13 -07003991#line 1682 "asn1p_y.y"
3992 { (yyval.a_constr) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00003993 break;
3994
Lev Walkin0e90aa02013-03-19 16:17:13 -07003995 case 207:
3996#line 1683 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003997 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003998 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00003999 }
4000 break;
4001
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004002 case 209:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004003#line 1693 "asn1p_y.y"
4004 {
4005 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0);
4006 }
4007 break;
4008
4009 case 210:
4010#line 1696 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004011 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004012 /*
4013 * This is a special case, for compatibility purposes.
Lev Walkinf59d0752004-08-18 04:59:12 +00004014 * It goes without parentheses.
Lev Walkinf15320b2004-06-03 03:38:44 +00004015 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07004016 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(3) - (4)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004017 }
4018 break;
4019
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004020 case 211:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004021#line 1706 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004022 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004023 (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004024 }
4025 break;
4026
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004027 case 212:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004028#line 1709 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004029 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004030 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (4)].a_constr), (yyvsp[(3) - (4)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004031 }
4032 break;
4033
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004034 case 213:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004035#line 1715 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004036 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004037 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4038 (yyval.a_constr)->type = ACT_EL_EXT;
Lev Walkin418298d2006-07-13 08:24:20 +00004039 }
4040 break;
4041
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004042 case 214:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004043#line 1719 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004044 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004045 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004046 }
4047 break;
4048
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004049 case 215:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004050#line 1722 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004051 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004052 asn1p_constraint_t *ct;
4053 ct = asn1p_constraint_new(yylineno);
Lev Walkinf15320b2004-06-03 03:38:44 +00004054 ct->type = ACT_EL_EXT;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004055 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004056 }
4057 break;
4058
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004059 case 216:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004060#line 1728 "asn1p_y.y"
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004061 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004062 asn1p_constraint_t *ct;
4063 ct = asn1p_constraint_new(yylineno);
4064 ct->type = ACT_EL_EXT;
4065 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct);
4066 ct = (yyval.a_constr);
4067 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr));
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004068 }
4069 break;
4070
Lev Walkin0e90aa02013-03-19 16:17:13 -07004071 case 217:
4072#line 1736 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004073 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004074 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004075 }
4076 break;
4077
Lev Walkin0e90aa02013-03-19 16:17:13 -07004078 case 219:
4079#line 1743 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004080 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004081 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004082 }
4083 break;
4084
Lev Walkin0e90aa02013-03-19 16:17:13 -07004085 case 221:
4086#line 1750 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004087 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004088 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 +00004089 }
4090 break;
4091
Lev Walkin0e90aa02013-03-19 16:17:13 -07004092 case 223:
4093#line 1757 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004094 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004095 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 +00004096 }
4097 break;
4098
Lev Walkin4a4543f2006-10-13 12:37:39 +00004099 case 225:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004100#line 1765 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004101 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004102 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_EXC, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004103 }
4104 break;
4105
Lev Walkin4a4543f2006-10-13 12:37:39 +00004106 case 226:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004107#line 1771 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004108 {
Lev Walkinf59d0752004-08-18 04:59:12 +00004109 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004110 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4111 checkmem((yyval.a_constr));
4112 (yyval.a_constr)->type = (yyvsp[(1) - (4)].a_ctype);
4113 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (4)].a_constr));
Lev Walkinf59d0752004-08-18 04:59:12 +00004114 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004115 }
4116 break;
4117
Lev Walkin4a4543f2006-10-13 12:37:39 +00004118 case 227:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004119#line 1779 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004120 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004121 int ret;
4122 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4123 checkmem((yyval.a_constr));
4124 (yyval.a_constr)->type = ACT_CA_SET;
4125 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4126 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004127 }
4128 break;
4129
Lev Walkin4a4543f2006-10-13 12:37:39 +00004130 case 228:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004131#line 1787 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004132 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004133 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4134 checkmem((yyval.a_constr));
4135 (yyval.a_constr)->type = ACT_EL_VALUE;
4136 (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004137 }
4138 break;
4139
Lev Walkinf1727152006-09-21 01:50:37 +00004140 case 229:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004141#line 1793 "asn1p_y.y"
Lev Walkinf1727152006-09-21 01:50:37 +00004142 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004143 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4144 checkmem((yyval.a_constr));
4145 (yyval.a_constr)->type = ACT_EL_TYPE;
4146 (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value);
Lev Walkinf1727152006-09-21 01:50:37 +00004147 }
4148 break;
4149
4150 case 230:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004151#line 1799 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004152 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004153 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4154 checkmem((yyval.a_constr));
4155 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4156 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
4157 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004158 }
4159 break;
4160
4161 case 231:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004162#line 1806 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004163 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004164 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4165 checkmem((yyval.a_constr));
4166 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4167 (yyval.a_constr)->range_start = asn1p_value_fromint(-123);
4168 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
4169 (yyval.a_constr)->range_start->type = ATV_MIN;
Lev Walkin4a4543f2006-10-13 12:37:39 +00004170 }
4171 break;
4172
4173 case 232:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004174#line 1814 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004175 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004176 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4177 checkmem((yyval.a_constr));
4178 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4179 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
4180 (yyval.a_constr)->range_stop = asn1p_value_fromint(321);
4181 (yyval.a_constr)->range_stop->type = ATV_MAX;
Lev Walkina9532f42006-09-17 04:52:50 +00004182 }
4183 break;
4184
Lev Walkin4a4543f2006-10-13 12:37:39 +00004185 case 233:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004186#line 1822 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00004187 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004188 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4189 checkmem((yyval.a_constr));
4190 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4191 (yyval.a_constr)->range_start = asn1p_value_fromint(-123);
4192 (yyval.a_constr)->range_stop = asn1p_value_fromint(321);
4193 (yyval.a_constr)->range_start->type = ATV_MIN;
4194 (yyval.a_constr)->range_stop->type = ATV_MAX;
Lev Walkin866bd7f2006-09-14 10:35:20 +00004195 }
4196 break;
4197
Lev Walkin4a4543f2006-10-13 12:37:39 +00004198 case 234:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004199#line 1831 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004200 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004201 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004202 }
4203 break;
4204
Lev Walkin4a4543f2006-10-13 12:37:39 +00004205 case 235:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004206#line 1834 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004207 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004208 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004209 }
4210 break;
4211
Lev Walkin4a4543f2006-10-13 12:37:39 +00004212 case 236:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004213#line 1840 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004214 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004215 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4216 (yyval.a_constr)->type = ACT_CT_PATTERN;
4217 (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 +00004218 }
4219 break;
4220
4221 case 237:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004222#line 1845 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004223 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004224 asn1p_ref_t *ref;
4225 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4226 (yyval.a_constr)->type = ACT_CT_PATTERN;
4227 ref = asn1p_ref_new(yylineno);
4228 asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase);
4229 (yyval.a_constr)->value = asn1p_value_fromref(ref, 0);
Lev Walkin5c541f12006-10-18 18:40:14 +00004230 }
4231 break;
4232
4233 case 238:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004234#line 1856 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004235 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004236 (yyval.a_ctype) = ACT_CT_SIZE;
Lev Walkin5c541f12006-10-18 18:40:14 +00004237 }
4238 break;
4239
4240 case 239:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004241#line 1859 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004242 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004243 (yyval.a_ctype) = ACT_CT_FROM;
Lev Walkin418298d2006-07-13 08:24:20 +00004244 }
4245 break;
4246
Lev Walkin5c541f12006-10-18 18:40:14 +00004247 case 240:
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004248#line 1865 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004249 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004250 (yyval.a_value) = asn1p_value_fromint(0);
4251 checkmem((yyval.a_value));
4252 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00004253 }
4254 break;
4255
Lev Walkin0e90aa02013-03-19 16:17:13 -07004256 case 241:
4257#line 1870 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004258 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004259 (yyval.a_value) = asn1p_value_fromint(1);
4260 checkmem((yyval.a_value));
4261 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00004262 }
4263 break;
4264
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004265 case 245:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004266#line 1878 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004267 {
Lev Walkinc8092cb2005-02-18 16:34:21 +00004268 asn1p_ref_t *ref;
4269 int ret;
4270 ref = asn1p_ref_new(yylineno);
4271 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004272 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinc8092cb2005-02-18 16:34:21 +00004273 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004274 (yyval.a_value) = asn1p_value_fromref(ref, 0);
4275 checkmem((yyval.a_value));
4276 free((yyvsp[(1) - (1)].tv_str));
4277 }
4278 break;
4279
4280 case 246:
4281#line 1892 "asn1p_y.y"
4282 {
4283 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
4284 checkmem((yyval.a_value));
4285 }
4286 break;
4287
4288 case 247:
4289#line 1896 "asn1p_y.y"
4290 {
4291 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
4292 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00004293 }
4294 break;
4295
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004296 case 248:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004297#line 1903 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004298 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004299 asn1p_ref_t *ref;
4300 int ret;
4301 ref = asn1p_ref_new(yylineno);
4302 checkmem(ref);
4303 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN);
4304 checkmem(ret == 0);
4305 (yyval.a_value) = asn1p_value_fromref(ref, 0);
4306 checkmem((yyval.a_value));
4307 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004308 }
4309 break;
4310
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004311 case 249:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004312#line 1917 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004313 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004314 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004315 }
4316 break;
4317
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004318 case 250:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004319#line 1920 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004320 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004321 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(4) - (5)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004322 }
4323 break;
4324
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004325 case 251:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004326#line 1926 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004327 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004328 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004329 }
4330 break;
4331
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004332 case 252:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004333#line 1929 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004334 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004335 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(1) - (3)].a_constr), (yyvsp[(3) - (3)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004336 }
4337 break;
4338
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004339 case 253:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004340#line 1935 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004341 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004342 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4343 checkmem((yyval.a_constr));
4344 (yyval.a_constr)->type = ACT_EL_EXT;
4345 (yyval.a_constr)->value = asn1p_value_frombuf("...", 3, 1);
Lev Walkin418298d2006-07-13 08:24:20 +00004346 }
4347 break;
4348
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004349 case 254:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004350#line 1941 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004351 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004352 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4353 checkmem((yyval.a_constr));
4354 (yyval.a_constr)->type = ACT_EL_VALUE;
4355 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(1) - (3)].tv_str), strlen((yyvsp[(1) - (3)].tv_str)), 0);
4356 (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres);
4357 if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004358 }
4359 break;
4360
Lev Walkin0e90aa02013-03-19 16:17:13 -07004361 case 255:
4362#line 1955 "asn1p_y.y"
4363 { (yyval.a_pres) = ACPRES_DEFAULT; }
4364 break;
4365
4366 case 256:
4367#line 1956 "asn1p_y.y"
4368 { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); }
4369 break;
4370
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004371 case 257:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004372#line 1960 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004373 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004374 (yyval.a_pres) = ACPRES_PRESENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004375 }
4376 break;
4377
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004378 case 258:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004379#line 1963 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004380 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004381 (yyval.a_pres) = ACPRES_ABSENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004382 }
4383 break;
4384
Lev Walkin0e90aa02013-03-19 16:17:13 -07004385 case 259:
4386#line 1966 "asn1p_y.y"
4387 {
4388 (yyval.a_pres) = ACPRES_OPTIONAL;
4389 }
Lev Walkina9532f42006-09-17 04:52:50 +00004390 break;
4391
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004392 case 263:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004393#line 1981 "asn1p_y.y"
4394 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00004395 break;
4396
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004397 case 264:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004398#line 1981 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004399 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004400 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4401 checkmem((yyval.a_constr));
4402 (yyval.a_constr)->type = ACT_CT_CTDBY;
4403 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0);
4404 checkmem((yyval.a_constr)->value);
4405 (yyval.a_constr)->value->type = ATV_UNPARSED;
Lev Walkina9532f42006-09-17 04:52:50 +00004406 }
4407 break;
4408
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004409 case 265:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004410#line 1992 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004411 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004412 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4413 (yyval.a_constr)->type = ACT_CT_CTNG;
4414 (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Lev Walkin4a4543f2006-10-13 12:37:39 +00004415 }
4416 break;
4417
Lev Walkin0e90aa02013-03-19 16:17:13 -07004418 case 266:
4419#line 2000 "asn1p_y.y"
4420 { (yyval.a_ctype) = ACT_EL_RANGE; }
4421 break;
4422
4423 case 267:
4424#line 2001 "asn1p_y.y"
4425 { (yyval.a_ctype) = ACT_EL_RLRANGE; }
4426 break;
4427
4428 case 268:
4429#line 2002 "asn1p_y.y"
4430 { (yyval.a_ctype) = ACT_EL_LLRANGE; }
4431 break;
4432
4433 case 269:
4434#line 2003 "asn1p_y.y"
4435 { (yyval.a_ctype) = ACT_EL_ULRANGE; }
4436 break;
4437
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004438 case 270:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004439#line 2006 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004440 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004441 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004442 }
4443 break;
4444
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004445 case 271:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004446#line 2009 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004447 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004448 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004449 }
4450 break;
4451
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004452 case 272:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004453#line 2018 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004454 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004455 asn1p_ref_t *ref = asn1p_ref_new(yylineno);
4456 asn1p_constraint_t *ct;
4457 int ret;
4458 ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0);
4459 checkmem(ret == 0);
4460 ct = asn1p_constraint_new(yylineno);
4461 checkmem((yyval.a_constr));
4462 ct->type = ACT_EL_VALUE;
4463 ct->value = asn1p_value_fromref(ref, 0);
4464 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004465 }
4466 break;
4467
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004468 case 273:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004469#line 2033 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004470 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004471 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 +00004472 }
4473 break;
4474
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004475 case 274:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004476#line 2039 "asn1p_y.y"
4477 {
4478 (yyval.a_constr) = asn1p_constraint_new(yylineno);
4479 checkmem((yyval.a_constr));
4480 (yyval.a_constr)->type = ACT_EL_VALUE;
4481 (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4482 }
4483 break;
4484
4485 case 275:
4486#line 2045 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004487 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004488 asn1p_constraint_t *ct;
4489 ct = asn1p_constraint_new(yylineno);
4490 checkmem(ct);
4491 ct->type = ACT_EL_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004492 ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0);
4493 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004494 }
4495 break;
4496
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004497 case 276:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004498#line 2059 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004499 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004500 char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2);
Lev Walkinf15320b2004-06-03 03:38:44 +00004501 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004502 *p = '@';
4503 strcpy(p + 1, (yyvsp[(2) - (2)].tv_str));
4504 (yyval.a_ref) = asn1p_ref_new(yylineno);
4505 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
Lev Walkinf15320b2004-06-03 03:38:44 +00004506 checkmem(ret == 0);
4507 free(p);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004508 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004509 }
4510 break;
4511
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004512 case 277:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004513#line 2070 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004514 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004515 char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3);
4516 int ret;
4517 p[0] = '@';
4518 p[1] = '.';
4519 strcpy(p + 2, (yyvsp[(3) - (3)].tv_str));
4520 (yyval.a_ref) = asn1p_ref_new(yylineno);
4521 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
4522 checkmem(ret == 0);
4523 free(p);
4524 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004525 }
4526 break;
4527
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004528 case 278:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004529#line 2086 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004530 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004531 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00004532 }
4533 break;
4534
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004535 case 279:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004536#line 2089 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004537 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004538 int l1 = strlen((yyvsp[(1) - (3)].tv_str));
4539 int l3 = strlen((yyvsp[(3) - (3)].tv_str));
4540 (yyval.tv_str) = malloc(l1 + 1 + l3 + 1);
4541 memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1);
4542 (yyval.tv_str)[l1] = '.';
4543 memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3);
4544 (yyval.tv_str)[l1 + 1 + l3] = '\0';
Lev Walkin418298d2006-07-13 08:24:20 +00004545 }
4546 break;
4547
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004548 case 280:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004549#line 2107 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004550 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004551 (yyval.a_marker).flags = EM_NOMARK;
4552 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004553 }
4554 break;
4555
Lev Walkin0e90aa02013-03-19 16:17:13 -07004556 case 281:
4557#line 2111 "asn1p_y.y"
4558 { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); }
4559 break;
4560
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004561 case 282:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004562#line 2115 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004563 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004564 (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT;
4565 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004566 }
4567 break;
4568
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004569 case 283:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004570#line 2119 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004571 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004572 (yyval.a_marker).flags = EM_DEFAULT;
4573 (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004574 }
4575 break;
4576
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004577 case 284:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004578#line 2142 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004579 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004580 (yyval.a_expr) = NEW_EXPR();
4581 checkmem((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004582 }
4583 break;
4584
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004585 case 285:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004586#line 2146 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004587 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004588 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00004589 }
4590 break;
4591
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004592 case 286:
4593#line 2152 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004594 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004595 (yyval.a_expr) = NEW_EXPR();
4596 checkmem((yyval.a_expr));
4597 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004598 }
4599 break;
4600
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004601 case 287:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004602#line 2157 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004603 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004604 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4605 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004606 }
4607 break;
4608
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004609 case 288:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004610#line 2164 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004611 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004612 (yyval.a_expr) = NEW_EXPR();
4613 checkmem((yyval.a_expr));
4614 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4615 (yyval.a_expr)->meta_type = AMT_VALUE;
4616 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004617 }
4618 break;
4619
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004620 case 289:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004621#line 2171 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004622 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004623 (yyval.a_expr) = NEW_EXPR();
4624 checkmem((yyval.a_expr));
4625 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4626 (yyval.a_expr)->meta_type = AMT_VALUE;
4627 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4628 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004629 }
4630 break;
4631
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004632 case 290:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004633#line 2179 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004634 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004635 (yyval.a_expr) = NEW_EXPR();
4636 checkmem((yyval.a_expr));
4637 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4638 (yyval.a_expr)->meta_type = AMT_VALUE;
4639 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4640 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004641 }
4642 break;
4643
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004644 case 291:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004645#line 2187 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004646 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004647 (yyval.a_expr) = NEW_EXPR();
4648 checkmem((yyval.a_expr));
4649 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4650 (yyval.a_expr)->meta_type = AMT_VALUE;
4651 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004652 }
4653 break;
4654
Lev Walkin5c541f12006-10-18 18:40:14 +00004655 case 292:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004656#line 2194 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004657 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004658 (yyval.a_expr) = NEW_EXPR();
4659 checkmem((yyval.a_expr));
4660 (yyval.a_expr)->Identifier = strdup("...");
4661 checkmem((yyval.a_expr)->Identifier);
4662 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
4663 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004664 }
4665 break;
4666
4667 case 293:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004668#line 2205 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004669 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004670 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4671 checkmem((yyval.a_value));
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004672 }
4673 break;
4674
Lev Walkin0e90aa02013-03-19 16:17:13 -07004675 case 294:
4676#line 2209 "asn1p_y.y"
Lev Walkinadf863f2006-09-05 16:18:34 +00004677 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004678 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
4679 checkmem((yyval.a_value));
Lev Walkinadf863f2006-09-05 16:18:34 +00004680 }
Lev Walkin418298d2006-07-13 08:24:20 +00004681 break;
4682
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004683 case 296:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004684#line 2217 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004685 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004686 (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl));
4687 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00004688 }
4689 break;
4690
Lev Walkin0e90aa02013-03-19 16:17:13 -07004691 case 297:
4692#line 2248 "asn1p_y.y"
4693 { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); }
4694 break;
4695
4696 case 298:
4697#line 2249 "asn1p_y.y"
4698 { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); }
4699 break;
4700
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004701 case 299:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004702#line 2253 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004703 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004704 (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag);
4705 (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode;
Lev Walkin418298d2006-07-13 08:24:20 +00004706 }
4707 break;
4708
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004709 case 300:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004710#line 2260 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004711 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004712 (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag);
4713 (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int);
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004714 }
Lev Walkin5c541f12006-10-18 18:40:14 +00004715 break;
4716
Lev Walkin0e90aa02013-03-19 16:17:13 -07004717 case 301:
4718#line 2266 "asn1p_y.y"
4719 { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; }
4720 break;
4721
4722 case 302:
4723#line 2267 "asn1p_y.y"
4724 { (yyval.a_tag).tag_class = TC_UNIVERSAL; }
4725 break;
4726
4727 case 303:
4728#line 2268 "asn1p_y.y"
4729 { (yyval.a_tag).tag_class = TC_APPLICATION; }
4730 break;
4731
4732 case 304:
4733#line 2269 "asn1p_y.y"
4734 { (yyval.a_tag).tag_class = TC_PRIVATE; }
4735 break;
4736
4737 case 305:
4738#line 2273 "asn1p_y.y"
4739 { (yyval.a_tag).tag_mode = TM_DEFAULT; }
4740 break;
4741
4742 case 306:
4743#line 2274 "asn1p_y.y"
4744 { (yyval.a_tag).tag_mode = TM_IMPLICIT; }
4745 break;
4746
4747 case 307:
4748#line 2275 "asn1p_y.y"
4749 { (yyval.a_tag).tag_mode = TM_EXPLICIT; }
4750 break;
4751
Lev Walkin5c541f12006-10-18 18:40:14 +00004752 case 308:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004753#line 2279 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004754 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004755 checkmem((yyvsp[(1) - (1)].tv_str));
4756 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin5c541f12006-10-18 18:40:14 +00004757 }
4758 break;
4759
4760 case 309:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004761#line 2283 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004762 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004763 checkmem((yyvsp[(1) - (1)].tv_str));
4764 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004765 }
4766 break;
4767
4768 case 310:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004769#line 2291 "asn1p_y.y"
4770 {
4771 checkmem((yyvsp[(1) - (1)].tv_str));
4772 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4773 }
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004774 break;
4775
4776 case 311:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004777#line 2298 "asn1p_y.y"
4778 { (yyval.tv_str) = 0; }
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00004779 break;
4780
4781 case 312:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004782#line 2299 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00004783 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004784 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
4785 }
4786 break;
4787
4788 case 313:
4789#line 2305 "asn1p_y.y"
4790 {
4791 checkmem((yyvsp[(1) - (1)].tv_str));
4792 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin866bd7f2006-09-14 10:35:20 +00004793 }
4794 break;
4795
Lev Walkin418298d2006-07-13 08:24:20 +00004796
Lev Walkin0e90aa02013-03-19 16:17:13 -07004797/* Line 1267 of yacc.c. */
4798#line 4799 "y.tab.c"
4799 default: break;
Lev Walkin418298d2006-07-13 08:24:20 +00004800 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004801 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Lev Walkin418298d2006-07-13 08:24:20 +00004802
Lev Walkin0e90aa02013-03-19 16:17:13 -07004803 YYPOPSTACK (yylen);
4804 yylen = 0;
4805 YY_STACK_PRINT (yyss, yyssp);
Lev Walkinf15320b2004-06-03 03:38:44 +00004806
4807 *++yyvsp = yyval;
4808
Lev Walkinf15320b2004-06-03 03:38:44 +00004809
Lev Walkin418298d2006-07-13 08:24:20 +00004810 /* Now `shift' the result of the reduction. Determine what state
4811 that goes to, based on the state we popped back to and the rule
4812 number reduced by. */
Lev Walkinf15320b2004-06-03 03:38:44 +00004813
4814 yyn = yyr1[yyn];
4815
Lev Walkin418298d2006-07-13 08:24:20 +00004816 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4817 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00004818 yystate = yytable[yystate];
4819 else
Lev Walkin418298d2006-07-13 08:24:20 +00004820 yystate = yydefgoto[yyn - YYNTOKENS];
Lev Walkinf15320b2004-06-03 03:38:44 +00004821
4822 goto yynewstate;
4823
Lev Walkinf15320b2004-06-03 03:38:44 +00004824
Lev Walkin418298d2006-07-13 08:24:20 +00004825/*------------------------------------.
4826| yyerrlab -- here on detecting error |
4827`------------------------------------*/
4828yyerrlab:
4829 /* If not already recovering from an error, report this error. */
4830 if (!yyerrstatus)
Lev Walkinf15320b2004-06-03 03:38:44 +00004831 {
4832 ++yynerrs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004833#if ! YYERROR_VERBOSE
4834 yyerror (YY_("syntax error"));
4835#else
4836 {
4837 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4838 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4839 {
4840 YYSIZE_T yyalloc = 2 * yysize;
4841 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4842 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4843 if (yymsg != yymsgbuf)
Lev Walkin418298d2006-07-13 08:24:20 +00004844 YYSTACK_FREE (yymsg);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004845 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4846 if (yymsg)
4847 yymsg_alloc = yyalloc;
4848 else
4849 {
4850 yymsg = yymsgbuf;
4851 yymsg_alloc = sizeof yymsgbuf;
4852 }
4853 }
4854
4855 if (0 < yysize && yysize <= yymsg_alloc)
4856 {
4857 (void) yysyntax_error (yymsg, yystate, yychar);
4858 yyerror (yymsg);
4859 }
4860 else
4861 {
4862 yyerror (YY_("syntax error"));
4863 if (yysize != 0)
4864 goto yyexhaustedlab;
4865 }
4866 }
4867#endif
4868 }
4869
4870
4871
4872 if (yyerrstatus == 3)
4873 {
4874 /* If just tried and failed to reuse look-ahead token after an
4875 error, discard it. */
4876
4877 if (yychar <= YYEOF)
4878 {
4879 /* Return failure if at end of input. */
4880 if (yychar == YYEOF)
4881 YYABORT;
Lev Walkinf15320b2004-06-03 03:38:44 +00004882 }
4883 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07004884 {
4885 yydestruct ("Error: discarding",
4886 yytoken, &yylval);
4887 yychar = YYEMPTY;
4888 }
Lev Walkinf15320b2004-06-03 03:38:44 +00004889 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07004890
4891 /* Else will try to reuse look-ahead token after shifting the error
4892 token. */
Lev Walkina00d6b32006-03-21 03:40:38 +00004893 goto yyerrlab1;
Lev Walkinf15320b2004-06-03 03:38:44 +00004894
Lev Walkin418298d2006-07-13 08:24:20 +00004895
Lev Walkin0e90aa02013-03-19 16:17:13 -07004896/*---------------------------------------------------.
4897| yyerrorlab -- error raised explicitly by YYERROR. |
4898`---------------------------------------------------*/
4899yyerrorlab:
4900
4901 /* Pacify compilers like GCC when the user code never invokes
4902 YYERROR and the label yyerrorlab therefore never appears in user
4903 code. */
4904 if (/*CONSTCOND*/ 0)
4905 goto yyerrorlab;
4906
4907 /* Do not reclaim the symbols of the rule which action triggered
4908 this YYERROR. */
4909 YYPOPSTACK (yylen);
4910 yylen = 0;
4911 YY_STACK_PRINT (yyss, yyssp);
4912 yystate = *yyssp;
4913 goto yyerrlab1;
4914
4915
4916/*-------------------------------------------------------------.
4917| yyerrlab1 -- common code for both syntax error and YYERROR. |
4918`-------------------------------------------------------------*/
Lev Walkin418298d2006-07-13 08:24:20 +00004919yyerrlab1:
Lev Walkin418298d2006-07-13 08:24:20 +00004920 yyerrstatus = 3; /* Each real token shifted decrements this. */
Lev Walkina00d6b32006-03-21 03:40:38 +00004921
Lev Walkin418298d2006-07-13 08:24:20 +00004922 for (;;)
Lev Walkina00d6b32006-03-21 03:40:38 +00004923 {
Lev Walkin418298d2006-07-13 08:24:20 +00004924 yyn = yypact[yystate];
4925 if (yyn != YYPACT_NINF)
4926 {
4927 yyn += YYTERROR;
4928 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4929 {
4930 yyn = yytable[yyn];
4931 if (0 < yyn)
4932 break;
4933 }
4934 }
4935
4936 /* Pop the current state because it cannot handle the error token. */
4937 if (yyssp == yyss)
4938 YYABORT;
4939
Lev Walkin418298d2006-07-13 08:24:20 +00004940
Lev Walkin0e90aa02013-03-19 16:17:13 -07004941 yydestruct ("Error: popping",
4942 yystos[yystate], yyvsp);
4943 YYPOPSTACK (1);
4944 yystate = *yyssp;
4945 YY_STACK_PRINT (yyss, yyssp);
Lev Walkina00d6b32006-03-21 03:40:38 +00004946 }
Lev Walkina00d6b32006-03-21 03:40:38 +00004947
Lev Walkinf15320b2004-06-03 03:38:44 +00004948 if (yyn == YYFINAL)
4949 YYACCEPT;
4950
Lev Walkinf15320b2004-06-03 03:38:44 +00004951 *++yyvsp = yylval;
Lev Walkin418298d2006-07-13 08:24:20 +00004952
Lev Walkinf15320b2004-06-03 03:38:44 +00004953
Lev Walkin0e90aa02013-03-19 16:17:13 -07004954 /* Shift the error token. */
4955 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4956
Lev Walkinf15320b2004-06-03 03:38:44 +00004957 yystate = yyn;
4958 goto yynewstate;
4959
Lev Walkina00d6b32006-03-21 03:40:38 +00004960
Lev Walkin418298d2006-07-13 08:24:20 +00004961/*-------------------------------------.
4962| yyacceptlab -- YYACCEPT comes here. |
4963`-------------------------------------*/
4964yyacceptlab:
4965 yyresult = 0;
4966 goto yyreturn;
4967
4968/*-----------------------------------.
4969| yyabortlab -- YYABORT comes here. |
4970`-----------------------------------*/
4971yyabortlab:
4972 yyresult = 1;
4973 goto yyreturn;
4974
4975#ifndef yyoverflow
Lev Walkin0e90aa02013-03-19 16:17:13 -07004976/*-------------------------------------------------.
4977| yyexhaustedlab -- memory exhaustion comes here. |
4978`-------------------------------------------------*/
4979yyexhaustedlab:
4980 yyerror (YY_("memory exhausted"));
Lev Walkin418298d2006-07-13 08:24:20 +00004981 yyresult = 2;
4982 /* Fall through. */
Lev Walkina00d6b32006-03-21 03:40:38 +00004983#endif
Lev Walkin418298d2006-07-13 08:24:20 +00004984
4985yyreturn:
Lev Walkin0e90aa02013-03-19 16:17:13 -07004986 if (yychar != YYEOF && yychar != YYEMPTY)
4987 yydestruct ("Cleanup: discarding lookahead",
4988 yytoken, &yylval);
4989 /* Do not reclaim the symbols of the rule which action triggered
4990 this YYABORT or YYACCEPT. */
4991 YYPOPSTACK (yylen);
4992 YY_STACK_PRINT (yyss, yyssp);
4993 while (yyssp != yyss)
4994 {
4995 yydestruct ("Cleanup: popping",
4996 yystos[*yyssp], yyvsp);
4997 YYPOPSTACK (1);
4998 }
Lev Walkin418298d2006-07-13 08:24:20 +00004999#ifndef yyoverflow
5000 if (yyss != yyssa)
5001 YYSTACK_FREE (yyss);
5002#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07005003#if YYERROR_VERBOSE
5004 if (yymsg != yymsgbuf)
5005 YYSTACK_FREE (yymsg);
5006#endif
5007 /* Make sure YYID is used. */
5008 return YYID (yyresult);
Lev Walkinf15320b2004-06-03 03:38:44 +00005009}
Lev Walkin418298d2006-07-13 08:24:20 +00005010
5011
Lev Walkin0e90aa02013-03-19 16:17:13 -07005012#line 2311 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +00005013
5014
5015
5016/*
5017 * Convert Xstring ('0101'B or '5'H) to the binary vector.
5018 */
5019static asn1p_value_t *
5020_convert_bitstring2binary(char *str, int base) {
5021 asn1p_value_t *val;
5022 int slen;
5023 int memlen;
5024 int baselen;
5025 int bits;
5026 uint8_t *binary_vector;
5027 uint8_t *bv_ptr;
5028 uint8_t cur_val;
5029
5030 assert(str);
5031 assert(str[0] == '\'');
5032
5033 switch(base) {
5034 case 'B':
5035 baselen = 1;
5036 break;
5037 case 'H':
5038 baselen = 4;
5039 break;
5040 default:
5041 assert(base == 'B' || base == 'H');
5042 errno = EINVAL;
5043 return NULL;
5044 }
5045
5046 slen = strlen(str);
5047 assert(str[slen - 1] == base);
5048 assert(str[slen - 2] == '\'');
5049
5050 memlen = slen / (8 / baselen); /* Conservative estimate */
5051
5052 bv_ptr = binary_vector = malloc(memlen + 1);
5053 if(bv_ptr == NULL)
5054 /* ENOMEM */
5055 return NULL;
5056
5057 cur_val = 0;
5058 bits = 0;
5059 while(*(++str) != '\'') {
5060 switch(baselen) {
5061 case 1:
5062 switch(*str) {
5063 case '1':
5064 cur_val |= 1 << (7 - (bits % 8));
5065 case '0':
5066 break;
5067 default:
5068 assert(!"_y UNREACH1");
5069 case ' ': case '\r': case '\n':
5070 continue;
5071 }
5072 break;
5073 case 4:
5074 switch(*str) {
5075 case '0': case '1': case '2': case '3': case '4':
5076 case '5': case '6': case '7': case '8': case '9':
5077 cur_val |= (*str - '0') << (4 - (bits % 8));
5078 break;
5079 case 'A': case 'B': case 'C':
5080 case 'D': case 'E': case 'F':
5081 cur_val |= ((*str - 'A') + 10)
5082 << (4 - (bits % 8));
5083 break;
5084 default:
5085 assert(!"_y UNREACH2");
5086 case ' ': case '\r': case '\n':
5087 continue;
5088 }
5089 break;
5090 }
5091
5092 bits += baselen;
5093 if((bits % 8) == 0) {
5094 *bv_ptr++ = cur_val;
5095 cur_val = 0;
5096 }
5097 }
5098
5099 *bv_ptr = cur_val;
5100 assert((bv_ptr - binary_vector) <= memlen);
5101
5102 val = asn1p_value_frombits(binary_vector, bits, 0);
5103 if(val == NULL) {
5104 free(binary_vector);
5105 }
5106
5107 return val;
5108}
5109
Lev Walkin2e9bd5c2005-08-13 09:07:11 +00005110/*
5111 * For unnamed types (used in old X.208 compliant modules)
5112 * generate some sort of interim names, to not to force human being to fix
5113 * the specification's compliance to modern ASN.1 standards.
5114 */
5115static void
5116_fixup_anonymous_identifier(asn1p_expr_t *expr) {
5117 char *p;
5118 assert(expr->Identifier == 0);
5119
5120 /*
5121 * Try to figure out the type name
5122 * without going too much into details
5123 */
5124 expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
5125 if(expr->reference && expr->reference->comp_count > 0)
5126 expr->Identifier = expr->reference->components[0].name;
5127
5128 fprintf(stderr,
5129 "WARNING: Line %d: expected lower-case member identifier, "
5130 "found an unnamed %s.\n"
5131 "WARNING: Obsolete X.208 syntax detected, "
5132 "please give the member a name.\n",
5133 yylineno, expr->Identifier ? expr->Identifier : "type");
5134
5135 if(!expr->Identifier)
5136 expr->Identifier = "unnamed";
5137 expr->Identifier = strdup(expr->Identifier);
5138 assert(expr->Identifier);
5139 /* Make a lowercase identifier from the type name */
5140 for(p = expr->Identifier; *p; p++) {
5141 switch(*p) {
5142 case 'A' ... 'Z': *p += 32; break;
5143 case ' ': *p = '_'; break;
5144 case '-': *p = '_'; break;
5145 }
5146 }
5147 fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
5148 "Name clash may occur later.\n",
5149 expr->Identifier);
5150}
5151
Lev Walkinf15320b2004-06-03 03:38:44 +00005152int
5153yyerror(const char *msg) {
Lev Walkin9d542d22006-03-14 16:31:37 +00005154 extern char *asn1p_text;
Lev Walkinf15320b2004-06-03 03:38:44 +00005155 fprintf(stderr,
5156 "ASN.1 grammar parse error "
5157 "near line %d (token \"%s\"): %s\n",
Lev Walkinceb20e72004-09-05 10:40:41 +00005158 yylineno, asn1p_text, msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00005159 return -1;
5160}
5161
Lev Walkin418298d2006-07-13 08:24:20 +00005162