blob: e3c85053d657b4ac3ebdbddc103d6f99fe9fb9d3 [file] [log] [blame]
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001/* A Bison parser, made by GNU Bison 2.7.12-4996. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
Lev Walkin418298d2006-07-13 08:24:20 +00008 it under the terms of the GNU General Public License as published by
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08009 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
Lev Walkin418298d2006-07-13 08:24:20 +000012 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080016
Lev Walkin418298d2006-07-13 08:24:20 +000017 You should have received a copy of the GNU General Public License
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080018 along with this program. If not, see <http://www.gnu.org/licenses/>. */
Lev Walkin418298d2006-07-13 08:24:20 +000019
Lev Walkin0e90aa02013-03-19 16:17:13 -070020/* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080029
Lev Walkin0e90aa02013-03-19 16:17:13 -070030 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33/* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
Lev Walkin418298d2006-07-13 08:24:20 +000035
36/* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
42
43/* Identify Bison output. */
Lev Walkin0e90aa02013-03-19 16:17:13 -070044#define YYBISON 1
45
46/* Bison version. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080047#define YYBISON_VERSION "2.7.12-4996"
Lev Walkin0e90aa02013-03-19 16:17:13 -070048
49/* Skeleton name. */
50#define YYSKELETON_NAME "yacc.c"
Lev Walkin418298d2006-07-13 08:24:20 +000051
52/* Pure parsers. */
Lev Walkin0e90aa02013-03-19 16:17:13 -070053#define YYPURE 0
Lev Walkin418298d2006-07-13 08:24:20 +000054
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080055/* Push parsers. */
56#define YYPUSH 0
57
58/* Pull parsers. */
59#define YYPULL 1
60
Lev Walkin418298d2006-07-13 08:24:20 +000061
Lev Walkin0e90aa02013-03-19 16:17:13 -070062/* Substitute the variable and function names. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080063#define yyparse asn1p_parse
64#define yylex asn1p_lex
65#define yyerror asn1p_error
66#define yydebug asn1p_debug
67#define yynerrs asn1p_nerrs
Lev Walkinf15320b2004-06-03 03:38:44 +000068
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080069#define yylval asn1p_lval
70#define yychar asn1p_char
71
72/* Copy the first part of user declarations. */
73/* Line 371 of yacc.c */
74#line 1 "asn1p_y.y"
75
76
77#include <stdlib.h>
78#include <stdio.h>
79#include <string.h>
80#include <errno.h>
81#include <assert.h>
82
83#include "asn1parser.h"
84
85#define YYPARSE_PARAM param
86#define YYPARSE_PARAM_TYPE void **
87#define YYERROR_VERBOSE
88
89int yylex(void);
90int yyerror(const char *msg);
91#ifdef YYBYACC
92int yyparse(void **param); /* byacc does not produce a prototype */
93#endif
94void asn1p_lexer_hack_push_opaque_state(void);
95void asn1p_lexer_hack_enable_with_syntax(void);
96void asn1p_lexer_hack_push_encoding_control(void);
97#define yylineno asn1p_lineno
98extern int asn1p_lineno;
99
100/*
101 * Process directives as <ASN1C:RepresentAsPointer>
102 */
103extern int asn1p_as_pointer;
104
105/*
106 * This temporary variable is used to solve the shortcomings of 1-lookahead
107 * parser.
108 */
109static struct AssignedIdentifier *saved_aid;
110
111static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
112static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
113
114static asn1p_module_t *currentModule;
115#define NEW_EXPR() (asn1p_expr_new(yylineno, currentModule))
116
117#define checkmem(ptr) do { \
118 if(!(ptr)) \
119 return yyerror("Memory failure"); \
120 } while(0)
121
122#define CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do { \
123 if(arg1->type != constr_type) { \
124 int __ret; \
125 root = asn1p_constraint_new(yylineno, currentModule); \
126 checkmem(root); \
127 root->type = constr_type; \
128 __ret = asn1p_constraint_insert(root, \
129 arg1); \
130 checkmem(__ret == 0); \
131 } else { \
132 root = arg1; \
133 } \
134 if(arg2) { \
135 int __ret \
136 = asn1p_constraint_insert(root, arg2); \
137 checkmem(__ret == 0); \
138 } \
139 } while(0)
140
141#ifdef AL_IMPORT
142#error AL_IMPORT DEFINED ELSEWHERE!
143#endif
144#define AL_IMPORT(to,where,from,field) do { \
145 if(!(from)) break; \
146 while(TQ_FIRST(&((from)->where))) { \
147 TQ_ADD(&((to)->where), \
148 TQ_REMOVE(&((from)->where), field), \
149 field); \
150 } \
151 assert(TQ_FIRST(&((from)->where)) == 0); \
152 } while(0)
153
154
155/* Line 371 of yacc.c */
156#line 149 "asn1p_y.y"
157
158# ifndef YY_NULL
159# if defined __cplusplus && 201103L <= __cplusplus
160# define YY_NULL nullptr
161# else
162# define YY_NULL 0
163# endif
164# endif
165
166/* Enabling verbose error messages. */
167#ifdef YYERROR_VERBOSE
168# undef YYERROR_VERBOSE
169# define YYERROR_VERBOSE 1
170#else
171# define YYERROR_VERBOSE 0
172#endif
173
174
175/* Enabling traces. */
176#ifndef YYDEBUG
177# define YYDEBUG 0
178#endif
179#if YYDEBUG
180extern int yydebug;
181#endif
Lev Walkin418298d2006-07-13 08:24:20 +0000182
183/* Tokens. */
184#ifndef YYTOKENTYPE
185# define YYTOKENTYPE
186 /* Put the tokens into the symbol table, so that GDB and other debuggers
187 know about them. */
188 enum yytokentype {
189 TOK_PPEQ = 258,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700190 TOK_VBracketLeft = 259,
191 TOK_VBracketRight = 260,
192 TOK_whitespace = 261,
193 TOK_opaque = 262,
194 TOK_bstring = 263,
195 TOK_cstring = 264,
196 TOK_hstring = 265,
197 TOK_identifier = 266,
198 TOK_number = 267,
199 TOK_number_negative = 268,
200 TOK_realnumber = 269,
201 TOK_tuple = 270,
202 TOK_quadruple = 271,
203 TOK_typereference = 272,
204 TOK_capitalreference = 273,
205 TOK_typefieldreference = 274,
206 TOK_valuefieldreference = 275,
207 TOK_Literal = 276,
208 TOK_ABSENT = 277,
209 TOK_ABSTRACT_SYNTAX = 278,
210 TOK_ALL = 279,
211 TOK_ANY = 280,
212 TOK_APPLICATION = 281,
213 TOK_AUTOMATIC = 282,
214 TOK_BEGIN = 283,
215 TOK_BIT = 284,
216 TOK_BMPString = 285,
217 TOK_BOOLEAN = 286,
218 TOK_BY = 287,
219 TOK_CHARACTER = 288,
220 TOK_CHOICE = 289,
221 TOK_CLASS = 290,
222 TOK_COMPONENT = 291,
223 TOK_COMPONENTS = 292,
224 TOK_CONSTRAINED = 293,
225 TOK_CONTAINING = 294,
226 TOK_DEFAULT = 295,
227 TOK_DEFINITIONS = 296,
228 TOK_DEFINED = 297,
229 TOK_EMBEDDED = 298,
230 TOK_ENCODED = 299,
231 TOK_ENCODING_CONTROL = 300,
232 TOK_END = 301,
233 TOK_ENUMERATED = 302,
234 TOK_EXPLICIT = 303,
235 TOK_EXPORTS = 304,
236 TOK_EXTENSIBILITY = 305,
237 TOK_EXTERNAL = 306,
238 TOK_FALSE = 307,
239 TOK_FROM = 308,
240 TOK_GeneralizedTime = 309,
241 TOK_GeneralString = 310,
242 TOK_GraphicString = 311,
243 TOK_IA5String = 312,
244 TOK_IDENTIFIER = 313,
245 TOK_IMPLICIT = 314,
246 TOK_IMPLIED = 315,
247 TOK_IMPORTS = 316,
248 TOK_INCLUDES = 317,
249 TOK_INSTANCE = 318,
250 TOK_INSTRUCTIONS = 319,
251 TOK_INTEGER = 320,
252 TOK_ISO646String = 321,
253 TOK_MAX = 322,
254 TOK_MIN = 323,
255 TOK_MINUS_INFINITY = 324,
256 TOK_NULL = 325,
257 TOK_NumericString = 326,
258 TOK_OBJECT = 327,
259 TOK_ObjectDescriptor = 328,
260 TOK_OCTET = 329,
261 TOK_OF = 330,
262 TOK_OPTIONAL = 331,
263 TOK_PATTERN = 332,
264 TOK_PDV = 333,
265 TOK_PLUS_INFINITY = 334,
266 TOK_PRESENT = 335,
267 TOK_PrintableString = 336,
268 TOK_PRIVATE = 337,
269 TOK_REAL = 338,
270 TOK_RELATIVE_OID = 339,
271 TOK_SEQUENCE = 340,
272 TOK_SET = 341,
273 TOK_SIZE = 342,
274 TOK_STRING = 343,
275 TOK_SYNTAX = 344,
276 TOK_T61String = 345,
277 TOK_TAGS = 346,
278 TOK_TeletexString = 347,
279 TOK_TRUE = 348,
280 TOK_TYPE_IDENTIFIER = 349,
281 TOK_UNIQUE = 350,
282 TOK_UNIVERSAL = 351,
283 TOK_UniversalString = 352,
284 TOK_UTCTime = 353,
285 TOK_UTF8String = 354,
286 TOK_VideotexString = 355,
287 TOK_VisibleString = 356,
288 TOK_WITH = 357,
289 TOK_EXCEPT = 358,
290 TOK_INTERSECTION = 359,
291 TOK_UNION = 360,
292 TOK_TwoDots = 361,
293 TOK_ThreeDots = 362
Lev Walkin418298d2006-07-13 08:24:20 +0000294 };
295#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700296/* Tokens. */
Lev Walkin418298d2006-07-13 08:24:20 +0000297#define TOK_PPEQ 258
Lev Walkin0e90aa02013-03-19 16:17:13 -0700298#define TOK_VBracketLeft 259
299#define TOK_VBracketRight 260
300#define TOK_whitespace 261
301#define TOK_opaque 262
302#define TOK_bstring 263
303#define TOK_cstring 264
304#define TOK_hstring 265
305#define TOK_identifier 266
306#define TOK_number 267
307#define TOK_number_negative 268
308#define TOK_realnumber 269
309#define TOK_tuple 270
310#define TOK_quadruple 271
311#define TOK_typereference 272
312#define TOK_capitalreference 273
313#define TOK_typefieldreference 274
314#define TOK_valuefieldreference 275
315#define TOK_Literal 276
316#define TOK_ABSENT 277
317#define TOK_ABSTRACT_SYNTAX 278
318#define TOK_ALL 279
319#define TOK_ANY 280
320#define TOK_APPLICATION 281
321#define TOK_AUTOMATIC 282
322#define TOK_BEGIN 283
323#define TOK_BIT 284
324#define TOK_BMPString 285
325#define TOK_BOOLEAN 286
326#define TOK_BY 287
327#define TOK_CHARACTER 288
328#define TOK_CHOICE 289
329#define TOK_CLASS 290
330#define TOK_COMPONENT 291
331#define TOK_COMPONENTS 292
332#define TOK_CONSTRAINED 293
333#define TOK_CONTAINING 294
334#define TOK_DEFAULT 295
335#define TOK_DEFINITIONS 296
336#define TOK_DEFINED 297
337#define TOK_EMBEDDED 298
338#define TOK_ENCODED 299
339#define TOK_ENCODING_CONTROL 300
340#define TOK_END 301
341#define TOK_ENUMERATED 302
342#define TOK_EXPLICIT 303
343#define TOK_EXPORTS 304
344#define TOK_EXTENSIBILITY 305
345#define TOK_EXTERNAL 306
346#define TOK_FALSE 307
347#define TOK_FROM 308
348#define TOK_GeneralizedTime 309
349#define TOK_GeneralString 310
350#define TOK_GraphicString 311
351#define TOK_IA5String 312
352#define TOK_IDENTIFIER 313
353#define TOK_IMPLICIT 314
354#define TOK_IMPLIED 315
355#define TOK_IMPORTS 316
356#define TOK_INCLUDES 317
357#define TOK_INSTANCE 318
358#define TOK_INSTRUCTIONS 319
359#define TOK_INTEGER 320
360#define TOK_ISO646String 321
361#define TOK_MAX 322
362#define TOK_MIN 323
363#define TOK_MINUS_INFINITY 324
364#define TOK_NULL 325
365#define TOK_NumericString 326
366#define TOK_OBJECT 327
367#define TOK_ObjectDescriptor 328
368#define TOK_OCTET 329
369#define TOK_OF 330
370#define TOK_OPTIONAL 331
371#define TOK_PATTERN 332
372#define TOK_PDV 333
373#define TOK_PLUS_INFINITY 334
374#define TOK_PRESENT 335
375#define TOK_PrintableString 336
376#define TOK_PRIVATE 337
377#define TOK_REAL 338
378#define TOK_RELATIVE_OID 339
379#define TOK_SEQUENCE 340
380#define TOK_SET 341
381#define TOK_SIZE 342
382#define TOK_STRING 343
383#define TOK_SYNTAX 344
384#define TOK_T61String 345
385#define TOK_TAGS 346
386#define TOK_TeletexString 347
387#define TOK_TRUE 348
388#define TOK_TYPE_IDENTIFIER 349
389#define TOK_UNIQUE 350
390#define TOK_UNIVERSAL 351
391#define TOK_UniversalString 352
392#define TOK_UTCTime 353
393#define TOK_UTF8String 354
394#define TOK_VideotexString 355
395#define TOK_VisibleString 356
396#define TOK_WITH 357
397#define TOK_EXCEPT 358
398#define TOK_INTERSECTION 359
399#define TOK_UNION 360
400#define TOK_TwoDots 361
401#define TOK_ThreeDots 362
Lev Walkin418298d2006-07-13 08:24:20 +0000402
403
404
Lev Walkin0e90aa02013-03-19 16:17:13 -0700405#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
406typedef union YYSTYPE
Lev Walkin0e90aa02013-03-19 16:17:13 -0700407{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800408/* Line 387 of yacc.c */
409#line 88 "asn1p_y.y"
410
Lev Walkinf15320b2004-06-03 03:38:44 +0000411 asn1p_t *a_grammar;
412 asn1p_module_flags_e a_module_flags;
413 asn1p_module_t *a_module;
414 asn1p_expr_type_e a_type; /* ASN.1 Type */
415 asn1p_expr_t *a_expr; /* Constructed collection */
416 asn1p_constraint_t *a_constr; /* Constraint */
417 enum asn1p_constraint_type_e a_ctype;/* Constraint type */
418 asn1p_xports_t *a_xports; /* IMports/EXports */
Lev Walkinb36317c2005-08-12 10:09:10 +0000419 struct AssignedIdentifier a_aid; /* Assigned Identifier */
Lev Walkinf15320b2004-06-03 03:38:44 +0000420 asn1p_oid_t *a_oid; /* Object Identifier */
421 asn1p_oid_arc_t a_oid_arc; /* Single OID's arc */
422 struct asn1p_type_tag_s a_tag; /* A tag */
423 asn1p_ref_t *a_ref; /* Reference to custom type */
424 asn1p_wsyntx_t *a_wsynt; /* WITH SYNTAX contents */
425 asn1p_wsyntx_chunk_t *a_wchunk; /* WITH SYNTAX chunk */
426 struct asn1p_ref_component_s a_refcomp; /* Component of a reference */
427 asn1p_value_t *a_value; /* Number, DefinedValue, etc */
428 struct asn1p_param_s a_parg; /* A parameter argument */
429 asn1p_paramlist_t *a_plist; /* A pargs list */
Lev Walkin9c974182004-09-15 11:59:51 +0000430 struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
Lev Walkinf15320b2004-06-03 03:38:44 +0000431 enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
Lev Walkind21c5052004-09-29 13:18:09 +0000432 asn1c_integer_t a_int;
Lev Walkinadf863f2006-09-05 16:18:34 +0000433 double a_dbl;
Lev Walkinf15320b2004-06-03 03:38:44 +0000434 char *tv_str;
435 struct {
436 char *buf;
437 int len;
438 } tv_opaque;
439 struct {
440 char *name;
441 struct asn1p_type_tag_s tag;
442 } tv_nametag;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800443
444
445/* Line 387 of yacc.c */
446#line 439 "asn1p_y.y"
447} YYSTYPE;
448# define YYSTYPE_IS_TRIVIAL 1
Lev Walkin0e90aa02013-03-19 16:17:13 -0700449# define yystype YYSTYPE /* obsolescent; will be withdrawn */
450# define YYSTYPE_IS_DECLARED 1
Lev Walkinf15320b2004-06-03 03:38:44 +0000451#endif
452
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800453extern YYSTYPE yylval;
454
455#ifdef YYPARSE_PARAM
456#if defined __STDC__ || defined __cplusplus
457int yyparse (void *YYPARSE_PARAM);
458#else
459int yyparse ();
460#endif
461#else /* ! YYPARSE_PARAM */
462#if defined __STDC__ || defined __cplusplus
463int yyparse (void);
464#else
465int yyparse ();
466#endif
467#endif /* ! YYPARSE_PARAM */
468
Lev Walkin0e90aa02013-03-19 16:17:13 -0700469
Lev Walkin418298d2006-07-13 08:24:20 +0000470
471/* Copy the second part of user declarations. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000472
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800473/* Line 390 of yacc.c */
474#line 467 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +0000475
Lev Walkin0e90aa02013-03-19 16:17:13 -0700476#ifdef short
477# undef short
478#endif
479
480#ifdef YYTYPE_UINT8
481typedef YYTYPE_UINT8 yytype_uint8;
482#else
483typedef unsigned char yytype_uint8;
484#endif
485
486#ifdef YYTYPE_INT8
487typedef YYTYPE_INT8 yytype_int8;
488#elif (defined __STDC__ || defined __C99__FUNC__ \
489 || defined __cplusplus || defined _MSC_VER)
490typedef signed char yytype_int8;
491#else
492typedef short int yytype_int8;
493#endif
494
495#ifdef YYTYPE_UINT16
496typedef YYTYPE_UINT16 yytype_uint16;
497#else
498typedef unsigned short int yytype_uint16;
499#endif
500
501#ifdef YYTYPE_INT16
502typedef YYTYPE_INT16 yytype_int16;
503#else
504typedef short int yytype_int16;
505#endif
506
507#ifndef YYSIZE_T
508# ifdef __SIZE_TYPE__
509# define YYSIZE_T __SIZE_TYPE__
510# elif defined size_t
511# define YYSIZE_T size_t
512# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
513 || defined __cplusplus || defined _MSC_VER)
514# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
515# define YYSIZE_T size_t
516# else
517# define YYSIZE_T unsigned int
518# endif
519#endif
520
521#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
522
523#ifndef YY_
524# if defined YYENABLE_NLS && YYENABLE_NLS
525# if ENABLE_NLS
526# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800527# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700528# endif
529# endif
530# ifndef YY_
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800531# define YY_(Msgid) Msgid
532# endif
533#endif
534
535#ifndef __attribute__
536/* This feature is available in gcc versions 2.5 and later. */
537# if (! defined __GNUC__ || __GNUC__ < 2 \
538 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
539# define __attribute__(Spec) /* empty */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700540# endif
541#endif
542
543/* Suppress unused-variable warnings by "using" E. */
544#if ! defined lint || defined __GNUC__
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800545# define YYUSE(E) ((void) (E))
Lev Walkin0e90aa02013-03-19 16:17:13 -0700546#else
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800547# define YYUSE(E) /* empty */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700548#endif
549
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800550
Lev Walkin0e90aa02013-03-19 16:17:13 -0700551/* Identity function, used to suppress warnings about constant conditions. */
552#ifndef lint
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800553# define YYID(N) (N)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700554#else
555#if (defined __STDC__ || defined __C99__FUNC__ \
556 || defined __cplusplus || defined _MSC_VER)
557static int
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800558YYID (int yyi)
Lev Walkin0e90aa02013-03-19 16:17:13 -0700559#else
560static int
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800561YYID (yyi)
562 int yyi;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700563#endif
564{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800565 return yyi;
Lev Walkin0e90aa02013-03-19 16:17:13 -0700566}
567#endif
568
569#if ! defined yyoverflow || YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +0000570
Lev Walkin418298d2006-07-13 08:24:20 +0000571/* The parser invokes alloca or malloc; define the necessary symbols. */
Lev Walkinf15320b2004-06-03 03:38:44 +0000572
Lev Walkin0e90aa02013-03-19 16:17:13 -0700573# ifdef YYSTACK_USE_ALLOCA
574# if YYSTACK_USE_ALLOCA
575# ifdef __GNUC__
576# define YYSTACK_ALLOC __builtin_alloca
577# elif defined __BUILTIN_VA_ARG_INCR
578# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
579# elif defined _AIX
580# define YYSTACK_ALLOC __alloca
581# elif defined _MSC_VER
582# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
583# define alloca _alloca
Lev Walkin418298d2006-07-13 08:24:20 +0000584# else
Lev Walkin0e90aa02013-03-19 16:17:13 -0700585# define YYSTACK_ALLOC alloca
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800586# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700587 || defined __cplusplus || defined _MSC_VER)
588# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800589 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
590# ifndef EXIT_SUCCESS
591# define EXIT_SUCCESS 0
Lev Walkin0e90aa02013-03-19 16:17:13 -0700592# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000593# endif
594# endif
595# endif
596# endif
Lev Walkinf15320b2004-06-03 03:38:44 +0000597
Lev Walkin418298d2006-07-13 08:24:20 +0000598# ifdef YYSTACK_ALLOC
Lev Walkin0e90aa02013-03-19 16:17:13 -0700599 /* Pacify GCC's `empty if-body' warning. */
600# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
601# ifndef YYSTACK_ALLOC_MAXIMUM
602 /* The OS might guarantee only one guard page at the bottom of the stack,
603 and a page size can be as small as 4096 bytes. So we cannot safely
604 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
605 to allow for a few compiler-allocated temporary stack slots. */
606# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
Lev Walkin418298d2006-07-13 08:24:20 +0000607# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700608# else
609# define YYSTACK_ALLOC YYMALLOC
610# define YYSTACK_FREE YYFREE
611# ifndef YYSTACK_ALLOC_MAXIMUM
612# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
613# endif
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800614# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700615 && ! ((defined YYMALLOC || defined malloc) \
616 && (defined YYFREE || defined free)))
617# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800618# ifndef EXIT_SUCCESS
619# define EXIT_SUCCESS 0
Lev Walkin0e90aa02013-03-19 16:17:13 -0700620# endif
621# endif
622# ifndef YYMALLOC
623# define YYMALLOC malloc
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800624# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700625 || defined __cplusplus || defined _MSC_VER)
626void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
627# endif
628# endif
629# ifndef YYFREE
630# define YYFREE free
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800631# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700632 || defined __cplusplus || defined _MSC_VER)
633void free (void *); /* INFRINGES ON USER NAME SPACE */
634# endif
635# endif
Lev Walkin418298d2006-07-13 08:24:20 +0000636# endif
Lev Walkin0e90aa02013-03-19 16:17:13 -0700637#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
Lev Walkin418298d2006-07-13 08:24:20 +0000638
639
Lev Walkin0e90aa02013-03-19 16:17:13 -0700640#if (! defined yyoverflow \
641 && (! defined __cplusplus \
642 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Lev Walkin418298d2006-07-13 08:24:20 +0000643
644/* A type that is properly aligned for any stack member. */
645union yyalloc
646{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800647 yytype_int16 yyss_alloc;
648 YYSTYPE yyvs_alloc;
649};
Lev Walkin418298d2006-07-13 08:24:20 +0000650
651/* The size of the maximum gap between one aligned stack and the next. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700652# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
Lev Walkin418298d2006-07-13 08:24:20 +0000653
654/* The size of an array large to enough to hold all stacks, each with
655 N elements. */
656# define YYSTACK_BYTES(N) \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700657 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
658 + YYSTACK_GAP_MAXIMUM)
Lev Walkin418298d2006-07-13 08:24:20 +0000659
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800660# define YYCOPY_NEEDED 1
Lev Walkin418298d2006-07-13 08:24:20 +0000661
662/* Relocate STACK from its old location to the new one. The
663 local variables YYSIZE and YYSTACKSIZE give the old and new number of
664 elements in the stack, and YYPTR gives the new location of the
665 stack. Advance YYPTR to a properly aligned location for the next
666 stack. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800667# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
Lev Walkin418298d2006-07-13 08:24:20 +0000668 do \
669 { \
670 YYSIZE_T yynewbytes; \
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800671 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
672 Stack = &yyptr->Stack_alloc; \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700673 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
Lev Walkin418298d2006-07-13 08:24:20 +0000674 yyptr += yynewbytes / sizeof (*yyptr); \
675 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -0700676 while (YYID (0))
Lev Walkinf15320b2004-06-03 03:38:44 +0000677
678#endif
679
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800680#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
681/* Copy COUNT objects from SRC to DST. The source and destination do
682 not overlap. */
683# ifndef YYCOPY
684# if defined __GNUC__ && 1 < __GNUC__
685# define YYCOPY(Dst, Src, Count) \
686 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
687# else
688# define YYCOPY(Dst, Src, Count) \
689 do \
690 { \
691 YYSIZE_T yyi; \
692 for (yyi = 0; yyi < (Count); yyi++) \
693 (Dst)[yyi] = (Src)[yyi]; \
694 } \
695 while (YYID (0))
696# endif
697# endif
698#endif /* !YYCOPY_NEEDED */
699
Lev Walkin0e90aa02013-03-19 16:17:13 -0700700/* YYFINAL -- State number of the termination state. */
Lev Walkin418298d2006-07-13 08:24:20 +0000701#define YYFINAL 7
Lev Walkin0e90aa02013-03-19 16:17:13 -0700702/* YYLAST -- Last index in YYTABLE. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800703#define YYLAST 873
Lev Walkin418298d2006-07-13 08:24:20 +0000704
Lev Walkin0e90aa02013-03-19 16:17:13 -0700705/* YYNTOKENS -- Number of terminals. */
706#define YYNTOKENS 123
707/* YYNNTS -- Number of nonterminals. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800708#define YYNNTS 124
Lev Walkin0e90aa02013-03-19 16:17:13 -0700709/* YYNRULES -- Number of rules. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800710#define YYNRULES 316
Lev Walkin0e90aa02013-03-19 16:17:13 -0700711/* YYNRULES -- Number of states. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800712#define YYNSTATES 477
Lev Walkin418298d2006-07-13 08:24:20 +0000713
714/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
715#define YYUNDEFTOK 2
Lev Walkin0e90aa02013-03-19 16:17:13 -0700716#define YYMAXUTOK 362
Lev Walkin418298d2006-07-13 08:24:20 +0000717
Lev Walkin0e90aa02013-03-19 16:17:13 -0700718#define YYTRANSLATE(YYX) \
719 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Lev Walkin418298d2006-07-13 08:24:20 +0000720
721/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700722static const yytype_uint8 yytranslate[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000723{
724 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
725 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
726 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700727 2, 2, 2, 119, 2, 2, 2, 2, 2, 2,
728 112, 113, 2, 2, 115, 2, 120, 2, 2, 2,
729 2, 2, 2, 2, 2, 2, 2, 2, 116, 114,
730 121, 2, 2, 2, 122, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000731 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
732 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700733 2, 117, 2, 118, 104, 2, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000734 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
735 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700736 2, 2, 2, 110, 106, 111, 2, 2, 2, 2,
Lev Walkin418298d2006-07-13 08:24:20 +0000737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
739 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
740 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
741 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
742 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
743 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
744 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
745 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
746 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
747 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
748 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
749 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
750 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
751 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
752 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
753 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
754 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
755 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
756 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
757 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
758 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700759 95, 96, 97, 98, 99, 100, 101, 102, 103, 105,
760 107, 108, 109
Lev Walkin418298d2006-07-13 08:24:20 +0000761};
762
763#if YYDEBUG
764/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
765 YYRHS. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700766static const yytype_uint16 yyprhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000767{
Lev Walkina9532f42006-09-17 04:52:50 +0000768 0, 0, 3, 5, 7, 10, 11, 21, 22, 24,
769 28, 31, 33, 36, 38, 43, 45, 46, 48, 50,
770 53, 56, 59, 62, 65, 68, 69, 71, 75, 77,
771 80, 82, 84, 86, 87, 91, 93, 94, 96, 100,
Lev Walkin4a4543f2006-10-13 12:37:39 +0000772 103, 104, 106, 108, 111, 112, 114, 119, 121, 125,
773 127, 131, 133, 134, 136, 140, 144, 147, 149, 153,
774 155, 159, 161, 165, 170, 172, 174, 179, 183, 187,
775 194, 201, 203, 207, 209, 213, 217, 221, 225, 227,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700776 231, 233, 235, 237, 239, 240, 242, 244, 248, 254,
777 258, 261, 265, 267, 269, 273, 276, 278, 280, 286,
778 287, 289, 291, 295, 298, 303, 307, 311, 315, 319,
779 323, 324, 326, 327, 334, 336, 339, 341, 343, 345,
780 349, 351, 355, 359, 363, 364, 367, 369, 374, 379,
781 384, 391, 398, 400, 405, 409, 411, 415, 419, 423,
782 425, 429, 431, 435, 437, 439, 441, 443, 447, 451,
783 453, 458, 460, 462, 466, 467, 471, 473, 475, 477,
784 479, 481, 483, 485, 487, 491, 493, 495, 497, 499,
785 502, 504, 506, 508, 510, 513, 516, 518, 520, 523,
786 526, 528, 530, 532, 534, 536, 539, 541, 544, 546,
787 548, 550, 552, 554, 556, 558, 560, 562, 564, 566,
788 568, 570, 572, 574, 576, 578, 580, 581, 583, 585,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800789 587, 592, 596, 601, 603, 605, 607, 609, 613, 619,
790 621, 625, 627, 631, 633, 637, 639, 643, 648, 652,
791 654, 656, 660, 664, 668, 672, 674, 676, 677, 681,
792 684, 687, 689, 691, 693, 695, 697, 699, 701, 703,
793 705, 707, 709, 713, 719, 721, 725, 727, 731, 732,
794 734, 736, 738, 740, 742, 744, 746, 747, 753, 756,
795 758, 761, 764, 768, 770, 772, 776, 781, 783, 787,
796 790, 794, 796, 800, 801, 803, 805, 808, 811, 815,
797 817, 821, 823, 828, 833, 835, 837, 839, 841, 843,
798 845, 846, 848, 851, 856, 857, 859, 861, 863, 864,
799 866, 868, 870, 872, 874, 875, 877
Lev Walkin418298d2006-07-13 08:24:20 +0000800};
801
Lev Walkin0e90aa02013-03-19 16:17:13 -0700802/* YYRHS -- A `-1'-separated list of the rules' RHS. */
803static const yytype_int16 yyrhs[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000804{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700805 124, 0, -1, 125, -1, 126, -1, 125, 126, -1,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800806 -1, 243, 127, 128, 41, 132, 3, 28, 135, 46,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700807 -1, -1, 129, -1, 110, 130, 111, -1, 110, 111,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800808 -1, 131, -1, 130, 131, -1, 246, -1, 246, 112,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700809 12, 113, -1, 12, -1, -1, 133, -1, 134, -1,
810 133, 134, -1, 48, 91, -1, 59, 91, -1, 27,
811 91, -1, 50, 60, -1, 18, 64, -1, -1, 136,
812 -1, 148, 140, 137, -1, 138, -1, 137, 138, -1,
813 155, -1, 185, -1, 153, -1, -1, 45, 18, 139,
814 -1, 195, -1, -1, 141, -1, 61, 142, 114, -1,
815 61, 53, -1, -1, 143, -1, 145, -1, 143, 145,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800816 -1, -1, 129, -1, 146, 53, 243, 144, -1, 147,
817 -1, 146, 115, 147, -1, 243, -1, 243, 110, 111,
818 -1, 246, -1, -1, 149, -1, 49, 150, 114, -1,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700819 49, 24, 114, -1, 49, 114, -1, 151, -1, 150,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800820 115, 151, -1, 243, -1, 243, 110, 111, -1, 246,
821 -1, 110, 203, 111, -1, 243, 154, 3, 152, -1,
822 194, -1, 179, -1, 179, 110, 158, 111, -1, 243,
823 3, 175, -1, 243, 3, 165, -1, 243, 110, 156,
824 111, 3, 175, -1, 243, 110, 156, 111, 3, 165,
825 -1, 157, -1, 156, 115, 157, -1, 243, -1, 243,
826 116, 246, -1, 243, 116, 243, -1, 192, 116, 246,
827 -1, 192, 116, 243, -1, 159, -1, 158, 115, 159,
828 -1, 175, -1, 188, -1, 246, -1, 152, -1, -1,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700829 161, -1, 162, -1, 161, 115, 162, -1, 161, 115,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800830 4, 161, 5, -1, 246, 175, 231, -1, 175, 231,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700831 -1, 37, 75, 175, -1, 174, -1, 164, -1, 163,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800832 115, 164, -1, 246, 175, -1, 174, -1, 175, -1,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700833 35, 110, 167, 111, 169, -1, -1, 95, -1, 168,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800834 -1, 167, 115, 168, -1, 19, 231, -1, 20, 175,
835 166, 231, -1, 20, 183, 231, -1, 20, 184, 231,
836 -1, 19, 183, 231, -1, 19, 175, 231, -1, 19,
837 184, 231, -1, -1, 170, -1, -1, 102, 89, 110,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700838 171, 172, 111, -1, 173, -1, 172, 173, -1, 6,
839 -1, 21, -1, 182, -1, 117, 172, 118, -1, 109,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800840 -1, 109, 119, 189, -1, 109, 119, 236, -1, 238,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700841 177, 198, -1, -1, 176, 178, -1, 154, -1, 34,
842 110, 163, 111, -1, 85, 110, 160, 111, -1, 86,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800843 110, 160, 111, -1, 85, 198, 75, 245, 238, 177,
844 -1, 86, 198, 75, 245, 238, 177, -1, 25, -1,
845 25, 42, 32, 246, -1, 63, 75, 179, -1, 17,
846 -1, 17, 120, 243, -1, 244, 120, 243, -1, 17,
847 120, 246, -1, 244, -1, 244, 120, 180, -1, 181,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700848 -1, 180, 120, 181, -1, 182, -1, 19, -1, 20,
849 -1, 19, -1, 183, 120, 19, -1, 183, 120, 20,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800850 -1, 18, -1, 246, 175, 3, 186, -1, 188, -1,
851 189, -1, 246, 116, 186, -1, -1, 110, 187, 191,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700852 -1, 70, -1, 52, -1, 93, -1, 8, -1, 10,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800853 -1, 190, -1, 236, -1, 246, -1, 243, 120, 246,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700854 -1, 9, -1, 15, -1, 16, -1, 7, -1, 191,
855 7, -1, 31, -1, 70, -1, 83, -1, 193, -1,
856 74, 88, -1, 72, 58, -1, 84, -1, 51, -1,
857 43, 78, -1, 33, 88, -1, 98, -1, 54, -1,
858 195, -1, 65, -1, 47, -1, 29, 88, -1, 192,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800859 -1, 193, 233, -1, 30, -1, 55, -1, 56, -1,
Lev Walkin0e90aa02013-03-19 16:17:13 -0700860 57, -1, 66, -1, 71, -1, 81, -1, 90, -1,
861 92, -1, 97, -1, 99, -1, 100, -1, 101, -1,
862 73, -1, 106, -1, 107, -1, 104, -1, 105, -1,
863 -1, 199, -1, 200, -1, 201, -1, 87, 112, 202,
864 113, -1, 112, 202, 113, -1, 201, 112, 202, 113,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800865 -1, 203, -1, 220, -1, 109, -1, 204, -1, 204,
866 115, 109, -1, 204, 115, 109, 115, 204, -1, 205,
867 -1, 24, 103, 208, -1, 206, -1, 205, 196, 206,
868 -1, 207, -1, 206, 197, 207, -1, 208, -1, 208,
869 103, 208, -1, 211, 112, 203, 113, -1, 112, 203,
870 113, -1, 212, -1, 214, -1, 212, 224, 212, -1,
871 68, 224, 212, -1, 212, 224, 67, -1, 68, 224,
872 67, -1, 215, -1, 210, -1, -1, 110, 209, 191,
873 -1, 77, 9, -1, 77, 246, -1, 87, -1, 53,
874 -1, 52, -1, 93, -1, 237, -1, 190, -1, 213,
875 -1, 246, -1, 8, -1, 10, -1, 179, -1, 102,
876 36, 201, -1, 102, 37, 110, 216, 111, -1, 217,
877 -1, 216, 115, 217, -1, 109, -1, 246, 198, 218,
878 -1, -1, 219, -1, 80, -1, 22, -1, 76, -1,
879 221, -1, 225, -1, 223, -1, -1, 38, 32, 110,
880 222, 191, -1, 39, 175, -1, 108, -1, 108, 121,
881 -1, 121, 108, -1, 121, 108, 121, -1, 226, -1,
882 227, -1, 110, 243, 111, -1, 226, 110, 228, 111,
883 -1, 229, -1, 228, 115, 229, -1, 122, 230, -1,
884 122, 120, 230, -1, 246, -1, 230, 120, 246, -1,
885 -1, 232, -1, 76, -1, 40, 186, -1, 110, 111,
886 -1, 110, 234, 111, -1, 235, -1, 234, 115, 235,
887 -1, 246, -1, 246, 112, 236, 113, -1, 246, 112,
888 189, 113, -1, 236, -1, 109, -1, 12, -1, 13,
889 -1, 236, -1, 14, -1, -1, 239, -1, 240, 242,
890 -1, 117, 241, 12, 118, -1, -1, 96, -1, 26,
891 -1, 82, -1, -1, 59, -1, 48, -1, 17, -1,
892 18, -1, 18, -1, -1, 246, -1, 11, -1
Lev Walkin418298d2006-07-13 08:24:20 +0000893};
894
895/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
Lev Walkin0e90aa02013-03-19 16:17:13 -0700896static const yytype_uint16 yyrline[] =
Lev Walkin418298d2006-07-13 08:24:20 +0000897{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800898 0, 358, 358, 364, 369, 386, 386, 415, 416, 420,
899 423, 429, 435, 444, 448, 452, 462, 463, 472, 475,
900 484, 487, 490, 493, 497, 518, 519, 528, 541, 544,
901 561, 568, 581, 589, 588, 602, 615, 616, 619, 629,
902 635, 636, 639, 644, 651, 652, 656, 667, 672, 679,
903 685, 691, 701, 702, 714, 717, 720, 728, 733, 740,
904 746, 752, 761, 764, 774, 787, 797, 817, 823, 839,
905 845, 853, 862, 873, 877, 885, 893, 901, 912, 917,
906 924, 927, 935, 946, 969, 970, 973, 978, 982, 990,
907 997, 1003, 1010, 1016, 1021, 1028, 1033, 1036, 1043, 1053,
908 1054, 1058, 1065, 1075, 1085, 1096, 1106, 1117, 1127, 1138,
909 1150, 1151, 1158, 1157, 1166, 1170, 1177, 1181, 1184, 1188,
910 1194, 1202, 1211, 1223, 1247, 1254, 1273, 1276, 1282, 1288,
911 1294, 1304, 1314, 1320, 1332, 1347, 1355, 1366, 1377, 1388,
912 1396, 1418, 1426, 1435, 1439, 1444, 1453, 1458, 1463, 1471,
913 1494, 1504, 1505, 1506, 1513, 1513, 1518, 1526, 1531, 1536,
914 1541, 1546, 1549, 1555, 1566, 1584, 1588, 1593, 1601, 1610,
915 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634,
916 1635, 1636, 1637, 1644, 1645, 1646, 1650, 1656, 1669, 1670,
917 1674, 1678, 1679, 1680, 1681, 1682, 1686, 1687, 1688, 1689,
918 1693, 1694, 1701, 1701, 1702, 1702, 1705, 1706, 1712, 1716,
919 1719, 1729, 1732, 1738, 1741, 1747, 1751, 1754, 1760, 1771,
920 1772, 1778, 1779, 1785, 1786, 1793, 1794, 1800, 1808, 1816,
921 1822, 1828, 1835, 1843, 1851, 1860, 1863, 1866, 1866, 1876,
922 1881, 1893, 1896, 1902, 1907, 1912, 1913, 1914, 1915, 1929,
923 1934, 1942, 1962, 1965, 1971, 1974, 1980, 1986, 2000, 2001,
924 2005, 2008, 2011, 2019, 2020, 2021, 2026, 2025, 2037, 2046,
925 2047, 2048, 2049, 2052, 2055, 2064, 2080, 2086, 2092, 2106,
926 2117, 2133, 2136, 2156, 2160, 2164, 2168, 2191, 2195, 2201,
927 2206, 2213, 2220, 2228, 2236, 2243, 2254, 2258, 2265, 2266,
928 2297, 2298, 2302, 2309, 2315, 2316, 2317, 2318, 2322, 2323,
929 2324, 2328, 2332, 2340, 2347, 2348, 2354
Lev Walkin418298d2006-07-13 08:24:20 +0000930};
931#endif
932
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800933#if YYDEBUG || YYERROR_VERBOSE || 0
Lev Walkin0e90aa02013-03-19 16:17:13 -0700934/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
935 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
Lev Walkin418298d2006-07-13 08:24:20 +0000936static const char *const yytname[] =
937{
Lev Walkin0e90aa02013-03-19 16:17:13 -0700938 "$end", "error", "$undefined", "TOK_PPEQ", "TOK_VBracketLeft",
939 "TOK_VBracketRight", "TOK_whitespace", "TOK_opaque", "TOK_bstring",
940 "TOK_cstring", "TOK_hstring", "TOK_identifier", "TOK_number",
941 "TOK_number_negative", "TOK_realnumber", "TOK_tuple", "TOK_quadruple",
942 "TOK_typereference", "TOK_capitalreference", "TOK_typefieldreference",
943 "TOK_valuefieldreference", "TOK_Literal", "TOK_ABSENT",
944 "TOK_ABSTRACT_SYNTAX", "TOK_ALL", "TOK_ANY", "TOK_APPLICATION",
945 "TOK_AUTOMATIC", "TOK_BEGIN", "TOK_BIT", "TOK_BMPString", "TOK_BOOLEAN",
946 "TOK_BY", "TOK_CHARACTER", "TOK_CHOICE", "TOK_CLASS", "TOK_COMPONENT",
947 "TOK_COMPONENTS", "TOK_CONSTRAINED", "TOK_CONTAINING", "TOK_DEFAULT",
948 "TOK_DEFINITIONS", "TOK_DEFINED", "TOK_EMBEDDED", "TOK_ENCODED",
949 "TOK_ENCODING_CONTROL", "TOK_END", "TOK_ENUMERATED", "TOK_EXPLICIT",
950 "TOK_EXPORTS", "TOK_EXTENSIBILITY", "TOK_EXTERNAL", "TOK_FALSE",
951 "TOK_FROM", "TOK_GeneralizedTime", "TOK_GeneralString",
952 "TOK_GraphicString", "TOK_IA5String", "TOK_IDENTIFIER", "TOK_IMPLICIT",
953 "TOK_IMPLIED", "TOK_IMPORTS", "TOK_INCLUDES", "TOK_INSTANCE",
954 "TOK_INSTRUCTIONS", "TOK_INTEGER", "TOK_ISO646String", "TOK_MAX",
955 "TOK_MIN", "TOK_MINUS_INFINITY", "TOK_NULL", "TOK_NumericString",
956 "TOK_OBJECT", "TOK_ObjectDescriptor", "TOK_OCTET", "TOK_OF",
957 "TOK_OPTIONAL", "TOK_PATTERN", "TOK_PDV", "TOK_PLUS_INFINITY",
958 "TOK_PRESENT", "TOK_PrintableString", "TOK_PRIVATE", "TOK_REAL",
959 "TOK_RELATIVE_OID", "TOK_SEQUENCE", "TOK_SET", "TOK_SIZE", "TOK_STRING",
960 "TOK_SYNTAX", "TOK_T61String", "TOK_TAGS", "TOK_TeletexString",
961 "TOK_TRUE", "TOK_TYPE_IDENTIFIER", "TOK_UNIQUE", "TOK_UNIVERSAL",
962 "TOK_UniversalString", "TOK_UTCTime", "TOK_UTF8String",
963 "TOK_VideotexString", "TOK_VisibleString", "TOK_WITH", "TOK_EXCEPT",
964 "'^'", "TOK_INTERSECTION", "'|'", "TOK_UNION", "TOK_TwoDots",
965 "TOK_ThreeDots", "'{'", "'}'", "'('", "')'", "';'", "','", "':'", "'['",
966 "']'", "'!'", "'.'", "'<'", "'@'", "$accept", "ParsedGrammar",
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800967 "ModuleList", "ModuleDefinition", "$@1", "optObjectIdentifier",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700968 "ObjectIdentifier", "ObjectIdentifierBody", "ObjectIdentifierElement",
969 "optModuleDefinitionFlags", "ModuleDefinitionFlags",
970 "ModuleDefinitionFlag", "optModuleBody", "ModuleBody", "AssignmentList",
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800971 "Assignment", "$@2", "optImports", "ImportsDefinition",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700972 "optImportsBundleSet", "ImportsBundleSet", "AssignedIdentifier",
973 "ImportsBundle", "ImportsList", "ImportsElement", "optExports",
974 "ExportsDefinition", "ExportsBody", "ExportsElement", "ValueSet",
975 "ValueSetTypeAssignment", "DefinedType", "DataTypeReference",
976 "ParameterArgumentList", "ParameterArgumentName", "ActualParameterList",
977 "ActualParameter", "optComponentTypeLists", "ComponentTypeLists",
978 "ComponentType", "AlternativeTypeLists", "AlternativeType",
979 "ObjectClass", "optUnique", "FieldSpec", "ClassField", "optWithSyntax",
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800980 "WithSyntax", "$@3", "WithSyntaxList", "WithSyntaxToken",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700981 "ExtensionAndException", "Type", "NSTD_IndirectMarker",
982 "TypeDeclaration", "TypeDeclarationSet", "ComplexTypeReference",
983 "ComplexTypeReferenceAmpList", "ComplexTypeReferenceElement",
984 "PrimitiveFieldReference", "FieldName", "DefinedObjectClass",
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800985 "ValueAssignment", "Value", "$@4", "SimpleValue", "DefinedValue",
Lev Walkin0e90aa02013-03-19 16:17:13 -0700986 "RestrictedCharacterStringValue", "Opaque", "BasicTypeId",
987 "BasicTypeId_UniverationCompatible", "BasicType", "BasicString",
988 "UnionMark", "IntersectionMark", "optConstraints", "Constraint",
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +0800989 "SubtypeConstraint", "SetOfConstraints", "ConstraintSpecs",
990 "ElementSetSpecs", "ElementSetSpec", "Unions", "Intersections",
991 "IntersectionElements", "ConstraintSubtypeElement", "$@5",
992 "PatternConstraint", "ConstraintSpec", "SingleValue", "BitStringValue",
993 "ContainedSubtype", "InnerTypeConstraint", "WithComponentsList",
994 "WithComponentsElement", "optPresenceConstraint", "PresenceConstraint",
995 "GeneralConstraint", "UserDefinedConstraint", "$@6",
996 "ContentsConstraint", "ConstraintRangeSpec", "TableConstraint",
997 "SimpleTableConstraint", "ComponentRelationConstraint", "AtNotationList",
998 "AtNotationElement", "ComponentIdList", "optMarker", "Marker",
999 "UniverationDefinition", "UniverationList", "UniverationElement",
1000 "SignedNumber", "RealValue", "optTag", "Tag", "TagTypeValue", "TagClass",
1001 "TagPlicit", "TypeRefName", "ObjectClassReference", "optIdentifier",
1002 "Identifier", YY_NULL
Lev Walkin418298d2006-07-13 08:24:20 +00001003};
1004#endif
1005
1006# ifdef YYPRINT
1007/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1008 token YYLEX-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001009static const yytype_uint16 yytoknum[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001010{
1011 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1012 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1013 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1014 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1015 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1016 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1017 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1018 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1019 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1020 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001021 355, 356, 357, 358, 94, 359, 124, 360, 361, 362,
1022 123, 125, 40, 41, 59, 44, 58, 91, 93, 33,
1023 46, 60, 64
Lev Walkin418298d2006-07-13 08:24:20 +00001024};
1025# endif
1026
1027/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001028static const yytype_uint8 yyr1[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001029{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001030 0, 123, 124, 125, 125, 127, 126, 128, 128, 129,
1031 129, 130, 130, 131, 131, 131, 132, 132, 133, 133,
1032 134, 134, 134, 134, 134, 135, 135, 136, 137, 137,
1033 138, 138, 138, 139, 138, 138, 140, 140, 141, 141,
1034 142, 142, 143, 143, 144, 144, 145, 146, 146, 147,
1035 147, 147, 148, 148, 149, 149, 149, 150, 150, 151,
1036 151, 151, 152, 153, 154, 154, 154, 155, 155, 155,
1037 155, 156, 156, 157, 157, 157, 157, 157, 158, 158,
1038 159, 159, 159, 159, 160, 160, 161, 161, 161, 162,
1039 162, 162, 162, 163, 163, 164, 164, 164, 165, 166,
1040 166, 167, 167, 168, 168, 168, 168, 168, 168, 168,
1041 169, 169, 171, 170, 172, 172, 173, 173, 173, 173,
1042 174, 174, 174, 175, 176, 177, 178, 178, 178, 178,
1043 178, 178, 178, 178, 178, 179, 179, 179, 179, 179,
1044 179, 180, 180, 181, 182, 182, 183, 183, 183, 184,
1045 185, 186, 186, 186, 187, 186, 186, 188, 188, 188,
1046 188, 188, 188, 189, 189, 190, 190, 190, 191, 191,
1047 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
1048 192, 192, 192, 193, 193, 193, 194, 194, 195, 195,
1049 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
1050 195, 195, 196, 196, 197, 197, 198, 198, 199, 200,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001051 200, 201, 201, 202, 202, 203, 203, 203, 203, 204,
1052 204, 205, 205, 206, 206, 207, 207, 208, 208, 208,
1053 208, 208, 208, 208, 208, 208, 208, 209, 208, 210,
1054 210, 211, 211, 212, 212, 212, 212, 212, 212, 213,
1055 213, 214, 215, 215, 216, 216, 217, 217, 218, 218,
1056 219, 219, 219, 220, 220, 220, 222, 221, 223, 224,
1057 224, 224, 224, 225, 225, 226, 227, 228, 228, 229,
1058 229, 230, 230, 231, 231, 232, 232, 233, 233, 234,
1059 234, 235, 235, 235, 235, 235, 236, 236, 237, 237,
1060 238, 238, 239, 240, 241, 241, 241, 241, 242, 242,
1061 242, 243, 243, 244, 245, 245, 246
Lev Walkin418298d2006-07-13 08:24:20 +00001062};
1063
1064/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001065static const yytype_uint8 yyr2[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001066{
Lev Walkina9532f42006-09-17 04:52:50 +00001067 0, 2, 1, 1, 2, 0, 9, 0, 1, 3,
1068 2, 1, 2, 1, 4, 1, 0, 1, 1, 2,
1069 2, 2, 2, 2, 2, 0, 1, 3, 1, 2,
1070 1, 1, 1, 0, 3, 1, 0, 1, 3, 2,
Lev Walkin4a4543f2006-10-13 12:37:39 +00001071 0, 1, 1, 2, 0, 1, 4, 1, 3, 1,
1072 3, 1, 0, 1, 3, 3, 2, 1, 3, 1,
1073 3, 1, 3, 4, 1, 1, 4, 3, 3, 6,
1074 6, 1, 3, 1, 3, 3, 3, 3, 1, 3,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001075 1, 1, 1, 1, 0, 1, 1, 3, 5, 3,
1076 2, 3, 1, 1, 3, 2, 1, 1, 5, 0,
1077 1, 1, 3, 2, 4, 3, 3, 3, 3, 3,
1078 0, 1, 0, 6, 1, 2, 1, 1, 1, 3,
1079 1, 3, 3, 3, 0, 2, 1, 4, 4, 4,
1080 6, 6, 1, 4, 3, 1, 3, 3, 3, 1,
1081 3, 1, 3, 1, 1, 1, 1, 3, 3, 1,
1082 4, 1, 1, 3, 0, 3, 1, 1, 1, 1,
1083 1, 1, 1, 1, 3, 1, 1, 1, 1, 2,
1084 1, 1, 1, 1, 2, 2, 1, 1, 2, 2,
1085 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
Lev Walkin418298d2006-07-13 08:24:20 +00001086 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001087 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001088 4, 3, 4, 1, 1, 1, 1, 3, 5, 1,
1089 3, 1, 3, 1, 3, 1, 3, 4, 3, 1,
1090 1, 3, 3, 3, 3, 1, 1, 0, 3, 2,
1091 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1092 1, 1, 3, 5, 1, 3, 1, 3, 0, 1,
1093 1, 1, 1, 1, 1, 1, 0, 5, 2, 1,
1094 2, 2, 3, 1, 1, 3, 4, 1, 3, 2,
1095 3, 1, 3, 0, 1, 1, 2, 2, 3, 1,
1096 3, 1, 4, 4, 1, 1, 1, 1, 1, 1,
1097 0, 1, 2, 4, 0, 1, 1, 1, 0, 1,
1098 1, 1, 1, 1, 0, 1, 1
Lev Walkin418298d2006-07-13 08:24:20 +00001099};
1100
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001101/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1102 Performed when YYTABLE doesn't specify something else to do. Zero
Lev Walkin418298d2006-07-13 08:24:20 +00001103 means the default is an error. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001104static const yytype_uint16 yydefact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001105{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001106 0, 311, 312, 0, 2, 3, 5, 1, 4, 7,
1107 0, 0, 8, 316, 15, 10, 0, 11, 13, 16,
Lev Walkina9532f42006-09-17 04:52:50 +00001108 9, 12, 0, 0, 0, 0, 0, 0, 0, 17,
1109 18, 0, 24, 22, 20, 23, 21, 0, 19, 14,
Lev Walkin4a4543f2006-10-13 12:37:39 +00001110 52, 0, 0, 26, 36, 53, 0, 56, 0, 57,
1111 59, 61, 6, 40, 0, 37, 55, 54, 0, 0,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001112 39, 0, 41, 42, 0, 47, 49, 51, 188, 0,
1113 189, 190, 191, 192, 193, 201, 194, 195, 196, 197,
1114 198, 199, 200, 27, 28, 32, 30, 31, 35, 0,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001115 300, 58, 60, 38, 43, 0, 0, 0, 33, 29,
1116 300, 135, 313, 0, 170, 0, 0, 184, 177, 181,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001117 183, 171, 0, 0, 172, 176, 180, 0, 0, 65,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001118 186, 173, 64, 182, 139, 304, 0, 124, 301, 308,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001119 44, 48, 50, 34, 0, 68, 67, 0, 185, 179,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001120 178, 175, 174, 0, 71, 0, 173, 73, 0, 300,
1121 0, 187, 0, 306, 307, 305, 0, 0, 0, 206,
1122 310, 309, 302, 45, 46, 0, 136, 138, 0, 0,
1123 0, 0, 0, 63, 159, 165, 160, 296, 297, 166,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001124 167, 157, 158, 83, 0, 78, 80, 81, 161, 162,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001125 82, 295, 287, 0, 289, 294, 291, 144, 145, 140,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001126 141, 143, 137, 0, 156, 154, 150, 151, 152, 0,
1127 163, 132, 0, 0, 206, 206, 126, 125, 0, 0,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001128 123, 207, 208, 209, 300, 300, 0, 101, 300, 72,
1129 77, 76, 75, 74, 249, 250, 299, 0, 243, 242,
1130 0, 0, 241, 244, 0, 215, 237, 0, 251, 246,
1131 0, 216, 219, 221, 223, 225, 236, 0, 229, 247,
1132 230, 235, 298, 245, 248, 66, 300, 288, 0, 0,
1133 0, 303, 0, 0, 0, 0, 300, 0, 300, 0,
1134 300, 0, 0, 0, 300, 237, 0, 213, 214, 263,
1135 265, 264, 273, 274, 0, 149, 146, 0, 285, 283,
1136 283, 283, 103, 284, 99, 283, 283, 110, 0, 70,
1137 69, 0, 269, 0, 0, 239, 240, 0, 0, 0,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001138 0, 62, 0, 202, 203, 0, 204, 205, 0, 0,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001139 0, 0, 79, 290, 0, 0, 163, 142, 168, 155,
1140 164, 153, 0, 120, 0, 93, 96, 97, 300, 134,
1141 0, 0, 85, 86, 92, 283, 300, 314, 0, 314,
1142 0, 0, 268, 0, 211, 0, 0, 286, 108, 0,
1143 107, 109, 100, 283, 105, 106, 0, 98, 111, 102,
1144 220, 270, 271, 234, 232, 252, 0, 238, 228, 217,
1145 222, 224, 226, 0, 233, 231, 293, 292, 169, 133,
1146 0, 127, 300, 95, 300, 128, 300, 90, 283, 300,
1147 315, 129, 300, 210, 266, 275, 0, 0, 277, 212,
1148 147, 148, 104, 0, 272, 256, 0, 254, 206, 0,
1149 227, 121, 122, 94, 91, 300, 87, 89, 124, 124,
1150 0, 0, 279, 281, 276, 0, 112, 253, 0, 258,
1151 218, 0, 130, 131, 267, 280, 0, 278, 0, 255,
1152 261, 262, 260, 257, 259, 88, 282, 116, 117, 0,
1153 0, 114, 118, 0, 113, 115, 119
Lev Walkin418298d2006-07-13 08:24:20 +00001154};
1155
Lev Walkin0e90aa02013-03-19 16:17:13 -07001156/* YYDEFGOTO[NTERM-NUM]. */
1157static const yytype_int16 yydefgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001158{
Lev Walkina9532f42006-09-17 04:52:50 +00001159 -1, 3, 4, 5, 9, 11, 12, 16, 17, 28,
Lev Walkinc6ab03c2006-10-21 05:54:49 +00001160 29, 30, 42, 43, 83, 84, 133, 54, 55, 61,
1161 62, 164, 63, 64, 65, 44, 45, 48, 49, 183,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001162 85, 118, 86, 143, 144, 184, 185, 351, 352, 353,
1163 344, 345, 135, 373, 226, 227, 377, 378, 458, 470,
1164 471, 354, 355, 158, 159, 217, 248, 199, 200, 472,
1165 300, 301, 87, 206, 272, 207, 208, 249, 339, 120,
1166 121, 122, 123, 325, 328, 220, 221, 222, 223, 286,
1167 287, 251, 252, 253, 254, 255, 319, 256, 257, 258,
1168 259, 260, 261, 426, 427, 463, 464, 288, 289, 440,
1169 290, 314, 291, 292, 293, 417, 418, 442, 302, 303,
1170 151, 193, 194, 262, 263, 127, 128, 129, 156, 162,
1171 209, 124, 409, 264
Lev Walkin418298d2006-07-13 08:24:20 +00001172};
1173
1174/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1175 STATE-NUM. */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001176#define YYPACT_NINF -297
Lev Walkin0e90aa02013-03-19 16:17:13 -07001177static const yytype_int16 yypact[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001178{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001179 201, -297, -297, 30, 201, -297, -297, -297, -297, -59,
1180 10, 41, -297, -297, -297, -297, 23, -297, -35, 176,
1181 -297, -297, 103, 59, 82, 117, 122, 134, 239, 176,
1182 -297, 142, -297, -297, -297, -297, -297, 237, -297, -297,
1183 119, 57, 227, -297, 206, -297, 165, -297, 157, -297,
1184 189, -297, -297, 169, 596, -297, -297, -297, 193, 186,
1185 -297, 195, 193, -297, -26, -297, 209, -297, -297, 298,
1186 -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
1187 -297, -297, -297, 596, -297, -297, -297, -297, -297, 271,
1188 203, -297, -297, -297, -297, 201, 193, 212, -297, -297,
1189 -3, 204, -297, 241, -297, 242, 253, -297, -297, -297,
1190 -297, -297, 275, 246, -297, -297, -297, 772, 332, 230,
1191 -297, 236, -297, -297, 231, 124, 345, -297, -297, 110,
1192 -59, -297, -297, -297, 240, -297, -297, 193, -297, -297,
1193 -297, -297, -297, -66, -297, 243, -297, 244, 247, 97,
1194 91, -297, 258, -297, -297, -297, 341, 228, 696, 105,
1195 -297, -297, -297, -297, -297, 265, -297, -297, 353, 772,
1196 193, 193, 448, -297, -297, -297, -297, -297, -297, -297,
1197 -297, -297, -297, -297, 98, -297, -297, -297, -297, -297,
1198 -297, -297, -297, 101, -297, -297, 250, -297, -297, 238,
1199 -297, -297, -297, 248, -297, -297, -297, -297, -297, 245,
1200 251, 322, 267, 300, -46, 111, -297, -297, 261, 402,
1201 -297, -297, -297, 270, 263, 7, 136, -297, -3, -297,
1202 -297, -297, -297, -297, -297, -297, -297, 276, -297, -297,
1203 -79, 221, -297, -297, 255, -297, -297, 448, -297, -297,
1204 272, 269, 187, 191, -297, 282, -297, 274, -79, -297,
1205 -297, -297, -297, -297, -297, -297, 97, -297, 84, 216,
1206 286, -297, 380, 377, 228, 357, 9, 290, 74, 316,
1207 74, 318, 402, 362, 203, 201, 284, -297, -297, -297,
1208 -297, -297, 285, -297, 402, -297, -297, 228, -297, -4,
1209 44, -4, -297, -297, 303, 44, -4, 297, 265, -297,
1210 -297, 571, 279, 293, 582, -297, -297, 292, 295, 380,
1211 289, -297, 294, -297, -297, 571, -297, -297, 571, 571,
1212 448, 690, -297, -297, 296, 308, -297, -297, -297, 400,
1213 -297, -297, 377, 304, 137, -297, -297, -297, 203, -297,
1214 333, 311, 309, -297, -297, -4, 203, 377, 317, 377,
1215 314, 319, -297, 321, -297, 312, 320, -297, -297, 291,
1216 -297, -297, -297, -4, -297, -297, 346, -297, -297, -297,
1217 -297, -297, 315, -297, -297, 270, 69, 400, -297, 324,
1218 191, -297, -297, 329, -297, -297, -297, -297, -297, -297,
1219 216, -297, 9, -297, 203, -297, 46, -297, -4, 203,
1220 -297, -297, 203, -297, -297, -297, -1, 138, -297, -297,
1221 -297, -297, -297, 327, -297, -297, 139, -297, 105, 553,
1222 -297, -297, -297, -297, -297, 79, -297, -297, -297, -297,
1223 380, 377, 310, -297, -297, 312, -297, -297, 69, 11,
1224 -297, 55, -297, -297, 400, 310, 377, -297, 50, -297,
1225 -297, -297, -297, -297, -297, -297, -297, -297, -297, 50,
1226 18, -297, -297, 34, -297, -297, -297
Lev Walkin418298d2006-07-13 08:24:20 +00001227};
1228
1229/* YYPGOTO[NTERM-NUM]. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001230static const yytype_int16 yypgoto[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001231{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001232 -297, -297, -297, 439, -297, -297, 323, -297, 428, -297,
1233 -297, 416, -297, -297, -297, 364, -297, -297, -297, -297,
1234 -297, -297, 386, -297, 354, -297, -297, -297, 391, 325,
1235 -297, 313, -297, -297, 283, -297, 185, 188, 32, 63,
1236 -297, 72, 249, -297, -297, 167, -297, -297, -297, 12,
1237 -187, -259, -87, -297, -126, -297, -82, -297, 208, -124,
1238 257, 259, -297, -120, -297, -134, -255, -141, -296, -52,
1239 36, -297, -36, -297, -297, -213, -297, -297, 159, -110,
1240 -168, 51, -297, 158, 160, -130, -297, -297, -297, -253,
1241 -297, -297, -297, -297, 37, -297, -297, -297, -297, -297,
1242 -297, 229, -297, -297, -297, -297, 45, 52, -207, -297,
1243 -297, -297, 218, -138, -297, -152, -297, -297, -297, -297,
1244 5, -297, 132, -10
Lev Walkin418298d2006-07-13 08:24:20 +00001245};
1246
1247/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1248 positive, shift that token. If negative, reduce the rule which
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001249 number is the opposite. If YYTABLE_NINF, syntax error. */
1250#define YYTABLE_NINF -284
Lev Walkin0e90aa02013-03-19 16:17:13 -07001251static const yytype_int16 yytable[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001252{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001253 18, 279, 281, 126, 250, 6, 18, 119, 188, 6,
1254 13, 189, 195, 136, 334, 187, 188, 346, 88, 189,
1255 13, 13, 14, 387, 467, 295, 296, 95, 201, 312,
1256 7, 51, 134, 460, 13, 14, 297, 197, 198, 468,
1257 467, 218, 313, 67, 90, 168, 50, 88, 51, 169,
1258 435, 10, 67, 197, 198, 468, 467, 13, 66, 89,
1259 465, 384, 186, 50, 278, 145, 219, 66, 13, 197,
1260 198, 468, 298, 90, 1, 2, 119, 22, 395, 320,
1261 13, 46, 19, 350, 297, 13, 67, 461, 89, 96,
1262 13, 462, 368, 370, 371, 13, 177, 178, 374, 375,
1263 130, 66, 13, 177, 178, 174, 175, 176, 13, 177,
1264 178, 350, 179, 180, 125, 31, 350, 145, 343, 441,
1265 298, 15, 147, 32, 125, 188, 125, 167, 189, 474,
1266 195, 335, 187, 188, 20, 469, 189, 299, 304, 190,
1267 196, 310, 166, 346, 454, 431, 201, 210, 407, 181,
1268 153, 469, 476, 146, 341, 343, 188, 202, 160, 189,
1269 231, 233, 393, 125, 369, -25, 422, 469, 41, 161,
1270 406, 47, 360, 33, 147, 230, 232, 367, 425, 186,
1271 13, 380, 35, 343, 366, -84, 1, 2, 343, 347,
1272 182, 125, 218, 191, 23, 349, 125, 362, 218, 392,
1273 191, 437, 192, 24, 13, 146, 154, 172, 34, 265,
1274 1, 2, 267, 266, 125, 449, 268, 219, 1, 2,
1275 155, 280, 60, 219, 25, 36, 26, 13, 177, 178,
1276 315, 316, 13, 1, 2, 27, 174, 175, 176, 13,
1277 177, 178, 37, 179, 180, 1, 2, 307, 401, 444,
1278 447, 308, 402, 445, 448, 39, 190, 438, 196, 336,
1279 439, 403, 432, 340, 210, 40, 348, 53, 356, 408,
1280 356, 57, 58, 52, 100, 1, 2, 197, 198, 56,
1281 181, 295, 296, 475, 224, 225, 475, 210, 101, 102,
1282 363, 317, 318, 323, 324, 326, 327, 92, 204, 59,
1283 103, 68, 104, 297, 105, 197, 198, 101, 102, 93,
1284 420, 421, 452, 453, 106, 347, 98, 434, 107, 97,
1285 125, 182, 108, 132, 137, 109, 70, 71, 72, 138,
1286 139, 140, 399, 141, 142, 148, 110, 73, 205, 298,
1287 149, 111, 74, 112, 75, 113, 150, 410, 157, 410,
1288 165, 152, 76, 203, 114, 115, 228, 172, 270, 170,
1289 171, 77, 269, 78, 275, 273, 271, 274, 79, 116,
1290 80, 81, 82, 282, -283, 277, 428, 276, -283, 311,
1291 125, 117, 294, 321, 322, 329, 330, 338, 13, 342,
1292 336, 357, 348, 359, 361, 365, 356, 364, 372, 376,
1293 381, 382, 388, 389, 219, 386, 443, 398, 404, 396,
1294 234, 175, 235, 13, 177, 178, 236, 179, 180, 101,
1295 102, 397, 405, 400, 406, 356, 237, 413, 411, 414,
1296 456, 443, 415, 419, 416, 423, 424, 446, 428, 429,
1297 283, 284, 430, 8, 21, 38, 466, 99, 94, 91,
1298 131, 332, 229, 163, 238, 239, 234, 175, 235, 13,
1299 177, 178, 236, 179, 180, 101, 102, 451, 358, 436,
1300 240, 216, 237, 173, 433, 379, 385, 309, 337, 241,
1301 450, 473, 305, 390, 306, 459, 333, 331, 391, 242,
1302 457, 412, 0, 455, 0, 243, 0, 0, 0, 0,
1303 238, 239, 0, 0, 244, 0, 0, 0, 0, 0,
1304 0, 245, 285, 0, 247, 0, 240, 0, 0, 0,
1305 0, 0, 0, 0, 0, 241, 0, 0, 0, 0,
1306 0, 0, 0, 0, 0, 242, 0, 0, 0, 0,
1307 0, 243, 0, 0, 0, 0, 0, 0, 0, 0,
1308 244, 0, 0, 0, 0, 0, 0, 245, 246, 0,
1309 247, 234, 175, 235, 13, 177, 178, 236, 179, 180,
1310 101, 102, 0, 0, 0, 0, 0, 237, 0, 234,
1311 175, 235, 13, 177, 178, 236, 179, 180, 101, 102,
1312 234, 175, 235, 13, 177, 178, 236, 179, 180, 0,
1313 0, 0, 0, 0, 0, 238, 239, 13, 0, 0,
1314 0, 0, 0, 1, 2, 0, 0, 0, 0, 0,
1315 0, 240, 0, 238, 239, 0, 68, 0, 0, 0,
1316 241, 0, 0, 0, 238, 0, 0, 0, 0, 240,
1317 242, 69, 0, 0, 0, 0, 243, 0, 241, 383,
1318 0, 70, 71, 72, 0, 244, 0, 0, 242, 0,
1319 0, 0, 73, 246, 243, 247, 0, 74, 0, 75,
1320 0, 0, 0, 244, 0, 243, 0, 76, 0, 0,
1321 0, 246, 0, 247, 0, 0, 77, 0, 78, 0,
1322 0, 0, 0, 79, 0, 80, 81, 82, 234, 175,
1323 235, 13, 177, 178, 236, 179, 180, 0, 0, 0,
1324 0, 0, 0, 101, 102, 0, 0, 0, 0, 0,
1325 0, 211, 0, 0, 0, 103, 68, 104, 0, 105,
1326 212, 0, 0, 0, 0, 0, 0, 0, 0, 106,
1327 0, 0, 238, 107, 0, 0, 0, 108, 0, 0,
1328 109, 70, 71, 72, 0, 0, 0, 394, 0, 213,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001329 0, 110, 73, 0, 0, 0, 111, 74, 112, 75,
1330 113, 0, 0, 0, 0, 0, 0, 76, 0, 114,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001331 115, 214, 215, 243, 0, 0, 77, 0, 78, 1,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001332 2, 0, 0, 79, 116, 80, 81, 82, 0, 0,
1333 0, 103, 68, 104, 0, 105, 0, 0, 0, 0,
1334 0, 0, 0, 0, 0, 106, 0, 0, 0, 107,
1335 0, 0, 0, 108, 0, 0, 109, 70, 71, 72,
1336 0, 0, 0, 0, 0, 0, 0, 110, 73, 0,
1337 0, 0, 111, 74, 112, 75, 113, 0, 0, 0,
1338 0, 0, 0, 76, 0, 114, 115, 0, 0, 0,
1339 0, 0, 77, 0, 78, 0, 0, 0, 0, 79,
1340 116, 80, 81, 82
Lev Walkin418298d2006-07-13 08:24:20 +00001341};
1342
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001343#define yypact_value_is_default(Yystate) \
1344 (!!((Yystate) == (-297)))
1345
1346#define yytable_value_is_error(Yytable_value) \
1347 YYID (0)
1348
Lev Walkin0e90aa02013-03-19 16:17:13 -07001349static const yytype_int16 yycheck[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001350{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001351 10, 214, 215, 90, 172, 0, 16, 89, 149, 4,
1352 11, 149, 150, 100, 269, 149, 157, 276, 54, 157,
1353 11, 11, 12, 319, 6, 18, 19, 53, 152, 108,
1354 0, 41, 35, 22, 11, 12, 40, 19, 20, 21,
1355 6, 87, 121, 53, 54, 111, 41, 83, 58, 115,
1356 4, 110, 62, 19, 20, 21, 6, 11, 53, 54,
1357 5, 314, 149, 58, 110, 117, 112, 62, 11, 19,
1358 20, 21, 76, 83, 17, 18, 158, 112, 331, 247,
1359 11, 24, 41, 37, 40, 11, 96, 76, 83, 115,
1360 11, 80, 299, 300, 301, 11, 12, 13, 305, 306,
1361 95, 96, 11, 12, 13, 8, 9, 10, 11, 12,
1362 13, 37, 15, 16, 117, 12, 37, 169, 109, 120,
1363 76, 111, 117, 64, 117, 266, 117, 137, 266, 111,
1364 268, 269, 266, 274, 111, 117, 274, 224, 225, 149,
1365 150, 228, 137, 402, 440, 400, 270, 157, 355, 52,
1366 26, 117, 118, 117, 274, 109, 297, 152, 48, 297,
1367 170, 171, 330, 117, 120, 46, 373, 117, 49, 59,
1368 115, 114, 282, 91, 169, 170, 171, 297, 109, 266,
1369 11, 311, 60, 109, 294, 111, 17, 18, 109, 276,
1370 93, 117, 87, 109, 18, 277, 117, 284, 87, 329,
1371 109, 408, 111, 27, 11, 169, 82, 110, 91, 111,
1372 17, 18, 111, 115, 117, 428, 115, 112, 17, 18,
1373 96, 110, 53, 112, 48, 91, 50, 11, 12, 13,
1374 9, 241, 11, 17, 18, 59, 8, 9, 10, 11,
1375 12, 13, 3, 15, 16, 17, 18, 111, 111, 111,
1376 111, 115, 115, 115, 115, 113, 266, 409, 268, 269,
1377 412, 348, 400, 273, 274, 28, 276, 61, 278, 356,
1378 280, 114, 115, 46, 3, 17, 18, 19, 20, 114,
1379 52, 18, 19, 470, 19, 20, 473, 297, 17, 18,
1380 285, 36, 37, 106, 107, 104, 105, 111, 70, 110,
1381 29, 30, 31, 40, 33, 19, 20, 17, 18, 114,
1382 19, 20, 438, 439, 43, 402, 18, 404, 47, 110,
1383 117, 93, 51, 111, 120, 54, 55, 56, 57, 88,
1384 88, 78, 342, 58, 88, 3, 65, 66, 110, 76,
1385 110, 70, 71, 72, 73, 74, 110, 357, 3, 359,
1386 110, 120, 81, 12, 83, 84, 3, 110, 120, 116,
1387 116, 90, 112, 92, 42, 120, 118, 116, 97, 98,
1388 99, 100, 101, 112, 111, 75, 386, 110, 115, 103,
1389 117, 110, 112, 111, 115, 103, 112, 7, 11, 32,
1390 400, 75, 402, 75, 32, 110, 406, 113, 95, 102,
1391 121, 108, 113, 109, 112, 110, 416, 7, 75, 113,
1392 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1393 18, 113, 111, 119, 115, 435, 24, 113, 111, 110,
1394 120, 441, 111, 113, 122, 89, 121, 110, 448, 115,
1395 38, 39, 113, 4, 16, 29, 456, 83, 62, 58,
1396 96, 266, 169, 130, 52, 53, 8, 9, 10, 11,
1397 12, 13, 14, 15, 16, 17, 18, 435, 280, 406,
1398 68, 158, 24, 148, 402, 308, 317, 228, 270, 77,
1399 429, 469, 225, 325, 225, 448, 268, 258, 328, 87,
1400 445, 359, -1, 441, -1, 93, -1, -1, -1, -1,
1401 52, 53, -1, -1, 102, -1, -1, -1, -1, -1,
1402 -1, 109, 110, -1, 112, -1, 68, -1, -1, -1,
1403 -1, -1, -1, -1, -1, 77, -1, -1, -1, -1,
1404 -1, -1, -1, -1, -1, 87, -1, -1, -1, -1,
1405 -1, 93, -1, -1, -1, -1, -1, -1, -1, -1,
1406 102, -1, -1, -1, -1, -1, -1, 109, 110, -1,
1407 112, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1408 17, 18, -1, -1, -1, -1, -1, 24, -1, 8,
1409 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1410 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1411 -1, -1, -1, -1, -1, 52, 53, 11, -1, -1,
1412 -1, -1, -1, 17, 18, -1, -1, -1, -1, -1,
1413 -1, 68, -1, 52, 53, -1, 30, -1, -1, -1,
1414 77, -1, -1, -1, 52, -1, -1, -1, -1, 68,
1415 87, 45, -1, -1, -1, -1, 93, -1, 77, 67,
1416 -1, 55, 56, 57, -1, 102, -1, -1, 87, -1,
1417 -1, -1, 66, 110, 93, 112, -1, 71, -1, 73,
1418 -1, -1, -1, 102, -1, 93, -1, 81, -1, -1,
1419 -1, 110, -1, 112, -1, -1, 90, -1, 92, -1,
1420 -1, -1, -1, 97, -1, 99, 100, 101, 8, 9,
1421 10, 11, 12, 13, 14, 15, 16, -1, -1, -1,
1422 -1, -1, -1, 17, 18, -1, -1, -1, -1, -1,
1423 -1, 25, -1, -1, -1, 29, 30, 31, -1, 33,
1424 34, -1, -1, -1, -1, -1, -1, -1, -1, 43,
1425 -1, -1, 52, 47, -1, -1, -1, 51, -1, -1,
1426 54, 55, 56, 57, -1, -1, -1, 67, -1, 63,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001427 -1, 65, 66, -1, -1, -1, 70, 71, 72, 73,
1428 74, -1, -1, -1, -1, -1, -1, 81, -1, 83,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001429 84, 85, 86, 93, -1, -1, 90, -1, 92, 17,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001430 18, -1, -1, 97, 98, 99, 100, 101, -1, -1,
1431 -1, 29, 30, 31, -1, 33, -1, -1, -1, -1,
1432 -1, -1, -1, -1, -1, 43, -1, -1, -1, 47,
1433 -1, -1, -1, 51, -1, -1, 54, 55, 56, 57,
1434 -1, -1, -1, -1, -1, -1, -1, 65, 66, -1,
1435 -1, -1, 70, 71, 72, 73, 74, -1, -1, -1,
1436 -1, -1, -1, 81, -1, 83, 84, -1, -1, -1,
1437 -1, -1, 90, -1, 92, -1, -1, -1, -1, 97,
1438 98, 99, 100, 101
Lev Walkin418298d2006-07-13 08:24:20 +00001439};
1440
1441/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1442 symbol of state STATE-NUM. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001443static const yytype_uint8 yystos[] =
Lev Walkin418298d2006-07-13 08:24:20 +00001444{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001445 0, 17, 18, 124, 125, 126, 243, 0, 126, 127,
1446 110, 128, 129, 11, 12, 111, 130, 131, 246, 41,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001447 111, 131, 112, 18, 27, 48, 50, 59, 132, 133,
1448 134, 12, 64, 91, 91, 60, 91, 3, 134, 113,
1449 28, 49, 135, 136, 148, 149, 24, 114, 150, 151,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001450 243, 246, 46, 61, 140, 141, 114, 114, 115, 110,
1451 53, 142, 143, 145, 146, 147, 243, 246, 30, 45,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001452 55, 56, 57, 66, 71, 73, 81, 90, 92, 97,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001453 99, 100, 101, 137, 138, 153, 155, 185, 195, 243,
1454 246, 151, 111, 114, 145, 53, 115, 110, 18, 138,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001455 3, 17, 18, 29, 31, 33, 43, 47, 51, 54,
1456 65, 70, 72, 74, 83, 84, 98, 110, 154, 179,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001457 192, 193, 194, 195, 244, 117, 175, 238, 239, 240,
1458 243, 147, 111, 139, 35, 165, 175, 120, 88, 88,
1459 78, 58, 88, 156, 157, 192, 193, 243, 3, 110,
1460 110, 233, 120, 26, 82, 96, 241, 3, 176, 177,
1461 48, 59, 242, 129, 144, 110, 243, 246, 111, 115,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001462 116, 116, 110, 152, 8, 9, 10, 12, 13, 15,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001463 16, 52, 93, 152, 158, 159, 175, 188, 190, 236,
1464 246, 109, 111, 234, 235, 236, 246, 19, 20, 180,
1465 181, 182, 243, 12, 70, 110, 186, 188, 189, 243,
1466 246, 25, 34, 63, 85, 86, 154, 178, 87, 112,
Lev Walkin0e90aa02013-03-19 16:17:13 -07001467 198, 199, 200, 201, 19, 20, 167, 168, 3, 157,
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001468 243, 246, 243, 246, 8, 10, 14, 24, 52, 53,
1469 68, 77, 87, 93, 102, 109, 110, 112, 179, 190,
1470 203, 204, 205, 206, 207, 208, 210, 211, 212, 213,
1471 214, 215, 236, 237, 246, 111, 115, 111, 115, 112,
1472 120, 118, 187, 120, 116, 42, 110, 75, 110, 198,
1473 110, 198, 112, 38, 39, 110, 202, 203, 220, 221,
1474 223, 225, 226, 227, 112, 18, 19, 40, 76, 175,
1475 183, 184, 231, 232, 175, 183, 184, 111, 115, 165,
1476 175, 103, 108, 121, 224, 9, 246, 36, 37, 209,
1477 203, 111, 115, 106, 107, 196, 104, 105, 197, 103,
1478 112, 224, 159, 235, 189, 236, 246, 181, 7, 191,
1479 246, 186, 32, 109, 163, 164, 174, 175, 246, 179,
1480 37, 160, 161, 162, 174, 175, 246, 75, 160, 75,
1481 202, 32, 175, 243, 113, 110, 202, 186, 231, 120,
1482 231, 231, 95, 166, 231, 231, 102, 169, 170, 168,
1483 208, 121, 108, 67, 212, 201, 110, 191, 113, 109,
1484 206, 207, 208, 203, 67, 212, 113, 113, 7, 246,
1485 119, 111, 115, 175, 75, 111, 115, 231, 175, 245,
1486 246, 111, 245, 113, 110, 111, 122, 228, 229, 113,
1487 19, 20, 231, 89, 121, 109, 216, 217, 246, 115,
1488 113, 189, 236, 164, 175, 4, 162, 231, 238, 238,
1489 222, 120, 230, 246, 111, 115, 110, 111, 115, 198,
1490 204, 161, 177, 177, 191, 230, 120, 229, 171, 217,
1491 22, 76, 80, 218, 219, 5, 246, 6, 21, 117,
1492 172, 173, 182, 172, 111, 173, 118
Lev Walkin418298d2006-07-13 08:24:20 +00001493};
1494
Lev Walkinf15320b2004-06-03 03:38:44 +00001495#define yyerrok (yyerrstatus = 0)
1496#define yyclearin (yychar = YYEMPTY)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001497#define YYEMPTY (-2)
Lev Walkinf15320b2004-06-03 03:38:44 +00001498#define YYEOF 0
Lev Walkin418298d2006-07-13 08:24:20 +00001499
Lev Walkinf15320b2004-06-03 03:38:44 +00001500#define YYACCEPT goto yyacceptlab
Lev Walkin418298d2006-07-13 08:24:20 +00001501#define YYABORT goto yyabortlab
Lev Walkin0e90aa02013-03-19 16:17:13 -07001502#define YYERROR goto yyerrorlab
1503
Lev Walkin418298d2006-07-13 08:24:20 +00001504
1505/* Like YYERROR except do call yyerror. This remains here temporarily
1506 to ease the transition to the new meaning of YYERROR, for GCC.
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001507 Once GCC version 2 has supplanted version 1, this can go. However,
1508 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1509 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1510 discussed. */
Lev Walkin418298d2006-07-13 08:24:20 +00001511
Lev Walkinf15320b2004-06-03 03:38:44 +00001512#define YYFAIL goto yyerrlab
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001513#if defined YYFAIL
1514 /* This is here to suppress warnings from the GCC cpp's
1515 -Wunused-macros. Normally we don't worry about that warning, but
1516 some users do, and we want to make it easy for users to remove
1517 YYFAIL uses, which will produce warnings from Bison 2.5. */
1518#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001519
Lev Walkinf15320b2004-06-03 03:38:44 +00001520#define YYRECOVERING() (!!yyerrstatus)
Lev Walkin418298d2006-07-13 08:24:20 +00001521
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001522#define YYBACKUP(Token, Value) \
1523do \
1524 if (yychar == YYEMPTY) \
1525 { \
1526 yychar = (Token); \
1527 yylval = (Value); \
1528 YYPOPSTACK (yylen); \
1529 yystate = *yyssp; \
1530 goto yybackup; \
1531 } \
1532 else \
1533 { \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001534 yyerror (YY_("syntax error: cannot back up")); \
Lev Walkin418298d2006-07-13 08:24:20 +00001535 YYERROR; \
1536 } \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001537while (YYID (0))
1538
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001539/* Error token number */
Lev Walkinf15320b2004-06-03 03:38:44 +00001540#define YYTERROR 1
1541#define YYERRCODE 256
1542
Lev Walkin418298d2006-07-13 08:24:20 +00001543
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001544/* This macro is provided for backward compatibility. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001545#ifndef YY_LOCATION_PRINT
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001546# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001547#endif
1548
1549
Lev Walkin418298d2006-07-13 08:24:20 +00001550/* YYLEX -- calling `yylex' with the right arguments. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001551#ifdef YYLEX_PARAM
1552# define YYLEX yylex (YYLEX_PARAM)
1553#else
1554# define YYLEX yylex ()
1555#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001556
Lev Walkin418298d2006-07-13 08:24:20 +00001557/* Enable debugging if requested. */
1558#if YYDEBUG
Lev Walkinfb872bd2006-03-18 06:53:11 +00001559
Lev Walkin418298d2006-07-13 08:24:20 +00001560# ifndef YYFPRINTF
1561# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1562# define YYFPRINTF fprintf
1563# endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00001564
Lev Walkin418298d2006-07-13 08:24:20 +00001565# define YYDPRINTF(Args) \
1566do { \
1567 if (yydebug) \
1568 YYFPRINTF Args; \
Lev Walkin0e90aa02013-03-19 16:17:13 -07001569} while (YYID (0))
1570
1571# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1572do { \
1573 if (yydebug) \
1574 { \
1575 YYFPRINTF (stderr, "%s ", Title); \
1576 yy_symbol_print (stderr, \
1577 Type, Value); \
1578 YYFPRINTF (stderr, "\n"); \
1579 } \
1580} while (YYID (0))
1581
1582
1583/*--------------------------------.
1584| Print this symbol on YYOUTPUT. |
1585`--------------------------------*/
1586
1587/*ARGSUSED*/
1588#if (defined __STDC__ || defined __C99__FUNC__ \
1589 || defined __cplusplus || defined _MSC_VER)
1590static void
1591yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1592#else
1593static void
1594yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1595 FILE *yyoutput;
1596 int yytype;
1597 YYSTYPE const * const yyvaluep;
1598#endif
1599{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001600 FILE *yyo = yyoutput;
1601 YYUSE (yyo);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001602 if (!yyvaluep)
1603 return;
1604# ifdef YYPRINT
1605 if (yytype < YYNTOKENS)
1606 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1607# else
1608 YYUSE (yyoutput);
1609# endif
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001610 YYUSE (yytype);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001611}
1612
1613
1614/*--------------------------------.
1615| Print this symbol on YYOUTPUT. |
1616`--------------------------------*/
1617
1618#if (defined __STDC__ || defined __C99__FUNC__ \
1619 || defined __cplusplus || defined _MSC_VER)
1620static void
1621yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1622#else
1623static void
1624yy_symbol_print (yyoutput, yytype, yyvaluep)
1625 FILE *yyoutput;
1626 int yytype;
1627 YYSTYPE const * const yyvaluep;
1628#endif
1629{
1630 if (yytype < YYNTOKENS)
1631 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1632 else
1633 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1634
1635 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1636 YYFPRINTF (yyoutput, ")");
1637}
1638
1639/*------------------------------------------------------------------.
1640| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1641| TOP (included). |
1642`------------------------------------------------------------------*/
1643
1644#if (defined __STDC__ || defined __C99__FUNC__ \
1645 || defined __cplusplus || defined _MSC_VER)
1646static void
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001647yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001648#else
1649static void
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001650yy_stack_print (yybottom, yytop)
1651 yytype_int16 *yybottom;
1652 yytype_int16 *yytop;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001653#endif
1654{
1655 YYFPRINTF (stderr, "Stack now");
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001656 for (; yybottom <= yytop; yybottom++)
1657 {
1658 int yybot = *yybottom;
1659 YYFPRINTF (stderr, " %d", yybot);
1660 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001661 YYFPRINTF (stderr, "\n");
1662}
1663
1664# define YY_STACK_PRINT(Bottom, Top) \
1665do { \
1666 if (yydebug) \
1667 yy_stack_print ((Bottom), (Top)); \
1668} while (YYID (0))
1669
1670
1671/*------------------------------------------------.
1672| Report that the YYRULE is going to be reduced. |
1673`------------------------------------------------*/
1674
1675#if (defined __STDC__ || defined __C99__FUNC__ \
1676 || defined __cplusplus || defined _MSC_VER)
1677static void
1678yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1679#else
1680static void
1681yy_reduce_print (yyvsp, yyrule)
1682 YYSTYPE *yyvsp;
1683 int yyrule;
1684#endif
1685{
1686 int yynrhs = yyr2[yyrule];
1687 int yyi;
1688 unsigned long int yylno = yyrline[yyrule];
1689 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1690 yyrule - 1, yylno);
1691 /* The symbols being reduced. */
1692 for (yyi = 0; yyi < yynrhs; yyi++)
1693 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001694 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Lev Walkin0e90aa02013-03-19 16:17:13 -07001695 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1696 &(yyvsp[(yyi + 1) - (yynrhs)])
1697 );
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001698 YYFPRINTF (stderr, "\n");
Lev Walkin0e90aa02013-03-19 16:17:13 -07001699 }
1700}
1701
1702# define YY_REDUCE_PRINT(Rule) \
1703do { \
1704 if (yydebug) \
1705 yy_reduce_print (yyvsp, Rule); \
1706} while (YYID (0))
1707
Lev Walkin418298d2006-07-13 08:24:20 +00001708/* Nonzero means print parse trace. It is left uninitialized so that
1709 multiple parsers can coexist. */
1710int yydebug;
1711#else /* !YYDEBUG */
1712# define YYDPRINTF(Args)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001713# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1714# define YY_STACK_PRINT(Bottom, Top)
1715# define YY_REDUCE_PRINT(Rule)
Lev Walkin418298d2006-07-13 08:24:20 +00001716#endif /* !YYDEBUG */
Lev Walkinfb872bd2006-03-18 06:53:11 +00001717
Lev Walkin0e90aa02013-03-19 16:17:13 -07001718
Lev Walkin418298d2006-07-13 08:24:20 +00001719/* YYINITDEPTH -- initial size of the parser's stacks. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001720#ifndef YYINITDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001721# define YYINITDEPTH 200
Lev Walkinf15320b2004-06-03 03:38:44 +00001722#endif
1723
Lev Walkin418298d2006-07-13 08:24:20 +00001724/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1725 if the built-in stack extension method is used).
1726
1727 Do not make this value too large; the results are undefined if
Lev Walkin0e90aa02013-03-19 16:17:13 -07001728 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Lev Walkin418298d2006-07-13 08:24:20 +00001729 evaluated with infinite-precision integer arithmetic. */
Lev Walkinf15320b2004-06-03 03:38:44 +00001730
Lev Walkinf15320b2004-06-03 03:38:44 +00001731#ifndef YYMAXDEPTH
Lev Walkin418298d2006-07-13 08:24:20 +00001732# define YYMAXDEPTH 10000
Lev Walkinf15320b2004-06-03 03:38:44 +00001733#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001734
Lev Walkinf15320b2004-06-03 03:38:44 +00001735
Lev Walkin418298d2006-07-13 08:24:20 +00001736#if YYERROR_VERBOSE
Lev Walkinf15320b2004-06-03 03:38:44 +00001737
Lev Walkin418298d2006-07-13 08:24:20 +00001738# ifndef yystrlen
Lev Walkin0e90aa02013-03-19 16:17:13 -07001739# if defined __GLIBC__ && defined _STRING_H
Lev Walkin418298d2006-07-13 08:24:20 +00001740# define yystrlen strlen
1741# else
1742/* Return the length of YYSTR. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001743#if (defined __STDC__ || defined __C99__FUNC__ \
1744 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001745static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001746yystrlen (const char *yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001747#else
1748static YYSIZE_T
Lev Walkin418298d2006-07-13 08:24:20 +00001749yystrlen (yystr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001750 const char *yystr;
1751#endif
Lev Walkina00d6b32006-03-21 03:40:38 +00001752{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001753 YYSIZE_T yylen;
1754 for (yylen = 0; yystr[yylen]; yylen++)
Lev Walkin418298d2006-07-13 08:24:20 +00001755 continue;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001756 return yylen;
Lev Walkin418298d2006-07-13 08:24:20 +00001757}
1758# endif
1759# endif
1760
1761# ifndef yystpcpy
Lev Walkin0e90aa02013-03-19 16:17:13 -07001762# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Lev Walkin418298d2006-07-13 08:24:20 +00001763# define yystpcpy stpcpy
1764# else
1765/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1766 YYDEST. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07001767#if (defined __STDC__ || defined __C99__FUNC__ \
1768 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001769static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001770yystpcpy (char *yydest, const char *yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001771#else
1772static char *
Lev Walkin418298d2006-07-13 08:24:20 +00001773yystpcpy (yydest, yysrc)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001774 char *yydest;
1775 const char *yysrc;
1776#endif
Lev Walkin418298d2006-07-13 08:24:20 +00001777{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001778 char *yyd = yydest;
1779 const char *yys = yysrc;
Lev Walkin418298d2006-07-13 08:24:20 +00001780
1781 while ((*yyd++ = *yys++) != '\0')
1782 continue;
1783
1784 return yyd - 1;
1785}
1786# endif
1787# endif
1788
Lev Walkin0e90aa02013-03-19 16:17:13 -07001789# ifndef yytnamerr
1790/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1791 quotes and backslashes, so that it's suitable for yyerror. The
1792 heuristic is that double-quoting is unnecessary unless the string
1793 contains an apostrophe, a comma, or backslash (other than
1794 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1795 null, do not copy; instead, return the length of what the result
1796 would have been. */
1797static YYSIZE_T
1798yytnamerr (char *yyres, const char *yystr)
Lev Walkin418298d2006-07-13 08:24:20 +00001799{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001800 if (*yystr == '"')
Lev Walkin418298d2006-07-13 08:24:20 +00001801 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07001802 YYSIZE_T yyn = 0;
1803 char const *yyp = yystr;
Lev Walkin418298d2006-07-13 08:24:20 +00001804
Lev Walkin0e90aa02013-03-19 16:17:13 -07001805 for (;;)
1806 switch (*++yyp)
1807 {
1808 case '\'':
1809 case ',':
1810 goto do_not_strip_quotes;
1811
1812 case '\\':
1813 if (*++yyp != '\\')
1814 goto do_not_strip_quotes;
1815 /* Fall through. */
1816 default:
1817 if (yyres)
1818 yyres[yyn] = *yyp;
1819 yyn++;
1820 break;
1821
1822 case '"':
1823 if (yyres)
1824 yyres[yyn] = '\0';
1825 return yyn;
1826 }
1827 do_not_strip_quotes: ;
Lev Walkin418298d2006-07-13 08:24:20 +00001828 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001829
1830 if (! yyres)
1831 return yystrlen (yystr);
1832
1833 return yystpcpy (yyres, yystr) - yyres;
Lev Walkin418298d2006-07-13 08:24:20 +00001834}
Lev Walkin0e90aa02013-03-19 16:17:13 -07001835# endif
Lev Walkin418298d2006-07-13 08:24:20 +00001836
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001837/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1838 about the unexpected token YYTOKEN for the state stack whose top is
1839 YYSSP.
1840
1841 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1842 not large enough to hold the message. In that case, also set
1843 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1844 required number of bytes is too large to store. */
1845static int
1846yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1847 yytype_int16 *yyssp, int yytoken)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001848{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001849 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1850 YYSIZE_T yysize = yysize0;
1851 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1852 /* Internationalized format string. */
1853 const char *yyformat = YY_NULL;
1854 /* Arguments of yyformat. */
1855 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1856 /* Number of reported tokens (one for the "unexpected", one per
1857 "expected"). */
1858 int yycount = 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001859
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001860 /* There are many possibilities here to consider:
1861 - Assume YYFAIL is not used. It's too flawed to consider. See
1862 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1863 for details. YYERROR is fine as it does not invoke this
1864 function.
1865 - If this state is a consistent state with a default action, then
1866 the only way this function was invoked is if the default action
1867 is an error action. In that case, don't check for expected
1868 tokens because there are none.
1869 - The only way there can be no lookahead present (in yychar) is if
1870 this state is a consistent state with a default action. Thus,
1871 detecting the absence of a lookahead is sufficient to determine
1872 that there is no unexpected or expected token to report. In that
1873 case, just report a simple "syntax error".
1874 - Don't assume there isn't a lookahead just because this state is a
1875 consistent state with a default action. There might have been a
1876 previous inconsistent state, consistent state with a non-default
1877 action, or user semantic action that manipulated yychar.
1878 - Of course, the expected token list depends on states to have
1879 correct lookahead information, and it depends on the parser not
1880 to perform extra reductions after fetching a lookahead from the
1881 scanner and before detecting a syntax error. Thus, state merging
1882 (from LALR or IELR) and default reductions corrupt the expected
1883 token list. However, the list is correct for canonical LR with
1884 one exception: it will still contain any token that will not be
1885 accepted due to an error action in a later state.
1886 */
1887 if (yytoken != YYEMPTY)
Lev Walkin0e90aa02013-03-19 16:17:13 -07001888 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001889 int yyn = yypact[*yyssp];
1890 yyarg[yycount++] = yytname[yytoken];
1891 if (!yypact_value_is_default (yyn))
1892 {
1893 /* Start YYX at -YYN if negative to avoid negative indexes in
1894 YYCHECK. In other words, skip the first -YYN actions for
1895 this state because they are default actions. */
1896 int yyxbegin = yyn < 0 ? -yyn : 0;
1897 /* Stay within bounds of both yycheck and yytname. */
1898 int yychecklim = YYLAST - yyn + 1;
1899 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1900 int yyx;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001901
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001902 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1903 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1904 && !yytable_value_is_error (yytable[yyx + yyn]))
1905 {
1906 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1907 {
1908 yycount = 1;
1909 yysize = yysize0;
1910 break;
1911 }
1912 yyarg[yycount++] = yytname[yyx];
1913 {
1914 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1915 if (! (yysize <= yysize1
1916 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1917 return 2;
1918 yysize = yysize1;
1919 }
1920 }
1921 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07001922 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08001923
1924 switch (yycount)
1925 {
1926# define YYCASE_(N, S) \
1927 case N: \
1928 yyformat = S; \
1929 break
1930 YYCASE_(0, YY_("syntax error"));
1931 YYCASE_(1, YY_("syntax error, unexpected %s"));
1932 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1933 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1934 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1935 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1936# undef YYCASE_
1937 }
1938
1939 {
1940 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1941 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1942 return 2;
1943 yysize = yysize1;
1944 }
1945
1946 if (*yymsg_alloc < yysize)
1947 {
1948 *yymsg_alloc = 2 * yysize;
1949 if (! (yysize <= *yymsg_alloc
1950 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1951 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1952 return 1;
1953 }
1954
1955 /* Avoid sprintf, as that infringes on the user's name space.
1956 Don't have undefined behavior even if the translation
1957 produced a string with the wrong number of "%s"s. */
1958 {
1959 char *yyp = *yymsg;
1960 int yyi = 0;
1961 while ((*yyp = *yyformat) != '\0')
1962 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1963 {
1964 yyp += yytnamerr (yyp, yyarg[yyi++]);
1965 yyformat += 2;
1966 }
1967 else
1968 {
1969 yyp++;
1970 yyformat++;
1971 }
1972 }
1973 return 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001974}
1975#endif /* YYERROR_VERBOSE */
Lev Walkin418298d2006-07-13 08:24:20 +00001976
1977/*-----------------------------------------------.
1978| Release the memory associated to this symbol. |
1979`-----------------------------------------------*/
1980
Lev Walkin0e90aa02013-03-19 16:17:13 -07001981/*ARGSUSED*/
1982#if (defined __STDC__ || defined __C99__FUNC__ \
1983 || defined __cplusplus || defined _MSC_VER)
Lev Walkin418298d2006-07-13 08:24:20 +00001984static void
Lev Walkin0e90aa02013-03-19 16:17:13 -07001985yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Lev Walkin418298d2006-07-13 08:24:20 +00001986#else
Lev Walkin0e90aa02013-03-19 16:17:13 -07001987static void
1988yydestruct (yymsg, yytype, yyvaluep)
1989 const char *yymsg;
Lev Walkin418298d2006-07-13 08:24:20 +00001990 int yytype;
Lev Walkin0e90aa02013-03-19 16:17:13 -07001991 YYSTYPE *yyvaluep;
Lev Walkin418298d2006-07-13 08:24:20 +00001992#endif
1993{
Lev Walkin0e90aa02013-03-19 16:17:13 -07001994 YYUSE (yyvaluep);
1995
1996 if (!yymsg)
1997 yymsg = "Deleting";
1998 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
Lev Walkin418298d2006-07-13 08:24:20 +00001999
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002000 YYUSE (yytype);
Lev Walkina00d6b32006-03-21 03:40:38 +00002001}
Lev Walkin418298d2006-07-13 08:24:20 +00002002
2003
Lev Walkin0e90aa02013-03-19 16:17:13 -07002004
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002005
2006/* The lookahead symbol. */
Lev Walkin418298d2006-07-13 08:24:20 +00002007int yychar;
2008
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002009
2010#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2011# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2012# define YY_IGNORE_MAYBE_UNINITIALIZED_END
2013#endif
2014#ifndef YY_INITIAL_VALUE
2015# define YY_INITIAL_VALUE(Value) /* Nothing. */
2016#endif
2017
2018/* The semantic value of the lookahead symbol. */
2019YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
Lev Walkin418298d2006-07-13 08:24:20 +00002020
Lev Walkin0e90aa02013-03-19 16:17:13 -07002021/* Number of syntax errors so far. */
Lev Walkin418298d2006-07-13 08:24:20 +00002022int yynerrs;
2023
Lev Walkinfb872bd2006-03-18 06:53:11 +00002024
Lev Walkin0e90aa02013-03-19 16:17:13 -07002025/*----------.
2026| yyparse. |
2027`----------*/
2028
2029#ifdef YYPARSE_PARAM
2030#if (defined __STDC__ || defined __C99__FUNC__ \
2031 || defined __cplusplus || defined _MSC_VER)
Lev Walkinfb872bd2006-03-18 06:53:11 +00002032int
Lev Walkin0e90aa02013-03-19 16:17:13 -07002033yyparse (void *YYPARSE_PARAM)
2034#else
2035int
2036yyparse (YYPARSE_PARAM)
2037 void *YYPARSE_PARAM;
2038#endif
2039#else /* ! YYPARSE_PARAM */
2040#if (defined __STDC__ || defined __C99__FUNC__ \
2041 || defined __cplusplus || defined _MSC_VER)
2042int
2043yyparse (void)
2044#else
2045int
2046yyparse ()
2047
2048#endif
2049#endif
Lev Walkinfb872bd2006-03-18 06:53:11 +00002050{
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002051 int yystate;
2052 /* Number of tokens to shift before error messages enabled. */
2053 int yyerrstatus;
2054
2055 /* The stacks and their tools:
2056 `yyss': related to states.
2057 `yyvs': related to semantic values.
2058
2059 Refer to the stacks through separate pointers, to allow yyoverflow
2060 to reallocate them elsewhere. */
2061
2062 /* The state stack. */
2063 yytype_int16 yyssa[YYINITDEPTH];
2064 yytype_int16 *yyss;
2065 yytype_int16 *yyssp;
2066
2067 /* The semantic value stack. */
2068 YYSTYPE yyvsa[YYINITDEPTH];
2069 YYSTYPE *yyvs;
2070 YYSTYPE *yyvsp;
2071
2072 YYSIZE_T yystacksize;
2073
Lev Walkin0e90aa02013-03-19 16:17:13 -07002074 int yyn;
Lev Walkin418298d2006-07-13 08:24:20 +00002075 int yyresult;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002076 /* Lookahead token as an internal (translated) token number. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002077 int yytoken = 0;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002078 /* The variables used to return semantic value and location from the
2079 action routines. */
2080 YYSTYPE yyval;
2081
Lev Walkin0e90aa02013-03-19 16:17:13 -07002082#if YYERROR_VERBOSE
2083 /* Buffer for error messages, and its allocated size. */
2084 char yymsgbuf[128];
2085 char *yymsg = yymsgbuf;
2086 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2087#endif
Lev Walkin418298d2006-07-13 08:24:20 +00002088
Lev Walkin0e90aa02013-03-19 16:17:13 -07002089#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
Lev Walkinf15320b2004-06-03 03:38:44 +00002090
Lev Walkin0e90aa02013-03-19 16:17:13 -07002091 /* The number of symbols on the RHS of the reduced rule.
2092 Keep to zero when no symbol should be popped. */
2093 int yylen = 0;
Lev Walkinf15320b2004-06-03 03:38:44 +00002094
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002095 yyssp = yyss = yyssa;
2096 yyvsp = yyvs = yyvsa;
2097 yystacksize = YYINITDEPTH;
2098
Lev Walkin418298d2006-07-13 08:24:20 +00002099 YYDPRINTF ((stderr, "Starting parse\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002100
2101 yystate = 0;
2102 yyerrstatus = 0;
2103 yynerrs = 0;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002104 yychar = YYEMPTY; /* Cause a token to be read. */
Lev Walkin418298d2006-07-13 08:24:20 +00002105 goto yysetstate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002106
Lev Walkin418298d2006-07-13 08:24:20 +00002107/*------------------------------------------------------------.
2108| yynewstate -- Push a new state, which is found in yystate. |
2109`------------------------------------------------------------*/
2110 yynewstate:
2111 /* In all cases, when you get here, the value and location stacks
Lev Walkin0e90aa02013-03-19 16:17:13 -07002112 have just been pushed. So pushing a state here evens the stacks. */
Lev Walkin418298d2006-07-13 08:24:20 +00002113 yyssp++;
2114
2115 yysetstate:
2116 *yyssp = yystate;
Lev Walkinf15320b2004-06-03 03:38:44 +00002117
Lev Walkin0e90aa02013-03-19 16:17:13 -07002118 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002119 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002120 /* Get the current used size of the three stacks, in elements. */
Lev Walkin418298d2006-07-13 08:24:20 +00002121 YYSIZE_T yysize = yyssp - yyss + 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002122
2123#ifdef yyoverflow
Lev Walkin418298d2006-07-13 08:24:20 +00002124 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002125 /* Give user a chance to reallocate the stack. Use copies of
Lev Walkin418298d2006-07-13 08:24:20 +00002126 these so that the &'s don't force the real ones into
2127 memory. */
2128 YYSTYPE *yyvs1 = yyvs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002129 yytype_int16 *yyss1 = yyss;
Lev Walkinf15320b2004-06-03 03:38:44 +00002130
Lev Walkin418298d2006-07-13 08:24:20 +00002131 /* Each stack pointer address is followed by the size of the
2132 data in use in that stack, in bytes. This used to be a
2133 conditional around just the two extra args, but that might
2134 be undefined if yyoverflow is a macro. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002135 yyoverflow (YY_("memory exhausted"),
Lev Walkin418298d2006-07-13 08:24:20 +00002136 &yyss1, yysize * sizeof (*yyssp),
2137 &yyvs1, yysize * sizeof (*yyvsp),
Lev Walkin418298d2006-07-13 08:24:20 +00002138 &yystacksize);
2139
2140 yyss = yyss1;
2141 yyvs = yyvs1;
2142 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002143#else /* no yyoverflow */
Lev Walkin418298d2006-07-13 08:24:20 +00002144# ifndef YYSTACK_RELOCATE
Lev Walkin0e90aa02013-03-19 16:17:13 -07002145 goto yyexhaustedlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002146# else
Lev Walkinf15320b2004-06-03 03:38:44 +00002147 /* Extend the stack our own way. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002148 if (YYMAXDEPTH <= yystacksize)
2149 goto yyexhaustedlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002150 yystacksize *= 2;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002151 if (YYMAXDEPTH < yystacksize)
Lev Walkinf15320b2004-06-03 03:38:44 +00002152 yystacksize = YYMAXDEPTH;
Lev Walkin418298d2006-07-13 08:24:20 +00002153
2154 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002155 yytype_int16 *yyss1 = yyss;
Lev Walkin418298d2006-07-13 08:24:20 +00002156 union yyalloc *yyptr =
2157 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2158 if (! yyptr)
Lev Walkin0e90aa02013-03-19 16:17:13 -07002159 goto yyexhaustedlab;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002160 YYSTACK_RELOCATE (yyss_alloc, yyss);
2161 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Lev Walkin418298d2006-07-13 08:24:20 +00002162# undef YYSTACK_RELOCATE
2163 if (yyss1 != yyssa)
2164 YYSTACK_FREE (yyss1);
2165 }
2166# endif
Lev Walkinf15320b2004-06-03 03:38:44 +00002167#endif /* no yyoverflow */
2168
Lev Walkin418298d2006-07-13 08:24:20 +00002169 yyssp = yyss + yysize - 1;
2170 yyvsp = yyvs + yysize - 1;
Lev Walkinf15320b2004-06-03 03:38:44 +00002171
Lev Walkin418298d2006-07-13 08:24:20 +00002172 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2173 (unsigned long int) yystacksize));
Lev Walkinf15320b2004-06-03 03:38:44 +00002174
Lev Walkin0e90aa02013-03-19 16:17:13 -07002175 if (yyss + yystacksize - 1 <= yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00002176 YYABORT;
2177 }
2178
Lev Walkin418298d2006-07-13 08:24:20 +00002179 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Lev Walkinf15320b2004-06-03 03:38:44 +00002180
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002181 if (yystate == YYFINAL)
2182 YYACCEPT;
2183
Lev Walkinf15320b2004-06-03 03:38:44 +00002184 goto yybackup;
Lev Walkin418298d2006-07-13 08:24:20 +00002185
2186/*-----------.
2187| yybackup. |
2188`-----------*/
2189yybackup:
Lev Walkinf15320b2004-06-03 03:38:44 +00002190
Lev Walkin0e90aa02013-03-19 16:17:13 -07002191 /* Do appropriate processing given the current state. Read a
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002192 lookahead token if we need one and don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002193
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002194 /* First try to decide what to do without reference to lookahead token. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002195 yyn = yypact[yystate];
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002196 if (yypact_value_is_default (yyn))
Lev Walkinf15320b2004-06-03 03:38:44 +00002197 goto yydefault;
2198
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002199 /* Not known => get a lookahead token if don't already have one. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002200
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002201 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002202 if (yychar == YYEMPTY)
2203 {
Lev Walkin418298d2006-07-13 08:24:20 +00002204 YYDPRINTF ((stderr, "Reading a token: "));
Lev Walkinf15320b2004-06-03 03:38:44 +00002205 yychar = YYLEX;
2206 }
2207
Lev Walkin0e90aa02013-03-19 16:17:13 -07002208 if (yychar <= YYEOF)
Lev Walkinf15320b2004-06-03 03:38:44 +00002209 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002210 yychar = yytoken = YYEOF;
Lev Walkin418298d2006-07-13 08:24:20 +00002211 YYDPRINTF ((stderr, "Now at end of input.\n"));
Lev Walkinf15320b2004-06-03 03:38:44 +00002212 }
2213 else
2214 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002215 yytoken = YYTRANSLATE (yychar);
2216 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Lev Walkinf15320b2004-06-03 03:38:44 +00002217 }
2218
Lev Walkin0e90aa02013-03-19 16:17:13 -07002219 /* If the proper action on seeing token YYTOKEN is to reduce or to
Lev Walkin418298d2006-07-13 08:24:20 +00002220 detect an error, take that action. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002221 yyn += yytoken;
2222 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Lev Walkinf15320b2004-06-03 03:38:44 +00002223 goto yydefault;
Lev Walkinf15320b2004-06-03 03:38:44 +00002224 yyn = yytable[yyn];
Lev Walkin418298d2006-07-13 08:24:20 +00002225 if (yyn <= 0)
Lev Walkinf15320b2004-06-03 03:38:44 +00002226 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002227 if (yytable_value_is_error (yyn))
2228 goto yyerrlab;
Lev Walkinf15320b2004-06-03 03:38:44 +00002229 yyn = -yyn;
2230 goto yyreduce;
2231 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002232
Lev Walkin418298d2006-07-13 08:24:20 +00002233 /* Count tokens shifted since error; after three, turn off error
2234 status. */
2235 if (yyerrstatus)
2236 yyerrstatus--;
Lev Walkinf15320b2004-06-03 03:38:44 +00002237
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002238 /* Shift the lookahead token. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002239 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2240
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002241 /* Discard the shifted token. */
2242 yychar = YYEMPTY;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002243
Lev Walkinf15320b2004-06-03 03:38:44 +00002244 yystate = yyn;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002245 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Lev Walkin0e90aa02013-03-19 16:17:13 -07002246 *++yyvsp = yylval;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002247 YY_IGNORE_MAYBE_UNINITIALIZED_END
Lev Walkin0e90aa02013-03-19 16:17:13 -07002248
Lev Walkinf15320b2004-06-03 03:38:44 +00002249 goto yynewstate;
2250
Lev Walkina00d6b32006-03-21 03:40:38 +00002251
Lev Walkin418298d2006-07-13 08:24:20 +00002252/*-----------------------------------------------------------.
2253| yydefault -- do the default action for the current state. |
2254`-----------------------------------------------------------*/
2255yydefault:
Lev Walkinf15320b2004-06-03 03:38:44 +00002256 yyn = yydefact[yystate];
2257 if (yyn == 0)
2258 goto yyerrlab;
Lev Walkin418298d2006-07-13 08:24:20 +00002259 goto yyreduce;
Lev Walkinf15320b2004-06-03 03:38:44 +00002260
Lev Walkin418298d2006-07-13 08:24:20 +00002261
2262/*-----------------------------.
2263| yyreduce -- Do a reduction. |
2264`-----------------------------*/
Lev Walkinf15320b2004-06-03 03:38:44 +00002265yyreduce:
Lev Walkin418298d2006-07-13 08:24:20 +00002266 /* yyn is the number of a rule to reduce with. */
Lev Walkinf15320b2004-06-03 03:38:44 +00002267 yylen = yyr2[yyn];
Lev Walkinf15320b2004-06-03 03:38:44 +00002268
Lev Walkin418298d2006-07-13 08:24:20 +00002269 /* If YYLEN is nonzero, implement the default value of the action:
2270 `$$ = $1'.
2271
2272 Otherwise, the following line sets YYVAL to garbage.
2273 This behavior is undocumented and Bison
2274 users should not rely upon it. Assigning to YYVAL
2275 unconditionally makes the parser a bit smaller, and it avoids a
2276 GCC warning that YYVAL may be used uninitialized. */
2277 yyval = yyvsp[1-yylen];
2278
2279
Lev Walkin0e90aa02013-03-19 16:17:13 -07002280 YY_REDUCE_PRINT (yyn);
Lev Walkin418298d2006-07-13 08:24:20 +00002281 switch (yyn)
2282 {
2283 case 2:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002284/* Line 1787 of yacc.c */
2285#line 358 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002286 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002287 *(void **)param = (yyvsp[(1) - (1)].a_grammar);
Lev Walkin418298d2006-07-13 08:24:20 +00002288 }
2289 break;
2290
2291 case 3:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002292/* Line 1787 of yacc.c */
2293#line 364 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002294 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002295 (yyval.a_grammar) = asn1p_new();
2296 checkmem((yyval.a_grammar));
2297 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(1) - (1)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002298 }
2299 break;
2300
2301 case 4:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002302/* Line 1787 of yacc.c */
2303#line 369 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002304 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002305 (yyval.a_grammar) = (yyvsp[(1) - (2)].a_grammar);
2306 TQ_ADD(&((yyval.a_grammar)->modules), (yyvsp[(2) - (2)].a_module), mod_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002307 }
2308 break;
2309
2310 case 5:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002311/* Line 1787 of yacc.c */
2312#line 386 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002313 { currentModule = asn1p_module_new(); }
2314 break;
2315
2316 case 6:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002317/* Line 1787 of yacc.c */
2318#line 391 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002319 {
Lev Walkinfb872bd2006-03-18 06:53:11 +00002320
Lev Walkin0e90aa02013-03-19 16:17:13 -07002321 (yyval.a_module) = currentModule;
Lev Walkina9532f42006-09-17 04:52:50 +00002322
Lev Walkin0e90aa02013-03-19 16:17:13 -07002323 if((yyvsp[(8) - (9)].a_module)) {
2324 asn1p_module_t tmp = *((yyval.a_module));
2325 *((yyval.a_module)) = *((yyvsp[(8) - (9)].a_module));
2326 *((yyvsp[(8) - (9)].a_module)) = tmp;
2327 asn1p_module_free((yyvsp[(8) - (9)].a_module));
Lev Walkinf15320b2004-06-03 03:38:44 +00002328 } else {
2329 /* There's a chance that a module is just plain empty */
Lev Walkinf15320b2004-06-03 03:38:44 +00002330 }
Lev Walkinf15320b2004-06-03 03:38:44 +00002331
Lev Walkin0e90aa02013-03-19 16:17:13 -07002332 (yyval.a_module)->ModuleName = (yyvsp[(1) - (9)].tv_str);
2333 (yyval.a_module)->module_oid = (yyvsp[(3) - (9)].a_oid);
2334 (yyval.a_module)->module_flags = (yyvsp[(5) - (9)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002335 }
2336 break;
2337
Lev Walkina9532f42006-09-17 04:52:50 +00002338 case 7:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002339/* Line 1787 of yacc.c */
2340#line 415 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002341 { (yyval.a_oid) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002342 break;
2343
Lev Walkina9532f42006-09-17 04:52:50 +00002344 case 8:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002345/* Line 1787 of yacc.c */
2346#line 416 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002347 { (yyval.a_oid) = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002348 break;
2349
Lev Walkina9532f42006-09-17 04:52:50 +00002350 case 9:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002351/* Line 1787 of yacc.c */
2352#line 420 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002353 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002354 (yyval.a_oid) = (yyvsp[(2) - (3)].a_oid);
Lev Walkin418298d2006-07-13 08:24:20 +00002355 }
2356 break;
2357
Lev Walkina9532f42006-09-17 04:52:50 +00002358 case 10:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002359/* Line 1787 of yacc.c */
2360#line 423 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002361 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002362 (yyval.a_oid) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002363 }
2364 break;
2365
Lev Walkina9532f42006-09-17 04:52:50 +00002366 case 11:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002367/* Line 1787 of yacc.c */
2368#line 429 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002369 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002370 (yyval.a_oid) = asn1p_oid_new();
2371 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002372 if((yyvsp[(1) - (1)].a_oid_arc).name)
2373 free((yyvsp[(1) - (1)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002374 }
2375 break;
2376
Lev Walkina9532f42006-09-17 04:52:50 +00002377 case 12:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002378/* Line 1787 of yacc.c */
2379#line 435 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002380 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002381 (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid);
2382 asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc));
Lev Walkina964e032017-03-26 03:48:06 -07002383 if((yyvsp[(2) - (2)].a_oid_arc).name)
2384 free((yyvsp[(2) - (2)].a_oid_arc).name);
Lev Walkin418298d2006-07-13 08:24:20 +00002385 }
2386 break;
2387
Lev Walkina9532f42006-09-17 04:52:50 +00002388 case 13:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002389/* Line 1787 of yacc.c */
2390#line 444 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002391 { /* iso */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002392 (yyval.a_oid_arc).name = (yyvsp[(1) - (1)].tv_str);
2393 (yyval.a_oid_arc).number = -1;
Lev Walkin418298d2006-07-13 08:24:20 +00002394 }
2395 break;
2396
Lev Walkina9532f42006-09-17 04:52:50 +00002397 case 14:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002398/* Line 1787 of yacc.c */
2399#line 448 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002400 { /* iso(1) */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002401 (yyval.a_oid_arc).name = (yyvsp[(1) - (4)].tv_str);
2402 (yyval.a_oid_arc).number = (yyvsp[(3) - (4)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002403 }
2404 break;
2405
Lev Walkina9532f42006-09-17 04:52:50 +00002406 case 15:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002407/* Line 1787 of yacc.c */
2408#line 452 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002409 { /* 1 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002410 (yyval.a_oid_arc).name = 0;
2411 (yyval.a_oid_arc).number = (yyvsp[(1) - (1)].a_int);
Lev Walkin418298d2006-07-13 08:24:20 +00002412 }
2413 break;
2414
Lev Walkina9532f42006-09-17 04:52:50 +00002415 case 16:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002416/* Line 1787 of yacc.c */
2417#line 462 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002418 { (yyval.a_module_flags) = MSF_NOFLAGS; }
Lev Walkin418298d2006-07-13 08:24:20 +00002419 break;
2420
Lev Walkin418298d2006-07-13 08:24:20 +00002421 case 17:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002422/* Line 1787 of yacc.c */
2423#line 463 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002424 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002425 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002426 }
2427 break;
2428
2429 case 18:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002430/* Line 1787 of yacc.c */
2431#line 472 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002432 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002433 (yyval.a_module_flags) = (yyvsp[(1) - (1)].a_module_flags);
Lev Walkina9532f42006-09-17 04:52:50 +00002434 }
2435 break;
2436
2437 case 19:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002438/* Line 1787 of yacc.c */
2439#line 475 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002440 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002441 (yyval.a_module_flags) = (yyvsp[(1) - (2)].a_module_flags) | (yyvsp[(2) - (2)].a_module_flags);
Lev Walkin418298d2006-07-13 08:24:20 +00002442 }
2443 break;
2444
Lev Walkina9532f42006-09-17 04:52:50 +00002445 case 20:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002446/* Line 1787 of yacc.c */
2447#line 484 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002448 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002449 (yyval.a_module_flags) = MSF_EXPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002450 }
2451 break;
2452
Lev Walkina9532f42006-09-17 04:52:50 +00002453 case 21:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002454/* Line 1787 of yacc.c */
2455#line 487 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002456 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002457 (yyval.a_module_flags) = MSF_IMPLICIT_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002458 }
2459 break;
2460
Lev Walkina9532f42006-09-17 04:52:50 +00002461 case 22:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002462/* Line 1787 of yacc.c */
2463#line 490 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002464 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002465 (yyval.a_module_flags) = MSF_AUTOMATIC_TAGS;
Lev Walkin418298d2006-07-13 08:24:20 +00002466 }
2467 break;
2468
Lev Walkina9532f42006-09-17 04:52:50 +00002469 case 23:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002470/* Line 1787 of yacc.c */
2471#line 493 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002472 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002473 (yyval.a_module_flags) = MSF_EXTENSIBILITY_IMPLIED;
Lev Walkin418298d2006-07-13 08:24:20 +00002474 }
2475 break;
2476
Lev Walkina9532f42006-09-17 04:52:50 +00002477 case 24:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002478/* Line 1787 of yacc.c */
2479#line 497 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002480 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002481 /* X.680Amd1 specifies TAG and XER */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002482 if(strcmp((yyvsp[(1) - (2)].tv_str), "TAG") == 0) {
2483 (yyval.a_module_flags) = MSF_TAG_INSTRUCTIONS;
2484 } else if(strcmp((yyvsp[(1) - (2)].tv_str), "XER") == 0) {
2485 (yyval.a_module_flags) = MSF_XER_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002486 } else {
2487 fprintf(stderr,
2488 "WARNING: %s INSTRUCTIONS at line %d: "
2489 "Unrecognized encoding reference\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07002490 (yyvsp[(1) - (2)].tv_str), yylineno);
2491 (yyval.a_module_flags) = MSF_unk_INSTRUCTIONS;
Lev Walkinf59d0752004-08-18 04:59:12 +00002492 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002493 free((yyvsp[(1) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00002494 }
2495 break;
2496
Lev Walkina9532f42006-09-17 04:52:50 +00002497 case 25:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002498/* Line 1787 of yacc.c */
2499#line 518 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002500 { (yyval.a_module) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00002501 break;
2502
Lev Walkina9532f42006-09-17 04:52:50 +00002503 case 26:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002504/* Line 1787 of yacc.c */
2505#line 519 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002506 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002507 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002508 }
2509 break;
2510
Lev Walkina9532f42006-09-17 04:52:50 +00002511 case 27:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002512/* Line 1787 of yacc.c */
2513#line 528 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002514 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002515 (yyval.a_module) = asn1p_module_new();
2516 AL_IMPORT((yyval.a_module), exports, (yyvsp[(1) - (3)].a_module), xp_next);
2517 AL_IMPORT((yyval.a_module), imports, (yyvsp[(2) - (3)].a_module), xp_next);
2518 AL_IMPORT((yyval.a_module), members, (yyvsp[(3) - (3)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002519
2520 asn1p_module_free((yyvsp[(1) - (3)].a_module));
2521 asn1p_module_free((yyvsp[(2) - (3)].a_module));
2522 asn1p_module_free((yyvsp[(3) - (3)].a_module));
Lev Walkin418298d2006-07-13 08:24:20 +00002523 }
2524 break;
2525
Lev Walkina9532f42006-09-17 04:52:50 +00002526 case 28:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002527/* Line 1787 of yacc.c */
2528#line 541 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002529 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002530 (yyval.a_module) = (yyvsp[(1) - (1)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002531 }
2532 break;
2533
Lev Walkina9532f42006-09-17 04:52:50 +00002534 case 29:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002535/* Line 1787 of yacc.c */
2536#line 544 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002537 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002538 if((yyvsp[(1) - (2)].a_module)) {
2539 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002540 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002541 (yyval.a_module) = (yyvsp[(2) - (2)].a_module);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002542 break;
2543 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07002544 AL_IMPORT((yyval.a_module), members, (yyvsp[(2) - (2)].a_module), next);
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08002545 asn1p_module_free((yyvsp[(2) - (2)].a_module));
Lev Walkin866bd7f2006-09-14 10:35:20 +00002546 }
2547 break;
2548
Lev Walkin418298d2006-07-13 08:24:20 +00002549 case 30:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002550/* Line 1787 of yacc.c */
2551#line 561 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002552 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002553 (yyval.a_module) = asn1p_module_new();
2554 checkmem((yyval.a_module));
2555 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2556 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2557 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002558 }
2559 break;
2560
2561 case 31:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002562/* Line 1787 of yacc.c */
2563#line 568 "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 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2568 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2569 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002570 }
2571 break;
2572
2573 case 32:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002574/* Line 1787 of yacc.c */
2575#line 581 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002576 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002577 (yyval.a_module) = asn1p_module_new();
2578 checkmem((yyval.a_module));
2579 assert((yyvsp[(1) - (1)].a_expr)->expr_type != A1TC_INVALID);
2580 assert((yyvsp[(1) - (1)].a_expr)->meta_type != AMT_INVALID);
2581 TQ_ADD(&((yyval.a_module)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkina9532f42006-09-17 04:52:50 +00002582 }
Lev Walkin418298d2006-07-13 08:24:20 +00002583 break;
2584
Lev Walkin866bd7f2006-09-14 10:35:20 +00002585 case 33:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002586/* Line 1787 of yacc.c */
2587#line 589 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00002588 { asn1p_lexer_hack_push_encoding_control(); }
2589 break;
2590
2591 case 34:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002592/* Line 1787 of yacc.c */
2593#line 590 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002594 {
Lev Walkinf59d0752004-08-18 04:59:12 +00002595 fprintf(stderr,
2596 "WARNING: ENCODING-CONTROL %s "
2597 "specification at line %d ignored\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07002598 (yyvsp[(2) - (3)].tv_str), yylineno);
2599 free((yyvsp[(2) - (3)].tv_str));
2600 (yyval.a_module) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002601 }
2602 break;
2603
Lev Walkina9532f42006-09-17 04:52:50 +00002604 case 35:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002605/* Line 1787 of yacc.c */
2606#line 602 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002607 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002608 return yyerror(
Lev Walkin70853052005-11-26 11:21:55 +00002609 "Attempt to redefine a standard basic string type, "
2610 "please comment out or remove this type redefinition.");
Lev Walkin418298d2006-07-13 08:24:20 +00002611 }
2612 break;
2613
Lev Walkina9532f42006-09-17 04:52:50 +00002614 case 36:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002615/* Line 1787 of yacc.c */
2616#line 615 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002617 { (yyval.a_module) = 0; }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002618 break;
2619
Lev Walkina9532f42006-09-17 04:52:50 +00002620 case 38:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002621/* Line 1787 of yacc.c */
2622#line 619 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002623 {
Lev Walkinb36317c2005-08-12 10:09:10 +00002624 if(!saved_aid && 0)
2625 return yyerror("Unterminated IMPORTS FROM, "
2626 "expected semicolon ';'");
2627 saved_aid = 0;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002628 (yyval.a_module) = (yyvsp[(2) - (3)].a_module);
Lev Walkin418298d2006-07-13 08:24:20 +00002629 }
2630 break;
2631
Lev Walkina9532f42006-09-17 04:52:50 +00002632 case 39:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002633/* Line 1787 of yacc.c */
2634#line 629 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002635 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002636 return yyerror("Empty IMPORTS list");
Lev Walkin418298d2006-07-13 08:24:20 +00002637 }
2638 break;
2639
Lev Walkina9532f42006-09-17 04:52:50 +00002640 case 40:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002641/* Line 1787 of yacc.c */
2642#line 635 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002643 { (yyval.a_module) = asn1p_module_new(); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002644 break;
2645
2646 case 42:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002647/* Line 1787 of yacc.c */
2648#line 639 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002649 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002650 (yyval.a_module) = asn1p_module_new();
2651 checkmem((yyval.a_module));
2652 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002653 }
2654 break;
2655
Lev Walkin4a4543f2006-10-13 12:37:39 +00002656 case 43:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002657/* Line 1787 of yacc.c */
2658#line 644 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002659 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002660 (yyval.a_module) = (yyvsp[(1) - (2)].a_module);
2661 TQ_ADD(&((yyval.a_module)->imports), (yyvsp[(2) - (2)].a_xports), xp_next);
Lev Walkin418298d2006-07-13 08:24:20 +00002662 }
2663 break;
2664
Lev Walkin4a4543f2006-10-13 12:37:39 +00002665 case 44:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002666/* Line 1787 of yacc.c */
2667#line 651 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002668 { memset(&(yyval.a_aid), 0, sizeof((yyval.a_aid))); }
Lev Walkin418298d2006-07-13 08:24:20 +00002669 break;
2670
Lev Walkin4a4543f2006-10-13 12:37:39 +00002671 case 45:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002672/* Line 1787 of yacc.c */
2673#line 652 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002674 { (yyval.a_aid).oid = (yyvsp[(1) - (1)].a_oid); }
Lev Walkin418298d2006-07-13 08:24:20 +00002675 break;
2676
Lev Walkin4a4543f2006-10-13 12:37:39 +00002677 case 46:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002678/* Line 1787 of yacc.c */
2679#line 656 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002680 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002681 (yyval.a_xports) = (yyvsp[(1) - (4)].a_xports);
2682 (yyval.a_xports)->fromModuleName = (yyvsp[(3) - (4)].tv_str);
2683 (yyval.a_xports)->identifier = (yyvsp[(4) - (4)].a_aid);
Lev Walkinb36317c2005-08-12 10:09:10 +00002684 /* This stupid thing is used for look-back hack. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002685 saved_aid = (yyval.a_xports)->identifier.oid ? 0 : &((yyval.a_xports)->identifier);
2686 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002687 }
2688 break;
2689
Lev Walkin4a4543f2006-10-13 12:37:39 +00002690 case 47:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002691/* Line 1787 of yacc.c */
2692#line 667 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002693 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002694 (yyval.a_xports) = asn1p_xports_new();
2695 checkmem((yyval.a_xports));
2696 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002697 }
2698 break;
2699
Lev Walkin4a4543f2006-10-13 12:37:39 +00002700 case 48:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002701/* Line 1787 of yacc.c */
2702#line 672 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002703 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002704 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2705 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002706 }
2707 break;
2708
Lev Walkina9532f42006-09-17 04:52:50 +00002709 case 49:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002710/* Line 1787 of yacc.c */
2711#line 679 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002712 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002713 (yyval.a_expr) = NEW_EXPR();
2714 checkmem((yyval.a_expr));
2715 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2716 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin418298d2006-07-13 08:24:20 +00002717 }
2718 break;
2719
Lev Walkina9532f42006-09-17 04:52:50 +00002720 case 50:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002721/* Line 1787 of yacc.c */
2722#line 685 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002723 { /* Completely equivalent to above */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002724 (yyval.a_expr) = NEW_EXPR();
2725 checkmem((yyval.a_expr));
2726 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2727 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002728 }
Lev Walkin866bd7f2006-09-14 10:35:20 +00002729 break;
2730
Lev Walkina9532f42006-09-17 04:52:50 +00002731 case 51:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002732/* Line 1787 of yacc.c */
2733#line 691 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002734 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002735 (yyval.a_expr) = NEW_EXPR();
2736 checkmem((yyval.a_expr));
2737 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2738 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002739 }
2740 break;
2741
2742 case 52:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002743/* Line 1787 of yacc.c */
2744#line 701 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002745 { (yyval.a_module) = 0; }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002746 break;
2747
2748 case 53:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002749/* Line 1787 of yacc.c */
2750#line 702 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002751 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002752 (yyval.a_module) = asn1p_module_new();
2753 checkmem((yyval.a_module));
2754 if((yyvsp[(1) - (1)].a_xports)) {
2755 TQ_ADD(&((yyval.a_module)->exports), (yyvsp[(1) - (1)].a_xports), xp_next);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002756 } else {
2757 /* "EXPORTS ALL;" */
2758 }
2759 }
2760 break;
2761
Lev Walkin4a4543f2006-10-13 12:37:39 +00002762 case 54:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002763/* Line 1787 of yacc.c */
2764#line 714 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002765 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002766 (yyval.a_xports) = (yyvsp[(2) - (3)].a_xports);
Lev Walkin418298d2006-07-13 08:24:20 +00002767 }
2768 break;
2769
Lev Walkin4a4543f2006-10-13 12:37:39 +00002770 case 55:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002771/* Line 1787 of yacc.c */
2772#line 717 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002773 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002774 (yyval.a_xports) = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00002775 }
2776 break;
2777
Lev Walkin4a4543f2006-10-13 12:37:39 +00002778 case 56:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002779/* Line 1787 of yacc.c */
2780#line 720 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002781 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002782 /* Empty EXPORTS clause effectively prohibits export. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002783 (yyval.a_xports) = asn1p_xports_new();
2784 checkmem((yyval.a_xports));
Lev Walkin418298d2006-07-13 08:24:20 +00002785 }
2786 break;
2787
Lev Walkin4a4543f2006-10-13 12:37:39 +00002788 case 57:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002789/* Line 1787 of yacc.c */
2790#line 728 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002791 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002792 (yyval.a_xports) = asn1p_xports_new();
2793 assert((yyval.a_xports));
2794 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(1) - (1)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002795 }
2796 break;
2797
Lev Walkin4a4543f2006-10-13 12:37:39 +00002798 case 58:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002799/* Line 1787 of yacc.c */
2800#line 733 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002801 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002802 (yyval.a_xports) = (yyvsp[(1) - (3)].a_xports);
2803 TQ_ADD(&((yyval.a_xports)->members), (yyvsp[(3) - (3)].a_expr), next);
Lev Walkin418298d2006-07-13 08:24:20 +00002804 }
2805 break;
2806
Lev Walkina9532f42006-09-17 04:52:50 +00002807 case 59:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002808/* Line 1787 of yacc.c */
2809#line 740 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002810 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002811 (yyval.a_expr) = NEW_EXPR();
2812 checkmem((yyval.a_expr));
2813 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2814 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin418298d2006-07-13 08:24:20 +00002815 }
2816 break;
2817
Lev Walkina9532f42006-09-17 04:52:50 +00002818 case 60:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002819/* Line 1787 of yacc.c */
2820#line 746 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002821 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002822 (yyval.a_expr) = NEW_EXPR();
2823 checkmem((yyval.a_expr));
2824 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2825 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002826 }
Lev Walkin418298d2006-07-13 08:24:20 +00002827 break;
2828
Lev Walkina9532f42006-09-17 04:52:50 +00002829 case 61:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002830/* Line 1787 of yacc.c */
2831#line 752 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002832 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002833 (yyval.a_expr) = NEW_EXPR();
2834 checkmem((yyval.a_expr));
2835 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
2836 (yyval.a_expr)->expr_type = A1TC_EXPORTVAR;
Lev Walkin4a4543f2006-10-13 12:37:39 +00002837 }
2838 break;
2839
2840 case 62:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002841/* Line 1787 of yacc.c */
2842#line 761 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07002843 { (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr); }
Lev Walkin4a4543f2006-10-13 12:37:39 +00002844 break;
2845
2846 case 63:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002847/* Line 1787 of yacc.c */
2848#line 764 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002849 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002850 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
2851 assert((yyval.a_expr)->Identifier == 0);
2852 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
2853 (yyval.a_expr)->meta_type = AMT_VALUESET;
2854 (yyval.a_expr)->constraints = (yyvsp[(4) - (4)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00002855 }
2856 break;
2857
Lev Walkin4a4543f2006-10-13 12:37:39 +00002858 case 64:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002859/* Line 1787 of yacc.c */
2860#line 774 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002861 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002862 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00002863 }
2864 break;
2865
Lev Walkin4a4543f2006-10-13 12:37:39 +00002866 case 65:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002867/* Line 1787 of yacc.c */
2868#line 787 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002869 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002870 (yyval.a_expr) = NEW_EXPR();
2871 checkmem((yyval.a_expr));
2872 (yyval.a_expr)->reference = (yyvsp[(1) - (1)].a_ref);
2873 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2874 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002875 }
2876 break;
2877
Lev Walkin4a4543f2006-10-13 12:37:39 +00002878 case 66:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002879/* Line 1787 of yacc.c */
2880#line 797 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002881 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002882 (yyval.a_expr) = NEW_EXPR();
2883 checkmem((yyval.a_expr));
2884 (yyval.a_expr)->reference = (yyvsp[(1) - (4)].a_ref);
2885 (yyval.a_expr)->rhs_pspecs = (yyvsp[(3) - (4)].a_expr);
2886 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
2887 (yyval.a_expr)->meta_type = AMT_TYPEREF;
Lev Walkin418298d2006-07-13 08:24:20 +00002888 }
2889 break;
2890
Lev Walkin4a4543f2006-10-13 12:37:39 +00002891 case 67:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002892/* Line 1787 of yacc.c */
2893#line 817 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002894 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002895 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2896 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2897 assert((yyval.a_expr)->expr_type);
2898 assert((yyval.a_expr)->meta_type);
Lev Walkin418298d2006-07-13 08:24:20 +00002899 }
2900 break;
2901
Lev Walkin4a4543f2006-10-13 12:37:39 +00002902 case 68:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002903/* Line 1787 of yacc.c */
2904#line 823 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002905 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002906 (yyval.a_expr) = (yyvsp[(3) - (3)].a_expr);
2907 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
2908 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
2909 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00002910 }
2911 break;
2912
Lev Walkina9532f42006-09-17 04:52:50 +00002913 case 69:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002914/* Line 1787 of yacc.c */
Lev Walkin0e90aa02013-03-19 16:17:13 -07002915#line 839 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002916 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002917 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2918 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2919 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002920 }
2921 break;
2922
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002923 case 70:
2924/* Line 1787 of yacc.c */
2925#line 845 "asn1p_y.y"
2926 {
2927 (yyval.a_expr) = (yyvsp[(6) - (6)].a_expr);
2928 (yyval.a_expr)->Identifier = (yyvsp[(1) - (6)].tv_str);
2929 (yyval.a_expr)->lhs_params = (yyvsp[(3) - (6)].a_plist);
2930 }
2931 break;
2932
Lev Walkin4a4543f2006-10-13 12:37:39 +00002933 case 71:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002934/* Line 1787 of yacc.c */
2935#line 853 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002936 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002937 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002938 (yyval.a_plist) = asn1p_paramlist_new(yylineno);
2939 checkmem((yyval.a_plist));
2940 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 +00002941 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002942 asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002943 free((yyvsp[(1) - (1)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002944 }
2945 break;
2946
Lev Walkin4a4543f2006-10-13 12:37:39 +00002947 case 72:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002948/* Line 1787 of yacc.c */
2949#line 862 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002950 {
Lev Walkinf15320b2004-06-03 03:38:44 +00002951 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07002952 (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist);
2953 ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(3) - (3)].a_parg).governor, (yyvsp[(3) - (3)].a_parg).argument);
Lev Walkinf15320b2004-06-03 03:38:44 +00002954 checkmem(ret == 0);
Lev Walkina964e032017-03-26 03:48:06 -07002955 asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor);
Markus Elfringf3d18612016-03-15 08:35:24 +01002956 free((yyvsp[(3) - (3)].a_parg).argument);
Lev Walkin418298d2006-07-13 08:24:20 +00002957 }
2958 break;
2959
Lev Walkin4a4543f2006-10-13 12:37:39 +00002960 case 73:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002961/* Line 1787 of yacc.c */
2962#line 873 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002963 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07002964 (yyval.a_parg).governor = NULL;
2965 (yyval.a_parg).argument = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00002966 }
2967 break;
2968
Lev Walkin866bd7f2006-09-14 10:35:20 +00002969 case 74:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002970/* Line 1787 of yacc.c */
2971#line 877 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00002972 {
2973 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002974 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002975 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin866bd7f2006-09-14 10:35:20 +00002976 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002977 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002978 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin866bd7f2006-09-14 10:35:20 +00002979 }
2980 break;
2981
2982 case 75:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002983/* Line 1787 of yacc.c */
2984#line 885 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00002985 {
2986 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002987 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002988 ret = asn1p_ref_add_component((yyval.a_parg).governor, (yyvsp[(1) - (3)].tv_str), 0);
Lev Walkin4a4543f2006-10-13 12:37:39 +00002989 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07002990 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002991 free((yyvsp[(1) - (3)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00002992 }
2993 break;
2994
2995 case 76:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08002996/* Line 1787 of yacc.c */
2997#line 893 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00002998 {
Lev Walkina9532f42006-09-17 04:52:50 +00002999 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003000 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003001 ret = asn1p_ref_add_component((yyval.a_parg).governor,
3002 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkina9532f42006-09-17 04:52:50 +00003003 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003004 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkina9532f42006-09-17 04:52:50 +00003005 }
3006 break;
3007
Lev Walkin4a4543f2006-10-13 12:37:39 +00003008 case 77:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003009/* Line 1787 of yacc.c */
3010#line 901 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003011 {
3012 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003013 (yyval.a_parg).governor = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003014 ret = asn1p_ref_add_component((yyval.a_parg).governor,
3015 ASN_EXPR_TYPE2STR((yyvsp[(1) - (3)].a_type)), 1);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003016 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003017 (yyval.a_parg).argument = (yyvsp[(3) - (3)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003018 }
3019 break;
3020
3021 case 78:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003022/* Line 1787 of yacc.c */
3023#line 912 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003024 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003025 (yyval.a_expr) = NEW_EXPR();
3026 checkmem((yyval.a_expr));
3027 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003028 }
3029 break;
3030
Lev Walkin4a4543f2006-10-13 12:37:39 +00003031 case 79:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003032/* Line 1787 of yacc.c */
3033#line 917 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003034 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003035 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3036 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003037 }
3038 break;
3039
Lev Walkin4a4543f2006-10-13 12:37:39 +00003040 case 80:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003041/* Line 1787 of yacc.c */
3042#line 924 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003043 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003044 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003045 }
3046 break;
3047
Lev Walkin4a4543f2006-10-13 12:37:39 +00003048 case 81:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003049/* Line 1787 of yacc.c */
3050#line 927 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003051 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003052 (yyval.a_expr) = NEW_EXPR();
3053 checkmem((yyval.a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003054 (yyval.a_expr)->Identifier = strdup("?");
Lev Walkin0e90aa02013-03-19 16:17:13 -07003055 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3056 (yyval.a_expr)->meta_type = AMT_VALUE;
3057 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003058 }
3059 break;
3060
Lev Walkin4a4543f2006-10-13 12:37:39 +00003061 case 82:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003062/* Line 1787 of yacc.c */
3063#line 935 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003064 {
Lev Walkina00d6b32006-03-21 03:40:38 +00003065 asn1p_ref_t *ref;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003066 (yyval.a_expr) = NEW_EXPR();
3067 checkmem((yyval.a_expr));
3068 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
3069 (yyval.a_expr)->expr_type = A1TC_REFERENCE;
3070 (yyval.a_expr)->meta_type = AMT_VALUE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003071 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003072 asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
3073 (yyval.a_expr)->value = asn1p_value_fromref(ref, 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003074 }
3075 break;
3076
Lev Walkin4a4543f2006-10-13 12:37:39 +00003077 case 83:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003078/* Line 1787 of yacc.c */
3079#line 946 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003080 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003081 (yyval.a_expr) = NEW_EXPR();
3082 (yyval.a_expr)->expr_type = A1TC_VALUESET;
3083 (yyval.a_expr)->meta_type = AMT_VALUESET;
3084 (yyval.a_expr)->constraints = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00003085 }
3086 break;
3087
Lev Walkin4a4543f2006-10-13 12:37:39 +00003088 case 84:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003089/* Line 1787 of yacc.c */
3090#line 969 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003091 { (yyval.a_expr) = NEW_EXPR(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003092 break;
3093
Lev Walkin4a4543f2006-10-13 12:37:39 +00003094 case 85:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003095/* Line 1787 of yacc.c */
3096#line 970 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003097 { (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr); }
Lev Walkina9532f42006-09-17 04:52:50 +00003098 break;
3099
Lev Walkin4a4543f2006-10-13 12:37:39 +00003100 case 86:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003101/* Line 1787 of yacc.c */
3102#line 973 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003103 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003104 (yyval.a_expr) = NEW_EXPR();
3105 checkmem((yyval.a_expr));
3106 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003107 }
3108 break;
3109
Lev Walkin4a4543f2006-10-13 12:37:39 +00003110 case 87:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003111/* Line 1787 of yacc.c */
3112#line 978 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003113 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003114 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3115 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003116 }
3117 break;
3118
Lev Walkin4a4543f2006-10-13 12:37:39 +00003119 case 88:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003120/* Line 1787 of yacc.c */
3121#line 982 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003122 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003123 (yyval.a_expr) = (yyvsp[(1) - (5)].a_expr);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003124 asn1p_expr_add_many((yyval.a_expr), (yyvsp[(4) - (5)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003125 asn1p_expr_free((yyvsp[(4) - (5)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003126 }
3127 break;
3128
Lev Walkin4a4543f2006-10-13 12:37:39 +00003129 case 89:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003130/* Line 1787 of yacc.c */
3131#line 990 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003132 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003133 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3134 assert((yyval.a_expr)->Identifier == 0);
3135 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3136 (yyvsp[(3) - (3)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3137 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003138 }
3139 break;
3140
Lev Walkin4a4543f2006-10-13 12:37:39 +00003141 case 90:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003142/* Line 1787 of yacc.c */
3143#line 997 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003144 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003145 (yyval.a_expr) = (yyvsp[(1) - (2)].a_expr);
3146 (yyvsp[(2) - (2)].a_marker).flags |= (yyval.a_expr)->marker.flags;
3147 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
3148 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003149 }
3150 break;
3151
Lev Walkin4a4543f2006-10-13 12:37:39 +00003152 case 91:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003153/* Line 1787 of yacc.c */
3154#line 1003 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003155 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003156 (yyval.a_expr) = NEW_EXPR();
3157 checkmem((yyval.a_expr));
3158 (yyval.a_expr)->meta_type = (yyvsp[(3) - (3)].a_expr)->meta_type;
3159 (yyval.a_expr)->expr_type = A1TC_COMPONENTS_OF;
3160 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003161 }
3162 break;
3163
Lev Walkin4a4543f2006-10-13 12:37:39 +00003164 case 92:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003165/* Line 1787 of yacc.c */
3166#line 1010 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003167 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003168 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003169 }
3170 break;
3171
Lev Walkin4a4543f2006-10-13 12:37:39 +00003172 case 93:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003173/* Line 1787 of yacc.c */
3174#line 1016 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003175 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003176 (yyval.a_expr) = NEW_EXPR();
3177 checkmem((yyval.a_expr));
3178 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003179 }
3180 break;
3181
Lev Walkin4a4543f2006-10-13 12:37:39 +00003182 case 94:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003183/* Line 1787 of yacc.c */
3184#line 1021 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003185 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003186 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3187 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003188 }
3189 break;
3190
Lev Walkin4a4543f2006-10-13 12:37:39 +00003191 case 95:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003192/* Line 1787 of yacc.c */
3193#line 1028 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003194 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003195 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3196 assert((yyval.a_expr)->Identifier == 0);
3197 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003198 }
3199 break;
3200
Lev Walkin4a4543f2006-10-13 12:37:39 +00003201 case 96:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003202/* Line 1787 of yacc.c */
3203#line 1033 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003204 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003205 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003206 }
3207 break;
3208
Lev Walkin4a4543f2006-10-13 12:37:39 +00003209 case 97:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003210/* Line 1787 of yacc.c */
3211#line 1036 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003212 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003213 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
3214 _fixup_anonymous_identifier((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003215 }
3216 break;
3217
Lev Walkin4a4543f2006-10-13 12:37:39 +00003218 case 98:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003219/* Line 1787 of yacc.c */
3220#line 1043 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003221 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003222 (yyval.a_expr) = (yyvsp[(3) - (5)].a_expr);
3223 checkmem((yyval.a_expr));
3224 (yyval.a_expr)->with_syntax = (yyvsp[(5) - (5)].a_wsynt);
3225 assert((yyval.a_expr)->expr_type == A1TC_CLASSDEF);
3226 assert((yyval.a_expr)->meta_type == AMT_OBJECTCLASS);
Lev Walkin418298d2006-07-13 08:24:20 +00003227 }
3228 break;
3229
Lev Walkin0e90aa02013-03-19 16:17:13 -07003230 case 99:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003231/* Line 1787 of yacc.c */
3232#line 1053 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003233 { (yyval.a_int) = 0; }
3234 break;
3235
3236 case 100:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003237/* Line 1787 of yacc.c */
3238#line 1054 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003239 { (yyval.a_int) = 1; }
3240 break;
3241
Lev Walkin4a4543f2006-10-13 12:37:39 +00003242 case 101:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003243/* Line 1787 of yacc.c */
3244#line 1058 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003245 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003246 (yyval.a_expr) = NEW_EXPR();
3247 checkmem((yyval.a_expr));
3248 (yyval.a_expr)->expr_type = A1TC_CLASSDEF;
3249 (yyval.a_expr)->meta_type = AMT_OBJECTCLASS;
3250 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003251 }
3252 break;
3253
Lev Walkin4a4543f2006-10-13 12:37:39 +00003254 case 102:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003255/* Line 1787 of yacc.c */
3256#line 1065 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003257 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003258 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
3259 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003260 }
3261 break;
3262
Lev Walkin4a4543f2006-10-13 12:37:39 +00003263 case 103:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003264/* Line 1787 of yacc.c */
3265#line 1075 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003266 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003267 (yyval.a_expr) = NEW_EXPR();
3268 checkmem((yyval.a_expr));
3269 (yyval.a_expr)->Identifier = (yyvsp[(1) - (2)].tv_str);
3270 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3271 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_TFS; /* TypeFieldSpec */
3272 (yyval.a_expr)->marker = (yyvsp[(2) - (2)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003273 }
3274 break;
3275
Lev Walkin4a4543f2006-10-13 12:37:39 +00003276 case 104:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003277/* Line 1787 of yacc.c */
3278#line 1085 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003279 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003280 (yyval.a_expr) = NEW_EXPR();
3281 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3282 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3283 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVFS; /* FixedTypeValueFieldSpec */
3284 (yyval.a_expr)->unique = (yyvsp[(3) - (4)].a_int);
3285 (yyval.a_expr)->marker = (yyvsp[(4) - (4)].a_marker);
3286 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (4)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003287 }
3288 break;
3289
Lev Walkin4a4543f2006-10-13 12:37:39 +00003290 case 105:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003291/* Line 1787 of yacc.c */
3292#line 1096 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003293 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003294 (yyval.a_expr) = NEW_EXPR();
3295 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3296 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3297 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVFS;
3298 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3299 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003300 }
3301 break;
3302
Lev Walkin4a4543f2006-10-13 12:37:39 +00003303 case 106:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003304/* Line 1787 of yacc.c */
3305#line 1106 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003306 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003307 (yyval.a_expr) = NEW_EXPR();
3308 checkmem((yyval.a_expr));
3309 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3310 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3311 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3312 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OFS;
3313 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003314 }
3315 break;
3316
Lev Walkin4a4543f2006-10-13 12:37:39 +00003317 case 107:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003318/* Line 1787 of yacc.c */
3319#line 1117 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003320 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003321 (yyval.a_expr) = NEW_EXPR();
3322 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3323 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3324 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_VTVSFS;
3325 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3326 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003327 }
3328 break;
3329
Lev Walkin4a4543f2006-10-13 12:37:39 +00003330 case 108:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003331/* Line 1787 of yacc.c */
3332#line 1127 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003333 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003334 (yyval.a_expr) = NEW_EXPR();
3335 checkmem((yyval.a_expr));
3336 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3337 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3338 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_FTVSFS;
3339 asn1p_expr_add((yyval.a_expr), (yyvsp[(2) - (3)].a_expr));
3340 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
Lev Walkin418298d2006-07-13 08:24:20 +00003341 }
3342 break;
3343
Lev Walkin4a4543f2006-10-13 12:37:39 +00003344 case 109:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003345/* Line 1787 of yacc.c */
3346#line 1138 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003347 {
3348 (yyval.a_expr) = NEW_EXPR();
3349 checkmem((yyval.a_expr));
3350 (yyval.a_expr)->Identifier = (yyvsp[(1) - (3)].tv_str);
3351 (yyval.a_expr)->reference = (yyvsp[(2) - (3)].a_ref);
3352 (yyval.a_expr)->meta_type = AMT_OBJECTFIELD;
3353 (yyval.a_expr)->expr_type = A1TC_CLASSFIELD_OSFS;
3354 (yyval.a_expr)->marker = (yyvsp[(3) - (3)].a_marker);
3355 }
Lev Walkin418298d2006-07-13 08:24:20 +00003356 break;
3357
Lev Walkin4a4543f2006-10-13 12:37:39 +00003358 case 110:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003359/* Line 1787 of yacc.c */
3360#line 1150 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003361 { (yyval.a_wsynt) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00003362 break;
3363
Lev Walkin4a4543f2006-10-13 12:37:39 +00003364 case 111:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003365/* Line 1787 of yacc.c */
3366#line 1151 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003367 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003368 (yyval.a_wsynt) = (yyvsp[(1) - (1)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003369 }
3370 break;
3371
Lev Walkin0e90aa02013-03-19 16:17:13 -07003372 case 112:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003373/* Line 1787 of yacc.c */
3374#line 1158 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003375 { asn1p_lexer_hack_enable_with_syntax(); }
3376 break;
3377
Lev Walkin4a4543f2006-10-13 12:37:39 +00003378 case 113:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003379/* Line 1787 of yacc.c */
3380#line 1160 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003381 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003382 (yyval.a_wsynt) = (yyvsp[(5) - (6)].a_wsynt);
Lev Walkin418298d2006-07-13 08:24:20 +00003383 }
3384 break;
3385
Lev Walkin4a4543f2006-10-13 12:37:39 +00003386 case 114:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003387/* Line 1787 of yacc.c */
3388#line 1166 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003389 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003390 (yyval.a_wsynt) = asn1p_wsyntx_new();
3391 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(1) - (1)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003392 }
3393 break;
3394
Lev Walkin4a4543f2006-10-13 12:37:39 +00003395 case 115:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003396/* Line 1787 of yacc.c */
3397#line 1170 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003398 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003399 (yyval.a_wsynt) = (yyvsp[(1) - (2)].a_wsynt);
3400 TQ_ADD(&((yyval.a_wsynt)->chunks), (yyvsp[(2) - (2)].a_wchunk), next);
Lev Walkin418298d2006-07-13 08:24:20 +00003401 }
3402 break;
3403
Lev Walkin4a4543f2006-10-13 12:37:39 +00003404 case 116:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003405/* Line 1787 of yacc.c */
3406#line 1177 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003407 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003408 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_opaque).buf, 0);
3409 (yyval.a_wchunk)->type = WC_WHITESPACE;
Lev Walkin418298d2006-07-13 08:24:20 +00003410 }
3411 break;
3412
Lev Walkin4a4543f2006-10-13 12:37:39 +00003413 case 117:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003414/* Line 1787 of yacc.c */
3415#line 1181 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003416 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003417 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].tv_str), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003418 }
3419 break;
3420
Lev Walkin4a4543f2006-10-13 12:37:39 +00003421 case 118:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003422/* Line 1787 of yacc.c */
3423#line 1184 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003424 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003425 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromstring((yyvsp[(1) - (1)].a_refcomp).name, 0);
3426 (yyval.a_wchunk)->type = WC_FIELD;
Lev Walkin418298d2006-07-13 08:24:20 +00003427 }
3428 break;
3429
Lev Walkina9532f42006-09-17 04:52:50 +00003430 case 119:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003431/* Line 1787 of yacc.c */
3432#line 1188 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00003433 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003434 (yyval.a_wchunk) = asn1p_wsyntx_chunk_fromsyntax((yyvsp[(2) - (3)].a_wsynt));
Lev Walkin866bd7f2006-09-14 10:35:20 +00003435 }
3436 break;
3437
Lev Walkina9532f42006-09-17 04:52:50 +00003438 case 120:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003439/* Line 1787 of yacc.c */
3440#line 1194 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003441 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003442 (yyval.a_expr) = NEW_EXPR();
3443 checkmem((yyval.a_expr));
3444 (yyval.a_expr)->Identifier = strdup("...");
3445 checkmem((yyval.a_expr)->Identifier);
3446 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3447 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003448 }
3449 break;
3450
3451 case 121:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003452/* Line 1787 of yacc.c */
3453#line 1202 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003454 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003455 (yyval.a_expr) = NEW_EXPR();
3456 checkmem((yyval.a_expr));
3457 (yyval.a_expr)->Identifier = strdup("...");
3458 checkmem((yyval.a_expr)->Identifier);
3459 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3460 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3461 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin4a4543f2006-10-13 12:37:39 +00003462 }
3463 break;
3464
3465 case 122:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003466/* Line 1787 of yacc.c */
3467#line 1211 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003468 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003469 (yyval.a_expr) = NEW_EXPR();
3470 checkmem((yyval.a_expr));
3471 (yyval.a_expr)->Identifier = strdup("...");
3472 (yyval.a_expr)->value = (yyvsp[(3) - (3)].a_value);
3473 checkmem((yyval.a_expr)->Identifier);
3474 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
3475 (yyval.a_expr)->meta_type = AMT_TYPE;
3476 }
3477 break;
3478
3479 case 123:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003480/* Line 1787 of yacc.c */
3481#line 1223 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003482 {
3483 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
3484 (yyval.a_expr)->tag = (yyvsp[(1) - (3)].a_tag);
Lev Walkin070a52d2004-08-22 03:19:54 +00003485 /*
3486 * Outer constraint for SEQUENCE OF and SET OF applies
3487 * to the inner type.
3488 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07003489 if((yyval.a_expr)->expr_type == ASN_CONSTR_SEQUENCE_OF
3490 || (yyval.a_expr)->expr_type == ASN_CONSTR_SET_OF) {
3491 assert(!TQ_FIRST(&((yyval.a_expr)->members))->constraints);
3492 TQ_FIRST(&((yyval.a_expr)->members))->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003493 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003494 if((yyval.a_expr)->constraints) {
3495 assert(!(yyvsp[(2) - (3)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08003496 /* Check this : optConstraints is not used ?! */
3497 asn1p_constraint_free((yyvsp[(3) - (3)].a_constr));
Lev Walkin070a52d2004-08-22 03:19:54 +00003498 } else {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003499 (yyval.a_expr)->constraints = (yyvsp[(3) - (3)].a_constr);
Lev Walkin070a52d2004-08-22 03:19:54 +00003500 }
3501 }
Lev Walkin418298d2006-07-13 08:24:20 +00003502 }
3503 break;
3504
Lev Walkin0e90aa02013-03-19 16:17:13 -07003505 case 124:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003506/* Line 1787 of yacc.c */
3507#line 1247 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003508 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003509 (yyval.a_int) = asn1p_as_pointer ? EM_INDIRECT : 0;
Lev Walkinfb872bd2006-03-18 06:53:11 +00003510 asn1p_as_pointer = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00003511 }
3512 break;
3513
Lev Walkin0e90aa02013-03-19 16:17:13 -07003514 case 125:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003515/* Line 1787 of yacc.c */
3516#line 1254 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003517 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003518 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
3519 (yyval.a_expr)->marker.flags |= (yyvsp[(1) - (2)].a_int);
Lev Walkinfb872bd2006-03-18 06:53:11 +00003520
Lev Walkin0e90aa02013-03-19 16:17:13 -07003521 if(((yyval.a_expr)->marker.flags & EM_INDIRECT)
3522 && ((yyval.a_expr)->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) {
Lev Walkinef625402005-09-05 05:17:57 +00003523 fprintf(stderr,
3524 "INFO: Directive <ASN1C:RepresentAsPointer> "
3525 "applied to %s at line %d\n",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003526 ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
3527 ? ASN_EXPR_TYPE2STR((yyval.a_expr)->expr_type)
Lev Walkinef625402005-09-05 05:17:57 +00003528 : "member",
Lev Walkin0e90aa02013-03-19 16:17:13 -07003529 (yyval.a_expr)->_lineno
Lev Walkinef625402005-09-05 05:17:57 +00003530 );
3531 }
Lev Walkin418298d2006-07-13 08:24:20 +00003532 }
3533 break;
3534
Lev Walkin4a4543f2006-10-13 12:37:39 +00003535 case 126:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003536/* Line 1787 of yacc.c */
3537#line 1273 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003538 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003539 (yyval.a_expr) = (yyvsp[(1) - (1)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00003540 }
3541 break;
3542
Lev Walkin4a4543f2006-10-13 12:37:39 +00003543 case 127:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003544/* Line 1787 of yacc.c */
3545#line 1276 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003546 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003547 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3548 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3549 (yyval.a_expr)->expr_type = ASN_CONSTR_CHOICE;
3550 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003551 }
3552 break;
3553
Lev Walkin4a4543f2006-10-13 12:37:39 +00003554 case 128:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003555/* Line 1787 of yacc.c */
3556#line 1282 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003557 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003558 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3559 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3560 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE;
3561 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003562 }
3563 break;
3564
Lev Walkin4a4543f2006-10-13 12:37:39 +00003565 case 129:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003566/* Line 1787 of yacc.c */
3567#line 1288 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003568 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003569 (yyval.a_expr) = (yyvsp[(3) - (4)].a_expr);
3570 assert((yyval.a_expr)->expr_type == A1TC_INVALID);
3571 (yyval.a_expr)->expr_type = ASN_CONSTR_SET;
3572 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003573 }
3574 break;
3575
Lev Walkin4a4543f2006-10-13 12:37:39 +00003576 case 130:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003577/* Line 1787 of yacc.c */
3578#line 1294 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003579 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003580 (yyval.a_expr) = NEW_EXPR();
3581 checkmem((yyval.a_expr));
3582 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3583 (yyval.a_expr)->expr_type = ASN_CONSTR_SEQUENCE_OF;
3584 (yyval.a_expr)->meta_type = AMT_TYPE;
3585 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3586 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3587 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003588 }
3589 break;
3590
Lev Walkin4a4543f2006-10-13 12:37:39 +00003591 case 131:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003592/* Line 1787 of yacc.c */
3593#line 1304 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003594 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003595 (yyval.a_expr) = NEW_EXPR();
3596 checkmem((yyval.a_expr));
3597 (yyval.a_expr)->constraints = (yyvsp[(2) - (6)].a_constr);
3598 (yyval.a_expr)->expr_type = ASN_CONSTR_SET_OF;
3599 (yyval.a_expr)->meta_type = AMT_TYPE;
3600 (yyvsp[(6) - (6)].a_expr)->Identifier = (yyvsp[(4) - (6)].tv_str);
3601 (yyvsp[(6) - (6)].a_expr)->tag = (yyvsp[(5) - (6)].a_tag);
3602 asn1p_expr_add((yyval.a_expr), (yyvsp[(6) - (6)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00003603 }
3604 break;
3605
Lev Walkin4a4543f2006-10-13 12:37:39 +00003606 case 132:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003607/* Line 1787 of yacc.c */
3608#line 1314 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003609 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003610 (yyval.a_expr) = NEW_EXPR();
3611 checkmem((yyval.a_expr));
3612 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3613 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003614 }
3615 break;
3616
Lev Walkin4a4543f2006-10-13 12:37:39 +00003617 case 133:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003618/* Line 1787 of yacc.c */
3619#line 1320 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003620 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003621 int ret;
3622 (yyval.a_expr) = NEW_EXPR();
3623 checkmem((yyval.a_expr));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003624 (yyval.a_expr)->reference = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003625 ret = asn1p_ref_add_component((yyval.a_expr)->reference,
3626 (yyvsp[(4) - (4)].tv_str), RLT_lowercase);
3627 checkmem(ret == 0);
3628 (yyval.a_expr)->expr_type = ASN_TYPE_ANY;
3629 (yyval.a_expr)->meta_type = AMT_TYPE;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003630 free((yyvsp[(4) - (4)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003631 }
3632 break;
3633
Lev Walkin4a4543f2006-10-13 12:37:39 +00003634 case 134:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003635/* Line 1787 of yacc.c */
3636#line 1332 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003637 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003638 (yyval.a_expr) = NEW_EXPR();
3639 checkmem((yyval.a_expr));
3640 (yyval.a_expr)->reference = (yyvsp[(3) - (3)].a_ref);
3641 (yyval.a_expr)->expr_type = A1TC_INSTANCE;
3642 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00003643 }
3644 break;
3645
Lev Walkina9532f42006-09-17 04:52:50 +00003646 case 135:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003647/* Line 1787 of yacc.c */
3648#line 1347 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003649 {
3650 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003651 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003652 checkmem((yyval.a_ref));
3653 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003654 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003655 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003656 }
3657 break;
3658
3659 case 136:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003660/* Line 1787 of yacc.c */
3661#line 1355 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00003662 {
3663 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003664 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003665 checkmem((yyval.a_ref));
3666 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003667 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003668 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin4a4543f2006-10-13 12:37:39 +00003669 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003670 free((yyvsp[(1) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003671 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin4a4543f2006-10-13 12:37:39 +00003672 }
3673 break;
3674
3675 case 137:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003676/* Line 1787 of yacc.c */
3677#line 1366 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003678 {
Lev Walkin9d542d22006-03-14 16:31:37 +00003679 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003680 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003681 checkmem((yyval.a_ref));
3682 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9d542d22006-03-14 16:31:37 +00003683 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003684 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9d542d22006-03-14 16:31:37 +00003685 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003686 free((yyvsp[(1) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003687 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003688 }
3689 break;
3690
Lev Walkin4a4543f2006-10-13 12:37:39 +00003691 case 138:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003692/* Line 1787 of yacc.c */
3693#line 1377 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003694 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003695 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003696 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003697 checkmem((yyval.a_ref));
3698 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
Lev Walkin9c974182004-09-15 11:59:51 +00003699 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003700 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3701 checkmem(ret == 0);
3702 free((yyvsp[(1) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003703 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003704 }
3705 break;
3706
Lev Walkin4a4543f2006-10-13 12:37:39 +00003707 case 139:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003708/* Line 1787 of yacc.c */
3709#line 1388 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003710 {
Lev Walkin9c974182004-09-15 11:59:51 +00003711 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003712 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003713 checkmem((yyval.a_ref));
3714 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
3715 free((yyvsp[(1) - (1)].tv_str));
3716 checkmem(ret == 0);
3717 }
3718 break;
3719
3720 case 140:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003721/* Line 1787 of yacc.c */
3722#line 1396 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003723 {
3724 int ret;
3725 (yyval.a_ref) = (yyvsp[(3) - (3)].a_ref);
3726 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (3)].tv_str), RLT_CAPITALS);
3727 free((yyvsp[(1) - (3)].tv_str));
Lev Walkinf15320b2004-06-03 03:38:44 +00003728 checkmem(ret == 0);
3729 /*
3730 * Move the last element infront.
3731 */
3732 {
3733 struct asn1p_ref_component_s tmp_comp;
Lev Walkin0e90aa02013-03-19 16:17:13 -07003734 tmp_comp = (yyval.a_ref)->components[(yyval.a_ref)->comp_count-1];
3735 memmove(&(yyval.a_ref)->components[1],
3736 &(yyval.a_ref)->components[0],
3737 sizeof((yyval.a_ref)->components[0])
3738 * ((yyval.a_ref)->comp_count - 1));
3739 (yyval.a_ref)->components[0] = tmp_comp;
Lev Walkinf15320b2004-06-03 03:38:44 +00003740 }
Lev Walkin418298d2006-07-13 08:24:20 +00003741 }
3742 break;
3743
Lev Walkin4a4543f2006-10-13 12:37:39 +00003744 case 141:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003745/* Line 1787 of yacc.c */
3746#line 1418 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003747 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003748 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003749 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003750 checkmem((yyval.a_ref));
3751 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].a_refcomp).name, (yyvsp[(1) - (1)].a_refcomp).lex_type);
3752 free((yyvsp[(1) - (1)].a_refcomp).name);
Lev Walkinf15320b2004-06-03 03:38:44 +00003753 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003754 }
3755 break;
3756
Lev Walkin0e90aa02013-03-19 16:17:13 -07003757 case 142:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003758/* Line 1787 of yacc.c */
3759#line 1426 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003760 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003761 int ret;
3762 (yyval.a_ref) = (yyvsp[(1) - (3)].a_ref);
3763 ret = asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].a_refcomp).name, (yyvsp[(3) - (3)].a_refcomp).lex_type);
3764 free((yyvsp[(3) - (3)].a_refcomp).name);
3765 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00003766 }
3767 break;
3768
Lev Walkin4a4543f2006-10-13 12:37:39 +00003769 case 144:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003770/* Line 1787 of yacc.c */
3771#line 1439 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003772 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003773 (yyval.a_refcomp).lex_type = RLT_AmpUppercase;
3774 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003775 }
3776 break;
3777
Lev Walkin4a4543f2006-10-13 12:37:39 +00003778 case 145:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003779/* Line 1787 of yacc.c */
3780#line 1444 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003781 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003782 (yyval.a_refcomp).lex_type = RLT_Amplowercase;
3783 (yyval.a_refcomp).name = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00003784 }
3785 break;
3786
Lev Walkin4a4543f2006-10-13 12:37:39 +00003787 case 146:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003788/* Line 1787 of yacc.c */
3789#line 1453 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003790 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003791 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003792 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003793 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003794 }
3795 break;
3796
Lev Walkin4a4543f2006-10-13 12:37:39 +00003797 case 147:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003798/* Line 1787 of yacc.c */
3799#line 1458 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003800 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003801 (yyval.a_ref) = (yyval.a_ref);
3802 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_AmpUppercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003803 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003804 }
3805 break;
3806
Lev Walkin4a4543f2006-10-13 12:37:39 +00003807 case 148:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003808/* Line 1787 of yacc.c */
3809#line 1463 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003810 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003811 (yyval.a_ref) = (yyval.a_ref);
3812 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(3) - (3)].tv_str), RLT_Amplowercase);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003813 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003814 }
3815 break;
3816
Lev Walkin4a4543f2006-10-13 12:37:39 +00003817 case 149:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003818/* Line 1787 of yacc.c */
3819#line 1471 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003820 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003821 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003822 asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_CAPITALS);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003823 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003824 }
3825 break;
3826
Lev Walkin0e90aa02013-03-19 16:17:13 -07003827 case 150:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003828/* Line 1787 of yacc.c */
3829#line 1494 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003830 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003831 (yyval.a_expr) = (yyvsp[(2) - (4)].a_expr);
3832 assert((yyval.a_expr)->Identifier == NULL);
3833 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
3834 (yyval.a_expr)->meta_type = AMT_VALUE;
3835 (yyval.a_expr)->value = (yyvsp[(4) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003836 }
3837 break;
3838
Lev Walkin4a4543f2006-10-13 12:37:39 +00003839 case 153:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003840/* Line 1787 of yacc.c */
3841#line 1506 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003842 {
3843 (yyval.a_value) = asn1p_value_fromint(0);
3844 checkmem((yyval.a_value));
3845 (yyval.a_value)->type = ATV_CHOICE_IDENTIFIER;
3846 (yyval.a_value)->value.choice_identifier.identifier = (yyvsp[(1) - (3)].tv_str);
3847 (yyval.a_value)->value.choice_identifier.value = (yyvsp[(3) - (3)].a_value);
3848 }
Lev Walkin418298d2006-07-13 08:24:20 +00003849 break;
3850
Lev Walkin4a4543f2006-10-13 12:37:39 +00003851 case 154:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003852/* Line 1787 of yacc.c */
3853#line 1513 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07003854 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00003855 break;
3856
Lev Walkin4a4543f2006-10-13 12:37:39 +00003857 case 155:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003858/* Line 1787 of yacc.c */
3859#line 1513 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003860 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003861 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
3862 checkmem((yyval.a_value));
3863 (yyval.a_value)->type = ATV_UNPARSED;
Lev Walkin418298d2006-07-13 08:24:20 +00003864 }
3865 break;
3866
Lev Walkin4a4543f2006-10-13 12:37:39 +00003867 case 156:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003868/* Line 1787 of yacc.c */
3869#line 1518 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003870 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003871 (yyval.a_value) = asn1p_value_fromint(0);
3872 checkmem((yyval.a_value));
3873 (yyval.a_value)->type = ATV_NULL;
Lev Walkin418298d2006-07-13 08:24:20 +00003874 }
3875 break;
3876
Lev Walkin4a4543f2006-10-13 12:37:39 +00003877 case 157:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003878/* Line 1787 of yacc.c */
3879#line 1526 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003880 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003881 (yyval.a_value) = asn1p_value_fromint(0);
3882 checkmem((yyval.a_value));
3883 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00003884 }
3885 break;
3886
Lev Walkin4a4543f2006-10-13 12:37:39 +00003887 case 158:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003888/* Line 1787 of yacc.c */
3889#line 1531 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003890 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003891 (yyval.a_value) = asn1p_value_fromint(0);
3892 checkmem((yyval.a_value));
3893 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00003894 }
3895 break;
3896
Lev Walkin4a4543f2006-10-13 12:37:39 +00003897 case 159:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003898/* Line 1787 of yacc.c */
3899#line 1536 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003900 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003901 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
3902 checkmem((yyval.a_value));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003903 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003904 }
3905 break;
3906
Lev Walkin4a4543f2006-10-13 12:37:39 +00003907 case 160:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003908/* Line 1787 of yacc.c */
3909#line 1541 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003910 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003911 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
3912 checkmem((yyval.a_value));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003913 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003914 }
3915 break;
3916
Lev Walkin4a4543f2006-10-13 12:37:39 +00003917 case 161:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003918/* Line 1787 of yacc.c */
3919#line 1546 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003920 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003921 (yyval.a_value) = (yyval.a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003922 }
3923 break;
3924
Lev Walkin4a4543f2006-10-13 12:37:39 +00003925 case 162:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003926/* Line 1787 of yacc.c */
3927#line 1549 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003928 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003929 (yyval.a_value) = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00003930 }
3931 break;
3932
Lev Walkin4a4543f2006-10-13 12:37:39 +00003933 case 163:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003934/* Line 1787 of yacc.c */
3935#line 1555 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003936 {
Lev Walkinf15320b2004-06-03 03:38:44 +00003937 asn1p_ref_t *ref;
3938 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003939 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00003940 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003941 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinf15320b2004-06-03 03:38:44 +00003942 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003943 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3944 checkmem((yyval.a_value));
3945 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003946 }
3947 break;
3948
Lev Walkin4a4543f2006-10-13 12:37:39 +00003949 case 164:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003950/* Line 1787 of yacc.c */
3951#line 1566 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003952 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003953 asn1p_ref_t *ref;
3954 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003955 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07003956 checkmem(ref);
3957 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (3)].tv_str), RLT_UNKNOWN);
3958 checkmem(ret == 0);
3959 ret = asn1p_ref_add_component(ref, (yyvsp[(3) - (3)].tv_str), RLT_lowercase);
3960 checkmem(ret == 0);
3961 (yyval.a_value) = asn1p_value_fromref(ref, 0);
3962 checkmem((yyval.a_value));
3963 free((yyvsp[(1) - (3)].tv_str));
3964 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00003965 }
3966 break;
3967
Lev Walkin4a4543f2006-10-13 12:37:39 +00003968 case 165:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003969/* Line 1787 of yacc.c */
3970#line 1584 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003971 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003972 (yyval.a_value) = asn1p_value_frombuf((yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len, 0);
3973 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00003974 }
3975 break;
3976
Lev Walkin4a4543f2006-10-13 12:37:39 +00003977 case 166:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003978/* Line 1787 of yacc.c */
3979#line 1588 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003980 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003981 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3982 checkmem((yyval.a_value));
3983 (yyval.a_value)->type = ATV_TUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003984 }
3985 break;
3986
Lev Walkin4a4543f2006-10-13 12:37:39 +00003987 case 167:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003988/* Line 1787 of yacc.c */
3989#line 1593 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00003990 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07003991 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
3992 checkmem((yyval.a_value));
3993 (yyval.a_value)->type = ATV_QUADRUPLE;
Lev Walkin418298d2006-07-13 08:24:20 +00003994 }
3995 break;
3996
Lev Walkin4a4543f2006-10-13 12:37:39 +00003997 case 168:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08003998/* Line 1787 of yacc.c */
3999#line 1601 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004000 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004001 (yyval.tv_opaque).len = (yyvsp[(1) - (1)].tv_opaque).len + 1;
4002 (yyval.tv_opaque).buf = malloc((yyval.tv_opaque).len + 1);
4003 checkmem((yyval.tv_opaque).buf);
4004 (yyval.tv_opaque).buf[0] = '{';
4005 memcpy((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len);
4006 (yyval.tv_opaque).buf[(yyval.tv_opaque).len] = '\0';
4007 free((yyvsp[(1) - (1)].tv_opaque).buf);
Lev Walkin418298d2006-07-13 08:24:20 +00004008 }
4009 break;
4010
Lev Walkin4a4543f2006-10-13 12:37:39 +00004011 case 169:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004012/* Line 1787 of yacc.c */
4013#line 1610 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004014 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004015 int newsize = (yyvsp[(1) - (2)].tv_opaque).len + (yyvsp[(2) - (2)].tv_opaque).len;
4016 char *p = malloc(newsize + 1);
4017 checkmem(p);
4018 memcpy(p , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len);
4019 memcpy(p + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len);
4020 p[newsize] = '\0';
4021 free((yyvsp[(1) - (2)].tv_opaque).buf);
4022 free((yyvsp[(2) - (2)].tv_opaque).buf);
4023 (yyval.tv_opaque).buf = p;
4024 (yyval.tv_opaque).len = newsize;
Lev Walkin418298d2006-07-13 08:24:20 +00004025 }
4026 break;
4027
Lev Walkin0e90aa02013-03-19 16:17:13 -07004028 case 170:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004029/* Line 1787 of yacc.c */
4030#line 1625 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004031 { (yyval.a_type) = ASN_BASIC_BOOLEAN; }
4032 break;
4033
4034 case 171:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004035/* Line 1787 of yacc.c */
4036#line 1626 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004037 { (yyval.a_type) = ASN_BASIC_NULL; }
4038 break;
4039
4040 case 172:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004041/* Line 1787 of yacc.c */
4042#line 1627 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004043 { (yyval.a_type) = ASN_BASIC_REAL; }
4044 break;
4045
4046 case 173:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004047/* Line 1787 of yacc.c */
4048#line 1628 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004049 { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); }
4050 break;
4051
4052 case 174:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004053/* Line 1787 of yacc.c */
4054#line 1629 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004055 { (yyval.a_type) = ASN_BASIC_OCTET_STRING; }
4056 break;
4057
4058 case 175:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004059/* Line 1787 of yacc.c */
4060#line 1630 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004061 { (yyval.a_type) = ASN_BASIC_OBJECT_IDENTIFIER; }
4062 break;
4063
4064 case 176:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004065/* Line 1787 of yacc.c */
4066#line 1631 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004067 { (yyval.a_type) = ASN_BASIC_RELATIVE_OID; }
4068 break;
4069
4070 case 177:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004071/* Line 1787 of yacc.c */
4072#line 1632 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004073 { (yyval.a_type) = ASN_BASIC_EXTERNAL; }
4074 break;
4075
4076 case 178:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004077/* Line 1787 of yacc.c */
4078#line 1633 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004079 { (yyval.a_type) = ASN_BASIC_EMBEDDED_PDV; }
4080 break;
4081
4082 case 179:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004083/* Line 1787 of yacc.c */
4084#line 1634 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004085 { (yyval.a_type) = ASN_BASIC_CHARACTER_STRING; }
4086 break;
4087
4088 case 180:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004089/* Line 1787 of yacc.c */
4090#line 1635 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004091 { (yyval.a_type) = ASN_BASIC_UTCTime; }
4092 break;
4093
4094 case 181:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004095/* Line 1787 of yacc.c */
4096#line 1636 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004097 { (yyval.a_type) = ASN_BASIC_GeneralizedTime; }
4098 break;
4099
4100 case 182:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004101/* Line 1787 of yacc.c */
4102#line 1637 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004103 { (yyval.a_type) = (yyvsp[(1) - (1)].a_type); }
4104 break;
4105
4106 case 183:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004107/* Line 1787 of yacc.c */
4108#line 1644 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004109 { (yyval.a_type) = ASN_BASIC_INTEGER; }
4110 break;
4111
4112 case 184:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004113/* Line 1787 of yacc.c */
4114#line 1645 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004115 { (yyval.a_type) = ASN_BASIC_ENUMERATED; }
4116 break;
4117
4118 case 185:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004119/* Line 1787 of yacc.c */
4120#line 1646 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004121 { (yyval.a_type) = ASN_BASIC_BIT_STRING; }
4122 break;
4123
Lev Walkin4a4543f2006-10-13 12:37:39 +00004124 case 186:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004125/* Line 1787 of yacc.c */
4126#line 1650 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004127 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004128 (yyval.a_expr) = NEW_EXPR();
4129 checkmem((yyval.a_expr));
4130 (yyval.a_expr)->expr_type = (yyvsp[(1) - (1)].a_type);
4131 (yyval.a_expr)->meta_type = AMT_TYPE;
Lev Walkin418298d2006-07-13 08:24:20 +00004132 }
4133 break;
4134
Lev Walkin4a4543f2006-10-13 12:37:39 +00004135 case 187:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004136/* Line 1787 of yacc.c */
4137#line 1656 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004138 {
4139 if((yyvsp[(2) - (2)].a_expr)) {
4140 (yyval.a_expr) = (yyvsp[(2) - (2)].a_expr);
4141 } else {
4142 (yyval.a_expr) = NEW_EXPR();
4143 checkmem((yyval.a_expr));
4144 }
4145 (yyval.a_expr)->expr_type = (yyvsp[(1) - (2)].a_type);
4146 (yyval.a_expr)->meta_type = AMT_TYPE;
4147 }
Lev Walkin418298d2006-07-13 08:24:20 +00004148 break;
4149
Lev Walkin4a4543f2006-10-13 12:37:39 +00004150 case 188:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004151/* Line 1787 of yacc.c */
4152#line 1669 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004153 { (yyval.a_type) = ASN_STRING_BMPString; }
4154 break;
4155
4156 case 189:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004157/* Line 1787 of yacc.c */
4158#line 1670 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004159 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004160 (yyval.a_type) = ASN_STRING_GeneralString;
Lev Walkin9c974182004-09-15 11:59:51 +00004161 fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004162 }
4163 break;
4164
Lev Walkin0e90aa02013-03-19 16:17:13 -07004165 case 190:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004166/* Line 1787 of yacc.c */
4167#line 1674 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004168 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004169 (yyval.a_type) = ASN_STRING_GraphicString;
Lev Walkin9c974182004-09-15 11:59:51 +00004170 fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004171 }
4172 break;
4173
Lev Walkin4a4543f2006-10-13 12:37:39 +00004174 case 191:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004175/* Line 1787 of yacc.c */
4176#line 1678 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004177 { (yyval.a_type) = ASN_STRING_IA5String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004178 break;
4179
Lev Walkin4a4543f2006-10-13 12:37:39 +00004180 case 192:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004181/* Line 1787 of yacc.c */
4182#line 1679 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004183 { (yyval.a_type) = ASN_STRING_ISO646String; }
Lev Walkin418298d2006-07-13 08:24:20 +00004184 break;
4185
Lev Walkin4a4543f2006-10-13 12:37:39 +00004186 case 193:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004187/* Line 1787 of yacc.c */
4188#line 1680 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004189 { (yyval.a_type) = ASN_STRING_NumericString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004190 break;
4191
Lev Walkin4a4543f2006-10-13 12:37:39 +00004192 case 194:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004193/* Line 1787 of yacc.c */
4194#line 1681 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004195 { (yyval.a_type) = ASN_STRING_PrintableString; }
4196 break;
4197
4198 case 195:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004199/* Line 1787 of yacc.c */
4200#line 1682 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004201 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004202 (yyval.a_type) = ASN_STRING_T61String;
Lev Walkin9c974182004-09-15 11:59:51 +00004203 fprintf(stderr, "WARNING: T61String is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004204 }
4205 break;
4206
Lev Walkin4a4543f2006-10-13 12:37:39 +00004207 case 196:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004208/* Line 1787 of yacc.c */
4209#line 1686 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004210 { (yyval.a_type) = ASN_STRING_TeletexString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004211 break;
4212
Lev Walkin4a4543f2006-10-13 12:37:39 +00004213 case 197:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004214/* Line 1787 of yacc.c */
4215#line 1687 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004216 { (yyval.a_type) = ASN_STRING_UniversalString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004217 break;
4218
Lev Walkin4a4543f2006-10-13 12:37:39 +00004219 case 198:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004220/* Line 1787 of yacc.c */
4221#line 1688 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004222 { (yyval.a_type) = ASN_STRING_UTF8String; }
4223 break;
4224
4225 case 199:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004226/* Line 1787 of yacc.c */
4227#line 1689 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004228 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004229 (yyval.a_type) = ASN_STRING_VideotexString;
Lev Walkin9c974182004-09-15 11:59:51 +00004230 fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
Lev Walkin418298d2006-07-13 08:24:20 +00004231 }
4232 break;
4233
Lev Walkin4a4543f2006-10-13 12:37:39 +00004234 case 200:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004235/* Line 1787 of yacc.c */
4236#line 1693 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004237 { (yyval.a_type) = ASN_STRING_VisibleString; }
Lev Walkin418298d2006-07-13 08:24:20 +00004238 break;
4239
Lev Walkin0e90aa02013-03-19 16:17:13 -07004240 case 201:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004241/* Line 1787 of yacc.c */
4242#line 1694 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004243 { (yyval.a_type) = ASN_STRING_ObjectDescriptor; }
Lev Walkin418298d2006-07-13 08:24:20 +00004244 break;
4245
Lev Walkin4a4543f2006-10-13 12:37:39 +00004246 case 206:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004247/* Line 1787 of yacc.c */
4248#line 1705 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004249 { (yyval.a_constr) = 0; }
Lev Walkin418298d2006-07-13 08:24:20 +00004250 break;
4251
Lev Walkin0e90aa02013-03-19 16:17:13 -07004252 case 207:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004253/* Line 1787 of yacc.c */
4254#line 1706 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004255 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004256 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004257 }
4258 break;
4259
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004260 case 209:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004261/* Line 1787 of yacc.c */
4262#line 1716 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004263 {
4264 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_SET, (yyvsp[(1) - (1)].a_constr), 0);
4265 }
4266 break;
4267
4268 case 210:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004269/* Line 1787 of yacc.c */
4270#line 1719 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004271 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004272 /*
4273 * This is a special case, for compatibility purposes.
Lev Walkinf59d0752004-08-18 04:59:12 +00004274 * It goes without parentheses.
Lev Walkinf15320b2004-06-03 03:38:44 +00004275 */
Lev Walkin0e90aa02013-03-19 16:17:13 -07004276 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_SIZE, (yyvsp[(3) - (4)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004277 }
4278 break;
4279
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004280 case 211:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004281/* Line 1787 of yacc.c */
4282#line 1729 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004283 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004284 (yyval.a_constr) = (yyvsp[(2) - (3)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004285 }
4286 break;
4287
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004288 case 212:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004289/* Line 1787 of yacc.c */
4290#line 1732 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004291 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004292 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 +00004293 }
4294 break;
4295
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004296 case 213:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004297/* Line 1787 of yacc.c */
4298#line 1738 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004299 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004300 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004301 }
4302 break;
4303
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004304 case 214:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004305/* Line 1787 of yacc.c */
4306#line 1741 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004307 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004308 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004309 }
4310 break;
4311
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004312 case 215:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004313/* Line 1787 of yacc.c */
4314#line 1747 "asn1p_y.y"
4315 {
4316 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4317 (yyval.a_constr)->type = ACT_EL_EXT;
4318 }
4319 break;
4320
4321 case 216:
4322/* Line 1787 of yacc.c */
4323#line 1751 "asn1p_y.y"
4324 {
4325 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4326 }
4327 break;
4328
4329 case 217:
4330/* Line 1787 of yacc.c */
4331#line 1754 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004332 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004333 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004334 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00004335 ct->type = ACT_EL_EXT;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004336 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004337 }
4338 break;
4339
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004340 case 218:
4341/* Line 1787 of yacc.c */
4342#line 1760 "asn1p_y.y"
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004343 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004344 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004345 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004346 ct->type = ACT_EL_EXT;
4347 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (5)].a_constr), ct);
4348 ct = (yyval.a_constr);
4349 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, ct, (yyvsp[(5) - (5)].a_constr));
Lev Walkinc6ab03c2006-10-21 05:54:49 +00004350 }
4351 break;
4352
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004353 case 220:
4354/* Line 1787 of yacc.c */
4355#line 1772 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004356 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004357 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_AEX, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004358 }
4359 break;
4360
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004361 case 222:
4362/* Line 1787 of yacc.c */
4363#line 1779 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004364 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004365 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 +00004366 }
4367 break;
4368
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004369 case 224:
4370/* Line 1787 of yacc.c */
4371#line 1786 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004372 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004373 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 +00004374 }
4375 break;
4376
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004377 case 226:
4378/* Line 1787 of yacc.c */
4379#line 1794 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004380 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004381 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 +00004382 }
4383 break;
4384
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004385 case 227:
4386/* Line 1787 of yacc.c */
4387#line 1800 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004388 {
Lev Walkinf59d0752004-08-18 04:59:12 +00004389 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004390 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004391 checkmem((yyval.a_constr));
4392 (yyval.a_constr)->type = (yyvsp[(1) - (4)].a_ctype);
4393 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(3) - (4)].a_constr));
Lev Walkinf59d0752004-08-18 04:59:12 +00004394 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004395 }
4396 break;
4397
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004398 case 228:
4399/* Line 1787 of yacc.c */
4400#line 1808 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004401 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004402 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004403 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004404 checkmem((yyval.a_constr));
4405 (yyval.a_constr)->type = ACT_CA_SET;
4406 ret = asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
4407 checkmem(ret == 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004408 }
4409 break;
4410
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004411 case 229:
4412/* Line 1787 of yacc.c */
4413#line 1816 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004414 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004415 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004416 checkmem((yyval.a_constr));
4417 (yyval.a_constr)->type = ACT_EL_VALUE;
4418 (yyval.a_constr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004419 }
4420 break;
4421
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004422 case 230:
4423/* Line 1787 of yacc.c */
4424#line 1822 "asn1p_y.y"
Lev Walkinf1727152006-09-21 01:50:37 +00004425 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004426 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004427 checkmem((yyval.a_constr));
4428 (yyval.a_constr)->type = ACT_EL_TYPE;
4429 (yyval.a_constr)->containedSubtype = (yyvsp[(1) - (1)].a_value);
Lev Walkinf1727152006-09-21 01:50:37 +00004430 }
4431 break;
4432
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004433 case 231:
4434/* Line 1787 of yacc.c */
4435#line 1828 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004436 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004437 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004438 checkmem((yyval.a_constr));
4439 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4440 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
4441 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004442 }
4443 break;
4444
Lev Walkin4a4543f2006-10-13 12:37:39 +00004445 case 232:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004446/* Line 1787 of yacc.c */
4447#line 1835 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004448 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004449 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004450 checkmem((yyval.a_constr));
4451 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004452 (yyval.a_constr)->range_start = asn1p_value_fromint(-123);
4453 (yyval.a_constr)->range_stop = (yyvsp[(3) - (3)].a_value);
4454 (yyval.a_constr)->range_start->type = ATV_MIN;
Lev Walkina9532f42006-09-17 04:52:50 +00004455 }
4456 break;
4457
Lev Walkin4a4543f2006-10-13 12:37:39 +00004458 case 233:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004459/* Line 1787 of yacc.c */
4460#line 1843 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00004461 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004462 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004463 checkmem((yyval.a_constr));
4464 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004465 (yyval.a_constr)->range_start = (yyvsp[(1) - (3)].a_value);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004466 (yyval.a_constr)->range_stop = asn1p_value_fromint(321);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004467 (yyval.a_constr)->range_stop->type = ATV_MAX;
Lev Walkin866bd7f2006-09-14 10:35:20 +00004468 }
4469 break;
4470
Lev Walkin4a4543f2006-10-13 12:37:39 +00004471 case 234:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004472/* Line 1787 of yacc.c */
4473#line 1851 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004474 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004475 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4476 checkmem((yyval.a_constr));
4477 (yyval.a_constr)->type = (yyvsp[(2) - (3)].a_ctype);
4478 (yyval.a_constr)->range_start = asn1p_value_fromint(-123);
4479 (yyval.a_constr)->range_stop = asn1p_value_fromint(321);
4480 (yyval.a_constr)->range_start->type = ATV_MIN;
4481 (yyval.a_constr)->range_stop->type = ATV_MAX;
Lev Walkin418298d2006-07-13 08:24:20 +00004482 }
4483 break;
4484
Lev Walkin4a4543f2006-10-13 12:37:39 +00004485 case 235:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004486/* Line 1787 of yacc.c */
4487#line 1860 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004488 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004489 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004490 }
4491 break;
4492
Lev Walkin4a4543f2006-10-13 12:37:39 +00004493 case 236:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004494/* Line 1787 of yacc.c */
4495#line 1863 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004496 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004497 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
4498 }
4499 break;
4500
4501 case 237:
4502/* Line 1787 of yacc.c */
4503#line 1866 "asn1p_y.y"
4504 { asn1p_lexer_hack_push_opaque_state(); }
4505 break;
4506
4507 case 238:
4508/* Line 1787 of yacc.c */
4509#line 1866 "asn1p_y.y"
4510 {
4511 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
4512 checkmem((yyval.a_constr));
4513 (yyval.a_constr)->type = ACT_EL_VALUE;
4514 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(3) - (3)].tv_opaque).buf, (yyvsp[(3) - (3)].tv_opaque).len, 0);
4515 (yyval.a_constr)->value->type = ATV_UNPARSED;
4516 }
4517 break;
4518
4519 case 239:
4520/* Line 1787 of yacc.c */
4521#line 1876 "asn1p_y.y"
4522 {
4523 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004524 (yyval.a_constr)->type = ACT_CT_PATTERN;
4525 (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 +00004526 }
4527 break;
4528
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004529 case 240:
4530/* Line 1787 of yacc.c */
4531#line 1881 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004532 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004533 asn1p_ref_t *ref;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004534 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004535 (yyval.a_constr)->type = ACT_CT_PATTERN;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004536 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004537 asn1p_ref_add_component(ref, (yyvsp[(2) - (2)].tv_str), RLT_lowercase);
4538 (yyval.a_constr)->value = asn1p_value_fromref(ref, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004539 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin5c541f12006-10-18 18:40:14 +00004540 }
4541 break;
4542
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004543 case 241:
4544/* Line 1787 of yacc.c */
4545#line 1893 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004546 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004547 (yyval.a_ctype) = ACT_CT_SIZE;
Lev Walkin5c541f12006-10-18 18:40:14 +00004548 }
4549 break;
4550
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004551 case 242:
4552/* Line 1787 of yacc.c */
4553#line 1896 "asn1p_y.y"
Lev Walkin5c541f12006-10-18 18:40:14 +00004554 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004555 (yyval.a_ctype) = ACT_CT_FROM;
Lev Walkin418298d2006-07-13 08:24:20 +00004556 }
4557 break;
4558
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004559 case 243:
4560/* Line 1787 of yacc.c */
4561#line 1902 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004562 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004563 (yyval.a_value) = asn1p_value_fromint(0);
4564 checkmem((yyval.a_value));
4565 (yyval.a_value)->type = ATV_FALSE;
Lev Walkin418298d2006-07-13 08:24:20 +00004566 }
4567 break;
4568
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004569 case 244:
4570/* Line 1787 of yacc.c */
4571#line 1907 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004572 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004573 (yyval.a_value) = asn1p_value_fromint(1);
4574 checkmem((yyval.a_value));
4575 (yyval.a_value)->type = ATV_TRUE;
Lev Walkin418298d2006-07-13 08:24:20 +00004576 }
4577 break;
4578
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004579 case 248:
4580/* Line 1787 of yacc.c */
4581#line 1915 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004582 {
Lev Walkinc8092cb2005-02-18 16:34:21 +00004583 asn1p_ref_t *ref;
4584 int ret;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004585 ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkinc8092cb2005-02-18 16:34:21 +00004586 checkmem(ref);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004587 ret = asn1p_ref_add_component(ref, (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
Lev Walkinc8092cb2005-02-18 16:34:21 +00004588 checkmem(ret == 0);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004589 (yyval.a_value) = asn1p_value_fromref(ref, 0);
4590 checkmem((yyval.a_value));
4591 free((yyvsp[(1) - (1)].tv_str));
4592 }
4593 break;
4594
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004595 case 249:
4596/* Line 1787 of yacc.c */
4597#line 1929 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004598 {
4599 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'B');
4600 checkmem((yyval.a_value));
Lev Walkin0e90aa02013-03-19 16:17:13 -07004601 free((yyvsp[(1) - (1)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004602 }
4603 break;
4604
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004605 case 250:
4606/* Line 1787 of yacc.c */
4607#line 1934 "asn1p_y.y"
4608 {
4609 (yyval.a_value) = _convert_bitstring2binary((yyvsp[(1) - (1)].tv_str), 'H');
4610 checkmem((yyval.a_value));
4611 free((yyvsp[(1) - (1)].tv_str));
4612 }
4613 break;
4614
4615 case 251:
4616/* Line 1787 of yacc.c */
4617#line 1942 "asn1p_y.y"
4618 {
4619 (yyval.a_value) = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4620 checkmem((yyval.a_value));
4621 }
4622 break;
4623
4624 case 252:
4625/* Line 1787 of yacc.c */
4626#line 1962 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004627 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004628 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMP, (yyvsp[(3) - (3)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004629 }
4630 break;
4631
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004632 case 253:
4633/* Line 1787 of yacc.c */
4634#line 1965 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004635 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004636 CONSTRAINT_INSERT((yyval.a_constr), ACT_CT_WCOMPS, (yyvsp[(4) - (5)].a_constr), 0);
Lev Walkin418298d2006-07-13 08:24:20 +00004637 }
4638 break;
4639
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004640 case 254:
4641/* Line 1787 of yacc.c */
4642#line 1971 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004643 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004644 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004645 }
4646 break;
4647
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004648 case 255:
4649/* Line 1787 of yacc.c */
4650#line 1974 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004651 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004652 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 +00004653 }
4654 break;
4655
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004656 case 256:
4657/* Line 1787 of yacc.c */
4658#line 1980 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004659 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004660 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004661 checkmem((yyval.a_constr));
4662 (yyval.a_constr)->type = ACT_EL_EXT;
4663 (yyval.a_constr)->value = asn1p_value_frombuf("...", 3, 1);
Lev Walkin418298d2006-07-13 08:24:20 +00004664 }
4665 break;
4666
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004667 case 257:
4668/* Line 1787 of yacc.c */
4669#line 1986 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004670 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004671 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004672 checkmem((yyval.a_constr));
4673 (yyval.a_constr)->type = ACT_EL_VALUE;
4674 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(1) - (3)].tv_str), strlen((yyvsp[(1) - (3)].tv_str)), 0);
4675 (yyval.a_constr)->presence = (yyvsp[(3) - (3)].a_pres);
4676 if((yyvsp[(2) - (3)].a_constr)) asn1p_constraint_insert((yyval.a_constr), (yyvsp[(2) - (3)].a_constr));
Lev Walkin418298d2006-07-13 08:24:20 +00004677 }
4678 break;
4679
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004680 case 258:
4681/* Line 1787 of yacc.c */
4682#line 2000 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004683 { (yyval.a_pres) = ACPRES_DEFAULT; }
4684 break;
4685
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004686 case 259:
4687/* Line 1787 of yacc.c */
4688#line 2001 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004689 { (yyval.a_pres) = (yyvsp[(1) - (1)].a_pres); }
4690 break;
4691
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004692 case 260:
4693/* Line 1787 of yacc.c */
4694#line 2005 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004695 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004696 (yyval.a_pres) = ACPRES_PRESENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004697 }
4698 break;
4699
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004700 case 261:
4701/* Line 1787 of yacc.c */
4702#line 2008 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004703 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004704 (yyval.a_pres) = ACPRES_ABSENT;
Lev Walkin418298d2006-07-13 08:24:20 +00004705 }
4706 break;
4707
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004708 case 262:
4709/* Line 1787 of yacc.c */
4710#line 2011 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004711 {
4712 (yyval.a_pres) = ACPRES_OPTIONAL;
4713 }
Lev Walkina9532f42006-09-17 04:52:50 +00004714 break;
4715
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004716 case 266:
4717/* Line 1787 of yacc.c */
4718#line 2026 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004719 { asn1p_lexer_hack_push_opaque_state(); }
Lev Walkin418298d2006-07-13 08:24:20 +00004720 break;
4721
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004722 case 267:
4723/* Line 1787 of yacc.c */
4724#line 2026 "asn1p_y.y"
Lev Walkina9532f42006-09-17 04:52:50 +00004725 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004726 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004727 checkmem((yyval.a_constr));
4728 (yyval.a_constr)->type = ACT_CT_CTDBY;
4729 (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(5) - (5)].tv_opaque).buf, (yyvsp[(5) - (5)].tv_opaque).len, 0);
4730 checkmem((yyval.a_constr)->value);
4731 (yyval.a_constr)->value->type = ATV_UNPARSED;
Lev Walkina9532f42006-09-17 04:52:50 +00004732 }
4733 break;
4734
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004735 case 268:
4736/* Line 1787 of yacc.c */
4737#line 2037 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004738 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004739 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004740 (yyval.a_constr)->type = ACT_CT_CTNG;
4741 (yyval.a_constr)->value = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +08004742 asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
Lev Walkin4a4543f2006-10-13 12:37:39 +00004743 }
4744 break;
4745
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004746 case 269:
4747/* Line 1787 of yacc.c */
4748#line 2046 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004749 { (yyval.a_ctype) = ACT_EL_RANGE; }
4750 break;
4751
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004752 case 270:
4753/* Line 1787 of yacc.c */
4754#line 2047 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004755 { (yyval.a_ctype) = ACT_EL_RLRANGE; }
4756 break;
4757
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004758 case 271:
4759/* Line 1787 of yacc.c */
4760#line 2048 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004761 { (yyval.a_ctype) = ACT_EL_LLRANGE; }
4762 break;
4763
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004764 case 272:
4765/* Line 1787 of yacc.c */
4766#line 2049 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004767 { (yyval.a_ctype) = ACT_EL_ULRANGE; }
4768 break;
4769
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004770 case 273:
4771/* Line 1787 of yacc.c */
4772#line 2052 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004773 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004774 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004775 }
4776 break;
4777
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004778 case 274:
4779/* Line 1787 of yacc.c */
4780#line 2055 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004781 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004782 (yyval.a_constr) = (yyvsp[(1) - (1)].a_constr);
Lev Walkin418298d2006-07-13 08:24:20 +00004783 }
4784 break;
4785
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004786 case 275:
4787/* Line 1787 of yacc.c */
4788#line 2064 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004789 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004790 asn1p_ref_t *ref = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004791 asn1p_constraint_t *ct;
4792 int ret;
4793 ret = asn1p_ref_add_component(ref, (yyvsp[(2) - (3)].tv_str), 0);
4794 checkmem(ret == 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004795 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004796 checkmem((yyval.a_constr));
4797 ct->type = ACT_EL_VALUE;
4798 ct->value = asn1p_value_fromref(ref, 0);
4799 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CRC, ct, 0);
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004800 free((yyvsp[(2) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004801 }
4802 break;
4803
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004804 case 276:
4805/* Line 1787 of yacc.c */
4806#line 2080 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004807 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004808 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 +00004809 }
4810 break;
4811
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004812 case 277:
4813/* Line 1787 of yacc.c */
4814#line 2086 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004815 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004816 (yyval.a_constr) = asn1p_constraint_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004817 checkmem((yyval.a_constr));
4818 (yyval.a_constr)->type = ACT_EL_VALUE;
4819 (yyval.a_constr)->value = asn1p_value_fromref((yyvsp[(1) - (1)].a_ref), 0);
4820 }
4821 break;
4822
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004823 case 278:
4824/* Line 1787 of yacc.c */
4825#line 2092 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004826 {
Lev Walkinf15320b2004-06-03 03:38:44 +00004827 asn1p_constraint_t *ct;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004828 ct = asn1p_constraint_new(yylineno, currentModule);
Lev Walkinf15320b2004-06-03 03:38:44 +00004829 checkmem(ct);
4830 ct->type = ACT_EL_VALUE;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004831 ct->value = asn1p_value_fromref((yyvsp[(3) - (3)].a_ref), 0);
4832 CONSTRAINT_INSERT((yyval.a_constr), ACT_CA_CSV, (yyvsp[(1) - (3)].a_constr), ct);
Lev Walkin418298d2006-07-13 08:24:20 +00004833 }
4834 break;
4835
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004836 case 279:
4837/* Line 1787 of yacc.c */
4838#line 2106 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004839 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004840 char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2);
Lev Walkinf15320b2004-06-03 03:38:44 +00004841 int ret;
Lev Walkin0e90aa02013-03-19 16:17:13 -07004842 *p = '@';
4843 strcpy(p + 1, (yyvsp[(2) - (2)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004844 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004845 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
Lev Walkinf15320b2004-06-03 03:38:44 +00004846 checkmem(ret == 0);
4847 free(p);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004848 free((yyvsp[(2) - (2)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004849 }
4850 break;
4851
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004852 case 280:
4853/* Line 1787 of yacc.c */
4854#line 2117 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004855 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004856 char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3);
4857 int ret;
4858 p[0] = '@';
4859 p[1] = '.';
4860 strcpy(p + 2, (yyvsp[(3) - (3)].tv_str));
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004861 (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
Lev Walkin0e90aa02013-03-19 16:17:13 -07004862 ret = asn1p_ref_add_component((yyval.a_ref), p, 0);
4863 checkmem(ret == 0);
4864 free(p);
4865 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004866 }
4867 break;
4868
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004869 case 281:
4870/* Line 1787 of yacc.c */
4871#line 2133 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004872 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004873 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin418298d2006-07-13 08:24:20 +00004874 }
4875 break;
4876
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004877 case 282:
4878/* Line 1787 of yacc.c */
4879#line 2136 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004880 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004881 int l1 = strlen((yyvsp[(1) - (3)].tv_str));
4882 int l3 = strlen((yyvsp[(3) - (3)].tv_str));
4883 (yyval.tv_str) = malloc(l1 + 1 + l3 + 1);
4884 memcpy((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1);
4885 (yyval.tv_str)[l1] = '.';
4886 memcpy((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3);
4887 (yyval.tv_str)[l1 + 1 + l3] = '\0';
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004888 free((yyvsp[(1) - (3)].tv_str));
4889 free((yyvsp[(3) - (3)].tv_str));
Lev Walkin418298d2006-07-13 08:24:20 +00004890 }
4891 break;
4892
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004893 case 283:
4894/* Line 1787 of yacc.c */
4895#line 2156 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004896 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004897 (yyval.a_marker).flags = EM_NOMARK;
4898 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004899 }
4900 break;
4901
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004902 case 284:
4903/* Line 1787 of yacc.c */
4904#line 2160 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07004905 { (yyval.a_marker) = (yyvsp[(1) - (1)].a_marker); }
4906 break;
4907
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004908 case 285:
4909/* Line 1787 of yacc.c */
4910#line 2164 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004911 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004912 (yyval.a_marker).flags = EM_OPTIONAL | EM_INDIRECT;
4913 (yyval.a_marker).default_value = 0;
Lev Walkin418298d2006-07-13 08:24:20 +00004914 }
4915 break;
4916
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004917 case 286:
4918/* Line 1787 of yacc.c */
4919#line 2168 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004920 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004921 (yyval.a_marker).flags = EM_DEFAULT;
4922 (yyval.a_marker).default_value = (yyvsp[(2) - (2)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004923 }
4924 break;
4925
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004926 case 287:
4927/* Line 1787 of yacc.c */
4928#line 2191 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004929 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004930 (yyval.a_expr) = NEW_EXPR();
4931 checkmem((yyval.a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004932 }
4933 break;
4934
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004935 case 288:
4936/* Line 1787 of yacc.c */
4937#line 2195 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004938 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004939 (yyval.a_expr) = (yyvsp[(2) - (3)].a_expr);
Lev Walkin418298d2006-07-13 08:24:20 +00004940 }
4941 break;
4942
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004943 case 289:
4944/* Line 1787 of yacc.c */
4945#line 2201 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004946 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004947 (yyval.a_expr) = NEW_EXPR();
4948 checkmem((yyval.a_expr));
4949 asn1p_expr_add((yyval.a_expr), (yyvsp[(1) - (1)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004950 }
4951 break;
4952
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004953 case 290:
4954/* Line 1787 of yacc.c */
4955#line 2206 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004956 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004957 (yyval.a_expr) = (yyvsp[(1) - (3)].a_expr);
4958 asn1p_expr_add((yyval.a_expr), (yyvsp[(3) - (3)].a_expr));
Lev Walkin418298d2006-07-13 08:24:20 +00004959 }
4960 break;
4961
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004962 case 291:
4963/* Line 1787 of yacc.c */
4964#line 2213 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004965 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004966 (yyval.a_expr) = NEW_EXPR();
4967 checkmem((yyval.a_expr));
4968 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4969 (yyval.a_expr)->meta_type = AMT_VALUE;
4970 (yyval.a_expr)->Identifier = (yyvsp[(1) - (1)].tv_str);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004971 }
4972 break;
4973
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004974 case 292:
4975/* Line 1787 of yacc.c */
4976#line 2220 "asn1p_y.y"
Lev Walkin4a4543f2006-10-13 12:37:39 +00004977 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004978 (yyval.a_expr) = NEW_EXPR();
4979 checkmem((yyval.a_expr));
4980 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4981 (yyval.a_expr)->meta_type = AMT_VALUE;
4982 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4983 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
Lev Walkin4a4543f2006-10-13 12:37:39 +00004984 }
4985 break;
4986
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08004987 case 293:
4988/* Line 1787 of yacc.c */
4989#line 2228 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00004990 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07004991 (yyval.a_expr) = NEW_EXPR();
4992 checkmem((yyval.a_expr));
4993 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
4994 (yyval.a_expr)->meta_type = AMT_VALUE;
4995 (yyval.a_expr)->Identifier = (yyvsp[(1) - (4)].tv_str);
4996 (yyval.a_expr)->value = (yyvsp[(3) - (4)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00004997 }
4998 break;
4999
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005000 case 294:
5001/* Line 1787 of yacc.c */
5002#line 2236 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00005003 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07005004 (yyval.a_expr) = NEW_EXPR();
5005 checkmem((yyval.a_expr));
5006 (yyval.a_expr)->expr_type = A1TC_UNIVERVAL;
5007 (yyval.a_expr)->meta_type = AMT_VALUE;
5008 (yyval.a_expr)->value = (yyvsp[(1) - (1)].a_value);
Lev Walkin418298d2006-07-13 08:24:20 +00005009 }
5010 break;
5011
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005012 case 295:
5013/* Line 1787 of yacc.c */
5014#line 2243 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00005015 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07005016 (yyval.a_expr) = NEW_EXPR();
5017 checkmem((yyval.a_expr));
5018 (yyval.a_expr)->Identifier = strdup("...");
5019 checkmem((yyval.a_expr)->Identifier);
5020 (yyval.a_expr)->expr_type = A1TC_EXTENSIBLE;
5021 (yyval.a_expr)->meta_type = AMT_VALUE;
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00005022 }
5023 break;
5024
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00005025 case 296:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005026/* Line 1787 of yacc.c */
5027#line 2254 "asn1p_y.y"
5028 {
5029 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
5030 checkmem((yyval.a_value));
5031 }
5032 break;
5033
5034 case 297:
5035/* Line 1787 of yacc.c */
5036#line 2258 "asn1p_y.y"
5037 {
5038 (yyval.a_value) = asn1p_value_fromint((yyvsp[(1) - (1)].a_int));
5039 checkmem((yyval.a_value));
5040 }
5041 break;
5042
5043 case 299:
5044/* Line 1787 of yacc.c */
5045#line 2266 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00005046 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07005047 (yyval.a_value) = asn1p_value_fromdouble((yyvsp[(1) - (1)].a_dbl));
5048 checkmem((yyval.a_value));
Lev Walkin418298d2006-07-13 08:24:20 +00005049 }
5050 break;
5051
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005052 case 300:
5053/* Line 1787 of yacc.c */
5054#line 2297 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005055 { memset(&(yyval.a_tag), 0, sizeof((yyval.a_tag))); }
5056 break;
5057
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005058 case 301:
5059/* Line 1787 of yacc.c */
5060#line 2298 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005061 { (yyval.a_tag) = (yyvsp[(1) - (1)].a_tag); }
5062 break;
5063
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005064 case 302:
5065/* Line 1787 of yacc.c */
5066#line 2302 "asn1p_y.y"
Lev Walkin418298d2006-07-13 08:24:20 +00005067 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07005068 (yyval.a_tag) = (yyvsp[(1) - (2)].a_tag);
5069 (yyval.a_tag).tag_mode = (yyvsp[(2) - (2)].a_tag).tag_mode;
Lev Walkin418298d2006-07-13 08:24:20 +00005070 }
5071 break;
5072
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005073 case 303:
5074/* Line 1787 of yacc.c */
5075#line 2309 "asn1p_y.y"
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00005076 {
Lev Walkin0e90aa02013-03-19 16:17:13 -07005077 (yyval.a_tag) = (yyvsp[(2) - (4)].a_tag);
5078 (yyval.a_tag).tag_value = (yyvsp[(3) - (4)].a_int);
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00005079 }
Lev Walkin5c541f12006-10-18 18:40:14 +00005080 break;
5081
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005082 case 304:
5083/* Line 1787 of yacc.c */
5084#line 2315 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005085 { (yyval.a_tag).tag_class = TC_CONTEXT_SPECIFIC; }
5086 break;
5087
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005088 case 305:
5089/* Line 1787 of yacc.c */
5090#line 2316 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005091 { (yyval.a_tag).tag_class = TC_UNIVERSAL; }
5092 break;
5093
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005094 case 306:
5095/* Line 1787 of yacc.c */
5096#line 2317 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005097 { (yyval.a_tag).tag_class = TC_APPLICATION; }
5098 break;
5099
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005100 case 307:
5101/* Line 1787 of yacc.c */
5102#line 2318 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005103 { (yyval.a_tag).tag_class = TC_PRIVATE; }
5104 break;
5105
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005106 case 308:
5107/* Line 1787 of yacc.c */
5108#line 2322 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005109 { (yyval.a_tag).tag_mode = TM_DEFAULT; }
5110 break;
5111
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005112 case 309:
5113/* Line 1787 of yacc.c */
5114#line 2323 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005115 { (yyval.a_tag).tag_mode = TM_IMPLICIT; }
5116 break;
5117
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005118 case 310:
5119/* Line 1787 of yacc.c */
5120#line 2324 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005121 { (yyval.a_tag).tag_mode = TM_EXPLICIT; }
5122 break;
5123
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00005124 case 311:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005125/* Line 1787 of yacc.c */
5126#line 2328 "asn1p_y.y"
5127 {
5128 checkmem((yyvsp[(1) - (1)].tv_str));
5129 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
5130 }
Lev Walkin1c8d5aa2006-10-27 05:37:39 +00005131 break;
5132
5133 case 312:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005134/* Line 1787 of yacc.c */
5135#line 2332 "asn1p_y.y"
Lev Walkin866bd7f2006-09-14 10:35:20 +00005136 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005137 checkmem((yyvsp[(1) - (1)].tv_str));
Lev Walkin0e90aa02013-03-19 16:17:13 -07005138 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
5139 }
5140 break;
5141
5142 case 313:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005143/* Line 1787 of yacc.c */
5144#line 2340 "asn1p_y.y"
5145 {
5146 checkmem((yyvsp[(1) - (1)].tv_str));
5147 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
5148 }
5149 break;
5150
5151 case 314:
5152/* Line 1787 of yacc.c */
5153#line 2347 "asn1p_y.y"
5154 { (yyval.tv_str) = 0; }
5155 break;
5156
5157 case 315:
5158/* Line 1787 of yacc.c */
5159#line 2348 "asn1p_y.y"
5160 {
5161 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
5162 }
5163 break;
5164
5165 case 316:
5166/* Line 1787 of yacc.c */
5167#line 2354 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005168 {
5169 checkmem((yyvsp[(1) - (1)].tv_str));
5170 (yyval.tv_str) = (yyvsp[(1) - (1)].tv_str);
Lev Walkin866bd7f2006-09-14 10:35:20 +00005171 }
5172 break;
5173
Lev Walkin418298d2006-07-13 08:24:20 +00005174
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005175/* Line 1787 of yacc.c */
5176#line 5169 "asn1p_y.y"
Lev Walkin0e90aa02013-03-19 16:17:13 -07005177 default: break;
Lev Walkin418298d2006-07-13 08:24:20 +00005178 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005179 /* User semantic actions sometimes alter yychar, and that requires
5180 that yytoken be updated with the new translation. We take the
5181 approach of translating immediately before every use of yytoken.
5182 One alternative is translating here after every semantic action,
5183 but that translation would be missed if the semantic action invokes
5184 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
5185 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
5186 incorrect destructor might then be invoked immediately. In the
5187 case of YYERROR or YYBACKUP, subsequent parser actions might lead
5188 to an incorrect destructor call or verbose syntax error message
5189 before the lookahead is translated. */
Lev Walkin0e90aa02013-03-19 16:17:13 -07005190 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Lev Walkin418298d2006-07-13 08:24:20 +00005191
Lev Walkin0e90aa02013-03-19 16:17:13 -07005192 YYPOPSTACK (yylen);
5193 yylen = 0;
5194 YY_STACK_PRINT (yyss, yyssp);
Lev Walkinf15320b2004-06-03 03:38:44 +00005195
5196 *++yyvsp = yyval;
5197
Lev Walkin418298d2006-07-13 08:24:20 +00005198 /* Now `shift' the result of the reduction. Determine what state
5199 that goes to, based on the state we popped back to and the rule
5200 number reduced by. */
Lev Walkinf15320b2004-06-03 03:38:44 +00005201
5202 yyn = yyr1[yyn];
5203
Lev Walkin418298d2006-07-13 08:24:20 +00005204 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5205 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Lev Walkinf15320b2004-06-03 03:38:44 +00005206 yystate = yytable[yystate];
5207 else
Lev Walkin418298d2006-07-13 08:24:20 +00005208 yystate = yydefgoto[yyn - YYNTOKENS];
Lev Walkinf15320b2004-06-03 03:38:44 +00005209
5210 goto yynewstate;
5211
Lev Walkinf15320b2004-06-03 03:38:44 +00005212
Lev Walkin418298d2006-07-13 08:24:20 +00005213/*------------------------------------.
5214| yyerrlab -- here on detecting error |
5215`------------------------------------*/
5216yyerrlab:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005217 /* Make sure we have latest lookahead translation. See comments at
5218 user semantic actions for why this is necessary. */
5219 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5220
Lev Walkin418298d2006-07-13 08:24:20 +00005221 /* If not already recovering from an error, report this error. */
5222 if (!yyerrstatus)
Lev Walkinf15320b2004-06-03 03:38:44 +00005223 {
5224 ++yynerrs;
Lev Walkin0e90aa02013-03-19 16:17:13 -07005225#if ! YYERROR_VERBOSE
5226 yyerror (YY_("syntax error"));
5227#else
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005228# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5229 yyssp, yytoken)
Lev Walkin0e90aa02013-03-19 16:17:13 -07005230 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005231 char const *yymsgp = YY_("syntax error");
5232 int yysyntax_error_status;
5233 yysyntax_error_status = YYSYNTAX_ERROR;
5234 if (yysyntax_error_status == 0)
5235 yymsgp = yymsg;
5236 else if (yysyntax_error_status == 1)
5237 {
5238 if (yymsg != yymsgbuf)
5239 YYSTACK_FREE (yymsg);
5240 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5241 if (!yymsg)
5242 {
5243 yymsg = yymsgbuf;
5244 yymsg_alloc = sizeof yymsgbuf;
5245 yysyntax_error_status = 2;
5246 }
5247 else
5248 {
5249 yysyntax_error_status = YYSYNTAX_ERROR;
5250 yymsgp = yymsg;
5251 }
5252 }
5253 yyerror (yymsgp);
5254 if (yysyntax_error_status == 2)
5255 goto yyexhaustedlab;
Lev Walkin0e90aa02013-03-19 16:17:13 -07005256 }
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005257# undef YYSYNTAX_ERROR
Lev Walkin0e90aa02013-03-19 16:17:13 -07005258#endif
5259 }
5260
5261
5262
5263 if (yyerrstatus == 3)
5264 {
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005265 /* If just tried and failed to reuse lookahead token after an
Lev Walkin0e90aa02013-03-19 16:17:13 -07005266 error, discard it. */
5267
5268 if (yychar <= YYEOF)
5269 {
5270 /* Return failure if at end of input. */
5271 if (yychar == YYEOF)
5272 YYABORT;
Lev Walkinf15320b2004-06-03 03:38:44 +00005273 }
5274 else
Lev Walkin0e90aa02013-03-19 16:17:13 -07005275 {
5276 yydestruct ("Error: discarding",
5277 yytoken, &yylval);
5278 yychar = YYEMPTY;
5279 }
Lev Walkinf15320b2004-06-03 03:38:44 +00005280 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005281
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005282 /* Else will try to reuse lookahead token after shifting the error
Lev Walkin0e90aa02013-03-19 16:17:13 -07005283 token. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005284 goto yyerrlab1;
Lev Walkinf15320b2004-06-03 03:38:44 +00005285
Lev Walkin418298d2006-07-13 08:24:20 +00005286
Lev Walkin0e90aa02013-03-19 16:17:13 -07005287/*---------------------------------------------------.
5288| yyerrorlab -- error raised explicitly by YYERROR. |
5289`---------------------------------------------------*/
5290yyerrorlab:
5291
5292 /* Pacify compilers like GCC when the user code never invokes
5293 YYERROR and the label yyerrorlab therefore never appears in user
5294 code. */
5295 if (/*CONSTCOND*/ 0)
5296 goto yyerrorlab;
5297
5298 /* Do not reclaim the symbols of the rule which action triggered
5299 this YYERROR. */
5300 YYPOPSTACK (yylen);
5301 yylen = 0;
5302 YY_STACK_PRINT (yyss, yyssp);
5303 yystate = *yyssp;
5304 goto yyerrlab1;
5305
5306
5307/*-------------------------------------------------------------.
5308| yyerrlab1 -- common code for both syntax error and YYERROR. |
5309`-------------------------------------------------------------*/
Lev Walkin418298d2006-07-13 08:24:20 +00005310yyerrlab1:
Lev Walkin418298d2006-07-13 08:24:20 +00005311 yyerrstatus = 3; /* Each real token shifted decrements this. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005312
Lev Walkin418298d2006-07-13 08:24:20 +00005313 for (;;)
Lev Walkina00d6b32006-03-21 03:40:38 +00005314 {
Lev Walkin418298d2006-07-13 08:24:20 +00005315 yyn = yypact[yystate];
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005316 if (!yypact_value_is_default (yyn))
Lev Walkin418298d2006-07-13 08:24:20 +00005317 {
5318 yyn += YYTERROR;
5319 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5320 {
5321 yyn = yytable[yyn];
5322 if (0 < yyn)
5323 break;
5324 }
5325 }
5326
5327 /* Pop the current state because it cannot handle the error token. */
5328 if (yyssp == yyss)
5329 YYABORT;
5330
Lev Walkin418298d2006-07-13 08:24:20 +00005331
Lev Walkin0e90aa02013-03-19 16:17:13 -07005332 yydestruct ("Error: popping",
5333 yystos[yystate], yyvsp);
5334 YYPOPSTACK (1);
5335 yystate = *yyssp;
5336 YY_STACK_PRINT (yyss, yyssp);
Lev Walkina00d6b32006-03-21 03:40:38 +00005337 }
Lev Walkina00d6b32006-03-21 03:40:38 +00005338
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005339 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Lev Walkinf15320b2004-06-03 03:38:44 +00005340 *++yyvsp = yylval;
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005341 YY_IGNORE_MAYBE_UNINITIALIZED_END
Lev Walkin418298d2006-07-13 08:24:20 +00005342
Lev Walkinf15320b2004-06-03 03:38:44 +00005343
Lev Walkin0e90aa02013-03-19 16:17:13 -07005344 /* Shift the error token. */
5345 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5346
Lev Walkinf15320b2004-06-03 03:38:44 +00005347 yystate = yyn;
5348 goto yynewstate;
5349
Lev Walkina00d6b32006-03-21 03:40:38 +00005350
Lev Walkin418298d2006-07-13 08:24:20 +00005351/*-------------------------------------.
5352| yyacceptlab -- YYACCEPT comes here. |
5353`-------------------------------------*/
5354yyacceptlab:
5355 yyresult = 0;
5356 goto yyreturn;
5357
5358/*-----------------------------------.
5359| yyabortlab -- YYABORT comes here. |
5360`-----------------------------------*/
5361yyabortlab:
5362 yyresult = 1;
5363 goto yyreturn;
5364
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005365#if !defined yyoverflow || YYERROR_VERBOSE
Lev Walkin0e90aa02013-03-19 16:17:13 -07005366/*-------------------------------------------------.
5367| yyexhaustedlab -- memory exhaustion comes here. |
5368`-------------------------------------------------*/
5369yyexhaustedlab:
5370 yyerror (YY_("memory exhausted"));
Lev Walkin418298d2006-07-13 08:24:20 +00005371 yyresult = 2;
5372 /* Fall through. */
Lev Walkina00d6b32006-03-21 03:40:38 +00005373#endif
Lev Walkin418298d2006-07-13 08:24:20 +00005374
5375yyreturn:
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005376 if (yychar != YYEMPTY)
5377 {
5378 /* Make sure we have latest lookahead translation. See comments at
5379 user semantic actions for why this is necessary. */
5380 yytoken = YYTRANSLATE (yychar);
5381 yydestruct ("Cleanup: discarding lookahead",
5382 yytoken, &yylval);
5383 }
Lev Walkin0e90aa02013-03-19 16:17:13 -07005384 /* Do not reclaim the symbols of the rule which action triggered
5385 this YYABORT or YYACCEPT. */
5386 YYPOPSTACK (yylen);
5387 YY_STACK_PRINT (yyss, yyssp);
5388 while (yyssp != yyss)
5389 {
5390 yydestruct ("Cleanup: popping",
5391 yystos[*yyssp], yyvsp);
5392 YYPOPSTACK (1);
5393 }
Lev Walkin418298d2006-07-13 08:24:20 +00005394#ifndef yyoverflow
5395 if (yyss != yyssa)
5396 YYSTACK_FREE (yyss);
5397#endif
Lev Walkin0e90aa02013-03-19 16:17:13 -07005398#if YYERROR_VERBOSE
5399 if (yymsg != yymsgbuf)
5400 YYSTACK_FREE (yymsg);
5401#endif
5402 /* Make sure YYID is used. */
5403 return YYID (yyresult);
Lev Walkinf15320b2004-06-03 03:38:44 +00005404}
Lev Walkin418298d2006-07-13 08:24:20 +00005405
5406
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +08005407/* Line 2050 of yacc.c */
5408#line 2360 "asn1p_y.y"
Lev Walkinf15320b2004-06-03 03:38:44 +00005409
5410
5411
5412/*
5413 * Convert Xstring ('0101'B or '5'H) to the binary vector.
5414 */
5415static asn1p_value_t *
5416_convert_bitstring2binary(char *str, int base) {
5417 asn1p_value_t *val;
5418 int slen;
5419 int memlen;
5420 int baselen;
5421 int bits;
5422 uint8_t *binary_vector;
5423 uint8_t *bv_ptr;
5424 uint8_t cur_val;
5425
5426 assert(str);
5427 assert(str[0] == '\'');
5428
5429 switch(base) {
5430 case 'B':
5431 baselen = 1;
5432 break;
5433 case 'H':
5434 baselen = 4;
5435 break;
5436 default:
5437 assert(base == 'B' || base == 'H');
5438 errno = EINVAL;
5439 return NULL;
5440 }
5441
5442 slen = strlen(str);
5443 assert(str[slen - 1] == base);
5444 assert(str[slen - 2] == '\'');
5445
5446 memlen = slen / (8 / baselen); /* Conservative estimate */
5447
5448 bv_ptr = binary_vector = malloc(memlen + 1);
5449 if(bv_ptr == NULL)
5450 /* ENOMEM */
5451 return NULL;
5452
5453 cur_val = 0;
5454 bits = 0;
5455 while(*(++str) != '\'') {
5456 switch(baselen) {
5457 case 1:
5458 switch(*str) {
5459 case '1':
5460 cur_val |= 1 << (7 - (bits % 8));
5461 case '0':
5462 break;
5463 default:
5464 assert(!"_y UNREACH1");
5465 case ' ': case '\r': case '\n':
5466 continue;
5467 }
5468 break;
5469 case 4:
5470 switch(*str) {
5471 case '0': case '1': case '2': case '3': case '4':
5472 case '5': case '6': case '7': case '8': case '9':
5473 cur_val |= (*str - '0') << (4 - (bits % 8));
5474 break;
5475 case 'A': case 'B': case 'C':
5476 case 'D': case 'E': case 'F':
5477 cur_val |= ((*str - 'A') + 10)
5478 << (4 - (bits % 8));
5479 break;
5480 default:
5481 assert(!"_y UNREACH2");
5482 case ' ': case '\r': case '\n':
5483 continue;
5484 }
5485 break;
5486 }
5487
5488 bits += baselen;
5489 if((bits % 8) == 0) {
5490 *bv_ptr++ = cur_val;
5491 cur_val = 0;
5492 }
5493 }
5494
5495 *bv_ptr = cur_val;
5496 assert((bv_ptr - binary_vector) <= memlen);
5497
5498 val = asn1p_value_frombits(binary_vector, bits, 0);
5499 if(val == NULL) {
5500 free(binary_vector);
5501 }
5502
5503 return val;
5504}
5505
Lev Walkin2e9bd5c2005-08-13 09:07:11 +00005506/*
5507 * For unnamed types (used in old X.208 compliant modules)
5508 * generate some sort of interim names, to not to force human being to fix
5509 * the specification's compliance to modern ASN.1 standards.
5510 */
5511static void
5512_fixup_anonymous_identifier(asn1p_expr_t *expr) {
5513 char *p;
5514 assert(expr->Identifier == 0);
5515
5516 /*
5517 * Try to figure out the type name
5518 * without going too much into details
5519 */
5520 expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
5521 if(expr->reference && expr->reference->comp_count > 0)
5522 expr->Identifier = expr->reference->components[0].name;
5523
5524 fprintf(stderr,
5525 "WARNING: Line %d: expected lower-case member identifier, "
5526 "found an unnamed %s.\n"
5527 "WARNING: Obsolete X.208 syntax detected, "
5528 "please give the member a name.\n",
5529 yylineno, expr->Identifier ? expr->Identifier : "type");
5530
5531 if(!expr->Identifier)
5532 expr->Identifier = "unnamed";
5533 expr->Identifier = strdup(expr->Identifier);
5534 assert(expr->Identifier);
5535 /* Make a lowercase identifier from the type name */
5536 for(p = expr->Identifier; *p; p++) {
5537 switch(*p) {
5538 case 'A' ... 'Z': *p += 32; break;
5539 case ' ': *p = '_'; break;
5540 case '-': *p = '_'; break;
5541 }
5542 }
5543 fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
5544 "Name clash may occur later.\n",
5545 expr->Identifier);
5546}
5547
Lev Walkinf15320b2004-06-03 03:38:44 +00005548int
5549yyerror(const char *msg) {
Lev Walkin9d542d22006-03-14 16:31:37 +00005550 extern char *asn1p_text;
Lev Walkinf15320b2004-06-03 03:38:44 +00005551 fprintf(stderr,
5552 "ASN.1 grammar parse error "
5553 "near line %d (token \"%s\"): %s\n",
Lev Walkinceb20e72004-09-05 10:40:41 +00005554 yylineno, asn1p_text, msg);
Lev Walkinf15320b2004-06-03 03:38:44 +00005555 return -1;
5556}
5557