summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-08-10 00:26:37 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-08-10 00:26:37 (GMT)
commitdb70af80e01199bd2329f0363b9f7769dee1a783 (patch)
treeacc36b26b134dec33a40b72bf67ffe36af416799 /src/format
parent088a489002fd1c9a62d5cafe693dc73cc271ee18 (diff)
Improved the code by using Flex functions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@180 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format')
-rw-r--r--src/format/mangling/itanium_tok.l5
1 files changed, 3 insertions, 2 deletions
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);
}