istream* yy_input_file;
%*
- YY_CHAR *yy_ch_buf; /* input buffer */
- YY_CHAR *yy_buf_pos; /* current position in input buffer */
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
%- Standard (non-C++) definition
/* yy_hold_char holds the character lost when yytext is formed. */
-static YY_CHAR yy_hold_char;
+static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
/* Points to current character in buffer. */
-static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
+static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_DECL
{
register yy_state_type yy_current_state;
- register YY_CHAR *yy_cp, *yy_bp;
+ register char *yy_cp, *yy_bp;
register int yy_act;
%% user's declarations go here
int yyFlexLexer::yy_get_next_buffer()
%*
{
- register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
- register YY_CHAR *source = yytext_ptr - 1; /* copy prev. char, too */
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr - 1; /* copy prev. char, too */
register int number_to_move, i;
int ret_val;
int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
b->yy_buf_size *= 2;
- b->yy_ch_buf = (YY_CHAR *)
+ b->yy_ch_buf = (char *)
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size );
%*
{
register yy_state_type yy_current_state;
- register YY_CHAR *yy_cp;
+ register char *yy_cp;
%% code to get the start state into yy_current_state goes here
%-
#ifdef YY_USE_PROTOS
-static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
+static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
-YY_CHAR c;
-register YY_CHAR *yy_bp;
+int c;
+register char *yy_bp;
#endif
%+
-void yyFlexLexer::yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
+void yyFlexLexer::yyunput( int c, register char* yy_bp )
%*
{
- register YY_CHAR *yy_cp = yy_c_buf_p;
+ register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
- register YY_CHAR *dest = &yy_current_buffer->yy_ch_buf[
+ register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
- register YY_CHAR *source =
+ register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
yy_cp[-2] = '\n';
- *--yy_cp = c;
+ *--yy_cp = (char) c;
/* Note: the formal parameter *must* be called "yy_bp" for this
* macro to now work correctly.
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (YY_CHAR *) yy_flex_alloc( b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
if ( fulltbl )
{
indent_put2s(
- "while ( (yy_current_state = yy_nxt[yy_current_state][%s]) > 0 )",
+"while ( (yy_current_state = yy_nxt[yy_current_state][(unsigned int)%s]) > 0 )",
char_map );
indent_up();
}
else
- (void) strcpy( char_map, useecs ? "yy_ec[*yy_cp]" : "*yy_cp" );
+ (void) strcpy( char_map,
+ useecs ? "yy_ec[(unsigned int) *yy_cp]" : "*yy_cp" );
if ( worry_about_NULs && nultrans )
{
if ( fulltbl )
indent_put2s(
- "yy_current_state = yy_nxt[yy_current_state][%s];",
+ "yy_current_state = yy_nxt[yy_current_state][(unsigned int) %s];",
char_map );
else if ( fullspd )
indent_put2s(
- "yy_current_state += yy_current_state[%s].yy_nxt;",
+ "yy_current_state += yy_current_state[(unsigned int) %s].yy_nxt;",
char_map );
else
if ( need_backing_up )
/* We'll need yy_cp lying around for the gen_backing_up(). */
- indent_puts( "register YY_CHAR *yy_cp = yy_c_buf_p;" );
+ indent_puts( "register char *yy_cp = yy_c_buf_p;" );
putchar( '\n' );
indent_puts(
"static yy_state_type yy_last_accepting_state;" );
indent_puts(
- "static YY_CHAR *yy_last_accepting_cpos;\n" );
+ "static char *yy_last_accepting_cpos;\n" );
}
}
{
puts(
"static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;" );
- puts( "static YY_CHAR *yy_full_match;" );
+ puts( "static char *yy_full_match;" );
puts( "static int yy_lp;" );
}
skelout();
if ( bol_needed )
- indent_puts( "register YY_CHAR *yy_bp = yytext_ptr;\n" );
+ indent_puts( "register char *yy_bp = yytext_ptr;\n" );
gen_start_state();