From db70af80e01199bd2329f0363b9f7769dee1a783 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Tue, 10 Aug 2010 00:26:37 +0000 Subject: Improved the code by using Flex functions. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@180 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 5 +++++ src/format/mangling/itanium_tok.l | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2f5a9f..a12f9d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 10-08-10 Cyrille Bagard + * src/format/mangling/itanium_tok.l: + Improve the code by using Flex functions. + +10-08-10 Cyrille Bagard + * 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; } } /* */ -. { if (--itanium_txt_length == 0) BEGIN(INITIAL); yylval.car = *yytext; return CHAR; } +. { if (--itanium_txt_length == 0) yy_pop_state(); yylval.car = *yytext; return CHAR; } [ ] @@ -188,7 +189,7 @@ void set_itanium_text_length(unsigned int length) { itanium_txt_length = length; - BEGIN(identifier); + yy_push_state(identifier); } -- cgit v0.11.2-87-g4458