lexer.cc File Reference

Generated yy::lexer implementation. More...

#include <iostream>
#include <errno.h>
#include <cstdlib>
#include <cstring>
#include <FlexLexer.h>
#include <string>
#include <limits>
#include "driver.hh"
#include "parser.hh"
#include "lexer.hh"
#include <unistd.h>
Include dependency graph for lexer.cc:

Go to the source code of this file.

Classes

struct  yy_buffer_state
 Generated structure used by yy::lexer. More...
struct  yy_trans_info
 Generated structure used by yy::lexer. More...

Namespaces

namespace  yy
 

Common namespace for the generated lexer and parser.


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   yyFlexLexer
#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 YY_SKIP_YYWRAP
#define FLEX_DEBUG
#define yytext_ptr   yytext
#define YY_DECL   int lexer::yylex()
#define YY_DO_BEFORE_ACTION
#define YY_NUM_RULES   12
#define YY_END_OF_BUFFER   13
#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_USER_ACTION   yylloc->columns (YYLeng());
#define YY_DECL
#define INITIAL   0
#define QS   1
#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_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

Functions

void * yyalloc (yy_size_t)
void * yyrealloc (void *, yy_size_t)
void yyfree (void *)

Variables

int yyleng
static yyconst flex_int16_t yy_accept [27]
static yyconst flex_int32_t yy_ec [256]
static yyconst flex_int32_t yy_meta [10]
static yyconst flex_int16_t yy_base [30]
static yyconst flex_int16_t yy_def [30]
static yyconst flex_int16_t yy_nxt [41]
static yyconst flex_int16_t yy_chk [41]
static yyconst flex_int16_t yy_rule_linenum [12]

Detailed Description

Generated yy::lexer implementation.

This lexer is generated by flex, using the token definitions from lexer.yy.

Definition in file lexer.cc.


Define Documentation

#define YY_CURRENT_BUFFER
Value:
( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)

Definition at line 326 of file lexer.cc.

#define YY_DECL
Value:
yy::parser::token_type                              \
yy::lexer::yylex(yy::parser::semantic_type* yylval, \
                 yy::parser::location_type* yylloc)

Definition at line 540 of file lexer.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 399 of file lexer.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 619 of file lexer.cc.

#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 360 of file lexer.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 350 of file lexer.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 1863 of file lexer.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 1863 of file lexer.cc.


Variable Documentation

yyconst flex_int16_t yy_accept[27] [static]
Initial value:
    {   0,
        0,    0,    0,    0,   13,   11,    1,    2,    2,    7,
        3,    4,    6,    8,    9,    9,   10,    1,    2,    0,
        4,    6,    8,    9,    5,    0
    }

Definition at line 418 of file lexer.cc.

yyconst flex_int16_t yy_base[30] [static]
Initial value:
    {   0,
        0,    0,    7,   10,   30,   31,   27,   31,   25,   21,
       31,   18,    0,    0,   31,   22,   31,   22,   31,   18,
       14,    0,    0,   31,   31,   31,   15,   17,   18
    }

Definition at line 462 of file lexer.cc.

yyconst flex_int16_t yy_chk[41] [static]
Initial value:
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
        3,    3,    4,    4,    4,   27,   27,   27,   29,   28,
       29,   21,   20,   18,   16,   12,   10,    9,    7,    5,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26
    }

Definition at line 484 of file lexer.cc.

yyconst flex_int16_t yy_def[30] [static]
Initial value:
    {   0,
       26,    1,   27,   27,   26,   26,   26,   26,   26,   26,
       26,   26,   28,   29,   26,   26,   26,   26,   26,   26,
       26,   28,   29,   26,   26,    0,   26,   26,   26
    }

Definition at line 469 of file lexer.cc.

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

Definition at line 457 of file lexer.cc.

yyconst flex_int16_t yy_nxt[41] [static]
Initial value:
    {   0,
        6,    7,    8,    9,   10,   11,   11,   12,   13,   15,
       16,   17,   15,   16,   17,   14,   14,   14,   23,   22,
       23,   21,   25,   18,   24,   21,   20,   19,   18,   26,
        5,   26,   26,   26,   26,   26,   26,   26,   26,   26
    }

Definition at line 476 of file lexer.cc.

yyconst flex_int16_t yy_rule_linenum[12] [static]
Initial value:
    {   0,
       63,   64,   66,   68,   78,   80,   82,   83,   84,   85,
       91
    }

Definition at line 492 of file lexer.cc.


Generated on Fri Aug 21 08:15:08 2009 for mqn2mps by  doxygen 1.6.0