libqasm
library for handling cQASM files
cqasm-v1-parser.cpp
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
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 <http://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 LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 2
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 /* "%code top" blocks. */
62 #line 29 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:316 */
63 
64 
68  #define ADD_SOURCE_LOCATION(v) \
69  v->set_annotation(cqasm::annotations::SourceLocation( \
70  helper.filename, \
71  yyloc.first_line, \
72  yyloc.first_column, \
73  yyloc.last_line, \
74  yyloc.last_column))
75 
81  #define NEW(v, T) \
82  v = new T(); \
83  ADD_SOURCE_LOCATION(v)
84 
92  #define FROM(t, s) \
93  t = s; \
94  { \
95  auto *loc = t->get_annotation_ptr<cqasm::annotations::SourceLocation>(); \
96  if (!loc) { \
97  ADD_SOURCE_LOCATION(t); \
98  } else { \
99  loc->expand_to_include(yyloc.first_line, yyloc.first_column); \
100  loc->expand_to_include(yyloc.last_line, yyloc.last_column); \
101  } \
102  }
103 
104 
105 #line 106 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:316 */
106 /* Substitute the type names. */
107 #define YYSTYPE CQASM_V1STYPE
108 #define YYLTYPE CQASM_V1LTYPE
109 /* Substitute the variable and function names. */
110 #define yyparse cqasm_v1parse
111 #define yylex cqasm_v1lex
112 #define yyerror cqasm_v1error
113 #define yydebug cqasm_v1debug
114 #define yynerrs cqasm_v1nerrs
115 
116 
117 /* Copy the first part of user declarations. */
118 
119 #line 120 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:339 */
120 
121 # ifndef YY_NULL
122 # if defined __cplusplus && 201103L <= __cplusplus
123 # define YY_NULL nullptr
124 # else
125 # define YY_NULL 0
126 # endif
127 # endif
128 
129 /* Enabling verbose error messages. */
130 #ifdef YYERROR_VERBOSE
131 # undef YYERROR_VERBOSE
132 # define YYERROR_VERBOSE 1
133 #else
134 # define YYERROR_VERBOSE 1
135 #endif
136 
137 /* In a future release of Bison, this section will be replaced
138  by #include "cqasm-v1-parser.hpp". */
139 #ifndef YY_CQASM_V1_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_STABLE_CBUILD_SRC_CQASM_CQASM_V1_PARSER_HPP_INCLUDED
140 # define YY_CQASM_V1_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_STABLE_CBUILD_SRC_CQASM_CQASM_V1_PARSER_HPP_INCLUDED
141 /* Debug traces. */
142 #ifndef CQASM_V1DEBUG
143 # if defined YYDEBUG
144 #if YYDEBUG
145 # define CQASM_V1DEBUG 1
146 # else
147 # define CQASM_V1DEBUG 0
148 # endif
149 # else /* ! defined YYDEBUG */
150 # define CQASM_V1DEBUG 0
151 # endif /* ! defined YYDEBUG */
152 #endif /* ! defined CQASM_V1DEBUG */
153 #if CQASM_V1DEBUG
154 extern int cqasm_v1debug;
155 #endif
156 /* "%code requires" blocks. */
157 #line 5 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:355 */
158 
163  #include <memory>
164  #include <cstdio>
165  #include <cstdint>
166  #include "cqasm-annotations.hpp"
167  #include "cqasm-v1-ast.hpp"
168  #include "cqasm-v1-parse-helper.hpp"
169  using namespace cqasm::v1::ast;
170  typedef void* yyscan_t;
171 
172  #define YYSTYPE CQASM_V1STYPE
173  #define YYLTYPE CQASM_V1LTYPE
174 
175 
176 #line 177 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:355 */
177 
178 /* Token type. */
179 #ifndef CQASM_V1TOKENTYPE
180 # define CQASM_V1TOKENTYPE
182  {
183  NEWLINE = 258,
184  VERSION = 259,
185  QUBITS = 260,
186  MAP = 261,
187  VAR = 262,
188  CDASH = 263,
189  COND = 264,
190  IF = 265,
191  ELSE = 266,
192  FOR = 267,
193  FOREACH = 268,
194  WHILE = 269,
195  REPEAT = 270,
196  UNTIL = 271,
197  CONTINUE = 272,
198  BREAK = 273,
199  SET = 274,
200  INT_LITERAL = 275,
202  BAD_NUMBER = 277,
203  STRING_OPEN = 278,
205  JSON_OPEN = 280,
206  JSON_CLOSE = 281,
209  IDENTIFIER = 284,
210  POWER = 285,
211  INT_DIV = 286,
212  LOGIC_OR = 287,
213  LOGIC_AND = 288,
214  LOGIC_XOR = 289,
215  CMP_GE = 290,
216  CMP_LE = 291,
217  CMP_EQ = 292,
218  CMP_NE = 293,
219  SHL = 294,
220  ARITH_SHR = 295,
221  LOGIC_SHR = 296,
222  ELLIPSIS = 297,
224  END_OF_FILE = 299,
225  UMINUS = 300,
226  UCOMP = 301,
227  UNOT = 302
228  };
229 #endif
230 
231 /* Value type. */
232 #if ! defined CQASM_V1STYPE && ! defined CQASM_V1STYPE_IS_DECLARED
235 {
236 #line 76 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:355 */
237 
238  char *str;
275 
276 #line 277 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:355 */
277 };
278 # define CQASM_V1STYPE_IS_TRIVIAL 1
279 # define CQASM_V1STYPE_IS_DECLARED 1
280 #endif
281 
282 /* Location type. */
283 #if ! defined CQASM_V1LTYPE && ! defined CQASM_V1LTYPE_IS_DECLARED
286 {
291 };
292 # define CQASM_V1LTYPE_IS_DECLARED 1
293 # define CQASM_V1LTYPE_IS_TRIVIAL 1
294 #endif
295 
296 
297 
299 
300 #endif /* !YY_CQASM_V1_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_STABLE_CBUILD_SRC_CQASM_CQASM_V1_PARSER_HPP_INCLUDED */
301 
302 /* Copy the second part of user declarations. */
303 
304 #line 305 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:358 */
305 /* Unqualified %code blocks. */
306 #line 24 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:359 */
307 
308  int yylex(YYSTYPE* yylvalp, YYLTYPE* yyllocp, yyscan_t scanner);
309  void yyerror(YYLTYPE* yyllocp, yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper, const char* msg);
310 
311 #line 312 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:359 */
312 
313 #ifdef short
314 # undef short
315 #endif
316 
317 #ifdef YYTYPE_UINT8
318 typedef YYTYPE_UINT8 yytype_uint8;
319 #else
320 typedef unsigned char yytype_uint8;
321 #endif
322 
323 #ifdef YYTYPE_INT8
324 typedef YYTYPE_INT8 yytype_int8;
325 #else
326 typedef signed char yytype_int8;
327 #endif
328 
329 #ifdef YYTYPE_UINT16
330 typedef YYTYPE_UINT16 yytype_uint16;
331 #else
332 typedef unsigned short int yytype_uint16;
333 #endif
334 
335 #ifdef YYTYPE_INT16
336 typedef YYTYPE_INT16 yytype_int16;
337 #else
338 typedef short int yytype_int16;
339 #endif
340 
341 #ifndef YYSIZE_T
342 # ifdef __SIZE_TYPE__
343 # define YYSIZE_T __SIZE_TYPE__
344 # elif defined size_t
345 # define YYSIZE_T size_t
346 # elif ! defined YYSIZE_T
347 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
348 # define YYSIZE_T size_t
349 # else
350 # define YYSIZE_T unsigned int
351 # endif
352 #endif
353 
354 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
355 
356 #ifndef YY_
357 # if defined YYENABLE_NLS && YYENABLE_NLS
358 # if ENABLE_NLS
359 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
360 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
361 # endif
362 # endif
363 # ifndef YY_
364 # define YY_(Msgid) Msgid
365 # endif
366 #endif
367 
368 #ifndef __attribute__
369 /* This feature is available in gcc versions 2.5 and later. */
370 # if (! defined __GNUC__ || __GNUC__ < 2 \
371  || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
372 # define __attribute__(Spec) /* empty */
373 # endif
374 #endif
375 
376 /* Suppress unused-variable warnings by "using" E. */
377 #if ! defined lint || defined __GNUC__
378 # define YYUSE(E) ((void) (E))
379 #else
380 # define YYUSE(E) /* empty */
381 #endif
382 
383 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
384 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
385 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
386  _Pragma ("GCC diagnostic push") \
387  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
388  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
389 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
390  _Pragma ("GCC diagnostic pop")
391 #else
392 # define YY_INITIAL_VALUE(Value) Value
393 #endif
394 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
395 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
396 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
397 #endif
398 #ifndef YY_INITIAL_VALUE
399 # define YY_INITIAL_VALUE(Value) /* Nothing. */
400 #endif
401 
402 
403 #if ! defined yyoverflow || YYERROR_VERBOSE
404 
405 /* The parser invokes alloca or malloc; define the necessary symbols. */
406 
407 # ifdef YYSTACK_USE_ALLOCA
408 # if YYSTACK_USE_ALLOCA
409 # ifdef __GNUC__
410 # define YYSTACK_ALLOC __builtin_alloca
411 # elif defined __BUILTIN_VA_ARG_INCR
412 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
413 # elif defined _AIX
414 # define YYSTACK_ALLOC __alloca
415 # elif defined _MSC_VER
416 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
417 # define alloca _alloca
418 # else
419 # define YYSTACK_ALLOC alloca
420 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
421 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
422  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
423 # ifndef EXIT_SUCCESS
424 # define EXIT_SUCCESS 0
425 # endif
426 # endif
427 # endif
428 # endif
429 # endif
430 
431 # ifdef YYSTACK_ALLOC
432  /* Pacify GCC's 'empty if-body' warning. */
433 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
434 # ifndef YYSTACK_ALLOC_MAXIMUM
435  /* The OS might guarantee only one guard page at the bottom of the stack,
436  and a page size can be as small as 4096 bytes. So we cannot safely
437  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
438  to allow for a few compiler-allocated temporary stack slots. */
439 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
440 # endif
441 # else
442 # define YYSTACK_ALLOC YYMALLOC
443 # define YYSTACK_FREE YYFREE
444 # ifndef YYSTACK_ALLOC_MAXIMUM
445 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
446 # endif
447 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
448  && ! ((defined YYMALLOC || defined malloc) \
449  && (defined YYFREE || defined free)))
450 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
451 # ifndef EXIT_SUCCESS
452 # define EXIT_SUCCESS 0
453 # endif
454 # endif
455 # ifndef YYMALLOC
456 # define YYMALLOC malloc
457 # if ! defined malloc && ! defined EXIT_SUCCESS
458 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
459 # endif
460 # endif
461 # ifndef YYFREE
462 # define YYFREE free
463 # if ! defined free && ! defined EXIT_SUCCESS
464 void free (void *); /* INFRINGES ON USER NAME SPACE */
465 # endif
466 # endif
467 # endif
468 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
469 
470 
471 #if (! defined yyoverflow \
472  && (! defined __cplusplus \
473  || (defined CQASM_V1LTYPE_IS_TRIVIAL && CQASM_V1LTYPE_IS_TRIVIAL \
474  && defined CQASM_V1STYPE_IS_TRIVIAL && CQASM_V1STYPE_IS_TRIVIAL)))
475 
476 /* A type that is properly aligned for any stack member. */
477 union yyalloc
478 {
482 };
483 
484 /* The size of the maximum gap between one aligned stack and the next. */
485 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
486 
487 /* The size of an array large to enough to hold all stacks, each with
488  N elements. */
489 # define YYSTACK_BYTES(N) \
490  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
491  + 2 * YYSTACK_GAP_MAXIMUM)
492 
493 # define YYCOPY_NEEDED 1
494 
495 /* Relocate STACK from its old location to the new one. The
496  local variables YYSIZE and YYSTACKSIZE give the old and new number of
497  elements in the stack, and YYPTR gives the new location of the
498  stack. Advance YYPTR to a properly aligned location for the next
499  stack. */
500 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
501  do \
502  { \
503  YYSIZE_T yynewbytes; \
504  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
505  Stack = &yyptr->Stack_alloc; \
506  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
507  yyptr += yynewbytes / sizeof (*yyptr); \
508  } \
509  while (0)
510 
511 #endif
512 
513 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
514 /* Copy COUNT objects from SRC to DST. The source and destination do
515  not overlap. */
516 # ifndef YYCOPY
517 # if defined __GNUC__ && 1 < __GNUC__
518 # define YYCOPY(Dst, Src, Count) \
519  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
520 # else
521 # define YYCOPY(Dst, Src, Count) \
522  do \
523  { \
524  YYSIZE_T yyi; \
525  for (yyi = 0; yyi < (Count); yyi++) \
526  (Dst)[yyi] = (Src)[yyi]; \
527  } \
528  while (0)
529 # endif
530 # endif
531 #endif /* !YYCOPY_NEEDED */
532 
533 /* YYFINAL -- State number of the termination state. */
534 #define YYFINAL 9
535 /* YYLAST -- Last index in YYTABLE. */
536 #define YYLAST 2125
537 
538 /* YYNTOKENS -- Number of terminals. */
539 #define YYNTOKENS 72
540 /* YYNNTS -- Number of nonterminals. */
541 #define YYNNTS 55
542 /* YYNRULES -- Number of rules. */
543 #define YYNRULES 170
544 /* YYNSTATES -- Number of states. */
545 #define YYNSTATES 328
546 
547 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
548  by yylex, with out-of-bounds checking. */
549 #define YYUNDEFTOK 2
550 #define YYMAXUTOK 302
551 
552 #define YYTRANSLATE(YYX) \
553  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
554 
555 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
556  as returned by yylex, without out-of-bounds checking. */
557 static const yytype_uint8 yytranslate[] =
558 {
559  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
561  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
562  2, 2, 2, 67, 2, 2, 2, 57, 50, 2,
563  61, 65, 55, 53, 45, 54, 68, 56, 2, 2,
564  2, 2, 2, 2, 2, 2, 2, 2, 46, 2,
565  52, 69, 51, 47, 63, 2, 2, 2, 2, 2,
566  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
567  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
568  2, 62, 2, 64, 49, 2, 2, 2, 2, 2,
569  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571  2, 2, 2, 70, 48, 71, 66, 2, 2, 2,
572  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
573  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
574  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
575  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
576  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
582  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
585  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
586  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
587  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
588  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
589  58, 59, 60
590 };
591 
592 #if CQASM_V1DEBUG
593  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
594 static const yytype_uint16 yyrline[] =
595 {
596  0, 251, 251, 252, 256, 257, 261, 265, 269, 270,
597  273, 274, 279, 280, 281, 285, 289, 293, 297, 298,
598  302, 305, 308, 309, 312, 313, 316, 319, 323, 324,
599  325, 328, 329, 330, 331, 332, 333, 334, 335, 336,
600  337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
601  347, 348, 349, 352, 357, 358, 359, 362, 363, 364,
602  365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
603  375, 376, 377, 378, 379, 380, 381, 382, 385, 389,
604  390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
605  400, 401, 404, 405, 406, 407, 408, 409, 410, 411,
606  412, 413, 414, 415, 416, 420, 421, 424, 425, 429,
607  432, 433, 434, 439, 444, 449, 457, 463, 469, 480,
608  481, 485, 486, 490, 491, 495, 496, 500, 501, 504,
609  508, 509, 513, 514, 517, 520, 521, 524, 530, 536,
610  545, 555, 565, 568, 571, 574, 578, 579, 580, 581,
611  582, 583, 584, 585, 586, 587, 588, 589, 590, 597,
612  598, 602, 603, 607, 608, 612, 613, 617, 620, 625,
613  626
614 };
615 #endif
616 
617 #if CQASM_V1DEBUG || YYERROR_VERBOSE || 1
618 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
619  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
620 static const char *const yytname[] =
621 {
622  "$end", "error", "$undefined", "NEWLINE", "VERSION", "QUBITS", "MAP",
623  "VAR", "CDASH", "COND", "IF", "ELSE", "FOR", "FOREACH", "WHILE",
624  "REPEAT", "UNTIL", "CONTINUE", "BREAK", "SET", "INT_LITERAL",
625  "FLOAT_LITERAL", "BAD_NUMBER", "STRING_OPEN", "STRING_CLOSE",
626  "JSON_OPEN", "JSON_CLOSE", "STRBUILD_APPEND", "STRBUILD_ESCAPE",
627  "IDENTIFIER", "POWER", "INT_DIV", "LOGIC_OR", "LOGIC_AND", "LOGIC_XOR",
628  "CMP_GE", "CMP_LE", "CMP_EQ", "CMP_NE", "SHL", "ARITH_SHR", "LOGIC_SHR",
629  "ELLIPSIS", "BAD_CHARACTER", "END_OF_FILE", "','", "':'", "'?'", "'|'",
630  "'^'", "'&'", "'>'", "'<'", "'+'", "'-'", "'*'", "'/'", "'%'", "UMINUS",
631  "UCOMP", "UNOT", "'('", "'['", "'@'", "']'", "')'", "'~'", "'!'", "'.'",
632  "'='", "'{'", "'}'", "$accept", "Newline", "OptNewline",
633  "IntegerLiteral", "FloatLiteral", "MatrixRows", "MatrixLiteral",
634  "StringBuilder", "StringLiteral", "JsonLiteral", "Identifier",
635  "FunctionCall", "IndexItem", "IndexRange", "IndexEntry", "IndexList",
636  "Index", "IndexNP", "UnaryOp", "BinaryOp", "TernaryOp", "UnaryOpNP",
637  "BinaryOpNP", "TernaryOpNP", "Expression", "ExpressionNP",
638  "ExpressionList", "ExpressionListNP", "AnnotationName", "AnnotationData",
639  "Instruction", "AnnotInstr", "SLParInstrList", "CBParInstrList",
640  "Mapping", "VariableBody", "Variable", "Subcircuit", "SubStatements",
641  "Assignment", "OptAssignment", "IfElse", "ForLoop", "ForeachLoop",
642  "WhileLoop", "RepeatUntilLoop", "Continue", "Break", "Statement",
643  "AnnotStatement", "StatementList", "Statements", "Version", "Program",
644  "Root", YY_NULL
645 };
646 #endif
647 
648 # ifdef YYPRINT
649 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
650  (internal) symbol number NUM (which must be that of a token). */
651 static const yytype_uint16 yytoknum[] =
652 {
653  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
654  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
655  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
656  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
657  295, 296, 297, 298, 299, 44, 58, 63, 124, 94,
658  38, 62, 60, 43, 45, 42, 47, 37, 300, 301,
659  302, 40, 91, 64, 93, 41, 126, 33, 46, 61,
660  123, 125
661 };
662 # endif
663 
664 #define YYPACT_NINF -239
665 
666 #define yypact_value_is_default(Yystate) \
667  (!!((Yystate) == (-239)))
668 
669 #define YYTABLE_NINF -137
670 
671 #define yytable_value_is_error(Yytable_value) \
672  0
673 
674  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
675  STATE-NUM. */
676 static const yytype_int16 yypact[] =
677 {
678  78, -239, -239, 11, 13, -239, 30, -239, 15, -239,
679  -239, -239, 9, 15, 773, -239, -239, -239, -239, 951,
680  951, 21, 21, -17, 3, 19, 23, 34, 29, -239,
681  -239, 1002, -239, 21, 71, 592, -239, 35, 76, -239,
682  -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
683  68, 71, -239, -239, -239, -239, 951, 951, 71, 951,
684  951, -239, -239, -239, -239, -239, 72, -239, -239, -239,
685  -239, -239, 1040, -33, 1520, 46, -239, 1002, 951, 951,
686  4, 951, 951, 71, 60, -239, 1002, 951, 1002, 1002,
687  -239, -239, -239, -239, -239, 72, -239, -239, -239, -239,
688  -239, 1192, 73, 210, 1751, 80, 21, 210, 21, 129,
689  -239, 28, 62, 83, 1232, 417, 83, 83, 647, 951,
690  951, 951, 951, 951, 951, 951, 951, 951, 951, 951,
691  951, 951, 951, 951, 951, 951, 951, 951, 951, 951,
692  951, 951, 951, 797, -239, 951, 21, 21, 21, 1652,
693  1268, 1304, 1112, -239, 137, 1152, 1340, 872, 88, 93,
694  1376, 93, 93, 1002, 1002, 1002, 1002, 1002, 1002, 1002,
695  1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002,
696  1002, 1002, 1002, 1002, 1002, 951, 1002, 951, 76, 71,
697  1002, 89, 95, -239, 35, -239, 68, -239, -239, -239,
698  -239, -239, -239, 71, 1685, 115, -239, -39, -20, -20,
699  1781, 1839, 471, 569, 569, 2035, 2035, -8, -8, -8,
700  1553, 1895, 281, 1979, 569, 569, 176, 176, -20, -20,
701  -20, -239, -239, -239, -32, 1586, 1685, -239, -239, -239,
702  1002, 21, 29, 951, 951, 951, 29, -239, 71, 951,
703  -239, -11, -11, 1811, 1923, 1867, 793, 793, 2063, 2063,
704  97, 97, 97, 1718, 1951, 2007, 793, 793, 180, 180,
705  -11, -11, -11, -30, 1751, 1412, 64, 90, 1751, 21,
706  925, 220, 98, 951, -239, 951, 951, -239, 951, 80,
707  1002, 152, 1685, 1079, 1619, -239, 96, 1448, 1002, -239,
708  -239, 76, -239, -239, -239, -34, 115, -239, 1685, 1685,
709  -239, 1685, 80, -1, 935, 951, -239, -239, 1751, -239,
710  -239, -239, 104, 1484, 29, 29, -239, -239
711 };
712 
713  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
714  Performed when YYTABLE does not specify something else to do. Zero
715  means the default is an error. */
716 static const yytype_uint8 yydefact[] =
717 {
718  0, 170, 3, 4, 0, 169, 0, 2, 0, 1,
719  6, 166, 5, 0, 0, 164, 168, 165, 158, 0,
720  0, 0, 0, 0, 0, 0, 0, 0, 0, 144,
721  145, 0, 17, 0, 5, 0, 120, 122, 149, 146,
722  147, 148, 151, 152, 153, 154, 155, 156, 157, 160,
723  162, 5, 91, 7, 14, 14, 0, 0, 5, 0,
724  0, 79, 80, 81, 82, 83, 84, 85, 86, 87,
725  88, 89, 5, 84, 0, 0, 129, 0, 0, 0,
726  0, 0, 0, 5, 0, 104, 0, 0, 0, 0,
727  92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
728  102, 0, 130, 0, 108, 114, 0, 0, 0, 0,
729  163, 0, 0, 28, 0, 0, 29, 30, 0, 0,
730  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
731  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
732  0, 0, 0, 0, 167, 0, 0, 0, 0, 116,
733  0, 0, 0, 135, 0, 0, 0, 0, 0, 54,
734  0, 55, 56, 0, 0, 0, 0, 0, 0, 0,
735  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
736  0, 0, 0, 0, 0, 0, 0, 0, 124, 5,
737  0, 0, 110, 119, 121, 159, 161, 15, 12, 13,
738  16, 90, 11, 5, 106, 9, 18, 0, 31, 34,
739  52, 50, 51, 44, 46, 41, 42, 38, 39, 40,
740  0, 49, 48, 47, 43, 45, 36, 37, 32, 33,
741  35, 22, 23, 25, 0, 20, 126, 125, 128, 127,
742  0, 0, 0, 0, 0, 0, 0, 133, 5, 0,
743  103, 57, 60, 77, 75, 76, 70, 72, 67, 68,
744  64, 65, 66, 0, 74, 73, 69, 71, 62, 63,
745  58, 59, 61, 0, 115, 0, 4, 0, 107, 0,
746  0, 0, 0, 0, 19, 0, 0, 26, 0, 117,
747  0, 137, 134, 0, 0, 142, 0, 0, 0, 27,
748  131, 123, 150, 109, 111, 0, 8, 10, 105, 53,
749  24, 21, 118, 0, 0, 0, 132, 143, 78, 112,
750  139, 138, 0, 0, 0, 0, 140, 141
751 };
752 
753  /* YYPGOTO[NTERM-NUM]. */
754 static const yytype_int16 yypgoto[] =
755 {
756  -239, 6, 222, 8, 215, -239, 371, 146, 399, 555,
757  182, 585, -239, -239, -81, -15, -239, -239, -239, -239,
758  -239, -239, -239, -239, -19, 741, -116, -237, -239, 100,
759  -239, 105, -83, -239, -239, 67, -239, -239, -238, -239,
760  -98, -93, -239, -239, -239, -239, -239, -239, -239, 118,
761  77, 156, -239, -239, -239
762 };
763 
764  /* YYDEFGOTO[NTERM-NUM]. */
765 static const yytype_int16 yydefgoto[] =
766 {
767  -1, 3, 15, 61, 62, 203, 63, 111, 64, 65,
768  66, 67, 231, 232, 233, 234, 68, 97, 69, 70,
769  71, 98, 99, 100, 204, 104, 205, 105, 192, 193,
770  36, 37, 38, 189, 39, 76, 40, 41, 84, 153,
771  154, 42, 43, 44, 45, 46, 47, 48, 49, 50,
772  51, 16, 12, 5, 6
773 };
774 
775  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
776  positive, shift that token. If negative, reduce the rule whose
777  number is the opposite. If YYTABLE_NINF, syntax error. */
778 static const yytype_int16 yytable[] =
779 {
780  72, 74, 207, 289, 291, 52, 283, -136, 295, 24,
781  119, 283, 2, 286, 7, 286, 11, 8, 14, 163,
782  188, 17, 119, 120, 10, 53, 284, 54, 118, 55,
783  9, 319, 287, 32, 299, 10, 145, 113, 114, 90,
784  116, 117, 142, 90, 78, 137, 138, 139, 140, 141,
785  32, 185, 197, 312, 142, 198, 199, 109, 56, 150,
786  151, 152, 155, 156, 79, 57, 58, 7, 160, 83,
787  59, 60, 22, 23, 2, 320, 158, 13, 143, 1,
788  80, 2, -5, 31, 81, 90, 326, 327, 200, 198,
789  199, 147, 148, 32, 90, 82, 90, 90, 106, 83,
790  208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
791  218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
792  228, 229, 230, 235, 107, 190, 236, 163, 164, -4,
793  18, 108, 7, 118, 187, 20, 21, 22, 23, 24,
794  244, 25, 26, 27, 28, 142, 29, 30, 31, 249,
795  180, 181, 182, 183, 184, 185, 280, 279, 32, 185,
796  283, 302, 307, 313, 305, 306, 235, 316, 275, 324,
797  273, 90, 90, 90, 90, 90, 90, 90, 90, 90,
798  90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
799  90, 90, 90, 301, 90, 276, 35, 33, 90, 34,
800  -4, 112, 73, 75, 77, 310, 119, 120, 195, 281,
801  163, 164, 194, 95, 238, 102, 322, 95, 22, 23,
802  321, 52, 4, 7, 292, 293, 294, 196, 144, 31,
803  297, 139, 140, 141, 248, 182, 183, 184, 142, 32,
804  10, 53, 185, 54, 0, 55, 91, 0, 90, 32,
805  91, 0, 0, 0, 109, 0, 103, 0, 0, 95,
806  0, 0, 0, 0, 308, 0, 309, 235, 95, 311,
807  95, 95, 0, 110, 56, 0, 0, 0, 0, 0,
808  115, 57, 58, 0, -4, 35, 59, 60, 191, 35,
809  191, 35, 91, 0, 0, 152, 323, 0, 90, 0,
810  0, 91, 0, 91, 91, 157, 90, 0, 0, 0,
811  0, 119, 120, 0, 0, 0, 124, 125, 126, 127,
812  128, 129, 130, 0, 0, 35, 0, 0, 237, 75,
813  239, 134, 135, 136, 137, 138, 139, 140, 141, 35,
814  0, 0, 0, 142, 0, 95, 95, 95, 95, 95,
815  95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
816  95, 95, 95, 95, 95, 95, 95, 0, 95, 0,
817  0, 0, 95, 0, 0, 0, 0, 0, 91, 91,
818  91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
819  91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
820  0, 91, 92, 0, 0, 91, 92, 0, 0, 0,
821  0, 277, 0, 0, 0, 0, 0, 0, 52, 0,
822  0, 0, 95, 290, 0, 282, 0, 0, 0, 0,
823  93, 0, 0, 0, 93, 0, 0, 10, 53, 0,
824  54, 0, 55, 0, 0, 0, 32, 0, 92, 0,
825  0, 0, 0, 0, 0, 91, 0, 92, 35, 92,
826  92, 303, 0, 0, 0, 0, 0, 0, 0, 0,
827  296, 56, 95, 0, 0, 0, 93, 0, 57, 58,
828  95, 202, 0, 59, 60, 93, 0, 93, 93, 0,
829  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
830  0, 119, 120, 0, 122, 91, 124, 125, 126, 127,
831  128, 129, 130, 91, 0, 0, 0, 0, 0, 132,
832  133, 134, 135, 136, 137, 138, 139, 140, 141, 0,
833  0, 0, 0, 142, 92, 92, 92, 92, 92, 92,
834  92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
835  92, 92, 92, 92, 92, 92, 0, 92, 0, 0,
836  0, 92, 93, 93, 93, 93, 93, 93, 93, 93,
837  93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
838  93, 93, 93, 93, 0, 93, 94, 0, 0, 93,
839  94, 0, -113, 85, 0, -113, 0, 0, 0, 119,
840  120, 0, 0, 0, 0, 0, 0, 0, 128, 129,
841  130, 92, 10, 53, 0, 54, 96, 55, 0, 0,
842  96, 32, 137, 138, 139, 140, 141, 0, 0, 0,
843  0, 142, 94, 0, 0, 0, 0, 0, 0, 93,
844  -113, 94, 0, 94, 94, 0, 86, 0, 52, 0,
845  0, 0, 0, 87, 58, -113, 0, 0, 88, 89,
846  0, 92, 96, -113, 0, 0, 0, 10, 53, 92,
847  54, 96, 55, 96, 96, 0, 32, 0, 0, 0,
848  0, 0, 0, 0, 0, 0, 0, 0, 0, 93,
849  0, 0, 0, 0, 0, 0, 0, 93, 0, 0,
850  0, 56, 0, 0, 0, 0, 0, 0, 57, 58,
851  0, 0, 206, 59, 60, 0, 0, 0, 94, 94,
852  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
853  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
854  0, 94, 0, 0, 0, 94, 0, 0, 96, 96,
855  96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
856  96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
857  0, 96, 101, -4, 18, 96, 7, 0, 19, 20,
858  21, 22, 23, 24, 0, 25, 26, 27, 28, 0,
859  29, 30, 31, 0, 0, 94, 0, -4, 18, 0,
860  7, 0, 32, 20, 21, 22, 23, 24, 0, 25,
861  26, 27, 28, 0, 29, 30, 31, 0, 149, 0,
862  0, 0, 0, 163, 164, 96, 32, 159, 0, 161,
863  162, 0, 172, 173, 174, 0, 0, 0, 0, 0,
864  0, 33, 0, 34, 0, 94, 180, 181, 182, 183,
865  184, 0, 0, 94, 0, 185, 0, 0, 0, 0,
866  0, 0, 0, 0, 0, 33, 0, 34, 0, 0,
867  0, 0, 0, 18, 0, 96, 0, 0, 20, 21,
868  22, 23, 24, 96, 25, 26, 27, 28, 0, 29,
869  30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
870  0, 32, 0, 0, 251, 252, 253, 254, 255, 256,
871  257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
872  267, 268, 269, 270, 271, 272, 52, 274, 0, 0,
873  0, 278, 0, 0, 0, 0, 52, 0, 0, 0,
874  33, 0, 34, 247, 0, 10, 53, 0, 54, 0,
875  55, 0, 52, 0, 32, 10, 53, 0, 54, 0,
876  55, 0, 0, 0, 32, 0, 0, 0, 0, 0,
877  0, 10, 53, 0, 54, 0, 55, 0, 0, 56,
878  32, 0, 0, 0, 0, 0, 57, 58, 0, 56,
879  304, 59, 60, 0, 0, 0, 57, 58, 0, 0,
880  -136, 59, 60, 85, 0, 56, 0, 0, 0, 0,
881  0, 0, 57, 58, 0, 0, 0, 59, 60, 0,
882  0, 0, 10, 53, 0, 54, 0, 55, 0, 0,
883  0, 32, 0, 0, 0, 0, 0, 0, 0, 318,
884  0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
885  0, 0, 0, 0, 0, 0, 86, 0, 0, 0,
886  0, 0, 0, 87, 58, 0, 0, 0, 88, 89,
887  119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
888  129, 130, 314, 0, 0, 0, 0, 131, 132, 133,
889  134, 135, 136, 137, 138, 139, 140, 141, 0, 0,
890  0, 0, 142, 0, 0, 0, 0, 0, 0, 119,
891  120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
892  130, 0, 0, 0, 0, 0, 131, 132, 133, 134,
893  135, 136, 137, 138, 139, 140, 141, 0, 0, 0,
894  0, 142, 119, 120, 121, 122, 123, 124, 125, 126,
895  127, 128, 129, 130, 0, 0, 0, 0, 0, 131,
896  132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
897  0, 0, 0, 0, 142, 0, 0, 0, 0, 0,
898  0, 243, 119, 120, 121, 122, 123, 124, 125, 126,
899  127, 128, 129, 130, 0, 0, 0, 0, 0, 131,
900  132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
901  0, 0, 0, 0, 142, 0, 0, 0, 0, 0,
902  0, 245, 163, 164, 165, 166, 167, 168, 169, 170,
903  171, 172, 173, 174, 0, 0, 0, 0, 0, 175,
904  0, 176, 177, 178, 179, 180, 181, 182, 183, 184,
905  0, 0, 0, 0, 185, 0, 0, 0, 0, 0,
906  0, 186, 119, 120, 121, 122, 123, 124, 125, 126,
907  127, 128, 129, 130, 0, 0, 0, 0, 0, 131,
908  132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
909  0, 0, 0, 0, 142, 0, 0, 201, 119, 120,
910  121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
911  0, 0, 0, 0, 0, 131, 132, 133, 134, 135,
912  136, 137, 138, 139, 140, 141, 0, 0, 0, 0,
913  142, 0, 0, 241, 119, 120, 121, 122, 123, 124,
914  125, 126, 127, 128, 129, 130, 0, 0, 0, 0,
915  0, 131, 132, 133, 134, 135, 136, 137, 138, 139,
916  140, 141, 0, 0, 0, 0, 142, 0, 0, 242,
917  119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
918  129, 130, 0, 0, 0, 0, 0, 131, 132, 133,
919  134, 135, 136, 137, 138, 139, 140, 141, 0, 0,
920  0, 0, 142, 0, 0, 246, 119, 120, 121, 122,
921  123, 124, 125, 126, 127, 128, 129, 130, 0, 0,
922  0, 0, 0, 131, 132, 133, 134, 135, 136, 137,
923  138, 139, 140, 141, 0, 0, 0, 0, 142, 0,
924  0, 250, 119, 120, 121, 122, 123, 124, 125, 126,
925  127, 128, 129, 130, 0, 0, 0, 0, 0, 131,
926  132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
927  0, 0, 0, 0, 142, 0, 0, 300, 119, 120,
928  121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
929  0, 0, 0, 0, 0, 131, 132, 133, 134, 135,
930  136, 137, 138, 139, 140, 141, 0, 0, 0, 0,
931  142, 0, 0, 317, 119, 120, 121, 122, 123, 124,
932  125, 126, 127, 128, 129, 130, 0, 0, 0, 0,
933  0, 131, 132, 133, 134, 135, 136, 137, 138, 139,
934  140, 141, 0, 0, 0, 0, 142, 0, 0, 325,
935  119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
936  129, 130, 0, 0, 0, 146, 0, 131, 132, 133,
937  134, 135, 136, 137, 138, 139, 140, 141, 0, 0,
938  0, 0, 142, 119, 120, 121, 122, 123, 124, 125,
939  126, 127, 128, 129, 130, 0, 0, 0, 0, 285,
940  131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
941  141, 0, 0, 0, 0, 142, 119, 120, 121, 122,
942  123, 124, 125, 126, 127, 128, 129, 130, 0, 0,
943  0, 0, 288, 131, 132, 133, 134, 135, 136, 137,
944  138, 139, 140, 141, 0, 0, 0, 0, 142, 119,
945  120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
946  130, 315, 0, 0, 0, 0, 131, 132, 133, 134,
947  135, 136, 137, 138, 139, 140, 141, 0, 0, 0,
948  0, 142, 163, 164, 165, 166, 167, 168, 169, 170,
949  171, 172, 173, 174, 0, 0, 0, 240, 0, 175,
950  0, 176, 177, 178, 179, 180, 181, 182, 183, 184,
951  0, 0, 0, 0, 185, 119, 120, 121, 122, 123,
952  124, 125, 126, 127, 128, 129, 130, 0, 0, 0,
953  0, 0, 131, 132, 133, 134, 135, 136, 137, 138,
954  139, 140, 141, 0, 0, 0, 0, 142, 163, 164,
955  165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
956  0, 0, 0, 0, 298, 175, 0, 176, 177, 178,
957  179, 180, 181, 182, 183, 184, 0, 0, 0, 0,
958  185, 163, 164, 165, 166, 167, 168, 169, 170, 171,
959  172, 173, 174, 0, 0, 0, 0, 0, 175, 0,
960  176, 177, 178, 179, 180, 181, 182, 183, 184, 0,
961  0, 119, 120, 185, 122, 123, 124, 125, 126, 127,
962  128, 129, 130, 0, 0, 0, 0, 0, 0, 132,
963  133, 134, 135, 136, 137, 138, 139, 140, 141, 0,
964  0, 163, 164, 142, 166, 167, 168, 169, 170, 171,
965  172, 173, 174, 0, 0, 0, 0, 0, 0, 0,
966  176, 177, 178, 179, 180, 181, 182, 183, 184, 119,
967  120, 0, 0, 185, 124, 125, 126, 127, 128, 129,
968  130, 0, 0, 0, 0, 0, 0, 132, 133, 134,
969  135, 136, 137, 138, 139, 140, 141, 163, 164, 0,
970  166, 142, 168, 169, 170, 171, 172, 173, 174, 0,
971  0, 0, 0, 0, 0, 0, 176, 177, 178, 179,
972  180, 181, 182, 183, 184, 119, 120, 0, 0, 185,
973  124, 125, 126, 127, 128, 129, 130, 0, 0, 0,
974  0, 0, 0, 0, 133, 134, 135, 136, 137, 138,
975  139, 140, 141, 163, 164, 0, 0, 142, 168, 169,
976  170, 171, 172, 173, 174, 0, 0, 0, 0, 0,
977  0, 0, 176, 177, 178, 179, 180, 181, 182, 183,
978  184, 163, 164, 0, 0, 185, 168, 169, 170, 171,
979  172, 173, 174, 0, 0, 0, 0, 0, 0, 0,
980  0, 177, 178, 179, 180, 181, 182, 183, 184, 119,
981  120, 0, 0, 185, 124, 125, 126, 127, 128, 129,
982  130, 0, 0, 0, 0, 0, 0, 0, 0, 0,
983  135, 136, 137, 138, 139, 140, 141, 163, 164, 0,
984  0, 142, 168, 169, 170, 171, 172, 173, 174, 0,
985  0, 0, 0, 0, 0, 0, 0, 0, 178, 179,
986  180, 181, 182, 183, 184, 119, 120, 0, 0, 185,
987  124, 125, 0, 0, 128, 129, 130, 0, 0, 0,
988  0, 0, 0, 0, 0, 0, 135, 136, 137, 138,
989  139, 140, 141, 163, 164, 0, 0, 142, 168, 169,
990  0, 0, 172, 173, 174, 0, 0, 0, 0, 0,
991  0, 0, 0, 0, 178, 179, 180, 181, 182, 183,
992  184, 0, 0, 0, 0, 185
993 };
994 
995 static const yytype_int16 yycheck[] =
996 {
997  19, 20, 118, 240, 242, 1, 45, 3, 246, 10,
998  30, 45, 3, 45, 3, 45, 8, 4, 12, 30,
999  103, 13, 30, 31, 20, 21, 65, 23, 61, 25,
1000  0, 65, 64, 29, 64, 20, 69, 56, 57, 31,
1001  59, 60, 62, 35, 61, 53, 54, 55, 56, 57,
1002  29, 62, 24, 290, 62, 27, 28, 51, 54, 78,
1003  79, 80, 81, 82, 61, 61, 62, 3, 87, 70,
1004  66, 67, 8, 9, 3, 313, 16, 68, 72, 1,
1005  61, 3, 4, 19, 61, 77, 324, 325, 26, 27,
1006  28, 45, 46, 29, 86, 61, 88, 89, 63, 70,
1007  119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
1008  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1009  139, 140, 141, 142, 48, 45, 145, 30, 31, 0,
1010  1, 63, 3, 61, 61, 6, 7, 8, 9, 10,
1011  3, 12, 13, 14, 15, 62, 17, 18, 19, 61,
1012  53, 54, 55, 56, 57, 62, 61, 68, 29, 62,
1013  45, 71, 64, 11, 280, 281, 185, 71, 187, 65,
1014  185, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1015  172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
1016  182, 183, 184, 276, 186, 189, 14, 68, 190, 70,
1017  71, 55, 20, 21, 22, 286, 30, 31, 108, 203,
1018  30, 31, 107, 31, 147, 33, 314, 35, 8, 9,
1019  313, 1, 0, 3, 243, 244, 245, 109, 72, 19,
1020  249, 55, 56, 57, 157, 55, 56, 57, 62, 29,
1021  20, 21, 62, 23, -1, 25, 31, -1, 240, 29,
1022  35, -1, -1, -1, 248, -1, 34, -1, -1, 77,
1023  -1, -1, -1, -1, 283, -1, 285, 286, 86, 288,
1024  88, 89, -1, 51, 54, -1, -1, -1, -1, -1,
1025  58, 61, 62, -1, 64, 103, 66, 67, 106, 107,
1026  108, 109, 77, -1, -1, 314, 315, -1, 290, -1,
1027  -1, 86, -1, 88, 89, 83, 298, -1, -1, -1,
1028  -1, 30, 31, -1, -1, -1, 35, 36, 37, 38,
1029  39, 40, 41, -1, -1, 143, -1, -1, 146, 147,
1030  148, 50, 51, 52, 53, 54, 55, 56, 57, 157,
1031  -1, -1, -1, 62, -1, 163, 164, 165, 166, 167,
1032  168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
1033  178, 179, 180, 181, 182, 183, 184, -1, 186, -1,
1034  -1, -1, 190, -1, -1, -1, -1, -1, 163, 164,
1035  165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1036  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1037  -1, 186, 31, -1, -1, 190, 35, -1, -1, -1,
1038  -1, 189, -1, -1, -1, -1, -1, -1, 1, -1,
1039  -1, -1, 240, 241, -1, 203, -1, -1, -1, -1,
1040  31, -1, -1, -1, 35, -1, -1, 20, 21, -1,
1041  23, -1, 25, -1, -1, -1, 29, -1, 77, -1,
1042  -1, -1, -1, -1, -1, 240, -1, 86, 276, 88,
1043  89, 279, -1, -1, -1, -1, -1, -1, -1, -1,
1044  248, 54, 290, -1, -1, -1, 77, -1, 61, 62,
1045  298, 64, -1, 66, 67, 86, -1, 88, 89, -1,
1046  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1047  -1, 30, 31, -1, 33, 290, 35, 36, 37, 38,
1048  39, 40, 41, 298, -1, -1, -1, -1, -1, 48,
1049  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
1050  -1, -1, -1, 62, 163, 164, 165, 166, 167, 168,
1051  169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
1052  179, 180, 181, 182, 183, 184, -1, 186, -1, -1,
1053  -1, 190, 163, 164, 165, 166, 167, 168, 169, 170,
1054  171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
1055  181, 182, 183, 184, -1, 186, 31, -1, -1, 190,
1056  35, -1, 0, 1, -1, 3, -1, -1, -1, 30,
1057  31, -1, -1, -1, -1, -1, -1, -1, 39, 40,
1058  41, 240, 20, 21, -1, 23, 31, 25, -1, -1,
1059  35, 29, 53, 54, 55, 56, 57, -1, -1, -1,
1060  -1, 62, 77, -1, -1, -1, -1, -1, -1, 240,
1061  48, 86, -1, 88, 89, -1, 54, -1, 1, -1,
1062  -1, -1, -1, 61, 62, 63, -1, -1, 66, 67,
1063  -1, 290, 77, 71, -1, -1, -1, 20, 21, 298,
1064  23, 86, 25, 88, 89, -1, 29, -1, -1, -1,
1065  -1, -1, -1, -1, -1, -1, -1, -1, -1, 290,
1066  -1, -1, -1, -1, -1, -1, -1, 298, -1, -1,
1067  -1, 54, -1, -1, -1, -1, -1, -1, 61, 62,
1068  -1, -1, 65, 66, 67, -1, -1, -1, 163, 164,
1069  165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1070  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1071  -1, 186, -1, -1, -1, 190, -1, -1, 163, 164,
1072  165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1073  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1074  -1, 186, 31, 0, 1, 190, 3, -1, 5, 6,
1075  7, 8, 9, 10, -1, 12, 13, 14, 15, -1,
1076  17, 18, 19, -1, -1, 240, -1, 0, 1, -1,
1077  3, -1, 29, 6, 7, 8, 9, 10, -1, 12,
1078  13, 14, 15, -1, 17, 18, 19, -1, 77, -1,
1079  -1, -1, -1, 30, 31, 240, 29, 86, -1, 88,
1080  89, -1, 39, 40, 41, -1, -1, -1, -1, -1,
1081  -1, 68, -1, 70, -1, 290, 53, 54, 55, 56,
1082  57, -1, -1, 298, -1, 62, -1, -1, -1, -1,
1083  -1, -1, -1, -1, -1, 68, -1, 70, -1, -1,
1084  -1, -1, -1, 1, -1, 290, -1, -1, 6, 7,
1085  8, 9, 10, 298, 12, 13, 14, 15, -1, 17,
1086  18, 19, -1, -1, -1, -1, -1, -1, -1, -1,
1087  -1, 29, -1, -1, 163, 164, 165, 166, 167, 168,
1088  169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
1089  179, 180, 181, 182, 183, 184, 1, 186, -1, -1,
1090  -1, 190, -1, -1, -1, -1, 1, -1, -1, -1,
1091  68, -1, 70, 71, -1, 20, 21, -1, 23, -1,
1092  25, -1, 1, -1, 29, 20, 21, -1, 23, -1,
1093  25, -1, -1, -1, 29, -1, -1, -1, -1, -1,
1094  -1, 20, 21, -1, 23, -1, 25, -1, -1, 54,
1095  29, -1, -1, -1, -1, -1, 61, 62, -1, 54,
1096  65, 66, 67, -1, -1, -1, 61, 62, -1, -1,
1097  65, 66, 67, 1, -1, 54, -1, -1, -1, -1,
1098  -1, -1, 61, 62, -1, -1, -1, 66, 67, -1,
1099  -1, -1, 20, 21, -1, 23, -1, 25, -1, -1,
1100  -1, 29, -1, -1, -1, -1, -1, -1, -1, 298,
1101  -1, -1, -1, 3, -1, -1, -1, -1, -1, -1,
1102  -1, -1, -1, -1, -1, -1, 54, -1, -1, -1,
1103  -1, -1, -1, 61, 62, -1, -1, -1, 66, 67,
1104  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1105  40, 41, 3, -1, -1, -1, -1, 47, 48, 49,
1106  50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
1107  -1, -1, 62, -1, -1, -1, -1, -1, -1, 30,
1108  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1109  41, -1, -1, -1, -1, -1, 47, 48, 49, 50,
1110  51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
1111  -1, 62, 30, 31, 32, 33, 34, 35, 36, 37,
1112  38, 39, 40, 41, -1, -1, -1, -1, -1, 47,
1113  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1114  -1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
1115  -1, 69, 30, 31, 32, 33, 34, 35, 36, 37,
1116  38, 39, 40, 41, -1, -1, -1, -1, -1, 47,
1117  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1118  -1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
1119  -1, 69, 30, 31, 32, 33, 34, 35, 36, 37,
1120  38, 39, 40, 41, -1, -1, -1, -1, -1, 47,
1121  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1122  -1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
1123  -1, 69, 30, 31, 32, 33, 34, 35, 36, 37,
1124  38, 39, 40, 41, -1, -1, -1, -1, -1, 47,
1125  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1126  -1, -1, -1, -1, 62, -1, -1, 65, 30, 31,
1127  32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1128  -1, -1, -1, -1, -1, 47, 48, 49, 50, 51,
1129  52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
1130  62, -1, -1, 65, 30, 31, 32, 33, 34, 35,
1131  36, 37, 38, 39, 40, 41, -1, -1, -1, -1,
1132  -1, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1133  56, 57, -1, -1, -1, -1, 62, -1, -1, 65,
1134  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1135  40, 41, -1, -1, -1, -1, -1, 47, 48, 49,
1136  50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
1137  -1, -1, 62, -1, -1, 65, 30, 31, 32, 33,
1138  34, 35, 36, 37, 38, 39, 40, 41, -1, -1,
1139  -1, -1, -1, 47, 48, 49, 50, 51, 52, 53,
1140  54, 55, 56, 57, -1, -1, -1, -1, 62, -1,
1141  -1, 65, 30, 31, 32, 33, 34, 35, 36, 37,
1142  38, 39, 40, 41, -1, -1, -1, -1, -1, 47,
1143  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1144  -1, -1, -1, -1, 62, -1, -1, 65, 30, 31,
1145  32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1146  -1, -1, -1, -1, -1, 47, 48, 49, 50, 51,
1147  52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
1148  62, -1, -1, 65, 30, 31, 32, 33, 34, 35,
1149  36, 37, 38, 39, 40, 41, -1, -1, -1, -1,
1150  -1, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1151  56, 57, -1, -1, -1, -1, 62, -1, -1, 65,
1152  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1153  40, 41, -1, -1, -1, 45, -1, 47, 48, 49,
1154  50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
1155  -1, -1, 62, 30, 31, 32, 33, 34, 35, 36,
1156  37, 38, 39, 40, 41, -1, -1, -1, -1, 46,
1157  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
1158  57, -1, -1, -1, -1, 62, 30, 31, 32, 33,
1159  34, 35, 36, 37, 38, 39, 40, 41, -1, -1,
1160  -1, -1, 46, 47, 48, 49, 50, 51, 52, 53,
1161  54, 55, 56, 57, -1, -1, -1, -1, 62, 30,
1162  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1163  41, 42, -1, -1, -1, -1, 47, 48, 49, 50,
1164  51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
1165  -1, 62, 30, 31, 32, 33, 34, 35, 36, 37,
1166  38, 39, 40, 41, -1, -1, -1, 45, -1, 47,
1167  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1168  -1, -1, -1, -1, 62, 30, 31, 32, 33, 34,
1169  35, 36, 37, 38, 39, 40, 41, -1, -1, -1,
1170  -1, -1, 47, 48, 49, 50, 51, 52, 53, 54,
1171  55, 56, 57, -1, -1, -1, -1, 62, 30, 31,
1172  32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1173  -1, -1, -1, -1, 46, 47, -1, 49, 50, 51,
1174  52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
1175  62, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1176  39, 40, 41, -1, -1, -1, -1, -1, 47, -1,
1177  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
1178  -1, 30, 31, 62, 33, 34, 35, 36, 37, 38,
1179  39, 40, 41, -1, -1, -1, -1, -1, -1, 48,
1180  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
1181  -1, 30, 31, 62, 33, 34, 35, 36, 37, 38,
1182  39, 40, 41, -1, -1, -1, -1, -1, -1, -1,
1183  49, 50, 51, 52, 53, 54, 55, 56, 57, 30,
1184  31, -1, -1, 62, 35, 36, 37, 38, 39, 40,
1185  41, -1, -1, -1, -1, -1, -1, 48, 49, 50,
1186  51, 52, 53, 54, 55, 56, 57, 30, 31, -1,
1187  33, 62, 35, 36, 37, 38, 39, 40, 41, -1,
1188  -1, -1, -1, -1, -1, -1, 49, 50, 51, 52,
1189  53, 54, 55, 56, 57, 30, 31, -1, -1, 62,
1190  35, 36, 37, 38, 39, 40, 41, -1, -1, -1,
1191  -1, -1, -1, -1, 49, 50, 51, 52, 53, 54,
1192  55, 56, 57, 30, 31, -1, -1, 62, 35, 36,
1193  37, 38, 39, 40, 41, -1, -1, -1, -1, -1,
1194  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
1195  57, 30, 31, -1, -1, 62, 35, 36, 37, 38,
1196  39, 40, 41, -1, -1, -1, -1, -1, -1, -1,
1197  -1, 50, 51, 52, 53, 54, 55, 56, 57, 30,
1198  31, -1, -1, 62, 35, 36, 37, 38, 39, 40,
1199  41, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1200  51, 52, 53, 54, 55, 56, 57, 30, 31, -1,
1201  -1, 62, 35, 36, 37, 38, 39, 40, 41, -1,
1202  -1, -1, -1, -1, -1, -1, -1, -1, 51, 52,
1203  53, 54, 55, 56, 57, 30, 31, -1, -1, 62,
1204  35, 36, -1, -1, 39, 40, 41, -1, -1, -1,
1205  -1, -1, -1, -1, -1, -1, 51, 52, 53, 54,
1206  55, 56, 57, 30, 31, -1, -1, 62, 35, 36,
1207  -1, -1, 39, 40, 41, -1, -1, -1, -1, -1,
1208  -1, -1, -1, -1, 51, 52, 53, 54, 55, 56,
1209  57, -1, -1, -1, -1, 62
1210 };
1211 
1212  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1213  symbol of state STATE-NUM. */
1214 static const yytype_uint8 yystos[] =
1215 {
1216  0, 1, 3, 73, 74, 125, 126, 3, 4, 0,
1217  20, 75, 124, 68, 73, 74, 123, 75, 1, 5,
1218  6, 7, 8, 9, 10, 12, 13, 14, 15, 17,
1219  18, 19, 29, 68, 70, 82, 102, 103, 104, 106,
1220  108, 109, 113, 114, 115, 116, 117, 118, 119, 120,
1221  121, 122, 1, 21, 23, 25, 54, 61, 62, 66,
1222  67, 75, 76, 78, 80, 81, 82, 83, 88, 90,
1223  91, 92, 96, 82, 96, 82, 107, 82, 61, 61,
1224  61, 61, 61, 70, 110, 1, 54, 61, 66, 67,
1225  75, 76, 78, 80, 81, 82, 83, 89, 93, 94,
1226  95, 97, 82, 74, 97, 99, 63, 48, 63, 73,
1227  74, 79, 79, 96, 96, 74, 96, 96, 61, 30,
1228  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1229  41, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1230  56, 57, 62, 73, 123, 69, 45, 45, 46, 97,
1231  96, 96, 96, 111, 112, 96, 96, 74, 16, 97,
1232  96, 97, 97, 30, 31, 32, 33, 34, 35, 36,
1233  37, 38, 39, 40, 41, 47, 49, 50, 51, 52,
1234  53, 54, 55, 56, 57, 62, 69, 61, 104, 105,
1235  45, 82, 100, 101, 103, 101, 121, 24, 27, 28,
1236  26, 65, 64, 77, 96, 98, 65, 98, 96, 96,
1237  96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1238  96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1239  96, 84, 85, 86, 87, 96, 96, 82, 107, 82,
1240  45, 65, 65, 69, 3, 69, 65, 71, 122, 61,
1241  65, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1242  97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1243  97, 97, 97, 87, 97, 96, 73, 74, 97, 68,
1244  61, 73, 74, 45, 65, 46, 45, 64, 46, 99,
1245  82, 110, 96, 96, 96, 110, 74, 96, 46, 64,
1246  65, 104, 71, 82, 65, 98, 98, 64, 96, 96,
1247  86, 96, 99, 11, 3, 42, 71, 65, 97, 65,
1248  110, 113, 112, 96, 65, 65, 110, 110
1249 };
1250 
1251  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1252 static const yytype_uint8 yyr1[] =
1253 {
1254  0, 72, 73, 73, 74, 74, 75, 76, 77, 77,
1255  78, 78, 79, 79, 79, 80, 81, 82, 83, 83,
1256  84, 85, 86, 86, 87, 87, 88, 89, 90, 90,
1257  90, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1258  91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1259  91, 91, 91, 92, 93, 93, 93, 94, 94, 94,
1260  94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
1261  94, 94, 94, 94, 94, 94, 94, 94, 95, 96,
1262  96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1263  96, 96, 97, 97, 97, 97, 97, 97, 97, 97,
1264  97, 97, 97, 97, 97, 98, 98, 99, 99, 100,
1265  101, 101, 101, 102, 102, 102, 102, 102, 102, 103,
1266  103, 104, 104, 105, 105, 106, 106, 107, 107, 108,
1267  109, 109, 110, 110, 111, 112, 112, 113, 113, 113,
1268  114, 115, 116, 117, 118, 119, 120, 120, 120, 120,
1269  120, 120, 120, 120, 120, 120, 120, 120, 120, 121,
1270  121, 122, 122, 123, 123, 124, 124, 125, 125, 126,
1271  126
1272 };
1273 
1274  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1275 static const yytype_uint8 yyr2[] =
1276 {
1277  0, 2, 2, 1, 1, 0, 1, 1, 3, 1,
1278  5, 3, 2, 2, 0, 3, 3, 1, 3, 4,
1279  1, 3, 1, 1, 3, 1, 4, 4, 2, 2,
1280  2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1281  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1282  3, 3, 3, 5, 2, 2, 2, 3, 3, 3,
1283  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1284  3, 3, 3, 3, 3, 3, 3, 3, 5, 1,
1285  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1286  3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1287  1, 1, 1, 3, 1, 3, 1, 3, 1, 3,
1288  1, 3, 4, 1, 2, 4, 3, 5, 6, 3,
1289  1, 3, 1, 3, 1, 4, 4, 3, 3, 2,
1290  2, 5, 5, 3, 3, 1, 0, 5, 7, 7,
1291  9, 9, 5, 6, 1, 1, 1, 1, 1, 1,
1292  5, 1, 1, 1, 1, 1, 1, 1, 1, 3,
1293  1, 3, 1, 3, 1, 3, 1, 7, 4, 1,
1294  1
1295 };
1296 
1297 
1298 #define yyerrok (yyerrstatus = 0)
1299 #define yyclearin (yychar = YYEMPTY)
1300 #define YYEMPTY (-2)
1301 #define YYEOF 0
1302 
1303 #define YYACCEPT goto yyacceptlab
1304 #define YYABORT goto yyabortlab
1305 #define YYERROR goto yyerrorlab
1306 
1307 
1308 #define YYRECOVERING() (!!yyerrstatus)
1309 
1310 #define YYBACKUP(Token, Value) \
1311 do \
1312  if (yychar == YYEMPTY) \
1313  { \
1314  yychar = (Token); \
1315  yylval = (Value); \
1316  YYPOPSTACK (yylen); \
1317  yystate = *yyssp; \
1318  goto yybackup; \
1319  } \
1320  else \
1321  { \
1322  yyerror (&yylloc, scanner, helper, YY_("syntax error: cannot back up")); \
1323  YYERROR; \
1324  } \
1325 while (0)
1326 
1327 /* Error token number */
1328 #define YYTERROR 1
1329 #define YYERRCODE 256
1330 
1331 
1332 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1333  If N is 0, then set CURRENT to the empty location which ends
1334  the previous symbol: RHS[0] (always defined). */
1335 
1336 #ifndef YYLLOC_DEFAULT
1337 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1338  do \
1339  if (N) \
1340  { \
1341  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1342  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1343  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1344  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1345  } \
1346  else \
1347  { \
1348  (Current).first_line = (Current).last_line = \
1349  YYRHSLOC (Rhs, 0).last_line; \
1350  (Current).first_column = (Current).last_column = \
1351  YYRHSLOC (Rhs, 0).last_column; \
1352  } \
1353  while (0)
1354 #endif
1355 
1356 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1357 
1358 
1359 /* Enable debugging if requested. */
1360 #if CQASM_V1DEBUG
1361 
1362 # ifndef YYFPRINTF
1363 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1364 # define YYFPRINTF fprintf
1365 # endif
1366 
1367 # define YYDPRINTF(Args) \
1368 do { \
1369  if (yydebug) \
1370  YYFPRINTF Args; \
1371 } while (0)
1372 
1373 
1374 /* YY_LOCATION_PRINT -- Print the location on the stream.
1375  This macro was not mandated originally: define only if we know
1376  we won't break user code: when these are the locations we know. */
1377 
1378 #ifndef YY_LOCATION_PRINT
1379 # if defined CQASM_V1LTYPE_IS_TRIVIAL && CQASM_V1LTYPE_IS_TRIVIAL
1380 
1381 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1382 
1383 __attribute__((__unused__))
1384 static unsigned
1385 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1386 {
1387  unsigned res = 0;
1388  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1389  if (0 <= yylocp->first_line)
1390  {
1391  res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1392  if (0 <= yylocp->first_column)
1393  res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1394  }
1395  if (0 <= yylocp->last_line)
1396  {
1397  if (yylocp->first_line < yylocp->last_line)
1398  {
1399  res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1400  if (0 <= end_col)
1401  res += YYFPRINTF (yyo, ".%d", end_col);
1402  }
1403  else if (0 <= end_col && yylocp->first_column < end_col)
1404  res += YYFPRINTF (yyo, "-%d", end_col);
1405  }
1406  return res;
1407  }
1408 
1409 # define YY_LOCATION_PRINT(File, Loc) \
1410  yy_location_print_ (File, &(Loc))
1411 
1412 # else
1413 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1414 # endif
1415 #endif
1416 
1417 
1418 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1419 do { \
1420  if (yydebug) \
1421  { \
1422  YYFPRINTF (stderr, "%s ", Title); \
1423  yy_symbol_print (stderr, \
1424  Type, Value, Location, scanner, helper); \
1425  YYFPRINTF (stderr, "\n"); \
1426  } \
1427 } while (0)
1428 
1429 
1430 /*----------------------------------------.
1431 | Print this symbol's value on YYOUTPUT. |
1432 `----------------------------------------*/
1433 
1434 static void
1435 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper)
1436 {
1437  FILE *yyo = yyoutput;
1438  YYUSE (yyo);
1439  YYUSE (yylocationp);
1440  YYUSE (scanner);
1441  YYUSE (helper);
1442  if (!yyvaluep)
1443  return;
1444 # ifdef YYPRINT
1445  if (yytype < YYNTOKENS)
1446  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1447 # endif
1448  YYUSE (yytype);
1449 }
1450 
1451 
1452 /*--------------------------------.
1453 | Print this symbol on YYOUTPUT. |
1454 `--------------------------------*/
1455 
1456 static void
1457 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper)
1458 {
1459  YYFPRINTF (yyoutput, "%s %s (",
1460  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1461 
1462  YY_LOCATION_PRINT (yyoutput, *yylocationp);
1463  YYFPRINTF (yyoutput, ": ");
1464  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner, helper);
1465  YYFPRINTF (yyoutput, ")");
1466 }
1467 
1468 /*------------------------------------------------------------------.
1469 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1470 | TOP (included). |
1471 `------------------------------------------------------------------*/
1472 
1473 static void
1474 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1475 {
1476  YYFPRINTF (stderr, "Stack now");
1477  for (; yybottom <= yytop; yybottom++)
1478  {
1479  int yybot = *yybottom;
1480  YYFPRINTF (stderr, " %d", yybot);
1481  }
1482  YYFPRINTF (stderr, "\n");
1483 }
1484 
1485 # define YY_STACK_PRINT(Bottom, Top) \
1486 do { \
1487  if (yydebug) \
1488  yy_stack_print ((Bottom), (Top)); \
1489 } while (0)
1490 
1491 
1492 /*------------------------------------------------.
1493 | Report that the YYRULE is going to be reduced. |
1494 `------------------------------------------------*/
1495 
1496 static void
1497 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper)
1498 {
1499  unsigned long int yylno = yyrline[yyrule];
1500  int yynrhs = yyr2[yyrule];
1501  int yyi;
1502  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1503  yyrule - 1, yylno);
1504  /* The symbols being reduced. */
1505  for (yyi = 0; yyi < yynrhs; yyi++)
1506  {
1507  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1508  yy_symbol_print (stderr,
1509  yystos[yyssp[yyi + 1 - yynrhs]],
1510  &(yyvsp[(yyi + 1) - (yynrhs)])
1511  , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner, helper);
1512  YYFPRINTF (stderr, "\n");
1513  }
1514 }
1515 
1516 # define YY_REDUCE_PRINT(Rule) \
1517 do { \
1518  if (yydebug) \
1519  yy_reduce_print (yyssp, yyvsp, yylsp, Rule, scanner, helper); \
1520 } while (0)
1521 
1522 /* Nonzero means print parse trace. It is left uninitialized so that
1523  multiple parsers can coexist. */
1524 int yydebug;
1525 #else /* !CQASM_V1DEBUG */
1526 # define YYDPRINTF(Args)
1527 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1528 # define YY_STACK_PRINT(Bottom, Top)
1529 # define YY_REDUCE_PRINT(Rule)
1530 #endif /* !CQASM_V1DEBUG */
1531 
1532 
1533 /* YYINITDEPTH -- initial size of the parser's stacks. */
1534 #ifndef YYINITDEPTH
1535 # define YYINITDEPTH 200
1536 #endif
1537 
1538 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1539  if the built-in stack extension method is used).
1540 
1541  Do not make this value too large; the results are undefined if
1542  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1543  evaluated with infinite-precision integer arithmetic. */
1544 
1545 #ifndef YYMAXDEPTH
1546 # define YYMAXDEPTH 10000
1547 #endif
1548 
1549 
1550 #if YYERROR_VERBOSE
1551 
1552 # ifndef yystrlen
1553 # if defined __GLIBC__ && defined _STRING_H
1554 # define yystrlen strlen
1555 # else
1556 /* Return the length of YYSTR. */
1557 static YYSIZE_T
1558 yystrlen (const char *yystr)
1559 {
1560  YYSIZE_T yylen;
1561  for (yylen = 0; yystr[yylen]; yylen++)
1562  continue;
1563  return yylen;
1564 }
1565 # endif
1566 # endif
1567 
1568 # ifndef yystpcpy
1569 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1570 # define yystpcpy stpcpy
1571 # else
1572 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1573  YYDEST. */
1574 static char *
1575 yystpcpy (char *yydest, const char *yysrc)
1576 {
1577  char *yyd = yydest;
1578  const char *yys = yysrc;
1579 
1580  while ((*yyd++ = *yys++) != '\0')
1581  continue;
1582 
1583  return yyd - 1;
1584 }
1585 # endif
1586 # endif
1587 
1588 # ifndef yytnamerr
1589 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1590  quotes and backslashes, so that it's suitable for yyerror. The
1591  heuristic is that double-quoting is unnecessary unless the string
1592  contains an apostrophe, a comma, or backslash (other than
1593  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1594  null, do not copy; instead, return the length of what the result
1595  would have been. */
1596 static YYSIZE_T
1597 yytnamerr (char *yyres, const char *yystr)
1598 {
1599  if (*yystr == '"')
1600  {
1601  YYSIZE_T yyn = 0;
1602  char const *yyp = yystr;
1603 
1604  for (;;)
1605  switch (*++yyp)
1606  {
1607  case '\'':
1608  case ',':
1609  goto do_not_strip_quotes;
1610 
1611  case '\\':
1612  if (*++yyp != '\\')
1613  goto do_not_strip_quotes;
1614  /* Fall through. */
1615  default:
1616  if (yyres)
1617  yyres[yyn] = *yyp;
1618  yyn++;
1619  break;
1620 
1621  case '"':
1622  if (yyres)
1623  yyres[yyn] = '\0';
1624  return yyn;
1625  }
1626  do_not_strip_quotes: ;
1627  }
1628 
1629  if (! yyres)
1630  return yystrlen (yystr);
1631 
1632  return yystpcpy (yyres, yystr) - yyres;
1633 }
1634 # endif
1635 
1636 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1637  about the unexpected token YYTOKEN for the state stack whose top is
1638  YYSSP.
1639 
1640  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1641  not large enough to hold the message. In that case, also set
1642  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1643  required number of bytes is too large to store. */
1644 static int
1645 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1646  yytype_int16 *yyssp, int yytoken)
1647 {
1648  YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1649  YYSIZE_T yysize = yysize0;
1650  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1651  /* Internationalized format string. */
1652  const char *yyformat = YY_NULL;
1653  /* Arguments of yyformat. */
1654  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1655  /* Number of reported tokens (one for the "unexpected", one per
1656  "expected"). */
1657  int yycount = 0;
1658 
1659  /* There are many possibilities here to consider:
1660  - If this state is a consistent state with a default action, then
1661  the only way this function was invoked is if the default action
1662  is an error action. In that case, don't check for expected
1663  tokens because there are none.
1664  - The only way there can be no lookahead present (in yychar) is if
1665  this state is a consistent state with a default action. Thus,
1666  detecting the absence of a lookahead is sufficient to determine
1667  that there is no unexpected or expected token to report. In that
1668  case, just report a simple "syntax error".
1669  - Don't assume there isn't a lookahead just because this state is a
1670  consistent state with a default action. There might have been a
1671  previous inconsistent state, consistent state with a non-default
1672  action, or user semantic action that manipulated yychar.
1673  - Of course, the expected token list depends on states to have
1674  correct lookahead information, and it depends on the parser not
1675  to perform extra reductions after fetching a lookahead from the
1676  scanner and before detecting a syntax error. Thus, state merging
1677  (from LALR or IELR) and default reductions corrupt the expected
1678  token list. However, the list is correct for canonical LR with
1679  one exception: it will still contain any token that will not be
1680  accepted due to an error action in a later state.
1681  */
1682  if (yytoken != YYEMPTY)
1683  {
1684  int yyn = yypact[*yyssp];
1685  yyarg[yycount++] = yytname[yytoken];
1686  if (!yypact_value_is_default (yyn))
1687  {
1688  /* Start YYX at -YYN if negative to avoid negative indexes in
1689  YYCHECK. In other words, skip the first -YYN actions for
1690  this state because they are default actions. */
1691  int yyxbegin = yyn < 0 ? -yyn : 0;
1692  /* Stay within bounds of both yycheck and yytname. */
1693  int yychecklim = YYLAST - yyn + 1;
1694  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1695  int yyx;
1696 
1697  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1698  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1699  && !yytable_value_is_error (yytable[yyx + yyn]))
1700  {
1701  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1702  {
1703  yycount = 1;
1704  yysize = yysize0;
1705  break;
1706  }
1707  yyarg[yycount++] = yytname[yyx];
1708  {
1709  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1710  if (! (yysize <= yysize1
1711  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1712  return 2;
1713  yysize = yysize1;
1714  }
1715  }
1716  }
1717  }
1718 
1719  switch (yycount)
1720  {
1721 # define YYCASE_(N, S) \
1722  case N: \
1723  yyformat = S; \
1724  break
1725  YYCASE_(0, YY_("syntax error"));
1726  YYCASE_(1, YY_("syntax error, unexpected %s"));
1727  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1728  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1729  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1730  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1731 # undef YYCASE_
1732  }
1733 
1734  {
1735  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1736  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1737  return 2;
1738  yysize = yysize1;
1739  }
1740 
1741  if (*yymsg_alloc < yysize)
1742  {
1743  *yymsg_alloc = 2 * yysize;
1744  if (! (yysize <= *yymsg_alloc
1745  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1746  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1747  return 1;
1748  }
1749 
1750  /* Avoid sprintf, as that infringes on the user's name space.
1751  Don't have undefined behavior even if the translation
1752  produced a string with the wrong number of "%s"s. */
1753  {
1754  char *yyp = *yymsg;
1755  int yyi = 0;
1756  while ((*yyp = *yyformat) != '\0')
1757  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1758  {
1759  yyp += yytnamerr (yyp, yyarg[yyi++]);
1760  yyformat += 2;
1761  }
1762  else
1763  {
1764  yyp++;
1765  yyformat++;
1766  }
1767  }
1768  return 0;
1769 }
1770 #endif /* YYERROR_VERBOSE */
1771 
1772 /*-----------------------------------------------.
1773 | Release the memory associated to this symbol. |
1774 `-----------------------------------------------*/
1775 
1776 static void
1777 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper)
1778 {
1779  YYUSE (yyvaluep);
1780  YYUSE (yylocationp);
1781  YYUSE (scanner);
1782  YYUSE (helper);
1783  if (!yymsg)
1784  yymsg = "Deleting";
1785  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1786 
1788  YYUSE (yytype);
1790 }
1791 
1792 
1793 
1794 
1795 /*----------.
1796 | yyparse. |
1797 `----------*/
1798 
1799 int
1801 {
1802 /* The lookahead symbol. */
1803 int yychar;
1804 
1805 
1806 /* The semantic value of the lookahead symbol. */
1807 /* Default value used for initialization, for pacifying older GCCs
1808  or non-GCC compilers. */
1809 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1810 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1811 
1812 /* Location data for the lookahead symbol. */
1813 static YYLTYPE yyloc_default
1814 # if defined CQASM_V1LTYPE_IS_TRIVIAL && CQASM_V1LTYPE_IS_TRIVIAL
1815  = { 1, 1, 1, 1 }
1816 # endif
1817 ;
1818 YYLTYPE yylloc = yyloc_default;
1819 
1820  /* Number of syntax errors so far. */
1821  int yynerrs;
1822 
1823  int yystate;
1824  /* Number of tokens to shift before error messages enabled. */
1825  int yyerrstatus;
1826 
1827  /* The stacks and their tools:
1828  'yyss': related to states.
1829  'yyvs': related to semantic values.
1830  'yyls': related to locations.
1831 
1832  Refer to the stacks through separate pointers, to allow yyoverflow
1833  to reallocate them elsewhere. */
1834 
1835  /* The state stack. */
1836  yytype_int16 yyssa[YYINITDEPTH];
1837  yytype_int16 *yyss;
1838  yytype_int16 *yyssp;
1839 
1840  /* The semantic value stack. */
1841  YYSTYPE yyvsa[YYINITDEPTH];
1842  YYSTYPE *yyvs;
1843  YYSTYPE *yyvsp;
1844 
1845  /* The location stack. */
1846  YYLTYPE yylsa[YYINITDEPTH];
1847  YYLTYPE *yyls;
1848  YYLTYPE *yylsp;
1849 
1850  /* The locations where the error started and ended. */
1851  YYLTYPE yyerror_range[3];
1852 
1853  YYSIZE_T yystacksize;
1854 
1855  int yyn;
1856  int yyresult;
1857  /* Lookahead token as an internal (translated) token number. */
1858  int yytoken = 0;
1859  /* The variables used to return semantic value and location from the
1860  action routines. */
1861  YYSTYPE yyval;
1862  YYLTYPE yyloc;
1863 
1864 #if YYERROR_VERBOSE
1865  /* Buffer for error messages, and its allocated size. */
1866  char yymsgbuf[128];
1867  char *yymsg = yymsgbuf;
1868  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1869 #endif
1870 
1871 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1872 
1873  /* The number of symbols on the RHS of the reduced rule.
1874  Keep to zero when no symbol should be popped. */
1875  int yylen = 0;
1876 
1877  yyssp = yyss = yyssa;
1878  yyvsp = yyvs = yyvsa;
1879  yylsp = yyls = yylsa;
1880  yystacksize = YYINITDEPTH;
1881 
1882  YYDPRINTF ((stderr, "Starting parse\n"));
1883 
1884  yystate = 0;
1885  yyerrstatus = 0;
1886  yynerrs = 0;
1887  yychar = YYEMPTY; /* Cause a token to be read. */
1888  yylsp[0] = yylloc;
1889  goto yysetstate;
1890 
1891 /*------------------------------------------------------------.
1892 | yynewstate -- Push a new state, which is found in yystate. |
1893 `------------------------------------------------------------*/
1894  yynewstate:
1895  /* In all cases, when you get here, the value and location stacks
1896  have just been pushed. So pushing a state here evens the stacks. */
1897  yyssp++;
1898 
1899  yysetstate:
1900  *yyssp = yystate;
1901 
1902  if (yyss + yystacksize - 1 <= yyssp)
1903  {
1904  /* Get the current used size of the three stacks, in elements. */
1905  YYSIZE_T yysize = yyssp - yyss + 1;
1906 
1907 #ifdef yyoverflow
1908  {
1909  /* Give user a chance to reallocate the stack. Use copies of
1910  these so that the &'s don't force the real ones into
1911  memory. */
1912  YYSTYPE *yyvs1 = yyvs;
1913  yytype_int16 *yyss1 = yyss;
1914  YYLTYPE *yyls1 = yyls;
1915 
1916  /* Each stack pointer address is followed by the size of the
1917  data in use in that stack, in bytes. This used to be a
1918  conditional around just the two extra args, but that might
1919  be undefined if yyoverflow is a macro. */
1920  yyoverflow (YY_("memory exhausted"),
1921  &yyss1, yysize * sizeof (*yyssp),
1922  &yyvs1, yysize * sizeof (*yyvsp),
1923  &yyls1, yysize * sizeof (*yylsp),
1924  &yystacksize);
1925 
1926  yyls = yyls1;
1927  yyss = yyss1;
1928  yyvs = yyvs1;
1929  }
1930 #else /* no yyoverflow */
1931 # ifndef YYSTACK_RELOCATE
1932  goto yyexhaustedlab;
1933 # else
1934  /* Extend the stack our own way. */
1935  if (YYMAXDEPTH <= yystacksize)
1936  goto yyexhaustedlab;
1937  yystacksize *= 2;
1938  if (YYMAXDEPTH < yystacksize)
1939  yystacksize = YYMAXDEPTH;
1940 
1941  {
1942  yytype_int16 *yyss1 = yyss;
1943  union yyalloc *yyptr =
1944  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1945  if (! yyptr)
1946  goto yyexhaustedlab;
1947  YYSTACK_RELOCATE (yyss_alloc, yyss);
1948  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1949  YYSTACK_RELOCATE (yyls_alloc, yyls);
1950 # undef YYSTACK_RELOCATE
1951  if (yyss1 != yyssa)
1952  YYSTACK_FREE (yyss1);
1953  }
1954 # endif
1955 #endif /* no yyoverflow */
1956 
1957  yyssp = yyss + yysize - 1;
1958  yyvsp = yyvs + yysize - 1;
1959  yylsp = yyls + yysize - 1;
1960 
1961  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1962  (unsigned long int) yystacksize));
1963 
1964  if (yyss + yystacksize - 1 <= yyssp)
1965  YYABORT;
1966  }
1967 
1968  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1969 
1970  if (yystate == YYFINAL)
1971  YYACCEPT;
1972 
1973  goto yybackup;
1974 
1975 /*-----------.
1976 | yybackup. |
1977 `-----------*/
1978 yybackup:
1979 
1980  /* Do appropriate processing given the current state. Read a
1981  lookahead token if we need one and don't already have one. */
1982 
1983  /* First try to decide what to do without reference to lookahead token. */
1984  yyn = yypact[yystate];
1985  if (yypact_value_is_default (yyn))
1986  goto yydefault;
1987 
1988  /* Not known => get a lookahead token if don't already have one. */
1989 
1990  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1991  if (yychar == YYEMPTY)
1992  {
1993  YYDPRINTF ((stderr, "Reading a token: "));
1994  yychar = yylex (&yylval, &yylloc, scanner);
1995  }
1996 
1997  if (yychar <= YYEOF)
1998  {
1999  yychar = yytoken = YYEOF;
2000  YYDPRINTF ((stderr, "Now at end of input.\n"));
2001  }
2002  else
2003  {
2004  yytoken = YYTRANSLATE (yychar);
2005  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2006  }
2007 
2008  /* If the proper action on seeing token YYTOKEN is to reduce or to
2009  detect an error, take that action. */
2010  yyn += yytoken;
2011  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2012  goto yydefault;
2013  yyn = yytable[yyn];
2014  if (yyn <= 0)
2015  {
2016  if (yytable_value_is_error (yyn))
2017  goto yyerrlab;
2018  yyn = -yyn;
2019  goto yyreduce;
2020  }
2021 
2022  /* Count tokens shifted since error; after three, turn off error
2023  status. */
2024  if (yyerrstatus)
2025  yyerrstatus--;
2026 
2027  /* Shift the lookahead token. */
2028  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2029 
2030  /* Discard the shifted token. */
2031  yychar = YYEMPTY;
2032 
2033  yystate = yyn;
2035  *++yyvsp = yylval;
2037  *++yylsp = yylloc;
2038  goto yynewstate;
2039 
2040 
2041 /*-----------------------------------------------------------.
2042 | yydefault -- do the default action for the current state. |
2043 `-----------------------------------------------------------*/
2044 yydefault:
2045  yyn = yydefact[yystate];
2046  if (yyn == 0)
2047  goto yyerrlab;
2048  goto yyreduce;
2049 
2050 
2051 /*-----------------------------.
2052 | yyreduce -- Do a reduction. |
2053 `-----------------------------*/
2054 yyreduce:
2055  /* yyn is the number of a rule to reduce with. */
2056  yylen = yyr2[yyn];
2057 
2058  /* If YYLEN is nonzero, implement the default value of the action:
2059  '$$ = $1'.
2060 
2061  Otherwise, the following line sets YYVAL to garbage.
2062  This behavior is undocumented and Bison
2063  users should not rely upon it. Assigning to YYVAL
2064  unconditionally makes the parser a bit smaller, and it avoids a
2065  GCC warning that YYVAL may be used uninitialized. */
2066  yyval = yyvsp[1-yylen];
2067 
2068  /* Default location. */
2069  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2070  YY_REDUCE_PRINT (yyn);
2071  switch (yyn)
2072  {
2073  case 6:
2074 #line 261 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2075  { NEW((yyval.ilit), IntegerLiteral); (yyval.ilit)->value = std::strtol((yyvsp[0].str), nullptr, 0); std::free((yyvsp[0].str)); }
2076 #line 2077 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2077  break;
2078 
2079  case 7:
2080 #line 265 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2081  { NEW((yyval.flit), FloatLiteral); (yyval.flit)->value = std::strtod((yyvsp[0].str), nullptr); std::free((yyvsp[0].str)); }
2082 #line 2083 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2083  break;
2084 
2085  case 8:
2086 #line 269 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2087  { FROM((yyval.mat), (yyvsp[-2].mat)); (yyval.mat)->rows.add_raw((yyvsp[0].expl)); }
2088 #line 2089 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2089  break;
2090 
2091  case 9:
2092 #line 270 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2093  { NEW((yyval.mat), MatrixLiteral); (yyval.mat)->rows.add_raw((yyvsp[0].expl)); }
2094 #line 2095 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2095  break;
2096 
2097  case 10:
2098 #line 273 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2099  { FROM((yyval.mat), (yyvsp[-2].mat)); }
2100 #line 2101 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2101  break;
2102 
2103  case 11:
2104 #line 274 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2105  { NEW((yyval.mat), MatrixLiteral); (yyval.mat)->rows.add_raw(new ExpressionList()); }
2106 #line 2107 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2107  break;
2108 
2109  case 12:
2110 #line 279 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2111  { FROM((yyval.strb), (yyvsp[-1].strb)); (yyval.strb)->push_string(std::string((yyvsp[0].str))); std::free((yyvsp[0].str)); }
2112 #line 2113 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2113  break;
2114 
2115  case 13:
2116 #line 280 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2117  { FROM((yyval.strb), (yyvsp[-1].strb)); (yyval.strb)->push_escape(std::string((yyvsp[0].str))); std::free((yyvsp[0].str)); }
2118 #line 2119 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2119  break;
2120 
2121  case 14:
2122 #line 281 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2123  { NEW((yyval.strb), StringBuilder); }
2124 #line 2125 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2125  break;
2126 
2127  case 15:
2128 #line 285 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2129  { NEW((yyval.slit), StringLiteral); (yyval.slit)->value = (yyvsp[-1].strb)->stream.str(); delete (yyvsp[-1].strb); }
2130 #line 2131 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2131  break;
2132 
2133  case 16:
2134 #line 289 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2135  { NEW((yyval.jlit), JsonLiteral); (yyval.jlit)->value = (yyvsp[-1].strb)->stream.str(); delete (yyvsp[-1].strb); }
2136 #line 2137 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2137  break;
2138 
2139  case 17:
2140 #line 293 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2141  { NEW((yyval.idnt), Identifier); (yyval.idnt)->name = std::string((yyvsp[0].str)); std::free((yyvsp[0].str)); }
2142 #line 2143 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2143  break;
2144 
2145  case 18:
2146 #line 297 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2147  { NEW((yyval.func), FunctionCall); (yyval.func)->name.set_raw((yyvsp[-2].idnt)); (yyval.func)->arguments.set_raw(new ExpressionList()); }
2148 #line 2149 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2149  break;
2150 
2151  case 19:
2152 #line 298 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2153  { NEW((yyval.func), FunctionCall); (yyval.func)->name.set_raw((yyvsp[-3].idnt)); (yyval.func)->arguments.set_raw((yyvsp[-1].expl)); }
2154 #line 2155 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2155  break;
2156 
2157  case 20:
2158 #line 302 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2159  { NEW((yyval.idxi), IndexItem); (yyval.idxi)->index.set_raw((yyvsp[0].expr)); }
2160 #line 2161 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2161  break;
2162 
2163  case 21:
2164 #line 305 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2165  { NEW((yyval.idxr), IndexRange); (yyval.idxr)->first.set_raw((yyvsp[-2].expr)); (yyval.idxr)->last.set_raw((yyvsp[0].expr)); }
2166 #line 2167 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2167  break;
2168 
2169  case 22:
2170 #line 308 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2171  { FROM((yyval.idxe), (yyvsp[0].idxi)); }
2172 #line 2173 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2173  break;
2174 
2175  case 23:
2176 #line 309 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2177  { FROM((yyval.idxe), (yyvsp[0].idxr)); }
2178 #line 2179 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2179  break;
2180 
2181  case 24:
2182 #line 312 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2183  { FROM((yyval.idxl), (yyvsp[-2].idxl)); (yyval.idxl)->items.add_raw((yyvsp[0].idxe)); }
2184 #line 2185 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2185  break;
2186 
2187  case 25:
2188 #line 313 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2189  { NEW((yyval.idxl), IndexList); (yyval.idxl)->items.add_raw((yyvsp[0].idxe)); }
2190 #line 2191 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2191  break;
2192 
2193  case 26:
2194 #line 316 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2195  { NEW((yyval.indx), Index); (yyval.indx)->expr.set_raw((yyvsp[-3].expr)); (yyval.indx)->indices.set_raw((yyvsp[-1].idxl)); }
2196 #line 2197 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2197  break;
2198 
2199  case 27:
2200 #line 319 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2201  { NEW((yyval.indx), Index); (yyval.indx)->expr.set_raw((yyvsp[-3].expr)); (yyval.indx)->indices.set_raw((yyvsp[-1].idxl)); }
2202 #line 2203 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2203  break;
2204 
2205  case 28:
2206 #line 323 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2207  { NEW((yyval.unop), Negate); (yyval.unop)->expr.set_raw((yyvsp[0].expr)); }
2208 #line 2209 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2209  break;
2210 
2211  case 29:
2212 #line 324 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2213  { NEW((yyval.unop), BitwiseNot); (yyval.unop)->expr.set_raw((yyvsp[0].expr)); }
2214 #line 2215 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2215  break;
2216 
2217  case 30:
2218 #line 325 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2219  { NEW((yyval.unop), LogicalNot); (yyval.unop)->expr.set_raw((yyvsp[0].expr)); }
2220 #line 2221 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2221  break;
2222 
2223  case 31:
2224 #line 328 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2225  { NEW((yyval.biop), Power); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2226 #line 2227 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2227  break;
2228 
2229  case 32:
2230 #line 329 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2231  { NEW((yyval.biop), Multiply); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2232 #line 2233 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2233  break;
2234 
2235  case 33:
2236 #line 330 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2237  { NEW((yyval.biop), Divide); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2238 #line 2239 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2239  break;
2240 
2241  case 34:
2242 #line 331 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2243  { NEW((yyval.biop), IntDivide); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2244 #line 2245 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2245  break;
2246 
2247  case 35:
2248 #line 332 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2249  { NEW((yyval.biop), Modulo); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2250 #line 2251 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2251  break;
2252 
2253  case 36:
2254 #line 333 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2255  { NEW((yyval.biop), Add); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2256 #line 2257 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2257  break;
2258 
2259  case 37:
2260 #line 334 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2261  { NEW((yyval.biop), Subtract); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2262 #line 2263 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2263  break;
2264 
2265  case 38:
2266 #line 335 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2267  { NEW((yyval.biop), ShiftLeft); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2268 #line 2269 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2269  break;
2270 
2271  case 39:
2272 #line 336 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2273  { NEW((yyval.biop), ShiftRightArith); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2274 #line 2275 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2275  break;
2276 
2277  case 40:
2278 #line 337 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2279  { NEW((yyval.biop), ShiftRightLogic); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2280 #line 2281 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2281  break;
2282 
2283  case 41:
2284 #line 338 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2285  { NEW((yyval.biop), CmpEq); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2286 #line 2287 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2287  break;
2288 
2289  case 42:
2290 #line 339 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2291  { NEW((yyval.biop), CmpNe); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2292 #line 2293 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2293  break;
2294 
2295  case 43:
2296 #line 340 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2297  { NEW((yyval.biop), CmpGt); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2298 #line 2299 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2299  break;
2300 
2301  case 44:
2302 #line 341 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2303  { NEW((yyval.biop), CmpGe); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2304 #line 2305 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2305  break;
2306 
2307  case 45:
2308 #line 342 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2309  { NEW((yyval.biop), CmpLt); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2310 #line 2311 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2311  break;
2312 
2313  case 46:
2314 #line 343 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2315  { NEW((yyval.biop), CmpLe); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2316 #line 2317 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2317  break;
2318 
2319  case 47:
2320 #line 344 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2321  { NEW((yyval.biop), BitwiseAnd); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2322 #line 2323 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2323  break;
2324 
2325  case 48:
2326 #line 345 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2327  { NEW((yyval.biop), BitwiseXor); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2328 #line 2329 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2329  break;
2330 
2331  case 49:
2332 #line 346 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2333  { NEW((yyval.biop), BitwiseOr); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2334 #line 2335 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2335  break;
2336 
2337  case 50:
2338 #line 347 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2339  { NEW((yyval.biop), LogicalAnd); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2340 #line 2341 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2341  break;
2342 
2343  case 51:
2344 #line 348 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2345  { NEW((yyval.biop), LogicalXor); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2346 #line 2347 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2347  break;
2348 
2349  case 52:
2350 #line 349 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2351  { NEW((yyval.biop), LogicalOr); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2352 #line 2353 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2353  break;
2354 
2355  case 53:
2356 #line 352 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2357  { NEW((yyval.tcnd), TernaryCond); (yyval.tcnd)->cond.set_raw((yyvsp[-4].expr)); (yyval.tcnd)->if_true.set_raw((yyvsp[-2].expr)); (yyval.tcnd)->if_false.set_raw((yyvsp[0].expr)); }
2358 #line 2359 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2359  break;
2360 
2361  case 54:
2362 #line 357 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2363  { NEW((yyval.unop), Negate); (yyval.unop)->expr.set_raw((yyvsp[0].expr)); }
2364 #line 2365 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2365  break;
2366 
2367  case 55:
2368 #line 358 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2369  { NEW((yyval.unop), BitwiseNot); (yyval.unop)->expr.set_raw((yyvsp[0].expr)); }
2370 #line 2371 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2371  break;
2372 
2373  case 56:
2374 #line 359 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2375  { NEW((yyval.unop), LogicalNot); (yyval.unop)->expr.set_raw((yyvsp[0].expr)); }
2376 #line 2377 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2377  break;
2378 
2379  case 57:
2380 #line 362 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2381  { NEW((yyval.biop), Power); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2382 #line 2383 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2383  break;
2384 
2385  case 58:
2386 #line 363 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2387  { NEW((yyval.biop), Multiply); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2388 #line 2389 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2389  break;
2390 
2391  case 59:
2392 #line 364 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2393  { NEW((yyval.biop), Divide); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2394 #line 2395 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2395  break;
2396 
2397  case 60:
2398 #line 365 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2399  { NEW((yyval.biop), IntDivide); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2400 #line 2401 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2401  break;
2402 
2403  case 61:
2404 #line 366 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2405  { NEW((yyval.biop), Modulo); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2406 #line 2407 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2407  break;
2408 
2409  case 62:
2410 #line 367 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2411  { NEW((yyval.biop), Add); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2412 #line 2413 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2413  break;
2414 
2415  case 63:
2416 #line 368 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2417  { NEW((yyval.biop), Subtract); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2418 #line 2419 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2419  break;
2420 
2421  case 64:
2422 #line 369 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2423  { NEW((yyval.biop), ShiftLeft); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2424 #line 2425 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2425  break;
2426 
2427  case 65:
2428 #line 370 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2429  { NEW((yyval.biop), ShiftRightArith); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2430 #line 2431 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2431  break;
2432 
2433  case 66:
2434 #line 371 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2435  { NEW((yyval.biop), ShiftRightLogic); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2436 #line 2437 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2437  break;
2438 
2439  case 67:
2440 #line 372 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2441  { NEW((yyval.biop), CmpEq); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2442 #line 2443 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2443  break;
2444 
2445  case 68:
2446 #line 373 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2447  { NEW((yyval.biop), CmpNe); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2448 #line 2449 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2449  break;
2450 
2451  case 69:
2452 #line 374 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2453  { NEW((yyval.biop), CmpGt); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2454 #line 2455 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2455  break;
2456 
2457  case 70:
2458 #line 375 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2459  { NEW((yyval.biop), CmpGe); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2460 #line 2461 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2461  break;
2462 
2463  case 71:
2464 #line 376 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2465  { NEW((yyval.biop), CmpLt); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2466 #line 2467 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2467  break;
2468 
2469  case 72:
2470 #line 377 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2471  { NEW((yyval.biop), CmpLe); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2472 #line 2473 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2473  break;
2474 
2475  case 73:
2476 #line 378 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2477  { NEW((yyval.biop), BitwiseAnd); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2478 #line 2479 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2479  break;
2480 
2481  case 74:
2482 #line 379 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2483  { NEW((yyval.biop), BitwiseXor); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2484 #line 2485 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2485  break;
2486 
2487  case 75:
2488 #line 380 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2489  { NEW((yyval.biop), LogicalAnd); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2490 #line 2491 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2491  break;
2492 
2493  case 76:
2494 #line 381 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2495  { NEW((yyval.biop), LogicalXor); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2496 #line 2497 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2497  break;
2498 
2499  case 77:
2500 #line 382 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2501  { NEW((yyval.biop), LogicalOr); (yyval.biop)->lhs.set_raw((yyvsp[-2].expr)); (yyval.biop)->rhs.set_raw((yyvsp[0].expr)); }
2502 #line 2503 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2503  break;
2504 
2505  case 78:
2506 #line 385 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2507  { NEW((yyval.tcnd), TernaryCond); (yyval.tcnd)->cond.set_raw((yyvsp[-4].expr)); (yyval.tcnd)->if_true.set_raw((yyvsp[-2].expr)); (yyval.tcnd)->if_false.set_raw((yyvsp[0].expr)); }
2508 #line 2509 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2509  break;
2510 
2511  case 79:
2512 #line 389 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2513  { FROM((yyval.expr), (yyvsp[0].ilit)); }
2514 #line 2515 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2515  break;
2516 
2517  case 80:
2518 #line 390 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2519  { FROM((yyval.expr), (yyvsp[0].flit)); }
2520 #line 2521 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2521  break;
2522 
2523  case 81:
2524 #line 391 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2525  { FROM((yyval.expr), (yyvsp[0].mat)); }
2526 #line 2527 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2527  break;
2528 
2529  case 82:
2530 #line 392 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2531  { FROM((yyval.expr), (yyvsp[0].slit)); }
2532 #line 2533 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2533  break;
2534 
2535  case 83:
2536 #line 393 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2537  { FROM((yyval.expr), (yyvsp[0].jlit)); }
2538 #line 2539 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2539  break;
2540 
2541  case 84:
2542 #line 394 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2543  { FROM((yyval.expr), (yyvsp[0].idnt)); }
2544 #line 2545 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2545  break;
2546 
2547  case 85:
2548 #line 395 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2549  { FROM((yyval.expr), (yyvsp[0].func)); }
2550 #line 2551 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2551  break;
2552 
2553  case 86:
2554 #line 396 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2555  { FROM((yyval.expr), (yyvsp[0].indx)); }
2556 #line 2557 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2557  break;
2558 
2559  case 87:
2560 #line 397 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2561  { FROM((yyval.expr), (yyvsp[0].unop)); }
2562 #line 2563 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2563  break;
2564 
2565  case 88:
2566 #line 398 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2567  { FROM((yyval.expr), (yyvsp[0].biop)); }
2568 #line 2569 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2569  break;
2570 
2571  case 89:
2572 #line 399 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2573  { FROM((yyval.expr), (yyvsp[0].tcnd)); }
2574 #line 2575 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2575  break;
2576 
2577  case 90:
2578 #line 400 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2579  { FROM((yyval.expr), (yyvsp[-1].expr)); }
2580 #line 2581 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2581  break;
2582 
2583  case 91:
2584 #line 401 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2585  { NEW((yyval.expr), ErroneousExpression); }
2586 #line 2587 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2587  break;
2588 
2589  case 92:
2590 #line 404 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2591  { FROM((yyval.expr), (yyvsp[0].ilit)); }
2592 #line 2593 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2593  break;
2594 
2595  case 93:
2596 #line 405 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2597  { FROM((yyval.expr), (yyvsp[0].flit)); }
2598 #line 2599 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2599  break;
2600 
2601  case 94:
2602 #line 406 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2603  { FROM((yyval.expr), (yyvsp[0].mat)); }
2604 #line 2605 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2605  break;
2606 
2607  case 95:
2608 #line 407 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2609  { FROM((yyval.expr), (yyvsp[0].slit)); }
2610 #line 2611 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2611  break;
2612 
2613  case 96:
2614 #line 408 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2615  { FROM((yyval.expr), (yyvsp[0].jlit)); }
2616 #line 2617 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2617  break;
2618 
2619  case 97:
2620 #line 409 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2621  { FROM((yyval.expr), (yyvsp[0].idnt)); }
2622 #line 2623 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2623  break;
2624 
2625  case 98:
2626 #line 410 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2627  { FROM((yyval.expr), (yyvsp[0].func)); }
2628 #line 2629 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2629  break;
2630 
2631  case 99:
2632 #line 411 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2633  { FROM((yyval.expr), (yyvsp[0].indx)); }
2634 #line 2635 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2635  break;
2636 
2637  case 100:
2638 #line 412 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2639  { FROM((yyval.expr), (yyvsp[0].unop)); }
2640 #line 2641 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2641  break;
2642 
2643  case 101:
2644 #line 413 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2645  { FROM((yyval.expr), (yyvsp[0].biop)); }
2646 #line 2647 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2647  break;
2648 
2649  case 102:
2650 #line 414 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2651  { FROM((yyval.expr), (yyvsp[0].tcnd)); }
2652 #line 2653 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2653  break;
2654 
2655  case 103:
2656 #line 415 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2657  { FROM((yyval.expr), (yyvsp[-1].expr)); }
2658 #line 2659 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2659  break;
2660 
2661  case 104:
2662 #line 416 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2663  { NEW((yyval.expr), ErroneousExpression); }
2664 #line 2665 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2665  break;
2666 
2667  case 105:
2668 #line 420 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2669  { FROM((yyval.expl), (yyvsp[-2].expl)); (yyval.expl)->items.add_raw((yyvsp[0].expr)); }
2670 #line 2671 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2671  break;
2672 
2673  case 106:
2674 #line 421 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2675  { NEW((yyval.expl), ExpressionList); (yyval.expl)->items.add_raw((yyvsp[0].expr)); }
2676 #line 2677 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2677  break;
2678 
2679  case 107:
2680 #line 424 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2681  { FROM((yyval.expl), (yyvsp[-2].expl)); (yyval.expl)->items.add_raw((yyvsp[0].expr)); }
2682 #line 2683 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2683  break;
2684 
2685  case 108:
2686 #line 425 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2687  { NEW((yyval.expl), ExpressionList); (yyval.expl)->items.add_raw((yyvsp[0].expr)); }
2688 #line 2689 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2689  break;
2690 
2691  case 109:
2692 #line 429 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2693  { NEW((yyval.adat), AnnotationData); (yyval.adat)->interface.set_raw((yyvsp[-2].idnt)); (yyval.adat)->operation.set_raw((yyvsp[0].idnt)); }
2694 #line 2695 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2695  break;
2696 
2697  case 110:
2698 #line 432 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2699  { FROM((yyval.adat), (yyvsp[0].adat)); (yyval.adat)->operands.set_raw(new ExpressionList()); }
2700 #line 2701 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2701  break;
2702 
2703  case 111:
2704 #line 433 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2705  { FROM((yyval.adat), (yyvsp[-2].adat)); (yyval.adat)->operands.set_raw(new ExpressionList()); }
2706 #line 2707 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2707  break;
2708 
2709  case 112:
2710 #line 434 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2711  { FROM((yyval.adat), (yyvsp[-3].adat)); (yyval.adat)->operands.set_raw((yyvsp[-1].expl)); }
2712 #line 2713 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2713  break;
2714 
2715  case 113:
2716 #line 439 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2717  {
2718  NEW((yyval.inst), Instruction);
2719  (yyval.inst)->name.set_raw((yyvsp[0].idnt));
2720  (yyval.inst)->operands.set_raw(new ExpressionList());
2721  }
2722 #line 2723 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2723  break;
2724 
2725  case 114:
2726 #line 444 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2727  {
2728  NEW((yyval.inst), Instruction);
2729  (yyval.inst)->name.set_raw((yyvsp[-1].idnt));
2730  (yyval.inst)->operands.set_raw((yyvsp[0].expl));
2731  }
2732 #line 2733 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2733  break;
2734 
2735  case 115:
2736 #line 449 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2737  {
2738  NEW((yyval.inst), Instruction);
2739  (yyval.inst)->name.set_raw(new Identifier());
2740  (yyval.inst)->name->name = "set";
2741  (yyval.inst)->operands.set_raw(new ExpressionList());
2742  (yyval.inst)->operands->items.add_raw((yyvsp[-2].expr));
2743  (yyval.inst)->operands->items.add_raw((yyvsp[0].expr));
2744  }
2745 #line 2746 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2746  break;
2747 
2748  case 116:
2749 #line 457 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2750  {
2751  NEW((yyval.inst), Instruction);
2752  (yyval.inst)->name.set_raw((yyvsp[-1].idnt));
2753  (yyval.inst)->condition.set_raw((yyvsp[0].expr));
2754  (yyval.inst)->operands.set_raw(new ExpressionList());
2755  }
2756 #line 2757 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2757  break;
2758 
2759  case 117:
2760 #line 463 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2761  {
2762  NEW((yyval.inst), Instruction);
2763  (yyval.inst)->name.set_raw((yyvsp[-3].idnt));
2764  (yyval.inst)->condition.set_raw((yyvsp[-2].expr));
2765  (yyval.inst)->operands.set_raw((yyvsp[0].expl));
2766  }
2767 #line 2768 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2768  break;
2769 
2770  case 118:
2771 #line 469 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2772  {
2773  NEW((yyval.inst), Instruction);
2774  (yyval.inst)->name.set_raw((yyvsp[-1].idnt));
2775  (yyval.inst)->condition.set_raw((yyvsp[-3].expr));
2776  (yyval.inst)->operands.set_raw((yyvsp[0].expl));
2777  }
2778 #line 2779 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2779  break;
2780 
2781  case 119:
2782 #line 480 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2783  { FROM((yyval.inst), (yyvsp[-2].inst)); (yyval.inst)->annotations.add_raw((yyvsp[0].adat)); }
2784 #line 2785 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2785  break;
2786 
2787  case 120:
2788 #line 481 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2789  { FROM((yyval.inst), (yyvsp[0].inst)); }
2790 #line 2791 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2791  break;
2792 
2793  case 121:
2794 #line 485 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2795  { FROM((yyval.bun), (yyvsp[-2].bun)); (yyval.bun)->items.add_raw((yyvsp[0].inst)); }
2796 #line 2797 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2797  break;
2798 
2799  case 122:
2800 #line 486 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2801  { NEW((yyval.bun), Bundle); (yyval.bun)->items.add_raw((yyvsp[0].inst)); }
2802 #line 2803 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2803  break;
2804 
2805  case 123:
2806 #line 490 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2807  { FROM((yyval.bun), (yyvsp[-2].bun)); (yyval.bun)->items.extend((yyvsp[0].bun)->items); delete (yyvsp[0].bun); }
2808 #line 2809 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2809  break;
2810 
2811  case 124:
2812 #line 491 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2813  { FROM((yyval.bun), (yyvsp[0].bun)); }
2814 #line 2815 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2815  break;
2816 
2817  case 125:
2818 #line 495 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2819  { NEW((yyval.map), Mapping); (yyval.map)->expr.set_raw((yyvsp[-2].expr)); (yyval.map)->alias.set_raw((yyvsp[0].idnt)); }
2820 #line 2821 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2821  break;
2822 
2823  case 126:
2824 #line 496 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2825  { NEW((yyval.map), Mapping); (yyval.map)->alias.set_raw((yyvsp[-2].idnt)); (yyval.map)->expr.set_raw((yyvsp[0].expr)); }
2826 #line 2827 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2827  break;
2828 
2829  case 127:
2830 #line 500 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2831  { NEW((yyval.vars), Variables); (yyval.vars)->names.add_raw((yyvsp[-2].idnt)); (yyval.vars)->typ.set_raw((yyvsp[0].idnt)); }
2832 #line 2833 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2833  break;
2834 
2835  case 128:
2836 #line 501 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2837  { FROM((yyval.vars), (yyvsp[0].vars)); (yyval.vars)->names.add_raw((yyvsp[-2].idnt)); }
2838 #line 2839 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2839  break;
2840 
2841  case 129:
2842 #line 504 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2843  { FROM((yyval.vars), (yyvsp[0].vars)); }
2844 #line 2845 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2845  break;
2846 
2847  case 130:
2848 #line 508 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2849  { NEW((yyval.sub), Subcircuit); (yyval.sub)->name.set_raw((yyvsp[0].idnt)); }
2850 #line 2851 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2851  break;
2852 
2853  case 131:
2854 #line 509 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2855  { NEW((yyval.sub), Subcircuit); (yyval.sub)->name.set_raw((yyvsp[-3].idnt)); (yyval.sub)->iterations.set_raw((yyvsp[-1].expr)); }
2856 #line 2857 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2857  break;
2858 
2859  case 132:
2860 #line 513 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2861  { FROM((yyval.stms), (yyvsp[-2].stms)); }
2862 #line 2863 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2863  break;
2864 
2865  case 133:
2866 #line 514 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2867  { NEW((yyval.stms), StatementList); }
2868 #line 2869 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2869  break;
2870 
2871  case 134:
2872 #line 517 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2873  { NEW((yyval.asgn), Assignment); (yyval.asgn)->lhs.set_raw((yyvsp[-2].expr)); (yyval.asgn)->rhs.set_raw((yyvsp[0].expr)); }
2874 #line 2875 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2875  break;
2876 
2877  case 135:
2878 #line 520 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2879  { FROM((yyval.asgn), (yyvsp[0].asgn)); }
2880 #line 2881 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2881  break;
2882 
2883  case 136:
2884 #line 521 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2885  { (yyval.asgn) = nullptr; }
2886 #line 2887 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2887  break;
2888 
2889  case 137:
2890 #line 524 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2891  {
2892  NEW((yyval.ifel), IfElse);
2893  (yyval.ifel)->branches.add_raw(new IfElseBranch());
2894  (yyval.ifel)->branches[0]->condition.set_raw((yyvsp[-2].expr));
2895  (yyval.ifel)->branches[0]->body.set_raw((yyvsp[0].stms));
2896  }
2897 #line 2898 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2898  break;
2899 
2900  case 138:
2901 #line 530 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2902  {
2903  FROM((yyval.ifel), (yyvsp[0].ifel));
2904  (yyval.ifel)->branches.add_raw(new IfElseBranch(), 0);
2905  (yyval.ifel)->branches[0]->condition.set_raw((yyvsp[-4].expr));
2906  (yyval.ifel)->branches[0]->body.set_raw((yyvsp[-2].stms));
2907  }
2908 #line 2909 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2909  break;
2910 
2911  case 139:
2912 #line 536 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2913  {
2914  NEW((yyval.ifel), IfElse);
2915  (yyval.ifel)->branches.add_raw(new IfElseBranch());
2916  (yyval.ifel)->branches[0]->condition.set_raw((yyvsp[-4].expr));
2917  (yyval.ifel)->branches[0]->body.set_raw((yyvsp[-2].stms));
2918  (yyval.ifel)->otherwise.set_raw((yyvsp[0].stms));
2919  }
2920 #line 2921 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2921  break;
2922 
2923  case 140:
2924 #line 546 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2925  {
2926  NEW((yyval.forl), ForLoop);
2927  if ((yyvsp[-6].asgn)) (yyval.forl)->initialize.set_raw((yyvsp[-6].asgn));
2928  (yyval.forl)->condition.set_raw((yyvsp[-4].expr));
2929  if ((yyvsp[-2].asgn)) (yyval.forl)->update.set_raw((yyvsp[-2].asgn));
2930  (yyval.forl)->body.set_raw((yyvsp[0].stms));
2931  }
2932 #line 2933 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2933  break;
2934 
2935  case 141:
2936 #line 556 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2937  {
2938  NEW((yyval.fore), ForeachLoop);
2939  (yyval.fore)->lhs.set_raw((yyvsp[-6].expr));
2940  (yyval.fore)->frm.set_raw((yyvsp[-4].expr));
2941  (yyval.fore)->to.set_raw((yyvsp[-2].expr));
2942  (yyval.fore)->body.set_raw((yyvsp[0].stms));
2943  }
2944 #line 2945 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2945  break;
2946 
2947  case 142:
2948 #line 565 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2949  { NEW((yyval.whil), WhileLoop); (yyval.whil)->condition.set_raw((yyvsp[-2].expr)); (yyval.whil)->body.set_raw((yyvsp[0].stms)); }
2950 #line 2951 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2951  break;
2952 
2953  case 143:
2954 #line 568 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2955  { NEW((yyval.repu), RepeatUntilLoop); (yyval.repu)->body.set_raw((yyvsp[-4].stms)); (yyval.repu)->condition.set_raw((yyvsp[-1].expr)); }
2956 #line 2957 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2957  break;
2958 
2959  case 144:
2960 #line 571 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2961  { NEW((yyval.cont), ContinueStatement); }
2962 #line 2963 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2963  break;
2964 
2965  case 145:
2966 #line 574 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2967  { NEW((yyval.brk), BreakStatement); }
2968 #line 2969 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2969  break;
2970 
2971  case 146:
2972 #line 578 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2973  { FROM((yyval.stmt), (yyvsp[0].map)); }
2974 #line 2975 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2975  break;
2976 
2977  case 147:
2978 #line 579 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2979  { FROM((yyval.stmt), (yyvsp[0].vars)); }
2980 #line 2981 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2981  break;
2982 
2983  case 148:
2984 #line 580 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2985  { FROM((yyval.stmt), (yyvsp[0].sub)); }
2986 #line 2987 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2987  break;
2988 
2989  case 149:
2990 #line 581 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2991  { FROM((yyval.stmt), (yyvsp[0].bun)); }
2992 #line 2993 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2993  break;
2994 
2995  case 150:
2996 #line 582 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
2997  { FROM((yyval.stmt), (yyvsp[-2].bun)); }
2998 #line 2999 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
2999  break;
3000 
3001  case 151:
3002 #line 583 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3003  { FROM((yyval.stmt), (yyvsp[0].ifel)); }
3004 #line 3005 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3005  break;
3006 
3007  case 152:
3008 #line 584 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3009  { FROM((yyval.stmt), (yyvsp[0].forl)); }
3010 #line 3011 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3011  break;
3012 
3013  case 153:
3014 #line 585 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3015  { FROM((yyval.stmt), (yyvsp[0].fore)); }
3016 #line 3017 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3017  break;
3018 
3019  case 154:
3020 #line 586 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3021  { FROM((yyval.stmt), (yyvsp[0].whil)); }
3022 #line 3023 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3023  break;
3024 
3025  case 155:
3026 #line 587 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3027  { FROM((yyval.stmt), (yyvsp[0].repu)); }
3028 #line 3029 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3029  break;
3030 
3031  case 156:
3032 #line 588 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3033  { FROM((yyval.stmt), (yyvsp[0].cont)); }
3034 #line 3035 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3035  break;
3036 
3037  case 157:
3038 #line 589 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3039  { FROM((yyval.stmt), (yyvsp[0].brk)); }
3040 #line 3041 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3041  break;
3042 
3043  case 158:
3044 #line 590 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3045  { NEW((yyval.stmt), ErroneousStatement); }
3046 #line 3047 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3047  break;
3048 
3049  case 159:
3050 #line 597 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3051  { FROM((yyval.stmt), (yyvsp[-2].stmt)); (yyval.stmt)->annotations.add_raw((yyvsp[0].adat)); }
3052 #line 3053 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3053  break;
3054 
3055  case 160:
3056 #line 598 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3057  { FROM((yyval.stmt), (yyvsp[0].stmt)); }
3058 #line 3059 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3059  break;
3060 
3061  case 161:
3062 #line 602 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3063  { FROM((yyval.stms), (yyvsp[-2].stms)); (yyval.stms)->items.add_raw((yyvsp[0].stmt)); }
3064 #line 3065 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3065  break;
3066 
3067  case 162:
3068 #line 603 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3069  { NEW((yyval.stms), StatementList); (yyval.stms)->items.add_raw((yyvsp[0].stmt)); }
3070 #line 3071 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3071  break;
3072 
3073  case 163:
3074 #line 607 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3075  { FROM((yyval.stms), (yyvsp[-1].stms)); }
3076 #line 3077 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3077  break;
3078 
3079  case 164:
3080 #line 608 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3081  { NEW((yyval.stms), StatementList); }
3082 #line 3083 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3083  break;
3084 
3085  case 165:
3086 #line 612 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3087  { FROM((yyval.vers), (yyvsp[-2].vers)); (yyval.vers)->items.push_back((yyvsp[0].ilit)->value); delete (yyvsp[0].ilit); }
3088 #line 3089 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3089  break;
3090 
3091  case 166:
3092 #line 613 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3093  { NEW((yyval.vers), Version); (yyval.vers)->items.clear(); (yyval.vers)->items.push_back((yyvsp[0].ilit)->value); delete (yyvsp[0].ilit); }
3094 #line 3095 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3095  break;
3096 
3097  case 167:
3098 #line 619 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3099  { NEW((yyval.prog), Program); (yyval.prog)->version.set_raw((yyvsp[-4].vers)); (yyval.prog)->num_qubits.set_raw((yyvsp[-1].expr)); (yyval.prog)->statements.set_raw((yyvsp[0].stms)); }
3100 #line 3101 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3101  break;
3102 
3103  case 168:
3104 #line 621 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3105  { NEW((yyval.prog), Program); (yyval.prog)->version.set_raw((yyvsp[-1].vers)); (yyval.prog)->statements.set_raw((yyvsp[0].stms)); }
3106 #line 3107 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3107  break;
3108 
3109  case 169:
3110 #line 625 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3111  { helper.result.root.set_raw((yyvsp[0].prog)); }
3112 #line 3113 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3113  break;
3114 
3115  case 170:
3116 #line 626 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1661 */
3117  { helper.result.root.set_raw(new ErroneousProgram()); }
3118 #line 3119 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3119  break;
3120 
3121 
3122 #line 3123 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/cbuild/src/cqasm/cqasm-v1-parser.cpp" /* yacc.c:1661 */
3123  default: break;
3124  }
3125  /* User semantic actions sometimes alter yychar, and that requires
3126  that yytoken be updated with the new translation. We take the
3127  approach of translating immediately before every use of yytoken.
3128  One alternative is translating here after every semantic action,
3129  but that translation would be missed if the semantic action invokes
3130  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3131  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3132  incorrect destructor might then be invoked immediately. In the
3133  case of YYERROR or YYBACKUP, subsequent parser actions might lead
3134  to an incorrect destructor call or verbose syntax error message
3135  before the lookahead is translated. */
3136  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3137 
3138  YYPOPSTACK (yylen);
3139  yylen = 0;
3140  YY_STACK_PRINT (yyss, yyssp);
3141 
3142  *++yyvsp = yyval;
3143  *++yylsp = yyloc;
3144 
3145  /* Now 'shift' the result of the reduction. Determine what state
3146  that goes to, based on the state we popped back to and the rule
3147  number reduced by. */
3148 
3149  yyn = yyr1[yyn];
3150 
3151  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3152  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3153  yystate = yytable[yystate];
3154  else
3155  yystate = yydefgoto[yyn - YYNTOKENS];
3156 
3157  goto yynewstate;
3158 
3159 
3160 /*--------------------------------------.
3161 | yyerrlab -- here on detecting error. |
3162 `--------------------------------------*/
3163 yyerrlab:
3164  /* Make sure we have latest lookahead translation. See comments at
3165  user semantic actions for why this is necessary. */
3166  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3167 
3168  /* If not already recovering from an error, report this error. */
3169  if (!yyerrstatus)
3170  {
3171  ++yynerrs;
3172 #if ! YYERROR_VERBOSE
3173  yyerror (&yylloc, scanner, helper, YY_("syntax error"));
3174 #else
3175 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3176  yyssp, yytoken)
3177  {
3178  char const *yymsgp = YY_("syntax error");
3179  int yysyntax_error_status;
3180  yysyntax_error_status = YYSYNTAX_ERROR;
3181  if (yysyntax_error_status == 0)
3182  yymsgp = yymsg;
3183  else if (yysyntax_error_status == 1)
3184  {
3185  if (yymsg != yymsgbuf)
3186  YYSTACK_FREE (yymsg);
3187  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3188  if (!yymsg)
3189  {
3190  yymsg = yymsgbuf;
3191  yymsg_alloc = sizeof yymsgbuf;
3192  yysyntax_error_status = 2;
3193  }
3194  else
3195  {
3196  yysyntax_error_status = YYSYNTAX_ERROR;
3197  yymsgp = yymsg;
3198  }
3199  }
3200  yyerror (&yylloc, scanner, helper, yymsgp);
3201  if (yysyntax_error_status == 2)
3202  goto yyexhaustedlab;
3203  }
3204 # undef YYSYNTAX_ERROR
3205 #endif
3206  }
3207 
3208  yyerror_range[1] = yylloc;
3209 
3210  if (yyerrstatus == 3)
3211  {
3212  /* If just tried and failed to reuse lookahead token after an
3213  error, discard it. */
3214 
3215  if (yychar <= YYEOF)
3216  {
3217  /* Return failure if at end of input. */
3218  if (yychar == YYEOF)
3219  YYABORT;
3220  }
3221  else
3222  {
3223  yydestruct ("Error: discarding",
3224  yytoken, &yylval, &yylloc, scanner, helper);
3225  yychar = YYEMPTY;
3226  }
3227  }
3228 
3229  /* Else will try to reuse lookahead token after shifting the error
3230  token. */
3231  goto yyerrlab1;
3232 
3233 
3234 /*---------------------------------------------------.
3235 | yyerrorlab -- error raised explicitly by YYERROR. |
3236 `---------------------------------------------------*/
3237 yyerrorlab:
3238 
3239  /* Pacify compilers like GCC when the user code never invokes
3240  YYERROR and the label yyerrorlab therefore never appears in user
3241  code. */
3242  if (/*CONSTCOND*/ 0)
3243  goto yyerrorlab;
3244 
3245  yyerror_range[1] = yylsp[1-yylen];
3246  /* Do not reclaim the symbols of the rule whose action triggered
3247  this YYERROR. */
3248  YYPOPSTACK (yylen);
3249  yylen = 0;
3250  YY_STACK_PRINT (yyss, yyssp);
3251  yystate = *yyssp;
3252  goto yyerrlab1;
3253 
3254 
3255 /*-------------------------------------------------------------.
3256 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3257 `-------------------------------------------------------------*/
3258 yyerrlab1:
3259  yyerrstatus = 3; /* Each real token shifted decrements this. */
3260 
3261  for (;;)
3262  {
3263  yyn = yypact[yystate];
3264  if (!yypact_value_is_default (yyn))
3265  {
3266  yyn += YYTERROR;
3267  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3268  {
3269  yyn = yytable[yyn];
3270  if (0 < yyn)
3271  break;
3272  }
3273  }
3274 
3275  /* Pop the current state because it cannot handle the error token. */
3276  if (yyssp == yyss)
3277  YYABORT;
3278 
3279  yyerror_range[1] = *yylsp;
3280  yydestruct ("Error: popping",
3281  yystos[yystate], yyvsp, yylsp, scanner, helper);
3282  YYPOPSTACK (1);
3283  yystate = *yyssp;
3284  YY_STACK_PRINT (yyss, yyssp);
3285  }
3286 
3288  *++yyvsp = yylval;
3290 
3291  yyerror_range[2] = yylloc;
3292  /* Using YYLLOC is tempting, but would change the location of
3293  the lookahead. YYLOC is available though. */
3294  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
3295  *++yylsp = yyloc;
3296 
3297  /* Shift the error token. */
3298  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3299 
3300  yystate = yyn;
3301  goto yynewstate;
3302 
3303 
3304 /*-------------------------------------.
3305 | yyacceptlab -- YYACCEPT comes here. |
3306 `-------------------------------------*/
3307 yyacceptlab:
3308  yyresult = 0;
3309  goto yyreturn;
3310 
3311 /*-----------------------------------.
3312 | yyabortlab -- YYABORT comes here. |
3313 `-----------------------------------*/
3314 yyabortlab:
3315  yyresult = 1;
3316  goto yyreturn;
3317 
3318 #if !defined yyoverflow || YYERROR_VERBOSE
3319 /*-------------------------------------------------.
3320 | yyexhaustedlab -- memory exhaustion comes here. |
3321 `-------------------------------------------------*/
3322 yyexhaustedlab:
3323  yyerror (&yylloc, scanner, helper, YY_("memory exhausted"));
3324  yyresult = 2;
3325  /* Fall through. */
3326 #endif
3327 
3328 yyreturn:
3329  if (yychar != YYEMPTY)
3330  {
3331  /* Make sure we have latest lookahead translation. See comments at
3332  user semantic actions for why this is necessary. */
3333  yytoken = YYTRANSLATE (yychar);
3334  yydestruct ("Cleanup: discarding lookahead",
3335  yytoken, &yylval, &yylloc, scanner, helper);
3336  }
3337  /* Do not reclaim the symbols of the rule whose action triggered
3338  this YYABORT or YYACCEPT. */
3339  YYPOPSTACK (yylen);
3340  YY_STACK_PRINT (yyss, yyssp);
3341  while (yyssp != yyss)
3342  {
3343  yydestruct ("Cleanup: popping",
3344  yystos[*yyssp], yyvsp, yylsp, scanner, helper);
3345  YYPOPSTACK (1);
3346  }
3347 #ifndef yyoverflow
3348  if (yyss != yyssa)
3349  YYSTACK_FREE (yyss);
3350 #endif
3351 #if YYERROR_VERBOSE
3352  if (yymsg != yymsgbuf)
3353  YYSTACK_FREE (yymsg);
3354 #endif
3355  return yyresult;
3356 }
3357 #line 629 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/stable/src/cqasm/src/cqasm-v1-parser.y" /* yacc.c:1906 */
3358 
3359 
3360 void yyerror(YYLTYPE* yyllocp, yyscan_t unused, cqasm::v1::parser::ParseHelper &helper, const char* msg) {
3361  (void)unused;
3362  std::ostringstream sb;
3363  sb << helper.filename
3364  << ":" << yyllocp->first_line
3365  << ":" << yyllocp->first_column
3366  << ": " << msg;
3367  helper.push_error(sb.str());
3368 }
The file version identifier.
#define yydebug
Defines the types for the cQASM abstract syntax tree, based on the classes from cqasm::tree.
#define yyparse
A floating point literal.
Integer division operator.
WhileLoop * whil
Bitwise AND operator.
Subtraction operator.
Placeholder for an expression with a parse error.
#define YYNTOKENS
A C-style for loop.
#define YYSTACK_ALLOC_MAXIMUM
#define YYSIZE_T
Less-than operator.
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
void push_error(const std::string &error)
Pushes an error.
A list of parallel instructions.
Placeholder for a statement with a parse error.
Contains annotation objects used within the trees by libqasm.
Represents a JSON literal.
ExpressionList * expl
Logical AND operator.
#define YY_(Msgid)
#define YYINITDEPTH
Any kind of instruction.
Bitwise XOR operator.
#define YYABORT
Logical/unsigned shift-right operator (shifts in zero).
A mapping (alias) for an expression.
Special/temporary string builder node, used to build strings from fragments and escape sequences whil...
Addition operator.
A single condition + block for use in an if-else chain.
#define FROM(t, s)
Moves previously constructed node s into t, where s is almost always one of bison&#39;s input locations (...
#define YYLAST
#define YYLTYPE
An assignment statement within a loop definition.
IndexItem * idxi
#define YYSTACK_FREE
JsonLiteral * jlit
#define NEW(v, T)
Constructs an empty, new node of type T and places it into v.
#define YYPOPSTACK(N)
#define __attribute__(Spec)
Identifier * idnt
#define YYEMPTY
#define YY_INITIAL_VALUE(Value)
Subcircuit * sub
A list of one or more indices.
void * yyscan_t
TernaryCond * tcnd
Any unary operator.
IndexList * idxl
#define YYSYNTAX_ERROR
Internal helper class for parsing cQASM files.
#define yypact_value_is_default(Yystate)
ContinueStatement * cont
Contains helper classes and objects for the lexer and parser generated by flex/bison, as well as the entry points for invoking the parser directly, in case you don&#39;t need semantic analysis.
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
unsigned char yytype_uint8
#define YYLLOC_DEFAULT(Current, Rhs, N)
One or more variable declaration for some type.
Represents a matrix literal.
A single index in an index list.
Any kind of statement.
#define YYFINAL
StringBuilder * strb
Variables * vars
#define YYSTYPE
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
yytype_int16 yyss_alloc
Represents an annotation.
Inequality operator.
T initialize()
Generates a default value for the given primitive type.
Arithmetic/signed shift-right operator (shifts in sign).
#define yylex
YYSTYPE yyvs_alloc
RepeatUntilLoop * repu
#define yylloc
BreakStatement * brk
Logical XOR operator.
#define YY_REDUCE_PRINT(Rule)
void free(void *)
An inclusive range of indices in an index list.
#define yyerror
An entry in an index list.
Negation operator (two&#39;s complement).
#define YYDPRINTF(Args)
IntegerLiteral * ilit
#define YYEOF
Any binary operator.
#define yylval
ast::One< ast::Root > root
Root node of the AST, if analysis was sufficiently successful.
#define yytable_value_is_error(Yytable_value)
short int yytype_int16
Greater-than-or-equal operator.
#define YYTERROR
std::string filename
Name of the file being parsed.
Equality operator.
#define YYACCEPT
AnnotationData * adat
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YYTRANSLATE(YYX)
#define YY_STACK_PRINT(Bottom, Top)
#define YYUSE(E)
ParseResult result
The parse result.
True division operator.
Represents a string literal.
YYLTYPE yyls_alloc
#define YY_NULL
StringLiteral * slit
Less-than-or-equal operator.
A complete program.
Assignment * asgn
#define YYCASE_(N, S)
StatementList * stms
FunctionCall * func
#define yynerrs
Statement * stmt
Namespace for the abstract syntax tree node classes.
Exponentiation operator.
unsigned short int yytype_uint16
signed char yytype_int8
ForeachLoop * fore
void * yyscan_t
Expression * expr
IndexRange * idxr
IndexEntry * idxe
#define YYMAXDEPTH
cqasm_v1tokentype
void * malloc(YYSIZE_T)
Instruction * inst
#define YYSTACK_ALLOC
Indexation operator.
#define YYSTACK_BYTES(N)
FloatLiteral * flit
Represents a comma-separated list of expressions.
Multiplication operator.
Any kind of expression.
int cqasm_v1parse(yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper)
MatrixLiteral * mat
Bitwise NOT (one&#39;s complement).
Ternary conditional operator.
Greater-than operator.