diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/format/mangling/itanium_tok.l | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,10 @@ 10-08-10 Cyrille Bagard <nocbos@gmail.com> + * src/format/mangling/itanium_tok.l: + Improve the code by using Flex functions. + +10-08-10 Cyrille Bagard <nocbos@gmail.com> + * src/analysis/routine.c: * src/analysis/routine.h: Improve the code. diff --git a/src/format/mangling/itanium_tok.l b/src/format/mangling/itanium_tok.l index a4c330b..3c74410 100644 --- a/src/format/mangling/itanium_tok.l +++ b/src/format/mangling/itanium_tok.l @@ -22,6 +22,7 @@ void exclude_itanium_operators(void); %option noyywrap +%option stack %option yylineno @@ -163,7 +164,7 @@ T[0-9]*_ { yylval.val = atoi(yytext + 1); return TPARAM_N; } } /* <INITIAL,operators> */ -<identifier>. { if (--itanium_txt_length == 0) BEGIN(INITIAL); yylval.car = *yytext; return CHAR; } +<identifier>. { if (--itanium_txt_length == 0) yy_pop_state(); yylval.car = *yytext; return CHAR; } <INITIAL,operators>[ ] @@ -188,7 +189,7 @@ void set_itanium_text_length(unsigned int length) { itanium_txt_length = length; - BEGIN(identifier); + yy_push_state(identifier); } |