yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ilang_lexer.cc File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "ilang_frontend.h"
#include "ilang_parser.tab.h"
#include <unistd.h>
+ Include dependency graph for ilang_lexer.cc:

Go to the source code of this file.

Data Structures

struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   rtlil_frontend_ilang_yy_create_buffer
 
#define yy_delete_buffer   rtlil_frontend_ilang_yy_delete_buffer
 
#define yy_flex_debug   rtlil_frontend_ilang_yy_flex_debug
 
#define yy_init_buffer   rtlil_frontend_ilang_yy_init_buffer
 
#define yy_flush_buffer   rtlil_frontend_ilang_yy_flush_buffer
 
#define yy_load_buffer_state   rtlil_frontend_ilang_yy_load_buffer_state
 
#define yy_switch_to_buffer   rtlil_frontend_ilang_yy_switch_to_buffer
 
#define yyin   rtlil_frontend_ilang_yyin
 
#define yyleng   rtlil_frontend_ilang_yyleng
 
#define yylex   rtlil_frontend_ilang_yylex
 
#define yylineno   rtlil_frontend_ilang_yylineno
 
#define yyout   rtlil_frontend_ilang_yyout
 
#define yyrestart   rtlil_frontend_ilang_yyrestart
 
#define yytext   rtlil_frontend_ilang_yytext
 
#define yywrap   rtlil_frontend_ilang_yywrap
 
#define yyalloc   rtlil_frontend_ilang_yyalloc
 
#define yyrealloc   rtlil_frontend_ilang_yyrealloc
 
#define yyfree   rtlil_frontend_ilang_yyfree
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_FLEX_SUBMINOR_VERSION   35
 
#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
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define BEGIN   (yy_start) = 1 + 2 *
 
#define YY_START   (((yy_start) - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   rtlil_frontend_ilang_yyrestart(rtlil_frontend_ilang_yyin )
 
#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 EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define yyless(n)
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_TYPEDEF_YY_SIZE_T
 
#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   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define YY_FLUSH_BUFFER   rtlil_frontend_ilang_yy_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   rtlil_frontend_ilang_yy_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 rtlil_frontend_ilang_yywrap(n)   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   rtlil_frontend_ilang_yytext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   45
 
#define YY_END_OF_BUFFER   46
 
#define REJECT   reject_used_but_not_detected
 
#define yymore()   ((yy_more_flag) = 1)
 
#define YY_MORE_ADJ   (yy_more_len)
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_INPUT(buf, result, max_size)   result = readsome(*ILANG_FRONTEND::lexin, buf, max_size)
 
#define INITIAL   0
 
#define STRING   1
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( rtlil_frontend_ilang_yytext, rtlil_frontend_ilang_yyleng, 1, rtlil_frontend_ilang_yyout )) {} } while (0)
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 
#define YY_DECL_IS_OURS   1
 
#define YY_DECL   int rtlil_frontend_ilang_yylex (void)
 
#define YY_USER_ACTION
 
#define YY_BREAK   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 struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Functions

void rtlil_frontend_ilang_yyrestart (FILE *input_file)
 
void rtlil_frontend_ilang_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE rtlil_frontend_ilang_yy_create_buffer (FILE *file, int size)
 
void rtlil_frontend_ilang_yy_delete_buffer (YY_BUFFER_STATE b)
 
void rtlil_frontend_ilang_yy_flush_buffer (YY_BUFFER_STATE b)
 
void rtlil_frontend_ilang_yypush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void rtlil_frontend_ilang_yypop_buffer_state (void)
 
static void rtlil_frontend_ilang_yyensure_buffer_stack (void)
 
static void rtlil_frontend_ilang_yy_load_buffer_state (void)
 
static void rtlil_frontend_ilang_yy_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_bytes (yyconst char *bytes, int len)
 
void * rtlil_frontend_ilang_yyalloc (yy_size_t)
 
void * rtlil_frontend_ilang_yyrealloc (void *, yy_size_t)
 
void rtlil_frontend_ilang_yyfree (void *)
 
static yy_state_type yy_get_previous_state (void)
 
static yy_state_type yy_try_NUL_trans (yy_state_type current_state)
 
static int yy_get_next_buffer (void)
 
static void yy_fatal_error (yyconst char msg[])
 
static int yy_init_globals (void)
 
int rtlil_frontend_ilang_yylex_destroy (void)
 
int rtlil_frontend_ilang_yyget_debug (void)
 
void rtlil_frontend_ilang_yyset_debug (int debug_flag)
 
YY_EXTRA_TYPE rtlil_frontend_ilang_yyget_extra (void)
 
void rtlil_frontend_ilang_yyset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * rtlil_frontend_ilang_yyget_in (void)
 
void rtlil_frontend_ilang_yyset_in (FILE *in_str)
 
FILE * rtlil_frontend_ilang_yyget_out (void)
 
void rtlil_frontend_ilang_yyset_out (FILE *out_str)
 
int rtlil_frontend_ilang_yyget_leng (void)
 
char * rtlil_frontend_ilang_yyget_text (void)
 
int rtlil_frontend_ilang_yyget_lineno (void)
 
void rtlil_frontend_ilang_yyset_lineno (int line_number)
 
static int input (void)
 
int rtlil_frontend_ilang_yylex (void)
 
 if (!(yy_init))
 
 while (1)
 
int isatty (int)
 
static void yy_fatal_error (yyconst char *msg)
 
void * rtlil_frontend_ilang_avoid_input_warnings ()
 

Variables

int rtlil_frontend_ilang_yyleng
 
FILE * rtlil_frontend_ilang_yyin = (FILE *) 0
 
FILE * rtlil_frontend_ilang_yyout = (FILE *) 0
 
static size_t yy_buffer_stack_top = 0
 
static size_t yy_buffer_stack_max = 0
 
static YY_BUFFER_STATEyy_buffer_stack = 0
 
static char yy_hold_char
 
static int yy_n_chars
 
static char * yy_c_buf_p = (char *) 0
 
static int yy_init = 0
 
static int yy_start = 0
 
static int yy_did_buffer_switch_on_eof
 
int rtlil_frontend_ilang_yylineno = 1
 
char * rtlil_frontend_ilang_yytext
 
static yyconst flex_int16_t yy_accept [176]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [37]
 
static yyconst flex_int16_t yy_base [182]
 
static yyconst flex_int16_t yy_def [182]
 
static yyconst flex_int16_t yy_nxt [255]
 
static yyconst flex_int16_t yy_chk [255]
 
static yyconst flex_int32_t yy_rule_can_match_eol [46]
 
static yy_state_type yy_last_accepting_state
 
static char * yy_last_accepting_cpos
 
int rtlil_frontend_ilang_yy_flex_debug = 0
 
static int yy_more_flag = 0
 
static int yy_more_len = 0
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 145 of file ilang_lexer.cc.

Definition at line 748 of file ilang_lexer.cc.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 188 of file ilang_lexer.cc.

#define EOB_ACT_END_OF_FILE   1

Definition at line 189 of file ilang_lexer.cc.

#define EOB_ACT_LAST_MATCH   2

Definition at line 190 of file ilang_lexer.cc.

#define FLEX_BETA

Definition at line 33 of file ilang_lexer.cc.

#define FLEX_SCANNER

Definition at line 28 of file ilang_lexer.cc.

#define FLEXINT_H

Definition at line 49 of file ilang_lexer.cc.

#define INITIAL   0

Definition at line 657 of file ilang_lexer.cc.

#define INT16_MAX   (32767)

Definition at line 91 of file ilang_lexer.cc.

#define INT16_MIN   (-32767-1)

Definition at line 82 of file ilang_lexer.cc.

#define INT32_MAX   (2147483647)

Definition at line 94 of file ilang_lexer.cc.

#define INT32_MIN   (-2147483647-1)

Definition at line 85 of file ilang_lexer.cc.

#define INT8_MAX   (127)

Definition at line 88 of file ilang_lexer.cc.

#define INT8_MIN   (-128)

Definition at line 79 of file ilang_lexer.cc.

#define REJECT   reject_used_but_not_detected

Definition at line 608 of file ilang_lexer.cc.

#define rtlil_frontend_ilang_yywrap (   n)    1

Definition at line 376 of file ilang_lexer.cc.

#define STRING   1

Definition at line 658 of file ilang_lexer.cc.

#define UINT16_MAX   (65535U)

Definition at line 100 of file ilang_lexer.cc.

#define UINT32_MAX   (4294967295U)

Definition at line 103 of file ilang_lexer.cc.

#define UINT8_MAX   (255U)

Definition at line 97 of file ilang_lexer.cc.

#define unput (   c)    yyunput( c, (yytext_ptr) )

Definition at line 221 of file ilang_lexer.cc.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 372 of file ilang_lexer.cc.

#define YY_BREAK   break;

Definition at line 827 of file ilang_lexer.cc.

#define YY_BUF_SIZE   16384

Definition at line 171 of file ilang_lexer.cc.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 288 of file ilang_lexer.cc.

#define YY_BUFFER_NEW   0

Definition at line 276 of file ilang_lexer.cc.

#define YY_BUFFER_NORMAL   1

Definition at line 277 of file ilang_lexer.cc.

#define yy_create_buffer   rtlil_frontend_ilang_yy_create_buffer

Definition at line 9 of file ilang_lexer.cc.

#define YY_CURRENT_BUFFER
Value:
: NULL)
static YY_BUFFER_STATE * yy_buffer_stack
Definition: ilang_lexer.cc:296
static size_t yy_buffer_stack_top
Definition: ilang_lexer.cc:294
#define NULL

Definition at line 304 of file ilang_lexer.cc.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 311 of file ilang_lexer.cc.

#define YY_DECL   int rtlil_frontend_ilang_yylex (void)

Definition at line 815 of file ilang_lexer.cc.

#define YY_DECL_IS_OURS   1

Definition at line 811 of file ilang_lexer.cc.

#define yy_delete_buffer   rtlil_frontend_ilang_yy_delete_buffer

Definition at line 10 of file ilang_lexer.cc.

#define YY_DO_BEFORE_ACTION
Value:
*yy_cp = '\0'; \
register char * yy_cp
Definition: ilang_lexer.cc:838
static char yy_hold_char
Definition: ilang_lexer.cc:314
static int yy_more_len
Definition: ilang_lexer.cc:610
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
int rtlil_frontend_ilang_yyleng
Definition: ilang_lexer.cc:316
#define yytext_ptr
Definition: ilang_lexer.cc:390
register char * yy_bp
Definition: ilang_lexer.cc:838

Definition at line 400 of file ilang_lexer.cc.

#define YY_END_OF_BUFFER   46

Definition at line 409 of file ilang_lexer.cc.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 160 of file ilang_lexer.cc.

#define YY_EXIT_FAILURE   2

Definition at line 1961 of file ilang_lexer.cc.

#define YY_EXTRA_TYPE   void *

Definition at line 669 of file ilang_lexer.cc.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 802 of file ilang_lexer.cc.

#define yy_flex_debug   rtlil_frontend_ilang_yy_flex_debug

Definition at line 11 of file ilang_lexer.cc.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file ilang_lexer.cc.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file ilang_lexer.cc.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 31 of file ilang_lexer.cc.

#define yy_flush_buffer   rtlil_frontend_ilang_yy_flush_buffer

Definition at line 13 of file ilang_lexer.cc.

Definition at line 340 of file ilang_lexer.cc.

#define yy_init_buffer   rtlil_frontend_ilang_yy_init_buffer

Definition at line 12 of file ilang_lexer.cc.

#define YY_INPUT (   buf,
  result,
  max_size 
)    result = readsome(*ILANG_FRONTEND::lexin, buf, max_size)

Definition at line 651 of file ilang_lexer.cc.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file ilang_lexer.cc.

#define YY_LESS_LINENO (   n)
Value:
do { \
int yyl;\
for ( yyl = n; yyl < rtlil_frontend_ilang_yyleng; ++yyl )\
if ( rtlil_frontend_ilang_yytext[yyl] == '\n' )\
}while(0)
tuple n
Definition: fsm/generate.py:59
int rtlil_frontend_ilang_yyleng
Definition: ilang_lexer.cc:316
char * rtlil_frontend_ilang_yytext
Definition: ilang_lexer.cc:614
int rtlil_frontend_ilang_yylineno
Definition: ilang_lexer.cc:387

Definition at line 199 of file ilang_lexer.cc.

#define yy_load_buffer_state   rtlil_frontend_ilang_yy_load_buffer_state

Definition at line 14 of file ilang_lexer.cc.

#define YY_MORE_ADJ   (yy_more_len)

Definition at line 612 of file ilang_lexer.cc.

#define yy_new_buffer   rtlil_frontend_ilang_yy_create_buffer

Definition at line 350 of file ilang_lexer.cc.

Definition at line 158 of file ilang_lexer.cc.

#define YY_NULL   0

Definition at line 132 of file ilang_lexer.cc.

#define YY_NUM_RULES   45

Definition at line 408 of file ilang_lexer.cc.

#define YY_READ_BUF_SIZE   8192

Definition at line 739 of file ilang_lexer.cc.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 613 of file ilang_lexer.cc.

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 830 of file ilang_lexer.cc.

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

Definition at line 139 of file ilang_lexer.cc.

#define yy_set_bol (   at_bol)
Value:
{ \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
if(!(yy_init))
Definition: ilang_lexer.cc:846
static void rtlil_frontend_ilang_yyensure_buffer_stack(void)
#define YY_BUF_SIZE
Definition: ilang_lexer.cc:171
YY_BUFFER_STATE rtlil_frontend_ilang_yy_create_buffer(FILE *file, int size)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

Definition at line 362 of file ilang_lexer.cc.

#define yy_set_interactive (   is_interactive)
Value:
{ \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
if(!(yy_init))
Definition: ilang_lexer.cc:846
static void rtlil_frontend_ilang_yyensure_buffer_stack(void)
#define YY_BUF_SIZE
Definition: ilang_lexer.cc:171
YY_BUFFER_STATE rtlil_frontend_ilang_yy_create_buffer(FILE *file, int size)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

Definition at line 352 of file ilang_lexer.cc.

#define YY_SKIP_YYWRAP

Definition at line 377 of file ilang_lexer.cc.

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

Definition at line 151 of file ilang_lexer.cc.

#define YY_START_STACK_INCR   25

Definition at line 797 of file ilang_lexer.cc.

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

Definition at line 177 of file ilang_lexer.cc.

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

Definition at line 155 of file ilang_lexer.cc.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 229 of file ilang_lexer.cc.

#define yy_switch_to_buffer   rtlil_frontend_ilang_yy_switch_to_buffer

Definition at line 15 of file ilang_lexer.cc.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 180 of file ilang_lexer.cc.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 224 of file ilang_lexer.cc.

#define YY_USER_ACTION

Definition at line 822 of file ilang_lexer.cc.

Definition at line 24 of file ilang_lexer.cc.

#define yyconst

Definition at line 128 of file ilang_lexer.cc.

#define yyfree   rtlil_frontend_ilang_yyfree

Definition at line 26 of file ilang_lexer.cc.

#define yyin   rtlil_frontend_ilang_yyin

Definition at line 16 of file ilang_lexer.cc.

#define yyleng   rtlil_frontend_ilang_yyleng

Definition at line 17 of file ilang_lexer.cc.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up rtlil_frontend_ilang_yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up rtlil_frontend_ilang_yytext again */ \
} \
while ( 0 )
#define YY_MORE_ADJ
Definition: ilang_lexer.cc:612
register char * yy_cp
Definition: ilang_lexer.cc:838
static char yy_hold_char
Definition: ilang_lexer.cc:314
tuple n
Definition: fsm/generate.py:59
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
#define YY_RESTORE_YY_MORE_OFFSET
Definition: ilang_lexer.cc:613
register char * yy_bp
Definition: ilang_lexer.cc:838
while(1)
Definition: ilang_lexer.cc:872
#define YY_LESS_LINENO(n)
Definition: ilang_lexer.cc:199
#define YY_DO_BEFORE_ACTION
Definition: ilang_lexer.cc:400

Definition at line 1973 of file ilang_lexer.cc.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up rtlil_frontend_ilang_yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
(yy_c_buf_p) = rtlil_frontend_ilang_yytext + yyless_macro_arg; \
*(yy_c_buf_p) = '\0'; \
rtlil_frontend_ilang_yyleng = yyless_macro_arg; \
} \
while ( 0 )
static char yy_hold_char
Definition: ilang_lexer.cc:314
tuple n
Definition: fsm/generate.py:59
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
int rtlil_frontend_ilang_yyleng
Definition: ilang_lexer.cc:316
char * rtlil_frontend_ilang_yytext
Definition: ilang_lexer.cc:614
while(1)
Definition: ilang_lexer.cc:872
#define YY_LESS_LINENO(n)
Definition: ilang_lexer.cc:199

Definition at line 1973 of file ilang_lexer.cc.

#define yylex   rtlil_frontend_ilang_yylex

Definition at line 18 of file ilang_lexer.cc.

#define yylineno   rtlil_frontend_ilang_yylineno

Definition at line 19 of file ilang_lexer.cc.

#define yymore ( )    ((yy_more_flag) = 1)

Definition at line 611 of file ilang_lexer.cc.

#define yyout   rtlil_frontend_ilang_yyout

Definition at line 20 of file ilang_lexer.cc.

#define yyrealloc   rtlil_frontend_ilang_yyrealloc

Definition at line 25 of file ilang_lexer.cc.

#define yyrestart   rtlil_frontend_ilang_yyrestart

Definition at line 21 of file ilang_lexer.cc.

#define YYSTATE   YY_START

Definition at line 152 of file ilang_lexer.cc.

#define YYTABLES_NAME   "yytables"

Definition at line 2166 of file ilang_lexer.cc.

#define yyterminate ( )    return YY_NULL

Definition at line 792 of file ilang_lexer.cc.

#define yytext   rtlil_frontend_ilang_yytext

Definition at line 22 of file ilang_lexer.cc.

#define yytext_ptr   rtlil_frontend_ilang_yytext

Definition at line 390 of file ilang_lexer.cc.

#define yywrap   rtlil_frontend_ilang_yywrap

Definition at line 23 of file ilang_lexer.cc.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 71 of file ilang_lexer.cc.

typedef int flex_int32_t

Definition at line 72 of file ilang_lexer.cc.

typedef signed char flex_int8_t

Definition at line 70 of file ilang_lexer.cc.

typedef unsigned short int flex_uint16_t

Definition at line 74 of file ilang_lexer.cc.

typedef unsigned int flex_uint32_t

Definition at line 75 of file ilang_lexer.cc.

typedef unsigned char flex_uint8_t

Definition at line 73 of file ilang_lexer.cc.

Definition at line 181 of file ilang_lexer.cc.

typedef unsigned char YY_CHAR

Definition at line 379 of file ilang_lexer.cc.

typedef size_t yy_size_t

Definition at line 225 of file ilang_lexer.cc.

typedef int yy_state_type

Definition at line 383 of file ilang_lexer.cc.

Function Documentation

if ( yy_init)

Definition at line 846 of file ilang_lexer.cc.

847  {
848  (yy_init) = 1;
849 
850 #ifdef YY_USER_INIT
851  YY_USER_INIT;
852 #endif
853 
854  if ( ! (yy_start) )
855  (yy_start) = 1; /* first start state */
856 
859 
862 
863  if ( ! YY_CURRENT_BUFFER ) {
867  }
868 
870  }
static int yy_start
Definition: ilang_lexer.cc:321
static int yy_init
Definition: ilang_lexer.cc:320
static void rtlil_frontend_ilang_yyensure_buffer_stack(void)
#define YY_BUF_SIZE
Definition: ilang_lexer.cc:171
static void rtlil_frontend_ilang_yy_load_buffer_state(void)
YY_BUFFER_STATE rtlil_frontend_ilang_yy_create_buffer(FILE *file, int size)
FILE * rtlil_frontend_ilang_yyout
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int input ( void  )
static

Definition at line 1532 of file ilang_lexer.cc.

1535 {
1536  int c;
1537 
1538  *(yy_c_buf_p) = (yy_hold_char);
1539 
1540  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1541  {
1542  /* yy_c_buf_p now points to the character we want to return.
1543  * If this occurs *before* the EOB characters, then it's a
1544  * valid NUL; if not, then we've hit the end of the buffer.
1545  */
1546  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1547  /* This was really a NUL. */
1548  *(yy_c_buf_p) = '\0';
1549 
1550  else
1551  { /* need more input */
1552  int offset = (yy_c_buf_p) - (yytext_ptr);
1553  ++(yy_c_buf_p);
1554 
1555  switch ( yy_get_next_buffer( ) )
1556  {
1557  case EOB_ACT_LAST_MATCH:
1558  /* This happens because yy_g_n_b()
1559  * sees that we've accumulated a
1560  * token and flags that we need to
1561  * try matching the token before
1562  * proceeding. But for input(),
1563  * there's no matching to consider.
1564  * So convert the EOB_ACT_LAST_MATCH
1565  * to EOB_ACT_END_OF_FILE.
1566  */
1567 
1568  /* Reset buffer status. */
1570 
1571  /*FALLTHROUGH*/
1572 
1573  case EOB_ACT_END_OF_FILE:
1574  {
1575  if ( rtlil_frontend_ilang_yywrap( ) )
1576  return EOF;
1577 
1578  if ( ! (yy_did_buffer_switch_on_eof) )
1579  YY_NEW_FILE;
1580 #ifdef __cplusplus
1581  return yyinput();
1582 #else
1583  return input();
1584 #endif
1585  }
1586 
1587  case EOB_ACT_CONTINUE_SCAN:
1588  (yy_c_buf_p) = (yytext_ptr) + offset;
1589  break;
1590  }
1591  }
1592  }
1593 
1594  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1595  *(yy_c_buf_p) = '\0'; /* preserve rtlil_frontend_ilang_yytext */
1596  (yy_hold_char) = *++(yy_c_buf_p);
1597 
1598  if ( c == '\n' )
1599 
1601 ;
1602 
1603  return c;
1604 }
static int yy_did_buffer_switch_on_eof
Definition: ilang_lexer.cc:326
static int yy_n_chars
Definition: ilang_lexer.cc:315
static char yy_hold_char
Definition: ilang_lexer.cc:314
void rtlil_frontend_ilang_yyrestart(FILE *input_file)
#define EOB_ACT_END_OF_FILE
Definition: ilang_lexer.cc:189
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
#define YY_NEW_FILE
Definition: ilang_lexer.cc:158
#define yytext_ptr
Definition: ilang_lexer.cc:390
#define EOB_ACT_LAST_MATCH
Definition: ilang_lexer.cc:190
static int yy_get_next_buffer(void)
#define rtlil_frontend_ilang_yywrap(n)
Definition: ilang_lexer.cc:376
static int input(void)
int rtlil_frontend_ilang_yylineno
Definition: ilang_lexer.cc:387
#define YY_END_OF_BUFFER_CHAR
Definition: ilang_lexer.cc:160
#define EOB_ACT_CONTINUE_SCAN
Definition: ilang_lexer.cc:188
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int isatty ( int  )

+ Here is the caller graph for this function:

void* rtlil_frontend_ilang_avoid_input_warnings ( )

Definition at line 2173 of file ilang_lexer.cc.

2173  {
2174  return (void*)&yyinput;
2175 }
YY_BUFFER_STATE rtlil_frontend_ilang_yy_create_buffer ( FILE *  file,
int  size 
)

Allocate and initialize an input buffer state.

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

Definition at line 1674 of file ilang_lexer.cc.

1675 {
1676  YY_BUFFER_STATE b;
1677 
1679  if ( ! b )
1680  YY_FATAL_ERROR( "out of dynamic memory in rtlil_frontend_ilang_yy_create_buffer()" );
1681 
1682  b->yy_buf_size = size;
1683 
1684  /* yy_ch_buf has to be 2 characters longer than the size given because
1685  * we need to put in 2 end-of-buffer characters.
1686  */
1687  b->yy_ch_buf = (char *) rtlil_frontend_ilang_yyalloc(b->yy_buf_size + 2 );
1688  if ( ! b->yy_ch_buf )
1689  YY_FATAL_ERROR( "out of dynamic memory in rtlil_frontend_ilang_yy_create_buffer()" );
1690 
1691  b->yy_is_our_buffer = 1;
1692 
1694 
1695  return b;
1696 }
#define YY_FATAL_ERROR(msg)
Definition: ilang_lexer.cc:802
yy_size_t yy_buf_size
Definition: ilang_lexer.cc:240
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ilang_lexer.cc:181
static void rtlil_frontend_ilang_yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
void * rtlil_frontend_ilang_yyalloc(yy_size_t)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rtlil_frontend_ilang_yy_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with rtlil_frontend_ilang_yy_create_buffer()

Definition at line 1702 of file ilang_lexer.cc.

1703 {
1704 
1705  if ( ! b )
1706  return;
1707 
1708  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1710 
1711  if ( b->yy_is_our_buffer )
1712  rtlil_frontend_ilang_yyfree((void *) b->yy_ch_buf );
1713 
1714  rtlil_frontend_ilang_yyfree((void *) b );
1715 }
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ilang_lexer.cc:181
void rtlil_frontend_ilang_yyfree(void *)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rtlil_frontend_ilang_yy_flush_buffer ( YY_BUFFER_STATE  b)

Discard all buffered characters. On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.

Definition at line 1753 of file ilang_lexer.cc.

1754 {
1755  if ( ! b )
1756  return;
1757 
1758  b->yy_n_chars = 0;
1759 
1760  /* We always need two end-of-buffer characters. The first causes
1761  * a transition to the end-of-buffer state. The second causes
1762  * a jam in that state.
1763  */
1766 
1767  b->yy_buf_pos = &b->yy_ch_buf[0];
1768 
1769  b->yy_at_bol = 1;
1771 
1772  if ( b == YY_CURRENT_BUFFER )
1774 }
#define YY_BUFFER_NEW
Definition: ilang_lexer.cc:276
static void rtlil_frontend_ilang_yy_load_buffer_state(void)
#define YY_END_OF_BUFFER_CHAR
Definition: ilang_lexer.cc:160
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rtlil_frontend_ilang_yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

Definition at line 1725 of file ilang_lexer.cc.

1727 {
1728  int oerrno = errno;
1729 
1731 
1732  b->yy_input_file = file;
1733  b->yy_fill_buffer = 1;
1734 
1735  /* If b is the current buffer, then rtlil_frontend_ilang_yy_init_buffer was _probably_
1736  * called from rtlil_frontend_ilang_yyrestart() or through yy_get_next_buffer.
1737  * In that case, we don't want to reset the lineno or column.
1738  */
1739  if (b != YY_CURRENT_BUFFER){
1740  b->yy_bs_lineno = 1;
1741  b->yy_bs_column = 0;
1742  }
1743 
1744  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1745 
1746  errno = oerrno;
1747 }
FILE * yy_input_file
Definition: ilang_lexer.cc:232
void rtlil_frontend_ilang_yy_flush_buffer(YY_BUFFER_STATE b)
int isatty(int)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rtlil_frontend_ilang_yy_load_buffer_state ( void  )
static

Definition at line 1660 of file ilang_lexer.cc.

1661 {
1662  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1663  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1665  (yy_hold_char) = *(yy_c_buf_p);
1666 }
static int yy_n_chars
Definition: ilang_lexer.cc:315
static char yy_hold_char
Definition: ilang_lexer.cc:314
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
#define yytext_ptr
Definition: ilang_lexer.cc:390
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the caller graph for this function:

YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_buffer ( char *  base,
yy_size_t  size 
)

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
Returns
the newly allocated buffer state object.

Definition at line 1880 of file ilang_lexer.cc.

1881 {
1882  YY_BUFFER_STATE b;
1883 
1884  if ( size < 2 ||
1885  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1886  base[size-1] != YY_END_OF_BUFFER_CHAR )
1887  /* They forgot to leave room for the EOB's. */
1888  return 0;
1889 
1891  if ( ! b )
1892  YY_FATAL_ERROR( "out of dynamic memory in rtlil_frontend_ilang_yy_scan_buffer()" );
1893 
1894  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1895  b->yy_buf_pos = b->yy_ch_buf = base;
1896  b->yy_is_our_buffer = 0;
1897  b->yy_input_file = 0;
1898  b->yy_n_chars = b->yy_buf_size;
1899  b->yy_is_interactive = 0;
1900  b->yy_at_bol = 1;
1901  b->yy_fill_buffer = 0;
1903 
1905 
1906  return b;
1907 }
FILE * yy_input_file
Definition: ilang_lexer.cc:232
void rtlil_frontend_ilang_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)
#define YY_FATAL_ERROR(msg)
Definition: ilang_lexer.cc:802
yy_size_t yy_buf_size
Definition: ilang_lexer.cc:240
#define YY_BUFFER_NEW
Definition: ilang_lexer.cc:276
struct yy_buffer_state * YY_BUFFER_STATE
Definition: ilang_lexer.cc:181
#define YY_END_OF_BUFFER_CHAR
Definition: ilang_lexer.cc:160
void * rtlil_frontend_ilang_yyalloc(yy_size_t)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

Setup the input buffer state to scan the given bytes. The next call to rtlil_frontend_ilang_yylex() 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.
Returns
the newly allocated buffer state object.

Definition at line 1930 of file ilang_lexer.cc.

1931 {
1932  YY_BUFFER_STATE b;
1933  char *buf;
1934  yy_size_t n;
1935  int i;
1936 
1937  /* Get memory for full buffer, including space for trailing EOB's. */
1938  n = _yybytes_len + 2;
1939  buf = (char *) rtlil_frontend_ilang_yyalloc(n );
1940  if ( ! buf )
1941  YY_FATAL_ERROR( "out of dynamic memory in rtlil_frontend_ilang_yy_scan_bytes()" );
1942 
1943  for ( i = 0; i < _yybytes_len; ++i )
1944  buf[i] = yybytes[i];
1945 
1946  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1947 
1949  if ( ! b )
1950  YY_FATAL_ERROR( "bad buffer in rtlil_frontend_ilang_yy_scan_bytes()" );
1951 
1952  /* It's okay to grow etc. this buffer, and we should throw it
1953  * away when we're done.
1954  */
1955  b->yy_is_our_buffer = 1;
1956 
1957  return b;
1958 }
YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_buffer(char *base, yy_size_t size)
#define YY_FATAL_ERROR(msg)
Definition: ilang_lexer.cc:802
tuple n
Definition: fsm/generate.py:59
size_t yy_size_t
Definition: ilang_lexer.cc:225
#define YY_END_OF_BUFFER_CHAR
Definition: ilang_lexer.cc:160
void * rtlil_frontend_ilang_yyalloc(yy_size_t)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_string ( yyconst char *  yystr)

Setup the input buffer state to scan a string. The next call to rtlil_frontend_ilang_yylex() will scan from a copy of str.

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

Definition at line 1917 of file ilang_lexer.cc.

1918 {
1919 
1920  return rtlil_frontend_ilang_yy_scan_bytes(yystr,strlen(yystr) );
1921 }
YY_BUFFER_STATE rtlil_frontend_ilang_yy_scan_bytes(yyconst char *bytes, int len)

+ Here is the call graph for this function:

void rtlil_frontend_ilang_yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 1629 of file ilang_lexer.cc.

1630 {
1631 
1632  /* TODO. We should be able to replace this entire function body
1633  * with
1634  * rtlil_frontend_ilang_yypop_buffer_state();
1635  * rtlil_frontend_ilang_yypush_buffer_state(new_buffer);
1636  */
1638  if ( YY_CURRENT_BUFFER == new_buffer )
1639  return;
1640 
1641  if ( YY_CURRENT_BUFFER )
1642  {
1643  /* Flush out information for old buffer. */
1644  *(yy_c_buf_p) = (yy_hold_char);
1645  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1646  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1647  }
1648 
1649  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1651 
1652  /* We don't actually know whether we did this switch during
1653  * EOF (rtlil_frontend_ilang_yywrap()) processing, but the only time this flag
1654  * is looked at is after rtlil_frontend_ilang_yywrap() is called, so it's safe
1655  * to go ahead and always set it.
1656  */
1658 }
static int yy_did_buffer_switch_on_eof
Definition: ilang_lexer.cc:326
static int yy_n_chars
Definition: ilang_lexer.cc:315
static char yy_hold_char
Definition: ilang_lexer.cc:314
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
static void rtlil_frontend_ilang_yyensure_buffer_stack(void)
static void rtlil_frontend_ilang_yy_load_buffer_state(void)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void * rtlil_frontend_ilang_yyalloc ( yy_size_t  size)

Definition at line 2144 of file ilang_lexer.cc.

2145 {
2146  return (void *) malloc( size );
2147 }
void * malloc(YYSIZE_T)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rtlil_frontend_ilang_yyensure_buffer_stack ( void  )
static

Definition at line 1831 of file ilang_lexer.cc.

1832 {
1833  int num_to_alloc;
1834 
1835  if (!(yy_buffer_stack)) {
1836 
1837  /* First allocation is just for 2 elements, since we don't know if this
1838  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1839  * immediate realloc on the next call.
1840  */
1841  num_to_alloc = 1;
1843  (num_to_alloc * sizeof(struct yy_buffer_state*)
1844  );
1845  if ( ! (yy_buffer_stack) )
1846  YY_FATAL_ERROR( "out of dynamic memory in rtlil_frontend_ilang_yyensure_buffer_stack()" );
1847 
1848  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1849 
1850  (yy_buffer_stack_max) = num_to_alloc;
1851  (yy_buffer_stack_top) = 0;
1852  return;
1853  }
1854 
1855  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1856 
1857  /* Increase the buffer to prepare for a possible push. */
1858  int grow_size = 8 /* arbitrary grow size */;
1859 
1860  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1862  ((yy_buffer_stack),
1863  num_to_alloc * sizeof(struct yy_buffer_state*)
1864  );
1865  if ( ! (yy_buffer_stack) )
1866  YY_FATAL_ERROR( "out of dynamic memory in rtlil_frontend_ilang_yyensure_buffer_stack()" );
1867 
1868  /* zero only the new slots.*/
1869  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1870  (yy_buffer_stack_max) = num_to_alloc;
1871  }
1872 }
static YY_BUFFER_STATE * yy_buffer_stack
Definition: ilang_lexer.cc:296
#define YY_FATAL_ERROR(msg)
Definition: ilang_lexer.cc:802
static size_t yy_buffer_stack_max
Definition: ilang_lexer.cc:295
void * rtlil_frontend_ilang_yyrealloc(void *, yy_size_t)
static size_t yy_buffer_stack_top
Definition: ilang_lexer.cc:294
void * rtlil_frontend_ilang_yyalloc(yy_size_t)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rtlil_frontend_ilang_yyfree ( void *  ptr)

Definition at line 2161 of file ilang_lexer.cc.

2162 {
2163  free( (char *) ptr ); /* see rtlil_frontend_ilang_yyrealloc() for (char *) cast */
2164 }
void free(void *)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int rtlil_frontend_ilang_yyget_debug ( void  )

Definition at line 2057 of file ilang_lexer.cc.

2058 {
2060 }
int rtlil_frontend_ilang_yy_flex_debug
Definition: ilang_lexer.cc:603
YY_EXTRA_TYPE rtlil_frontend_ilang_yyget_extra ( void  )
FILE * rtlil_frontend_ilang_yyget_in ( void  )

Get the input stream.

Definition at line 2001 of file ilang_lexer.cc.

2002 {
2004 }
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
int rtlil_frontend_ilang_yyget_leng ( void  )

Get the length of the current token.

Definition at line 2017 of file ilang_lexer.cc.

2018 {
2020 }
int rtlil_frontend_ilang_yyleng
Definition: ilang_lexer.cc:316
int rtlil_frontend_ilang_yyget_lineno ( void  )

Get the current line number.

Definition at line 1992 of file ilang_lexer.cc.

1993 {
1994 
1996 }
int rtlil_frontend_ilang_yylineno
Definition: ilang_lexer.cc:387

+ Here is the caller graph for this function:

FILE * rtlil_frontend_ilang_yyget_out ( void  )

Get the output stream.

Definition at line 2009 of file ilang_lexer.cc.

2010 {
2012 }
FILE * rtlil_frontend_ilang_yyout
Definition: ilang_lexer.cc:381
char * rtlil_frontend_ilang_yyget_text ( void  )

Get the current token.

Definition at line 2026 of file ilang_lexer.cc.

2027 {
2029 }
char * rtlil_frontend_ilang_yytext
Definition: ilang_lexer.cc:614
int rtlil_frontend_ilang_yylex ( void  )
int rtlil_frontend_ilang_yylex_destroy ( void  )

Definition at line 2099 of file ilang_lexer.cc.

2100 {
2101 
2102  /* Pop the buffer stack, destroying each element. */
2103  while(YY_CURRENT_BUFFER){
2107  }
2108 
2109  /* Destroy the stack itself. */
2111  (yy_buffer_stack) = NULL;
2112 
2113  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2114  * rtlil_frontend_ilang_yylex() is called, initialization will occur. */
2115  yy_init_globals( );
2116 
2117  return 0;
2118 }
static YY_BUFFER_STATE * yy_buffer_stack
Definition: ilang_lexer.cc:296
void rtlil_frontend_ilang_yy_delete_buffer(YY_BUFFER_STATE b)
void rtlil_frontend_ilang_yypop_buffer_state(void)
void rtlil_frontend_ilang_yyfree(void *)
#define NULL
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
static int yy_init_globals(void)
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rtlil_frontend_ilang_yypop_buffer_state ( void  )

Removes and deletes the top of the stack, if present. The next element becomes the new top.

Definition at line 1812 of file ilang_lexer.cc.

1813 {
1814  if (!YY_CURRENT_BUFFER)
1815  return;
1816 
1819  if ((yy_buffer_stack_top) > 0)
1820  --(yy_buffer_stack_top);
1821 
1822  if (YY_CURRENT_BUFFER) {
1825  }
1826 }
static int yy_did_buffer_switch_on_eof
Definition: ilang_lexer.cc:326
void rtlil_frontend_ilang_yy_delete_buffer(YY_BUFFER_STATE b)
static size_t yy_buffer_stack_top
Definition: ilang_lexer.cc:294
#define NULL
static void rtlil_frontend_ilang_yy_load_buffer_state(void)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rtlil_frontend_ilang_yypush_buffer_state ( YY_BUFFER_STATE  new_buffer)

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.

Definition at line 1782 of file ilang_lexer.cc.

1783 {
1784  if (new_buffer == NULL)
1785  return;
1786 
1788 
1789  /* This block is copied from rtlil_frontend_ilang_yy_switch_to_buffer. */
1790  if ( YY_CURRENT_BUFFER )
1791  {
1792  /* Flush out information for old buffer. */
1793  *(yy_c_buf_p) = (yy_hold_char);
1794  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1795  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1796  }
1797 
1798  /* Only push if top exists. Otherwise, replace top. */
1799  if (YY_CURRENT_BUFFER)
1800  (yy_buffer_stack_top)++;
1801  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1802 
1803  /* copied from rtlil_frontend_ilang_yy_switch_to_buffer. */
1806 }
static int yy_did_buffer_switch_on_eof
Definition: ilang_lexer.cc:326
static int yy_n_chars
Definition: ilang_lexer.cc:315
static char yy_hold_char
Definition: ilang_lexer.cc:314
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
static void rtlil_frontend_ilang_yyensure_buffer_stack(void)
static size_t yy_buffer_stack_top
Definition: ilang_lexer.cc:294
#define NULL
static void rtlil_frontend_ilang_yy_load_buffer_state(void)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

void * rtlil_frontend_ilang_yyrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 2149 of file ilang_lexer.cc.

2150 {
2151  /* The cast to (char *) in the following accommodates both
2152  * implementations that use char* generic pointers, and those
2153  * that use void* generic pointers. It works with the latter
2154  * because both ANSI C and C++ allow castless assignment from
2155  * any pointer type to void*, and deal with argument conversions
2156  * as though doing an assignment.
2157  */
2158  return (void *) realloc( (char *) ptr, size );
2159 }

+ Here is the caller graph for this function:

void rtlil_frontend_ilang_yyrestart ( FILE *  input_file)

Immediately switch to a different input stream.

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

Definition at line 1612 of file ilang_lexer.cc.

1613 {
1614 
1615  if ( ! YY_CURRENT_BUFFER ){
1619  }
1620 
1623 }
static void rtlil_frontend_ilang_yyensure_buffer_stack(void)
#define YY_BUF_SIZE
Definition: ilang_lexer.cc:171
static void rtlil_frontend_ilang_yy_load_buffer_state(void)
YY_BUFFER_STATE rtlil_frontend_ilang_yy_create_buffer(FILE *file, int size)
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
static void rtlil_frontend_ilang_yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
static void input_file(std::istream &f, std::string filename)
Definition: preproc.cc:196
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void rtlil_frontend_ilang_yyset_debug ( int  debug_flag)

Definition at line 2062 of file ilang_lexer.cc.

2063 {
2065 }
int rtlil_frontend_ilang_yy_flex_debug
Definition: ilang_lexer.cc:603
void rtlil_frontend_ilang_yyset_extra ( YY_EXTRA_TYPE  user_defined)
void rtlil_frontend_ilang_yyset_in ( FILE *  in_str)

Set the input stream. This does not discard the current input buffer.

Parameters
in_strA readable stream.
See Also
rtlil_frontend_ilang_yy_switch_to_buffer

Definition at line 2047 of file ilang_lexer.cc.

2048 {
2049  rtlil_frontend_ilang_yyin = in_str ;
2050 }
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
void rtlil_frontend_ilang_yyset_lineno ( int  line_number)

Set the current line number.

Parameters
line_number

Definition at line 2035 of file ilang_lexer.cc.

2036 {
2037 
2038  rtlil_frontend_ilang_yylineno = line_number;
2039 }
int rtlil_frontend_ilang_yylineno
Definition: ilang_lexer.cc:387
void rtlil_frontend_ilang_yyset_out ( FILE *  out_str)

Definition at line 2052 of file ilang_lexer.cc.

2053 {
2054  rtlil_frontend_ilang_yyout = out_str ;
2055 }
FILE * rtlil_frontend_ilang_yyout
Definition: ilang_lexer.cc:381
while ( )

Definition at line 872 of file ilang_lexer.cc.

873  {
874  (yy_more_len) = 0;
875  if ( (yy_more_flag) )
876  {
878  (yy_more_flag) = 0;
879  }
880  yy_cp = (yy_c_buf_p);
881 
882  /* Support of rtlil_frontend_ilang_yytext. */
883  *yy_cp = (yy_hold_char);
884 
885  /* yy_bp points to the position in yy_ch_buf of the start of
886  * the current run.
887  */
888  yy_bp = yy_cp;
889 
890  yy_current_state = (yy_start);
891 yy_match:
892  do
893  {
894  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
895  if ( yy_accept[yy_current_state] )
896  {
897  (yy_last_accepting_state) = yy_current_state;
899  }
900  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
901  {
902  yy_current_state = (int) yy_def[yy_current_state];
903  if ( yy_current_state >= 176 )
904  yy_c = yy_meta[(unsigned int) yy_c];
905  }
906  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
907  ++yy_cp;
908  }
909  while ( yy_base[yy_current_state] != 218 );
910 
911 yy_find_action:
912  yy_act = yy_accept[yy_current_state];
913  if ( yy_act == 0 )
914  { /* have to back up */
916  yy_current_state = (yy_last_accepting_state);
917  yy_act = yy_accept[yy_current_state];
918  }
919 
921 
923  {
924  int yyl;
925  for ( yyl = (yy_more_len); yyl < rtlil_frontend_ilang_yyleng; ++yyl )
926  if ( rtlil_frontend_ilang_yytext[yyl] == '\n' )
927 
929 ;
930  }
931 
932 do_action: /* This label is used only to access EOF actions. */
933 
934  switch ( yy_act )
935  { /* beginning of action switch */
936  case 0: /* must back up */
937  /* undo the effects of YY_DO_BEFORE_ACTION */
938  *yy_cp = (yy_hold_char);
940  yy_current_state = (yy_last_accepting_state);
941  goto yy_find_action;
942 
943 case 1:
945 #line 51 "frontends/ilang/ilang_lexer.l"
946 { return TOK_AUTOIDX; }
947  YY_BREAK
948 case 2:
950 #line 52 "frontends/ilang/ilang_lexer.l"
951 { return TOK_MODULE; }
952  YY_BREAK
953 case 3:
955 #line 53 "frontends/ilang/ilang_lexer.l"
956 { return TOK_ATTRIBUTE; }
957  YY_BREAK
958 case 4:
960 #line 54 "frontends/ilang/ilang_lexer.l"
961 { return TOK_PARAMETER; }
962  YY_BREAK
963 case 5:
965 #line 55 "frontends/ilang/ilang_lexer.l"
966 { return TOK_SIGNED; }
967  YY_BREAK
968 case 6:
970 #line 56 "frontends/ilang/ilang_lexer.l"
971 { return TOK_WIRE; }
972  YY_BREAK
973 case 7:
975 #line 57 "frontends/ilang/ilang_lexer.l"
976 { return TOK_MEMORY; }
977  YY_BREAK
978 case 8:
980 #line 58 "frontends/ilang/ilang_lexer.l"
981 { return TOK_WIDTH; }
982  YY_BREAK
983 case 9:
985 #line 59 "frontends/ilang/ilang_lexer.l"
986 { return TOK_UPTO; }
987  YY_BREAK
988 case 10:
990 #line 60 "frontends/ilang/ilang_lexer.l"
991 { return TOK_OFFSET; }
992  YY_BREAK
993 case 11:
995 #line 61 "frontends/ilang/ilang_lexer.l"
996 { return TOK_SIZE; }
997  YY_BREAK
998 case 12:
1000 #line 62 "frontends/ilang/ilang_lexer.l"
1001 { return TOK_INPUT; }
1002  YY_BREAK
1003 case 13:
1005 #line 63 "frontends/ilang/ilang_lexer.l"
1006 { return TOK_OUTPUT; }
1007  YY_BREAK
1008 case 14:
1010 #line 64 "frontends/ilang/ilang_lexer.l"
1011 { return TOK_INOUT; }
1012  YY_BREAK
1013 case 15:
1015 #line 65 "frontends/ilang/ilang_lexer.l"
1016 { return TOK_CELL; }
1017  YY_BREAK
1018 case 16:
1020 #line 66 "frontends/ilang/ilang_lexer.l"
1021 { return TOK_CONNECT; }
1022  YY_BREAK
1023 case 17:
1025 #line 67 "frontends/ilang/ilang_lexer.l"
1026 { return TOK_SWITCH; }
1027  YY_BREAK
1028 case 18:
1030 #line 68 "frontends/ilang/ilang_lexer.l"
1031 { return TOK_CASE; }
1032  YY_BREAK
1033 case 19:
1035 #line 69 "frontends/ilang/ilang_lexer.l"
1036 { return TOK_ASSIGN; }
1037  YY_BREAK
1038 case 20:
1040 #line 70 "frontends/ilang/ilang_lexer.l"
1041 { return TOK_SYNC; }
1042  YY_BREAK
1043 case 21:
1045 #line 71 "frontends/ilang/ilang_lexer.l"
1046 { return TOK_LOW; }
1047  YY_BREAK
1048 case 22:
1050 #line 72 "frontends/ilang/ilang_lexer.l"
1051 { return TOK_HIGH; }
1052  YY_BREAK
1053 case 23:
1055 #line 73 "frontends/ilang/ilang_lexer.l"
1056 { return TOK_POSEDGE; }
1057  YY_BREAK
1058 case 24:
1060 #line 74 "frontends/ilang/ilang_lexer.l"
1061 { return TOK_NEGEDGE; }
1062  YY_BREAK
1063 case 25:
1065 #line 75 "frontends/ilang/ilang_lexer.l"
1066 { return TOK_EDGE; }
1067  YY_BREAK
1068 case 26:
1070 #line 76 "frontends/ilang/ilang_lexer.l"
1071 { return TOK_ALWAYS; }
1072  YY_BREAK
1073 case 27:
1075 #line 77 "frontends/ilang/ilang_lexer.l"
1076 { return TOK_INIT; }
1077  YY_BREAK
1078 case 28:
1080 #line 78 "frontends/ilang/ilang_lexer.l"
1081 { return TOK_UPDATE; }
1082  YY_BREAK
1083 case 29:
1085 #line 79 "frontends/ilang/ilang_lexer.l"
1086 { return TOK_PROCESS; }
1087  YY_BREAK
1088 case 30:
1090 #line 80 "frontends/ilang/ilang_lexer.l"
1091 { return TOK_END; }
1092  YY_BREAK
1093 case 31:
1095 #line 82 "frontends/ilang/ilang_lexer.l"
1096 { return TOK_INVALID; }
1097  YY_BREAK
1098 case 32:
1100 #line 84 "frontends/ilang/ilang_lexer.l"
1102  YY_BREAK
1103 case 33:
1105 #line 85 "frontends/ilang/ilang_lexer.l"
1107  YY_BREAK
1108 case 34:
1110 #line 86 "frontends/ilang/ilang_lexer.l"
1112  YY_BREAK
1113 case 35:
1115 #line 88 "frontends/ilang/ilang_lexer.l"
1117  YY_BREAK
1118 case 36:
1120 #line 89 "frontends/ilang/ilang_lexer.l"
1122  YY_BREAK
1123 case 37:
1125 #line 91 "frontends/ilang/ilang_lexer.l"
1126 { BEGIN(STRING); }
1127  YY_BREAK
1128 case 38:
1130 #line 92 "frontends/ilang/ilang_lexer.l"
1131 { yymore(); }
1132  YY_BREAK
1133 case 39:
1135 #line 93 "frontends/ilang/ilang_lexer.l"
1136 {
1137  BEGIN(0);
1138  char *yystr = strdup(rtlil_frontend_ilang_yytext);
1139  yystr[strlen(rtlil_frontend_ilang_yytext) - 1] = 0;
1140  int i = 0, j = 0;
1141  while (yystr[i]) {
1142  if (yystr[i] == '\\' && yystr[i + 1]) {
1143  i++;
1144  if (yystr[i] == 'n')
1145  yystr[i] = '\n';
1146  else if (yystr[i] == 't')
1147  yystr[i] = '\t';
1148  else if ('0' <= yystr[i] && yystr[i] <= '7') {
1149  yystr[i] = yystr[i] - '0';
1150  if ('0' <= yystr[i + 1] && yystr[i + 1] <= '7') {
1151  yystr[i + 1] = yystr[i] * 8 + yystr[i + 1] - '0';
1152  i++;
1153  }
1154  if ('0' <= yystr[i + 1] && yystr[i + 1] <= '7') {
1155  yystr[i + 1] = yystr[i] * 8 + yystr[i + 1] - '0';
1156  i++;
1157  }
1158  }
1159  }
1160  yystr[j++] = yystr[i++];
1161  }
1162  yystr[j] = 0;
1164  return TOK_STRING;
1165 }
1166  YY_BREAK
1167 case 40:
1169 #line 123 "frontends/ilang/ilang_lexer.l"
1170 { yymore(); }
1171  YY_BREAK
1172 case 41:
1174 #line 125 "frontends/ilang/ilang_lexer.l"
1175 /* ignore comments */
1176  YY_BREAK
1177 case 42:
1179 #line 126 "frontends/ilang/ilang_lexer.l"
1180 /* ignore non-newline whitespaces */
1181  YY_BREAK
1182 case 43:
1183 /* rule 43 can match eol */
1185 #line 127 "frontends/ilang/ilang_lexer.l"
1186 { return TOK_EOL; }
1187  YY_BREAK
1188 case 44:
1190 #line 129 "frontends/ilang/ilang_lexer.l"
1191 { return *rtlil_frontend_ilang_yytext; }
1192  YY_BREAK
1193 case 45:
1195 #line 131 "frontends/ilang/ilang_lexer.l"
1196 ECHO;
1197  YY_BREAK
1198 #line 1199 "frontends/ilang/ilang_lexer.cc"
1199 case YY_STATE_EOF(INITIAL):
1200 case YY_STATE_EOF(STRING):
1201  yyterminate();
1202 
1203  case YY_END_OF_BUFFER:
1204  {
1205  /* Amount of text matched not including the EOB char. */
1206  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1207 
1208  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1209  *yy_cp = (yy_hold_char);
1211 
1212  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1213  {
1214  /* We're scanning a new file or input source. It's
1215  * possible that this happened because the user
1216  * just pointed rtlil_frontend_ilang_yyin at a new source and called
1217  * rtlil_frontend_ilang_yylex(). If so, then we have to assure
1218  * consistency between YY_CURRENT_BUFFER and our
1219  * globals. Here is the right place to do so, because
1220  * this is the first action (other than possibly a
1221  * back-up) that will match for the new input source.
1222  */
1223  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1225  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1226  }
1227 
1228  /* Note that here we test for yy_c_buf_p "<=" to the position
1229  * of the first EOB in the buffer, since yy_c_buf_p will
1230  * already have been incremented past the NUL character
1231  * (since all states make transitions on EOB to the
1232  * end-of-buffer state). Contrast this with the test
1233  * in input().
1234  */
1235  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1236  { /* This was really a NUL. */
1237  yy_state_type yy_next_state;
1238 
1239  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1240 
1241  yy_current_state = yy_get_previous_state( );
1242 
1243  /* Okay, we're now positioned to make the NUL
1244  * transition. We couldn't have
1245  * yy_get_previous_state() go ahead and do it
1246  * for us because it doesn't know how to deal
1247  * with the possibility of jamming (and we don't
1248  * want to build jamming into it because then it
1249  * will run more slowly).
1250  */
1251 
1252  yy_next_state = yy_try_NUL_trans( yy_current_state );
1253 
1255 
1256  if ( yy_next_state )
1257  {
1258  /* Consume the NUL. */
1259  yy_cp = ++(yy_c_buf_p);
1260  yy_current_state = yy_next_state;
1261  goto yy_match;
1262  }
1263 
1264  else
1265  {
1266  yy_cp = (yy_c_buf_p);
1267  goto yy_find_action;
1268  }
1269  }
1270 
1271  else switch ( yy_get_next_buffer( ) )
1272  {
1273  case EOB_ACT_END_OF_FILE:
1274  {
1276 
1277  if ( rtlil_frontend_ilang_yywrap( ) )
1278  {
1279  /* Note: because we've taken care in
1280  * yy_get_next_buffer() to have set up
1281  * rtlil_frontend_ilang_yytext, we can now set up
1282  * yy_c_buf_p so that if some total
1283  * hoser (like flex itself) wants to
1284  * call the scanner after we return the
1285  * YY_NULL, it'll still work - another
1286  * YY_NULL will get returned.
1287  */
1289 
1290  yy_act = YY_STATE_EOF(YY_START);
1291  goto do_action;
1292  }
1293 
1294  else
1295  {
1296  if ( ! (yy_did_buffer_switch_on_eof) )
1297  YY_NEW_FILE;
1298  }
1299  break;
1300  }
1301 
1302  case EOB_ACT_CONTINUE_SCAN:
1303  (yy_c_buf_p) =
1304  (yytext_ptr) + yy_amount_of_matched_text;
1305 
1306  yy_current_state = yy_get_previous_state( );
1307 
1308  yy_cp = (yy_c_buf_p);
1310  goto yy_match;
1311 
1312  case EOB_ACT_LAST_MATCH:
1313  (yy_c_buf_p) =
1314  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1315 
1316  yy_current_state = yy_get_previous_state( );
1317 
1318  yy_cp = (yy_c_buf_p);
1320  goto yy_find_action;
1321  }
1322  break;
1323  }
1324 
1325  default:
1327  "fatal flex scanner internal error--no action found" );
1328  } /* end of action switch */
1329  } /* end of scanning one token */
static int yy_did_buffer_switch_on_eof
Definition: ilang_lexer.cc:326
#define YY_MORE_ADJ
Definition: ilang_lexer.cc:612
#define YY_BREAK
Definition: ilang_lexer.cc:827
register char * yy_cp
Definition: ilang_lexer.cc:838
#define yyterminate()
Definition: ilang_lexer.cc:792
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define YY_SC_TO_UI(c)
Definition: ilang_lexer.cc:139
static int yy_n_chars
Definition: ilang_lexer.cc:315
static int yy_start
Definition: ilang_lexer.cc:321
static char yy_hold_char
Definition: ilang_lexer.cc:314
#define YY_BUFFER_NORMAL
Definition: ilang_lexer.cc:277
#define YY_STATE_EOF(state)
Definition: ilang_lexer.cc:155
register int yy_act
Definition: ilang_lexer.cc:839
static char * yy_last_accepting_cpos
Definition: ilang_lexer.cc:600
static int yy_more_len
Definition: ilang_lexer.cc:610
static yyconst flex_int32_t yy_meta[37]
Definition: ilang_lexer.cc:472
unsigned char YY_CHAR
Definition: ilang_lexer.cc:379
static yyconst flex_int16_t yy_base[182]
Definition: ilang_lexer.cc:480
#define YY_FATAL_ERROR(msg)
Definition: ilang_lexer.cc:802
static yyconst flex_int16_t yy_chk[255]
Definition: ilang_lexer.cc:560
static yyconst flex_int16_t yy_accept[176]
Definition: ilang_lexer.cc:417
#define EOB_ACT_END_OF_FILE
Definition: ilang_lexer.cc:189
#define YY_END_OF_BUFFER
Definition: ilang_lexer.cc:409
#define BEGIN
Definition: ilang_lexer.cc:145
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
#define YY_NEW_FILE
Definition: ilang_lexer.cc:158
#define YY_START
Definition: ilang_lexer.cc:151
int rtlil_frontend_ilang_yyleng
Definition: ilang_lexer.cc:316
char * rtlil_frontend_ilang_yytext
Definition: ilang_lexer.cc:614
#define YY_RESTORE_YY_MORE_OFFSET
Definition: ilang_lexer.cc:613
#define ECHO
Definition: ilang_lexer.cc:748
#define yytext_ptr
Definition: ilang_lexer.cc:390
#define EOB_ACT_LAST_MATCH
Definition: ilang_lexer.cc:190
#define YY_BUFFER_NEW
Definition: ilang_lexer.cc:276
int yy_state_type
Definition: ilang_lexer.cc:383
static yyconst flex_int32_t yy_ec[256]
Definition: ilang_lexer.cc:440
#define yymore()
Definition: ilang_lexer.cc:611
#define YY_RULE_SETUP
Definition: ilang_lexer.cc:830
static yy_state_type yy_last_accepting_state
Definition: ilang_lexer.cc:599
static int yy_get_next_buffer(void)
YYSTYPE rtlil_frontend_ilang_yylval
register char * yy_bp
Definition: ilang_lexer.cc:838
#define rtlil_frontend_ilang_yywrap(n)
Definition: ilang_lexer.cc:376
static yyconst flex_int16_t yy_def[182]
Definition: ilang_lexer.cc:504
static int yy_more_flag
Definition: ilang_lexer.cc:609
#define STRING
Definition: ilang_lexer.cc:658
int rtlil_frontend_ilang_yylineno
Definition: ilang_lexer.cc:387
static yy_state_type yy_get_previous_state(void)
static yyconst flex_int16_t yy_nxt[255]
Definition: ilang_lexer.cc:528
#define INITIAL
Definition: ilang_lexer.cc:657
#define EOB_ACT_CONTINUE_SCAN
Definition: ilang_lexer.cc:188
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
static yyconst flex_int32_t yy_rule_can_match_eol[46]
Definition: ilang_lexer.cc:593
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311
#define YY_DO_BEFORE_ACTION
Definition: ilang_lexer.cc:400

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void yy_fatal_error ( yyconst char  msg[])
static
static void yy_fatal_error ( yyconst char *  msg)
static

Definition at line 1964 of file ilang_lexer.cc.

1965 {
1966  (void) fprintf( stderr, "%s\n", msg );
1967  exit( YY_EXIT_FAILURE );
1968 }
#define YY_EXIT_FAILURE
static int yy_get_next_buffer ( void  )
static

Definition at line 1339 of file ilang_lexer.cc.

1340 {
1341  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1342  register char *source = (yytext_ptr);
1343  register int number_to_move, i;
1344  int ret_val;
1345 
1346  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1348  "fatal flex scanner internal error--end of buffer missed" );
1349 
1350  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1351  { /* Don't try to fill the buffer, so this is an EOF. */
1352  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1353  {
1354  /* We matched a single character, the EOB, so
1355  * treat this as a final EOF.
1356  */
1357  return EOB_ACT_END_OF_FILE;
1358  }
1359 
1360  else
1361  {
1362  /* We matched some text prior to the EOB, first
1363  * process it.
1364  */
1365  return EOB_ACT_LAST_MATCH;
1366  }
1367  }
1368 
1369  /* Try to read more data. */
1370 
1371  /* First move last chars to start of buffer. */
1372  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1373 
1374  for ( i = 0; i < number_to_move; ++i )
1375  *(dest++) = *(source++);
1376 
1377  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1378  /* don't do the read, it's not guaranteed to return an EOF,
1379  * just force an EOF
1380  */
1381  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1382 
1383  else
1384  {
1385  int num_to_read =
1386  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1387 
1388  while ( num_to_read <= 0 )
1389  { /* Not enough room in the buffer - grow it. */
1390 
1391  /* just a shorter name for the current buffer */
1393 
1394  int yy_c_buf_p_offset =
1395  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1396 
1397  if ( b->yy_is_our_buffer )
1398  {
1399  int new_size = b->yy_buf_size * 2;
1400 
1401  if ( new_size <= 0 )
1402  b->yy_buf_size += b->yy_buf_size / 8;
1403  else
1404  b->yy_buf_size *= 2;
1405 
1406  b->yy_ch_buf = (char *)
1407  /* Include room in for 2 EOB chars. */
1409  }
1410  else
1411  /* Can't grow it, we don't own it. */
1412  b->yy_ch_buf = 0;
1413 
1414  if ( ! b->yy_ch_buf )
1416  "fatal error - scanner input buffer overflow" );
1417 
1418  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1419 
1420  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1421  number_to_move - 1;
1422 
1423  }
1424 
1425  if ( num_to_read > YY_READ_BUF_SIZE )
1426  num_to_read = YY_READ_BUF_SIZE;
1427 
1428  /* Read in more data. */
1429  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1430  (yy_n_chars), (size_t) num_to_read );
1431 
1432  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1433  }
1434 
1435  if ( (yy_n_chars) == 0 )
1436  {
1437  if ( number_to_move == YY_MORE_ADJ )
1438  {
1439  ret_val = EOB_ACT_END_OF_FILE;
1441  }
1442 
1443  else
1444  {
1445  ret_val = EOB_ACT_LAST_MATCH;
1446  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1448  }
1449  }
1450 
1451  else
1452  ret_val = EOB_ACT_CONTINUE_SCAN;
1453 
1454  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1455  /* Extend the array by 50%, plus the number we really need. */
1456  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1457  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) rtlil_frontend_ilang_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1458  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1459  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1460  }
1461 
1462  (yy_n_chars) += number_to_move;
1465 
1466  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1467 
1468  return ret_val;
1469 }
#define YY_MORE_ADJ
Definition: ilang_lexer.cc:612
static int yy_n_chars
Definition: ilang_lexer.cc:315
#define YY_BUFFER_EOF_PENDING
Definition: ilang_lexer.cc:288
#define YY_INPUT(buf, result, max_size)
Definition: ilang_lexer.cc:651
void rtlil_frontend_ilang_yyrestart(FILE *input_file)
#define YY_FATAL_ERROR(msg)
Definition: ilang_lexer.cc:802
yy_size_t yy_buf_size
Definition: ilang_lexer.cc:240
#define EOB_ACT_END_OF_FILE
Definition: ilang_lexer.cc:189
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
size_t yy_size_t
Definition: ilang_lexer.cc:225
#define yytext_ptr
Definition: ilang_lexer.cc:390
#define EOB_ACT_LAST_MATCH
Definition: ilang_lexer.cc:190
#define YY_READ_BUF_SIZE
Definition: ilang_lexer.cc:739
void * rtlil_frontend_ilang_yyrealloc(void *, yy_size_t)
#define YY_END_OF_BUFFER_CHAR
Definition: ilang_lexer.cc:160
#define YY_CURRENT_BUFFER
Definition: ilang_lexer.cc:304
#define EOB_ACT_CONTINUE_SCAN
Definition: ilang_lexer.cc:188
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381
#define YY_CURRENT_BUFFER_LVALUE
Definition: ilang_lexer.cc:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 1473 of file ilang_lexer.cc.

1474 {
1475  register yy_state_type yy_current_state;
1476  register char *yy_cp;
1477 
1478  yy_current_state = (yy_start);
1479 
1480  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1481  {
1482  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1483  if ( yy_accept[yy_current_state] )
1484  {
1485  (yy_last_accepting_state) = yy_current_state;
1486  (yy_last_accepting_cpos) = yy_cp;
1487  }
1488  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1489  {
1490  yy_current_state = (int) yy_def[yy_current_state];
1491  if ( yy_current_state >= 176 )
1492  yy_c = yy_meta[(unsigned int) yy_c];
1493  }
1494  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1495  }
1496 
1497  return yy_current_state;
1498 }
#define YY_MORE_ADJ
Definition: ilang_lexer.cc:612
register char * yy_cp
Definition: ilang_lexer.cc:838
#define YY_SC_TO_UI(c)
Definition: ilang_lexer.cc:139
static int yy_start
Definition: ilang_lexer.cc:321
static char * yy_last_accepting_cpos
Definition: ilang_lexer.cc:600
static yyconst flex_int32_t yy_meta[37]
Definition: ilang_lexer.cc:472
unsigned char YY_CHAR
Definition: ilang_lexer.cc:379
static yyconst flex_int16_t yy_base[182]
Definition: ilang_lexer.cc:480
static yyconst flex_int16_t yy_chk[255]
Definition: ilang_lexer.cc:560
static yyconst flex_int16_t yy_accept[176]
Definition: ilang_lexer.cc:417
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
#define yytext_ptr
Definition: ilang_lexer.cc:390
int yy_state_type
Definition: ilang_lexer.cc:383
static yyconst flex_int32_t yy_ec[256]
Definition: ilang_lexer.cc:440
static yy_state_type yy_last_accepting_state
Definition: ilang_lexer.cc:599
static yyconst flex_int16_t yy_def[182]
Definition: ilang_lexer.cc:504
static yyconst flex_int16_t yy_nxt[255]
Definition: ilang_lexer.cc:528

+ Here is the caller graph for this function:

static int yy_init_globals ( void  )
static

Definition at line 2067 of file ilang_lexer.cc.

2068 {
2069  /* Initialization is the same as for the non-reentrant scanner.
2070  * This function is called from rtlil_frontend_ilang_yylex_destroy(), so don't allocate here.
2071  */
2072 
2073  /* We do not touch rtlil_frontend_ilang_yylineno unless the option is enabled. */
2075 
2076  (yy_buffer_stack) = 0;
2077  (yy_buffer_stack_top) = 0;
2078  (yy_buffer_stack_max) = 0;
2079  (yy_c_buf_p) = (char *) 0;
2080  (yy_init) = 0;
2081  (yy_start) = 0;
2082 
2083 /* Defined in main.c */
2084 #ifdef YY_STDINIT
2085  rtlil_frontend_ilang_yyin = stdin;
2086  rtlil_frontend_ilang_yyout = stdout;
2087 #else
2088  rtlil_frontend_ilang_yyin = (FILE *) 0;
2089  rtlil_frontend_ilang_yyout = (FILE *) 0;
2090 #endif
2091 
2092  /* For future reference: Set errno on error, since we are called by
2093  * rtlil_frontend_ilang_yylex_init()
2094  */
2095  return 0;
2096 }
static int yy_start
Definition: ilang_lexer.cc:321
static YY_BUFFER_STATE * yy_buffer_stack
Definition: ilang_lexer.cc:296
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
static int yy_init
Definition: ilang_lexer.cc:320
static size_t yy_buffer_stack_max
Definition: ilang_lexer.cc:295
static size_t yy_buffer_stack_top
Definition: ilang_lexer.cc:294
int rtlil_frontend_ilang_yylineno
Definition: ilang_lexer.cc:387
FILE * rtlil_frontend_ilang_yyout
Definition: ilang_lexer.cc:381
FILE * rtlil_frontend_ilang_yyin
Definition: ilang_lexer.cc:381

+ Here is the caller graph for this function:

static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

Definition at line 1505 of file ilang_lexer.cc.

1506 {
1507  register int yy_is_jam;
1508  register char *yy_cp = (yy_c_buf_p);
1509 
1510  register YY_CHAR yy_c = 1;
1511  if ( yy_accept[yy_current_state] )
1512  {
1513  (yy_last_accepting_state) = yy_current_state;
1514  (yy_last_accepting_cpos) = yy_cp;
1515  }
1516  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1517  {
1518  yy_current_state = (int) yy_def[yy_current_state];
1519  if ( yy_current_state >= 176 )
1520  yy_c = yy_meta[(unsigned int) yy_c];
1521  }
1522  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1523  yy_is_jam = (yy_current_state == 175);
1524 
1525  return yy_is_jam ? 0 : yy_current_state;
1526 }
register char * yy_cp
Definition: ilang_lexer.cc:838
static char * yy_last_accepting_cpos
Definition: ilang_lexer.cc:600
static yyconst flex_int32_t yy_meta[37]
Definition: ilang_lexer.cc:472
unsigned char YY_CHAR
Definition: ilang_lexer.cc:379
static yyconst flex_int16_t yy_base[182]
Definition: ilang_lexer.cc:480
static yyconst flex_int16_t yy_chk[255]
Definition: ilang_lexer.cc:560
static yyconst flex_int16_t yy_accept[176]
Definition: ilang_lexer.cc:417
static char * yy_c_buf_p
Definition: ilang_lexer.cc:319
static yy_state_type yy_last_accepting_state
Definition: ilang_lexer.cc:599
static yyconst flex_int16_t yy_def[182]
Definition: ilang_lexer.cc:504
static yyconst flex_int16_t yy_nxt[255]
Definition: ilang_lexer.cc:528

+ Here is the caller graph for this function:

Variable Documentation

int rtlil_frontend_ilang_yy_flex_debug = 0

Definition at line 603 of file ilang_lexer.cc.

FILE * rtlil_frontend_ilang_yyin = (FILE *) 0

Definition at line 381 of file ilang_lexer.cc.

int rtlil_frontend_ilang_yyleng

Definition at line 316 of file ilang_lexer.cc.

int rtlil_frontend_ilang_yylineno = 1

Definition at line 387 of file ilang_lexer.cc.

FILE * rtlil_frontend_ilang_yyout = (FILE *) 0

Definition at line 381 of file ilang_lexer.cc.

char * rtlil_frontend_ilang_yytext

Definition at line 614 of file ilang_lexer.cc.

yyconst flex_int16_t yy_accept[176]
static
Initial value:
=
{ 0,
0, 0, 0, 0, 46, 44, 42, 43, 43, 37,
41, 44, 44, 44, 36, 44, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
40, 45, 39, 40, 43, 41, 33, 36, 34, 35,
36, 32, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 38, 35,
31, 31, 31, 31, 31, 31, 31, 31, 30, 31,
31, 31, 31, 21, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 18, 15, 31, 25, 22, 27,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 11, 31, 20, 31, 9, 31, 6, 31, 31,
31, 31, 31, 14, 12, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 8, 26, 19, 31,
31, 31, 7, 2, 31, 10, 13, 31, 31, 31,
5, 17, 28, 31, 1, 16, 24, 31, 23, 29,
31, 31, 3, 4, 0
}

Definition at line 417 of file ilang_lexer.cc.

register int yy_act

Definition at line 839 of file ilang_lexer.cc.

yyconst flex_int16_t yy_base[182]
static
Initial value:
=
{ 0,
0, 0, 34, 35, 217, 218, 218, 38, 40, 218,
0, 0, 34, 38, 43, 0, 28, 0, 39, 39,
194, 189, 187, 43, 195, 43, 49, 46, 184, 189,
218, 218, 218, 0, 68, 0, 0, 62, 71, 75,
77, 0, 0, 177, 179, 177, 176, 176, 181, 178,
183, 185, 181, 65, 167, 174, 181, 177, 177, 164,
165, 163, 165, 44, 169, 164, 60, 73, 218, 85,
175, 166, 158, 159, 167, 160, 157, 164, 0, 160,
149, 147, 146, 0, 150, 144, 157, 144, 145, 158,
153, 154, 143, 150, 136, 150, 151, 137, 132, 144,
126, 140, 137, 136, 0, 0, 139, 0, 0, 0,
125, 124, 125, 129, 135, 133, 118, 124, 131, 129,
128, 0, 129, 0, 113, 0, 122, 0, 112, 114,
121, 118, 116, 0, 0, 96, 110, 100, 87, 86,
98, 95, 84, 96, 91, 90, 0, 0, 0, 75,
72, 74, 0, 0, 86, 0, 0, 72, 83, 69,
0, 0, 0, 67, 0, 0, 0, 79, 0, 0,
77, 40, 0, 0, 218, 121, 125, 129, 133, 63,
137
}

Definition at line 480 of file ilang_lexer.cc.

register char * yy_bp

Definition at line 838 of file ilang_lexer.cc.

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 296 of file ilang_lexer.cc.

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 295 of file ilang_lexer.cc.

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 294 of file ilang_lexer.cc.

char* yy_c_buf_p = (char *) 0
static

Definition at line 319 of file ilang_lexer.cc.

yyconst flex_int16_t yy_chk[255]
static

Definition at line 560 of file ilang_lexer.cc.

register char* yy_cp

Definition at line 838 of file ilang_lexer.cc.

YY_DECL
Initial value:
{
register yy_state_type yy_current_state
int yy_state_type
Definition: ilang_lexer.cc:383

The main scanner function which does all the work.

Definition at line 836 of file ilang_lexer.cc.

yyconst flex_int16_t yy_def[182]
static
Initial value:
=
{ 0,
175, 1, 176, 176, 175, 175, 175, 175, 175, 175,
177, 178, 175, 175, 175, 179, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
175, 175, 175, 181, 175, 177, 178, 175, 175, 175,
175, 179, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 175, 175,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 180, 180, 0, 175, 175, 175, 175, 175,
175
}

Definition at line 504 of file ilang_lexer.cc.

int yy_did_buffer_switch_on_eof
static

Definition at line 326 of file ilang_lexer.cc.

yyconst flex_int32_t yy_ec[256]
static

Definition at line 440 of file ilang_lexer.cc.

char yy_hold_char
static

Definition at line 314 of file ilang_lexer.cc.

int yy_init = 0
static

Definition at line 320 of file ilang_lexer.cc.

char* yy_last_accepting_cpos
static

Definition at line 600 of file ilang_lexer.cc.

yy_state_type yy_last_accepting_state
static

Definition at line 599 of file ilang_lexer.cc.

yyconst flex_int32_t yy_meta[37]
static
Initial value:
=
{ 0,
1, 2, 3, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4
}

Definition at line 472 of file ilang_lexer.cc.

int yy_more_flag = 0
static

Definition at line 609 of file ilang_lexer.cc.

int yy_more_len = 0
static

Definition at line 610 of file ilang_lexer.cc.

int yy_n_chars
static

Definition at line 315 of file ilang_lexer.cc.

yyconst flex_int16_t yy_nxt[255]
static

Definition at line 528 of file ilang_lexer.cc.

yyconst flex_int32_t yy_rule_can_match_eol[46]
static
Initial value:
=
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, }

Definition at line 593 of file ilang_lexer.cc.

int yy_start = 0
static

Definition at line 321 of file ilang_lexer.cc.