diff options
Diffstat (limited to 'src/format/mangling/itanium_tok.l')
-rw-r--r-- | src/format/mangling/itanium_tok.l | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/src/format/mangling/itanium_tok.l b/src/format/mangling/itanium_tok.l index e8fb7f1..a4c330b 100644 --- a/src/format/mangling/itanium_tok.l +++ b/src/format/mangling/itanium_tok.l @@ -10,6 +10,13 @@ static unsigned int itanium_txt_length = 0; /* Borne la longueur d'une chaîne à lire. */ void set_itanium_text_length(unsigned int); +/* Autorise la lecture des opérateurs. */ +void allow_itanium_operators(void); + +/* Autorise la lecture des opérateurs. */ +void exclude_itanium_operators(void); + + %} @@ -19,11 +26,14 @@ void set_itanium_text_length(unsigned int); %x identifier +%x operators %% +<INITIAL,operators>{ + _Z { return ITANIUM_SIGNATURE; } E { return EE; } @@ -86,6 +96,9 @@ Si { return SI; } So { return SO; } Sd { return SD; } +} /* INITIAL,operators> */ + +<operators>{ nw { return OPER_NEW; } na { return OPER_NEW_ARRAY; } @@ -134,6 +147,9 @@ pt { return OPER_POINTER_TO; } cl { return OPER_CLASS; } ix { return OPER_INDEX; } +} /* operators */ + +<INITIAL,operators>{ S_ { return SUBSTI_FIRST; } S[0-9a-z]_ { yylval.val = atoi(yytext + 1); return SUBSTI_N; } @@ -145,9 +161,11 @@ T[0-9]*_ { yylval.val = atoi(yytext + 1); return TPARAM_N; } [0-9]+ { yylval.val = atoi(yytext); return NUMBER; } +} /* <INITIAL,operators> */ + <identifier>. { if (--itanium_txt_length == 0) BEGIN(INITIAL); yylval.car = *yytext; return CHAR; } -<*>[ ] +<INITIAL,operators>[ ] <*>. { printf("error : '%s'\n", yytext); } @@ -173,3 +191,41 @@ void set_itanium_text_length(unsigned int length) BEGIN(identifier); } + + +/****************************************************************************** +* * +* Paramètres : - * +* * +* Description : Autorise la lecture des opérateurs. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void allow_itanium_operators(void) +{ + BEGIN(operators); + +} + + +/****************************************************************************** +* * +* Paramètres : - * +* * +* Description : Autorise la lecture des opérateurs. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void exclude_itanium_operators(void) +{ + BEGIN(INITIAL); + +} |