verilog_flex.c File Reference

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "types.h"
#include "globals.h"
#include "verilog_bison.h"
#include <unistd.h>
Include dependency graph for verilog_flex.c:

Go to the source code of this file.

Data Structures

struct  yy_buffer_state
struct  yy_trans_info

Defines

#define YY_INT_ALIGNED   short int
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION   2
#define YY_FLEX_MINOR_VERSION   5
#define YY_FLEX_SUBMINOR_VERSION   33
#define FLEX_BETA
#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   yyrestart(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   yy_flush_buffer(YY_CURRENT_BUFFER )
#define yy_new_buffer   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 yytext_ptr   yytext
#define YY_DO_BEFORE_ACTION
#define YY_NUM_RULES   78
#define YY_END_OF_BUFFER   79
#define REJECT   reject_used_but_not_detected
#define yymore()   yymore_used_but_not_detected
#define YY_MORE_ADJ   0
#define YY_RESTORE_YY_MORE_OFFSET
#define MP   {if (to_view_parse) {printf("%d %s\n", yylineno, yytext);}}
#define INITIAL   0
#define COMMENT   1
#define YY_EXTRA_TYPE   void *
#define YY_READ_BUF_SIZE   8192
#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )
#define YY_INPUT(buf, result, max_size)
#define yyterminate()   return YY_NULL
#define YY_START_STACK_INCR   25
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
#define YY_DECL_IS_OURS   1
#define YY_DECL   int 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 unsigned int yy_size_t
typedef unsigned char YY_CHAR
typedef int yy_state_type

Functions

void yyrestart (FILE *input_file)
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer)
YY_BUFFER_STATE yy_create_buffer (FILE *file, int size)
void yy_delete_buffer (YY_BUFFER_STATE b)
void yy_flush_buffer (YY_BUFFER_STATE b)
void yypush_buffer_state (YY_BUFFER_STATE new_buffer)
void yypop_buffer_state (void)
static void yyensure_buffer_stack (void)
static void yy_load_buffer_state (void)
static void yy_init_buffer (YY_BUFFER_STATE b, FILE *file)
YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size)
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str)
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes, int len)
void * yyalloc (yy_size_t)
void * yyrealloc (void *, yy_size_t)
void 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 yywrap (void)
static void yyunput (int c, char *buf_ptr)
static int input (void)
int yylex (void)
static void yy_fatal_error (yyconst char *msg)
int yyget_lineno (void)
FILE * yyget_in (void)
FILE * yyget_out (void)
int yyget_leng (void)
char * yyget_text (void)
void yyset_lineno (int line_number)
void yyset_in (FILE *in_str)
void yyset_out (FILE *out_str)
int yyget_debug (void)
void yyset_debug (int bdebug)
int yylex_destroy (void)

Variables

int yyleng
FILE * yyin = (FILE *) 0
FILE * 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 yylineno = 1
char * yytext
static yyconst flex_int16_t yy_accept [280]
static yyconst flex_int32_t yy_ec [256]
static yyconst flex_int32_t yy_meta [47]
static yyconst flex_int16_t yy_base [288]
static yyconst flex_int16_t yy_def [288]
static yyconst flex_int16_t yy_nxt [402]
static yyconst flex_int16_t yy_chk [402]
static yy_state_type yy_last_accepting_state
static char * yy_last_accepting_cpos
int yy_flex_debug = 0

Define Documentation

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 124 of file verilog_flex.c.

#define COMMENT   1

Definition at line 672 of file verilog_flex.c.

#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )

Definition at line 730 of file verilog_flex.c.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 159 of file verilog_flex.c.

#define EOB_ACT_END_OF_FILE   1

Definition at line 160 of file verilog_flex.c.

#define EOB_ACT_LAST_MATCH   2

Definition at line 161 of file verilog_flex.c.

#define FLEX_BETA

Definition at line 14 of file verilog_flex.c.

#define FLEX_SCANNER

Definition at line 9 of file verilog_flex.c.

#define INITIAL   0

Definition at line 671 of file verilog_flex.c.

#define INT16_MAX   (32767)

Definition at line 73 of file verilog_flex.c.

#define INT16_MIN   (-32767-1)

Definition at line 64 of file verilog_flex.c.

#define INT32_MAX   (2147483647)

Definition at line 76 of file verilog_flex.c.

#define INT32_MIN   (-2147483647-1)

Definition at line 67 of file verilog_flex.c.

#define INT8_MAX   (127)

Definition at line 70 of file verilog_flex.c.

#define MP   {if (to_view_parse) {printf("%d %s\n", yylineno, yytext);}}

Definition at line 666 of file verilog_flex.c.

#define REJECT   reject_used_but_not_detected

Definition at line 628 of file verilog_flex.c.

#define UINT16_MAX   (65535U)

Definition at line 82 of file verilog_flex.c.

#define UINT32_MAX   (4294967295U)

Definition at line 85 of file verilog_flex.c.

#define UINT8_MAX   (255U)

Definition at line 79 of file verilog_flex.c.

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

Definition at line 179 of file verilog_flex.c.

 
#define YY_AT_BOL (  )     (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 335 of file verilog_flex.c.

#define YY_BREAK   break;

Definition at line 809 of file verilog_flex.c.

#define YY_BUF_SIZE   16384

Definition at line 143 of file verilog_flex.c.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 251 of file verilog_flex.c.

#define YY_BUFFER_NEW   0

Definition at line 239 of file verilog_flex.c.

#define YY_BUFFER_NORMAL   1

Definition at line 240 of file verilog_flex.c.

#define YY_CURRENT_BUFFER
Value:

Definition at line 267 of file verilog_flex.c.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 274 of file verilog_flex.c.

#define YY_DECL   int yylex (void)

Definition at line 797 of file verilog_flex.c.

#define YY_DECL_IS_OURS   1

Definition at line 793 of file verilog_flex.c.

#define YY_DO_BEFORE_ACTION
Value:
(yytext_ptr) = yy_bp; \
        yyleng = (size_t) (yy_cp - yy_bp); \
        (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
        (yy_c_buf_p) = yy_cp;

Definition at line 360 of file verilog_flex.c.

#define YY_END_OF_BUFFER   79

Definition at line 368 of file verilog_flex.c.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 139 of file verilog_flex.c.

#define YY_EXIT_FAILURE   2

Definition at line 2089 of file verilog_flex.c.

#define YY_EXTRA_TYPE   void *

Definition at line 683 of file verilog_flex.c.

#define YY_FATAL_ERROR ( msg   )     yy_fatal_error( msg )

Definition at line 784 of file verilog_flex.c.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 10 of file verilog_flex.c.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 11 of file verilog_flex.c.

#define YY_FLEX_SUBMINOR_VERSION   33

Definition at line 12 of file verilog_flex.c.

#define YY_FLUSH_BUFFER   yy_flush_buffer(YY_CURRENT_BUFFER )

Definition at line 303 of file verilog_flex.c.

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

Definition at line 737 of file verilog_flex.c.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file verilog_flex.c.

#define YY_LESS_LINENO (  ) 

Definition at line 163 of file verilog_flex.c.

#define YY_MORE_ADJ   0

Definition at line 630 of file verilog_flex.c.

#define yy_new_buffer   yy_create_buffer

Definition at line 313 of file verilog_flex.c.

#define YY_NEW_FILE   yyrestart(yyin )

Definition at line 137 of file verilog_flex.c.

#define YY_NULL   0

Definition at line 111 of file verilog_flex.c.

#define YY_NUM_RULES   78

Definition at line 367 of file verilog_flex.c.

#define YY_READ_BUF_SIZE   8192

Definition at line 722 of file verilog_flex.c.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 631 of file verilog_flex.c.

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 812 of file verilog_flex.c.

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

Definition at line 118 of file verilog_flex.c.

#define yy_set_bol ( at_bol   ) 
Value:

Definition at line 325 of file verilog_flex.c.

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

Definition at line 315 of file verilog_flex.c.

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

Definition at line 130 of file verilog_flex.c.

#define YY_START_STACK_INCR   25

Definition at line 779 of file verilog_flex.c.

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

Definition at line 148 of file verilog_flex.c.

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

Definition at line 134 of file verilog_flex.c.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 192 of file verilog_flex.c.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 151 of file verilog_flex.c.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 187 of file verilog_flex.c.

#define YY_USER_ACTION

Definition at line 804 of file verilog_flex.c.

#define yyconst

Definition at line 107 of file verilog_flex.c.

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

Definition at line 2101 of file verilog_flex.c.

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

Definition at line 2101 of file verilog_flex.c.

 
#define yymore (  )     yymore_used_but_not_detected

Definition at line 629 of file verilog_flex.c.

#define YYSTATE   YY_START

Definition at line 131 of file verilog_flex.c.

#define YYTABLES_NAME   "yytables"

Definition at line 2291 of file verilog_flex.c.

 
#define yyterminate (  )     return YY_NULL

Definition at line 774 of file verilog_flex.c.

#define yytext_ptr   yytext

Definition at line 350 of file verilog_flex.c.


Typedef Documentation

typedef short int flex_int16_t

Definition at line 52 of file verilog_flex.c.

typedef int flex_int32_t

Definition at line 53 of file verilog_flex.c.

typedef signed char flex_int8_t

Definition at line 51 of file verilog_flex.c.

typedef unsigned short int flex_uint16_t

Definition at line 55 of file verilog_flex.c.

typedef unsigned int flex_uint32_t

Definition at line 56 of file verilog_flex.c.

typedef unsigned char flex_uint8_t

Definition at line 54 of file verilog_flex.c.

Definition at line 152 of file verilog_flex.c.

typedef unsigned char YY_CHAR

Definition at line 339 of file verilog_flex.c.

typedef unsigned int yy_size_t

Definition at line 188 of file verilog_flex.c.

typedef int yy_state_type

Definition at line 343 of file verilog_flex.c.


Function Documentation

static int input ( void   )  [static]

Here is the caller graph for this function:

YY_BUFFER_STATE yy_create_buffer ( FILE *  file,
int  size 
)
void yy_delete_buffer ( YY_BUFFER_STATE  b  ) 

Here is the caller graph for this function:

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

Definition at line 2092 of file verilog_flex.c.

02093 {
02094         (void) fprintf( stderr, "%s\n", msg );
02095         exit( YY_EXIT_FAILURE );
02096 }

static void yy_fatal_error ( yyconst char  msg[]  )  [static]
void yy_flush_buffer ( YY_BUFFER_STATE  b  ) 

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

Parameters:
b the buffer state to be flushed, usually YY_CURRENT_BUFFER.

Definition at line 1885 of file verilog_flex.c.

01886 {
01887         if ( ! b )
01888                 return;
01889 
01890         b->yy_n_chars = 0;
01891 
01892         /* We always need two end-of-buffer characters.  The first causes
01893          * a transition to the end-of-buffer state.  The second causes
01894          * a jam in that state.
01895          */
01896         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01897         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01898 
01899         b->yy_buf_pos = &b->yy_ch_buf[0];
01900 
01901         b->yy_at_bol = 1;
01902         b->yy_buffer_status = YY_BUFFER_NEW;
01903 
01904         if ( b == YY_CURRENT_BUFFER )
01905                 yy_load_buffer_state( );
01906 }

Here is the call graph for this function:

Here is the caller graph for this function:

static int yy_get_next_buffer ( void   )  [static]
static yy_state_type yy_get_previous_state ( void   )  [static]
static void yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
) [static]

The main scanner function which does all the work.

Definition at line 1857 of file verilog_flex.c.

01859 {
01860         int oerrno = errno;
01861     
01862         yy_flush_buffer(b );
01863 
01864         b->yy_input_file = file;
01865         b->yy_fill_buffer = 1;
01866 
01867     /* If b is the current buffer, then yy_init_buffer was _probably_
01868      * called from yyrestart() or through yy_get_next_buffer.
01869      * In that case, we don't want to reset the lineno or column.
01870      */
01871     if (b != YY_CURRENT_BUFFER){
01872         b->yy_bs_lineno = 1;
01873         b->yy_bs_column = 0;
01874     }
01875 
01876         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01877     
01878         errno = oerrno;
01879 }

Here is the call graph for this function:

static int yy_init_globals ( void   )  [static]

Definition at line 2195 of file verilog_flex.c.

02196 {
02197         /* Initialization is the same as for the non-reentrant scanner.
02198      * This function is called from yylex_destroy(), so don't allocate here.
02199      */
02200 
02201     (yy_buffer_stack) = 0;
02202     (yy_buffer_stack_top) = 0;
02203     (yy_buffer_stack_max) = 0;
02204     (yy_c_buf_p) = (char *) 0;
02205     (yy_init) = 0;
02206     (yy_start) = 0;
02207 
02208 /* Defined in main.c */
02209 #ifdef YY_STDINIT
02210     yyin = stdin;
02211     yyout = stdout;
02212 #else
02213     yyin = (FILE *) 0;
02214     yyout = (FILE *) 0;
02215 #endif
02216 
02217     /* For future reference: Set errno on error, since we are called by
02218      * yylex_init()
02219      */
02220     return 0;
02221 }

Here is the caller graph for this function:

static void yy_load_buffer_state ( void   )  [static]

Here is the caller graph for this function:

YY_BUFFER_STATE yy_scan_buffer ( char *  base,
yy_size_t  size 
)

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

Parameters:
base the character buffer
size the size in bytes of the character buffer
Returns:
the newly allocated buffer state object.

Definition at line 2008 of file verilog_flex.c.

02009 {
02010         YY_BUFFER_STATE b;
02011     
02012         if ( size < 2 ||
02013              base[size-2] != YY_END_OF_BUFFER_CHAR ||
02014              base[size-1] != YY_END_OF_BUFFER_CHAR )
02015                 /* They forgot to leave room for the EOB's. */
02016                 return 0;
02017 
02018         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
02019         if ( ! b )
02020                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
02021 
02022         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
02023         b->yy_buf_pos = b->yy_ch_buf = base;
02024         b->yy_is_our_buffer = 0;
02025         b->yy_input_file = 0;
02026         b->yy_n_chars = b->yy_buf_size;
02027         b->yy_is_interactive = 0;
02028         b->yy_at_bol = 1;
02029         b->yy_fill_buffer = 0;
02030         b->yy_buffer_status = YY_BUFFER_NEW;
02031 
02032         yy_switch_to_buffer(b  );
02033 
02034         return b;
02035 }

Here is the call graph for this function:

Here is the caller graph for this function:

YY_BUFFER_STATE yy_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

Setup the input buffer state to scan the given bytes. The next call to yylex() will scan from a copy of bytes.

Parameters:
bytes the byte buffer to scan
len the number of bytes in the buffer pointed to by bytes.
Returns:
the newly allocated buffer state object.

Definition at line 2058 of file verilog_flex.c.

02059 {
02060         YY_BUFFER_STATE b;
02061         char *buf;
02062         yy_size_t n;
02063         int i;
02064     
02065         /* Get memory for full buffer, including space for trailing EOB's. */
02066         n = _yybytes_len + 2;
02067         buf = (char *) yyalloc(n  );
02068         if ( ! buf )
02069                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
02070 
02071         for ( i = 0; i < _yybytes_len; ++i )
02072                 buf[i] = yybytes[i];
02073 
02074         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
02075 
02076         b = yy_scan_buffer(buf,n );
02077         if ( ! b )
02078                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
02079 
02080         /* It's okay to grow etc. this buffer, and we should throw it
02081          * away when we're done.
02082          */
02083         b->yy_is_our_buffer = 1;
02084 
02085         return b;
02086 }

Here is the call graph for this function:

Here is the caller graph for this function:

YY_BUFFER_STATE yy_scan_string ( yyconst char *  yystr  ) 

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

Parameters:
str a 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 yy_scan_bytes() instead.

Definition at line 2045 of file verilog_flex.c.

02046 {
02047     
02048         return yy_scan_bytes(yystr,strlen(yystr) );
02049 }

Here is the call graph for this function:

void yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer  ) 

Here is the caller graph for this function:

static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state  )  [static]
void * yyalloc ( yy_size_t  size  ) 

Definition at line 2269 of file verilog_flex.c.

02270 {
02271         return (void *) malloc( size );
02272 }

Here is the caller graph for this function:

static void yyensure_buffer_stack ( void   )  [static]

Definition at line 1963 of file verilog_flex.c.

01964 {
01965         int num_to_alloc;
01966     
01967         if (!(yy_buffer_stack)) {
01968 
01969                 /* First allocation is just for 2 elements, since we don't know if this
01970                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
01971                  * immediate realloc on the next call.
01972          */
01973                 num_to_alloc = 1;
01974                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
01975                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
01976                                                                 );
01977                 
01978                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01979                                 
01980                 (yy_buffer_stack_max) = num_to_alloc;
01981                 (yy_buffer_stack_top) = 0;
01982                 return;
01983         }
01984 
01985         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
01986 
01987                 /* Increase the buffer to prepare for a possible push. */
01988                 int grow_size = 8 /* arbitrary grow size */;
01989 
01990                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
01991                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
01992                                                                 ((yy_buffer_stack),
01993                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
01994                                                                 );
01995 
01996                 /* zero only the new slots.*/
01997                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
01998                 (yy_buffer_stack_max) = num_to_alloc;
01999         }
02000 }

Here is the call graph for this function:

Here is the caller graph for this function:

void yyfree ( void *  ptr  ) 

Definition at line 2286 of file verilog_flex.c.

02287 {
02288         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
02289 }

Here is the caller graph for this function:

int yyget_debug ( void   ) 

Definition at line 2185 of file verilog_flex.c.

02186 {
02187         return yy_flex_debug;
02188 }

FILE* yyget_in ( void   ) 

Get the input stream.

Definition at line 2129 of file verilog_flex.c.

02130 {
02131         return yyin;
02132 }

int yyget_leng ( void   ) 

Get the length of the current token.

Definition at line 2145 of file verilog_flex.c.

02146 {
02147         return yyleng;
02148 }

int yyget_lineno ( void   ) 

Get the current line number.

Definition at line 2120 of file verilog_flex.c.

02121 {
02122         
02123     return yylineno;
02124 }

FILE* yyget_out ( void   ) 

Get the output stream.

Definition at line 2137 of file verilog_flex.c.

02138 {
02139         return yyout;
02140 }

char* yyget_text ( void   ) 

Get the current token.

Definition at line 2154 of file verilog_flex.c.

02155 {
02156         return yytext;
02157 }

int yylex ( void   ) 
int yylex_destroy ( void   ) 

Definition at line 2224 of file verilog_flex.c.

02225 {
02226     
02227     /* Pop the buffer stack, destroying each element. */
02228         while(YY_CURRENT_BUFFER){
02229                 yy_delete_buffer(YY_CURRENT_BUFFER  );
02230                 YY_CURRENT_BUFFER_LVALUE = NULL;
02231                 yypop_buffer_state();
02232         }
02233 
02234         /* Destroy the stack itself. */
02235         yyfree((yy_buffer_stack) );
02236         (yy_buffer_stack) = NULL;
02237 
02238     /* Reset the globals. This is important in a non-reentrant scanner so the next time
02239      * yylex() is called, initialization will occur. */
02240     yy_init_globals( );
02241 
02242     return 0;
02243 }

Here is the call graph for this function:

void yypop_buffer_state ( void   ) 

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

Definition at line 1944 of file verilog_flex.c.

01945 {
01946         if (!YY_CURRENT_BUFFER)
01947                 return;
01948 
01949         yy_delete_buffer(YY_CURRENT_BUFFER );
01950         YY_CURRENT_BUFFER_LVALUE = NULL;
01951         if ((yy_buffer_stack_top) > 0)
01952                 --(yy_buffer_stack_top);
01953 
01954         if (YY_CURRENT_BUFFER) {
01955                 yy_load_buffer_state( );
01956                 (yy_did_buffer_switch_on_eof) = 1;
01957         }
01958 }

Here is the call graph for this function:

Here is the caller graph for this function:

void 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_buffer The new state.

Definition at line 1914 of file verilog_flex.c.

01915 {
01916         if (new_buffer == NULL)
01917                 return;
01918 
01919         yyensure_buffer_stack();
01920 
01921         /* This block is copied from yy_switch_to_buffer. */
01922         if ( YY_CURRENT_BUFFER )
01923                 {
01924                 /* Flush out information for old buffer. */
01925                 *(yy_c_buf_p) = (yy_hold_char);
01926                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01927                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01928                 }
01929 
01930         /* Only push if top exists. Otherwise, replace top. */
01931         if (YY_CURRENT_BUFFER)
01932                 (yy_buffer_stack_top)++;
01933         YY_CURRENT_BUFFER_LVALUE = new_buffer;
01934 
01935         /* copied from yy_switch_to_buffer. */
01936         yy_load_buffer_state( );
01937         (yy_did_buffer_switch_on_eof) = 1;
01938 }

Here is the call graph for this function:

void * yyrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 2274 of file verilog_flex.c.

02275 {
02276         /* The cast to (char *) in the following accommodates both
02277          * implementations that use char* generic pointers, and those
02278          * that use void* generic pointers.  It works with the latter
02279          * because both ANSI C and C++ allow castless assignment from
02280          * any pointer type to void*, and deal with argument conversions
02281          * as though doing an assignment.
02282          */
02283         return (void *) realloc( (char *) ptr, size );
02284 }

Here is the caller graph for this function:

void yyrestart ( FILE *  input_file  ) 
void yyset_debug ( int  bdebug  ) 

Definition at line 2190 of file verilog_flex.c.

02191 {
02192         yy_flex_debug = bdebug ;
02193 }

void yyset_in ( FILE *  in_str  ) 

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

Parameters:
in_str A readable stream.
See also:
yy_switch_to_buffer

Definition at line 2175 of file verilog_flex.c.

02176 {
02177         yyin = in_str ;
02178 }

void yyset_lineno ( int  line_number  ) 

Set the current line number.

Parameters:
line_number 

Definition at line 2163 of file verilog_flex.c.

02164 {
02165     
02166     yylineno = line_number;
02167 }

void yyset_out ( FILE *  out_str  ) 

Definition at line 2180 of file verilog_flex.c.

02181 {
02182         yyout = out_str ;
02183 }

static void yyunput ( int  c,
char *  buf_ptr 
) [static]
int yywrap ( void   ) 

Definition at line 223 of file verilog_bison.c.

00224 {
00225         return 1;
00226 }


Variable Documentation

yyconst flex_int16_t yy_accept[280] [static]

Definition at line 376 of file verilog_flex.c.

yyconst flex_int16_t yy_base[288] [static]

Definition at line 451 of file verilog_flex.c.

Stack as an array.

Definition at line 259 of file verilog_flex.c.

size_t yy_buffer_stack_max = 0 [static]

capacity of stack.

Definition at line 258 of file verilog_flex.c.

size_t yy_buffer_stack_top = 0 [static]

index of top of stack.

Definition at line 257 of file verilog_flex.c.

char* yy_c_buf_p = (char *) 0 [static]

Definition at line 282 of file verilog_flex.c.

yyconst flex_int16_t yy_chk[402] [static]

Definition at line 570 of file verilog_flex.c.

yyconst flex_int16_t yy_def[288] [static]

Definition at line 486 of file verilog_flex.c.

Definition at line 289 of file verilog_flex.c.

yyconst flex_int32_t yy_ec[256] [static]

Definition at line 410 of file verilog_flex.c.

int yy_flex_debug = 0

Definition at line 623 of file verilog_flex.c.

char yy_hold_char [static]

Definition at line 277 of file verilog_flex.c.

int yy_init = 0 [static]

Definition at line 283 of file verilog_flex.c.

char* yy_last_accepting_cpos [static]

Definition at line 620 of file verilog_flex.c.

Definition at line 619 of file verilog_flex.c.

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

Definition at line 442 of file verilog_flex.c.

int yy_n_chars [static]

Definition at line 278 of file verilog_flex.c.

yyconst flex_int16_t yy_nxt[402] [static]

Definition at line 521 of file verilog_flex.c.

int yy_start = 0 [static]

Definition at line 284 of file verilog_flex.c.

FILE * yyin = (FILE *) 0

Definition at line 341 of file verilog_flex.c.

int yyleng

Definition at line 279 of file verilog_flex.c.

int yylineno = 1

Definition at line 347 of file verilog_flex.c.

FILE * yyout = (FILE *) 0

Definition at line 341 of file verilog_flex.c.

char * yytext

Definition at line 632 of file verilog_flex.c.

Generated on Tue Aug 2 10:43:54 2011 for ODIN_II by  doxygen 1.6.3