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

Parser, generated by Bison. More...

Go to the source code of this file.

Classes

union  CQASM_VERSIONSTYPE
 
struct  CQASM_VERSIONLTYPE
 
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 YYSTYPE   CQASM_VERSIONSTYPE
 
#define YYLTYPE   CQASM_VERSIONLTYPE
 
#define yyparse   cqasm_versionparse
 
#define yylex   cqasm_versionlex
 
#define yyerror   cqasm_versionerror
 
#define yydebug   cqasm_versiondebug
 
#define yynerrs   cqasm_versionnerrs
 
#define YY_NULL   0
 
#define YYERROR_VERBOSE   0
 
#define YY_CQASM_VERSION_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_LATEST_CBUILD_SRC_CQASM_CQASM_VERSION_PARSER_HPP_INCLUDED
 
#define CQASM_VERSIONDEBUG   0
 
#define YYSTYPE   CQASM_VERSIONSTYPE
 
#define YYLTYPE   CQASM_VERSIONLTYPE
 
#define CQASM_VERSIONTOKENTYPE
 
#define CQASM_VERSIONSTYPE_IS_TRIVIAL   1
 
#define CQASM_VERSIONSTYPE_IS_DECLARED   1
 
#define CQASM_VERSIONLTYPE_IS_DECLARED   1
 
#define CQASM_VERSIONLTYPE_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   5
 
#define YYLAST   4
 
#define YYNTOKENS   8
 
#define YYNNTS   3
 
#define YYNRULES   4
 
#define YYNSTATES   8
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   261
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -5
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-5)))
 
#define YYTABLE_NINF   -1
 
#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 YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 

Typedefs

typedef void * yyscan_t
 
typedef union CQASM_VERSIONSTYPE CQASM_VERSIONSTYPE
 
typedef struct CQASM_VERSIONLTYPE CQASM_VERSIONLTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  cqasm_versiontokentype {
  VERSION = 258, INT_LITERAL = 259, UNKNOWN = 260, END_OF_FILE = 261,
  VERSION = 258, INT_LITERAL = 259, UNKNOWN = 260, END_OF_FILE = 261
}
 

Functions

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

Detailed Description

Parser, generated by Bison.

Definition in file cqasm-version-parser.cpp.

#include <memory>
#include <cstdio>
#include <cstdint>
#include "cqasm-error.hpp"
#include "cqasm-version.hpp"
#include <stddef.h>
Include dependency graph for cqasm-version-parser.cpp:

Macro Definition Documentation

◆ YYBISON

#define YYBISON   1

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

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.0"

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

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

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

◆ YYPURE

#define YYPURE   2

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

◆ YYPUSH

#define YYPUSH   0

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

◆ YYPULL

#define YYPULL   1

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

◆ YYSTYPE [1/2]

#define YYSTYPE   CQASM_VERSIONSTYPE

Definition at line 126 of file cqasm-version-parser.cpp.

◆ YYLTYPE [1/2]

#define YYLTYPE   CQASM_VERSIONLTYPE

Definition at line 127 of file cqasm-version-parser.cpp.

◆ yyparse

#define yyparse   cqasm_versionparse

Definition at line 65 of file cqasm-version-parser.cpp.

◆ yylex

#define yylex   cqasm_versionlex

Definition at line 66 of file cqasm-version-parser.cpp.

◆ yyerror

#define yyerror   cqasm_versionerror

Definition at line 67 of file cqasm-version-parser.cpp.

◆ yydebug

#define yydebug   cqasm_versiondebug

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

◆ yynerrs

#define yynerrs   cqasm_versionnerrs

Definition at line 69 of file cqasm-version-parser.cpp.

◆ YY_NULL

#define YY_NULL   0

Definition at line 80 of file cqasm-version-parser.cpp.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 89 of file cqasm-version-parser.cpp.

◆ YY_CQASM_VERSION_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_LATEST_CBUILD_SRC_CQASM_CQASM_VERSION_PARSER_HPP_INCLUDED

#define YY_CQASM_VERSION_HOME_DOCS_CHECKOUTS_READTHEDOCS_ORG_USER_BUILDS_LIBQASM_CHECKOUTS_LATEST_CBUILD_SRC_CQASM_CQASM_VERSION_PARSER_HPP_INCLUDED

Definition at line 95 of file cqasm-version-parser.cpp.

◆ CQASM_VERSIONDEBUG

#define CQASM_VERSIONDEBUG   0

Definition at line 105 of file cqasm-version-parser.cpp.

◆ YYSTYPE [2/2]

#define YYSTYPE   CQASM_VERSIONSTYPE

Definition at line 126 of file cqasm-version-parser.cpp.

◆ YYLTYPE [2/2]

#define YYLTYPE   CQASM_VERSIONLTYPE

Definition at line 127 of file cqasm-version-parser.cpp.

◆ CQASM_VERSIONTOKENTYPE

#define CQASM_VERSIONTOKENTYPE

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

◆ CQASM_VERSIONSTYPE_IS_TRIVIAL

#define CQASM_VERSIONSTYPE_IS_TRIVIAL   1

Definition at line 156 of file cqasm-version-parser.cpp.

◆ CQASM_VERSIONSTYPE_IS_DECLARED

#define CQASM_VERSIONSTYPE_IS_DECLARED   1

Definition at line 157 of file cqasm-version-parser.cpp.

◆ CQASM_VERSIONLTYPE_IS_DECLARED

#define CQASM_VERSIONLTYPE_IS_DECLARED   1

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

◆ CQASM_VERSIONLTYPE_IS_TRIVIAL

#define CQASM_VERSIONLTYPE_IS_TRIVIAL   1

Definition at line 171 of file cqasm-version-parser.cpp.

◆ YYSIZE_T

#define YYSIZE_T   size_t

Definition at line 226 of file cqasm-version-parser.cpp.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 232 of file cqasm-version-parser.cpp.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 242 of file cqasm-version-parser.cpp.

◆ __attribute__

#define __attribute__ (   Spec)    /* empty */

Definition at line 250 of file cqasm-version-parser.cpp.

◆ YYUSE

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

Definition at line 256 of file cqasm-version-parser.cpp.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 270 of file cqasm-version-parser.cpp.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 273 of file cqasm-version-parser.cpp.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 274 of file cqasm-version-parser.cpp.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

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

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 321 of file cqasm-version-parser.cpp.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 323 of file cqasm-version-parser.cpp.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 334 of file cqasm-version-parser.cpp.

◆ YYFREE

#define YYFREE   free

Definition at line 340 of file cqasm-version-parser.cpp.

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 363 of file cqasm-version-parser.cpp.

◆ YYSTACK_BYTES

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

Definition at line 367 of file cqasm-version-parser.cpp.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 371 of file cqasm-version-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 378 of file cqasm-version-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 399 of file cqasm-version-parser.cpp.

◆ YYFINAL

#define YYFINAL   5

Definition at line 412 of file cqasm-version-parser.cpp.

◆ YYLAST

#define YYLAST   4

Definition at line 414 of file cqasm-version-parser.cpp.

◆ YYNTOKENS

#define YYNTOKENS   8

Definition at line 417 of file cqasm-version-parser.cpp.

◆ YYNNTS

#define YYNNTS   3

Definition at line 419 of file cqasm-version-parser.cpp.

◆ YYNRULES

#define YYNRULES   4

Definition at line 421 of file cqasm-version-parser.cpp.

◆ YYNSTATES

#define YYNSTATES   8

Definition at line 423 of file cqasm-version-parser.cpp.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 427 of file cqasm-version-parser.cpp.

◆ YYMAXUTOK

#define YYMAXUTOK   261

Definition at line 428 of file cqasm-version-parser.cpp.

◆ YYTRANSLATE

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

Definition at line 430 of file cqasm-version-parser.cpp.

◆ YYPACT_NINF

#define YYPACT_NINF   -5

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

◆ yypact_value_is_default

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

Definition at line 495 of file cqasm-version-parser.cpp.

◆ YYTABLE_NINF

#define YYTABLE_NINF   -1

Definition at line 498 of file cqasm-version-parser.cpp.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yytable_value)    0

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

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 563 of file cqasm-version-parser.cpp.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 564 of file cqasm-version-parser.cpp.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 565 of file cqasm-version-parser.cpp.

◆ YYEOF

#define YYEOF   0

Definition at line 566 of file cqasm-version-parser.cpp.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 568 of file cqasm-version-parser.cpp.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 569 of file cqasm-version-parser.cpp.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 570 of file cqasm-version-parser.cpp.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 573 of file cqasm-version-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 YYEMPTY
#define YY_(Msgid)
if(!yyg->yy_init)
#define yylloc

Definition at line 575 of file cqasm-version-parser.cpp.

◆ YYTERROR

#define YYTERROR   1

Definition at line 593 of file cqasm-version-parser.cpp.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 594 of file cqasm-version-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 602 of file cqasm-version-parser.cpp.

◆ YYRHSLOC

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

Definition at line 621 of file cqasm-version-parser.cpp.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 791 of file cqasm-version-parser.cpp.

◆ YY_SYMBOL_PRINT

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

Definition at line 792 of file cqasm-version-parser.cpp.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 793 of file cqasm-version-parser.cpp.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 794 of file cqasm-version-parser.cpp.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 800 of file cqasm-version-parser.cpp.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 811 of file cqasm-version-parser.cpp.

◆ YYPOPSTACK

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

Typedef Documentation

◆ yyscan_t

typedef void* yyscan_t

Definition at line 124 of file cqasm-version-parser.cpp.

◆ CQASM_VERSIONSTYPE

Definition at line 146 of file cqasm-version-parser.cpp.

◆ CQASM_VERSIONLTYPE

Definition at line 162 of file cqasm-version-parser.cpp.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 198 of file cqasm-version-parser.cpp.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 204 of file cqasm-version-parser.cpp.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 210 of file cqasm-version-parser.cpp.

◆ yytype_int16

typedef short int yytype_int16

Definition at line 216 of file cqasm-version-parser.cpp.

Enumeration Type Documentation

◆ cqasm_versiontokentype

Enumerator
VERSION 
INT_LITERAL 
UNKNOWN 
END_OF_FILE 
VERSION 
INT_LITERAL 
UNKNOWN 
END_OF_FILE 

Definition at line 135 of file cqasm-version-parser.cpp.

Function Documentation

◆ cqasm_versionparse()

int cqasm_versionparse ( yyscan_t  scanner,
cqasm::version::ParseHelper helper 
)

◆ yylex()

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

◆ yyerror()

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

Definition at line 1595 of file cqasm-version-parser.cpp.

◆ malloc()

void* malloc ( YYSIZE_T  )

◆ free()

void free ( void *  )

◆ yyparse()

int yyparse ( yyscan_t  scanner,
cqasm::version::ParseHelper helper 
)

Definition at line 1065 of file cqasm-version-parser.cpp.