Changeset b21c77a for src/Parser/lex.ll
- Timestamp:
- Jun 29, 2018, 4:14:15 PM (6 years ago)
- Branches:
- new-env
- Children:
- 184557e
- Parents:
- 97397a26 (diff), 28f3a19 (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
r97397a26 rb21c77a 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Thu May 3 13:42:40201813 * Update Count : 6 7612 * Last Modified On : Wed Jun 20 09:08:28 2018 13 * Update Count : 682 14 14 */ 15 15 … … 25 25 //**************************** Includes and Defines **************************** 26 26 27 // trigger before each matching rule's action 28 #define YY_USER_ACTION \ 29 yylloc.first_line = yylineno; \ 30 yylloc.first_column = column; \ 31 column += yyleng; \ 32 yylloc.last_column = column; \ 33 yylloc.last_line = yylineno; \ 34 yylloc.filename = yyfilename ? yyfilename : ""; 27 35 unsigned int column = 0; // position of the end of the last token parsed 28 #define YY_USER_ACTION yylloc.first_line = yylineno; yylloc.first_column = column; column += yyleng; yylloc.last_column = column; yylloc.last_line = yylineno; yylloc.filename = yyfilename ? yyfilename : ""; // trigger before each matching rule's action29 36 30 37 #include <string> … … 49 56 #define NUMERIC_RETURN(x) rm_underscore(); RETURN_VAL( x ) // numeric constant 50 57 #define KEYWORD_RETURN(x) RETURN_CHAR( x ) // keyword 51 #define QKEYWORD_RETURN(x) typedefTable.isKind( yytext ); RETURN_VAL(x);// quasi-keyword58 #define QKEYWORD_RETURN(x) RETURN_VAL(x); // quasi-keyword 52 59 #define IDENTIFIER_RETURN() RETURN_VAL( typedefTable.isKind( yytext ) ) 53 60 #define ATTRIBUTE_RETURN() RETURN_VAL( ATTR_IDENTIFIER ) … … 232 239 finally { KEYWORD_RETURN(FINALLY); } // CFA 233 240 float { KEYWORD_RETURN(FLOAT); } 241 _Float32 { KEYWORD_RETURN(FLOAT); } // GCC 242 _Float32x { KEYWORD_RETURN(FLOAT); } // GCC 243 _Float64 { KEYWORD_RETURN(DOUBLE); } // GCC 244 _Float64x { KEYWORD_RETURN(DOUBLE); } // GCC 234 245 __float80 { KEYWORD_RETURN(FLOAT80); } // GCC 235 246 float80 { KEYWORD_RETURN(FLOAT80); } // GCC 247 _Float128 { KEYWORD_RETURN(FLOAT128); } // GCC 248 _Float128x { KEYWORD_RETURN(FLOAT128); } // GCC 236 249 __float128 { KEYWORD_RETURN(FLOAT128); } // GCC 237 250 float128 { KEYWORD_RETURN(FLOAT128); } // GCC … … 446 459 447 460 %% 461 448 462 // ----end of lexer---- 449 463 450 464 void yyerror( const char * errmsg ) { 465 SemanticErrorThrow = true; 451 466 cout << (yyfilename ? yyfilename : "*unknown file*") << ':' << yylineno << ':' << column - yyleng + 1 452 467 << ": " << ErrorHelpers::error_str() << errmsg << " at token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << '"' << endl;
Note: See TracChangeset
for help on using the changeset viewer.