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

Go to the source code of this file.

Classes

struct  yy_buffer_state
 

Macros

#define cqasm_versionIN_HEADER   1
 
#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_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 YY_BUF_SIZE   16384
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define cqasm_versionwrap(yyscanner)   (/*CONSTCOND*/1)
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   yytext_r
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define YY_START_STACK_INCR   25
 
#define YY_DECL_IS_OURS   1
 
#define YY_DECL
 

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
 

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 *yy_str, yyscan_t yyscanner)
 Setup the input buffer state to scan a string. More...
 
YY_BUFFER_STATE cqasm_version_scan_bytes (yyconst char *bytes, int 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)
 
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
Include dependency graph for cqasm-version-lexer.hpp:
This graph shows which files directly or indirectly include this file:

Macro Definition Documentation

◆ cqasm_versionIN_HEADER

#define cqasm_versionIN_HEADER   1

Definition at line 3 of file cqasm-version-lexer.hpp.

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

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

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 13 of file cqasm-version-lexer.hpp.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

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

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   6

Definition at line 15 of file cqasm-version-lexer.hpp.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   1

Definition at line 16 of file cqasm-version-lexer.hpp.

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 18 of file cqasm-version-lexer.hpp.

◆ FLEXINT_H

#define FLEXINT_H

Definition at line 34 of file cqasm-version-lexer.hpp.

◆ INT8_MIN

#define INT8_MIN   (-128)

Definition at line 64 of file cqasm-version-lexer.hpp.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 67 of file cqasm-version-lexer.hpp.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

Definition at line 70 of file cqasm-version-lexer.hpp.

◆ INT8_MAX

#define INT8_MAX   (127)

Definition at line 73 of file cqasm-version-lexer.hpp.

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 76 of file cqasm-version-lexer.hpp.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 79 of file cqasm-version-lexer.hpp.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 82 of file cqasm-version-lexer.hpp.

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 85 of file cqasm-version-lexer.hpp.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 88 of file cqasm-version-lexer.hpp.

◆ yyconst

#define yyconst   const

Definition at line 96 of file cqasm-version-lexer.hpp.

◆ yynoreturn

#define yynoreturn

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

◆ YY_TYPEDEF_YY_SCANNER_T

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 106 of file cqasm-version-lexer.hpp.

◆ yyin

#define yyin   yyg->yyin_r

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

◆ yyout

#define yyout   yyg->yyout_r

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

◆ yyextra

#define yyextra   yyg->yyextra_r

Definition at line 114 of file cqasm-version-lexer.hpp.

◆ yyleng

#define yyleng   yyg->yyleng_r

Definition at line 115 of file cqasm-version-lexer.hpp.

◆ yytext

#define yytext   yyg->yytext_r

Definition at line 116 of file cqasm-version-lexer.hpp.

◆ yylineno

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 117 of file cqasm-version-lexer.hpp.

◆ yycolumn

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

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

◆ yy_flex_debug

#define yy_flex_debug   yyg->yy_flex_debug_r

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

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 130 of file cqasm-version-lexer.hpp.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 135 of file cqasm-version-lexer.hpp.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 140 of file cqasm-version-lexer.hpp.

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 145 of file cqasm-version-lexer.hpp.

◆ cqasm_versionwrap

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

Definition at line 211 of file cqasm-version-lexer.hpp.

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

Definition at line 212 of file cqasm-version-lexer.hpp.

◆ yytext_ptr

#define yytext_ptr   yytext_r

Definition at line 214 of file cqasm-version-lexer.hpp.

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Definition at line 233 of file cqasm-version-lexer.hpp.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 311 of file cqasm-version-lexer.hpp.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 317 of file cqasm-version-lexer.hpp.

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

Definition at line 324 of file cqasm-version-lexer.hpp.

◆ 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 329 of file cqasm-version-lexer.hpp.

Typedef Documentation

◆ flex_int8_t

typedef signed char flex_int8_t

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

◆ flex_int16_t

typedef short int flex_int16_t

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

◆ flex_int32_t

typedef int flex_int32_t

Definition at line 57 of file cqasm-version-lexer.hpp.

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

Definition at line 58 of file cqasm-version-lexer.hpp.

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

Definition at line 59 of file cqasm-version-lexer.hpp.

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

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

◆ yyscan_t

typedef void* yyscan_t

Definition at line 107 of file cqasm-version-lexer.hpp.

◆ YY_BUFFER_STATE

Definition at line 136 of file cqasm-version-lexer.hpp.

◆ yy_size_t

typedef size_t yy_size_t

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

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  ,
yyscan_t  yyscanner 
)

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

◆ cqasm_versionrealloc()

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

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

◆ cqasm_versionfree()

void cqasm_versionfree ( void *  ,
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 
)