Changeset 0f9e4403 for src/Parser/lex.ll
- Timestamp:
- Apr 15, 2016, 12:03:11 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 29ad0ac
- Parents:
- c5833e8 (diff), 37f0da8 (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
-
src/Parser/lex.ll (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
rc5833e8 r0f9e4403 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Tue Feb 2 15:06:54201613 * Update Count : 4 2612 * Last Modified On : Mon Mar 21 23:33:46 2016 13 * Update Count : 450 14 14 */ 15 15 … … 27 27 28 28 #include "lex.h" 29 #include "parser.h" // YACC generated definitions based on C++ grammar 29 30 #include "ParseNode.h" 30 #include " parser.h" // YACC generated definitions based on C++ grammar31 #include "TypedefTable.h" 31 32 32 33 char *yyfilename; … … 44 45 #define NUMERIC_RETURN(x) rm_underscore(); RETURN_VAL( x ) // numeric constant 45 46 #define KEYWORD_RETURN(x) RETURN_CHAR( x ) // keyword 46 #define IDENTIFIER_RETURN() RETURN_VAL( (typedefTable.isIdentifier( yytext ) ? IDENTIFIER : typedefTable.isTypedef( yytext ) ? TYPEDEFname : TYPEGENname) )47 #define IDENTIFIER_RETURN() RETURN_VAL( typedefTable.isKind( yytext ) ) 47 48 #define ATTRIBUTE_RETURN() RETURN_VAL( ATTR_IDENTIFIER ) 48 49 … … 95 96 fractional_constant ({decimal_digits}?"."{decimal_digits})|({decimal_digits}".") 96 97 exponent "_"?[eE]"_"?[+-]?{decimal_digits} 97 // GCC: D (double), LD (long double) and iI (imaginary) suffixes 98 floating_suffix "_"?([fFdD]?|([lL]?)|([iI][lLfFdD]?)|([lLfFdD][iI])) 98 // GCC: D (double), DL (long double) and iI (imaginary) suffixes 99 floating_suffix "_"?([fFdDlL][iI]?|"DL"|[iI][lLfFdD]?) 100 //floating_suffix "_"?([fFdD]|[lL]|[D][L])|([iI][lLfFdD])|([lLfFdD][iI])) 99 101 floating_constant (({fractional_constant}{exponent}?)|({decimal_digits}{exponent})){floating_suffix}? 100 102 … … 137 139 %% 138 140 /* line directives */ 139 ^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["] [^\n]*"\n" {141 ^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["].*"\n" { 140 142 /* " stop highlighting */ 141 143 char *end_num; … … 201 203 __const { KEYWORD_RETURN(CONST); } // GCC 202 204 __const__ { KEYWORD_RETURN(CONST); } // GCC 203 context { KEYWORD_RETURN(CONTEXT); } // CFA204 205 continue { KEYWORD_RETURN(CONTINUE); } 205 206 default { KEYWORD_RETURN(DEFAULT); } … … 237 238 _Noreturn { KEYWORD_RETURN(NORETURN); } // C11 238 239 __builtin_offsetof { KEYWORD_RETURN(OFFSETOF); } // GCC 240 otype { KEYWORD_RETURN(OTYPE); } // CFA 239 241 register { KEYWORD_RETURN(REGISTER); } 240 242 restrict { KEYWORD_RETURN(RESTRICT); } // C99 … … 254 256 throw { KEYWORD_RETURN(THROW); } // CFA 255 257 throwResume { KEYWORD_RETURN(THROWRESUME); } // CFA 258 trait { KEYWORD_RETURN(TRAIT); } // CFA 256 259 try { KEYWORD_RETURN(TRY); } // CFA 257 type { KEYWORD_RETURN(TYPE); } // CFA258 260 typedef { KEYWORD_RETURN(TYPEDEF); } 259 261 typeof { KEYWORD_RETURN(TYPEOF); } // GCC … … 262 264 union { KEYWORD_RETURN(UNION); } 263 265 unsigned { KEYWORD_RETURN(UNSIGNED); } 266 __builtin_va_list { KEYWORD_RETURN(VALIST); } // GCC 264 267 void { KEYWORD_RETURN(VOID); } 265 268 volatile { KEYWORD_RETURN(VOLATILE); }
Note:
See TracChangeset
for help on using the changeset viewer.