extern void *yy_flex_realloc YY_PROTO(( void *ptr, int size ));
extern void yy_flex_free YY_PROTO(( void * ));
extern int yywrap YY_PROTO(( void ));
- extern void yy_strcpy YY_PROTO(( char *s1, const char *s2 ));
+ extern void yy_flex_strcpy YY_PROTO(( char *s1, const char *s2 ));
#ifdef __cplusplus
}
#endif
void *yy_flex_alloc PROTO((int));
void *yy_flex_realloc PROTO((void*, int));
void yy_flex_free PROTO((void*));
-int yy_strcmp PROTO(( const char *s1, const char *s2 ));
-void yy_strcpy PROTO(( char *s1, const char *s2 ));
-int yy_strlen PROTO(( const char *s ));
+int yy_flex_strcmp PROTO(( const char *s1, const char *s2 ));
+void yy_flex_strcpy PROTO(( char *s1, const char *s2 ));
+int yy_flex_strlen PROTO(( const char *s ));
+
+#define strcmp yy_flex_strcmp
+#define strcpy yy_flex_strcpy
+#define strlen yy_flex_strlen
#define allocate_integer_array(size) \
(int *) allocate_array( size, sizeof( int ) )
}
else
- yy_strcpy( char_map, useecs ?
- "yy_ec[YY_SC_TO_UI(*yy_cp)]" :
- "YY_SC_TO_UI(*yy_cp)" );
+ strcpy( char_map, useecs ?
+ "yy_ec[YY_SC_TO_UI(*yy_cp)]" : "YY_SC_TO_UI(*yy_cp)" );
if ( worry_about_NULs && nultrans )
{
indent_puts(
"YY_FATAL_ERROR( \"token too large, exceeds YYLMAX\" ); \\" );
indent_down();
- indent_puts( "yy_strcpy( yytext, yytext_ptr ); \\" );
+ indent_puts( "yy_flex_strcpy( yytext, yytext_ptr ); \\" );
}
set_indent( 0 );
if ( skelname )
fprintf( stderr, " -S%s", skelname );
- if ( yy_strcmp( prefix, "yy" ) )
+ if ( strcmp( prefix, "yy" ) )
fprintf( stderr, " -P%s", prefix );
putc( '\n', stderr );
program_name = argv[0];
if ( program_name[0] != '\0' &&
- program_name[yy_strlen( program_name ) - 1] == '+' )
+ program_name[strlen( program_name ) - 1] == '+' )
C_plus_plus = true;
/* read flags */
if ( skelname && (skelfile = fopen( skelname, "r" )) == NULL )
lerrsf( "can't open skeleton file %s", skelname );
- if ( yy_strcmp( prefix, "yy" ) )
+ if ( strcmp( prefix, "yy" ) )
{
#define GEN_PREFIX(name) out_str3( "#define yy%s %s%s\n", name, prefix, name );
GEN_PREFIX( "FlexLexer" );
void add_action( new_text )
char *new_text;
{
- int len = yy_strlen( new_text );
+ int len = strlen( new_text );
while ( len + action_index >= action_size - 10 /* slop */ )
{
reallocate_character_array( action_array, action_size );
}
- yy_strcpy( &action_array[action_index], new_text );
+ strcpy( &action_array[action_index], new_text );
action_index += len;
}
return CHAR;
#define RETURNNAME \
- yy_strcpy( nmstr, yytext ); \
+ strcpy( nmstr, yytext ); \
return NAME;
#define PUT_BACK_STRING(str, start) \
- for ( i = yy_strlen( str ) - 1; i >= start; --i ) \
+ for ( i = strlen( str ) - 1; i >= start; --i ) \
unput((str)[i])
#define CHECK_REJECT(str) \
^"%"[^sxanpekotcru{}].* synerr( "unrecognized '%' directive" );
^{NAME} {
- yy_strcpy( nmstr, yytext );
+ strcpy( nmstr, yytext );
didadef = false;
BEGIN(PICKUPDEF);
}
<PICKUPDEF>{WS} /* separates name and definition */
<PICKUPDEF>{NOT_WS}.* {
- yy_strcpy( (char *) nmdef, yytext );
+ strcpy( (char *) nmdef, yytext );
/* Skip trailing whitespace. */
- for ( i = yy_strlen( (char *) nmdef ) - 1;
+ for ( i = strlen( (char *) nmdef ) - 1;
i >= 0 && (nmdef[i] == ' ' || nmdef[i] == '\t');
--i )
;
<SECT2>"["{FIRST_CCL_CHAR}{CCL_CHAR}* {
int cclval;
- yy_strcpy( nmstr, yytext );
+ strcpy( nmstr, yytext );
/* Check to see if we've already encountered this
* ccl.
register Char *nmdefptr;
Char *ndlookup();
- yy_strcpy( nmstr, yytext + 1 );
+ strcpy( nmstr, yytext + 1 );
nmstr[yyleng - 2] = '\0'; /* chop trailing brace */
if ( ! (nmdefptr = ndlookup( nmstr )) )
else
{ /* push back name surrounded by ()'s */
- int len = yy_strlen( (char *) nmdefptr );
+ int len = strlen( (char *) nmdefptr );
if ( lex_compat || nmdefptr[0] == '^' ||
(len > 0 && nmdefptr[len - 1] == '$') )
while ( sym_entry )
{
- if ( ! yy_strcmp( sym, sym_entry->name ) )
+ if ( ! strcmp( sym, sym_entry->name ) )
{ /* entry already exists */
return -1;
}
while ( sym_entry )
{
- if ( ! yy_strcmp( sym, sym_entry->name ) )
+ if ( ! strcmp( sym, sym_entry->name ) )
return sym_entry;
sym_entry = sym_entry->next;
}