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