#define YY_USER_INIT \
do { \
LOCATION_RESET (*yylloc); \
+ yylloc->file = infile; \
/* This is only to avoid GCC warnings. */ \
if (yycontrol) {;}; \
} while (0)
-#define YY_USER_ACTION LOCATION_COLUMNS (*yylloc, yyleng)
-#define YY_LINES LOCATION_LINES (*yylloc, yyleng); lineno += yyleng;
-#define YY_STEP LOCATION_STEP (*yylloc)
-
+#define YY_USER_ACTION LOCATION_COLUMNS (*yylloc, yyleng);
+#define YY_LINES LOCATION_LINES (*yylloc, yyleng);
+#define YY_STEP LOCATION_STEP (*yylloc);
/* STRING_OBSTACK -- Used to store all the characters that we need to
keep (to construct ID, STRINGS etc.). Use the following macros to
%x SC_ESCAPED_STRING SC_ESCAPED_CHARACTER
%x SC_BRACED_CODE SC_PROLOGUE SC_EPILOGUE
-id [.a-zA-Z][.a-zA-Z_0-9]*
+id [.a-zA-Z_][.a-zA-Z_0-9]*
int [0-9]+
eols (\n|\r|\n\r|\r\n)+
blanks [ \t\f]+
YY_OBS_FINISH;
yylval->symbol = symbol_get (last_string, *yylloc);
symbol_class_set (yylval->symbol, token_sym, *yylloc);
- symbol_user_token_number_set (yylval->symbol, last_string[1], *yylloc);
+ symbol_user_token_number_set (yylval->symbol,
+ (unsigned char) last_string[1], *yylloc);
YY_OBS_FREE;
yy_pop_state ();
return ID;
scanner_free (void)
{
obstack_free (&string_obstack, 0);
+ /* Reclaim Flex's buffers. */
+ yy_delete_buffer (YY_CURRENT_BUFFER);
}