g2o
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
yyFlexLexer Class Reference

#include <FlexLexer.h>

Inheritance diagram for yyFlexLexer:
Inheritance graph
[legend]
Collaboration diagram for yyFlexLexer:
Collaboration graph
[legend]

Public Member Functions

 yyFlexLexer (FLEX_STD istream *arg_yyin=0, FLEX_STD ostream *arg_yyout=0)
 
virtual ~yyFlexLexer ()
 
void yy_switch_to_buffer (struct yy_buffer_state *new_buffer)
 
struct yy_buffer_stateyy_create_buffer (FLEX_STD istream *s, int size)
 
void yy_delete_buffer (struct yy_buffer_state *b)
 
void yyrestart (FLEX_STD istream *s)
 
void yypush_buffer_state (struct yy_buffer_state *new_buffer)
 
void yypop_buffer_state ()
 
virtual int yylex ()
 
virtual void switch_streams (FLEX_STD istream *new_in, FLEX_STD ostream *new_out=0)
 
virtual int yywrap ()
 
- Public Member Functions inherited from FlexLexer
virtual ~FlexLexer ()
 
const char * YYText () const
 
int YYLeng () const
 
int yylex (FLEX_STD istream *new_in, FLEX_STD ostream *new_out=0)
 
int lineno () const
 
int debug () const
 
void set_debug (int flag)
 

Protected Member Functions

virtual int LexerInput (char *buf, int max_size)
 
virtual void LexerOutput (const char *buf, int size)
 
virtual void LexerError (const char *msg)
 
void yyunput (int c, char *buf_ptr)
 
int yyinput ()
 
void yy_load_buffer_state ()
 
void yy_init_buffer (struct yy_buffer_state *b, FLEX_STD istream *s)
 
void yy_flush_buffer (struct yy_buffer_state *b)
 
void yy_push_state (int new_state)
 
void yy_pop_state ()
 
int yy_top_state ()
 
yy_state_type yy_get_previous_state ()
 
yy_state_type yy_try_NUL_trans (yy_state_type current_state)
 
int yy_get_next_buffer ()
 
void yyensure_buffer_stack (void)
 

Protected Attributes

int yy_start_stack_ptr
 
int yy_start_stack_depth
 
int * yy_start_stack
 
FLEX_STD istream * yyin
 
FLEX_STD ostream * yyout
 
char yy_hold_char
 
int yy_n_chars
 
char * yy_c_buf_p
 
int yy_init
 
int yy_start
 
int yy_did_buffer_switch_on_eof
 
size_t yy_buffer_stack_top
 
size_t yy_buffer_stack_max
 
struct yy_buffer_state ** yy_buffer_stack
 
yy_state_type yy_last_accepting_state
 
char * yy_last_accepting_cpos
 
yy_state_typeyy_state_buf
 
yy_state_typeyy_state_ptr
 
char * yy_full_match
 
int * yy_full_state
 
int yy_full_lp
 
int yy_lp
 
int yy_looking_for_trail_begin
 
int yy_more_flag
 
int yy_more_len
 
int yy_more_offset
 
int yy_prev_more_offset
 
- Protected Attributes inherited from FlexLexer
char * yytext
 
int yyleng
 
int yylineno
 
int yy_flex_debug
 

Detailed Description

Definition at line 112 of file FlexLexer.h.

Constructor & Destructor Documentation

yyFlexLexer::yyFlexLexer ( FLEX_STD istream *  arg_yyin = 0,
FLEX_STD ostream *  arg_yyout = 0 
)

Definition at line 966 of file flex_scanner.cpp.

967 {
968  yyin = arg_yyin;
969  yyout = arg_yyout;
970  yy_c_buf_p = 0;
971  yy_init = 0;
972  yy_start = 0;
973  yy_flex_debug = 0;
974  yylineno = 1; // this will only get updated if %option yylineno
975 
977 
979  yy_more_flag = 0;
980  yy_more_len = 0;
982 
984  yy_start_stack = NULL;
985 
986  yy_buffer_stack = 0;
989 
990  yy_state_buf = 0;
991 
992 }
int yy_flex_debug
Definition: FlexLexer.h:98
int yy_start_stack_ptr
Definition: FlexLexer.h:144
size_t yy_buffer_stack_top
Definition: FlexLexer.h:176
int yy_prev_more_offset
Definition: FlexLexer.h:200
int * yy_start_stack
Definition: FlexLexer.h:146
FLEX_STD istream * yyin
Definition: FlexLexer.h:156
yy_state_type * yy_state_buf
Definition: FlexLexer.h:187
int yy_more_offset
Definition: FlexLexer.h:199
int yy_more_flag
Definition: FlexLexer.h:197
int yylineno
Definition: FlexLexer.h:97
int yy_looking_for_trail_begin
Definition: FlexLexer.h:195
size_t yy_buffer_stack_max
Definition: FlexLexer.h:177
int yy_did_buffer_switch_on_eof
Definition: FlexLexer.h:173
struct yy_buffer_state ** yy_buffer_stack
Definition: FlexLexer.h:178
char * yy_c_buf_p
Definition: FlexLexer.h:166
int yy_start
Definition: FlexLexer.h:169
FLEX_STD ostream * yyout
Definition: FlexLexer.h:157
int yy_start_stack_depth
Definition: FlexLexer.h:145
int yy_more_len
Definition: FlexLexer.h:198
yyFlexLexer::~yyFlexLexer ( )
virtual

Definition at line 996 of file flex_scanner.cpp.

References Slamfree(), and YY_CURRENT_BUFFER.

997 {
998  delete [] yy_state_buf;
1002 }
int * yy_start_stack
Definition: FlexLexer.h:146
yy_state_type * yy_state_buf
Definition: FlexLexer.h:187
#define YY_CURRENT_BUFFER
struct yy_buffer_state ** yy_buffer_stack
Definition: FlexLexer.h:178
void yy_delete_buffer(struct yy_buffer_state *b)
void Slamfree(void *)

Member Function Documentation

void yyFlexLexer::LexerError ( const char *  msg)
protectedvirtual

Definition at line 1658 of file flex_scanner.cpp.

References YY_EXIT_FAILURE.

1659 {
1660  std::cerr << msg << std::endl;
1661  exit( YY_EXIT_FAILURE );
1662 }
#define YY_EXIT_FAILURE
int yyFlexLexer::LexerInput ( char *  buf,
int  max_size 
)
protectedvirtual

Definition at line 1021 of file flex_scanner.cpp.

Referenced by switch_streams().

1023 {
1024  if ( yyin->eof() || yyin->fail() )
1025  return 0;
1026 
1027 #ifdef YY_INTERACTIVE
1028  yyin->get( buf[0] );
1029 
1030  if ( yyin->eof() )
1031  return 0;
1032 
1033  if ( yyin->bad() )
1034  return -1;
1035 
1036  return 1;
1037 
1038 #else
1039  (void) yyin->read( buf, max_size );
1040 
1041  if ( yyin->bad() )
1042  return -1;
1043  else
1044  return yyin->gcount();
1045 #endif
1046 }
FLEX_STD istream * yyin
Definition: FlexLexer.h:156
void yyFlexLexer::LexerOutput ( const char *  buf,
int  size 
)
protectedvirtual

Definition at line 1048 of file flex_scanner.cpp.

1049 {
1050  (void) yyout->write( buf, size );
1051 }
FLEX_STD ostream * yyout
Definition: FlexLexer.h:157
void yyFlexLexer::switch_streams ( FLEX_STD istream *  new_in,
FLEX_STD ostream *  new_out = 0 
)
virtual

Implements FlexLexer.

Definition at line 1006 of file flex_scanner.cpp.

References LexerInput(), YY_BUF_SIZE, and YY_CURRENT_BUFFER.

1007 {
1008  if ( new_in )
1009  {
1012  }
1013 
1014  if ( new_out )
1015  yyout = new_out;
1016 }
void yy_switch_to_buffer(struct yy_buffer_state *new_buffer)
#define YY_CURRENT_BUFFER
struct yy_buffer_state * yy_create_buffer(FLEX_STD istream *s, int size)
void yy_delete_buffer(struct yy_buffer_state *b)
FLEX_STD ostream * yyout
Definition: FlexLexer.h:157
#define YY_BUF_SIZE
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer ( FLEX_STD istream *  s,
int  size 
)
virtual

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.

Implements FlexLexer.

Definition at line 1420 of file flex_scanner.cpp.

References Slamalloc(), yy_buffer_state::yy_buf_size, yy_buffer_state::yy_ch_buf, YY_FATAL_ERROR, and yy_buffer_state::yy_is_our_buffer.

1421 {
1422  YY_BUFFER_STATE b;
1423 
1424  b = (YY_BUFFER_STATE) Slamalloc(sizeof( struct yy_buffer_state ) );
1425  if ( ! b )
1426  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1427 
1428  b->yy_buf_size = size;
1429 
1430  /* yy_ch_buf has to be 2 characters longer than the size given because
1431  * we need to put in 2 end-of-buffer characters.
1432  */
1433  b->yy_ch_buf = (char *) Slamalloc(b->yy_buf_size + 2 );
1434  if ( ! b->yy_ch_buf )
1435  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1436 
1437  b->yy_is_our_buffer = 1;
1438 
1439  yy_init_buffer( b, file );
1440 
1441  return b;
1442 }
yy_size_t yy_buf_size
void * Slamalloc(yy_size_t)
struct yy_buffer_state * YY_BUFFER_STATE
#define YY_FATAL_ERROR(msg)
void yy_init_buffer(struct yy_buffer_state *b, FLEX_STD istream *s)
void yyFlexLexer::yy_delete_buffer ( struct yy_buffer_state b)
virtual

Destroy the buffer.

Parameters
ba buffer created with yy_create_buffer()

Implements FlexLexer.

Definition at line 1448 of file flex_scanner.cpp.

References isatty(), Slamfree(), yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yy_buffer_state::yy_is_our_buffer.

1449 {
1450 
1451  if ( ! b )
1452  return;
1453 
1454  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1456 
1457  if ( b->yy_is_our_buffer )
1458  Slamfree((void *) b->yy_ch_buf );
1459 
1460  Slamfree((void *) b );
1461 }
#define YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER
struct yy_buffer_state * YY_BUFFER_STATE
void Slamfree(void *)
void yyFlexLexer::yy_flush_buffer ( struct yy_buffer_state b)
protected

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 1496 of file flex_scanner.cpp.

References yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, and yy_buffer_state::yy_n_chars.

1497 {
1498  if ( ! b )
1499  return;
1500 
1501  b->yy_n_chars = 0;
1502 
1503  /* We always need two end-of-buffer characters. The first causes
1504  * a transition to the end-of-buffer state. The second causes
1505  * a jam in that state.
1506  */
1509 
1510  b->yy_buf_pos = &b->yy_ch_buf[0];
1511 
1512  b->yy_at_bol = 1;
1514 
1515  if ( b == YY_CURRENT_BUFFER )
1517 }
#define YY_BUFFER_NEW
#define YY_CURRENT_BUFFER
void yy_load_buffer_state()
#define YY_END_OF_BUFFER_CHAR
int yyFlexLexer::yy_get_next_buffer ( )
protected

Definition at line 1060 of file flex_scanner.cpp.

References EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, Slamrealloc(), yy_buffer_state::yy_buf_size, YY_BUFFER_EOF_PENDING, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, YY_INPUT, yy_buffer_state::yy_is_our_buffer, YY_MORE_ADJ, yy_buffer_state::yy_n_chars, YY_READ_BUF_SIZE, and yytext_ptr.

1061 {
1062  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1063  char *source = (yytext_ptr);
1064  int number_to_move, i;
1065  int ret_val;
1066 
1067  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1069  "fatal flex scanner internal error--end of buffer missed" );
1070 
1071  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1072  { /* Don't try to fill the buffer, so this is an EOF. */
1073  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1074  {
1075  /* We matched a single character, the EOB, so
1076  * treat this as a final EOF.
1077  */
1078  return EOB_ACT_END_OF_FILE;
1079  }
1080 
1081  else
1082  {
1083  /* We matched some text prior to the EOB, first
1084  * process it.
1085  */
1086  return EOB_ACT_LAST_MATCH;
1087  }
1088  }
1089 
1090  /* Try to read more data. */
1091 
1092  /* First move last chars to start of buffer. */
1093  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1094 
1095  for ( i = 0; i < number_to_move; ++i )
1096  *(dest++) = *(source++);
1097 
1098  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1099  /* don't do the read, it's not guaranteed to return an EOF,
1100  * just force an EOF
1101  */
1102  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1103 
1104  else
1105  {
1106  int num_to_read =
1107  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1108 
1109  while ( num_to_read <= 0 )
1110  { /* Not enough room in the buffer - grow it. */
1111 
1112  /* just a shorter name for the current buffer */
1114 
1115  int yy_c_buf_p_offset =
1116  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1117 
1118  if ( b->yy_is_our_buffer )
1119  {
1120  int new_size = b->yy_buf_size * 2;
1121 
1122  if ( new_size <= 0 )
1123  b->yy_buf_size += b->yy_buf_size / 8;
1124  else
1125  b->yy_buf_size *= 2;
1126 
1127  b->yy_ch_buf = (char *)
1128  /* Include room in for 2 EOB chars. */
1129  Slamrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1130  }
1131  else
1132  /* Can't grow it, we don't own it. */
1133  b->yy_ch_buf = 0;
1134 
1135  if ( ! b->yy_ch_buf )
1137  "fatal error - scanner input buffer overflow" );
1138 
1139  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1140 
1141  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1142  number_to_move - 1;
1143 
1144  }
1145 
1146  if ( num_to_read > YY_READ_BUF_SIZE )
1147  num_to_read = YY_READ_BUF_SIZE;
1148 
1149  /* Read in more data. */
1150  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1151  (yy_n_chars), (size_t) num_to_read );
1152 
1153  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1154  }
1155 
1156  if ( (yy_n_chars) == 0 )
1157  {
1158  if ( number_to_move == YY_MORE_ADJ )
1159  {
1160  ret_val = EOB_ACT_END_OF_FILE;
1161  yyrestart( yyin );
1162  }
1163 
1164  else
1165  {
1166  ret_val = EOB_ACT_LAST_MATCH;
1167  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1169  }
1170  }
1171 
1172  else
1173  ret_val = EOB_ACT_CONTINUE_SCAN;
1174 
1175  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1176  /* Extend the array by 50%, plus the number we really need. */
1177  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1178  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) Slamrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1179  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1180  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1181  }
1182 
1183  (yy_n_chars) += number_to_move;
1186 
1187  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1188 
1189  return ret_val;
1190 }
#define YY_INPUT(buf, result, max_size)
FLEX_STD istream * yyin
Definition: FlexLexer.h:156
#define YY_CURRENT_BUFFER_LVALUE
#define yytext_ptr
#define YY_MORE_ADJ
#define EOB_ACT_END_OF_FILE
#define YY_CURRENT_BUFFER
yy_size_t yy_buf_size
void * Slamrealloc(void *, yy_size_t)
#define YY_FATAL_ERROR(msg)
#define YY_BUFFER_EOF_PENDING
char * yy_c_buf_p
Definition: FlexLexer.h:166
#define YY_READ_BUF_SIZE
void yyrestart(FLEX_STD istream *s)
int yy_n_chars
Definition: FlexLexer.h:163
#define EOB_ACT_CONTINUE_SCAN
#define YY_END_OF_BUFFER_CHAR
size_t yy_size_t
#define EOB_ACT_LAST_MATCH
yy_state_type yyFlexLexer::yy_get_previous_state ( )
protected

Definition at line 1194 of file flex_scanner.cpp.

References yy_accept, yy_base, yy_chk, yy_cp, yy_def, yy_ec, yy_meta, YY_MORE_ADJ, yy_nxt, YY_SC_TO_UI, and yytext_ptr.

1195 {
1196  yy_state_type yy_current_state;
1197  char *yy_cp;
1198 
1199  yy_current_state = (yy_start);
1200 
1201  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1202  {
1203  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1204  if ( yy_accept[yy_current_state] )
1205  {
1206  (yy_last_accepting_state) = yy_current_state;
1207  (yy_last_accepting_cpos) = yy_cp;
1208  }
1209  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1210  {
1211  yy_current_state = (int) yy_def[yy_current_state];
1212  if ( yy_current_state >= 77 )
1213  yy_c = yy_meta[(unsigned int) yy_c];
1214  }
1215  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1216  }
1217 
1218  return yy_current_state;
1219 }
unsigned char YY_CHAR
static yyconst flex_int16_t yy_chk[220]
static yyconst flex_int32_t yy_meta[47]
#define yytext_ptr
#define YY_MORE_ADJ
yy_state_type yy_last_accepting_state
Definition: FlexLexer.h:184
char * yy_last_accepting_cpos
Definition: FlexLexer.h:185
int yy_state_type
Definition: FlexLexer.h:58
static yyconst flex_int32_t yy_ec[256]
#define YY_SC_TO_UI(c)
char * yy_cp
static yyconst flex_int16_t yy_def[78]
static yyconst flex_int16_t yy_nxt[220]
char * yy_c_buf_p
Definition: FlexLexer.h:166
static yyconst flex_int16_t yy_accept[77]
int yy_start
Definition: FlexLexer.h:169
static yyconst flex_int16_t yy_base[78]
void yyFlexLexer::yy_init_buffer ( struct yy_buffer_state b,
FLEX_STD istream *  s 
)
protected

Definition at line 1469 of file flex_scanner.cpp.

References yy_buffer_state::yy_bs_column, yy_buffer_state::yy_bs_lineno, YY_CURRENT_BUFFER, yy_buffer_state::yy_fill_buffer, yy_buffer_state::yy_input_file, and yy_buffer_state::yy_is_interactive.

1471 {
1472  int oerrno = errno;
1473 
1474  yy_flush_buffer( b );
1475 
1476  b->yy_input_file = file;
1477  b->yy_fill_buffer = 1;
1478 
1479  /* If b is the current buffer, then yy_init_buffer was _probably_
1480  * called from yyrestart() or through yy_get_next_buffer.
1481  * In that case, we don't want to reset the lineno or column.
1482  */
1483  if (b != YY_CURRENT_BUFFER){
1484  b->yy_bs_lineno = 1;
1485  b->yy_bs_column = 0;
1486  }
1487 
1488  b->yy_is_interactive = 0;
1489  errno = oerrno;
1490 }
void yy_flush_buffer(struct yy_buffer_state *b)
#define YY_CURRENT_BUFFER
std::istream * yy_input_file
void yyFlexLexer::yy_load_buffer_state ( )
protected

Definition at line 1406 of file flex_scanner.cpp.

References YY_CURRENT_BUFFER_LVALUE, yy_buffer_state::yy_n_chars, and yytext_ptr.

1407 {
1408  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1409  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1410  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1411  (yy_hold_char) = *(yy_c_buf_p);
1412 }
FLEX_STD istream * yyin
Definition: FlexLexer.h:156
#define YY_CURRENT_BUFFER_LVALUE
#define yytext_ptr
char yy_hold_char
Definition: FlexLexer.h:160
char * yy_c_buf_p
Definition: FlexLexer.h:166
int yy_n_chars
Definition: FlexLexer.h:163
void yyFlexLexer::yy_pop_state ( )
protected

Definition at line 1641 of file flex_scanner.cpp.

References BEGIN, and YY_FATAL_ERROR.

1642 {
1643  if ( --(yy_start_stack_ptr) < 0 )
1644  YY_FATAL_ERROR( "start-condition stack underflow" );
1645 
1647 }
int yy_start_stack_ptr
Definition: FlexLexer.h:144
int * yy_start_stack
Definition: FlexLexer.h:146
#define YY_FATAL_ERROR(msg)
#define BEGIN
void yyFlexLexer::yy_push_state ( int  new_state)
protected

Definition at line 1617 of file flex_scanner.cpp.

References BEGIN, Slamalloc(), Slamrealloc(), YY_FATAL_ERROR, YY_START, and YY_START_STACK_INCR.

1618 {
1620  {
1621  yy_size_t new_size;
1622 
1624  new_size = (yy_start_stack_depth) * sizeof( int );
1625 
1626  if ( ! (yy_start_stack) )
1627  (yy_start_stack) = (int *) Slamalloc(new_size );
1628 
1629  else
1630  (yy_start_stack) = (int *) Slamrealloc((void *) (yy_start_stack),new_size );
1631 
1632  if ( ! (yy_start_stack) )
1633  YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
1634  }
1635 
1637 
1638  BEGIN(new_state);
1639 }
int yy_start_stack_ptr
Definition: FlexLexer.h:144
#define YY_START
int * yy_start_stack
Definition: FlexLexer.h:146
#define YY_START_STACK_INCR
void * Slamrealloc(void *, yy_size_t)
void * Slamalloc(yy_size_t)
#define YY_FATAL_ERROR(msg)
#define BEGIN
int yy_start_stack_depth
Definition: FlexLexer.h:145
size_t yy_size_t
void yyFlexLexer::yy_switch_to_buffer ( struct yy_buffer_state new_buffer)
virtual

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Implements FlexLexer.

Definition at line 1375 of file flex_scanner.cpp.

References YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yy_buffer_state::yy_n_chars.

1376 {
1377 
1378  /* TODO. We should be able to replace this entire function body
1379  * with
1380  * yypop_buffer_state();
1381  * yypush_buffer_state(new_buffer);
1382  */
1384  if ( YY_CURRENT_BUFFER == new_buffer )
1385  return;
1386 
1387  if ( YY_CURRENT_BUFFER )
1388  {
1389  /* Flush out information for old buffer. */
1390  *(yy_c_buf_p) = (yy_hold_char);
1391  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1392  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1393  }
1394 
1395  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1397 
1398  /* We don't actually know whether we did this switch during
1399  * EOF (yywrap()) processing, but the only time this flag
1400  * is looked at is after yywrap() is called, so it's safe
1401  * to go ahead and always set it.
1402  */
1404 }
#define YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER
char yy_hold_char
Definition: FlexLexer.h:160
void yy_load_buffer_state()
int yy_did_buffer_switch_on_eof
Definition: FlexLexer.h:173
char * yy_c_buf_p
Definition: FlexLexer.h:166
void yyensure_buffer_stack(void)
int yy_n_chars
Definition: FlexLexer.h:163
int yyFlexLexer::yy_top_state ( )
protected

Definition at line 1649 of file flex_scanner.cpp.

1650 {
1651  return (yy_start_stack)[(yy_start_stack_ptr) - 1];
1652 }
int yy_start_stack_ptr
Definition: FlexLexer.h:144
int * yy_start_stack
Definition: FlexLexer.h:146
yy_state_type yyFlexLexer::yy_try_NUL_trans ( yy_state_type  current_state)
protected

Definition at line 1226 of file flex_scanner.cpp.

References yy_accept, yy_base, yy_chk, yy_def, yy_meta, and yy_nxt.

1227 {
1228  int yy_is_jam;
1229  char *yy_cp = (yy_c_buf_p);
1230 
1231  YY_CHAR yy_c = 1;
1232  if ( yy_accept[yy_current_state] )
1233  {
1234  (yy_last_accepting_state) = yy_current_state;
1235  (yy_last_accepting_cpos) = yy_cp;
1236  }
1237  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1238  {
1239  yy_current_state = (int) yy_def[yy_current_state];
1240  if ( yy_current_state >= 77 )
1241  yy_c = yy_meta[(unsigned int) yy_c];
1242  }
1243  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1244  yy_is_jam = (yy_current_state == 76);
1245 
1246  return yy_is_jam ? 0 : yy_current_state;
1247 }
unsigned char YY_CHAR
static yyconst flex_int16_t yy_chk[220]
static yyconst flex_int32_t yy_meta[47]
yy_state_type yy_last_accepting_state
Definition: FlexLexer.h:184
char * yy_last_accepting_cpos
Definition: FlexLexer.h:185
char * yy_cp
static yyconst flex_int16_t yy_def[78]
static yyconst flex_int16_t yy_nxt[220]
char * yy_c_buf_p
Definition: FlexLexer.h:166
static yyconst flex_int16_t yy_accept[77]
static yyconst flex_int16_t yy_base[78]
void yyFlexLexer::yyensure_buffer_stack ( void  )
protected

Definition at line 1574 of file flex_scanner.cpp.

References Slamalloc(), Slamrealloc(), and YY_FATAL_ERROR.

1575 {
1576  int num_to_alloc;
1577 
1578  if (!(yy_buffer_stack)) {
1579 
1580  /* First allocation is just for 2 elements, since we don't know if this
1581  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1582  * immediate realloc on the next call.
1583  */
1584  num_to_alloc = 1;
1586  (num_to_alloc * sizeof(struct yy_buffer_state*)
1587  );
1588  if ( ! (yy_buffer_stack) )
1589  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1590 
1591  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1592 
1593  (yy_buffer_stack_max) = num_to_alloc;
1594  (yy_buffer_stack_top) = 0;
1595  return;
1596  }
1597 
1598  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1599 
1600  /* Increase the buffer to prepare for a possible push. */
1601  int grow_size = 8 /* arbitrary grow size */;
1602 
1603  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1605  ((yy_buffer_stack),
1606  num_to_alloc * sizeof(struct yy_buffer_state*)
1607  );
1608  if ( ! (yy_buffer_stack) )
1609  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1610 
1611  /* zero only the new slots.*/
1612  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1613  (yy_buffer_stack_max) = num_to_alloc;
1614  }
1615 }
size_t yy_buffer_stack_top
Definition: FlexLexer.h:176
void * Slamrealloc(void *, yy_size_t)
void * Slamalloc(yy_size_t)
size_t yy_buffer_stack_max
Definition: FlexLexer.h:177
#define YY_FATAL_ERROR(msg)
struct yy_buffer_state ** yy_buffer_stack
Definition: FlexLexer.h:178
int yyFlexLexer::yyinput ( )
protected

Definition at line 1286 of file flex_scanner.cpp.

References EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, YY_CURRENT_BUFFER_LVALUE, YY_END_OF_BUFFER_CHAR, yy_buffer_state::yy_n_chars, YY_NEW_FILE, and yytext_ptr.

1287 {
1288  int c;
1289 
1290  *(yy_c_buf_p) = (yy_hold_char);
1291 
1292  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1293  {
1294  /* yy_c_buf_p now points to the character we want to return.
1295  * If this occurs *before* the EOB characters, then it's a
1296  * valid NUL; if not, then we've hit the end of the buffer.
1297  */
1298  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1299  /* This was really a NUL. */
1300  *(yy_c_buf_p) = '\0';
1301 
1302  else
1303  { /* need more input */
1304  int offset = (yy_c_buf_p) - (yytext_ptr);
1305  ++(yy_c_buf_p);
1306 
1307  switch ( yy_get_next_buffer( ) )
1308  {
1309  case EOB_ACT_LAST_MATCH:
1310  /* This happens because yy_g_n_b()
1311  * sees that we've accumulated a
1312  * token and flags that we need to
1313  * try matching the token before
1314  * proceeding. But for input(),
1315  * there's no matching to consider.
1316  * So convert the EOB_ACT_LAST_MATCH
1317  * to EOB_ACT_END_OF_FILE.
1318  */
1319 
1320  /* Reset buffer status. */
1321  yyrestart( yyin );
1322 
1323  /*FALLTHROUGH*/
1324 
1325  case EOB_ACT_END_OF_FILE:
1326  {
1327  if ( yywrap( ) )
1328  return EOF;
1329 
1330  if ( ! (yy_did_buffer_switch_on_eof) )
1331  YY_NEW_FILE;
1332 #ifdef __cplusplus
1333  return yyinput();
1334 #else
1335  return input();
1336 #endif
1337  }
1338 
1339  case EOB_ACT_CONTINUE_SCAN:
1340  (yy_c_buf_p) = (yytext_ptr) + offset;
1341  break;
1342  }
1343  }
1344  }
1345 
1346  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1347  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1348  (yy_hold_char) = *++(yy_c_buf_p);
1349 
1350  return c;
1351 }
FLEX_STD istream * yyin
Definition: FlexLexer.h:156
#define YY_CURRENT_BUFFER_LVALUE
#define yytext_ptr
#define EOB_ACT_END_OF_FILE
char yy_hold_char
Definition: FlexLexer.h:160
int yy_did_buffer_switch_on_eof
Definition: FlexLexer.h:173
char * yy_c_buf_p
Definition: FlexLexer.h:166
int yy_get_next_buffer()
void yyrestart(FLEX_STD istream *s)
#define YY_NEW_FILE
int yy_n_chars
Definition: FlexLexer.h:163
#define EOB_ACT_CONTINUE_SCAN
#define YY_END_OF_BUFFER_CHAR
virtual int yywrap()
#define EOB_ACT_LAST_MATCH
virtual int yyFlexLexer::yylex ( )
virtual

Implements FlexLexer.

void yyFlexLexer::yypop_buffer_state ( void  )

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

Definition at line 1555 of file flex_scanner.cpp.

References YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.

1556 {
1557  if (!YY_CURRENT_BUFFER)
1558  return;
1559 
1561  YY_CURRENT_BUFFER_LVALUE = NULL;
1562  if ((yy_buffer_stack_top) > 0)
1563  --(yy_buffer_stack_top);
1564 
1565  if (YY_CURRENT_BUFFER) {
1568  }
1569 }
size_t yy_buffer_stack_top
Definition: FlexLexer.h:176
#define YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER
void yy_load_buffer_state()
int yy_did_buffer_switch_on_eof
Definition: FlexLexer.h:173
void yy_delete_buffer(struct yy_buffer_state *b)
void yyFlexLexer::yypush_buffer_state ( struct 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 1525 of file flex_scanner.cpp.

References YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yy_buffer_state::yy_n_chars.

1526 {
1527  if (new_buffer == NULL)
1528  return;
1529 
1531 
1532  /* This block is copied from yy_switch_to_buffer. */
1533  if ( YY_CURRENT_BUFFER )
1534  {
1535  /* Flush out information for old buffer. */
1536  *(yy_c_buf_p) = (yy_hold_char);
1537  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1538  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1539  }
1540 
1541  /* Only push if top exists. Otherwise, replace top. */
1542  if (YY_CURRENT_BUFFER)
1543  (yy_buffer_stack_top)++;
1544  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1545 
1546  /* copied from yy_switch_to_buffer. */
1549 }
size_t yy_buffer_stack_top
Definition: FlexLexer.h:176
#define YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER
char yy_hold_char
Definition: FlexLexer.h:160
void yy_load_buffer_state()
int yy_did_buffer_switch_on_eof
Definition: FlexLexer.h:173
char * yy_c_buf_p
Definition: FlexLexer.h:166
void yyensure_buffer_stack(void)
int yy_n_chars
Definition: FlexLexer.h:163
void yyFlexLexer::yyrestart ( FLEX_STD istream *  s)
virtual

Immediately switch to a different input stream.

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

Implements FlexLexer.

Definition at line 1358 of file flex_scanner.cpp.

References YY_BUF_SIZE, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.

1359 {
1360 
1361  if ( ! YY_CURRENT_BUFFER ){
1365  }
1366 
1367  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1369 }
FLEX_STD istream * yyin
Definition: FlexLexer.h:156
#define YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER
void yy_load_buffer_state()
struct yy_buffer_state * yy_create_buffer(FLEX_STD istream *s, int size)
void yyensure_buffer_stack(void)
void yy_init_buffer(struct yy_buffer_state *b, FLEX_STD istream *s)
#define YY_BUF_SIZE
void yyFlexLexer::yyunput ( int  c,
char *  buf_ptr 
)
protected

Definition at line 1249 of file flex_scanner.cpp.

References if(), yy_buffer_state::yy_ch_buf, yy_cp, YY_CURRENT_BUFFER_LVALUE, YY_FATAL_ERROR, yy_buffer_state::yy_n_chars, and yytext_ptr.

1250 {
1251  char *yy_cp;
1252 
1253  yy_cp = (yy_c_buf_p);
1254 
1255  /* undo effects of setting up yytext */
1256  *yy_cp = (yy_hold_char);
1257 
1258  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1259  { /* need to shift things up to make room */
1260  /* +2 for EOB chars. */
1261  int number_to_move = (yy_n_chars) + 2;
1262  char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1263  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1264  char *source =
1265  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1266 
1267  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1268  *--dest = *--source;
1269 
1270  yy_cp += (int) (dest - source);
1271  yy_bp += (int) (dest - source);
1272  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1273  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1274 
1275  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1276  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1277  }
1278 
1279  *--yy_cp = (char) c;
1280 
1281  (yytext_ptr) = yy_bp;
1282  (yy_hold_char) = *yy_cp;
1283  (yy_c_buf_p) = yy_cp;
1284 }
#define YY_CURRENT_BUFFER_LVALUE
#define yytext_ptr
char yy_hold_char
Definition: FlexLexer.h:160
#define YY_FATAL_ERROR(msg)
char * yy_cp
char * yy_c_buf_p
Definition: FlexLexer.h:166
int yy_n_chars
Definition: FlexLexer.h:163
char * yy_bp
if(!(yy_init))
virtual int yyFlexLexer::yywrap ( )
virtual

Member Data Documentation

struct yy_buffer_state** yyFlexLexer::yy_buffer_stack
protected

Stack as an array.

Definition at line 178 of file FlexLexer.h.

size_t yyFlexLexer::yy_buffer_stack_max
protected

capacity of stack.

Definition at line 177 of file FlexLexer.h.

size_t yyFlexLexer::yy_buffer_stack_top
protected

index of top of stack.

Definition at line 176 of file FlexLexer.h.

char* yyFlexLexer::yy_c_buf_p
protected

Definition at line 166 of file FlexLexer.h.

int yyFlexLexer::yy_did_buffer_switch_on_eof
protected

Definition at line 173 of file FlexLexer.h.

int yyFlexLexer::yy_full_lp
protected

Definition at line 192 of file FlexLexer.h.

char* yyFlexLexer::yy_full_match
protected

Definition at line 190 of file FlexLexer.h.

int* yyFlexLexer::yy_full_state
protected

Definition at line 191 of file FlexLexer.h.

char yyFlexLexer::yy_hold_char
protected

Definition at line 160 of file FlexLexer.h.

int yyFlexLexer::yy_init
protected

Definition at line 168 of file FlexLexer.h.

char* yyFlexLexer::yy_last_accepting_cpos
protected

Definition at line 185 of file FlexLexer.h.

yy_state_type yyFlexLexer::yy_last_accepting_state
protected

Definition at line 184 of file FlexLexer.h.

int yyFlexLexer::yy_looking_for_trail_begin
protected

Definition at line 195 of file FlexLexer.h.

int yyFlexLexer::yy_lp
protected

Definition at line 194 of file FlexLexer.h.

int yyFlexLexer::yy_more_flag
protected

Definition at line 197 of file FlexLexer.h.

int yyFlexLexer::yy_more_len
protected

Definition at line 198 of file FlexLexer.h.

int yyFlexLexer::yy_more_offset
protected

Definition at line 199 of file FlexLexer.h.

int yyFlexLexer::yy_n_chars
protected

Definition at line 163 of file FlexLexer.h.

int yyFlexLexer::yy_prev_more_offset
protected

Definition at line 200 of file FlexLexer.h.

int yyFlexLexer::yy_start
protected

Definition at line 169 of file FlexLexer.h.

int* yyFlexLexer::yy_start_stack
protected

Definition at line 146 of file FlexLexer.h.

int yyFlexLexer::yy_start_stack_depth
protected

Definition at line 145 of file FlexLexer.h.

int yyFlexLexer::yy_start_stack_ptr
protected

Definition at line 144 of file FlexLexer.h.

yy_state_type* yyFlexLexer::yy_state_buf
protected

Definition at line 187 of file FlexLexer.h.

yy_state_type* yyFlexLexer::yy_state_ptr
protected

Definition at line 188 of file FlexLexer.h.

FLEX_STD istream* yyFlexLexer::yyin
protected

Definition at line 156 of file FlexLexer.h.

FLEX_STD ostream* yyFlexLexer::yyout
protected

Definition at line 157 of file FlexLexer.h.


The documentation for this class was generated from the following files: