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

Lexer/tokenizer, generated by Flex. More...

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 
struct  yyguts_t
 

Macros

#define YY_INT_ALIGNED   short int
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   6
 
#define YY_FLEX_SUBMINOR_VERSION   1
 
#define FLEX_BETA
 
#define FLEXINT_H
 
#define INT8_MIN   (-128)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define yyconst   const
 
#define yynoreturn
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define YY_TYPEDEF_YY_SCANNER_T
 
#define yyin   yyg->yyin_r
 
#define yyout   yyg->yyout_r
 
#define yyextra   yyg->yyextra_r
 
#define yyleng   yyg->yyleng_r
 
#define yytext   yyg->yytext_r
 
#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
 
#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
 
#define yy_flex_debug   yyg->yy_flex_debug_r
 
#define BEGIN   yyg->yy_start = 1 + 2 *
 
#define YY_START   ((yyg->yy_start - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   cqasm_versionrestart(yyin ,yyscanner )
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define YY_LINENO_REWIND_TO(dst)
 
#define yyless(n)
 
#define unput(c)   yyunput( c, yyg->yytext_ptr , yyscanner )
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
 
#define YY_FLUSH_BUFFER   cqasm_version_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
 
#define yy_new_buffer   cqasm_version_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define cqasm_versionwrap(yyscanner)   (/*CONSTCOND*/1)
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   yytext_r
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   19
 
#define YY_END_OF_BUFFER   20
 
#define REJECT   reject_used_but_not_detected
 
#define yymore()   yymore_used_but_not_detected
 
#define YY_MORE_ADJ   0
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_NO_INPUT   1
 
#define DEBUG(...)
 
#define YY_USER_ACTION   yylloc->last_column += yyleng;
 
#define LOCATION_RESET
 
#define LOCATION_LINE   yylloc->last_column = 1; yylloc->last_line += 1;
 
#define LOCATION_STEP
 
#define WITH_STR(TOKNAME)
 
#define WITHOUT_STR(TOKNAME)
 
#define OPERATOR
 
#define DELETE   LOCATION_STEP
 
#define INITIAL   0
 
#define MODE_MULTILINE_COMMENT   1
 
#define MODE_VERSION   2
 
#define MODE_IGNORE_THE_REST   3
 
#define YY_EXTRA_TYPE   void *
 
#define yylval   yyg->yylval_r
 
#define yylloc   yyg->yylloc_r
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
 
#define YY_INPUT(buf, result, max_size)
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg , yyscanner)
 
#define YY_DECL_IS_OURS   1
 
#define YY_DECL
 
#define YY_BREAK   /*LINTED*/break;
 
#define YY_RULE_SETUP   YY_USER_ACTION
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 
#define YYTABLES_NAME   "yytables"
 

Typedefs

typedef signed char flex_int8_t
 
typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef unsigned char flex_uint8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef void * yyscan_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Functions

void cqasm_versionrestart (FILE *input_file, yyscan_t yyscanner)
 Immediately switch to a different input stream. More...
 
void cqasm_version_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
 Switch to a different input buffer. More...
 
YY_BUFFER_STATE cqasm_version_create_buffer (FILE *file, int size, yyscan_t yyscanner)
 Allocate and initialize an input buffer state. More...
 
void cqasm_version_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
 Destroy the buffer. More...
 
void cqasm_version_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
 Discard all buffered characters. More...
 
void cqasm_versionpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
 Pushes the new state onto the stack. More...
 
void cqasm_versionpop_buffer_state (yyscan_t yyscanner)
 Removes and deletes the top of the stack, if present. More...
 
YY_BUFFER_STATE cqasm_version_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
 Setup the input buffer state to scan directly from a user-specified character buffer. More...
 
YY_BUFFER_STATE cqasm_version_scan_string (yyconst char *yystr, yyscan_t yyscanner)
 Setup the input buffer state to scan a string. More...
 
YY_BUFFER_STATE cqasm_version_scan_bytes (yyconst char *yybytes, int _yybytes_len, yyscan_t yyscanner)
 Setup the input buffer state to scan the given bytes. More...
 
void * cqasm_versionalloc (yy_size_t, yyscan_t yyscanner)
 
void * cqasm_versionrealloc (void *, yy_size_t, yyscan_t yyscanner)
 
void cqasm_versionfree (void *, yyscan_t yyscanner)
 
int cqasm_versionlex_init (yyscan_t *scanner)
 
int cqasm_versionlex_init_extra (YY_EXTRA_TYPE user_defined, yyscan_t *scanner)
 
int cqasm_versionlex_destroy (yyscan_t yyscanner)
 
int cqasm_versionget_debug (yyscan_t yyscanner)
 
void cqasm_versionset_debug (int debug_flag, yyscan_t yyscanner)
 
YY_EXTRA_TYPE cqasm_versionget_extra (yyscan_t yyscanner)
 Get the user-defined data for this scanner. More...
 
void cqasm_versionset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
 Set the user-defined data. More...
 
FILE * cqasm_versionget_in (yyscan_t yyscanner)
 Get the input stream. More...
 
void cqasm_versionset_in (FILE *_in_str, yyscan_t yyscanner)
 Set the input stream. More...
 
FILE * cqasm_versionget_out (yyscan_t yyscanner)
 Get the output stream. More...
 
void cqasm_versionset_out (FILE *_out_str, yyscan_t yyscanner)
 
int cqasm_versionget_leng (yyscan_t yyscanner)
 Get the length of the current token. More...
 
char * cqasm_versionget_text (yyscan_t yyscanner)
 Get the current token. More...
 
int cqasm_versionget_lineno (yyscan_t yyscanner)
 Get the current line number. More...
 
void cqasm_versionset_lineno (int _line_number, yyscan_t yyscanner)
 Set the current line number. More...
 
int cqasm_versionget_column (yyscan_t yyscanner)
 Get the current column number. More...
 
void cqasm_versionset_column (int _column_no, yyscan_t yyscanner)
 Set the current column. More...
 
YYSTYPEcqasm_versionget_lval (yyscan_t yyscanner)
 
void cqasm_versionset_lval (YYSTYPE *yylval_param, yyscan_t yyscanner)
 
YYLTYPEcqasm_versionget_lloc (yyscan_t yyscanner)
 
void cqasm_versionset_lloc (YYLTYPE *yylloc_param, yyscan_t yyscanner)
 
int cqasm_versionlex (YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner)
 
 if (!yyg->yy_init)
 
 while (1)
 

Variables

 YY_DECL
 The main scanner function which does all the work. More...
 
char * yy_cp
 
char * yy_bp
 
int yy_act
 
struct yyguts_tyyg = (struct yyguts_t*)yyscanner
 
 yylval = yylval_param
 
 yylloc = yylloc_param
 

Detailed Description

Lexer/tokenizer, generated by Flex.

Definition in file cqasm-version-lexer.cpp.

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "cqasm-version-parser.hpp"
#include <unistd.h>
Include dependency graph for cqasm-version-lexer.cpp:

Macro Definition Documentation

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

Definition at line 5 of file cqasm-version-lexer.cpp.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 9 of file cqasm-version-lexer.cpp.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 10 of file cqasm-version-lexer.cpp.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   6

Definition at line 11 of file cqasm-version-lexer.cpp.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   1

Definition at line 12 of file cqasm-version-lexer.cpp.

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 14 of file cqasm-version-lexer.cpp.

◆ FLEXINT_H

#define FLEXINT_H

Definition at line 30 of file cqasm-version-lexer.cpp.

◆ INT8_MIN

#define INT8_MIN   (-128)

Definition at line 60 of file cqasm-version-lexer.cpp.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 63 of file cqasm-version-lexer.cpp.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

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

◆ INT8_MAX

#define INT8_MAX   (127)

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

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 72 of file cqasm-version-lexer.cpp.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 75 of file cqasm-version-lexer.cpp.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 78 of file cqasm-version-lexer.cpp.

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 81 of file cqasm-version-lexer.cpp.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 84 of file cqasm-version-lexer.cpp.

◆ yyconst

#define yyconst   const

Definition at line 92 of file cqasm-version-lexer.cpp.

◆ yynoreturn

#define yynoreturn

Definition at line 97 of file cqasm-version-lexer.cpp.

◆ YY_NULL

#define YY_NULL   0

Definition at line 101 of file cqasm-version-lexer.cpp.

◆ YY_SC_TO_UI

#define YY_SC_TO_UI (   c)    ((unsigned int) (unsigned char) c)

Definition at line 108 of file cqasm-version-lexer.cpp.

◆ YY_TYPEDEF_YY_SCANNER_T

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 112 of file cqasm-version-lexer.cpp.

◆ yyin

#define yyin   yyg->yyin_r

Definition at line 118 of file cqasm-version-lexer.cpp.

◆ yyout

#define yyout   yyg->yyout_r

Definition at line 119 of file cqasm-version-lexer.cpp.

◆ yyextra

#define yyextra   yyg->yyextra_r

Definition at line 120 of file cqasm-version-lexer.cpp.

◆ yyleng

#define yyleng   yyg->yyleng_r

Definition at line 121 of file cqasm-version-lexer.cpp.

◆ yytext

#define yytext   yyg->yytext_r

Definition at line 122 of file cqasm-version-lexer.cpp.

◆ yylineno

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 123 of file cqasm-version-lexer.cpp.

◆ yycolumn

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

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

◆ yy_flex_debug

#define yy_flex_debug   yyg->yy_flex_debug_r

Definition at line 125 of file cqasm-version-lexer.cpp.

◆ BEGIN

#define BEGIN   yyg->yy_start = 1 + 2 *

Definition at line 131 of file cqasm-version-lexer.cpp.

◆ YY_START

#define YY_START   ((yyg->yy_start - 1) / 2)

Definition at line 137 of file cqasm-version-lexer.cpp.

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 138 of file cqasm-version-lexer.cpp.

◆ YY_STATE_EOF

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 141 of file cqasm-version-lexer.cpp.

◆ YY_NEW_FILE

#define YY_NEW_FILE   cqasm_versionrestart(yyin ,yyscanner )

Definition at line 144 of file cqasm-version-lexer.cpp.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

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

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

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

◆ YY_STATE_BUF_SIZE

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 163 of file cqasm-version-lexer.cpp.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 166 of file cqasm-version-lexer.cpp.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

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

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 175 of file cqasm-version-lexer.cpp.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 176 of file cqasm-version-lexer.cpp.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 177 of file cqasm-version-lexer.cpp.

◆ YY_LESS_LINENO

#define YY_LESS_LINENO (   n)
Value:
do { \
int yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
}while(0)
#define yylineno
#define yytext
#define yyleng

Definition at line 186 of file cqasm-version-lexer.cpp.

◆ YY_LINENO_REWIND_TO

#define YY_LINENO_REWIND_TO (   dst)
Value:
do {\
const char *p;\
for ( p = yy_cp-1; p >= (dst); --p)\
if ( *p == '\n' )\
}while(0)
#define yylineno
char * yy_cp

Definition at line 193 of file cqasm-version-lexer.cpp.

◆ yyless [1/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
YY_RESTORE_YY_MORE_OFFSET \
yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
struct yyguts_t * yyg
#define YY_MORE_ADJ
char * yy_cp
char * yy_bp

Definition at line 1792 of file cqasm-version-lexer.cpp.

◆ unput

#define unput (   c)    yyunput( c, yyg->yytext_ptr , yyscanner )

Definition at line 215 of file cqasm-version-lexer.cpp.

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 218 of file cqasm-version-lexer.cpp.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 265 of file cqasm-version-lexer.cpp.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 266 of file cqasm-version-lexer.cpp.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 277 of file cqasm-version-lexer.cpp.

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER
Value:
: NULL)
size_t yy_buffer_stack_top
index of top of stack.
struct yyguts_t * yyg
YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.

Definition at line 288 of file cqasm-version-lexer.cpp.

◆ YY_CURRENT_BUFFER_LVALUE

#define YY_CURRENT_BUFFER_LVALUE   yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

Definition at line 295 of file cqasm-version-lexer.cpp.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   cqasm_version_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

Definition at line 309 of file cqasm-version-lexer.cpp.

◆ yy_new_buffer

#define yy_new_buffer   cqasm_version_create_buffer

Definition at line 319 of file cqasm-version-lexer.cpp.

◆ yy_set_interactive

#define yy_set_interactive (   is_interactive)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){ \
cqasm_versionensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
cqasm_version_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yyin
#define YY_CURRENT_BUFFER
#define YY_BUF_SIZE

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

◆ yy_set_bol

#define yy_set_bol (   at_bol)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){\
cqasm_versionensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
cqasm_version_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define yyin
#define YY_CURRENT_BUFFER
#define YY_BUF_SIZE

Definition at line 331 of file cqasm-version-lexer.cpp.

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 341 of file cqasm-version-lexer.cpp.

◆ cqasm_versionwrap

#define cqasm_versionwrap (   yyscanner)    (/*CONSTCOND*/1)

Definition at line 343 of file cqasm-version-lexer.cpp.

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

Definition at line 344 of file cqasm-version-lexer.cpp.

◆ yytext_ptr

#define yytext_ptr   yytext_r

Definition at line 350 of file cqasm-version-lexer.cpp.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION
Value:
yyg->yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
struct yyguts_t * yyg
char * yy_cp
char * yy_bp

Definition at line 360 of file cqasm-version-lexer.cpp.

◆ YY_NUM_RULES

#define YY_NUM_RULES   19

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

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   20

Definition at line 368 of file cqasm-version-lexer.cpp.

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 486 of file cqasm-version-lexer.cpp.

◆ yymore

#define yymore ( )    yymore_used_but_not_detected

Definition at line 487 of file cqasm-version-lexer.cpp.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

Definition at line 488 of file cqasm-version-lexer.cpp.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 489 of file cqasm-version-lexer.cpp.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1

Definition at line 491 of file cqasm-version-lexer.cpp.

◆ DEBUG

#define DEBUG (   ...)

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

◆ YY_USER_ACTION

#define YY_USER_ACTION   yylloc->last_column += yyleng;

Definition at line 502 of file cqasm-version-lexer.cpp.

◆ LOCATION_RESET

#define LOCATION_RESET
Value:
yylloc->first_column = 1; yylloc->first_line = 1; \
yylloc->last_column = 1; yylloc->last_line = 1;
#define yylloc

Definition at line 503 of file cqasm-version-lexer.cpp.

◆ LOCATION_LINE

#define LOCATION_LINE   yylloc->last_column = 1; yylloc->last_line += 1;

Definition at line 506 of file cqasm-version-lexer.cpp.

◆ LOCATION_STEP

#define LOCATION_STEP
Value:
yylloc->first_column = yylloc->last_column; \
yylloc->first_line = yylloc->last_line;
#define yylloc

Definition at line 508 of file cqasm-version-lexer.cpp.

◆ WITH_STR

#define WITH_STR (   TOKNAME)
Value:
DEBUG("Pushing %s token (%s) starting at %d:%d\n", #TOKNAME, yytext, yylloc->first_line, yylloc->first_column); \
yylval->str = strdup(yytext); return TOKNAME
#define yylloc
#define DEBUG(...)
#define yytext

Definition at line 511 of file cqasm-version-lexer.cpp.

◆ WITHOUT_STR

#define WITHOUT_STR (   TOKNAME)
Value:
DEBUG("Pushing %s token starting at %d:%d\n", #TOKNAME, yylloc->first_line, yylloc->first_column); \
return TOKNAME
#define yylloc
#define DEBUG(...)

Definition at line 514 of file cqasm-version-lexer.cpp.

◆ OPERATOR

#define OPERATOR
Value:
DEBUG("Pushing '%c' token starting at %d:%d\n", yytext[0], yylloc->first_line, yylloc->first_column); \
return yytext[0]
#define yylloc
#define DEBUG(...)
#define yytext

Definition at line 517 of file cqasm-version-lexer.cpp.

◆ DELETE

#define DELETE   LOCATION_STEP

Definition at line 520 of file cqasm-version-lexer.cpp.

◆ INITIAL

#define INITIAL   0

Definition at line 527 of file cqasm-version-lexer.cpp.

◆ MODE_MULTILINE_COMMENT

#define MODE_MULTILINE_COMMENT   1

Definition at line 528 of file cqasm-version-lexer.cpp.

◆ MODE_VERSION

#define MODE_VERSION   2

Definition at line 529 of file cqasm-version-lexer.cpp.

◆ MODE_IGNORE_THE_REST

#define MODE_IGNORE_THE_REST   3

Definition at line 530 of file cqasm-version-lexer.cpp.

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Definition at line 541 of file cqasm-version-lexer.cpp.

◆ yylval

#define yylval   yyg->yylval_r

Definition at line 586 of file cqasm-version-lexer.cpp.

◆ yylloc

#define yylloc   yyg->yylloc_r

Definition at line 588 of file cqasm-version-lexer.cpp.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 675 of file cqasm-version-lexer.cpp.

◆ ECHO

#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)

Definition at line 684 of file cqasm-version-lexer.cpp.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}\
\
#define yyin
#define YY_CURRENT_BUFFER_LVALUE

Definition at line 691 of file cqasm-version-lexer.cpp.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 728 of file cqasm-version-lexer.cpp.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 733 of file cqasm-version-lexer.cpp.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg , yyscanner)

Definition at line 738 of file cqasm-version-lexer.cpp.

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

Definition at line 747 of file cqasm-version-lexer.cpp.

◆ YY_DECL

#define YY_DECL
Value:
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#define YYLTYPE
void * yyscan_t
#define YYSTYPE
int cqasm_versionlex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner)

Definition at line 752 of file cqasm-version-lexer.cpp.

◆ YY_BREAK

#define YY_BREAK   /*LINTED*/break;

Definition at line 765 of file cqasm-version-lexer.cpp.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 768 of file cqasm-version-lexer.cpp.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

Definition at line 1778 of file cqasm-version-lexer.cpp.

◆ yyless [2/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = yyg->yy_hold_char; \
yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
yyg->yy_hold_char = *yyg->yy_c_buf_p; \
*yyg->yy_c_buf_p = '\0'; \
yyleng = yyless_macro_arg; \
} \
while ( 0 )
struct yyguts_t * yyg
char * yy_c_buf_p
#define yytext
#define yyleng

Definition at line 1792 of file cqasm-version-lexer.cpp.

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

Definition at line 2159 of file cqasm-version-lexer.cpp.

Typedef Documentation

◆ flex_int8_t

typedef signed char flex_int8_t

Definition at line 51 of file cqasm-version-lexer.cpp.

◆ flex_int16_t

typedef short int flex_int16_t

Definition at line 52 of file cqasm-version-lexer.cpp.

◆ flex_int32_t

typedef int flex_int32_t

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

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

Definition at line 54 of file cqasm-version-lexer.cpp.

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

Definition at line 55 of file cqasm-version-lexer.cpp.

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

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

◆ yyscan_t

typedef void* yyscan_t

Definition at line 113 of file cqasm-version-lexer.cpp.

◆ YY_BUFFER_STATE

Definition at line 167 of file cqasm-version-lexer.cpp.

◆ yy_size_t

typedef size_t yy_size_t

Definition at line 172 of file cqasm-version-lexer.cpp.

◆ YY_CHAR

typedef unsigned char YY_CHAR

Definition at line 346 of file cqasm-version-lexer.cpp.

◆ yy_state_type

typedef int yy_state_type

Definition at line 348 of file cqasm-version-lexer.cpp.

Function Documentation

◆ cqasm_versionrestart()

void cqasm_versionrestart ( FILE *  input_file,
yyscan_t  yyscanner 
)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
yyscannerThe scanner object.
Note
This function does not reset the start condition to INITIAL .

Definition at line 1424 of file cqasm-version-lexer.cpp.

◆ cqasm_version_switch_to_buffer()

void cqasm_version_switch_to_buffer ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.
yyscannerThe scanner object.

Definition at line 1442 of file cqasm-version-lexer.cpp.

◆ cqasm_version_create_buffer()

YY_BUFFER_STATE cqasm_version_create_buffer ( FILE *  file,
int  size,
yyscan_t  yyscanner 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
yyscannerThe scanner object.
Returns
the allocated buffer state.

Definition at line 1489 of file cqasm-version-lexer.cpp.

◆ cqasm_version_delete_buffer()

void cqasm_version_delete_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)

Destroy the buffer.

Parameters
ba buffer created with cqasm_version_create_buffer()
yyscannerThe scanner object.

Definition at line 1517 of file cqasm-version-lexer.cpp.

◆ cqasm_version_flush_buffer()

void cqasm_version_flush_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)

Discard all buffered characters.

On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.
yyscannerThe scanner object.

Definition at line 1566 of file cqasm-version-lexer.cpp.

◆ cqasm_versionpush_buffer_state()

void cqasm_versionpush_buffer_state ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)

Pushes the new state onto the stack.

The new state becomes the current state. This function will allocate the stack if necessary.

Parameters
new_bufferThe new state.
yyscannerThe scanner object.

Definition at line 1596 of file cqasm-version-lexer.cpp.

◆ cqasm_versionpop_buffer_state()

void cqasm_versionpop_buffer_state ( yyscan_t  yyscanner)

Removes and deletes the top of the stack, if present.

The next element becomes the new top.

Parameters
yyscannerThe scanner object.

Definition at line 1627 of file cqasm-version-lexer.cpp.

◆ cqasm_version_scan_buffer()

YY_BUFFER_STATE cqasm_version_scan_buffer ( char *  base,
yy_size_t  size,
yyscan_t  yyscanner 
)

Setup the input buffer state to scan directly from a user-specified character buffer.

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 1697 of file cqasm-version-lexer.cpp.

◆ cqasm_version_scan_string()

YY_BUFFER_STATE cqasm_version_scan_string ( yyconst char *  yystr,
yyscan_t  yyscanner 
)

Setup the input buffer state to scan a string.

The next call to cqasm_versionlex() will scan from a copy of str.

Parameters
yystra NUL-terminated string to scan
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use cqasm_version_scan_bytes() instead.

Definition at line 1734 of file cqasm-version-lexer.cpp.

◆ cqasm_version_scan_bytes()

YY_BUFFER_STATE cqasm_version_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len,
yyscan_t  yyscanner 
)

Setup the input buffer state to scan the given bytes.

The next call to cqasm_versionlex() will scan from a copy of bytes.

Parameters
yybytesthe byte buffer to scan
_yybytes_lenthe number of bytes in the buffer pointed to by bytes.
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 1747 of file cqasm-version-lexer.cpp.

◆ cqasm_versionalloc()

void * cqasm_versionalloc ( yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 2130 of file cqasm-version-lexer.cpp.

◆ cqasm_versionrealloc()

void * cqasm_versionrealloc ( void *  ptr,
yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 2137 of file cqasm-version-lexer.cpp.

◆ cqasm_versionfree()

void cqasm_versionfree ( void *  ptr,
yyscan_t  yyscanner 
)

Definition at line 2152 of file cqasm-version-lexer.cpp.

◆ cqasm_versionlex_init()

int cqasm_versionlex_init ( yyscan_t scanner)

Definition at line 1983 of file cqasm-version-lexer.cpp.

◆ cqasm_versionlex_init_extra()

int cqasm_versionlex_init_extra ( YY_EXTRA_TYPE  user_defined,
yyscan_t scanner 
)

Definition at line 2012 of file cqasm-version-lexer.cpp.

◆ cqasm_versionlex_destroy()

int cqasm_versionlex_destroy ( yyscan_t  yyscanner)

Definition at line 2074 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_debug()

int cqasm_versionget_debug ( yyscan_t  yyscanner)

Definition at line 1938 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_debug()

void cqasm_versionset_debug ( int  debug_flag,
yyscan_t  yyscanner 
)

Definition at line 1944 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_extra()

YY_EXTRA_TYPE cqasm_versionget_extra ( yyscan_t  yyscanner)

Get the user-defined data for this scanner.

Parameters
yyscannerThe scanner object.

Definition at line 1811 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_extra()

void cqasm_versionset_extra ( YY_EXTRA_TYPE  user_defined,
yyscan_t  yyscanner 
)

Set the user-defined data.

This data is never touched by the scanner.

Parameters
user_definedThe data to be associated with this scanner.
yyscannerThe scanner object.

Definition at line 1884 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_in()

FILE * cqasm_versionget_in ( yyscan_t  yyscanner)

Get the input stream.

Parameters
yyscannerThe scanner object.

Definition at line 1846 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_in()

void cqasm_versionset_in ( FILE *  _in_str,
yyscan_t  yyscanner 
)

Set the input stream.

This does not discard the current input buffer.

Parameters
_in_strA readable stream.
yyscannerThe scanner object.
See also
cqasm_version_switch_to_buffer

Definition at line 1926 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_out()

FILE * cqasm_versionget_out ( yyscan_t  yyscanner)

Get the output stream.

Parameters
yyscannerThe scanner object.

Definition at line 1855 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_out()

void cqasm_versionset_out ( FILE *  _out_str,
yyscan_t  yyscanner 
)

Definition at line 1932 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_leng()

int cqasm_versionget_leng ( yyscan_t  yyscanner)

Get the length of the current token.

Parameters
yyscannerThe scanner object.

Definition at line 1864 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_text()

char * cqasm_versionget_text ( yyscan_t  yyscanner)

Get the current token.

Parameters
yyscannerThe scanner object.

Definition at line 1874 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_lineno()

int cqasm_versionget_lineno ( yyscan_t  yyscanner)

Get the current line number.

Parameters
yyscannerThe scanner object.

Definition at line 1820 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_lineno()

void cqasm_versionset_lineno ( int  _line_number,
yyscan_t  yyscanner 
)

Set the current line number.

Parameters
_line_numberline number
yyscannerThe scanner object.

Definition at line 1894 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_column()

int cqasm_versionget_column ( yyscan_t  yyscanner)

Get the current column number.

Parameters
yyscannerThe scanner object.

Definition at line 1833 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_column()

void cqasm_versionset_column ( int  _column_no,
yyscan_t  yyscanner 
)

Set the current column.

Parameters
_column_nocolumn number
yyscannerThe scanner object.

Definition at line 1909 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_lval()

YYSTYPE * cqasm_versionget_lval ( yyscan_t  yyscanner)

Definition at line 1952 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_lval()

void cqasm_versionset_lval ( YYSTYPE yylval_param,
yyscan_t  yyscanner 
)

Definition at line 1958 of file cqasm-version-lexer.cpp.

◆ cqasm_versionget_lloc()

YYLTYPE * cqasm_versionget_lloc ( yyscan_t  yyscanner)

Definition at line 1964 of file cqasm-version-lexer.cpp.

◆ cqasm_versionset_lloc()

void cqasm_versionset_lloc ( YYLTYPE yylloc_param,
yyscan_t  yyscanner 
)

Definition at line 1970 of file cqasm-version-lexer.cpp.

◆ cqasm_versionlex()

int cqasm_versionlex ( YYSTYPE yylval_param,
YYLTYPE yylloc_param,
yyscan_t  yyscanner 
)

◆ if()

if ( !yyg->  yy_init)

Definition at line 784 of file cqasm-version-lexer.cpp.

◆ while()

while ( )

Definition at line 820 of file cqasm-version-lexer.cpp.

Variable Documentation

◆ YY_DECL

YY_DECL
Initial value:
{
yy_state_type yy_current_state
int yy_state_type

The main scanner function which does all the work.

Definition at line 774 of file cqasm-version-lexer.cpp.

◆ yy_cp

char* yy_cp

Definition at line 776 of file cqasm-version-lexer.cpp.

◆ yy_bp

char * yy_bp

Definition at line 776 of file cqasm-version-lexer.cpp.

◆ yy_act

int yy_act

Definition at line 777 of file cqasm-version-lexer.cpp.

◆ yyg

struct yyguts_t* yyg = (struct yyguts_t*)yyscanner

Definition at line 778 of file cqasm-version-lexer.cpp.

◆ yylval

yylval = yylval_param

Definition at line 780 of file cqasm-version-lexer.cpp.

◆ yylloc

yylloc = yylloc_param

Definition at line 782 of file cqasm-version-lexer.cpp.