1 // A Bison parser, made by GNU Bison 3.8.2.
2 
3 // Skeleton implementation for Bison GLR parsers in C
4 
5 // Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
6 
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 
12 // 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.
16 
17 // You should have received a copy of the GNU General Public License
18 // along with this program.  If not, see <https://www.gnu.org/licenses/>.
19 
20 // 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.
29 
30 // This special exception was added by the Free Software Foundation in
31 // version 2.2 of Bison.
32 
33 /* C GLR parser skeleton written by Paul Hilfinger.  */
34 
35 // DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
36 // especially those whose name start with YY_ or yy_.  They are
37 // private implementation details that can be changed or removed.
38 
39 /* Identify Bison output, and Bison version.  */
40 #define YYBISON 30802
41 
42 /* Bison version string.  */
43 #define YYBISON_VERSION "3.8.2"
44 
45 /* Skeleton name.  */
46 #define YYSKELETON_NAME "glr.cc"
47 
48 /* Pure parsers.  */
49 #define YYPURE 1
50 
51 
52 
53 
54 
55 
56 // First part of user prologue.
57 #line 17 "system/tools/aidl/aidl_language_y.yy"
58 
59 #include "aidl_language.h"
60 #include "parser.h"
61 #include "aidl_language_y.h"
62 #include "logging.h"
63 #include <android-base/parseint.h>
64 #include <set>
65 #include <map>
66 #include <stdio.h>
67 #include <stdlib.h>
68 #include <string.h>
69 
70 int yylex(yy::parser::semantic_type *, yy::parser::location_type *, void *);
71 
loc(const yy::parser::location_type & begin,const yy::parser::location_type & end)72 AidlLocation loc(const yy::parser::location_type& begin, const yy::parser::location_type& end) {
73   AIDL_FATAL_IF(begin.begin.filename != begin.end.filename, AIDL_LOCATION_HERE);
74   AIDL_FATAL_IF(begin.end.filename != end.begin.filename, AIDL_LOCATION_HERE);
75   AIDL_FATAL_IF(end.begin.filename != end.end.filename, AIDL_LOCATION_HERE);
76   AidlLocation::Point begin_point {
77     .line = begin.begin.line,
78     .column = begin.begin.column,
79   };
80   AidlLocation::Point end_point {
81     .line = end.end.line,
82     .column = end.end.column,
83   };
84   return AidlLocation(*begin.begin.filename, begin_point, end_point, AidlLocation::Source::EXTERNAL);
85 }
86 
loc(const yy::parser::location_type & l)87 AidlLocation loc(const yy::parser::location_type& l) {
88   return loc(l, l);
89 }
90 
91 #define lex_scanner ps->Scanner()
92 
93 
94 #line 95 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
95 
96 # ifndef YY_CAST
97 #  ifdef __cplusplus
98 #   define YY_CAST(Type, Val) static_cast<Type> (Val)
99 #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
100 #  else
101 #   define YY_CAST(Type, Val) ((Type) (Val))
102 #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
103 #  endif
104 # endif
105 # ifndef YY_NULLPTR
106 #  if defined __cplusplus
107 #   if 201103L <= __cplusplus
108 #    define YY_NULLPTR nullptr
109 #   else
110 #    define YY_NULLPTR 0
111 #   endif
112 #  else
113 #   define YY_NULLPTR ((void*)0)
114 #  endif
115 # endif
116 
117 #include "aidl_language_y.h"
118 
119 #ifndef YY_ATTRIBUTE_PURE
120 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
121 #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
122 # else
123 #  define YY_ATTRIBUTE_PURE
124 # endif
125 #endif
126 
127 #ifndef YY_ATTRIBUTE_UNUSED
128 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
129 #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
130 # else
131 #  define YY_ATTRIBUTE_UNUSED
132 # endif
133 #endif
134 
135 /* Suppress unused-variable warnings by "using" E.  */
136 #if ! defined lint || defined __GNUC__
137 # define YY_USE(E) ((void) (E))
138 #else
139 # define YY_USE(E) /* empty */
140 #endif
141 
142 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
143 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
144 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
145 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
146     _Pragma ("GCC diagnostic push")                                     \
147     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
148 # else
149 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
150     _Pragma ("GCC diagnostic push")                                     \
151     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
152     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
153 # endif
154 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
155     _Pragma ("GCC diagnostic pop")
156 #else
157 # define YY_INITIAL_VALUE(Value) Value
158 #endif
159 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
160 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
161 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
162 #endif
163 #ifndef YY_INITIAL_VALUE
164 # define YY_INITIAL_VALUE(Value) /* Nothing. */
165 #endif
166 
167 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
168 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
169     _Pragma ("GCC diagnostic push")                            \
170     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
171 # define YY_IGNORE_USELESS_CAST_END            \
172     _Pragma ("GCC diagnostic pop")
173 #endif
174 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
175 # define YY_IGNORE_USELESS_CAST_BEGIN
176 # define YY_IGNORE_USELESS_CAST_END
177 #endif
178 
179 # ifndef YY_NULLPTR
180 #  if defined __cplusplus
181 #   if 201103L <= __cplusplus
182 #    define YY_NULLPTR nullptr
183 #   else
184 #    define YY_NULLPTR 0
185 #   endif
186 #  else
187 #   define YY_NULLPTR ((void*)0)
188 #  endif
189 # endif
190 
191 // This skeleton is based on C, yet compiles it as C++.
192 // So expect warnings about C style casts.
193 #if defined __clang__ && 306 <= __clang_major__ * 100 + __clang_minor__
194 # pragma clang diagnostic ignored "-Wold-style-cast"
195 #elif defined __GNUC__ && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
196 # pragma GCC diagnostic ignored "-Wold-style-cast"
197 #endif
198 
199 // On MacOS, PTRDIFF_MAX is defined as long long, which Clang's
200 // -pedantic reports as being a C++11 extension.
201 #if defined __APPLE__ && YY_CPLUSPLUS < 201103L \
202     && defined __clang__ && 4 <= __clang_major__
203 # pragma clang diagnostic ignored "-Wc++11-long-long"
204 #endif
205 
206 #undef YYEMPTY
207 #define YYEMPTY yy::parser::token::YYEMPTY
208 #undef YYEOF
209 #define YYEOF yy::parser::token::YYEOF
210 #undef YYerror
211 #define YYerror yy::parser::token::YYerror
212 
213 #ifndef YYSTYPE
214 # define YYSTYPE yy::parser::value_type
215 #endif
216 #ifndef YYLTYPE
217 # define YYLTYPE yy::parser::location_type
218 #endif
219 
220 typedef yy::parser::symbol_kind_type yysymbol_kind_t;
221 
222 // Expose C++ symbol kinds to C.
223 #define S_YYEMPTY       yy::parser::symbol_kind::S_YYEMPTY
224 #define S_YYEOF         yy::parser::symbol_kind::S_YYEOF
225 #define S_YYerror       yy::parser::symbol_kind::S_YYerror
226 #define S_YYUNDEF       yy::parser::symbol_kind::S_YYUNDEF
227 #define S_PACKAGE       yy::parser::symbol_kind::S_PACKAGE
228 #define S_IMPORT        yy::parser::symbol_kind::S_IMPORT
229 #define S_ANNOTATION    yy::parser::symbol_kind::S_ANNOTATION
230 #define S_C_STR         yy::parser::symbol_kind::S_C_STR
231 #define S_IDENTIFIER    yy::parser::symbol_kind::S_IDENTIFIER
232 #define S_INTERFACE     yy::parser::symbol_kind::S_INTERFACE
233 #define S_PARCELABLE    yy::parser::symbol_kind::S_PARCELABLE
234 #define S_ONEWAY        yy::parser::symbol_kind::S_ONEWAY
235 #define S_ENUM          yy::parser::symbol_kind::S_ENUM
236 #define S_UNION         yy::parser::symbol_kind::S_UNION
237 #define S_CONST         yy::parser::symbol_kind::S_CONST
238 #define S_CHARVALUE     yy::parser::symbol_kind::S_CHARVALUE
239 #define S_FLOATVALUE    yy::parser::symbol_kind::S_FLOATVALUE
240 #define S_HEXVALUE      yy::parser::symbol_kind::S_HEXVALUE
241 #define S_INTVALUE      yy::parser::symbol_kind::S_INTVALUE
242 #define S_18_           yy::parser::symbol_kind::S_18_
243 #define S_19_           yy::parser::symbol_kind::S_19_
244 #define S_20_           yy::parser::symbol_kind::S_20_
245 #define S_21_           yy::parser::symbol_kind::S_21_
246 #define S_22_           yy::parser::symbol_kind::S_22_
247 #define S_23_           yy::parser::symbol_kind::S_23_
248 #define S_24_           yy::parser::symbol_kind::S_24_
249 #define S_25_           yy::parser::symbol_kind::S_25_
250 #define S_26_           yy::parser::symbol_kind::S_26_
251 #define S_27_           yy::parser::symbol_kind::S_27_
252 #define S_UNKNOWN       yy::parser::symbol_kind::S_UNKNOWN
253 #define S_CPP_HEADER    yy::parser::symbol_kind::S_CPP_HEADER
254 #define S_NDK_HEADER    yy::parser::symbol_kind::S_NDK_HEADER
255 #define S_RUST_TYPE     yy::parser::symbol_kind::S_RUST_TYPE
256 #define S_IN            yy::parser::symbol_kind::S_IN
257 #define S_INOUT         yy::parser::symbol_kind::S_INOUT
258 #define S_OUT           yy::parser::symbol_kind::S_OUT
259 #define S_TRUE_LITERAL  yy::parser::symbol_kind::S_TRUE_LITERAL
260 #define S_FALSE_LITERAL yy::parser::symbol_kind::S_FALSE_LITERAL
261 #define S_LOGICAL_OR    yy::parser::symbol_kind::S_LOGICAL_OR
262 #define S_LOGICAL_AND   yy::parser::symbol_kind::S_LOGICAL_AND
263 #define S_39_           yy::parser::symbol_kind::S_39_
264 #define S_40_           yy::parser::symbol_kind::S_40_
265 #define S_41_           yy::parser::symbol_kind::S_41_
266 #define S_EQUALITY      yy::parser::symbol_kind::S_EQUALITY
267 #define S_NEQ           yy::parser::symbol_kind::S_NEQ
268 #define S_44_           yy::parser::symbol_kind::S_44_
269 #define S_45_           yy::parser::symbol_kind::S_45_
270 #define S_LEQ           yy::parser::symbol_kind::S_LEQ
271 #define S_GEQ           yy::parser::symbol_kind::S_GEQ
272 #define S_LSHIFT        yy::parser::symbol_kind::S_LSHIFT
273 #define S_RSHIFT        yy::parser::symbol_kind::S_RSHIFT
274 #define S_50_           yy::parser::symbol_kind::S_50_
275 #define S_51_           yy::parser::symbol_kind::S_51_
276 #define S_52_           yy::parser::symbol_kind::S_52_
277 #define S_53_           yy::parser::symbol_kind::S_53_
278 #define S_54_           yy::parser::symbol_kind::S_54_
279 #define S_UNARY_PLUS    yy::parser::symbol_kind::S_UNARY_PLUS
280 #define S_UNARY_MINUS   yy::parser::symbol_kind::S_UNARY_MINUS
281 #define S_57_           yy::parser::symbol_kind::S_57_
282 #define S_58_           yy::parser::symbol_kind::S_58_
283 #define S_YYACCEPT      yy::parser::symbol_kind::S_YYACCEPT
284 #define S_document      yy::parser::symbol_kind::S_document
285 #define S_identifier    yy::parser::symbol_kind::S_identifier
286 #define S_optional_package yy::parser::symbol_kind::S_optional_package
287 #define S_imports       yy::parser::symbol_kind::S_imports
288 #define S_import        yy::parser::symbol_kind::S_import
289 #define S_qualified_name yy::parser::symbol_kind::S_qualified_name
290 #define S_decls         yy::parser::symbol_kind::S_decls
291 #define S_decl          yy::parser::symbol_kind::S_decl
292 #define S_unannotated_decl yy::parser::symbol_kind::S_unannotated_decl
293 #define S_type_params   yy::parser::symbol_kind::S_type_params
294 #define S_optional_type_params yy::parser::symbol_kind::S_optional_type_params
295 #define S_optional_unstructured_headers yy::parser::symbol_kind::S_optional_unstructured_headers
296 #define S_parcelable_decl yy::parser::symbol_kind::S_parcelable_decl
297 #define S_parcelable_members yy::parser::symbol_kind::S_parcelable_members
298 #define S_variable_decl yy::parser::symbol_kind::S_variable_decl
299 #define S_interface_decl yy::parser::symbol_kind::S_interface_decl
300 #define S_interface_members yy::parser::symbol_kind::S_interface_members
301 #define S_const_expr    yy::parser::symbol_kind::S_const_expr
302 #define S_constant_value_list yy::parser::symbol_kind::S_constant_value_list
303 #define S_constant_value_non_empty_list yy::parser::symbol_kind::S_constant_value_non_empty_list
304 #define S_constant_decl yy::parser::symbol_kind::S_constant_decl
305 #define S_enumerator    yy::parser::symbol_kind::S_enumerator
306 #define S_enumerators   yy::parser::symbol_kind::S_enumerators
307 #define S_enum_decl_body yy::parser::symbol_kind::S_enum_decl_body
308 #define S_enum_decl     yy::parser::symbol_kind::S_enum_decl
309 #define S_union_decl    yy::parser::symbol_kind::S_union_decl
310 #define S_method_decl   yy::parser::symbol_kind::S_method_decl
311 #define S_arg_non_empty_list yy::parser::symbol_kind::S_arg_non_empty_list
312 #define S_arg_list      yy::parser::symbol_kind::S_arg_list
313 #define S_arg           yy::parser::symbol_kind::S_arg
314 #define S_non_array_type yy::parser::symbol_kind::S_non_array_type
315 #define S_type          yy::parser::symbol_kind::S_type
316 #define S_type_args     yy::parser::symbol_kind::S_type_args
317 #define S_annotation_list yy::parser::symbol_kind::S_annotation_list
318 #define S_parameter     yy::parser::symbol_kind::S_parameter
319 #define S_parameter_list yy::parser::symbol_kind::S_parameter_list
320 #define S_parameter_non_empty_list yy::parser::symbol_kind::S_parameter_non_empty_list
321 #define S_annotation    yy::parser::symbol_kind::S_annotation
322 #define S_direction     yy::parser::symbol_kind::S_direction
323 
324 
325 /* Default (constant) value used for initialization for null
326    right-hand sides.  Unlike the standard yacc.c template, here we set
327    the default value of $$ to a zeroed-out value.  Since the default
328    value is undefined, this behavior is technically correct.  */
329 static YYSTYPE yyval_default;
330 static YYLTYPE yyloc_default
331 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
332   = { 1, 1, 1, 1 }
333 # endif
334 ;
335 
336 // Second part of user prologue.
337 #line 338 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
338 static void
339 yyerror (const yy::parser::location_type *yylocationp,
340          yy::parser& yyparser, Parser* ps,
341          const char* msg);
342 #line 343 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
343 
344 
345 #include <stddef.h>
346 #include <stdint.h>
347 #include <stdio.h>
348 #include <stdlib.h>
349 #include <string.h>
350 
351 #ifdef short
352 # undef short
353 #endif
354 
355 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
356    <limits.h> and (if available) <stdint.h> are included
357    so that the code can choose integer types of a good width.  */
358 
359 #ifndef __PTRDIFF_MAX__
360 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
361 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
362 #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
363 #  define YY_STDINT_H
364 # endif
365 #endif
366 
367 /* Narrow types that promote to a signed type and that can represent a
368    signed or unsigned integer of at least N bits.  In tables they can
369    save space and decrease cache pressure.  Promoting to a signed type
370    helps avoid bugs in integer arithmetic.  */
371 
372 #ifdef __INT_LEAST8_MAX__
373 typedef __INT_LEAST8_TYPE__ yytype_int8;
374 #elif defined YY_STDINT_H
375 typedef int_least8_t yytype_int8;
376 #else
377 typedef signed char yytype_int8;
378 #endif
379 
380 #ifdef __INT_LEAST16_MAX__
381 typedef __INT_LEAST16_TYPE__ yytype_int16;
382 #elif defined YY_STDINT_H
383 typedef int_least16_t yytype_int16;
384 #else
385 typedef short yytype_int16;
386 #endif
387 
388 /* Work around bug in HP-UX 11.23, which defines these macros
389    incorrectly for preprocessor constants.  This workaround can likely
390    be removed in 2023, as HPE has promised support for HP-UX 11.23
391    (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
392    <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
393 #ifdef __hpux
394 # undef UINT_LEAST8_MAX
395 # undef UINT_LEAST16_MAX
396 # define UINT_LEAST8_MAX 255
397 # define UINT_LEAST16_MAX 65535
398 #endif
399 
400 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
401 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
402 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
403        && UINT_LEAST8_MAX <= INT_MAX)
404 typedef uint_least8_t yytype_uint8;
405 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
406 typedef unsigned char yytype_uint8;
407 #else
408 typedef short yytype_uint8;
409 #endif
410 
411 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
412 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
413 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
414        && UINT_LEAST16_MAX <= INT_MAX)
415 typedef uint_least16_t yytype_uint16;
416 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
417 typedef unsigned short yytype_uint16;
418 #else
419 typedef int yytype_uint16;
420 #endif
421 #ifndef YYPTRDIFF_T
422 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
423 #  define YYPTRDIFF_T __PTRDIFF_TYPE__
424 #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
425 # elif defined PTRDIFF_MAX
426 #  ifndef ptrdiff_t
427 #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
428 #  endif
429 #  define YYPTRDIFF_T ptrdiff_t
430 #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
431 # else
432 #  define YYPTRDIFF_T long
433 #  define YYPTRDIFF_MAXIMUM LONG_MAX
434 # endif
435 #endif
436 
437 #ifndef YYSIZE_T
438 # ifdef __SIZE_TYPE__
439 #  define YYSIZE_T __SIZE_TYPE__
440 # elif defined size_t
441 #  define YYSIZE_T size_t
442 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
443 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
444 #  define YYSIZE_T size_t
445 # else
446 #  define YYSIZE_T unsigned
447 # endif
448 #endif
449 
450 #define YYSIZE_MAXIMUM                                  \
451   YY_CAST (YYPTRDIFF_T,                                 \
452            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
453             ? YYPTRDIFF_MAXIMUM                         \
454             : YY_CAST (YYSIZE_T, -1)))
455 
456 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
457 
458 
459 #ifndef YY_
460 # if defined YYENABLE_NLS && YYENABLE_NLS
461 #  if ENABLE_NLS
462 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
463 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
464 #  endif
465 # endif
466 # ifndef YY_
467 #  define YY_(Msgid) Msgid
468 # endif
469 #endif
470 
471 
472 #ifndef YYFREE
473 # define YYFREE free
474 #endif
475 #ifndef YYMALLOC
476 # define YYMALLOC malloc
477 #endif
478 #ifndef YYREALLOC
479 # define YYREALLOC realloc
480 #endif
481 
482 #ifdef __cplusplus
483   typedef bool yybool;
484 # define yytrue true
485 # define yyfalse false
486 #else
487   /* When we move to stdbool, get rid of the various casts to yybool.  */
488   typedef signed char yybool;
489 # define yytrue 1
490 # define yyfalse 0
491 #endif
492 
493 #ifndef YYSETJMP
494 # include <setjmp.h>
495 # define YYJMP_BUF jmp_buf
496 # define YYSETJMP(Env) setjmp (Env)
497 /* Pacify Clang and ICC.  */
498 # define YYLONGJMP(Env, Val)                    \
499  do {                                           \
500    longjmp (Env, Val);                          \
501    YY_ASSERT (0);                               \
502  } while (yyfalse)
503 #endif
504 
505 #ifndef YY_ATTRIBUTE_PURE
506 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
507 #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
508 # else
509 #  define YY_ATTRIBUTE_PURE
510 # endif
511 #endif
512 
513 #ifndef YY_ATTRIBUTE_UNUSED
514 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
515 #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
516 # else
517 #  define YY_ATTRIBUTE_UNUSED
518 # endif
519 #endif
520 
521 /* The _Noreturn keyword of C11.  */
522 #ifndef _Noreturn
523 # if (defined __cplusplus \
524       && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
525           || (defined _MSC_VER && 1900 <= _MSC_VER)))
526 #  define _Noreturn [[noreturn]]
527 # elif ((!defined __cplusplus || defined __clang__) \
528         && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
529             || (!defined __STRICT_ANSI__ \
530                 && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
531                     || (defined __apple_build_version__ \
532                         ? 6000000 <= __apple_build_version__ \
533                         : 3 < __clang_major__ + (5 <= __clang_minor__))))))
534    /* _Noreturn works as-is.  */
535 # elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \
536         || 0x5110 <= __SUNPRO_C)
537 #  define _Noreturn __attribute__ ((__noreturn__))
538 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
539 #  define _Noreturn __declspec (noreturn)
540 # else
541 #  define _Noreturn
542 # endif
543 #endif
544 
545 /* Suppress unused-variable warnings by "using" E.  */
546 #if ! defined lint || defined __GNUC__
547 # define YY_USE(E) ((void) (E))
548 #else
549 # define YY_USE(E) /* empty */
550 #endif
551 
552 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
553 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
554 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
555 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
556     _Pragma ("GCC diagnostic push")                                     \
557     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
558 # else
559 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
560     _Pragma ("GCC diagnostic push")                                     \
561     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
562     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
563 # endif
564 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
565     _Pragma ("GCC diagnostic pop")
566 #else
567 # define YY_INITIAL_VALUE(Value) Value
568 #endif
569 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
570 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
571 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
572 #endif
573 #ifndef YY_INITIAL_VALUE
574 # define YY_INITIAL_VALUE(Value) /* Nothing. */
575 #endif
576 
577 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
578 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
579     _Pragma ("GCC diagnostic push")                            \
580     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
581 # define YY_IGNORE_USELESS_CAST_END            \
582     _Pragma ("GCC diagnostic pop")
583 #endif
584 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
585 # define YY_IGNORE_USELESS_CAST_BEGIN
586 # define YY_IGNORE_USELESS_CAST_END
587 #endif
588 
589 
590 #define YY_ASSERT(E) ((void) (0 && (E)))
591 
592 /* YYFINAL -- State number of the termination state.  */
593 #define YYFINAL  10
594 /* YYLAST -- Last index in YYTABLE.  */
595 #define YYLAST   621
596 
597 /* YYNTOKENS -- Number of terminals.  */
598 #define YYNTOKENS  59
599 /* YYNNTS -- Number of nonterminals.  */
600 #define YYNNTS  40
601 /* YYNRULES -- Number of rules.  */
602 #define YYNRULES  126
603 /* YYNSTATES -- Number of states.  */
604 #define YYNSTATES  241
605 /* YYMAXRHS -- Maximum number of symbols on right-hand side of rule.  */
606 #define YYMAXRHS 10
607 /* YYMAXLEFT -- Maximum number of symbols to the left of a handle
608    accessed by $0, $-1, etc., in any rule.  */
609 #define YYMAXLEFT 0
610 
611 /* YYMAXUTOK -- Last valid token kind.  */
612 #define YYMAXUTOK   291
613 
614 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
615    as returned by yylex, with out-of-bounds checking.  */
616 #define YYTRANSLATE(YYX)                                \
617   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
618    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
619    : S_YYUNDEF)
620 
621 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
622    as returned by yylex.  */
623 static const yytype_int8 yytranslate[] =
624 {
625        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
626        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
627        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
628        2,     2,     2,    57,     2,     2,     2,    54,    41,     2,
629       18,    19,    52,    50,    20,    51,    24,    53,     2,     2,
630        2,     2,     2,     2,     2,     2,     2,     2,     2,    27,
631       44,    21,    45,     2,     2,     2,     2,     2,     2,     2,
632        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
633        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
634        2,    22,     2,    23,    40,     2,     2,     2,     2,     2,
635        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
636        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
637        2,     2,     2,    25,    39,    26,    58,     2,     2,     2,
638        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
639        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
640        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
641        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
642        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
643        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
644        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
645        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
646        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
647        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
648        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
649        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
650        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
651        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
652       15,    16,    17,    28,    29,    30,    31,    32,    33,    34,
653       35,    36,    37,    38,    42,    43,    46,    47,    48,    49,
654       55,    56
655 };
656 
657 #if YYDEBUG
658 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
659 static const yytype_int16 yyrline[] =
660 {
661        0,   187,   187,   214,   215,   216,   217,   221,   224,   232,
662      233,   240,   248,   251,   259,   265,   273,   286,   287,   288,
663      289,   293,   298,   305,   306,   311,   312,   318,   324,   333,
664      340,   346,   353,   356,   360,   364,   368,   374,   378,   386,
665      392,   398,   405,   414,   415,   417,   419,   424,   430,   431,
666      432,   436,   446,   450,   460,   464,   468,   471,   474,   477,
667      480,   483,   486,   489,   492,   495,   498,   501,   504,   507,
668      510,   513,   516,   519,   522,   525,   528,   531,   534,   537,
669      541,   551,   554,   557,   563,   567,   574,   586,   590,   597,
670      601,   608,   609,   613,   623,   632,   637,   646,   657,   674,
671      678,   685,   686,   690,   694,   700,   706,   710,   717,   725,
672      726,   738,   753,   761,   768,   769,   778,   784,   787,   792,
673      797,   808,   816,   825,   837,   839,   841
674 };
675 #endif
676 
677 #define YYPACT_NINF (-187)
678 #define YYTABLE_NINF (-115)
679 
680 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
681 // STATE-NUM.
682 static const yytype_int16 yypact[] =
683 {
684        9,   131,    16,  -187,  -187,  -187,  -187,  -187,  -187,    35,
685     -187,    10,   131,  -187,   131,  -187,    49,  -187,   279,  -187,
686       64,  -187,    39,    14,    24,    56,   131,   131,  -187,  -187,
687     -187,  -187,  -187,  -187,  -187,   245,    44,   126,    63,   -22,
688      131,   140,   -22,  -187,  -187,  -187,  -187,  -187,   183,   245,
689     -187,  -187,   245,   245,   245,   245,    82,    77,   267,  -187,
690       88,    96,  -187,  -187,  -187,  -187,   131,    94,   179,   131,
691     -187,   103,    98,   303,   511,   130,   147,  -187,  -187,  -187,
692     -187,   245,  -187,   245,   245,   245,   245,   245,   245,   245,
693      245,   245,   245,   245,   245,   245,   245,   245,   245,   245,
694      245,  -187,   131,   101,   389,  -187,   -17,  -187,   226,  -187,
695      125,  -187,    -2,  -187,  -187,  -187,  -187,   245,   511,   285,
696      527,   542,   556,   317,   567,   567,   412,   412,   412,   412,
697      172,   172,   119,   119,  -187,  -187,  -187,    82,  -187,   148,
698     -187,  -187,  -187,  -187,   133,   131,   401,  -187,   131,  -187,
699      416,  -187,   182,   185,   188,   443,   245,    92,  -187,   470,
700      511,  -187,  -187,   160,     4,    56,  -187,    77,  -187,   178,
701     -187,  -187,  -187,  -187,   131,   428,  -187,  -187,  -187,  -187,
702      511,  -187,  -187,  -187,   166,    12,    -7,   128,   136,   214,
703      131,   131,  -187,    29,  -187,  -187,  -187,  -187,  -187,  -187,
704      191,   196,  -187,   131,  -187,  -187,   335,   198,   206,   245,
705     -187,     3,   173,    12,   153,   115,  -187,   131,  -187,   136,
706      245,   465,  -187,  -187,  -187,   218,  -187,  -187,   217,   493,
707     -187,    80,   211,   120,  -187,  -187,  -187,   225,  -187,   219,
708     -187
709 };
710 
711 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
712 // Performed when YYTABLE does not specify something else to do.  Zero
713 // means the default is an error.
714 static const yytype_int8 yydefact[] =
715 {
716        7,     0,     0,     9,     3,     4,     5,     6,    12,     0,
717        1,   114,     0,     8,     0,    10,   114,    14,     0,    13,
718        0,    15,   121,     0,     0,     0,     0,     0,    16,    17,
719       18,    19,    20,   115,    11,   117,     0,     0,     0,    23,
720        0,     0,    23,    54,    50,    52,    53,    51,     0,    81,
721       48,    49,     0,     0,     0,     0,    12,    55,     0,   119,
722        0,   118,    43,    43,    39,    31,     0,    25,     0,     0,
723       93,     0,     0,     0,    84,     0,    82,    75,    76,    77,
724       78,     0,   122,     0,     0,     0,     0,     0,     0,     0,
725        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
726        0,   123,     0,     0,     0,    21,     0,    32,     0,    43,
727       88,    89,     0,    32,    80,    79,    56,    83,   116,    57,
728       58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
729       68,    69,    70,    71,    72,    73,    74,     0,   120,     0,
730       42,    46,    45,    44,   109,   114,     0,    40,     0,    24,
731        0,    29,     0,     0,     0,     0,     0,     0,    91,     0,
732       85,    47,   114,     0,     0,   114,   114,   105,    22,     0,
733       30,    35,    33,    34,   114,     0,    26,    27,    28,    41,
734       87,    92,    90,    94,   109,   112,     0,     0,   114,     0,
735      114,   114,    36,     0,   114,   114,   106,   124,   126,   125,
736      102,     0,    99,   114,   114,   110,     0,     0,     0,     0,
737       37,     0,   109,   113,   114,     0,   104,   114,   111,   114,
738        0,     0,   107,   114,   100,     0,    95,   103,     0,     0,
739       38,     0,     0,     0,    86,   108,    97,     0,    96,     0,
740       98
741 };
742 
743 // YYPGOTO[NTERM-NUM].
744 static const yytype_int16 yypgoto[] =
745 {
746     -187,  -187,    -8,  -187,  -187,  -187,     6,  -187,    -5,  -187,
747     -187,   205,  -187,  -187,   135,  -187,  -187,   -62,   -13,  -187,
748     -187,  -140,    97,  -187,  -187,  -187,  -187,  -187,  -187,    47,
749       53,   -97,   -99,  -186,   -11,   156,  -187,  -187,  -187,  -187
750 };
751 
752 // YYDEFGOTO[NTERM-NUM].
753 static const yytype_uint8 yydefgoto[] =
754 {
755        0,     2,     8,     3,    11,    15,    57,    16,   141,    28,
756      106,    67,   108,    29,   150,   172,    30,   103,    58,    75,
757       76,   142,   111,   112,    70,    31,    32,   143,   200,   201,
758      202,   144,   145,   186,   187,    59,    60,    61,    33,   204
759 };
760 
761 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
762 // positive, shift that token.  If negative, reduce the rule whose
763 // number is the opposite.  If YYTABLE_NINF, syntax error.
764 static const yytype_int16 yytable[] =
765 {
766       18,   104,    12,   148,    19,    18,    17,     9,   211,    22,
767      173,    21,     1,   195,    14,    36,    10,  -114,   157,   173,
768       20,     4,    66,   195,   158,    38,   189,    56,   149,    37,
769       39,     4,    41,    42,  -114,    73,    74,   231,   196,    77,
770       78,    79,    80,     5,     6,     7,    68,   155,   196,    -2,
771      209,   174,   222,     5,     6,     7,   210,    35,   105,    12,
772      174,   110,    13,   185,    40,   184,   190,   191,   118,    62,
773      119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
774      129,   130,   131,   132,   133,   134,   135,   136,    12,   203,
775       65,    34,   146,   146,   137,   185,   213,   184,   212,     4,
776      195,    12,   139,    81,   160,   217,  -114,   101,  -114,  -114,
777     -114,  -114,  -114,  -114,  -114,   203,   102,   114,   181,   107,
778      203,     5,     6,     7,   185,   196,   184,   140,   113,   235,
779     -114,  -114,  -114,    22,   164,     4,   225,   163,     4,   175,
780      168,   237,   226,   180,   146,   171,   156,   238,   175,   110,
781       12,    63,   167,    64,   171,  -101,   116,     5,     6,     7,
782        5,     6,     7,   164,    12,    69,   193,   117,   197,   198,
783      199,    98,    99,   100,   164,   161,   206,   162,   188,   164,
784      164,   167,   207,   208,    72,   197,   198,   199,   176,    43,
785        4,   177,   164,   167,   178,   216,   221,    44,    45,    46,
786       47,    48,   164,    12,   109,   192,   164,   229,    49,   227,
787      194,   214,     5,     6,     7,   215,   219,   223,    50,    51,
788       43,     4,    96,    97,    98,    99,   100,   220,    44,    45,
789       46,    47,    48,    52,    53,   232,   233,   205,   236,    49,
790       54,    55,   239,     5,     6,     7,   240,    71,   159,    50,
791       51,    43,     4,   151,   182,   152,   153,   154,   138,    44,
792       45,    46,    47,    48,    52,    53,   228,   224,     0,     0,
793       49,    54,    55,     0,     5,     6,     7,     0,     0,     0,
794       50,    51,     0,     0,    22,     0,    82,    23,    24,    25,
795       26,    27,     0,     0,     0,    52,    53,     0,     0,     0,
796        0,     0,    54,    55,    83,    84,    85,    86,    87,    88,
797       89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
798       99,   100,   115,    84,    85,    86,    87,    88,    89,    90,
799       91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
800       83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
801       93,    94,    95,    96,    97,    98,    99,   100,   218,    88,
802       89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
803       99,   100,    83,    84,    85,    86,    87,    88,    89,    90,
804       91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
805      139,     0,     0,     0,  -114,     0,  -114,  -114,  -114,  -114,
806     -114,  -114,  -114,     0,     0,     0,    22,     0,     4,    23,
807       24,   165,    26,    27,   166,   147,     0,   169,  -114,  -114,
808     -114,  -114,     0,  -114,  -114,  -114,  -114,  -114,  -114,  -114,
809        5,     6,     7,    22,     0,     4,    23,    24,    25,    26,
810       27,   166,   170,     0,   139,  -114,  -114,  -114,  -114,     0,
811     -114,  -114,  -114,  -114,  -114,  -114,  -114,     5,     6,     7,
812       94,    95,    96,    97,    98,    99,   100,     0,     0,   179,
813        0,   169,  -114,  -114,  -114,  -114,     0,  -114,  -114,  -114,
814     -114,  -114,  -114,  -114,     0,     0,     0,     0,     0,     0,
815        0,     0,   230,     0,     0,     0,   183,     0,     0,  -114,
816     -114,  -114,    83,    84,    85,    86,    87,    88,    89,    90,
817       91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
818      234,     0,     0,     0,     0,     0,     0,     0,     0,     0,
819       83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
820       93,    94,    95,    96,    97,    98,    99,   100,    83,    84,
821       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
822       95,    96,    97,    98,    99,   100,    85,    86,    87,    88,
823       89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
824       99,   100,    86,    87,    88,    89,    90,    91,    92,    93,
825       94,    95,    96,    97,    98,    99,   100,    87,    88,    89,
826       90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
827      100,    90,    91,    92,    93,    94,    95,    96,    97,    98,
828       99,   100
829 };
830 
831 static const yytype_int16 yycheck[] =
832 {
833       11,    63,    24,    20,    12,    16,    11,     1,   194,     5,
834      150,    16,     3,    20,     4,     1,     0,     5,    20,   159,
835       14,     7,    44,    20,    26,     1,    22,    35,    45,    23,
836       24,     7,    26,    27,    22,    48,    49,   223,    45,    52,
837       53,    54,    55,    29,    30,    31,    40,   109,    45,     0,
838       21,   150,    49,    29,    30,    31,    27,    18,    66,    24,
839      159,    69,    27,   162,     8,   162,   165,   166,    81,    25,
840       83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
841       93,    94,    95,    96,    97,    98,    99,   100,    24,   188,
842       27,    27,   103,   104,   102,   194,   195,   194,   195,     7,
843       20,    24,     1,    21,   117,   204,     5,    19,     7,     8,
844        9,    10,    11,    12,    13,   214,    20,    19,    26,    25,
845      219,    29,    30,    31,   223,    45,   223,    26,    25,    49,
846       29,    30,    31,     5,   145,     7,    21,   145,     7,   150,
847      148,    21,    27,   156,   155,   150,    21,    27,   159,   157,
848       24,    25,   146,    27,   159,    19,    26,    29,    30,    31,
849       29,    30,    31,   174,    24,    25,   174,    20,    32,    33,
850       34,    52,    53,    54,   185,    27,   189,    44,    18,   190,
851      191,   175,   190,   191,     1,    32,    33,    34,     6,     6,
852        7,     6,   203,   187,     6,   203,   209,    14,    15,    16,
853       17,    18,   213,    24,    25,    27,   217,   220,    25,   217,
854       44,    20,    29,    30,    31,    19,    18,    44,    35,    36,
855        6,     7,    50,    51,    52,    53,    54,    21,    14,    15,
856       16,    17,    18,    50,    51,    17,    19,    23,    27,    25,
857       57,    58,    17,    29,    30,    31,    27,    42,   113,    35,
858       36,     6,     7,    27,   157,    29,    30,    31,   102,    14,
859       15,    16,    17,    18,    50,    51,   219,   214,    -1,    -1,
860       25,    57,    58,    -1,    29,    30,    31,    -1,    -1,    -1,
861       35,    36,    -1,    -1,     5,    -1,    19,     8,     9,    10,
862       11,    12,    -1,    -1,    -1,    50,    51,    -1,    -1,    -1,
863       -1,    -1,    57,    58,    37,    38,    39,    40,    41,    42,
864       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
865       53,    54,    19,    38,    39,    40,    41,    42,    43,    44,
866       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
867       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
868       47,    48,    49,    50,    51,    52,    53,    54,    23,    42,
869       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
870       53,    54,    37,    38,    39,    40,    41,    42,    43,    44,
871       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
872        1,    -1,    -1,    -1,     5,    -1,     7,     8,     9,    10,
873       11,    12,    13,    -1,    -1,    -1,     5,    -1,     7,     8,
874        9,    10,    11,    12,    13,    26,    -1,     1,    29,    30,
875       31,     5,    -1,     7,     8,     9,    10,    11,    12,    13,
876       29,    30,    31,     5,    -1,     7,     8,     9,    10,    11,
877       12,    13,    26,    -1,     1,    29,    30,    31,     5,    -1,
878        7,     8,     9,    10,    11,    12,    13,    29,    30,    31,
879       48,    49,    50,    51,    52,    53,    54,    -1,    -1,    26,
880       -1,     1,    29,    30,    31,     5,    -1,     7,     8,     9,
881       10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,
882       -1,    -1,    27,    -1,    -1,    -1,    26,    -1,    -1,    29,
883       30,    31,    37,    38,    39,    40,    41,    42,    43,    44,
884       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
885       27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
886       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
887       47,    48,    49,    50,    51,    52,    53,    54,    37,    38,
888       39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
889       49,    50,    51,    52,    53,    54,    39,    40,    41,    42,
890       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
891       53,    54,    40,    41,    42,    43,    44,    45,    46,    47,
892       48,    49,    50,    51,    52,    53,    54,    41,    42,    43,
893       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
894       54,    44,    45,    46,    47,    48,    49,    50,    51,    52,
895       53,    54
896 };
897 
898 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
899 // state STATE-NUM.
900 static const yytype_int8 yystos[] =
901 {
902        0,     3,    60,    62,     7,    29,    30,    31,    61,    65,
903        0,    63,    24,    27,     4,    64,    66,    67,    93,    61,
904       65,    67,     5,     8,     9,    10,    11,    12,    68,    72,
905       75,    84,    85,    97,    27,    18,     1,    65,     1,    65,
906        8,    65,    65,     6,    14,    15,    16,    17,    18,    25,
907       35,    36,    50,    51,    57,    58,    61,    65,    77,    94,
908       95,    96,    25,    25,    27,    27,    44,    70,    65,    25,
909       83,    70,     1,    77,    77,    78,    79,    77,    77,    77,
910       77,    21,    19,    37,    38,    39,    40,    41,    42,    43,
911       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
912       54,    19,    20,    76,    76,    61,    69,    25,    71,    25,
913       61,    81,    82,    25,    19,    19,    26,    20,    77,    77,
914       77,    77,    77,    77,    77,    77,    77,    77,    77,    77,
915       77,    77,    77,    77,    77,    77,    77,    61,    94,     1,
916       26,    67,    80,    86,    90,    91,    93,    26,    20,    45,
917       73,    27,    29,    30,    31,    76,    21,    20,    26,    73,
918       77,    27,    44,    61,    93,    10,    13,    65,    61,     1,
919       26,    67,    74,    80,    91,    93,     6,     6,     6,    26,
920       77,    26,    81,    26,    90,    91,    92,    93,    18,    22,
921       91,    91,    27,    61,    44,    20,    45,    32,    33,    34,
922       87,    88,    89,    91,    98,    23,    77,    61,    61,    21,
923       27,    92,    90,    91,    20,    19,    61,    91,    23,    18,
924       21,    77,    49,    44,    89,    21,    27,    61,    88,    77,
925       27,    92,    17,    19,    27,    49,    27,    21,    27,    17,
926       27
927 };
928 
929 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
930 static const yytype_int8 yyr1[] =
931 {
932        0,    59,    60,    61,    61,    61,    61,    62,    62,    63,
933       63,    64,    65,    65,    66,    66,    67,    68,    68,    68,
934       68,    69,    69,    70,    70,    71,    71,    71,    71,    72,
935       72,    72,    73,    73,    73,    73,    73,    74,    74,    75,
936       75,    75,    75,    76,    76,    76,    76,    76,    77,    77,
937       77,    77,    77,    77,    77,    77,    77,    77,    77,    77,
938       77,    77,    77,    77,    77,    77,    77,    77,    77,    77,
939       77,    77,    77,    77,    77,    77,    77,    77,    77,    77,
940       77,    78,    78,    78,    79,    79,    80,    81,    81,    82,
941       82,    83,    83,    84,    85,    86,    86,    86,    86,    87,
942       87,    88,    88,    89,    89,    90,    90,    90,    90,    91,
943       91,    91,    92,    92,    93,    93,    94,    95,    95,    96,
944       96,    97,    97,    97,    98,    98,    98
945 };
946 
947 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
948 static const yytype_int8 yyr2[] =
949 {
950        0,     2,     3,     1,     1,     1,     1,     0,     3,     0,
951        2,     3,     1,     3,     1,     2,     2,     1,     1,     1,
952        1,     1,     3,     0,     3,     0,     3,     3,     3,     5,
953        6,     3,     0,     2,     2,     2,     3,     3,     5,     3,
954        5,     6,     5,     0,     2,     2,     2,     3,     1,     1,
955        1,     1,     1,     1,     1,     1,     3,     3,     3,     3,
956        3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
957        3,     3,     3,     3,     3,     2,     2,     2,     2,     3,
958        3,     0,     1,     2,     1,     3,     7,     3,     1,     1,
959        3,     3,     4,     3,     6,     6,     8,     8,    10,     1,
960        3,     0,     1,     3,     2,     2,     4,     6,     8,     1,
961        4,     5,     1,     3,     0,     2,     3,     0,     1,     1,
962        3,     1,     4,     4,     1,     1,     1
963 };
964 
965 
966 /* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none).  */
967 static const yytype_int8 yydprec[] =
968 {
969        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
970        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
971        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
972        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
973        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
974        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
975        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
976        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
977        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
978        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
979        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
980        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
981        0,     0,     0,     0,     0,     0,     0
982 };
983 
984 /* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM.  */
985 static const yytype_int8 yymerger[] =
986 {
987        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
988        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
989        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
990        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
991        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
992        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
993        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
994        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
995        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
996        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
997        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
998        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
999        0,     0,     0,     0,     0,     0,     0
1000 };
1001 
1002 /* YYIMMEDIATE[RULE-NUM] -- True iff rule #RULE-NUM is not to be deferred, as
1003    in the case of predicates.  */
1004 static const yybool yyimmediate[] =
1005 {
1006        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1007        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1008        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1009        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1010        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1011        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1012        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1013        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1014        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1015        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1016        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1017        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1018        0,     0,     0,     0,     0,     0,     0
1019 };
1020 
1021 /* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of
1022    list of conflicting reductions corresponding to action entry for
1023    state STATE-NUM in yytable.  0 means no conflicts.  The list in
1024    yyconfl is terminated by a rule number of 0.  */
1025 static const yytype_int8 yyconflp[] =
1026 {
1027        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1028        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1029        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1030        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1031        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1032        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1033        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1034        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1035        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1036        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1037        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1038        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1039        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1040        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1041        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1042        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1043        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1044        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1045        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1046        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1047        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1048        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1049        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1050        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1051        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1052        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1053        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1054        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1055        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1056        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1057        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1058        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1059        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1060        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1061        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1062        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1063        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1064        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1065        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1066        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1067        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1068        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1069        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1070        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1071        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1072        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1073        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1074        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1075        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1076        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1077        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1078        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1079        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1080        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1081        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1082        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1083        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1084        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1085        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1086        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1087        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1088        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1089        0,     0
1090 };
1091 
1092 /* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
1093    0, pointed into by YYCONFLP.  */
1094 static const short yyconfl[] =
1095 {
1096        0
1097 };
1098 
1099 
1100 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1101    If N is 0, then set CURRENT to the empty location which ends
1102    the previous symbol: RHS[0] (always defined).  */
1103 
1104 # ifndef YYLLOC_DEFAULT
1105 #  define YYLLOC_DEFAULT(Current, Rhs, N)                               \
1106     do                                                                  \
1107       if (N)                                                            \
1108         {                                                               \
1109           (Current).begin  = YYRHSLOC (Rhs, 1).begin;                   \
1110           (Current).end    = YYRHSLOC (Rhs, N).end;                     \
1111         }                                                               \
1112       else                                                              \
1113         {                                                               \
1114           (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;      \
1115         }                                                               \
1116     while (false)
1117 # endif
1118 
1119 # define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
1120 
1121 
1122 
1123 #undef yynerrs
1124 #define yynerrs (yystackp->yyerrcnt)
1125 #undef yychar
1126 #define yychar (yystackp->yyrawchar)
1127 #undef yylval
1128 #define yylval (yystackp->yyval)
1129 #undef yylloc
1130 #define yylloc (yystackp->yyloc)
1131 
1132 
1133 enum { YYENOMEM = -2 };
1134 
1135 typedef enum { yyok, yyaccept, yyabort, yyerr, yynomem } YYRESULTTAG;
1136 
1137 #define YYCHK(YYE)                              \
1138   do {                                          \
1139     YYRESULTTAG yychk_flag = YYE;               \
1140     if (yychk_flag != yyok)                     \
1141       return yychk_flag;                        \
1142   } while (0)
1143 
1144 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1145 #ifndef YYINITDEPTH
1146 # define YYINITDEPTH 200
1147 #endif
1148 
1149 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1150    if the built-in stack extension method is used).
1151 
1152    Do not make this value too large; the results are undefined if
1153    SIZE_MAX < YYMAXDEPTH * sizeof (GLRStackItem)
1154    evaluated with infinite-precision integer arithmetic.  */
1155 
1156 #ifndef YYMAXDEPTH
1157 # define YYMAXDEPTH 10000
1158 #endif
1159 
1160 /* Minimum number of free items on the stack allowed after an
1161    allocation.  This is to allow allocation and initialization
1162    to be completed by functions that call yyexpandGLRStack before the
1163    stack is expanded, thus insuring that all necessary pointers get
1164    properly redirected to new data.  */
1165 #define YYHEADROOM 2
1166 
1167 #ifndef YYSTACKEXPANDABLE
1168 #  define YYSTACKEXPANDABLE 1
1169 #endif
1170 
1171 #if YYSTACKEXPANDABLE
1172 # define YY_RESERVE_GLRSTACK(Yystack)                   \
1173   do {                                                  \
1174     if (Yystack->yyspaceLeft < YYHEADROOM)              \
1175       yyexpandGLRStack (Yystack);                       \
1176   } while (0)
1177 #else
1178 # define YY_RESERVE_GLRSTACK(Yystack)                   \
1179   do {                                                  \
1180     if (Yystack->yyspaceLeft < YYHEADROOM)              \
1181       yyMemoryExhausted (Yystack);                      \
1182   } while (0)
1183 #endif
1184 
1185 /** State numbers. */
1186 typedef int yy_state_t;
1187 
1188 /** Rule numbers. */
1189 typedef int yyRuleNum;
1190 
1191 /** Item references. */
1192 typedef short yyItemNum;
1193 
1194 typedef struct yyGLRState yyGLRState;
1195 typedef struct yyGLRStateSet yyGLRStateSet;
1196 typedef struct yySemanticOption yySemanticOption;
1197 typedef union yyGLRStackItem yyGLRStackItem;
1198 typedef struct yyGLRStack yyGLRStack;
1199 
1200 struct yyGLRState
1201 {
1202   /** Type tag: always true.  */
1203   yybool yyisState;
1204   /** Type tag for yysemantics.  If true, yyval applies, otherwise
1205    *  yyfirstVal applies.  */
1206   yybool yyresolved;
1207   /** Number of corresponding LALR(1) machine state.  */
1208   yy_state_t yylrState;
1209   /** Preceding state in this stack */
1210   yyGLRState* yypred;
1211   /** Source position of the last token produced by my symbol */
1212   YYPTRDIFF_T yyposn;
1213   union {
1214     /** First in a chain of alternative reductions producing the
1215      *  nonterminal corresponding to this state, threaded through
1216      *  yynext.  */
1217     yySemanticOption* yyfirstVal;
1218     /** Semantic value for this state.  */
1219     YYSTYPE yyval;
1220   } yysemantics;
1221   /** Source location for this state.  */
1222   YYLTYPE yyloc;
1223 };
1224 
1225 struct yyGLRStateSet
1226 {
1227   yyGLRState** yystates;
1228   /** During nondeterministic operation, yylookaheadNeeds tracks which
1229    *  stacks have actually needed the current lookahead.  During deterministic
1230    *  operation, yylookaheadNeeds[0] is not maintained since it would merely
1231    *  duplicate yychar != YYEMPTY.  */
1232   yybool* yylookaheadNeeds;
1233   YYPTRDIFF_T yysize;
1234   YYPTRDIFF_T yycapacity;
1235 };
1236 
1237 struct yySemanticOption
1238 {
1239   /** Type tag: always false.  */
1240   yybool yyisState;
1241   /** Rule number for this reduction */
1242   yyRuleNum yyrule;
1243   /** The last RHS state in the list of states to be reduced.  */
1244   yyGLRState* yystate;
1245   /** The lookahead for this reduction.  */
1246   int yyrawchar;
1247   YYSTYPE yyval;
1248   YYLTYPE yyloc;
1249   /** Next sibling in chain of options.  To facilitate merging,
1250    *  options are chained in decreasing order by address.  */
1251   yySemanticOption* yynext;
1252 };
1253 
1254 /** Type of the items in the GLR stack.  The yyisState field
1255  *  indicates which item of the union is valid.  */
1256 union yyGLRStackItem {
1257   yyGLRState yystate;
1258   yySemanticOption yyoption;
1259 };
1260 
1261 struct yyGLRStack {
1262   int yyerrState;
1263   /* To compute the location of the error token.  */
1264   yyGLRStackItem yyerror_range[3];
1265 
1266   int yyerrcnt;
1267   int yyrawchar;
1268   YYSTYPE yyval;
1269   YYLTYPE yyloc;
1270 
1271   YYJMP_BUF yyexception_buffer;
1272   yyGLRStackItem* yyitems;
1273   yyGLRStackItem* yynextFree;
1274   YYPTRDIFF_T yyspaceLeft;
1275   yyGLRState* yysplitPoint;
1276   yyGLRState* yylastDeleted;
1277   yyGLRStateSet yytops;
1278 };
1279 
1280 #if YYSTACKEXPANDABLE
1281 static void yyexpandGLRStack (yyGLRStack* yystackp);
1282 #endif
1283 
1284 _Noreturn static void
yyFail(yyGLRStack * yystackp,YYLTYPE * yylocp,yy::parser & yyparser,Parser * ps,const char * yymsg)1285 yyFail (yyGLRStack* yystackp, YYLTYPE *yylocp, yy::parser& yyparser, Parser* ps, const char* yymsg)
1286 {
1287   if (yymsg != YY_NULLPTR)
1288     yyerror (yylocp, yyparser, ps, yymsg);
1289   YYLONGJMP (yystackp->yyexception_buffer, 1);
1290 }
1291 
1292 _Noreturn static void
yyMemoryExhausted(yyGLRStack * yystackp)1293 yyMemoryExhausted (yyGLRStack* yystackp)
1294 {
1295   YYLONGJMP (yystackp->yyexception_buffer, 2);
1296 }
1297 
1298 /** Accessing symbol of state YYSTATE.  */
1299 static inline yysymbol_kind_t
yy_accessing_symbol(yy_state_t yystate)1300 yy_accessing_symbol (yy_state_t yystate)
1301 {
1302   return YY_CAST (yysymbol_kind_t, yystos[yystate]);
1303 }
1304 
1305 #if 1
1306 /* The user-facing name of the symbol whose (internal) number is
1307    YYSYMBOL.  No bounds checking.  */
1308 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1309 
1310 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1311    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
1312 static const char *const yytname[] =
1313 {
1314   "\"end of file\"", "error", "\"invalid token\"", "\"package\"",
1315   "\"import\"", "\"annotation\"", "\"string literal\"", "\"identifier\"",
1316   "\"interface\"", "\"parcelable\"", "\"oneway\"", "\"enum\"", "\"union\"",
1317   "\"const\"", "\"char literal\"", "\"float literal\"", "\"hex literal\"",
1318   "\"int literal\"", "'('", "')'", "','", "'='", "'['", "']'", "'.'",
1319   "'{'", "'}'", "';'", "\"unrecognized character\"",
1320   "\"cpp_header (which can also be used as an identifier)\"",
1321   "\"ndk_header (which can also be used as an identifier)\"",
1322   "\"rust_type (which can also be used as an identifier)\"", "\"in\"",
1323   "\"inout\"", "\"out\"", "\"true\"", "\"false\"", "LOGICAL_OR",
1324   "LOGICAL_AND", "'|'", "'^'", "'&'", "EQUALITY", "NEQ", "'<'", "'>'",
1325   "LEQ", "GEQ", "LSHIFT", "RSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'",
1326   "UNARY_PLUS", "UNARY_MINUS", "'!'", "'~'", "$accept", "document",
1327   "identifier", "optional_package", "imports", "import", "qualified_name",
1328   "decls", "decl", "unannotated_decl", "type_params",
1329   "optional_type_params", "optional_unstructured_headers",
1330   "parcelable_decl", "parcelable_members", "variable_decl",
1331   "interface_decl", "interface_members", "const_expr",
1332   "constant_value_list", "constant_value_non_empty_list", "constant_decl",
1333   "enumerator", "enumerators", "enum_decl_body", "enum_decl", "union_decl",
1334   "method_decl", "arg_non_empty_list", "arg_list", "arg", "non_array_type",
1335   "type", "type_args", "annotation_list", "parameter", "parameter_list",
1336   "parameter_non_empty_list", "annotation", "direction", YY_NULLPTR
1337 };
1338 
1339 static const char *
yysymbol_name(yysymbol_kind_t yysymbol)1340 yysymbol_name (yysymbol_kind_t yysymbol)
1341 {
1342   return yytname[yysymbol];
1343 }
1344 #endif
1345 
1346 /** Left-hand-side symbol for rule #YYRULE.  */
1347 static inline yysymbol_kind_t
yylhsNonterm(yyRuleNum yyrule)1348 yylhsNonterm (yyRuleNum yyrule)
1349 {
1350   return YY_CAST (yysymbol_kind_t, yyr1[yyrule]);
1351 }
1352 
1353 #if YYDEBUG
1354 
1355 # ifndef YYFPRINTF
1356 #  define YYFPRINTF fprintf
1357 # endif
1358 
1359 # define YY_FPRINTF                             \
1360   YY_IGNORE_USELESS_CAST_BEGIN YY_FPRINTF_
1361 
1362 # define YY_FPRINTF_(Args)                      \
1363   do {                                          \
1364     YYFPRINTF Args;                             \
1365     YY_IGNORE_USELESS_CAST_END                  \
1366   } while (0)
1367 
1368 # define YY_DPRINTF                             \
1369   YY_IGNORE_USELESS_CAST_BEGIN YY_DPRINTF_
1370 
1371 # define YY_DPRINTF_(Args)                      \
1372   do {                                          \
1373     if (yydebug)                                \
1374       YYFPRINTF Args;                           \
1375     YY_IGNORE_USELESS_CAST_END                  \
1376   } while (0)
1377 
1378 
1379 /* YYLOCATION_PRINT -- Print the location on the stream.
1380    This macro was not mandated originally: define only if we know
1381    we won't break user code: when these are the locations we know.  */
1382 
1383 # ifndef YYLOCATION_PRINT
1384 
1385 #  if defined YY_LOCATION_PRINT
1386 
1387    /* Temporary convenience wrapper in case some people defined the
1388       undocumented and private YY_LOCATION_PRINT macros.  */
1389 #   define YYLOCATION_PRINT(File, Loc)  YY_LOCATION_PRINT(File, *(Loc))
1390 
1391 #  elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1392 
1393 /* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
1394 
1395 YY_ATTRIBUTE_UNUSED
1396 static int
yy_location_print_(FILE * yyo,YYLTYPE const * const yylocp)1397 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1398 {
1399   int res = 0;
1400   int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1401   if (0 <= yylocp->first_line)
1402     {
1403       res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1404       if (0 <= yylocp->first_column)
1405         res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1406     }
1407   if (0 <= yylocp->last_line)
1408     {
1409       if (yylocp->first_line < yylocp->last_line)
1410         {
1411           res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1412           if (0 <= end_col)
1413             res += YYFPRINTF (yyo, ".%d", end_col);
1414         }
1415       else if (0 <= end_col && yylocp->first_column < end_col)
1416         res += YYFPRINTF (yyo, "-%d", end_col);
1417     }
1418   return res;
1419 }
1420 
1421 #   define YYLOCATION_PRINT  yy_location_print_
1422 
1423     /* Temporary convenience wrapper in case some people defined the
1424        undocumented and private YY_LOCATION_PRINT macros.  */
1425 #   define YY_LOCATION_PRINT(File, Loc)  YYLOCATION_PRINT(File, &(Loc))
1426 
1427 #  else
1428 
1429 #   define YYLOCATION_PRINT(File, Loc) ((void) 0)
1430     /* Temporary convenience wrapper in case some people defined the
1431        undocumented and private YY_LOCATION_PRINT macros.  */
1432 #   define YY_LOCATION_PRINT  YYLOCATION_PRINT
1433 
1434 #  endif
1435 # endif /* !defined YYLOCATION_PRINT */
1436 
1437 
1438 /*--------------------.
1439 | Print this symbol.  |
1440 `--------------------*/
1441 
1442 static void
yy_symbol_print(FILE *,yy::parser::symbol_kind_type yytoken,const yy::parser::value_type * yyvaluep,const yy::parser::location_type * yylocationp,yy::parser & yyparser,Parser * ps)1443 yy_symbol_print (FILE *, yy::parser::symbol_kind_type yytoken,
1444                  const yy::parser::value_type *yyvaluep,
1445                  const yy::parser::location_type *yylocationp, yy::parser& yyparser, Parser* ps)
1446 {
1447   YY_USE (yyparser);
1448   YY_USE (ps);
1449   yyparser.yy_symbol_print_ (yytoken, yyvaluep, yylocationp);
1450 }
1451 
1452 
1453 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                  \
1454   do {                                                                  \
1455     if (yydebug)                                                        \
1456       {                                                                 \
1457         YY_FPRINTF ((stderr, "%s ", Title));                            \
1458         yy_symbol_print (stderr, Kind, Value, Location, yyparser, ps);        \
1459         YY_FPRINTF ((stderr, "\n"));                                    \
1460       }                                                                 \
1461   } while (0)
1462 
1463 static inline void
1464 yy_reduce_print (yybool yynormal, yyGLRStackItem* yyvsp, YYPTRDIFF_T yyk,
1465                  yyRuleNum yyrule, yy::parser& yyparser, Parser* ps);
1466 
1467 # define YY_REDUCE_PRINT(Args)          \
1468   do {                                  \
1469     if (yydebug)                        \
1470       yy_reduce_print Args;             \
1471   } while (0)
1472 
1473 /* Nonzero means print parse trace.  It is left uninitialized so that
1474    multiple parsers can coexist.  */
1475 int yydebug;
1476 
1477 static void yypstack (yyGLRStack* yystackp, YYPTRDIFF_T yyk)
1478   YY_ATTRIBUTE_UNUSED;
1479 static void yypdumpstack (yyGLRStack* yystackp)
1480   YY_ATTRIBUTE_UNUSED;
1481 
1482 #else /* !YYDEBUG */
1483 
1484 # define YY_DPRINTF(Args) do {} while (yyfalse)
1485 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1486 # define YY_REDUCE_PRINT(Args)
1487 
1488 #endif /* !YYDEBUG */
1489 
1490 #ifndef yystrlen
1491 # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1492 #endif
1493 
1494 #ifndef yystpcpy
1495 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1496 #  define yystpcpy stpcpy
1497 # else
1498 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1499    YYDEST.  */
1500 static char *
yystpcpy(char * yydest,const char * yysrc)1501 yystpcpy (char *yydest, const char *yysrc)
1502 {
1503   char *yyd = yydest;
1504   const char *yys = yysrc;
1505 
1506   while ((*yyd++ = *yys++) != '\0')
1507     continue;
1508 
1509   return yyd - 1;
1510 }
1511 # endif
1512 #endif
1513 
1514 #ifndef yytnamerr
1515 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1516    quotes and backslashes, so that it's suitable for yyerror.  The
1517    heuristic is that double-quoting is unnecessary unless the string
1518    contains an apostrophe, a comma, or backslash (other than
1519    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1520    null, do not copy; instead, return the length of what the result
1521    would have been.  */
1522 static YYPTRDIFF_T
yytnamerr(char * yyres,const char * yystr)1523 yytnamerr (char *yyres, const char *yystr)
1524 {
1525   if (*yystr == '"')
1526     {
1527       YYPTRDIFF_T yyn = 0;
1528       char const *yyp = yystr;
1529 
1530       for (;;)
1531         switch (*++yyp)
1532           {
1533           case '\'':
1534           case ',':
1535             goto do_not_strip_quotes;
1536 
1537           case '\\':
1538             if (*++yyp != '\\')
1539               goto do_not_strip_quotes;
1540             else
1541               goto append;
1542 
1543           append:
1544           default:
1545             if (yyres)
1546               yyres[yyn] = *yyp;
1547             yyn++;
1548             break;
1549 
1550           case '"':
1551             if (yyres)
1552               yyres[yyn] = '\0';
1553             return yyn;
1554           }
1555     do_not_strip_quotes: ;
1556     }
1557 
1558   if (yyres)
1559     return yystpcpy (yyres, yystr) - yyres;
1560   else
1561     return yystrlen (yystr);
1562 }
1563 #endif
1564 
1565 
1566 /** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting
1567  *  at YYVSP[YYLOW0].yystate.yypred.  Leaves YYVSP[YYLOW1].yystate.yypred
1568  *  containing the pointer to the next state in the chain.  */
1569 static void yyfillin (yyGLRStackItem *, int, int) YY_ATTRIBUTE_UNUSED;
1570 static void
yyfillin(yyGLRStackItem * yyvsp,int yylow0,int yylow1)1571 yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1)
1572 {
1573   int i;
1574   yyGLRState *s = yyvsp[yylow0].yystate.yypred;
1575   for (i = yylow0-1; i >= yylow1; i -= 1)
1576     {
1577 #if YYDEBUG
1578       yyvsp[i].yystate.yylrState = s->yylrState;
1579 #endif
1580       yyvsp[i].yystate.yyresolved = s->yyresolved;
1581       if (s->yyresolved)
1582         yyvsp[i].yystate.yysemantics.yyval = s->yysemantics.yyval;
1583       else
1584         /* The effect of using yyval or yyloc (in an immediate rule) is
1585          * undefined.  */
1586         yyvsp[i].yystate.yysemantics.yyfirstVal = YY_NULLPTR;
1587       yyvsp[i].yystate.yyloc = s->yyloc;
1588       s = yyvsp[i].yystate.yypred = s->yypred;
1589     }
1590 }
1591 
1592 
1593 /** If yychar is empty, fetch the next token.  */
1594 static inline yysymbol_kind_t
yygetToken(int * yycharp,yyGLRStack * yystackp,yy::parser & yyparser,Parser * ps)1595 yygetToken (int *yycharp, yyGLRStack* yystackp, yy::parser& yyparser, Parser* ps)
1596 {
1597   yysymbol_kind_t yytoken;
1598   YY_USE (yyparser);
1599   YY_USE (ps);
1600   if (*yycharp == YYEMPTY)
1601     {
1602       YY_DPRINTF ((stderr, "Reading a token\n"));
1603 #if YY_EXCEPTIONS
1604       try
1605         {
1606 #endif // YY_EXCEPTIONS
1607           *yycharp = yylex (&yylval, &yylloc, lex_scanner);
1608 #if YY_EXCEPTIONS
1609         }
1610       catch (const yy::parser::syntax_error& yyexc)
1611         {
1612           YY_DPRINTF ((stderr, "Caught exception: %s\n", yyexc.what()));
1613           yylloc = yyexc.location;
1614           yyerror (&yylloc, yyparser, ps, yyexc.what ());
1615           // Map errors caught in the scanner to the undefined token,
1616           // so that error handling is started.  However, record this
1617           // with this special value of yychar.
1618           *yycharp = YYerror;
1619         }
1620 #endif // YY_EXCEPTIONS
1621     }
1622   if (*yycharp <= YYEOF)
1623     {
1624       *yycharp = YYEOF;
1625       yytoken = S_YYEOF;
1626       YY_DPRINTF ((stderr, "Now at end of input.\n"));
1627     }
1628   else
1629     {
1630       yytoken = YYTRANSLATE (*yycharp);
1631       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1632     }
1633   return yytoken;
1634 }
1635 
1636 /* Do nothing if YYNORMAL or if *YYLOW <= YYLOW1.  Otherwise, fill in
1637  * YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1.
1638  * For convenience, always return YYLOW1.  */
1639 static inline int yyfill (yyGLRStackItem *, int *, int, yybool)
1640      YY_ATTRIBUTE_UNUSED;
1641 static inline int
yyfill(yyGLRStackItem * yyvsp,int * yylow,int yylow1,yybool yynormal)1642 yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal)
1643 {
1644   if (!yynormal && yylow1 < *yylow)
1645     {
1646       yyfillin (yyvsp, *yylow, yylow1);
1647       *yylow = yylow1;
1648     }
1649   return yylow1;
1650 }
1651 
1652 /** Perform user action for rule number YYN, with RHS length YYRHSLEN,
1653  *  and top stack item YYVSP.  YYLVALP points to place to put semantic
1654  *  value ($$), and yylocp points to place for location information
1655  *  (@$).  Returns yyok for normal return, yyaccept for YYACCEPT,
1656  *  yyerr for YYERROR, yyabort for YYABORT, yynomem for YYNOMEM.  */
1657 static YYRESULTTAG
yyuserAction(yyRuleNum yyrule,int yyrhslen,yyGLRStackItem * yyvsp,yyGLRStack * yystackp,YYPTRDIFF_T yyk,YYSTYPE * yyvalp,YYLTYPE * yylocp,yy::parser & yyparser,Parser * ps)1658 yyuserAction (yyRuleNum yyrule, int yyrhslen, yyGLRStackItem* yyvsp,
1659               yyGLRStack* yystackp, YYPTRDIFF_T yyk,
1660               YYSTYPE* yyvalp, YYLTYPE *yylocp, yy::parser& yyparser, Parser* ps)
1661 {
1662   const yybool yynormal YY_ATTRIBUTE_UNUSED = yystackp->yysplitPoint == YY_NULLPTR;
1663   int yylow = 1;
1664   YY_USE (yyvalp);
1665   YY_USE (yylocp);
1666   YY_USE (yyparser);
1667   YY_USE (ps);
1668   YY_USE (yyk);
1669   YY_USE (yyrhslen);
1670 # undef yyerrok
1671 # define yyerrok (yystackp->yyerrState = 0)
1672 # undef YYACCEPT
1673 # define YYACCEPT return yyaccept
1674 # undef YYABORT
1675 # define YYABORT return yyabort
1676 # undef YYNOMEM
1677 # define YYNOMEM return yynomem
1678 # undef YYERROR
1679 # define YYERROR return yyerrok, yyerr
1680 # undef YYRECOVERING
1681 # define YYRECOVERING() (yystackp->yyerrState != 0)
1682 # undef yyclearin
1683 # define yyclearin (yychar = YYEMPTY)
1684 # undef YYFILL
1685 # define YYFILL(N) yyfill (yyvsp, &yylow, (N), yynormal)
1686 # undef YYBACKUP
1687 # define YYBACKUP(Token, Value)                                              \
1688   return yyerror (yylocp, yyparser, ps, YY_("syntax error: cannot back up")),     \
1689          yyerrok, yyerr
1690 
1691   if (yyrhslen == 0)
1692     *yyvalp = yyval_default;
1693   else
1694     *yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yyval;
1695   /* Default location. */
1696   YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
1697   yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
1698   /* If yyk == -1, we are running a deferred action on a temporary
1699      stack.  In that case, YY_REDUCE_PRINT must not play with YYFILL,
1700      so pretend the stack is "normal". */
1701   YY_REDUCE_PRINT ((yynormal || yyk == -1, yyvsp, yyk, yyrule, yyparser, ps));
1702 #if YY_EXCEPTIONS
1703   typedef yy::parser::syntax_error syntax_error;
1704   try
1705   {
1706 #endif // YY_EXCEPTIONS
1707   switch (yyrule)
1708     {
1709   case 2: // document: optional_package imports decls
1710 #line 187 "system/tools/aidl/aidl_language_y.yy"
1711                                   {
1712     std::vector<std::string> imports;
1713     for (const auto& import : *(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token_list)) {
1714       imports.push_back(import->GetText());
1715     }
1716 
1717     ps->MakeDocument(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), Comments(), std::move(imports), std::move(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declarations)));
1718 
1719     for (auto i = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token_list)->rbegin(); i != (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token_list)->rend(); ++i) {
1720       ps->GetDocument()->PrependComments((*i)->GetComments());
1721     }
1722     if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)) {
1723       ps->GetDocument()->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)->GetComments());
1724     }
1725 
1726     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
1727     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token_list);
1728     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declarations);
1729   }
1730 #line 1731 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1731     break;
1732 
1733   case 3: // identifier: "identifier"
1734 #line 214 "system/tools/aidl/aidl_language_y.yy"
1735    { ((*yyvalp).token) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token); }
1736 #line 1737 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1737     break;
1738 
1739   case 4: // identifier: "cpp_header (which can also be used as an identifier)"
1740 #line 215 "system/tools/aidl/aidl_language_y.yy"
1741    { ((*yyvalp).token) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token); }
1742 #line 1743 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1743     break;
1744 
1745   case 5: // identifier: "ndk_header (which can also be used as an identifier)"
1746 #line 216 "system/tools/aidl/aidl_language_y.yy"
1747    { ((*yyvalp).token) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token); }
1748 #line 1749 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1749     break;
1750 
1751   case 6: // identifier: "rust_type (which can also be used as an identifier)"
1752 #line 217 "system/tools/aidl/aidl_language_y.yy"
1753    { ((*yyvalp).token) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token); }
1754 #line 1755 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1755     break;
1756 
1757   case 7: // optional_package: %empty
1758 #line 221 "system/tools/aidl/aidl_language_y.yy"
1759    {
1760     ((*yyvalp).token) = nullptr;
1761  }
1762 #line 1763 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1763     break;
1764 
1765   case 8: // optional_package: "package" qualified_name ';'
1766 #line 224 "system/tools/aidl/aidl_language_y.yy"
1767                               {
1768     ps->SetPackage((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText());
1769     ((*yyvalp).token) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token); // for comments
1770     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
1771   }
1772 #line 1773 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1773     break;
1774 
1775   case 9: // imports: %empty
1776 #line 232 "system/tools/aidl/aidl_language_y.yy"
1777    { ((*yyvalp).token_list) = new std::vector<std::unique_ptr<AidlToken>>(); }
1778 #line 1779 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1779     break;
1780 
1781   case 10: // imports: imports import
1782 #line 234 "system/tools/aidl/aidl_language_y.yy"
1783   {
1784     ((*yyvalp).token_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token_list);
1785     ((*yyvalp).token_list)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token));
1786   }
1787 #line 1788 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1788     break;
1789 
1790   case 11: // import: "import" qualified_name ';'
1791 #line 240 "system/tools/aidl/aidl_language_y.yy"
1792                              {
1793     // carry the comments before "import" token
1794     ((*yyvalp).token) = new AidlToken((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)->GetComments());
1795     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
1796     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
1797   }
1798 #line 1799 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1799     break;
1800 
1801   case 12: // qualified_name: identifier
1802 #line 248 "system/tools/aidl/aidl_language_y.yy"
1803               {
1804     ((*yyvalp).token) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
1805   }
1806 #line 1807 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1807     break;
1808 
1809   case 13: // qualified_name: qualified_name '.' identifier
1810 #line 252 "system/tools/aidl/aidl_language_y.yy"
1811   { ((*yyvalp).token) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
1812     ((*yyvalp).token)->Append('.');
1813     ((*yyvalp).token)->Append((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
1814     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
1815   }
1816 #line 1817 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1817     break;
1818 
1819   case 14: // decls: decl
1820 #line 260 "system/tools/aidl/aidl_language_y.yy"
1821   { ((*yyvalp).declarations) = new std::vector<std::unique_ptr<AidlDefinedType>>();
1822     if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration) != nullptr) {
1823       ((*yyvalp).declarations)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration));
1824     }
1825   }
1826 #line 1827 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1827     break;
1828 
1829   case 15: // decls: decls decl
1830 #line 266 "system/tools/aidl/aidl_language_y.yy"
1831   { ((*yyvalp).declarations) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.declarations);
1832     if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration) != nullptr) {
1833       ((*yyvalp).declarations)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration));
1834     }
1835   }
1836 #line 1837 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1837     break;
1838 
1839   case 16: // decl: annotation_list unannotated_decl
1840 #line 274 "system/tools/aidl/aidl_language_y.yy"
1841    {
1842     ((*yyvalp).declaration) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration);
1843 
1844     if (((*yyvalp).declaration) != nullptr) {
1845       ((*yyvalp).declaration)->Annotate(std::move(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.annotation_list)));
1846     }
1847 
1848     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.annotation_list);
1849    }
1850 #line 1851 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1851     break;
1852 
1853   case 17: // unannotated_decl: parcelable_decl
1854 #line 286 "system/tools/aidl/aidl_language_y.yy"
1855    { ((*yyvalp).declaration) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration); }
1856 #line 1857 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1857     break;
1858 
1859   case 18: // unannotated_decl: interface_decl
1860 #line 287 "system/tools/aidl/aidl_language_y.yy"
1861    { ((*yyvalp).declaration) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration); }
1862 #line 1863 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1863     break;
1864 
1865   case 19: // unannotated_decl: enum_decl
1866 #line 288 "system/tools/aidl/aidl_language_y.yy"
1867    { ((*yyvalp).declaration) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration); }
1868 #line 1869 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1869     break;
1870 
1871   case 20: // unannotated_decl: union_decl
1872 #line 289 "system/tools/aidl/aidl_language_y.yy"
1873    { ((*yyvalp).declaration) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration); }
1874 #line 1875 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1875     break;
1876 
1877   case 21: // type_params: identifier
1878 #line 293 "system/tools/aidl/aidl_language_y.yy"
1879               {
1880     ((*yyvalp).type_params) = new std::vector<std::string>();
1881     ((*yyvalp).type_params)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
1882     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
1883   }
1884 #line 1885 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1885     break;
1886 
1887   case 22: // type_params: type_params ',' identifier
1888 #line 298 "system/tools/aidl/aidl_language_y.yy"
1889                               {
1890     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.type_params)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
1891     ((*yyvalp).type_params) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.type_params);
1892     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
1893   }
1894 #line 1895 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1895     break;
1896 
1897   case 23: // optional_type_params: %empty
1898 #line 305 "system/tools/aidl/aidl_language_y.yy"
1899               { ((*yyvalp).type_params) = nullptr; }
1900 #line 1901 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1901     break;
1902 
1903   case 24: // optional_type_params: '<' type_params '>'
1904 #line 306 "system/tools/aidl/aidl_language_y.yy"
1905                        {
1906    ((*yyvalp).type_params) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.type_params);
1907  }
1908 #line 1909 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1909     break;
1910 
1911   case 25: // optional_unstructured_headers: %empty
1912 #line 311 "system/tools/aidl/aidl_language_y.yy"
1913               { ((*yyvalp).unstructured_headers) = new AidlUnstructuredHeaders; }
1914 #line 1915 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1915     break;
1916 
1917   case 26: // optional_unstructured_headers: optional_unstructured_headers "cpp_header (which can also be used as an identifier)" "string literal"
1918 #line 312 "system/tools/aidl/aidl_language_y.yy"
1919                                                   {
1920      ((*yyvalp).unstructured_headers) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.unstructured_headers);
1921      ((*yyvalp).unstructured_headers)->cpp = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText();
1922      delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
1923      delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
1924  }
1925 #line 1926 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1926     break;
1927 
1928   case 27: // optional_unstructured_headers: optional_unstructured_headers "ndk_header (which can also be used as an identifier)" "string literal"
1929 #line 318 "system/tools/aidl/aidl_language_y.yy"
1930                                                   {
1931      ((*yyvalp).unstructured_headers) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.unstructured_headers);
1932      ((*yyvalp).unstructured_headers)->ndk = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText();
1933      delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
1934      delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
1935  }
1936 #line 1937 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1937     break;
1938 
1939   case 28: // optional_unstructured_headers: optional_unstructured_headers "rust_type (which can also be used as an identifier)" "string literal"
1940 #line 324 "system/tools/aidl/aidl_language_y.yy"
1941                                                  {
1942      ((*yyvalp).unstructured_headers) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.unstructured_headers);
1943      ((*yyvalp).unstructured_headers)->rust_type = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText();
1944      delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
1945      delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
1946  }
1947 #line 1948 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1948     break;
1949 
1950   case 29: // parcelable_decl: "parcelable" qualified_name optional_type_params optional_unstructured_headers ';'
1951 #line 333 "system/tools/aidl/aidl_language_y.yy"
1952                                                                                     {
1953     // No check for type name here. We allow nested types for unstructured parcelables.
1954     ((*yyvalp).declaration) = new AidlParcelable(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetText(), ps->Package(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetComments(), *(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.unstructured_headers), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.type_params));
1955     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
1956     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token);
1957     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.unstructured_headers);
1958  }
1959 #line 1960 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1960     break;
1961 
1962   case 30: // parcelable_decl: "parcelable" qualified_name optional_type_params '{' parcelable_members '}'
1963 #line 340 "system/tools/aidl/aidl_language_y.yy"
1964                                                                              {
1965     ps->CheckValidTypeName(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token), loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)));
1966     ((*yyvalp).declaration) = new AidlStructuredParcelable(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetText(), ps->Package(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token)->GetComments(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type_params), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members));
1967     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token);
1968     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
1969  }
1970 #line 1971 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1971     break;
1972 
1973   case 31: // parcelable_decl: "parcelable" error ';'
1974 #line 346 "system/tools/aidl/aidl_language_y.yy"
1975                         {
1976     ps->AddError();
1977     ((*yyvalp).declaration) = nullptr;
1978     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
1979   }
1980 #line 1981 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1981     break;
1982 
1983   case 32: // parcelable_members: %empty
1984 #line 353 "system/tools/aidl/aidl_language_y.yy"
1985                {
1986     ((*yyvalp).members) = new std::vector<std::unique_ptr<AidlMember>>();
1987   }
1988 #line 1989 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1989     break;
1990 
1991   case 33: // parcelable_members: parcelable_members variable_decl
1992 #line 356 "system/tools/aidl/aidl_language_y.yy"
1993                                     {
1994     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.variable));
1995     ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members);
1996   }
1997 #line 1998 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
1998     break;
1999 
2000   case 34: // parcelable_members: parcelable_members constant_decl
2001 #line 360 "system/tools/aidl/aidl_language_y.yy"
2002                                     {
2003     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.constant));
2004     ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members);
2005   }
2006 #line 2007 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2007     break;
2008 
2009   case 35: // parcelable_members: parcelable_members decl
2010 #line 364 "system/tools/aidl/aidl_language_y.yy"
2011                            {
2012     if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration)) (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration));  // decl may be nullptr on error
2013     ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members);
2014   }
2015 #line 2016 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2016     break;
2017 
2018   case 36: // parcelable_members: parcelable_members error ';'
2019 #line 368 "system/tools/aidl/aidl_language_y.yy"
2020                                 {
2021     ps->AddError();
2022     ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.members);
2023   }
2024 #line 2025 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2025     break;
2026 
2027   case 37: // variable_decl: type identifier ';'
2028 #line 374 "system/tools/aidl/aidl_language_y.yy"
2029                        {
2030    ((*yyvalp).variable) = new AidlVariableDeclaration(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText());
2031    delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
2032  }
2033 #line 2034 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2034     break;
2035 
2036   case 38: // variable_decl: type identifier '=' const_expr ';'
2037 #line 378 "system/tools/aidl/aidl_language_y.yy"
2038                                       {
2039    // TODO(b/123321528): Support enum type default assignments (TestEnum foo = TestEnum.FOO).
2040    ((*yyvalp).variable) = new AidlVariableDeclaration(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetText(),  (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.const_expr));
2041    delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token);
2042  }
2043 #line 2044 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2044     break;
2045 
2046   case 39: // interface_decl: "interface" qualified_name ';'
2047 #line 386 "system/tools/aidl/aidl_language_y.yy"
2048                                 {
2049     ps->CheckValidTypeName(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token), loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)));
2050     ((*yyvalp).declaration) = new AidlInterface(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)->GetComments(), false, ps->Package(), nullptr);
2051     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
2052     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
2053   }
2054 #line 2055 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2055     break;
2056 
2057   case 40: // interface_decl: "interface" qualified_name '{' interface_members '}'
2058 #line 392 "system/tools/aidl/aidl_language_y.yy"
2059                                                       {
2060     ps->CheckValidTypeName(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token), loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc)));
2061     ((*yyvalp).declaration) = new AidlInterface(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetComments(), false, ps->Package(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members));
2062     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
2063     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token);
2064   }
2065 #line 2066 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2066     break;
2067 
2068   case 41: // interface_decl: "oneway" "interface" qualified_name '{' interface_members '}'
2069 #line 398 "system/tools/aidl/aidl_language_y.yy"
2070                                                              {
2071     ps->CheckValidTypeName(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token), loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc)));
2072     ((*yyvalp).declaration) = new AidlInterface(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token)->GetComments(), true, ps->Package(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members));
2073     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token);
2074     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
2075     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token);
2076   }
2077 #line 2078 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2078     break;
2079 
2080   case 42: // interface_decl: "interface" error '{' interface_members '}'
2081 #line 405 "system/tools/aidl/aidl_language_y.yy"
2082                                              {
2083     ps->AddError();
2084     ((*yyvalp).declaration) = nullptr;
2085     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
2086     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members);
2087   }
2088 #line 2089 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2089     break;
2090 
2091   case 43: // interface_members: %empty
2092 #line 414 "system/tools/aidl/aidl_language_y.yy"
2093   { ((*yyvalp).members) = new std::vector<std::unique_ptr<AidlMember>>(); }
2094 #line 2095 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2095     break;
2096 
2097   case 44: // interface_members: interface_members method_decl
2098 #line 416 "system/tools/aidl/aidl_language_y.yy"
2099   { (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members)->push_back(std::unique_ptr<AidlMember>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.method))); ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members); }
2100 #line 2101 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2101     break;
2102 
2103   case 45: // interface_members: interface_members constant_decl
2104 #line 418 "system/tools/aidl/aidl_language_y.yy"
2105   { (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members)->push_back(std::unique_ptr<AidlMember>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.constant))); ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members); }
2106 #line 2107 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2107     break;
2108 
2109   case 46: // interface_members: interface_members decl
2110 #line 420 "system/tools/aidl/aidl_language_y.yy"
2111   {
2112     if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration)) (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.declaration));  // decl may be nullptr on error
2113     ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members);
2114   }
2115 #line 2116 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2116     break;
2117 
2118   case 47: // interface_members: interface_members error ';'
2119 #line 424 "system/tools/aidl/aidl_language_y.yy"
2120                                {
2121     ps->AddError();
2122     ((*yyvalp).members) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.members);
2123   }
2124 #line 2125 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2125     break;
2126 
2127   case 48: // const_expr: "true"
2128 #line 430 "system/tools/aidl/aidl_language_y.yy"
2129                 { ((*yyvalp).const_expr) = AidlConstantValue::Boolean(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), true); }
2130 #line 2131 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2131     break;
2132 
2133   case 49: // const_expr: "false"
2134 #line 431 "system/tools/aidl/aidl_language_y.yy"
2135                  { ((*yyvalp).const_expr) = AidlConstantValue::Boolean(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), false); }
2136 #line 2137 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2137     break;
2138 
2139   case 50: // const_expr: "char literal"
2140 #line 432 "system/tools/aidl/aidl_language_y.yy"
2141              {
2142     ((*yyvalp).const_expr) = AidlConstantValue::Character(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2143     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2144   }
2145 #line 2146 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2146     break;
2147 
2148   case 51: // const_expr: "int literal"
2149 #line 436 "system/tools/aidl/aidl_language_y.yy"
2150             {
2151     ((*yyvalp).const_expr) = AidlConstantValue::Integral(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2152     if (((*yyvalp).const_expr) == nullptr) {
2153       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc))) << "Could not parse integer: "
2154                 << (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText();
2155       ps->AddError();
2156       ((*yyvalp).const_expr) = AidlConstantValue::Integral(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), "0");
2157     }
2158     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2159   }
2160 #line 2161 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2161     break;
2162 
2163   case 52: // const_expr: "float literal"
2164 #line 446 "system/tools/aidl/aidl_language_y.yy"
2165               {
2166     ((*yyvalp).const_expr) = AidlConstantValue::Floating(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2167     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2168   }
2169 #line 2170 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2170     break;
2171 
2172   case 53: // const_expr: "hex literal"
2173 #line 450 "system/tools/aidl/aidl_language_y.yy"
2174             {
2175     ((*yyvalp).const_expr) = AidlConstantValue::Integral(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2176     if (((*yyvalp).const_expr) == nullptr) {
2177       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc))) << "Could not parse hexvalue: "
2178                 << (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText();
2179       ps->AddError();
2180       ((*yyvalp).const_expr) = AidlConstantValue::Integral(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), "0");
2181     }
2182     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2183   }
2184 #line 2185 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2185     break;
2186 
2187   case 54: // const_expr: "string literal"
2188 #line 460 "system/tools/aidl/aidl_language_y.yy"
2189          {
2190     ((*yyvalp).const_expr) = AidlConstantValue::String(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2191     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2192   }
2193 #line 2194 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2194     break;
2195 
2196   case 55: // const_expr: qualified_name
2197 #line 464 "system/tools/aidl/aidl_language_y.yy"
2198                   {
2199     ((*yyvalp).const_expr) = new AidlConstantReference(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2200     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2201  }
2202 #line 2203 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2203     break;
2204 
2205   case 56: // const_expr: '{' constant_value_list '}'
2206 #line 468 "system/tools/aidl/aidl_language_y.yy"
2207                                {
2208     ((*yyvalp).const_expr) = AidlConstantValue::Array(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<vector<unique_ptr<AidlConstantValue>>>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.constant_value_list)));
2209   }
2210 #line 2211 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2211     break;
2212 
2213   case 57: // const_expr: const_expr LOGICAL_OR const_expr
2214 #line 471 "system/tools/aidl/aidl_language_y.yy"
2215                                     {
2216     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "||", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2217   }
2218 #line 2219 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2219     break;
2220 
2221   case 58: // const_expr: const_expr LOGICAL_AND const_expr
2222 #line 474 "system/tools/aidl/aidl_language_y.yy"
2223                                      {
2224     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "&&", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2225   }
2226 #line 2227 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2227     break;
2228 
2229   case 59: // const_expr: const_expr '|' const_expr
2230 #line 477 "system/tools/aidl/aidl_language_y.yy"
2231                              {
2232     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "|" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2233   }
2234 #line 2235 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2235     break;
2236 
2237   case 60: // const_expr: const_expr '^' const_expr
2238 #line 480 "system/tools/aidl/aidl_language_y.yy"
2239                              {
2240     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "^" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2241   }
2242 #line 2243 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2243     break;
2244 
2245   case 61: // const_expr: const_expr '&' const_expr
2246 #line 483 "system/tools/aidl/aidl_language_y.yy"
2247                              {
2248     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "&" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2249   }
2250 #line 2251 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2251     break;
2252 
2253   case 62: // const_expr: const_expr EQUALITY const_expr
2254 #line 486 "system/tools/aidl/aidl_language_y.yy"
2255                                   {
2256     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "==", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2257   }
2258 #line 2259 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2259     break;
2260 
2261   case 63: // const_expr: const_expr NEQ const_expr
2262 #line 489 "system/tools/aidl/aidl_language_y.yy"
2263                              {
2264     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "!=", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2265   }
2266 #line 2267 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2267     break;
2268 
2269   case 64: // const_expr: const_expr '<' const_expr
2270 #line 492 "system/tools/aidl/aidl_language_y.yy"
2271                              {
2272     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "<" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2273   }
2274 #line 2275 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2275     break;
2276 
2277   case 65: // const_expr: const_expr '>' const_expr
2278 #line 495 "system/tools/aidl/aidl_language_y.yy"
2279                              {
2280     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), ">" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2281   }
2282 #line 2283 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2283     break;
2284 
2285   case 66: // const_expr: const_expr LEQ const_expr
2286 #line 498 "system/tools/aidl/aidl_language_y.yy"
2287                              {
2288     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "<=", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2289   }
2290 #line 2291 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2291     break;
2292 
2293   case 67: // const_expr: const_expr GEQ const_expr
2294 #line 501 "system/tools/aidl/aidl_language_y.yy"
2295                              {
2296     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), ">=", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2297   }
2298 #line 2299 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2299     break;
2300 
2301   case 68: // const_expr: const_expr LSHIFT const_expr
2302 #line 504 "system/tools/aidl/aidl_language_y.yy"
2303                                 {
2304     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "<<", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2305   }
2306 #line 2307 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2307     break;
2308 
2309   case 69: // const_expr: const_expr RSHIFT const_expr
2310 #line 507 "system/tools/aidl/aidl_language_y.yy"
2311                                 {
2312     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), ">>", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2313   }
2314 #line 2315 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2315     break;
2316 
2317   case 70: // const_expr: const_expr '+' const_expr
2318 #line 510 "system/tools/aidl/aidl_language_y.yy"
2319                              {
2320     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "+" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2321   }
2322 #line 2323 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2323     break;
2324 
2325   case 71: // const_expr: const_expr '-' const_expr
2326 #line 513 "system/tools/aidl/aidl_language_y.yy"
2327                              {
2328     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "-" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2329   }
2330 #line 2331 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2331     break;
2332 
2333   case 72: // const_expr: const_expr '*' const_expr
2334 #line 516 "system/tools/aidl/aidl_language_y.yy"
2335                              {
2336     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "*" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2337   }
2338 #line 2339 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2339     break;
2340 
2341   case 73: // const_expr: const_expr '/' const_expr
2342 #line 519 "system/tools/aidl/aidl_language_y.yy"
2343                              {
2344     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "/" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2345   }
2346 #line 2347 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2347     break;
2348 
2349   case 74: // const_expr: const_expr '%' const_expr
2350 #line 522 "system/tools/aidl/aidl_language_y.yy"
2351                              {
2352     ((*yyvalp).const_expr) = new AidlBinaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.const_expr)), "%" , std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2353   }
2354 #line 2355 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2355     break;
2356 
2357   case 75: // const_expr: '+' const_expr
2358 #line 525 "system/tools/aidl/aidl_language_y.yy"
2359                                     {
2360     ((*yyvalp).const_expr) = new AidlUnaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)), "+", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2361   }
2362 #line 2363 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2363     break;
2364 
2365   case 76: // const_expr: '-' const_expr
2366 #line 528 "system/tools/aidl/aidl_language_y.yy"
2367                                     {
2368     ((*yyvalp).const_expr) = new AidlUnaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)), "-", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2369   }
2370 #line 2371 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2371     break;
2372 
2373   case 77: // const_expr: '!' const_expr
2374 #line 531 "system/tools/aidl/aidl_language_y.yy"
2375                   {
2376     ((*yyvalp).const_expr) = new AidlUnaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)), "!", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2377   }
2378 #line 2379 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2379     break;
2380 
2381   case 78: // const_expr: '~' const_expr
2382 #line 534 "system/tools/aidl/aidl_language_y.yy"
2383                   {
2384     ((*yyvalp).const_expr) = new AidlUnaryConstExpression(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)), "~", std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2385   }
2386 #line 2387 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2387     break;
2388 
2389   case 79: // const_expr: '(' const_expr ')'
2390 #line 538 "system/tools/aidl/aidl_language_y.yy"
2391   {
2392     ((*yyvalp).const_expr) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.const_expr);
2393   }
2394 #line 2395 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2395     break;
2396 
2397   case 80: // const_expr: '(' error ')'
2398 #line 542 "system/tools/aidl/aidl_language_y.yy"
2399    {
2400      AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc))) << "invalid const expression within parenthesis";
2401      ps->AddError();
2402      // to avoid segfaults
2403      ((*yyvalp).const_expr) = AidlConstantValue::Integral(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), "0");
2404    }
2405 #line 2406 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2406     break;
2407 
2408   case 81: // constant_value_list: %empty
2409 #line 551 "system/tools/aidl/aidl_language_y.yy"
2410                {
2411     ((*yyvalp).constant_value_list) = new std::vector<std::unique_ptr<AidlConstantValue>>;
2412  }
2413 #line 2414 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2414     break;
2415 
2416   case 82: // constant_value_list: constant_value_non_empty_list
2417 #line 554 "system/tools/aidl/aidl_language_y.yy"
2418                                  {
2419     ((*yyvalp).constant_value_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.constant_value_list);
2420  }
2421 #line 2422 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2422     break;
2423 
2424   case 83: // constant_value_list: constant_value_non_empty_list ','
2425 #line 557 "system/tools/aidl/aidl_language_y.yy"
2426                                       {
2427     ((*yyvalp).constant_value_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.constant_value_list);
2428  }
2429 #line 2430 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2430     break;
2431 
2432   case 84: // constant_value_non_empty_list: const_expr
2433 #line 563 "system/tools/aidl/aidl_language_y.yy"
2434               {
2435     ((*yyvalp).constant_value_list) = new std::vector<std::unique_ptr<AidlConstantValue>>;
2436     ((*yyvalp).constant_value_list)->push_back(std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2437  }
2438 #line 2439 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2439     break;
2440 
2441   case 85: // constant_value_non_empty_list: constant_value_non_empty_list ',' const_expr
2442 #line 567 "system/tools/aidl/aidl_language_y.yy"
2443                                                 {
2444     ((*yyvalp).constant_value_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.constant_value_list);
2445     ((*yyvalp).constant_value_list)->push_back(std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr)));
2446  }
2447 #line 2448 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2448     break;
2449 
2450   case 86: // constant_decl: annotation_list "const" type identifier '=' const_expr ';'
2451 #line 574 "system/tools/aidl/aidl_language_y.yy"
2452                                                             {
2453     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.type)->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token)->GetComments());
2454     // TODO(b/151102494) do not merge annotations.
2455     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.type)->Annotate(std::move(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.annotation_list)));
2456     ((*yyvalp).constant) = new AidlConstantDeclaration(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.const_expr));
2457     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.annotation_list);
2458     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token);
2459     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token);
2460    }
2461 #line 2462 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2462     break;
2463 
2464   case 87: // enumerator: identifier '=' const_expr
2465 #line 586 "system/tools/aidl/aidl_language_y.yy"
2466                              {
2467     ((*yyvalp).enumerator) = new AidlEnumerator(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)->GetComments());
2468     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
2469    }
2470 #line 2471 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2471     break;
2472 
2473   case 88: // enumerator: identifier
2474 #line 590 "system/tools/aidl/aidl_language_y.yy"
2475               {
2476     ((*yyvalp).enumerator) = new AidlEnumerator(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText(), nullptr, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetComments());
2477     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2478    }
2479 #line 2480 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2480     break;
2481 
2482   case 89: // enumerators: enumerator
2483 #line 597 "system/tools/aidl/aidl_language_y.yy"
2484               {
2485     ((*yyvalp).enumerators) = new std::vector<std::unique_ptr<AidlEnumerator>>();
2486     ((*yyvalp).enumerators)->push_back(std::unique_ptr<AidlEnumerator>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.enumerator)));
2487    }
2488 #line 2489 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2489     break;
2490 
2491   case 90: // enumerators: enumerators ',' enumerator
2492 #line 601 "system/tools/aidl/aidl_language_y.yy"
2493                               {
2494     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.enumerators)->push_back(std::unique_ptr<AidlEnumerator>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.enumerator)));
2495     ((*yyvalp).enumerators) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.enumerators);
2496    }
2497 #line 2498 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2498     break;
2499 
2500   case 91: // enum_decl_body: '{' enumerators '}'
2501 #line 608 "system/tools/aidl/aidl_language_y.yy"
2502                        { ((*yyvalp).enumerators) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.enumerators); }
2503 #line 2504 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2504     break;
2505 
2506   case 92: // enum_decl_body: '{' enumerators ',' '}'
2507 #line 609 "system/tools/aidl/aidl_language_y.yy"
2508                            { ((*yyvalp).enumerators) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.enumerators); }
2509 #line 2510 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2510     break;
2511 
2512   case 93: // enum_decl: "enum" qualified_name enum_decl_body
2513 #line 613 "system/tools/aidl/aidl_language_y.yy"
2514                                       {
2515     ps->CheckValidTypeName(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token), loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)));
2516     ((*yyvalp).declaration) = new AidlEnumDeclaration(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.enumerators), ps->Package(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)->GetComments());
2517     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
2518     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
2519     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.enumerators);
2520    }
2521 #line 2522 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2522     break;
2523 
2524   case 94: // union_decl: "union" qualified_name optional_type_params '{' parcelable_members '}'
2525 #line 623 "system/tools/aidl/aidl_language_y.yy"
2526                                                                         {
2527     ps->CheckValidTypeName(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token), loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)));
2528     ((*yyvalp).declaration) = new AidlUnionDecl(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetText(), ps->Package(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token)->GetComments(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type_params), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.members));
2529     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.token);
2530     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
2531   }
2532 #line 2533 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2533     break;
2534 
2535   case 95: // method_decl: type identifier '(' arg_list ')' ';'
2536 #line 632 "system/tools/aidl/aidl_language_y.yy"
2537                                         {
2538     ((*yyvalp).method) = new AidlMethod(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)), false, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.arg_list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetComments());
2539     ((*yyvalp).method)->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type)->GetComments());
2540     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
2541   }
2542 #line 2543 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2543     break;
2544 
2545   case 96: // method_decl: annotation_list "oneway" type identifier '(' arg_list ')' ';'
2546 #line 637 "system/tools/aidl/aidl_language_y.yy"
2547                                                                {
2548     ((*yyvalp).method) = new AidlMethod(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc)), true, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.arg_list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token)->GetComments());
2549     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type)->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token)->GetComments());
2550     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type)->Annotate(std::move(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.annotation_list)));
2551     ((*yyvalp).method)->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type)->GetComments());
2552     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.annotation_list);
2553     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token);
2554     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.token);
2555   }
2556 #line 2557 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2557     break;
2558 
2559   case 97: // method_decl: type identifier '(' arg_list ')' '=' "int literal" ';'
2560 #line 646 "system/tools/aidl/aidl_language_y.yy"
2561                                                      {
2562     int32_t serial = 0;
2563     if (!android::base::ParseInt((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText(), &serial)) {
2564         AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc))) << "Could not parse int value: " << (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText();
2565         ps->AddError();
2566     }
2567     ((*yyvalp).method) = new AidlMethod(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yyloc)), false, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.arg_list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token)->GetComments(), serial);
2568     ((*yyvalp).method)->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type)->GetComments());
2569     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token);
2570     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
2571   }
2572 #line 2573 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2573     break;
2574 
2575   case 98: // method_decl: annotation_list "oneway" type identifier '(' arg_list ')' '=' "int literal" ';'
2576 #line 657 "system/tools/aidl/aidl_language_y.yy"
2577                                                                             {
2578     int32_t serial = 0;
2579     if (!android::base::ParseInt((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText(), &serial)) {
2580         AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc))) << "Could not parse int value: " << (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token)->GetText();
2581         ps->AddError();
2582     }
2583     ((*yyvalp).method) = new AidlMethod(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yyloc)), true, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token)->GetText(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.arg_list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token)->GetComments(), serial);
2584     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type)->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-8)].yystate.yysemantics.yyval.token)->GetComments());
2585     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type)->Annotate(std::move(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-9)].yystate.yysemantics.yyval.annotation_list)));
2586     ((*yyvalp).method)->PrependComments((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type)->GetComments());
2587     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-9)].yystate.yysemantics.yyval.annotation_list);
2588     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-8)].yystate.yysemantics.yyval.token);
2589     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yyval.token);
2590     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.token);
2591   }
2592 #line 2593 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2593     break;
2594 
2595   case 99: // arg_non_empty_list: arg
2596 #line 674 "system/tools/aidl/aidl_language_y.yy"
2597        {
2598     ((*yyvalp).arg_list) = new std::vector<std::unique_ptr<AidlArgument>>();
2599     ((*yyvalp).arg_list)->push_back(std::unique_ptr<AidlArgument>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.arg)));
2600   }
2601 #line 2602 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2602     break;
2603 
2604   case 100: // arg_non_empty_list: arg_non_empty_list ',' arg
2605 #line 678 "system/tools/aidl/aidl_language_y.yy"
2606                               {
2607     ((*yyvalp).arg_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.arg_list);
2608     ((*yyvalp).arg_list)->push_back(std::unique_ptr<AidlArgument>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.arg)));
2609   }
2610 #line 2611 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2611     break;
2612 
2613   case 101: // arg_list: %empty
2614 #line 685 "system/tools/aidl/aidl_language_y.yy"
2615    { ((*yyvalp).arg_list) = new std::vector<std::unique_ptr<AidlArgument>>(); }
2616 #line 2617 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2617     break;
2618 
2619   case 102: // arg_list: arg_non_empty_list
2620 #line 686 "system/tools/aidl/aidl_language_y.yy"
2621                       { ((*yyvalp).arg_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.arg_list); }
2622 #line 2623 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2623     break;
2624 
2625   case 103: // arg: direction type identifier
2626 #line 690 "system/tools/aidl/aidl_language_y.yy"
2627                              {
2628     ((*yyvalp).arg) = new AidlArgument(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.direction), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2629     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2630   }
2631 #line 2632 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2632     break;
2633 
2634   case 104: // arg: type identifier
2635 #line 694 "system/tools/aidl/aidl_language_y.yy"
2636                    {
2637     ((*yyvalp).arg) = new AidlArgument(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText());
2638     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2639   }
2640 #line 2641 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2641     break;
2642 
2643   case 105: // non_array_type: annotation_list qualified_name
2644 #line 700 "system/tools/aidl/aidl_language_y.yy"
2645                                   {
2646     ((*yyvalp).type) = new AidlTypeSpecifier(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText(), /*array=*/std::nullopt, nullptr, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetComments());
2647     ((*yyvalp).type)->Annotate(std::move(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.annotation_list)));
2648     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.annotation_list);
2649     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2650   }
2651 #line 2652 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2652     break;
2653 
2654   case 106: // non_array_type: non_array_type '<' type_args '>'
2655 #line 706 "system/tools/aidl/aidl_language_y.yy"
2656                                     {
2657     ps->SetTypeParameters((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.type_args));
2658     ((*yyvalp).type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type);
2659   }
2660 #line 2661 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2661     break;
2662 
2663   case 107: // non_array_type: non_array_type '<' non_array_type '<' type_args RSHIFT
2664 #line 710 "system/tools/aidl/aidl_language_y.yy"
2665                                                           {
2666     ps->SetTypeParameters((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.type_args));
2667     auto params = new std::vector<std::unique_ptr<AidlTypeSpecifier>>();
2668     params->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type));
2669     ps->SetTypeParameters((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type), params);
2670     ((*yyvalp).type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type);
2671   }
2672 #line 2673 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2673     break;
2674 
2675   case 108: // non_array_type: non_array_type '<' type_args ',' non_array_type '<' type_args RSHIFT
2676 #line 717 "system/tools/aidl/aidl_language_y.yy"
2677                                                                         {
2678     ps->SetTypeParameters((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.type_args));
2679     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type_args)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type));
2680     ps->SetTypeParameters((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yyval.type_args));
2681     ((*yyvalp).type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yyval.type);
2682   }
2683 #line 2684 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2684     break;
2685 
2686   case 109: // type: non_array_type
2687 #line 725 "system/tools/aidl/aidl_language_y.yy"
2688    { ((*yyvalp).type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.type); }
2689 #line 2690 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2690     break;
2691 
2692   case 110: // type: type annotation_list '[' ']'
2693 #line 726 "system/tools/aidl/aidl_language_y.yy"
2694                                 {
2695     if (!(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.annotation_list)->empty()) {
2696       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc))) << "Annotations for arrays are not supported.";
2697       ps->AddError();
2698     }
2699     if (!(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type)->MakeArray(DynamicArray{})) {
2700       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc))) << "Multi-dimensional arrays must be fixed size.";
2701       ps->AddError();
2702     }
2703     ((*yyvalp).type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.type);
2704     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.annotation_list);
2705   }
2706 #line 2707 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2707     break;
2708 
2709   case 111: // type: type annotation_list '[' const_expr ']'
2710 #line 738 "system/tools/aidl/aidl_language_y.yy"
2711                                            {
2712     if (!(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.annotation_list)->empty()) {
2713       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc))) << "Annotations for arrays are not supported.";
2714       ps->AddError();
2715     }
2716     if (!(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.type)->MakeArray(FixedSizeArray{std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.const_expr))})) {
2717       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc))) << "Multi-dimensional arrays must be fixed size.";
2718       ps->AddError();
2719     }
2720     ((*yyvalp).type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yyval.type);
2721     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.annotation_list);
2722   }
2723 #line 2724 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2724     break;
2725 
2726   case 112: // type_args: type
2727 #line 753 "system/tools/aidl/aidl_language_y.yy"
2728         {
2729     if (!(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.type)->GetAnnotations().empty()) {
2730       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc))) << "Annotations for type arguments are not supported.";
2731       ps->AddError();
2732     }
2733     ((*yyvalp).type_args) = new std::vector<std::unique_ptr<AidlTypeSpecifier>>();
2734     ((*yyvalp).type_args)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.type));
2735   }
2736 #line 2737 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2737     break;
2738 
2739   case 113: // type_args: type_args ',' type
2740 #line 761 "system/tools/aidl/aidl_language_y.yy"
2741                       {
2742     (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.type_args)->emplace_back((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.type));
2743     ((*yyvalp).type_args) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.type_args);
2744   }
2745 #line 2746 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2746     break;
2747 
2748   case 114: // annotation_list: %empty
2749 #line 768 "system/tools/aidl/aidl_language_y.yy"
2750   { ((*yyvalp).annotation_list) = new std::vector<std::unique_ptr<AidlAnnotation>>(); }
2751 #line 2752 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2752     break;
2753 
2754   case 115: // annotation_list: annotation_list annotation
2755 #line 770 "system/tools/aidl/aidl_language_y.yy"
2756   {
2757     if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.annotation) != nullptr) {
2758       (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.annotation_list)->emplace_back(std::unique_ptr<AidlAnnotation>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.annotation)));
2759     }
2760     ((*yyvalp).annotation_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.annotation_list);
2761   }
2762 #line 2763 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2763     break;
2764 
2765   case 116: // parameter: identifier '=' const_expr
2766 #line 778 "system/tools/aidl/aidl_language_y.yy"
2767                               {
2768     ((*yyvalp).param) = new AidlAnnotationParameter{(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token)->GetText(), std::unique_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.const_expr))};
2769     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.token);
2770   }
2771 #line 2772 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2772     break;
2773 
2774   case 117: // parameter_list: %empty
2775 #line 784 "system/tools/aidl/aidl_language_y.yy"
2776              {
2777     ((*yyvalp).param_list) = new std::map<std::string, std::shared_ptr<AidlConstantValue>>();
2778   }
2779 #line 2780 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2780     break;
2781 
2782   case 118: // parameter_list: parameter_non_empty_list
2783 #line 787 "system/tools/aidl/aidl_language_y.yy"
2784                               {
2785     ((*yyvalp).param_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param_list);
2786   }
2787 #line 2788 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2788     break;
2789 
2790   case 119: // parameter_non_empty_list: parameter
2791 #line 792 "system/tools/aidl/aidl_language_y.yy"
2792               {
2793     ((*yyvalp).param_list) = new std::map<std::string, std::shared_ptr<AidlConstantValue>>();
2794     ((*yyvalp).param_list)->emplace(std::move((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param)->name), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param)->value.release());
2795     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param);
2796   }
2797 #line 2798 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2798     break;
2799 
2800   case 120: // parameter_non_empty_list: parameter_non_empty_list ',' parameter
2801 #line 797 "system/tools/aidl/aidl_language_y.yy"
2802                                            {
2803     ((*yyvalp).param_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yyval.param_list);
2804     if (((*yyvalp).param_list)->find((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param)->name) != ((*yyvalp).param_list)->end()) {
2805       AIDL_ERROR(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc))) << "Trying to redefine parameter " << (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param)->name << ".";
2806       ps->AddError();
2807     }
2808     ((*yyvalp).param_list)->emplace(std::move((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param)->name), std::move((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param)->value));
2809     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.param);
2810   }
2811 #line 2812 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2812     break;
2813 
2814   case 121: // annotation: "annotation"
2815 #line 808 "system/tools/aidl/aidl_language_y.yy"
2816               {
2817     // release() returns nullptr if unique_ptr is empty.
2818     ((*yyvalp).annotation) = AidlAnnotation::Parse(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetText(), {}, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token)->GetComments()).release();
2819     if (!((*yyvalp).annotation)) {
2820       ps->AddError();
2821     }
2822     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yyval.token);
2823   }
2824 #line 2825 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2825     break;
2826 
2827   case 122: // annotation: "annotation" '(' const_expr ')'
2828 #line 816 "system/tools/aidl/aidl_language_y.yy"
2829                                  {
2830     auto value = std::shared_ptr<AidlConstantValue>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.const_expr));
2831     std::map<std::string, std::shared_ptr<AidlConstantValue>> parameter_list {{"value" , value}};
2832     ((*yyvalp).annotation) = AidlAnnotation::Parse(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetText(), std::move(parameter_list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetComments()).release();
2833     if (!((*yyvalp).annotation)) {
2834       ps->AddError();
2835     }
2836     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token);
2837   }
2838 #line 2839 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2839     break;
2840 
2841   case 123: // annotation: "annotation" '(' parameter_list ')'
2842 #line 825 "system/tools/aidl/aidl_language_y.yy"
2843                                      {
2844     // release() returns nullptr if unique_ptr is empty.
2845     ((*yyvalp).annotation) = AidlAnnotation::Parse(loc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetText(), std::move(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.param_list)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token)->GetComments()).release();
2846     if (!((*yyvalp).annotation)) {
2847       ps->AddError();
2848     }
2849     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yyval.token);
2850     delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yyval.param_list);
2851   }
2852 #line 2853 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2853     break;
2854 
2855   case 124: // direction: "in"
2856 #line 838 "system/tools/aidl/aidl_language_y.yy"
2857   { ((*yyvalp).direction) = AidlArgument::IN_DIR; }
2858 #line 2859 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2859     break;
2860 
2861   case 125: // direction: "out"
2862 #line 840 "system/tools/aidl/aidl_language_y.yy"
2863   { ((*yyvalp).direction) = AidlArgument::OUT_DIR; }
2864 #line 2865 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2865     break;
2866 
2867   case 126: // direction: "inout"
2868 #line 842 "system/tools/aidl/aidl_language_y.yy"
2869   { ((*yyvalp).direction) = AidlArgument::INOUT_DIR; }
2870 #line 2871 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2871     break;
2872 
2873 
2874 #line 2875 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2875 
2876       default: break;
2877     }
2878 #if YY_EXCEPTIONS
2879   }
2880   catch (const syntax_error& yyexc)
2881     {
2882       YY_DPRINTF ((stderr, "Caught exception: %s\n", yyexc.what()));
2883       *yylocp = yyexc.location;
2884       yyerror (yylocp, yyparser, ps, yyexc.what ());
2885       YYERROR;
2886     }
2887 #endif // YY_EXCEPTIONS
2888   YY_SYMBOL_PRINT ("-> $$ =", yylhsNonterm (yyrule), yyvalp, yylocp);
2889 
2890   return yyok;
2891 # undef yyerrok
2892 # undef YYABORT
2893 # undef YYACCEPT
2894 # undef YYNOMEM
2895 # undef YYERROR
2896 # undef YYBACKUP
2897 # undef yyclearin
2898 # undef YYRECOVERING
2899 }
2900 
2901 
2902 static void
yyuserMerge(int yyn,YYSTYPE * yy0,YYSTYPE * yy1)2903 yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
2904 {
2905   YY_USE (yy0);
2906   YY_USE (yy1);
2907 
2908   switch (yyn)
2909     {
2910 
2911       default: break;
2912     }
2913 }
2914 
2915                               /* Bison grammar-table manipulation.  */
2916 
2917 /*-----------------------------------------------.
2918 | Release the memory associated to this symbol.  |
2919 `-----------------------------------------------*/
2920 
2921 static void
yydestruct(const char * yymsg,yysymbol_kind_t yykind,YYSTYPE * yyvaluep,YYLTYPE * yylocationp,yy::parser & yyparser,Parser * ps)2922 yydestruct (const char *yymsg,
2923             yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, yy::parser& yyparser, Parser* ps)
2924 {
2925   YY_USE (yyvaluep);
2926   YY_USE (yylocationp);
2927   YY_USE (yyparser);
2928   YY_USE (ps);
2929   if (!yymsg)
2930     yymsg = "Deleting";
2931   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
2932 
2933   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2934   switch (yykind)
2935     {
2936     case S_PACKAGE: // "package"
2937 #line 99 "system/tools/aidl/aidl_language_y.yy"
2938             { delete (((*yyvaluep).token)); }
2939 #line 2940 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2940         break;
2941 
2942     case S_IMPORT: // "import"
2943 #line 99 "system/tools/aidl/aidl_language_y.yy"
2944             { delete (((*yyvaluep).token)); }
2945 #line 2946 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2946         break;
2947 
2948     case S_ANNOTATION: // "annotation"
2949 #line 99 "system/tools/aidl/aidl_language_y.yy"
2950             { delete (((*yyvaluep).token)); }
2951 #line 2952 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2952         break;
2953 
2954     case S_C_STR: // "string literal"
2955 #line 99 "system/tools/aidl/aidl_language_y.yy"
2956             { delete (((*yyvaluep).token)); }
2957 #line 2958 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2958         break;
2959 
2960     case S_IDENTIFIER: // "identifier"
2961 #line 99 "system/tools/aidl/aidl_language_y.yy"
2962             { delete (((*yyvaluep).token)); }
2963 #line 2964 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2964         break;
2965 
2966     case S_INTERFACE: // "interface"
2967 #line 99 "system/tools/aidl/aidl_language_y.yy"
2968             { delete (((*yyvaluep).token)); }
2969 #line 2970 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2970         break;
2971 
2972     case S_PARCELABLE: // "parcelable"
2973 #line 99 "system/tools/aidl/aidl_language_y.yy"
2974             { delete (((*yyvaluep).token)); }
2975 #line 2976 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2976         break;
2977 
2978     case S_ONEWAY: // "oneway"
2979 #line 99 "system/tools/aidl/aidl_language_y.yy"
2980             { delete (((*yyvaluep).token)); }
2981 #line 2982 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2982         break;
2983 
2984     case S_ENUM: // "enum"
2985 #line 99 "system/tools/aidl/aidl_language_y.yy"
2986             { delete (((*yyvaluep).token)); }
2987 #line 2988 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2988         break;
2989 
2990     case S_UNION: // "union"
2991 #line 99 "system/tools/aidl/aidl_language_y.yy"
2992             { delete (((*yyvaluep).token)); }
2993 #line 2994 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
2994         break;
2995 
2996     case S_CONST: // "const"
2997 #line 99 "system/tools/aidl/aidl_language_y.yy"
2998             { delete (((*yyvaluep).token)); }
2999 #line 3000 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3000         break;
3001 
3002     case S_CHARVALUE: // "char literal"
3003 #line 99 "system/tools/aidl/aidl_language_y.yy"
3004             { delete (((*yyvaluep).token)); }
3005 #line 3006 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3006         break;
3007 
3008     case S_FLOATVALUE: // "float literal"
3009 #line 99 "system/tools/aidl/aidl_language_y.yy"
3010             { delete (((*yyvaluep).token)); }
3011 #line 3012 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3012         break;
3013 
3014     case S_HEXVALUE: // "hex literal"
3015 #line 99 "system/tools/aidl/aidl_language_y.yy"
3016             { delete (((*yyvaluep).token)); }
3017 #line 3018 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3018         break;
3019 
3020     case S_INTVALUE: // "int literal"
3021 #line 99 "system/tools/aidl/aidl_language_y.yy"
3022             { delete (((*yyvaluep).token)); }
3023 #line 3024 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3024         break;
3025 
3026     case S_CPP_HEADER: // "cpp_header (which can also be used as an identifier)"
3027 #line 99 "system/tools/aidl/aidl_language_y.yy"
3028             { delete (((*yyvaluep).token)); }
3029 #line 3030 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3030         break;
3031 
3032     case S_NDK_HEADER: // "ndk_header (which can also be used as an identifier)"
3033 #line 99 "system/tools/aidl/aidl_language_y.yy"
3034             { delete (((*yyvaluep).token)); }
3035 #line 3036 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3036         break;
3037 
3038     case S_RUST_TYPE: // "rust_type (which can also be used as an identifier)"
3039 #line 99 "system/tools/aidl/aidl_language_y.yy"
3040             { delete (((*yyvaluep).token)); }
3041 #line 3042 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3042         break;
3043 
3044     case S_identifier: // identifier
3045 #line 99 "system/tools/aidl/aidl_language_y.yy"
3046             { delete (((*yyvaluep).token)); }
3047 #line 3048 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3048         break;
3049 
3050     case S_optional_package: // optional_package
3051 #line 99 "system/tools/aidl/aidl_language_y.yy"
3052             { delete (((*yyvaluep).token)); }
3053 #line 3054 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3054         break;
3055 
3056     case S_imports: // imports
3057 #line 99 "system/tools/aidl/aidl_language_y.yy"
3058             { delete (((*yyvaluep).token_list)); }
3059 #line 3060 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3060         break;
3061 
3062     case S_import: // import
3063 #line 99 "system/tools/aidl/aidl_language_y.yy"
3064             { delete (((*yyvaluep).token)); }
3065 #line 3066 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3066         break;
3067 
3068     case S_qualified_name: // qualified_name
3069 #line 99 "system/tools/aidl/aidl_language_y.yy"
3070             { delete (((*yyvaluep).token)); }
3071 #line 3072 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3072         break;
3073 
3074     case S_decls: // decls
3075 #line 99 "system/tools/aidl/aidl_language_y.yy"
3076             { delete (((*yyvaluep).declarations)); }
3077 #line 3078 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3078         break;
3079 
3080     case S_decl: // decl
3081 #line 99 "system/tools/aidl/aidl_language_y.yy"
3082             { delete (((*yyvaluep).declaration)); }
3083 #line 3084 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3084         break;
3085 
3086     case S_unannotated_decl: // unannotated_decl
3087 #line 99 "system/tools/aidl/aidl_language_y.yy"
3088             { delete (((*yyvaluep).declaration)); }
3089 #line 3090 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3090         break;
3091 
3092     case S_type_params: // type_params
3093 #line 99 "system/tools/aidl/aidl_language_y.yy"
3094             { delete (((*yyvaluep).type_params)); }
3095 #line 3096 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3096         break;
3097 
3098     case S_optional_type_params: // optional_type_params
3099 #line 99 "system/tools/aidl/aidl_language_y.yy"
3100             { delete (((*yyvaluep).type_params)); }
3101 #line 3102 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3102         break;
3103 
3104     case S_optional_unstructured_headers: // optional_unstructured_headers
3105 #line 99 "system/tools/aidl/aidl_language_y.yy"
3106             { delete (((*yyvaluep).unstructured_headers)); }
3107 #line 3108 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3108         break;
3109 
3110     case S_parcelable_decl: // parcelable_decl
3111 #line 99 "system/tools/aidl/aidl_language_y.yy"
3112             { delete (((*yyvaluep).declaration)); }
3113 #line 3114 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3114         break;
3115 
3116     case S_parcelable_members: // parcelable_members
3117 #line 99 "system/tools/aidl/aidl_language_y.yy"
3118             { delete (((*yyvaluep).members)); }
3119 #line 3120 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3120         break;
3121 
3122     case S_variable_decl: // variable_decl
3123 #line 99 "system/tools/aidl/aidl_language_y.yy"
3124             { delete (((*yyvaluep).variable)); }
3125 #line 3126 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3126         break;
3127 
3128     case S_interface_decl: // interface_decl
3129 #line 99 "system/tools/aidl/aidl_language_y.yy"
3130             { delete (((*yyvaluep).declaration)); }
3131 #line 3132 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3132         break;
3133 
3134     case S_interface_members: // interface_members
3135 #line 99 "system/tools/aidl/aidl_language_y.yy"
3136             { delete (((*yyvaluep).members)); }
3137 #line 3138 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3138         break;
3139 
3140     case S_const_expr: // const_expr
3141 #line 99 "system/tools/aidl/aidl_language_y.yy"
3142             { delete (((*yyvaluep).const_expr)); }
3143 #line 3144 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3144         break;
3145 
3146     case S_constant_value_list: // constant_value_list
3147 #line 99 "system/tools/aidl/aidl_language_y.yy"
3148             { delete (((*yyvaluep).constant_value_list)); }
3149 #line 3150 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3150         break;
3151 
3152     case S_constant_value_non_empty_list: // constant_value_non_empty_list
3153 #line 99 "system/tools/aidl/aidl_language_y.yy"
3154             { delete (((*yyvaluep).constant_value_list)); }
3155 #line 3156 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3156         break;
3157 
3158     case S_constant_decl: // constant_decl
3159 #line 99 "system/tools/aidl/aidl_language_y.yy"
3160             { delete (((*yyvaluep).constant)); }
3161 #line 3162 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3162         break;
3163 
3164     case S_enumerator: // enumerator
3165 #line 99 "system/tools/aidl/aidl_language_y.yy"
3166             { delete (((*yyvaluep).enumerator)); }
3167 #line 3168 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3168         break;
3169 
3170     case S_enumerators: // enumerators
3171 #line 99 "system/tools/aidl/aidl_language_y.yy"
3172             { delete (((*yyvaluep).enumerators)); }
3173 #line 3174 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3174         break;
3175 
3176     case S_enum_decl_body: // enum_decl_body
3177 #line 99 "system/tools/aidl/aidl_language_y.yy"
3178             { delete (((*yyvaluep).enumerators)); }
3179 #line 3180 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3180         break;
3181 
3182     case S_enum_decl: // enum_decl
3183 #line 99 "system/tools/aidl/aidl_language_y.yy"
3184             { delete (((*yyvaluep).declaration)); }
3185 #line 3186 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3186         break;
3187 
3188     case S_union_decl: // union_decl
3189 #line 99 "system/tools/aidl/aidl_language_y.yy"
3190             { delete (((*yyvaluep).declaration)); }
3191 #line 3192 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3192         break;
3193 
3194     case S_method_decl: // method_decl
3195 #line 99 "system/tools/aidl/aidl_language_y.yy"
3196             { delete (((*yyvaluep).method)); }
3197 #line 3198 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3198         break;
3199 
3200     case S_arg_non_empty_list: // arg_non_empty_list
3201 #line 99 "system/tools/aidl/aidl_language_y.yy"
3202             { delete (((*yyvaluep).arg_list)); }
3203 #line 3204 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3204         break;
3205 
3206     case S_arg_list: // arg_list
3207 #line 99 "system/tools/aidl/aidl_language_y.yy"
3208             { delete (((*yyvaluep).arg_list)); }
3209 #line 3210 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3210         break;
3211 
3212     case S_arg: // arg
3213 #line 99 "system/tools/aidl/aidl_language_y.yy"
3214             { delete (((*yyvaluep).arg)); }
3215 #line 3216 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3216         break;
3217 
3218     case S_non_array_type: // non_array_type
3219 #line 99 "system/tools/aidl/aidl_language_y.yy"
3220             { delete (((*yyvaluep).type)); }
3221 #line 3222 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3222         break;
3223 
3224     case S_type: // type
3225 #line 99 "system/tools/aidl/aidl_language_y.yy"
3226             { delete (((*yyvaluep).type)); }
3227 #line 3228 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3228         break;
3229 
3230     case S_type_args: // type_args
3231 #line 99 "system/tools/aidl/aidl_language_y.yy"
3232             { delete (((*yyvaluep).type_args)); }
3233 #line 3234 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3234         break;
3235 
3236     case S_annotation_list: // annotation_list
3237 #line 99 "system/tools/aidl/aidl_language_y.yy"
3238             { delete (((*yyvaluep).annotation_list)); }
3239 #line 3240 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3240         break;
3241 
3242     case S_parameter: // parameter
3243 #line 99 "system/tools/aidl/aidl_language_y.yy"
3244             { delete (((*yyvaluep).param)); }
3245 #line 3246 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3246         break;
3247 
3248     case S_parameter_list: // parameter_list
3249 #line 99 "system/tools/aidl/aidl_language_y.yy"
3250             { delete (((*yyvaluep).param_list)); }
3251 #line 3252 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3252         break;
3253 
3254     case S_parameter_non_empty_list: // parameter_non_empty_list
3255 #line 99 "system/tools/aidl/aidl_language_y.yy"
3256             { delete (((*yyvaluep).param_list)); }
3257 #line 3258 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3258         break;
3259 
3260     case S_annotation: // annotation
3261 #line 99 "system/tools/aidl/aidl_language_y.yy"
3262             { delete (((*yyvaluep).annotation)); }
3263 #line 3264 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3264         break;
3265 
3266     case S_direction: // direction
3267 #line 98 "system/tools/aidl/aidl_language_y.yy"
3268             { }
3269 #line 3270 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
3270         break;
3271 
3272       default:
3273         break;
3274     }
3275   YY_IGNORE_MAYBE_UNINITIALIZED_END
3276 }
3277 
3278 /** Number of symbols composing the right hand side of rule #RULE.  */
3279 static inline int
yyrhsLength(yyRuleNum yyrule)3280 yyrhsLength (yyRuleNum yyrule)
3281 {
3282   return yyr2[yyrule];
3283 }
3284 
3285 static void
yydestroyGLRState(char const * yymsg,yyGLRState * yys,yy::parser & yyparser,Parser * ps)3286 yydestroyGLRState (char const *yymsg, yyGLRState *yys, yy::parser& yyparser, Parser* ps)
3287 {
3288   if (yys->yyresolved)
3289     yydestruct (yymsg, yy_accessing_symbol (yys->yylrState),
3290                 &yys->yysemantics.yyval, &yys->yyloc, yyparser, ps);
3291   else
3292     {
3293 #if YYDEBUG
3294       if (yydebug)
3295         {
3296           if (yys->yysemantics.yyfirstVal)
3297             YY_FPRINTF ((stderr, "%s unresolved", yymsg));
3298           else
3299             YY_FPRINTF ((stderr, "%s incomplete", yymsg));
3300           YY_SYMBOL_PRINT ("", yy_accessing_symbol (yys->yylrState), YY_NULLPTR, &yys->yyloc);
3301         }
3302 #endif
3303 
3304       if (yys->yysemantics.yyfirstVal)
3305         {
3306           yySemanticOption *yyoption = yys->yysemantics.yyfirstVal;
3307           yyGLRState *yyrh;
3308           int yyn;
3309           for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule);
3310                yyn > 0;
3311                yyrh = yyrh->yypred, yyn -= 1)
3312             yydestroyGLRState (yymsg, yyrh, yyparser, ps);
3313         }
3314     }
3315 }
3316 
3317 #define yypact_value_is_default(Yyn) \
3318   ((Yyn) == YYPACT_NINF)
3319 
3320 /** True iff LR state YYSTATE has only a default reduction (regardless
3321  *  of token).  */
3322 static inline yybool
yyisDefaultedState(yy_state_t yystate)3323 yyisDefaultedState (yy_state_t yystate)
3324 {
3325   return yypact_value_is_default (yypact[yystate]);
3326 }
3327 
3328 /** The default reduction for YYSTATE, assuming it has one.  */
3329 static inline yyRuleNum
yydefaultAction(yy_state_t yystate)3330 yydefaultAction (yy_state_t yystate)
3331 {
3332   return yydefact[yystate];
3333 }
3334 
3335 #define yytable_value_is_error(Yyn) \
3336   0
3337 
3338 /** The action to take in YYSTATE on seeing YYTOKEN.
3339  *  Result R means
3340  *    R < 0:  Reduce on rule -R.
3341  *    R = 0:  Error.
3342  *    R > 0:  Shift to state R.
3343  *  Set *YYCONFLICTS to a pointer into yyconfl to a 0-terminated list
3344  *  of conflicting reductions.
3345  */
3346 static inline int
yygetLRActions(yy_state_t yystate,yysymbol_kind_t yytoken,const short ** yyconflicts)3347 yygetLRActions (yy_state_t yystate, yysymbol_kind_t yytoken, const short** yyconflicts)
3348 {
3349   int yyindex = yypact[yystate] + yytoken;
3350   if (yytoken == S_YYerror)
3351     {
3352       // This is the error token.
3353       *yyconflicts = yyconfl;
3354       return 0;
3355     }
3356   else if (yyisDefaultedState (yystate)
3357            || yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
3358     {
3359       *yyconflicts = yyconfl;
3360       return -yydefact[yystate];
3361     }
3362   else if (! yytable_value_is_error (yytable[yyindex]))
3363     {
3364       *yyconflicts = yyconfl + yyconflp[yyindex];
3365       return yytable[yyindex];
3366     }
3367   else
3368     {
3369       *yyconflicts = yyconfl + yyconflp[yyindex];
3370       return 0;
3371     }
3372 }
3373 
3374 /** Compute post-reduction state.
3375  * \param yystate   the current state
3376  * \param yysym     the nonterminal to push on the stack
3377  */
3378 static inline yy_state_t
yyLRgotoState(yy_state_t yystate,yysymbol_kind_t yysym)3379 yyLRgotoState (yy_state_t yystate, yysymbol_kind_t yysym)
3380 {
3381   int yyr = yypgoto[yysym - YYNTOKENS] + yystate;
3382   if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate)
3383     return yytable[yyr];
3384   else
3385     return yydefgoto[yysym - YYNTOKENS];
3386 }
3387 
3388 static inline yybool
yyisShiftAction(int yyaction)3389 yyisShiftAction (int yyaction)
3390 {
3391   return 0 < yyaction;
3392 }
3393 
3394 static inline yybool
yyisErrorAction(int yyaction)3395 yyisErrorAction (int yyaction)
3396 {
3397   return yyaction == 0;
3398 }
3399 
3400                                 /* GLRStates */
3401 
3402 /** Return a fresh GLRStackItem in YYSTACKP.  The item is an LR state
3403  *  if YYISSTATE, and otherwise a semantic option.  Callers should call
3404  *  YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient
3405  *  headroom.  */
3406 
3407 static inline yyGLRStackItem*
yynewGLRStackItem(yyGLRStack * yystackp,yybool yyisState)3408 yynewGLRStackItem (yyGLRStack* yystackp, yybool yyisState)
3409 {
3410   yyGLRStackItem* yynewItem = yystackp->yynextFree;
3411   yystackp->yyspaceLeft -= 1;
3412   yystackp->yynextFree += 1;
3413   yynewItem->yystate.yyisState = yyisState;
3414   return yynewItem;
3415 }
3416 
3417 /** Add a new semantic action that will execute the action for rule
3418  *  YYRULE on the semantic values in YYRHS to the list of
3419  *  alternative actions for YYSTATE.  Assumes that YYRHS comes from
3420  *  stack #YYK of *YYSTACKP. */
3421 static void
yyaddDeferredAction(yyGLRStack * yystackp,YYPTRDIFF_T yyk,yyGLRState * yystate,yyGLRState * yyrhs,yyRuleNum yyrule)3422 yyaddDeferredAction (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yyGLRState* yystate,
3423                      yyGLRState* yyrhs, yyRuleNum yyrule)
3424 {
3425   yySemanticOption* yynewOption =
3426     &yynewGLRStackItem (yystackp, yyfalse)->yyoption;
3427   YY_ASSERT (!yynewOption->yyisState);
3428   yynewOption->yystate = yyrhs;
3429   yynewOption->yyrule = yyrule;
3430   if (yystackp->yytops.yylookaheadNeeds[yyk])
3431     {
3432       yynewOption->yyrawchar = yychar;
3433       yynewOption->yyval = yylval;
3434       yynewOption->yyloc = yylloc;
3435     }
3436   else
3437     yynewOption->yyrawchar = YYEMPTY;
3438   yynewOption->yynext = yystate->yysemantics.yyfirstVal;
3439   yystate->yysemantics.yyfirstVal = yynewOption;
3440 
3441   YY_RESERVE_GLRSTACK (yystackp);
3442 }
3443 
3444                                 /* GLRStacks */
3445 
3446 /** Initialize YYSET to a singleton set containing an empty stack.  */
3447 static yybool
yyinitStateSet(yyGLRStateSet * yyset)3448 yyinitStateSet (yyGLRStateSet* yyset)
3449 {
3450   yyset->yysize = 1;
3451   yyset->yycapacity = 16;
3452   yyset->yystates
3453     = YY_CAST (yyGLRState**,
3454                YYMALLOC (YY_CAST (YYSIZE_T, yyset->yycapacity)
3455                          * sizeof yyset->yystates[0]));
3456   if (! yyset->yystates)
3457     return yyfalse;
3458   yyset->yystates[0] = YY_NULLPTR;
3459   yyset->yylookaheadNeeds
3460     = YY_CAST (yybool*,
3461                YYMALLOC (YY_CAST (YYSIZE_T, yyset->yycapacity)
3462                          * sizeof yyset->yylookaheadNeeds[0]));
3463   if (! yyset->yylookaheadNeeds)
3464     {
3465       YYFREE (yyset->yystates);
3466       return yyfalse;
3467     }
3468   memset (yyset->yylookaheadNeeds,
3469           0,
3470           YY_CAST (YYSIZE_T, yyset->yycapacity) * sizeof yyset->yylookaheadNeeds[0]);
3471   return yytrue;
3472 }
3473 
yyfreeStateSet(yyGLRStateSet * yyset)3474 static void yyfreeStateSet (yyGLRStateSet* yyset)
3475 {
3476   YYFREE (yyset->yystates);
3477   YYFREE (yyset->yylookaheadNeeds);
3478 }
3479 
3480 /** Initialize *YYSTACKP to a single empty stack, with total maximum
3481  *  capacity for all stacks of YYSIZE.  */
3482 static yybool
yyinitGLRStack(yyGLRStack * yystackp,YYPTRDIFF_T yysize)3483 yyinitGLRStack (yyGLRStack* yystackp, YYPTRDIFF_T yysize)
3484 {
3485   yystackp->yyerrState = 0;
3486   yynerrs = 0;
3487   yystackp->yyspaceLeft = yysize;
3488   yystackp->yyitems
3489     = YY_CAST (yyGLRStackItem*,
3490                YYMALLOC (YY_CAST (YYSIZE_T, yysize)
3491                          * sizeof yystackp->yynextFree[0]));
3492   if (!yystackp->yyitems)
3493     return yyfalse;
3494   yystackp->yynextFree = yystackp->yyitems;
3495   yystackp->yysplitPoint = YY_NULLPTR;
3496   yystackp->yylastDeleted = YY_NULLPTR;
3497   return yyinitStateSet (&yystackp->yytops);
3498 }
3499 
3500 
3501 #if YYSTACKEXPANDABLE
3502 # define YYRELOC(YYFROMITEMS, YYTOITEMS, YYX, YYTYPE)                   \
3503   &((YYTOITEMS)                                                         \
3504     - ((YYFROMITEMS) - YY_REINTERPRET_CAST (yyGLRStackItem*, (YYX))))->YYTYPE
3505 
3506 /** If *YYSTACKP is expandable, extend it.  WARNING: Pointers into the
3507     stack from outside should be considered invalid after this call.
3508     We always expand when there are 1 or fewer items left AFTER an
3509     allocation, so that we can avoid having external pointers exist
3510     across an allocation.  */
3511 static void
yyexpandGLRStack(yyGLRStack * yystackp)3512 yyexpandGLRStack (yyGLRStack* yystackp)
3513 {
3514   yyGLRStackItem* yynewItems;
3515   yyGLRStackItem* yyp0, *yyp1;
3516   YYPTRDIFF_T yynewSize;
3517   YYPTRDIFF_T yyn;
3518   YYPTRDIFF_T yysize = yystackp->yynextFree - yystackp->yyitems;
3519   if (YYMAXDEPTH - YYHEADROOM < yysize)
3520     yyMemoryExhausted (yystackp);
3521   yynewSize = 2*yysize;
3522   if (YYMAXDEPTH < yynewSize)
3523     yynewSize = YYMAXDEPTH;
3524   yynewItems
3525     = YY_CAST (yyGLRStackItem*,
3526                YYMALLOC (YY_CAST (YYSIZE_T, yynewSize)
3527                          * sizeof yynewItems[0]));
3528   if (! yynewItems)
3529     yyMemoryExhausted (yystackp);
3530   for (yyp0 = yystackp->yyitems, yyp1 = yynewItems, yyn = yysize;
3531        0 < yyn;
3532        yyn -= 1, yyp0 += 1, yyp1 += 1)
3533     {
3534       *yyp1 = *yyp0;
3535       if (*YY_REINTERPRET_CAST (yybool *, yyp0))
3536         {
3537           yyGLRState* yys0 = &yyp0->yystate;
3538           yyGLRState* yys1 = &yyp1->yystate;
3539           if (yys0->yypred != YY_NULLPTR)
3540             yys1->yypred =
3541               YYRELOC (yyp0, yyp1, yys0->yypred, yystate);
3542           if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != YY_NULLPTR)
3543             yys1->yysemantics.yyfirstVal =
3544               YYRELOC (yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption);
3545         }
3546       else
3547         {
3548           yySemanticOption* yyv0 = &yyp0->yyoption;
3549           yySemanticOption* yyv1 = &yyp1->yyoption;
3550           if (yyv0->yystate != YY_NULLPTR)
3551             yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate);
3552           if (yyv0->yynext != YY_NULLPTR)
3553             yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption);
3554         }
3555     }
3556   if (yystackp->yysplitPoint != YY_NULLPTR)
3557     yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems,
3558                                       yystackp->yysplitPoint, yystate);
3559 
3560   for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1)
3561     if (yystackp->yytops.yystates[yyn] != YY_NULLPTR)
3562       yystackp->yytops.yystates[yyn] =
3563         YYRELOC (yystackp->yyitems, yynewItems,
3564                  yystackp->yytops.yystates[yyn], yystate);
3565   YYFREE (yystackp->yyitems);
3566   yystackp->yyitems = yynewItems;
3567   yystackp->yynextFree = yynewItems + yysize;
3568   yystackp->yyspaceLeft = yynewSize - yysize;
3569 }
3570 #endif
3571 
3572 static void
yyfreeGLRStack(yyGLRStack * yystackp)3573 yyfreeGLRStack (yyGLRStack* yystackp)
3574 {
3575   YYFREE (yystackp->yyitems);
3576   yyfreeStateSet (&yystackp->yytops);
3577 }
3578 
3579 /** Assuming that YYS is a GLRState somewhere on *YYSTACKP, update the
3580  *  splitpoint of *YYSTACKP, if needed, so that it is at least as deep as
3581  *  YYS.  */
3582 static inline void
yyupdateSplit(yyGLRStack * yystackp,yyGLRState * yys)3583 yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys)
3584 {
3585   if (yystackp->yysplitPoint != YY_NULLPTR && yystackp->yysplitPoint > yys)
3586     yystackp->yysplitPoint = yys;
3587 }
3588 
3589 /** Invalidate stack #YYK in *YYSTACKP.  */
3590 static inline void
yymarkStackDeleted(yyGLRStack * yystackp,YYPTRDIFF_T yyk)3591 yymarkStackDeleted (yyGLRStack* yystackp, YYPTRDIFF_T yyk)
3592 {
3593   if (yystackp->yytops.yystates[yyk] != YY_NULLPTR)
3594     yystackp->yylastDeleted = yystackp->yytops.yystates[yyk];
3595   yystackp->yytops.yystates[yyk] = YY_NULLPTR;
3596 }
3597 
3598 /** Undelete the last stack in *YYSTACKP that was marked as deleted.  Can
3599     only be done once after a deletion, and only when all other stacks have
3600     been deleted.  */
3601 static void
yyundeleteLastStack(yyGLRStack * yystackp)3602 yyundeleteLastStack (yyGLRStack* yystackp)
3603 {
3604   if (yystackp->yylastDeleted == YY_NULLPTR || yystackp->yytops.yysize != 0)
3605     return;
3606   yystackp->yytops.yystates[0] = yystackp->yylastDeleted;
3607   yystackp->yytops.yysize = 1;
3608   YY_DPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n"));
3609   yystackp->yylastDeleted = YY_NULLPTR;
3610 }
3611 
3612 static inline void
yyremoveDeletes(yyGLRStack * yystackp)3613 yyremoveDeletes (yyGLRStack* yystackp)
3614 {
3615   YYPTRDIFF_T yyi, yyj;
3616   yyi = yyj = 0;
3617   while (yyj < yystackp->yytops.yysize)
3618     {
3619       if (yystackp->yytops.yystates[yyi] == YY_NULLPTR)
3620         {
3621           if (yyi == yyj)
3622             YY_DPRINTF ((stderr, "Removing dead stacks.\n"));
3623           yystackp->yytops.yysize -= 1;
3624         }
3625       else
3626         {
3627           yystackp->yytops.yystates[yyj] = yystackp->yytops.yystates[yyi];
3628           /* In the current implementation, it's unnecessary to copy
3629              yystackp->yytops.yylookaheadNeeds[yyi] since, after
3630              yyremoveDeletes returns, the parser immediately either enters
3631              deterministic operation or shifts a token.  However, it doesn't
3632              hurt, and the code might evolve to need it.  */
3633           yystackp->yytops.yylookaheadNeeds[yyj] =
3634             yystackp->yytops.yylookaheadNeeds[yyi];
3635           if (yyj != yyi)
3636             YY_DPRINTF ((stderr, "Rename stack %ld -> %ld.\n",
3637                         YY_CAST (long, yyi), YY_CAST (long, yyj)));
3638           yyj += 1;
3639         }
3640       yyi += 1;
3641     }
3642 }
3643 
3644 /** Shift to a new state on stack #YYK of *YYSTACKP, corresponding to LR
3645  * state YYLRSTATE, at input position YYPOSN, with (resolved) semantic
3646  * value *YYVALP and source location *YYLOCP.  */
3647 static inline void
yyglrShift(yyGLRStack * yystackp,YYPTRDIFF_T yyk,yy_state_t yylrState,YYPTRDIFF_T yyposn,YYSTYPE * yyvalp,YYLTYPE * yylocp)3648 yyglrShift (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yy_state_t yylrState,
3649             YYPTRDIFF_T yyposn,
3650             YYSTYPE* yyvalp, YYLTYPE* yylocp)
3651 {
3652   yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
3653 
3654   yynewState->yylrState = yylrState;
3655   yynewState->yyposn = yyposn;
3656   yynewState->yyresolved = yytrue;
3657   yynewState->yypred = yystackp->yytops.yystates[yyk];
3658   yynewState->yysemantics.yyval = *yyvalp;
3659   yynewState->yyloc = *yylocp;
3660   yystackp->yytops.yystates[yyk] = yynewState;
3661 
3662   YY_RESERVE_GLRSTACK (yystackp);
3663 }
3664 
3665 /** Shift stack #YYK of *YYSTACKP, to a new state corresponding to LR
3666  *  state YYLRSTATE, at input position YYPOSN, with the (unresolved)
3667  *  semantic value of YYRHS under the action for YYRULE.  */
3668 static inline void
yyglrShiftDefer(yyGLRStack * yystackp,YYPTRDIFF_T yyk,yy_state_t yylrState,YYPTRDIFF_T yyposn,yyGLRState * yyrhs,yyRuleNum yyrule)3669 yyglrShiftDefer (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yy_state_t yylrState,
3670                  YYPTRDIFF_T yyposn, yyGLRState* yyrhs, yyRuleNum yyrule)
3671 {
3672   yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
3673   YY_ASSERT (yynewState->yyisState);
3674 
3675   yynewState->yylrState = yylrState;
3676   yynewState->yyposn = yyposn;
3677   yynewState->yyresolved = yyfalse;
3678   yynewState->yypred = yystackp->yytops.yystates[yyk];
3679   yynewState->yysemantics.yyfirstVal = YY_NULLPTR;
3680   yystackp->yytops.yystates[yyk] = yynewState;
3681 
3682   /* Invokes YY_RESERVE_GLRSTACK.  */
3683   yyaddDeferredAction (yystackp, yyk, yynewState, yyrhs, yyrule);
3684 }
3685 
3686 #if YYDEBUG
3687 
3688 /*----------------------------------------------------------------------.
3689 | Report that stack #YYK of *YYSTACKP is going to be reduced by YYRULE. |
3690 `----------------------------------------------------------------------*/
3691 
3692 static inline void
yy_reduce_print(yybool yynormal,yyGLRStackItem * yyvsp,YYPTRDIFF_T yyk,yyRuleNum yyrule,yy::parser & yyparser,Parser * ps)3693 yy_reduce_print (yybool yynormal, yyGLRStackItem* yyvsp, YYPTRDIFF_T yyk,
3694                  yyRuleNum yyrule, yy::parser& yyparser, Parser* ps)
3695 {
3696   int yynrhs = yyrhsLength (yyrule);
3697   int yylow = 1;
3698   int yyi;
3699   YY_FPRINTF ((stderr, "Reducing stack %ld by rule %d (line %d):\n",
3700                YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule]));
3701   if (! yynormal)
3702     yyfillin (yyvsp, 1, -yynrhs);
3703   /* The symbols being reduced.  */
3704   for (yyi = 0; yyi < yynrhs; yyi++)
3705     {
3706       YY_FPRINTF ((stderr, "   $%d = ", yyi + 1));
3707       yy_symbol_print (stderr,
3708                        yy_accessing_symbol (yyvsp[yyi - yynrhs + 1].yystate.yylrState),
3709                        &yyvsp[yyi - yynrhs + 1].yystate.yysemantics.yyval,
3710                        &(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yyloc)                       , yyparser, ps);
3711       if (!yyvsp[yyi - yynrhs + 1].yystate.yyresolved)
3712         YY_FPRINTF ((stderr, " (unresolved)"));
3713       YY_FPRINTF ((stderr, "\n"));
3714     }
3715 }
3716 #endif
3717 
3718 /** Pop the symbols consumed by reduction #YYRULE from the top of stack
3719  *  #YYK of *YYSTACKP, and perform the appropriate semantic action on their
3720  *  semantic values.  Assumes that all ambiguities in semantic values
3721  *  have been previously resolved.  Set *YYVALP to the resulting value,
3722  *  and *YYLOCP to the computed location (if any).  Return value is as
3723  *  for userAction.  */
3724 static inline YYRESULTTAG
yydoAction(yyGLRStack * yystackp,YYPTRDIFF_T yyk,yyRuleNum yyrule,YYSTYPE * yyvalp,YYLTYPE * yylocp,yy::parser & yyparser,Parser * ps)3725 yydoAction (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yyRuleNum yyrule,
3726             YYSTYPE* yyvalp, YYLTYPE *yylocp, yy::parser& yyparser, Parser* ps)
3727 {
3728   int yynrhs = yyrhsLength (yyrule);
3729 
3730   if (yystackp->yysplitPoint == YY_NULLPTR)
3731     {
3732       /* Standard special case: single stack.  */
3733       yyGLRStackItem* yyrhs
3734         = YY_REINTERPRET_CAST (yyGLRStackItem*, yystackp->yytops.yystates[yyk]);
3735       YY_ASSERT (yyk == 0);
3736       yystackp->yynextFree -= yynrhs;
3737       yystackp->yyspaceLeft += yynrhs;
3738       yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate;
3739       return yyuserAction (yyrule, yynrhs, yyrhs, yystackp, yyk,
3740                            yyvalp, yylocp, yyparser, ps);
3741     }
3742   else
3743     {
3744       yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
3745       yyGLRState* yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
3746         = yystackp->yytops.yystates[yyk];
3747       int yyi;
3748       if (yynrhs == 0)
3749         /* Set default location.  */
3750         yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yys->yyloc;
3751       for (yyi = 0; yyi < yynrhs; yyi += 1)
3752         {
3753           yys = yys->yypred;
3754           YY_ASSERT (yys);
3755         }
3756       yyupdateSplit (yystackp, yys);
3757       yystackp->yytops.yystates[yyk] = yys;
3758       return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
3759                            yystackp, yyk, yyvalp, yylocp, yyparser, ps);
3760     }
3761 }
3762 
3763 /** Pop items off stack #YYK of *YYSTACKP according to grammar rule YYRULE,
3764  *  and push back on the resulting nonterminal symbol.  Perform the
3765  *  semantic action associated with YYRULE and store its value with the
3766  *  newly pushed state, if YYFORCEEVAL or if *YYSTACKP is currently
3767  *  unambiguous.  Otherwise, store the deferred semantic action with
3768  *  the new state.  If the new state would have an identical input
3769  *  position, LR state, and predecessor to an existing state on the stack,
3770  *  it is identified with that existing state, eliminating stack #YYK from
3771  *  *YYSTACKP.  In this case, the semantic value is
3772  *  added to the options for the existing state's semantic value.
3773  */
3774 static inline YYRESULTTAG
yyglrReduce(yyGLRStack * yystackp,YYPTRDIFF_T yyk,yyRuleNum yyrule,yybool yyforceEval,yy::parser & yyparser,Parser * ps)3775 yyglrReduce (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yyRuleNum yyrule,
3776              yybool yyforceEval, yy::parser& yyparser, Parser* ps)
3777 {
3778   YYPTRDIFF_T yyposn = yystackp->yytops.yystates[yyk]->yyposn;
3779 
3780   if (yyforceEval || yystackp->yysplitPoint == YY_NULLPTR)
3781     {
3782       YYSTYPE yyval;
3783       YYLTYPE yyloc;
3784 
3785       YYRESULTTAG yyflag = yydoAction (yystackp, yyk, yyrule, &yyval, &yyloc, yyparser, ps);
3786       if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
3787         YY_DPRINTF ((stderr,
3788                      "Parse on stack %ld rejected by rule %d (line %d).\n",
3789                      YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule]));
3790       if (yyflag != yyok)
3791         return yyflag;
3792       yyglrShift (yystackp, yyk,
3793                   yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState,
3794                                  yylhsNonterm (yyrule)),
3795                   yyposn, &yyval, &yyloc);
3796     }
3797   else
3798     {
3799       YYPTRDIFF_T yyi;
3800       int yyn;
3801       yyGLRState* yys, *yys0 = yystackp->yytops.yystates[yyk];
3802       yy_state_t yynewLRState;
3803 
3804       for (yys = yystackp->yytops.yystates[yyk], yyn = yyrhsLength (yyrule);
3805            0 < yyn; yyn -= 1)
3806         {
3807           yys = yys->yypred;
3808           YY_ASSERT (yys);
3809         }
3810       yyupdateSplit (yystackp, yys);
3811       yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule));
3812       YY_DPRINTF ((stderr,
3813                    "Reduced stack %ld by rule %d (line %d); action deferred.  "
3814                    "Now in state %d.\n",
3815                    YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule],
3816                    yynewLRState));
3817       for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
3818         if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR)
3819           {
3820             yyGLRState *yysplit = yystackp->yysplitPoint;
3821             yyGLRState *yyp = yystackp->yytops.yystates[yyi];
3822             while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn)
3823               {
3824                 if (yyp->yylrState == yynewLRState && yyp->yypred == yys)
3825                   {
3826                     yyaddDeferredAction (yystackp, yyk, yyp, yys0, yyrule);
3827                     yymarkStackDeleted (yystackp, yyk);
3828                     YY_DPRINTF ((stderr, "Merging stack %ld into stack %ld.\n",
3829                                  YY_CAST (long, yyk), YY_CAST (long, yyi)));
3830                     return yyok;
3831                   }
3832                 yyp = yyp->yypred;
3833               }
3834           }
3835       yystackp->yytops.yystates[yyk] = yys;
3836       yyglrShiftDefer (yystackp, yyk, yynewLRState, yyposn, yys0, yyrule);
3837     }
3838   return yyok;
3839 }
3840 
3841 static YYPTRDIFF_T
yysplitStack(yyGLRStack * yystackp,YYPTRDIFF_T yyk)3842 yysplitStack (yyGLRStack* yystackp, YYPTRDIFF_T yyk)
3843 {
3844   if (yystackp->yysplitPoint == YY_NULLPTR)
3845     {
3846       YY_ASSERT (yyk == 0);
3847       yystackp->yysplitPoint = yystackp->yytops.yystates[yyk];
3848     }
3849   if (yystackp->yytops.yycapacity <= yystackp->yytops.yysize)
3850     {
3851       YYPTRDIFF_T state_size = YYSIZEOF (yystackp->yytops.yystates[0]);
3852       YYPTRDIFF_T half_max_capacity = YYSIZE_MAXIMUM / 2 / state_size;
3853       if (half_max_capacity < yystackp->yytops.yycapacity)
3854         yyMemoryExhausted (yystackp);
3855       yystackp->yytops.yycapacity *= 2;
3856 
3857       {
3858         yyGLRState** yynewStates
3859           = YY_CAST (yyGLRState**,
3860                      YYREALLOC (yystackp->yytops.yystates,
3861                                 (YY_CAST (YYSIZE_T, yystackp->yytops.yycapacity)
3862                                  * sizeof yynewStates[0])));
3863         if (yynewStates == YY_NULLPTR)
3864           yyMemoryExhausted (yystackp);
3865         yystackp->yytops.yystates = yynewStates;
3866       }
3867 
3868       {
3869         yybool* yynewLookaheadNeeds
3870           = YY_CAST (yybool*,
3871                      YYREALLOC (yystackp->yytops.yylookaheadNeeds,
3872                                 (YY_CAST (YYSIZE_T, yystackp->yytops.yycapacity)
3873                                  * sizeof yynewLookaheadNeeds[0])));
3874         if (yynewLookaheadNeeds == YY_NULLPTR)
3875           yyMemoryExhausted (yystackp);
3876         yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds;
3877       }
3878     }
3879   yystackp->yytops.yystates[yystackp->yytops.yysize]
3880     = yystackp->yytops.yystates[yyk];
3881   yystackp->yytops.yylookaheadNeeds[yystackp->yytops.yysize]
3882     = yystackp->yytops.yylookaheadNeeds[yyk];
3883   yystackp->yytops.yysize += 1;
3884   return yystackp->yytops.yysize - 1;
3885 }
3886 
3887 /** True iff YYY0 and YYY1 represent identical options at the top level.
3888  *  That is, they represent the same rule applied to RHS symbols
3889  *  that produce the same terminal symbols.  */
3890 static yybool
yyidenticalOptions(yySemanticOption * yyy0,yySemanticOption * yyy1)3891 yyidenticalOptions (yySemanticOption* yyy0, yySemanticOption* yyy1)
3892 {
3893   if (yyy0->yyrule == yyy1->yyrule)
3894     {
3895       yyGLRState *yys0, *yys1;
3896       int yyn;
3897       for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
3898            yyn = yyrhsLength (yyy0->yyrule);
3899            yyn > 0;
3900            yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
3901         if (yys0->yyposn != yys1->yyposn)
3902           return yyfalse;
3903       return yytrue;
3904     }
3905   else
3906     return yyfalse;
3907 }
3908 
3909 /** Assuming identicalOptions (YYY0,YYY1), destructively merge the
3910  *  alternative semantic values for the RHS-symbols of YYY1 and YYY0.  */
3911 static void
yymergeOptionSets(yySemanticOption * yyy0,yySemanticOption * yyy1)3912 yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1)
3913 {
3914   yyGLRState *yys0, *yys1;
3915   int yyn;
3916   for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
3917        yyn = yyrhsLength (yyy0->yyrule);
3918        0 < yyn;
3919        yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
3920     {
3921       if (yys0 == yys1)
3922         break;
3923       else if (yys0->yyresolved)
3924         {
3925           yys1->yyresolved = yytrue;
3926           yys1->yysemantics.yyval = yys0->yysemantics.yyval;
3927         }
3928       else if (yys1->yyresolved)
3929         {
3930           yys0->yyresolved = yytrue;
3931           yys0->yysemantics.yyval = yys1->yysemantics.yyval;
3932         }
3933       else
3934         {
3935           yySemanticOption** yyz0p = &yys0->yysemantics.yyfirstVal;
3936           yySemanticOption* yyz1 = yys1->yysemantics.yyfirstVal;
3937           while (yytrue)
3938             {
3939               if (yyz1 == *yyz0p || yyz1 == YY_NULLPTR)
3940                 break;
3941               else if (*yyz0p == YY_NULLPTR)
3942                 {
3943                   *yyz0p = yyz1;
3944                   break;
3945                 }
3946               else if (*yyz0p < yyz1)
3947                 {
3948                   yySemanticOption* yyz = *yyz0p;
3949                   *yyz0p = yyz1;
3950                   yyz1 = yyz1->yynext;
3951                   (*yyz0p)->yynext = yyz;
3952                 }
3953               yyz0p = &(*yyz0p)->yynext;
3954             }
3955           yys1->yysemantics.yyfirstVal = yys0->yysemantics.yyfirstVal;
3956         }
3957     }
3958 }
3959 
3960 /** Y0 and Y1 represent two possible actions to take in a given
3961  *  parsing state; return 0 if no combination is possible,
3962  *  1 if user-mergeable, 2 if Y0 is preferred, 3 if Y1 is preferred.  */
3963 static int
yypreference(yySemanticOption * y0,yySemanticOption * y1)3964 yypreference (yySemanticOption* y0, yySemanticOption* y1)
3965 {
3966   yyRuleNum r0 = y0->yyrule, r1 = y1->yyrule;
3967   int p0 = yydprec[r0], p1 = yydprec[r1];
3968 
3969   if (p0 == p1)
3970     {
3971       if (yymerger[r0] == 0 || yymerger[r0] != yymerger[r1])
3972         return 0;
3973       else
3974         return 1;
3975     }
3976   if (p0 == 0 || p1 == 0)
3977     return 0;
3978   if (p0 < p1)
3979     return 3;
3980   if (p1 < p0)
3981     return 2;
3982   return 0;
3983 }
3984 
3985 static YYRESULTTAG
3986 yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp, yy::parser& yyparser, Parser* ps);
3987 
3988 
3989 /** Resolve the previous YYN states starting at and including state YYS
3990  *  on *YYSTACKP. If result != yyok, some states may have been left
3991  *  unresolved possibly with empty semantic option chains.  Regardless
3992  *  of whether result = yyok, each state has been left with consistent
3993  *  data so that yydestroyGLRState can be invoked if necessary.  */
3994 static YYRESULTTAG
yyresolveStates(yyGLRState * yys,int yyn,yyGLRStack * yystackp,yy::parser & yyparser,Parser * ps)3995 yyresolveStates (yyGLRState* yys, int yyn,
3996                  yyGLRStack* yystackp, yy::parser& yyparser, Parser* ps)
3997 {
3998   if (0 < yyn)
3999     {
4000       YY_ASSERT (yys->yypred);
4001       YYCHK (yyresolveStates (yys->yypred, yyn-1, yystackp, yyparser, ps));
4002       if (! yys->yyresolved)
4003         YYCHK (yyresolveValue (yys, yystackp, yyparser, ps));
4004     }
4005   return yyok;
4006 }
4007 
4008 /** Resolve the states for the RHS of YYOPT on *YYSTACKP, perform its
4009  *  user action, and return the semantic value and location in *YYVALP
4010  *  and *YYLOCP.  Regardless of whether result = yyok, all RHS states
4011  *  have been destroyed (assuming the user action destroys all RHS
4012  *  semantic values if invoked).  */
4013 static YYRESULTTAG
yyresolveAction(yySemanticOption * yyopt,yyGLRStack * yystackp,YYSTYPE * yyvalp,YYLTYPE * yylocp,yy::parser & yyparser,Parser * ps)4014 yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp,
4015                  YYSTYPE* yyvalp, YYLTYPE *yylocp, yy::parser& yyparser, Parser* ps)
4016 {
4017   yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
4018   int yynrhs = yyrhsLength (yyopt->yyrule);
4019   YYRESULTTAG yyflag =
4020     yyresolveStates (yyopt->yystate, yynrhs, yystackp, yyparser, ps);
4021   if (yyflag != yyok)
4022     {
4023       yyGLRState *yys;
4024       for (yys = yyopt->yystate; yynrhs > 0; yys = yys->yypred, yynrhs -= 1)
4025         yydestroyGLRState ("Cleanup: popping", yys, yyparser, ps);
4026       return yyflag;
4027     }
4028 
4029   yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate;
4030   if (yynrhs == 0)
4031     /* Set default location.  */
4032     yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yyopt->yystate->yyloc;
4033   {
4034     int yychar_current = yychar;
4035     YYSTYPE yylval_current = yylval;
4036     YYLTYPE yylloc_current = yylloc;
4037     yychar = yyopt->yyrawchar;
4038     yylval = yyopt->yyval;
4039     yylloc = yyopt->yyloc;
4040     yyflag = yyuserAction (yyopt->yyrule, yynrhs,
4041                            yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
4042                            yystackp, -1, yyvalp, yylocp, yyparser, ps);
4043     yychar = yychar_current;
4044     yylval = yylval_current;
4045     yylloc = yylloc_current;
4046   }
4047   return yyflag;
4048 }
4049 
4050 #if YYDEBUG
4051 static void
yyreportTree(yySemanticOption * yyx,int yyindent)4052 yyreportTree (yySemanticOption* yyx, int yyindent)
4053 {
4054   int yynrhs = yyrhsLength (yyx->yyrule);
4055   int yyi;
4056   yyGLRState* yys;
4057   yyGLRState* yystates[1 + YYMAXRHS];
4058   yyGLRState yyleftmost_state;
4059 
4060   for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred)
4061     yystates[yyi] = yys;
4062   if (yys == YY_NULLPTR)
4063     {
4064       yyleftmost_state.yyposn = 0;
4065       yystates[0] = &yyleftmost_state;
4066     }
4067   else
4068     yystates[0] = yys;
4069 
4070   if (yyx->yystate->yyposn < yys->yyposn + 1)
4071     YY_FPRINTF ((stderr, "%*s%s -> <Rule %d, empty>\n",
4072                  yyindent, "", yysymbol_name (yylhsNonterm (yyx->yyrule)),
4073                  yyx->yyrule - 1));
4074   else
4075     YY_FPRINTF ((stderr, "%*s%s -> <Rule %d, tokens %ld .. %ld>\n",
4076                  yyindent, "", yysymbol_name (yylhsNonterm (yyx->yyrule)),
4077                  yyx->yyrule - 1, YY_CAST (long, yys->yyposn + 1),
4078                  YY_CAST (long, yyx->yystate->yyposn)));
4079   for (yyi = 1; yyi <= yynrhs; yyi += 1)
4080     {
4081       if (yystates[yyi]->yyresolved)
4082         {
4083           if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
4084             YY_FPRINTF ((stderr, "%*s%s <empty>\n", yyindent+2, "",
4085                          yysymbol_name (yy_accessing_symbol (yystates[yyi]->yylrState))));
4086           else
4087             YY_FPRINTF ((stderr, "%*s%s <tokens %ld .. %ld>\n", yyindent+2, "",
4088                          yysymbol_name (yy_accessing_symbol (yystates[yyi]->yylrState)),
4089                          YY_CAST (long, yystates[yyi-1]->yyposn + 1),
4090                          YY_CAST (long, yystates[yyi]->yyposn)));
4091         }
4092       else
4093         yyreportTree (yystates[yyi]->yysemantics.yyfirstVal, yyindent+2);
4094     }
4095 }
4096 #endif
4097 
4098 static YYRESULTTAG
yyreportAmbiguity(yySemanticOption * yyx0,yySemanticOption * yyx1,YYLTYPE * yylocp,yy::parser & yyparser,Parser * ps)4099 yyreportAmbiguity (yySemanticOption* yyx0,
4100                    yySemanticOption* yyx1, YYLTYPE *yylocp, yy::parser& yyparser, Parser* ps)
4101 {
4102   YY_USE (yyx0);
4103   YY_USE (yyx1);
4104 
4105 #if YYDEBUG
4106   YY_FPRINTF ((stderr, "Ambiguity detected.\n"));
4107   YY_FPRINTF ((stderr, "Option 1,\n"));
4108   yyreportTree (yyx0, 2);
4109   YY_FPRINTF ((stderr, "\nOption 2,\n"));
4110   yyreportTree (yyx1, 2);
4111   YY_FPRINTF ((stderr, "\n"));
4112 #endif
4113 
4114   yyerror (yylocp, yyparser, ps, YY_("syntax is ambiguous"));
4115   return yyabort;
4116 }
4117 
4118 /** Resolve the locations for each of the YYN1 states in *YYSTACKP,
4119  *  ending at YYS1.  Has no effect on previously resolved states.
4120  *  The first semantic option of a state is always chosen.  */
4121 static void
yyresolveLocations(yyGLRState * yys1,int yyn1,yyGLRStack * yystackp,yy::parser & yyparser,Parser * ps)4122 yyresolveLocations (yyGLRState *yys1, int yyn1,
4123                     yyGLRStack *yystackp, yy::parser& yyparser, Parser* ps)
4124 {
4125   if (0 < yyn1)
4126     {
4127       yyresolveLocations (yys1->yypred, yyn1 - 1, yystackp, yyparser, ps);
4128       if (!yys1->yyresolved)
4129         {
4130           yyGLRStackItem yyrhsloc[1 + YYMAXRHS];
4131           int yynrhs;
4132           yySemanticOption *yyoption = yys1->yysemantics.yyfirstVal;
4133           YY_ASSERT (yyoption);
4134           yynrhs = yyrhsLength (yyoption->yyrule);
4135           if (0 < yynrhs)
4136             {
4137               yyGLRState *yys;
4138               int yyn;
4139               yyresolveLocations (yyoption->yystate, yynrhs,
4140                                   yystackp, yyparser, ps);
4141               for (yys = yyoption->yystate, yyn = yynrhs;
4142                    yyn > 0;
4143                    yys = yys->yypred, yyn -= 1)
4144                 yyrhsloc[yyn].yystate.yyloc = yys->yyloc;
4145             }
4146           else
4147             {
4148               /* Both yyresolveAction and yyresolveLocations traverse the GSS
4149                  in reverse rightmost order.  It is only necessary to invoke
4150                  yyresolveLocations on a subforest for which yyresolveAction
4151                  would have been invoked next had an ambiguity not been
4152                  detected.  Thus the location of the previous state (but not
4153                  necessarily the previous state itself) is guaranteed to be
4154                  resolved already.  */
4155               yyGLRState *yyprevious = yyoption->yystate;
4156               yyrhsloc[0].yystate.yyloc = yyprevious->yyloc;
4157             }
4158           YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
4159         }
4160     }
4161 }
4162 
4163 /** Resolve the ambiguity represented in state YYS in *YYSTACKP,
4164  *  perform the indicated actions, and set the semantic value of YYS.
4165  *  If result != yyok, the chain of semantic options in YYS has been
4166  *  cleared instead or it has been left unmodified except that
4167  *  redundant options may have been removed.  Regardless of whether
4168  *  result = yyok, YYS has been left with consistent data so that
4169  *  yydestroyGLRState can be invoked if necessary.  */
4170 static YYRESULTTAG
yyresolveValue(yyGLRState * yys,yyGLRStack * yystackp,yy::parser & yyparser,Parser * ps)4171 yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp, yy::parser& yyparser, Parser* ps)
4172 {
4173   yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal;
4174   yySemanticOption* yybest = yyoptionList;
4175   yySemanticOption** yypp;
4176   yybool yymerge = yyfalse;
4177   YYSTYPE yyval;
4178   YYRESULTTAG yyflag;
4179   YYLTYPE *yylocp = &yys->yyloc;
4180 
4181   for (yypp = &yyoptionList->yynext; *yypp != YY_NULLPTR; )
4182     {
4183       yySemanticOption* yyp = *yypp;
4184 
4185       if (yyidenticalOptions (yybest, yyp))
4186         {
4187           yymergeOptionSets (yybest, yyp);
4188           *yypp = yyp->yynext;
4189         }
4190       else
4191         {
4192           switch (yypreference (yybest, yyp))
4193             {
4194             case 0:
4195               yyresolveLocations (yys, 1, yystackp, yyparser, ps);
4196               return yyreportAmbiguity (yybest, yyp, yylocp, yyparser, ps);
4197               break;
4198             case 1:
4199               yymerge = yytrue;
4200               break;
4201             case 2:
4202               break;
4203             case 3:
4204               yybest = yyp;
4205               yymerge = yyfalse;
4206               break;
4207             default:
4208               /* This cannot happen so it is not worth a YY_ASSERT (yyfalse),
4209                  but some compilers complain if the default case is
4210                  omitted.  */
4211               break;
4212             }
4213           yypp = &yyp->yynext;
4214         }
4215     }
4216 
4217   if (yymerge)
4218     {
4219       yySemanticOption* yyp;
4220       int yyprec = yydprec[yybest->yyrule];
4221       yyflag = yyresolveAction (yybest, yystackp, &yyval, yylocp, yyparser, ps);
4222       if (yyflag == yyok)
4223         for (yyp = yybest->yynext; yyp != YY_NULLPTR; yyp = yyp->yynext)
4224           {
4225             if (yyprec == yydprec[yyp->yyrule])
4226               {
4227                 YYSTYPE yyval_other;
4228                 YYLTYPE yydummy;
4229                 yyflag = yyresolveAction (yyp, yystackp, &yyval_other, &yydummy, yyparser, ps);
4230                 if (yyflag != yyok)
4231                   {
4232                     yydestruct ("Cleanup: discarding incompletely merged value for",
4233                                 yy_accessing_symbol (yys->yylrState),
4234                                 &yyval, yylocp, yyparser, ps);
4235                     break;
4236                   }
4237                 yyuserMerge (yymerger[yyp->yyrule], &yyval, &yyval_other);
4238               }
4239           }
4240     }
4241   else
4242     yyflag = yyresolveAction (yybest, yystackp, &yyval, yylocp, yyparser, ps);
4243 
4244   if (yyflag == yyok)
4245     {
4246       yys->yyresolved = yytrue;
4247       yys->yysemantics.yyval = yyval;
4248     }
4249   else
4250     yys->yysemantics.yyfirstVal = YY_NULLPTR;
4251   return yyflag;
4252 }
4253 
4254 static YYRESULTTAG
yyresolveStack(yyGLRStack * yystackp,yy::parser & yyparser,Parser * ps)4255 yyresolveStack (yyGLRStack* yystackp, yy::parser& yyparser, Parser* ps)
4256 {
4257   if (yystackp->yysplitPoint != YY_NULLPTR)
4258     {
4259       yyGLRState* yys;
4260       int yyn;
4261 
4262       for (yyn = 0, yys = yystackp->yytops.yystates[0];
4263            yys != yystackp->yysplitPoint;
4264            yys = yys->yypred, yyn += 1)
4265         continue;
4266       YYCHK (yyresolveStates (yystackp->yytops.yystates[0], yyn, yystackp
4267                              , yyparser, ps));
4268     }
4269   return yyok;
4270 }
4271 
4272 /** Called when returning to deterministic operation to clean up the extra
4273  * stacks. */
4274 static void
yycompressStack(yyGLRStack * yystackp)4275 yycompressStack (yyGLRStack* yystackp)
4276 {
4277   /* yyr is the state after the split point.  */
4278   yyGLRState *yyr;
4279 
4280   if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == YY_NULLPTR)
4281     return;
4282 
4283   {
4284     yyGLRState *yyp, *yyq;
4285     for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = YY_NULLPTR;
4286          yyp != yystackp->yysplitPoint;
4287          yyr = yyp, yyp = yyq, yyq = yyp->yypred)
4288       yyp->yypred = yyr;
4289   }
4290 
4291   yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems;
4292   yystackp->yynextFree = YY_REINTERPRET_CAST (yyGLRStackItem*, yystackp->yysplitPoint) + 1;
4293   yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems;
4294   yystackp->yysplitPoint = YY_NULLPTR;
4295   yystackp->yylastDeleted = YY_NULLPTR;
4296 
4297   while (yyr != YY_NULLPTR)
4298     {
4299       yystackp->yynextFree->yystate = *yyr;
4300       yyr = yyr->yypred;
4301       yystackp->yynextFree->yystate.yypred = &yystackp->yynextFree[-1].yystate;
4302       yystackp->yytops.yystates[0] = &yystackp->yynextFree->yystate;
4303       yystackp->yynextFree += 1;
4304       yystackp->yyspaceLeft -= 1;
4305     }
4306 }
4307 
4308 static YYRESULTTAG
yyprocessOneStack(yyGLRStack * yystackp,YYPTRDIFF_T yyk,YYPTRDIFF_T yyposn,YYLTYPE * yylocp,yy::parser & yyparser,Parser * ps)4309 yyprocessOneStack (yyGLRStack* yystackp, YYPTRDIFF_T yyk,
4310                    YYPTRDIFF_T yyposn, YYLTYPE *yylocp, yy::parser& yyparser, Parser* ps)
4311 {
4312   while (yystackp->yytops.yystates[yyk] != YY_NULLPTR)
4313     {
4314       yy_state_t yystate = yystackp->yytops.yystates[yyk]->yylrState;
4315       YY_DPRINTF ((stderr, "Stack %ld Entering state %d\n",
4316                    YY_CAST (long, yyk), yystate));
4317 
4318       YY_ASSERT (yystate != YYFINAL);
4319 
4320       if (yyisDefaultedState (yystate))
4321         {
4322           YYRESULTTAG yyflag;
4323           yyRuleNum yyrule = yydefaultAction (yystate);
4324           if (yyrule == 0)
4325             {
4326               YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yyk)));
4327               yymarkStackDeleted (yystackp, yyk);
4328               return yyok;
4329             }
4330           yyflag = yyglrReduce (yystackp, yyk, yyrule, yyimmediate[yyrule], yyparser, ps);
4331           if (yyflag == yyerr)
4332             {
4333               YY_DPRINTF ((stderr,
4334                            "Stack %ld dies "
4335                            "(predicate failure or explicit user error).\n",
4336                            YY_CAST (long, yyk)));
4337               yymarkStackDeleted (yystackp, yyk);
4338               return yyok;
4339             }
4340           if (yyflag != yyok)
4341             return yyflag;
4342         }
4343       else
4344         {
4345           yysymbol_kind_t yytoken = yygetToken (&yychar, yystackp, yyparser, ps);
4346           const short* yyconflicts;
4347           const int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
4348           yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
4349 
4350           for (/* nothing */; *yyconflicts; yyconflicts += 1)
4351             {
4352               YYRESULTTAG yyflag;
4353               YYPTRDIFF_T yynewStack = yysplitStack (yystackp, yyk);
4354               YY_DPRINTF ((stderr, "Splitting off stack %ld from %ld.\n",
4355                            YY_CAST (long, yynewStack), YY_CAST (long, yyk)));
4356               yyflag = yyglrReduce (yystackp, yynewStack,
4357                                     *yyconflicts,
4358                                     yyimmediate[*yyconflicts], yyparser, ps);
4359               if (yyflag == yyok)
4360                 YYCHK (yyprocessOneStack (yystackp, yynewStack,
4361                                           yyposn, yylocp, yyparser, ps));
4362               else if (yyflag == yyerr)
4363                 {
4364                   YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yynewStack)));
4365                   yymarkStackDeleted (yystackp, yynewStack);
4366                 }
4367               else
4368                 return yyflag;
4369             }
4370 
4371           if (yyisShiftAction (yyaction))
4372             break;
4373           else if (yyisErrorAction (yyaction))
4374             {
4375               YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yyk)));
4376               yymarkStackDeleted (yystackp, yyk);
4377               break;
4378             }
4379           else
4380             {
4381               YYRESULTTAG yyflag = yyglrReduce (yystackp, yyk, -yyaction,
4382                                                 yyimmediate[-yyaction], yyparser, ps);
4383               if (yyflag == yyerr)
4384                 {
4385                   YY_DPRINTF ((stderr,
4386                                "Stack %ld dies "
4387                                "(predicate failure or explicit user error).\n",
4388                                YY_CAST (long, yyk)));
4389                   yymarkStackDeleted (yystackp, yyk);
4390                   break;
4391                 }
4392               else if (yyflag != yyok)
4393                 return yyflag;
4394             }
4395         }
4396     }
4397   return yyok;
4398 }
4399 
4400 /* Put in YYARG at most YYARGN of the expected tokens given the
4401    current YYSTACKP, and return the number of tokens stored in YYARG.  If
4402    YYARG is null, return the number of expected tokens (guaranteed to
4403    be less than YYNTOKENS).  */
4404 static int
yypcontext_expected_tokens(const yyGLRStack * yystackp,yysymbol_kind_t yyarg[],int yyargn)4405 yypcontext_expected_tokens (const yyGLRStack* yystackp,
4406                             yysymbol_kind_t yyarg[], int yyargn)
4407 {
4408   /* Actual size of YYARG. */
4409   int yycount = 0;
4410   int yyn = yypact[yystackp->yytops.yystates[0]->yylrState];
4411   if (!yypact_value_is_default (yyn))
4412     {
4413       /* Start YYX at -YYN if negative to avoid negative indexes in
4414          YYCHECK.  In other words, skip the first -YYN actions for
4415          this state because they are default actions.  */
4416       int yyxbegin = yyn < 0 ? -yyn : 0;
4417       /* Stay within bounds of both yycheck and yytname.  */
4418       int yychecklim = YYLAST - yyn + 1;
4419       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4420       int yyx;
4421       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4422         if (yycheck[yyx + yyn] == yyx && yyx != S_YYerror
4423             && !yytable_value_is_error (yytable[yyx + yyn]))
4424           {
4425             if (!yyarg)
4426               ++yycount;
4427             else if (yycount == yyargn)
4428               return 0;
4429             else
4430               yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
4431           }
4432     }
4433   if (yyarg && yycount == 0 && 0 < yyargn)
4434     yyarg[0] = S_YYEMPTY;
4435   return yycount;
4436 }
4437 
4438 static int
yy_syntax_error_arguments(const yyGLRStack * yystackp,yysymbol_kind_t yyarg[],int yyargn)4439 yy_syntax_error_arguments (const yyGLRStack* yystackp,
4440                            yysymbol_kind_t yyarg[], int yyargn)
4441 {
4442   yysymbol_kind_t yytoken = yychar == YYEMPTY ? S_YYEMPTY : YYTRANSLATE (yychar);
4443   /* Actual size of YYARG. */
4444   int yycount = 0;
4445   /* There are many possibilities here to consider:
4446      - If this state is a consistent state with a default action, then
4447        the only way this function was invoked is if the default action
4448        is an error action.  In that case, don't check for expected
4449        tokens because there are none.
4450      - The only way there can be no lookahead present (in yychar) is if
4451        this state is a consistent state with a default action.  Thus,
4452        detecting the absence of a lookahead is sufficient to determine
4453        that there is no unexpected or expected token to report.  In that
4454        case, just report a simple "syntax error".
4455      - Don't assume there isn't a lookahead just because this state is a
4456        consistent state with a default action.  There might have been a
4457        previous inconsistent state, consistent state with a non-default
4458        action, or user semantic action that manipulated yychar.
4459      - Of course, the expected token list depends on states to have
4460        correct lookahead information, and it depends on the parser not
4461        to perform extra reductions after fetching a lookahead from the
4462        scanner and before detecting a syntax error.  Thus, state merging
4463        (from LALR or IELR) and default reductions corrupt the expected
4464        token list.  However, the list is correct for canonical LR with
4465        one exception: it will still contain any token that will not be
4466        accepted due to an error action in a later state.
4467   */
4468   if (yytoken != S_YYEMPTY)
4469     {
4470       int yyn;
4471       if (yyarg)
4472         yyarg[yycount] = yytoken;
4473       ++yycount;
4474       yyn = yypcontext_expected_tokens (yystackp,
4475                                         yyarg ? yyarg + 1 : yyarg, yyargn - 1);
4476       if (yyn == YYENOMEM)
4477         return YYENOMEM;
4478       else
4479         yycount += yyn;
4480     }
4481   return yycount;
4482 }
4483 
4484 
4485 
4486 static void
yyreportSyntaxError(yyGLRStack * yystackp,yy::parser & yyparser,Parser * ps)4487 yyreportSyntaxError (yyGLRStack* yystackp, yy::parser& yyparser, Parser* ps)
4488 {
4489   if (yystackp->yyerrState != 0)
4490     return;
4491   {
4492   yybool yysize_overflow = yyfalse;
4493   char* yymsg = YY_NULLPTR;
4494   enum { YYARGS_MAX = 5 };
4495   /* Internationalized format string. */
4496   const char *yyformat = YY_NULLPTR;
4497   /* Arguments of yyformat: reported tokens (one for the "unexpected",
4498      one per "expected"). */
4499   yysymbol_kind_t yyarg[YYARGS_MAX];
4500   /* Cumulated lengths of YYARG.  */
4501   YYPTRDIFF_T yysize = 0;
4502 
4503   /* Actual size of YYARG. */
4504   int yycount
4505     = yy_syntax_error_arguments (yystackp, yyarg, YYARGS_MAX);
4506   if (yycount == YYENOMEM)
4507     yyMemoryExhausted (yystackp);
4508 
4509   switch (yycount)
4510     {
4511 #define YYCASE_(N, S)                   \
4512       case N:                           \
4513         yyformat = S;                   \
4514       break
4515     default: /* Avoid compiler warnings. */
4516       YYCASE_(0, YY_("syntax error"));
4517       YYCASE_(1, YY_("syntax error, unexpected %s"));
4518       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
4519       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
4520       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
4521       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
4522 #undef YYCASE_
4523     }
4524 
4525   /* Compute error message size.  Don't count the "%s"s, but reserve
4526      room for the terminator.  */
4527   yysize = yystrlen (yyformat) - 2 * yycount + 1;
4528   {
4529     int yyi;
4530     for (yyi = 0; yyi < yycount; ++yyi)
4531       {
4532         YYPTRDIFF_T yysz
4533           = yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
4534         if (YYSIZE_MAXIMUM - yysize < yysz)
4535           yysize_overflow = yytrue;
4536         else
4537           yysize += yysz;
4538       }
4539   }
4540 
4541   if (!yysize_overflow)
4542     yymsg = YY_CAST (char *, YYMALLOC (YY_CAST (YYSIZE_T, yysize)));
4543 
4544   if (yymsg)
4545     {
4546       char *yyp = yymsg;
4547       int yyi = 0;
4548       while ((*yyp = *yyformat))
4549         {
4550           if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
4551             {
4552               yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
4553               yyformat += 2;
4554             }
4555           else
4556             {
4557               ++yyp;
4558               ++yyformat;
4559             }
4560         }
4561       yyerror (&yylloc, yyparser, ps, yymsg);
4562       YYFREE (yymsg);
4563     }
4564   else
4565     {
4566       yyerror (&yylloc, yyparser, ps, YY_("syntax error"));
4567       yyMemoryExhausted (yystackp);
4568     }
4569   }
4570   yynerrs += 1;
4571 }
4572 
4573 /* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP,
4574    yylval, and yylloc are the syntactic category, semantic value, and location
4575    of the lookahead.  */
4576 static void
yyrecoverSyntaxError(yyGLRStack * yystackp,yy::parser & yyparser,Parser * ps)4577 yyrecoverSyntaxError (yyGLRStack* yystackp, yy::parser& yyparser, Parser* ps)
4578 {
4579   if (yystackp->yyerrState == 3)
4580     /* We just shifted the error token and (perhaps) took some
4581        reductions.  Skip tokens until we can proceed.  */
4582     while (yytrue)
4583       {
4584         yysymbol_kind_t yytoken;
4585         int yyj;
4586         if (yychar == YYEOF)
4587           yyFail (yystackp, &yylloc, yyparser, ps, YY_NULLPTR);
4588         if (yychar != YYEMPTY)
4589           {
4590             /* We throw away the lookahead, but the error range
4591                of the shifted error token must take it into account.  */
4592             yyGLRState *yys = yystackp->yytops.yystates[0];
4593             yyGLRStackItem yyerror_range[3];
4594             yyerror_range[1].yystate.yyloc = yys->yyloc;
4595             yyerror_range[2].yystate.yyloc = yylloc;
4596             YYLLOC_DEFAULT ((yys->yyloc), yyerror_range, 2);
4597             yytoken = YYTRANSLATE (yychar);
4598             yydestruct ("Error: discarding",
4599                         yytoken, &yylval, &yylloc, yyparser, ps);
4600             yychar = YYEMPTY;
4601           }
4602         yytoken = yygetToken (&yychar, yystackp, yyparser, ps);
4603         yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
4604         if (yypact_value_is_default (yyj))
4605           return;
4606         yyj += yytoken;
4607         if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken)
4608           {
4609             if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
4610               return;
4611           }
4612         else if (! yytable_value_is_error (yytable[yyj]))
4613           return;
4614       }
4615 
4616   /* Reduce to one stack.  */
4617   {
4618     YYPTRDIFF_T yyk;
4619     for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1)
4620       if (yystackp->yytops.yystates[yyk] != YY_NULLPTR)
4621         break;
4622     if (yyk >= yystackp->yytops.yysize)
4623       yyFail (yystackp, &yylloc, yyparser, ps, YY_NULLPTR);
4624     for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1)
4625       yymarkStackDeleted (yystackp, yyk);
4626     yyremoveDeletes (yystackp);
4627     yycompressStack (yystackp);
4628   }
4629 
4630   /* Pop stack until we find a state that shifts the error token.  */
4631   yystackp->yyerrState = 3;
4632   while (yystackp->yytops.yystates[0] != YY_NULLPTR)
4633     {
4634       yyGLRState *yys = yystackp->yytops.yystates[0];
4635       int yyj = yypact[yys->yylrState];
4636       if (! yypact_value_is_default (yyj))
4637         {
4638           yyj += S_YYerror;
4639           if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == S_YYerror
4640               && yyisShiftAction (yytable[yyj]))
4641             {
4642               /* Shift the error token.  */
4643               int yyaction = yytable[yyj];
4644               /* First adjust its location.*/
4645               YYLTYPE yyerrloc;
4646               yystackp->yyerror_range[2].yystate.yyloc = yylloc;
4647               YYLLOC_DEFAULT (yyerrloc, (yystackp->yyerror_range), 2);
4648               YY_SYMBOL_PRINT ("Shifting", yy_accessing_symbol (yyaction),
4649                                &yylval, &yyerrloc);
4650               yyglrShift (yystackp, 0, yyaction,
4651                           yys->yyposn, &yylval, &yyerrloc);
4652               yys = yystackp->yytops.yystates[0];
4653               break;
4654             }
4655         }
4656       yystackp->yyerror_range[1].yystate.yyloc = yys->yyloc;
4657       if (yys->yypred != YY_NULLPTR)
4658         yydestroyGLRState ("Error: popping", yys, yyparser, ps);
4659       yystackp->yytops.yystates[0] = yys->yypred;
4660       yystackp->yynextFree -= 1;
4661       yystackp->yyspaceLeft += 1;
4662     }
4663   if (yystackp->yytops.yystates[0] == YY_NULLPTR)
4664     yyFail (yystackp, &yylloc, yyparser, ps, YY_NULLPTR);
4665 }
4666 
4667 #define YYCHK1(YYE)                             \
4668   do {                                          \
4669     switch (YYE) {                              \
4670     case yyok:     break;                       \
4671     case yyabort:  goto yyabortlab;             \
4672     case yyaccept: goto yyacceptlab;            \
4673     case yyerr:    goto yyuser_error;           \
4674     case yynomem:  goto yyexhaustedlab;         \
4675     default:       goto yybuglab;               \
4676     }                                           \
4677   } while (0)
4678 
4679 /*----------.
4680 | yyparse.  |
4681 `----------*/
4682 
4683 int
yy_parse_impl(yy::parser & yyparser,Parser * ps)4684 yy_parse_impl (yy::parser& yyparser, Parser* ps)
4685 {
4686   int yyresult;
4687   yyGLRStack yystack;
4688   yyGLRStack* const yystackp = &yystack;
4689   YYPTRDIFF_T yyposn;
4690 
4691   YY_DPRINTF ((stderr, "Starting parse\n"));
4692 
4693   yychar = YYEMPTY;
4694   yylval = yyval_default;
4695   yylloc = yyloc_default;
4696 
4697   // User initialization code.
4698 yylloc.initialize ();
4699 #line 54 "system/tools/aidl/aidl_language_y.yy"
4700 {
4701     yylloc.begin.filename = yylloc.end.filename =
4702         const_cast<std::string *>(&ps->FileName());
4703 }
4704 
4705 #line 4706 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
4706 
4707 
4708   if (! yyinitGLRStack (yystackp, YYINITDEPTH))
4709     goto yyexhaustedlab;
4710   switch (YYSETJMP (yystack.yyexception_buffer))
4711     {
4712     case 0: break;
4713     case 1: goto yyabortlab;
4714     case 2: goto yyexhaustedlab;
4715     default: goto yybuglab;
4716     }
4717   yyglrShift (&yystack, 0, 0, 0, &yylval, &yylloc);
4718   yyposn = 0;
4719 
4720   while (yytrue)
4721     {
4722       /* For efficiency, we have two loops, the first of which is
4723          specialized to deterministic operation (single stack, no
4724          potential ambiguity).  */
4725       /* Standard mode. */
4726       while (yytrue)
4727         {
4728           yy_state_t yystate = yystack.yytops.yystates[0]->yylrState;
4729           YY_DPRINTF ((stderr, "Entering state %d\n", yystate));
4730           if (yystate == YYFINAL)
4731             goto yyacceptlab;
4732           if (yyisDefaultedState (yystate))
4733             {
4734               yyRuleNum yyrule = yydefaultAction (yystate);
4735               if (yyrule == 0)
4736                 {
4737                   yystack.yyerror_range[1].yystate.yyloc = yylloc;
4738                   yyreportSyntaxError (&yystack, yyparser, ps);
4739                   goto yyuser_error;
4740                 }
4741               YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue, yyparser, ps));
4742             }
4743           else
4744             {
4745               yysymbol_kind_t yytoken = yygetToken (&yychar, yystackp, yyparser, ps);
4746               const short* yyconflicts;
4747               int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
4748               if (*yyconflicts)
4749                 /* Enter nondeterministic mode.  */
4750                 break;
4751               if (yyisShiftAction (yyaction))
4752                 {
4753                   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4754                   yychar = YYEMPTY;
4755                   yyposn += 1;
4756                   yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc);
4757                   if (0 < yystack.yyerrState)
4758                     yystack.yyerrState -= 1;
4759                 }
4760               else if (yyisErrorAction (yyaction))
4761                 {
4762                   yystack.yyerror_range[1].yystate.yyloc = yylloc;
4763                   /* Issue an error message unless the scanner already
4764                      did. */
4765                   if (yychar != YYerror)
4766                     yyreportSyntaxError (&yystack, yyparser, ps);
4767                   goto yyuser_error;
4768                 }
4769               else
4770                 YYCHK1 (yyglrReduce (&yystack, 0, -yyaction, yytrue, yyparser, ps));
4771             }
4772         }
4773 
4774       /* Nondeterministic mode. */
4775       while (yytrue)
4776         {
4777           yysymbol_kind_t yytoken_to_shift;
4778           YYPTRDIFF_T yys;
4779 
4780           for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
4781             yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
4782 
4783           /* yyprocessOneStack returns one of three things:
4784 
4785               - An error flag.  If the caller is yyprocessOneStack, it
4786                 immediately returns as well.  When the caller is finally
4787                 yyparse, it jumps to an error label via YYCHK1.
4788 
4789               - yyok, but yyprocessOneStack has invoked yymarkStackDeleted
4790                 (&yystack, yys), which sets the top state of yys to NULL.  Thus,
4791                 yyparse's following invocation of yyremoveDeletes will remove
4792                 the stack.
4793 
4794               - yyok, when ready to shift a token.
4795 
4796              Except in the first case, yyparse will invoke yyremoveDeletes and
4797              then shift the next token onto all remaining stacks.  This
4798              synchronization of the shift (that is, after all preceding
4799              reductions on all stacks) helps prevent double destructor calls
4800              on yylval in the event of memory exhaustion.  */
4801 
4802           for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
4803             YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn, &yylloc, yyparser, ps));
4804           yyremoveDeletes (&yystack);
4805           if (yystack.yytops.yysize == 0)
4806             {
4807               yyundeleteLastStack (&yystack);
4808               if (yystack.yytops.yysize == 0)
4809                 yyFail (&yystack, &yylloc, yyparser, ps, YY_("syntax error"));
4810               YYCHK1 (yyresolveStack (&yystack, yyparser, ps));
4811               YY_DPRINTF ((stderr, "Returning to deterministic operation.\n"));
4812               yystack.yyerror_range[1].yystate.yyloc = yylloc;
4813               yyreportSyntaxError (&yystack, yyparser, ps);
4814               goto yyuser_error;
4815             }
4816 
4817           /* If any yyglrShift call fails, it will fail after shifting.  Thus,
4818              a copy of yylval will already be on stack 0 in the event of a
4819              failure in the following loop.  Thus, yychar is set to YYEMPTY
4820              before the loop to make sure the user destructor for yylval isn't
4821              called twice.  */
4822           yytoken_to_shift = YYTRANSLATE (yychar);
4823           yychar = YYEMPTY;
4824           yyposn += 1;
4825           for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
4826             {
4827               yy_state_t yystate = yystack.yytops.yystates[yys]->yylrState;
4828               const short* yyconflicts;
4829               int yyaction = yygetLRActions (yystate, yytoken_to_shift,
4830                               &yyconflicts);
4831               /* Note that yyconflicts were handled by yyprocessOneStack.  */
4832               YY_DPRINTF ((stderr, "On stack %ld, ", YY_CAST (long, yys)));
4833               YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc);
4834               yyglrShift (&yystack, yys, yyaction, yyposn,
4835                           &yylval, &yylloc);
4836               YY_DPRINTF ((stderr, "Stack %ld now in state %d\n",
4837                            YY_CAST (long, yys),
4838                            yystack.yytops.yystates[yys]->yylrState));
4839             }
4840 
4841           if (yystack.yytops.yysize == 1)
4842             {
4843               YYCHK1 (yyresolveStack (&yystack, yyparser, ps));
4844               YY_DPRINTF ((stderr, "Returning to deterministic operation.\n"));
4845               yycompressStack (&yystack);
4846               break;
4847             }
4848         }
4849       continue;
4850     yyuser_error:
4851       yyrecoverSyntaxError (&yystack, yyparser, ps);
4852       yyposn = yystack.yytops.yystates[0]->yyposn;
4853     }
4854 
4855  yyacceptlab:
4856   yyresult = 0;
4857   goto yyreturnlab;
4858 
4859  yybuglab:
4860   YY_ASSERT (yyfalse);
4861   goto yyabortlab;
4862 
4863  yyabortlab:
4864   yyresult = 1;
4865   goto yyreturnlab;
4866 
4867  yyexhaustedlab:
4868   yyerror (&yylloc, yyparser, ps, YY_("memory exhausted"));
4869   yyresult = 2;
4870   goto yyreturnlab;
4871 
4872  yyreturnlab:
4873   if (yychar != YYEMPTY)
4874     yydestruct ("Cleanup: discarding lookahead",
4875                 YYTRANSLATE (yychar), &yylval, &yylloc, yyparser, ps);
4876 
4877   /* If the stack is well-formed, pop the stack until it is empty,
4878      destroying its entries as we go.  But free the stack regardless
4879      of whether it is well-formed.  */
4880   if (yystack.yyitems)
4881     {
4882       yyGLRState** yystates = yystack.yytops.yystates;
4883       if (yystates)
4884         {
4885           YYPTRDIFF_T yysize = yystack.yytops.yysize;
4886           YYPTRDIFF_T yyk;
4887           for (yyk = 0; yyk < yysize; yyk += 1)
4888             if (yystates[yyk])
4889               {
4890                 while (yystates[yyk])
4891                   {
4892                     yyGLRState *yys = yystates[yyk];
4893                     yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;
4894                     if (yys->yypred != YY_NULLPTR)
4895                       yydestroyGLRState ("Cleanup: popping", yys, yyparser, ps);
4896                     yystates[yyk] = yys->yypred;
4897                     yystack.yynextFree -= 1;
4898                     yystack.yyspaceLeft += 1;
4899                   }
4900                 break;
4901               }
4902         }
4903       yyfreeGLRStack (&yystack);
4904     }
4905 
4906   return yyresult;
4907 }
4908 
4909 /* DEBUGGING ONLY */
4910 #if YYDEBUG
4911 /* Print *YYS and its predecessors. */
4912 static void
yy_yypstack(yyGLRState * yys)4913 yy_yypstack (yyGLRState* yys)
4914 {
4915   if (yys->yypred)
4916     {
4917       yy_yypstack (yys->yypred);
4918       YY_FPRINTF ((stderr, " -> "));
4919     }
4920   YY_FPRINTF ((stderr, "%d@%ld", yys->yylrState, YY_CAST (long, yys->yyposn)));
4921 }
4922 
4923 /* Print YYS (possibly NULL) and its predecessors. */
4924 static void
yypstates(yyGLRState * yys)4925 yypstates (yyGLRState* yys)
4926 {
4927   if (yys == YY_NULLPTR)
4928     YY_FPRINTF ((stderr, "<null>"));
4929   else
4930     yy_yypstack (yys);
4931   YY_FPRINTF ((stderr, "\n"));
4932 }
4933 
4934 /* Print the stack #YYK.  */
4935 static void
yypstack(yyGLRStack * yystackp,YYPTRDIFF_T yyk)4936 yypstack (yyGLRStack* yystackp, YYPTRDIFF_T yyk)
4937 {
4938   yypstates (yystackp->yytops.yystates[yyk]);
4939 }
4940 
4941 /* Print all the stacks.  */
4942 static void
yypdumpstack(yyGLRStack * yystackp)4943 yypdumpstack (yyGLRStack* yystackp)
4944 {
4945 #define YYINDEX(YYX)                                                    \
4946   YY_CAST (long,                                                        \
4947            ((YYX)                                                       \
4948             ? YY_REINTERPRET_CAST (yyGLRStackItem*, (YYX)) - yystackp->yyitems \
4949             : -1))
4950 
4951   yyGLRStackItem* yyp;
4952   for (yyp = yystackp->yyitems; yyp < yystackp->yynextFree; yyp += 1)
4953     {
4954       YY_FPRINTF ((stderr, "%3ld. ",
4955                    YY_CAST (long, yyp - yystackp->yyitems)));
4956       if (*YY_REINTERPRET_CAST (yybool *, yyp))
4957         {
4958           YY_ASSERT (yyp->yystate.yyisState);
4959           YY_ASSERT (yyp->yyoption.yyisState);
4960           YY_FPRINTF ((stderr, "Res: %d, LR State: %d, posn: %ld, pred: %ld",
4961                        yyp->yystate.yyresolved, yyp->yystate.yylrState,
4962                        YY_CAST (long, yyp->yystate.yyposn),
4963                        YYINDEX (yyp->yystate.yypred)));
4964           if (! yyp->yystate.yyresolved)
4965             YY_FPRINTF ((stderr, ", firstVal: %ld",
4966                          YYINDEX (yyp->yystate.yysemantics.yyfirstVal)));
4967         }
4968       else
4969         {
4970           YY_ASSERT (!yyp->yystate.yyisState);
4971           YY_ASSERT (!yyp->yyoption.yyisState);
4972           YY_FPRINTF ((stderr, "Option. rule: %d, state: %ld, next: %ld",
4973                        yyp->yyoption.yyrule - 1,
4974                        YYINDEX (yyp->yyoption.yystate),
4975                        YYINDEX (yyp->yyoption.yynext)));
4976         }
4977       YY_FPRINTF ((stderr, "\n"));
4978     }
4979 
4980   YY_FPRINTF ((stderr, "Tops:"));
4981   {
4982     YYPTRDIFF_T yyi;
4983     for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
4984       YY_FPRINTF ((stderr, "%ld: %ld; ", YY_CAST (long, yyi),
4985                    YYINDEX (yystackp->yytops.yystates[yyi])));
4986     YY_FPRINTF ((stderr, "\n"));
4987   }
4988 #undef YYINDEX
4989 }
4990 #endif
4991 
4992 #undef yylval
4993 #undef yychar
4994 #undef yynerrs
4995 #undef yylloc
4996 
4997 
4998 
4999 #line 5000 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
5000 
5001 /*------------------.
5002 | Report an error.  |
5003 `------------------*/
5004 
5005 static void
yyerror(const yy::parser::location_type * yylocationp,yy::parser & yyparser,Parser * ps,const char * msg)5006 yyerror (const yy::parser::location_type *yylocationp,
5007          yy::parser& yyparser, Parser* ps,
5008          const char* msg)
5009 {
5010   YY_USE (yyparser);
5011   YY_USE (ps);
5012   yyparser.error (*yylocationp, msg);
5013 }
5014 
5015 
5016 namespace yy {
5017 #line 5018 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
5018 
5019   /// Build a parser object.
parser(Parser * ps_yyarg)5020   parser::parser (Parser* ps_yyarg)
5021     :
5022 #if YYDEBUG
5023       yycdebug_ (&std::cerr),
5024 #endif
5025       ps (ps_yyarg)
5026   {}
5027 
~parser()5028   parser::~parser ()
5029   {}
5030 
~syntax_error()5031   parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
5032   {}
5033 
5034   int
operator ()()5035   parser::operator() ()
5036   {
5037     return parse ();
5038   }
5039 
5040   int
parse()5041   parser::parse ()
5042   {
5043     return ::yy_parse_impl (*this, ps);
5044   }
5045 
5046 #if YYDEBUG
5047   /*--------------------.
5048   | Print this symbol.  |
5049   `--------------------*/
5050 
5051   void
yy_symbol_value_print_(symbol_kind_type yykind,const value_type * yyvaluep,const location_type * yylocationp) const5052   parser::yy_symbol_value_print_ (symbol_kind_type yykind,
5053                            const value_type* yyvaluep,
5054                            const location_type* yylocationp) const
5055   {
5056     YY_USE (yylocationp);
5057     YY_USE (yyvaluep);
5058     std::ostream& yyo = debug_stream ();
5059     std::ostream& yyoutput = yyo;
5060     YY_USE (yyoutput);
5061     YY_USE (yykind);
5062   }
5063 
5064 
5065   void
yy_symbol_print_(symbol_kind_type yykind,const value_type * yyvaluep,const location_type * yylocationp) const5066   parser::yy_symbol_print_ (symbol_kind_type yykind,
5067                            const value_type* yyvaluep,
5068                            const location_type* yylocationp) const
5069   {
5070     *yycdebug_ << (yykind < YYNTOKENS ? "token" : "nterm")
5071                << ' ' << yysymbol_name (yykind) << " ("
5072                << *yylocationp << ": ";
5073     yy_symbol_value_print_ (yykind, yyvaluep, yylocationp);
5074     *yycdebug_ << ')';
5075   }
5076 
5077   std::ostream&
debug_stream() const5078   parser::debug_stream () const
5079   {
5080     return *yycdebug_;
5081   }
5082 
5083   void
set_debug_stream(std::ostream & o)5084   parser::set_debug_stream (std::ostream& o)
5085   {
5086     yycdebug_ = &o;
5087   }
5088 
5089 
5090   parser::debug_level_type
debug_level() const5091   parser::debug_level () const
5092   {
5093     return yydebug;
5094   }
5095 
5096   void
set_debug_level(debug_level_type l)5097   parser::set_debug_level (debug_level_type l)
5098   {
5099     // Actually, it is yydebug which is really used.
5100     yydebug = l;
5101   }
5102 
5103 #endif
5104 } // yy
5105 #line 5106 "out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_glibc_x86_64_static/gen/yacc/system/tools/aidl/aidl_language_y.cpp"
5106 
5107 #undef YYEMPTY
5108 #undef YYEOF
5109 #undef YYerror
5110 
5111 #undef S_YYEMPTY
5112 #undef S_YYEOF
5113 #undef S_YYerror
5114 #undef S_YYUNDEF
5115 #undef S_PACKAGE
5116 #undef S_IMPORT
5117 #undef S_ANNOTATION
5118 #undef S_C_STR
5119 #undef S_IDENTIFIER
5120 #undef S_INTERFACE
5121 #undef S_PARCELABLE
5122 #undef S_ONEWAY
5123 #undef S_ENUM
5124 #undef S_UNION
5125 #undef S_CONST
5126 #undef S_CHARVALUE
5127 #undef S_FLOATVALUE
5128 #undef S_HEXVALUE
5129 #undef S_INTVALUE
5130 #undef S_18_
5131 #undef S_19_
5132 #undef S_20_
5133 #undef S_21_
5134 #undef S_22_
5135 #undef S_23_
5136 #undef S_24_
5137 #undef S_25_
5138 #undef S_26_
5139 #undef S_27_
5140 #undef S_UNKNOWN
5141 #undef S_CPP_HEADER
5142 #undef S_NDK_HEADER
5143 #undef S_RUST_TYPE
5144 #undef S_IN
5145 #undef S_INOUT
5146 #undef S_OUT
5147 #undef S_TRUE_LITERAL
5148 #undef S_FALSE_LITERAL
5149 #undef S_LOGICAL_OR
5150 #undef S_LOGICAL_AND
5151 #undef S_39_
5152 #undef S_40_
5153 #undef S_41_
5154 #undef S_EQUALITY
5155 #undef S_NEQ
5156 #undef S_44_
5157 #undef S_45_
5158 #undef S_LEQ
5159 #undef S_GEQ
5160 #undef S_LSHIFT
5161 #undef S_RSHIFT
5162 #undef S_50_
5163 #undef S_51_
5164 #undef S_52_
5165 #undef S_53_
5166 #undef S_54_
5167 #undef S_UNARY_PLUS
5168 #undef S_UNARY_MINUS
5169 #undef S_57_
5170 #undef S_58_
5171 #undef S_YYACCEPT
5172 #undef S_document
5173 #undef S_identifier
5174 #undef S_optional_package
5175 #undef S_imports
5176 #undef S_import
5177 #undef S_qualified_name
5178 #undef S_decls
5179 #undef S_decl
5180 #undef S_unannotated_decl
5181 #undef S_type_params
5182 #undef S_optional_type_params
5183 #undef S_optional_unstructured_headers
5184 #undef S_parcelable_decl
5185 #undef S_parcelable_members
5186 #undef S_variable_decl
5187 #undef S_interface_decl
5188 #undef S_interface_members
5189 #undef S_const_expr
5190 #undef S_constant_value_list
5191 #undef S_constant_value_non_empty_list
5192 #undef S_constant_decl
5193 #undef S_enumerator
5194 #undef S_enumerators
5195 #undef S_enum_decl_body
5196 #undef S_enum_decl
5197 #undef S_union_decl
5198 #undef S_method_decl
5199 #undef S_arg_non_empty_list
5200 #undef S_arg_list
5201 #undef S_arg
5202 #undef S_non_array_type
5203 #undef S_type
5204 #undef S_type_args
5205 #undef S_annotation_list
5206 #undef S_parameter
5207 #undef S_parameter_list
5208 #undef S_parameter_non_empty_list
5209 #undef S_annotation
5210 #undef S_direction
5211 
5212 #line 844 "system/tools/aidl/aidl_language_y.yy"
5213 
5214 
5215 #include <ctype.h>
5216 #include <stdio.h>
5217 
error(const yy::parser::location_type & l,const std::string & errstr)5218 void yy::parser::error(const yy::parser::location_type& l, const std::string& errstr) {
5219   AIDL_ERROR(loc(l)) << errstr;
5220   // parser will return error value
5221 }
5222