Changes in src/Parser/lex.ll [984dce6:bd85400]
- File:
-
- 1 edited
-
src/Parser/lex.ll (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
r984dce6 rbd85400 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Mon Mar 21 23:33:46201613 * Update Count : 4 5012 * Last Modified On : Tue Feb 2 15:06:54 2016 13 * Update Count : 426 14 14 */ 15 15 … … 27 27 28 28 #include "lex.h" 29 #include "ParseNode.h" 29 30 #include "parser.h" // YACC generated definitions based on C++ grammar 30 #include "ParseNode.h"31 #include "TypedefTable.h"32 31 33 32 char *yyfilename; … … 45 44 #define NUMERIC_RETURN(x) rm_underscore(); RETURN_VAL( x ) // numeric constant 46 45 #define KEYWORD_RETURN(x) RETURN_CHAR( x ) // keyword 47 #define IDENTIFIER_RETURN() RETURN_VAL( typedefTable.isKind( yytext) )46 #define IDENTIFIER_RETURN() RETURN_VAL( (typedefTable.isIdentifier( yytext ) ? IDENTIFIER : typedefTable.isTypedef( yytext ) ? TYPEDEFname : TYPEGENname ) ) 48 47 #define ATTRIBUTE_RETURN() RETURN_VAL( ATTR_IDENTIFIER ) 49 48 … … 96 95 fractional_constant ({decimal_digits}?"."{decimal_digits})|({decimal_digits}".") 97 96 exponent "_"?[eE]"_"?[+-]?{decimal_digits} 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])) 97 // GCC: D (double), LD (long double) and iI (imaginary) suffixes 98 floating_suffix "_"?([fFdD]?|([lL]?)|([iI][lLfFdD]?)|([lLfFdD][iI])) 101 99 floating_constant (({fractional_constant}{exponent}?)|({decimal_digits}{exponent})){floating_suffix}? 102 100 … … 139 137 %% 140 138 /* line directives */ 141 ^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["] .*"\n" {139 ^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["][^\n]*"\n" { 142 140 /* " stop highlighting */ 143 141 char *end_num; … … 203 201 __const { KEYWORD_RETURN(CONST); } // GCC 204 202 __const__ { KEYWORD_RETURN(CONST); } // GCC 203 context { KEYWORD_RETURN(CONTEXT); } // CFA 205 204 continue { KEYWORD_RETURN(CONTINUE); } 206 205 default { KEYWORD_RETURN(DEFAULT); } … … 238 237 _Noreturn { KEYWORD_RETURN(NORETURN); } // C11 239 238 __builtin_offsetof { KEYWORD_RETURN(OFFSETOF); } // GCC 240 otype { KEYWORD_RETURN(OTYPE); } // CFA241 239 register { KEYWORD_RETURN(REGISTER); } 242 240 restrict { KEYWORD_RETURN(RESTRICT); } // C99 … … 256 254 throw { KEYWORD_RETURN(THROW); } // CFA 257 255 throwResume { KEYWORD_RETURN(THROWRESUME); } // CFA 258 trait { KEYWORD_RETURN(TRAIT); } // CFA259 256 try { KEYWORD_RETURN(TRY); } // CFA 257 type { KEYWORD_RETURN(TYPE); } // CFA 260 258 typedef { KEYWORD_RETURN(TYPEDEF); } 261 259 typeof { KEYWORD_RETURN(TYPEOF); } // GCC … … 264 262 union { KEYWORD_RETURN(UNION); } 265 263 unsigned { KEYWORD_RETURN(UNSIGNED); } 266 __builtin_va_list { KEYWORD_RETURN(VALIST); } // GCC267 264 void { KEYWORD_RETURN(VOID); } 268 265 volatile { KEYWORD_RETURN(VOLATILE); }
Note:
See TracChangeset
for help on using the changeset viewer.