Changes in src/Parser/lex.ll [948fdef:25744d2]
- File:
-
- 1 edited
-
src/Parser/lex.ll (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
r948fdef r25744d2 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Sat Feb 1 07:16:44202013 * Update Count : 7 2412 * Last Modified On : Tue Oct 6 18:15:41 2020 13 * Update Count : 743 14 14 */ 15 15 … … 43 43 #include "TypedefTable.h" 44 44 45 string * build_postfix_name( string * name ); 46 45 47 char *yyfilename; 46 48 string *strtext; // accumulate parts of character and string constant value … … 60 62 #define IDENTIFIER_RETURN() RETURN_VAL( typedefTable.isKind( yytext ) ) 61 63 62 #ifdef HAVE_KEYWORDS_FLOATXX // GCC >= 7 => keyword, otherwise typedef64 #ifdef HAVE_KEYWORDS_FLOATXX // GCC >= 7 => keyword, otherwise typedef 63 65 #define FLOATXX(v) KEYWORD_RETURN(v); 64 66 #else 65 #define FLOATXX(v) IDENTIFIER_RETURN(); 67 #define FLOATXX(v) IDENTIFIER_RETURN(); 66 68 #endif // HAVE_KEYWORDS_FLOATXX 67 69 … … 290 292 __restrict__ { KEYWORD_RETURN(RESTRICT); } // GCC 291 293 return { KEYWORD_RETURN(RETURN); } 292 /* resume { KEYWORD_RETURN(RESUME); } // CFA */294 /* resume { KEYWORD_RETURN(RESUME); } // CFA */ 293 295 short { KEYWORD_RETURN(SHORT); } 294 296 signed { KEYWORD_RETURN(SIGNED); } … … 299 301 _Static_assert { KEYWORD_RETURN(STATICASSERT); } // C11 300 302 struct { KEYWORD_RETURN(STRUCT); } 301 /* suspend { KEYWORD_RETURN(SUSPEND); } // CFA */ 303 suspend { KEYWORD_RETURN(SUSPEND); } // CFA 302 304 switch { KEYWORD_RETURN(SWITCH); } 303 305 thread { KEYWORD_RETURN(THREAD); } // C11 … … 330 332 /* identifier */ 331 333 {identifier} { IDENTIFIER_RETURN(); } 332 "``"{identifier} "``" {// CFA333 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?) 334 336 IDENTIFIER_RETURN(); 335 337 } … … 432 434 "?"({op_unary_pre_post}|"()"|"[?]"|"{}") { IDENTIFIER_RETURN(); } 433 435 "^?{}" { 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 } 435 441 "?"{op_binary_over}"?" { IDENTIFIER_RETURN(); } // binary 436 442 /*
Note:
See TracChangeset
for help on using the changeset viewer.