src/scanner.cc File Reference

Go to the source code of this file.


Classes

struct  yy_buffer_state
struct  yy_trans_info

Namespaces

namespace  example
 The example namespace is used to encapsulate the three parser classes example::Parser, example::Scanner and example::Driver.

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   35
#define FLEX_BETA
#define yyFlexLexer   ExampleFlexLexer
#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   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 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_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_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 FLEX_DEBUG
#define yytext_ptr   yytext
#define YY_DO_BEFORE_ACTION
#define YY_NUM_RULES   7
#define YY_END_OF_BUFFER   8
#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 yyterminate()   return token::END
#define YY_NO_UNISTD_H
#define YY_USER_ACTION   yylloc->columns(yyleng);
#define INITIAL   0
#define YY_EXTRA_TYPE   void *
#define YY_READ_BUF_SIZE   8192
#define ECHO   LexerOutput( yytext, yyleng )
#define YY_INPUT(buf, result, max_size)
#define YY_START_STACK_INCR   25
#define YY_FATAL_ERROR(msg)   LexerError( msg )
#define YY_DECL_IS_OURS   1
#define YY_DECL   int yyFlexLexer::yylex()
#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 example::Parser::token token
typedef example::Parser::token_type token_type

Functions

void * Examplealloc (yy_size_t)
void * Examplerealloc (void *, yy_size_t)
void Examplefree (void *)
int isatty (int)

Variables

int yyleng
static flex_int16_t yy_accept [15]
static flex_int32_t yy_ec [256]
static flex_int32_t yy_meta [8]
static flex_int16_t yy_base [16]
static flex_int16_t yy_def [16]
static flex_int16_t yy_nxt [24]
static flex_int16_t yy_chk [24]
static flex_int16_t yy_rule_linenum [7]


Define Documentation

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 175 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_pop_state(), and ExampleFlexLexer::yy_push_state().

#define ECHO   LexerOutput( yytext, yyleng )

Definition at line 588 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define EOB_ACT_CONTINUE_SCAN   0

#define EOB_ACT_END_OF_FILE   1

#define EOB_ACT_LAST_MATCH   2

#define FLEX_BETA

Definition at line 22 of file scanner.cc.

#define FLEX_DEBUG

Definition at line 376 of file scanner.cc.

#define FLEX_SCANNER

Definition at line 17 of file scanner.cc.

#define INITIAL   0

Definition at line 525 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define INT16_MAX   (32767)

Definition at line 98 of file scanner.cc.

#define INT16_MIN   (-32767-1)

Definition at line 89 of file scanner.cc.

#define INT32_MAX   (2147483647)

Definition at line 101 of file scanner.cc.

#define INT32_MIN   (-2147483647-1)

Definition at line 92 of file scanner.cc.

#define INT8_MAX   (127)

Definition at line 95 of file scanner.cc.

#define INT8_MIN   (-128)

Definition at line 86 of file scanner.cc.

#define REJECT   reject_used_but_not_detected

Definition at line 486 of file scanner.cc.

#define UINT16_MAX   (65535U)

Definition at line 107 of file scanner.cc.

#define UINT32_MAX   (4294967295U)

Definition at line 110 of file scanner.cc.

#define UINT8_MAX   (255U)

Definition at line 104 of file scanner.cc.

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

Definition at line 235 of file scanner.cc.

 
#define YY_AT_BOL (  )     (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 371 of file scanner.cc.

#define YY_BREAK   break;

Definition at line 662 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define YY_BUF_SIZE   16384

#define YY_BUFFER_EOF_PENDING   2

Definition at line 307 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_next_buffer().

#define YY_BUFFER_NEW   0

Definition at line 295 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define YY_BUFFER_NORMAL   1

Definition at line 296 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

#define YY_DECL   int yyFlexLexer::yylex()

Definition at line 649 of file scanner.cc.

#define YY_DECL_IS_OURS   1

Definition at line 645 of file scanner.cc.

#define YY_DO_BEFORE_ACTION

Value:

(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
        yyleng = (size_t) (yy_cp - yy_bp); \
        (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
        (yy_c_buf_p) = yy_cp;

Definition at line 390 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define YY_END_OF_BUFFER   8

Definition at line 401 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 190 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_next_buffer(), and ExampleFlexLexer::yyinput().

#define YY_EXIT_FAILURE   2

Definition at line 1800 of file scanner.cc.

#define YY_EXTRA_TYPE   void *

Definition at line 540 of file scanner.cc.

#define YY_FATAL_ERROR ( msg   )     LexerError( msg )

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 18 of file scanner.cc.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 19 of file scanner.cc.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 20 of file scanner.cc.

#define YY_INPUT ( buf,
result,
max_size   ) 

Value:

/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
\
/* %if-c++-only C++ definition \ */\
        if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
                YY_FATAL_ERROR( "input in flex scanner failed" );

Definition at line 596 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_next_buffer().

#define YY_INT_ALIGNED   short int

Definition at line 5 of file scanner.cc.

#define YY_LESS_LINENO (  ) 

Definition at line 219 of file scanner.cc.

#define YY_MORE_ADJ   0

#define yy_new_buffer   yy_create_buffer

Definition at line 349 of file scanner.cc.

#define YY_NEW_FILE   yyrestart( yyin )

Definition at line 188 of file scanner.cc.

Referenced by ExampleFlexLexer::yyinput(), and ExampleFlexLexer::yylex().

#define YY_NO_UNISTD_H

Definition at line 509 of file scanner.cc.

#define YY_NULL   0

Definition at line 151 of file scanner.cc.

#define YY_NUM_RULES   7

Definition at line 400 of file scanner.cc.

#define YY_READ_BUF_SIZE   8192

Definition at line 580 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_next_buffer().

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 489 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 666 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

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

Definition at line 161 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), and ExampleFlexLexer::yylex().

#define yy_set_bol ( at_bol   ) 

Value:

{ \
        if ( ! YY_CURRENT_BUFFER ){\
        yyensure_buffer_stack (); \
                YY_CURRENT_BUFFER_LVALUE =    \
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
        } \
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
        }

Definition at line 361 of file scanner.cc.

#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 351 of file scanner.cc.

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

Definition at line 181 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_push_state(), and ExampleFlexLexer::yylex().

#define YY_START_STACK_INCR   25

Definition at line 616 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_push_state().

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

Definition at line 199 of file scanner.cc.

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

Definition at line 185 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define YY_USER_ACTION   yylloc->columns(yyleng);

Definition at line 522 of file scanner.cc.

#define yyconst

Definition at line 145 of file scanner.cc.

#define yyFlexLexer   ExampleFlexLexer

Definition at line 32 of file scanner.cc.

#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 1816 of file scanner.cc.

#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 1816 of file scanner.cc.

 
#define yymore (  )     yymore_used_but_not_detected

Definition at line 487 of file scanner.cc.

#define YYSTATE   YY_START

Definition at line 182 of file scanner.cc.

#define YYTABLES_NAME   "yytables"

Definition at line 1900 of file scanner.cc.

 
#define yyterminate (  )     return token::END

Definition at line 505 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

#define yytext_ptr   yytext


Typedef Documentation

typedef short int flex_int16_t

Definition at line 77 of file scanner.cc.

typedef int flex_int32_t

Definition at line 78 of file scanner.cc.

typedef signed char flex_int8_t

Definition at line 76 of file scanner.cc.

typedef unsigned short int flex_uint16_t

Definition at line 80 of file scanner.cc.

typedef unsigned int flex_uint32_t

Definition at line 81 of file scanner.cc.

typedef unsigned char flex_uint8_t

Definition at line 79 of file scanner.cc.

Definition at line 500 of file scanner.cc.

Definition at line 501 of file scanner.cc.

Definition at line 203 of file scanner.cc.

typedef unsigned char YY_CHAR

Definition at line 378 of file scanner.cc.

typedef size_t yy_size_t

Definition at line 239 of file scanner.cc.


Function Documentation

void * Examplealloc ( yy_size_t  size  ) 

void Examplefree ( void *  ptr  ) 

Definition at line 1893 of file scanner.cc.

Referenced by ExampleFlexLexer::~ExampleFlexLexer().

void * Examplerealloc ( void *  ptr,
yy_size_t  size 
)

int isatty ( int   ) 


Variable Documentation

flex_int16_t yy_accept[15] [static]

Initial value:

    {   0,
        0,    0,    8,    6,    4,    5,    1,    3,    4,    2,
        1,    3,    2,    0
    }

Definition at line 409 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), ExampleFlexLexer::yy_try_NUL_trans(), and ExampleFlexLexer::yylex().

flex_int16_t yy_base[16] [static]

Initial value:

    {   0,
        0,    0,   15,   16,   12,   16,    3,    0,   11,    6,
        0,    0,    5,   16,    8
    }

Definition at line 452 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), ExampleFlexLexer::yy_try_NUL_trans(), and ExampleFlexLexer::yylex().

flex_int16_t yy_chk[24] [static]

Initial value:

    {   0,
        1,    1,    1,    1,    1,    1,    1,    7,    7,   15,
       13,   10,    9,    5,    3,   14,   14,   14,   14,   14,
       14,   14,   14
    }

Definition at line 471 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), ExampleFlexLexer::yy_try_NUL_trans(), and ExampleFlexLexer::yylex().

flex_int16_t yy_def[16] [static]

Initial value:

    {   0,
       14,    1,   14,   14,   14,   14,   14,   15,   14,   14,
        7,   15,   14,    0,   14
    }

Definition at line 458 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), ExampleFlexLexer::yy_try_NUL_trans(), and ExampleFlexLexer::yylex().

flex_int32_t yy_ec[256] [static]

Definition at line 415 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), and ExampleFlexLexer::yylex().

flex_int32_t yy_meta[8] [static]

Initial value:

    {   0,
        1,    1,    1,    2,    2,    2,    2
    }

Definition at line 447 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), ExampleFlexLexer::yy_try_NUL_trans(), and ExampleFlexLexer::yylex().

flex_int16_t yy_nxt[24] [static]

Initial value:

    {   0,
        4,    5,    6,    4,    4,    7,    8,   10,   11,   12,
       13,   13,    9,    9,   14,    3,   14,   14,   14,   14,
       14,   14,   14
    }

Definition at line 464 of file scanner.cc.

Referenced by ExampleFlexLexer::yy_get_previous_state(), ExampleFlexLexer::yy_try_NUL_trans(), and ExampleFlexLexer::yylex().

Initial value:

    {   0,
       61,   66,   71,   77,   82,   88
    }

Definition at line 478 of file scanner.cc.

Referenced by ExampleFlexLexer::yylex().

int yyleng

Referenced by ExampleFlexLexer::yylex().


Generated on Sat Sep 5 10:26:25 2009 for Flex Bison C++ Example by  doxygen 1.5.9