Changeset 7030dab for src/Parser/lex.ll
- Timestamp:
- Apr 6, 2020, 4:46:28 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e3bc51c
- Parents:
- 71d6bd8 (diff), 057298e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
r71d6bd8 r7030dab 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : S un Aug 4 20:53:47 201913 * Update Count : 7 1912 * Last Modified On : Sat Feb 15 11:05:50 2020 13 * Update Count : 737 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 … … 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 … … 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 - 1] = '\0'; yytext += 1;// 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.