Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    r948fdef r25744d2  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Sat Feb  1 07:16:44 2020
    13  * Update Count     : 724
     12 * Last Modified On : Tue Oct  6 18:15:41 2020
     13 * Update Count     : 743
    1414 */
    1515
     
    4343#include "TypedefTable.h"
    4444
     45string * build_postfix_name( string * name );
     46
    4547char *yyfilename;
    4648string *strtext;                                                                                // accumulate parts of character and string constant value
     
    6062#define IDENTIFIER_RETURN()     RETURN_VAL( typedefTable.isKind( yytext ) )
    6163
    62 #ifdef HAVE_KEYWORDS_FLOATXX                                                            // GCC >= 7 => keyword, otherwise typedef
     64#ifdef HAVE_KEYWORDS_FLOATXX                                                    // GCC >= 7 => keyword, otherwise typedef
    6365#define FLOATXX(v) KEYWORD_RETURN(v);
    6466#else
    65 #define FLOATXX(v) IDENTIFIER_RETURN(); 
     67#define FLOATXX(v) IDENTIFIER_RETURN();
    6668#endif // HAVE_KEYWORDS_FLOATXX
    6769
     
    290292__restrict__    { KEYWORD_RETURN(RESTRICT); }                   // GCC
    291293return                  { KEYWORD_RETURN(RETURN); }
    292         /* resume                       { KEYWORD_RETURN(RESUME); }                             // CFA */
     294 /* resume                      { KEYWORD_RETURN(RESUME); }                             // CFA */
    293295short                   { KEYWORD_RETURN(SHORT); }
    294296signed                  { KEYWORD_RETURN(SIGNED); }
     
    299301_Static_assert  { KEYWORD_RETURN(STATICASSERT); }               // C11
    300302struct                  { KEYWORD_RETURN(STRUCT); }
    301         /* suspend                      { KEYWORD_RETURN(SUSPEND); }                    // CFA */
     303suspend                 { KEYWORD_RETURN(SUSPEND); }                    // CFA
    302304switch                  { KEYWORD_RETURN(SWITCH); }
    303305thread                  { KEYWORD_RETURN(THREAD); }                             // C11
     
    330332                                /* identifier */
    331333{identifier}    { IDENTIFIER_RETURN(); }
    332 "``"{identifier}"``" {                                                                  // CFA
    333         yytext[yyleng - 2] = '\0'; yytext += 2;                         // SKULLDUGGERY: remove backquotes (ok to shorten?)
     334"``"{identifier} {                                                                              // CFA
     335        yytext[yyleng] = '\0'; yytext += 2;                                     // SKULLDUGGERY: remove backquotes (ok to shorten?)
    334336        IDENTIFIER_RETURN();
    335337}
     
    432434"?"({op_unary_pre_post}|"()"|"[?]"|"{}") { IDENTIFIER_RETURN(); }
    433435"^?{}"                  { IDENTIFIER_RETURN(); }
    434 "?`"{identifier} { IDENTIFIER_RETURN(); }                               // postfix operator
     436"?`"{identifier} {                                                                              // postfix operator
     437        yylval.tok.str = new string( &yytext[2] );                      // remove ?`
     438        yylval.tok.str = build_postfix_name( yylval.tok.str ); // add prefix
     439        RETURN_LOCN( typedefTable.isKind( *yylval.tok.str ) );
     440}
    435441"?"{op_binary_over}"?"  { IDENTIFIER_RETURN(); }                // binary
    436442        /*
Note: See TracChangeset for help on using the changeset viewer.