libqasm
library for handling cQASM files
Classes | Macros | Typedefs | Enumerations | Functions
cqasm-v1-parser.cpp File Reference

Parser, generated by Bison. More...

Go to the source code of this file.

Classes

union  CQASM_V1STYPE
 
struct  CQASM_V1LTYPE
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   2
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define ADD_SOURCE_LOCATION(v)
 Attaches a source location annotation object to the given node pointer. More...
 
#define NEW(v, T)
 Constructs an empty, new node of type T and places it into v. More...
 
#define FROM(t, s)
 Moves previously constructed node s into t, where s is almost always one of bison's input locations ($1, $2, etc) and t is almost always $$. More...
 
#define YYSTYPE   CQASM_V1STYPE
 
#define YYLTYPE   CQASM_V1LTYPE
 
#define yyparse   cqasm_v1parse
 
#define yylex   cqasm_v1lex
 
#define yyerror   cqasm_v1error
 
#define yydebug   cqasm_v1debug
 
#define yynerrs   cqasm_v1nerrs
 
#define YY_NULL   0
 
#define YYERROR_VERBOSE   1
 
#define YY_CQASM_V1_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_LATEST_CBUILD_SRC_CQASM_CQASM_V1_PARSER_HPP_INCLUDED
 
#define CQASM_V1DEBUG   0
 
#define YYSTYPE   CQASM_V1STYPE
 
#define YYLTYPE   CQASM_V1LTYPE
 
#define CQASM_V1TOKENTYPE
 
#define CQASM_V1STYPE_IS_TRIVIAL   1
 
#define CQASM_V1STYPE_IS_DECLARED   1
 
#define CQASM_V1LTYPE_IS_DECLARED   1
 
#define CQASM_V1LTYPE_IS_TRIVIAL   1
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(Msgid)   Msgid
 
#define __attribute__(Spec)   /* empty */
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   9
 
#define YYLAST   2125
 
#define YYNTOKENS   72
 
#define YYNNTS   55
 
#define YYNRULES   170
 
#define YYNSTATES   328
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   302
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -239
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-239)))
 
#define YYTABLE_NINF   -137
 
#define yytable_value_is_error(Yytable_value)   0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYCASE_(N, S)
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 
#define YYSYNTAX_ERROR
 

Typedefs

typedef void * yyscan_t
 
typedef union CQASM_V1STYPE CQASM_V1STYPE
 
typedef struct CQASM_V1LTYPE CQASM_V1LTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  cqasm_v1tokentype {
  NEWLINE = 258, VERSION = 259, QUBITS = 260, MAP = 261,
  VAR = 262, CDASH = 263, COND = 264, IF = 265,
  ELSE = 266, FOR = 267, FOREACH = 268, WHILE = 269,
  REPEAT = 270, UNTIL = 271, CONTINUE = 272, BREAK = 273,
  SET = 274, INT_LITERAL = 275, FLOAT_LITERAL = 276, BAD_NUMBER = 277,
  STRING_OPEN = 278, STRING_CLOSE = 279, JSON_OPEN = 280, JSON_CLOSE = 281,
  STRBUILD_APPEND = 282, STRBUILD_ESCAPE = 283, IDENTIFIER = 284, POWER = 285,
  INT_DIV = 286, LOGIC_OR = 287, LOGIC_AND = 288, LOGIC_XOR = 289,
  CMP_GE = 290, CMP_LE = 291, CMP_EQ = 292, CMP_NE = 293,
  SHL = 294, ARITH_SHR = 295, LOGIC_SHR = 296, ELLIPSIS = 297,
  BAD_CHARACTER = 298, END_OF_FILE = 299, UMINUS = 300, UCOMP = 301,
  UNOT = 302, NEWLINE = 258, VERSION = 259, QUBITS = 260,
  MAP = 261, VAR = 262, CDASH = 263, COND = 264,
  IF = 265, ELSE = 266, FOR = 267, FOREACH = 268,
  WHILE = 269, REPEAT = 270, UNTIL = 271, CONTINUE = 272,
  BREAK = 273, SET = 274, INT_LITERAL = 275, FLOAT_LITERAL = 276,
  BAD_NUMBER = 277, STRING_OPEN = 278, STRING_CLOSE = 279, JSON_OPEN = 280,
  JSON_CLOSE = 281, STRBUILD_APPEND = 282, STRBUILD_ESCAPE = 283, IDENTIFIER = 284,
  POWER = 285, INT_DIV = 286, LOGIC_OR = 287, LOGIC_AND = 288,
  LOGIC_XOR = 289, CMP_GE = 290, CMP_LE = 291, CMP_EQ = 292,
  CMP_NE = 293, SHL = 294, ARITH_SHR = 295, LOGIC_SHR = 296,
  ELLIPSIS = 297, BAD_CHARACTER = 298, END_OF_FILE = 299, UMINUS = 300,
  UCOMP = 301, UNOT = 302
}
 

Functions

int cqasm_v1parse (yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper)
 
int yylex (YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_t scanner)
 
void yyerror (YYLTYPE *yyllocp, yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper, const char *msg)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
int yyparse (yyscan_t scanner, cqasm::v1::parser::ParseHelper &helper)
 

Detailed Description

Parser, generated by Bison.

Definition in file cqasm-v1-parser.cpp.

#include <memory>
#include <cstdio>
#include <cstdint>
#include "cqasm-annotations.hpp"
#include "cqasm-v1-ast.hpp"
#include "cqasm-v1-parse-helper.hpp"
#include <stddef.h>
Include dependency graph for cqasm-v1-parser.cpp:

Macro Definition Documentation

◆ YYBISON

#define YYBISON   1

Definition at line 44 of file cqasm-v1-parser.cpp.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.0"

Definition at line 47 of file cqasm-v1-parser.cpp.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file cqasm-v1-parser.cpp.

◆ YYPURE

#define YYPURE   2

Definition at line 53 of file cqasm-v1-parser.cpp.

◆ YYPUSH

#define YYPUSH   0

Definition at line 56 of file cqasm-v1-parser.cpp.

◆ YYPULL

#define YYPULL   1

Definition at line 59 of file cqasm-v1-parser.cpp.

◆ ADD_SOURCE_LOCATION

#define ADD_SOURCE_LOCATION (   v)
Value:
helper.filename, \
yyloc.first_line, \
yyloc.first_column, \
yyloc.last_line, \
yyloc.last_column))
Source location annotation object, containing source file line numbers etc.

Attaches a source location annotation object to the given node pointer.

Definition at line 68 of file cqasm-v1-parser.cpp.

◆ NEW

#define NEW (   v,
 
)
Value:
v = new T(); \
ADD_SOURCE_LOCATION(v)

Constructs an empty, new node of type T and places it into v.

v is almost always $$ (the result location), but it can't be made part of the definition because preprocessing happens after bison's substitution.

Definition at line 81 of file cqasm-v1-parser.cpp.

◆ FROM

#define FROM (   t,
 
)
Value:
t = s; \
{ \
auto *loc = t->get_annotation_ptr<cqasm::annotations::SourceLocation>(); \
if (!loc) { \
ADD_SOURCE_LOCATION(t); \
} else { \
loc->expand_to_include(yyloc.first_line, yyloc.first_column); \
loc->expand_to_include(yyloc.last_line, yyloc.last_column); \
} \
}
Source location annotation object, containing source file line numbers etc.

Moves previously constructed node s into t, where s is almost always one of bison's input locations ($1, $2, etc) and t is almost always $$.

The purpose of this over just assigning t = s is that it extends the source location annotation of the object to the extents of whatever rule is being matched.

Definition at line 92 of file cqasm-v1-parser.cpp.

◆ YYSTYPE [1/2]

#define YYSTYPE   CQASM_V1STYPE

Definition at line 172 of file cqasm-v1-parser.cpp.

◆ YYLTYPE [1/2]

#define YYLTYPE   CQASM_V1LTYPE

Definition at line 173 of file cqasm-v1-parser.cpp.

◆ yyparse

#define yyparse   cqasm_v1parse

Definition at line 110 of file cqasm-v1-parser.cpp.

◆ yylex

#define yylex   cqasm_v1lex

Definition at line 111 of file cqasm-v1-parser.cpp.

◆ yyerror

#define yyerror   cqasm_v1error

Definition at line 112 of file cqasm-v1-parser.cpp.

◆ yydebug

#define yydebug   cqasm_v1debug

Definition at line 113 of file cqasm-v1-parser.cpp.

◆ yynerrs

#define yynerrs   cqasm_v1nerrs

Definition at line 114 of file cqasm-v1-parser.cpp.

◆ YY_NULL

#define YY_NULL   0

Definition at line 125 of file cqasm-v1-parser.cpp.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   1

Definition at line 134 of file cqasm-v1-parser.cpp.

◆ YY_CQASM_V1_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_LATEST_CBUILD_SRC_CQASM_CQASM_V1_PARSER_HPP_INCLUDED

#define YY_CQASM_V1_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_LATEST_CBUILD_SRC_CQASM_CQASM_V1_PARSER_HPP_INCLUDED

Definition at line 140 of file cqasm-v1-parser.cpp.

◆ CQASM_V1DEBUG

#define CQASM_V1DEBUG   0

Definition at line 150 of file cqasm-v1-parser.cpp.

◆ YYSTYPE [2/2]

#define YYSTYPE   CQASM_V1STYPE

Definition at line 172 of file cqasm-v1-parser.cpp.

◆ YYLTYPE [2/2]

#define YYLTYPE   CQASM_V1LTYPE

Definition at line 173 of file cqasm-v1-parser.cpp.

◆ CQASM_V1TOKENTYPE

#define CQASM_V1TOKENTYPE

Definition at line 180 of file cqasm-v1-parser.cpp.

◆ CQASM_V1STYPE_IS_TRIVIAL

#define CQASM_V1STYPE_IS_TRIVIAL   1

Definition at line 278 of file cqasm-v1-parser.cpp.

◆ CQASM_V1STYPE_IS_DECLARED

#define CQASM_V1STYPE_IS_DECLARED   1

Definition at line 279 of file cqasm-v1-parser.cpp.

◆ CQASM_V1LTYPE_IS_DECLARED

#define CQASM_V1LTYPE_IS_DECLARED   1

Definition at line 292 of file cqasm-v1-parser.cpp.

◆ CQASM_V1LTYPE_IS_TRIVIAL

#define CQASM_V1LTYPE_IS_TRIVIAL   1

Definition at line 293 of file cqasm-v1-parser.cpp.

◆ YYSIZE_T

#define YYSIZE_T   size_t

Definition at line 348 of file cqasm-v1-parser.cpp.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 354 of file cqasm-v1-parser.cpp.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 364 of file cqasm-v1-parser.cpp.

◆ __attribute__

#define __attribute__ (   Spec)    /* empty */

Definition at line 372 of file cqasm-v1-parser.cpp.

◆ YYUSE

#define YYUSE (   E)    ((void) (E))

Definition at line 378 of file cqasm-v1-parser.cpp.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 392 of file cqasm-v1-parser.cpp.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 395 of file cqasm-v1-parser.cpp.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 396 of file cqasm-v1-parser.cpp.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 442 of file cqasm-v1-parser.cpp.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 443 of file cqasm-v1-parser.cpp.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 445 of file cqasm-v1-parser.cpp.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 456 of file cqasm-v1-parser.cpp.

◆ YYFREE

#define YYFREE   free

Definition at line 462 of file cqasm-v1-parser.cpp.

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 485 of file cqasm-v1-parser.cpp.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
#define YYLTYPE
#define YYSTYPE
short int yytype_int16
#define YYSTACK_GAP_MAXIMUM

Definition at line 489 of file cqasm-v1-parser.cpp.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 493 of file cqasm-v1-parser.cpp.

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#define YYSTACK_GAP_MAXIMUM

Definition at line 500 of file cqasm-v1-parser.cpp.

◆ YYCOPY

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)

Definition at line 521 of file cqasm-v1-parser.cpp.

◆ YYFINAL

#define YYFINAL   9

Definition at line 534 of file cqasm-v1-parser.cpp.

◆ YYLAST

#define YYLAST   2125

Definition at line 536 of file cqasm-v1-parser.cpp.

◆ YYNTOKENS

#define YYNTOKENS   72

Definition at line 539 of file cqasm-v1-parser.cpp.

◆ YYNNTS

#define YYNNTS   55

Definition at line 541 of file cqasm-v1-parser.cpp.

◆ YYNRULES

#define YYNRULES   170

Definition at line 543 of file cqasm-v1-parser.cpp.

◆ YYNSTATES

#define YYNSTATES   328

Definition at line 545 of file cqasm-v1-parser.cpp.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 549 of file cqasm-v1-parser.cpp.

◆ YYMAXUTOK

#define YYMAXUTOK   302

Definition at line 550 of file cqasm-v1-parser.cpp.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 552 of file cqasm-v1-parser.cpp.

◆ YYPACT_NINF

#define YYPACT_NINF   -239

Definition at line 664 of file cqasm-v1-parser.cpp.

◆ yypact_value_is_default

#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-239)))

Definition at line 666 of file cqasm-v1-parser.cpp.

◆ YYTABLE_NINF

#define YYTABLE_NINF   -137

Definition at line 669 of file cqasm-v1-parser.cpp.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yytable_value)    0

Definition at line 671 of file cqasm-v1-parser.cpp.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1298 of file cqasm-v1-parser.cpp.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1299 of file cqasm-v1-parser.cpp.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 1300 of file cqasm-v1-parser.cpp.

◆ YYEOF

#define YYEOF   0

Definition at line 1301 of file cqasm-v1-parser.cpp.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1303 of file cqasm-v1-parser.cpp.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1304 of file cqasm-v1-parser.cpp.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1305 of file cqasm-v1-parser.cpp.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1308 of file cqasm-v1-parser.cpp.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (&yylloc, scanner, helper, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
#define YY_(Msgid)
#define YYEMPTY
if(!yyg->yy_init)
#define yylloc

Definition at line 1310 of file cqasm-v1-parser.cpp.

◆ YYTERROR

#define YYTERROR   1

Definition at line 1328 of file cqasm-v1-parser.cpp.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 1329 of file cqasm-v1-parser.cpp.

◆ YYLLOC_DEFAULT

#define YYLLOC_DEFAULT (   Current,
  Rhs,
 
)
Value:
if (N) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (0)
if(!yyg->yy_init)
#define YYRHSLOC(Rhs, K)

Definition at line 1337 of file cqasm-v1-parser.cpp.

◆ YYRHSLOC

#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K])

Definition at line 1356 of file cqasm-v1-parser.cpp.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 1526 of file cqasm-v1-parser.cpp.

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 1527 of file cqasm-v1-parser.cpp.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1528 of file cqasm-v1-parser.cpp.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1529 of file cqasm-v1-parser.cpp.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1535 of file cqasm-v1-parser.cpp.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1546 of file cqasm-v1-parser.cpp.

◆ YYCASE_

#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break

◆ YYPOPSTACK

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N), yylsp -= (N))

◆ YYSYNTAX_ERROR

#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)

Typedef Documentation

◆ yyscan_t

typedef void* yyscan_t

Definition at line 170 of file cqasm-v1-parser.cpp.

◆ CQASM_V1STYPE

Definition at line 233 of file cqasm-v1-parser.cpp.

◆ CQASM_V1LTYPE

typedef struct CQASM_V1LTYPE CQASM_V1LTYPE

Definition at line 284 of file cqasm-v1-parser.cpp.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 320 of file cqasm-v1-parser.cpp.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 326 of file cqasm-v1-parser.cpp.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 332 of file cqasm-v1-parser.cpp.

◆ yytype_int16

typedef short int yytype_int16

Definition at line 338 of file cqasm-v1-parser.cpp.

Enumeration Type Documentation

◆ cqasm_v1tokentype

Enumerator
NEWLINE 
VERSION 
QUBITS 
MAP 
VAR 
CDASH 
COND 
IF 
ELSE 
FOR 
FOREACH 
WHILE 
REPEAT 
UNTIL 
CONTINUE 
BREAK 
SET 
INT_LITERAL 
FLOAT_LITERAL 
BAD_NUMBER 
STRING_OPEN 
STRING_CLOSE 
JSON_OPEN 
JSON_CLOSE 
STRBUILD_APPEND 
STRBUILD_ESCAPE 
IDENTIFIER 
POWER 
INT_DIV 
LOGIC_OR 
LOGIC_AND 
LOGIC_XOR 
CMP_GE 
CMP_LE 
CMP_EQ 
CMP_NE 
SHL 
ARITH_SHR 
LOGIC_SHR 
ELLIPSIS 
BAD_CHARACTER 
END_OF_FILE 
UMINUS 
UCOMP 
UNOT 
NEWLINE 
VERSION 
QUBITS 
MAP 
VAR 
CDASH 
COND 
IF 
ELSE 
FOR 
FOREACH 
WHILE 
REPEAT 
UNTIL 
CONTINUE 
BREAK 
SET 
INT_LITERAL 
FLOAT_LITERAL 
BAD_NUMBER 
STRING_OPEN 
STRING_CLOSE 
JSON_OPEN 
JSON_CLOSE 
STRBUILD_APPEND 
STRBUILD_ESCAPE 
IDENTIFIER 
POWER 
INT_DIV 
LOGIC_OR 
LOGIC_AND 
LOGIC_XOR 
CMP_GE 
CMP_LE 
CMP_EQ 
CMP_NE 
SHL 
ARITH_SHR 
LOGIC_SHR 
ELLIPSIS 
BAD_CHARACTER 
END_OF_FILE 
UMINUS 
UCOMP 
UNOT 

Definition at line 181 of file cqasm-v1-parser.cpp.

Function Documentation

◆ cqasm_v1parse()

int cqasm_v1parse ( yyscan_t  scanner,
cqasm::v1::parser::ParseHelper helper 
)

◆ yylex()

int yylex ( YYSTYPE yylvalp,
YYLTYPE yyllocp,
yyscan_t  scanner 
)

◆ yyerror()

void yyerror ( YYLTYPE yyllocp,
yyscan_t  scanner,
cqasm::v1::parser::ParseHelper helper,
const char *  msg 
)

Definition at line 3360 of file cqasm-v1-parser.cpp.

◆ malloc()

void* malloc ( YYSIZE_T  )

◆ free()

void free ( void *  )

◆ yyparse()

int yyparse ( yyscan_t  scanner,
cqasm::v1::parser::ParseHelper helper 
)

Definition at line 1800 of file cqasm-v1-parser.cpp.