Changes in src/Parser/lex.ll [e7aed49:dd51906]
- File:
-
- 1 edited
-
src/Parser/lex.ll (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
re7aed49 rdd51906 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Wed Jun 22 21:20:18201613 * Update Count : 45 612 * Last Modified On : Mon Jun 6 18:08:27 2016 13 * Update Count : 451 14 14 */ 15 15 … … 49 49 50 50 void rm_underscore() { 51 // Remove underscores in numeric constant by copying the non-underscore characters to the front of the string.52 yyleng= 0;51 // remove underscores in numeric constant 52 int j = 0; 53 53 for ( int i = 0; yytext[i] != '\0'; i += 1 ) { 54 54 if ( yytext[i] != '_' ) { 55 yytext[ yyleng] = yytext[i];56 yyleng+= 1;55 yytext[j] = yytext[i]; 56 j += 1; 57 57 } // if 58 58 } // for 59 yyleng = j; 59 60 yytext[yyleng] = '\0'; 60 61 } … … 120 121 h_white [ ]|{h_tab} 121 122 122 // o verloadable operators123 // operators 123 124 op_unary_only "~"|"!" 124 125 op_unary_binary "+"|"-"|"*" … … 128 129 op_binary_only "/"|"%"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"&="|"|="|"^="|"<<="|">>=" 129 130 op_binary_over {op_unary_binary}|{op_binary_only} 130 // op_binary_not_over "?"|"->"|"."|"&&"|"||"|"@="131 //operator {op_unary_pre_post}|{op_binary_over}|{op_binary_not_over}131 op_binary_not_over "?"|"->"|"&&"|"||" 132 operator {op_unary_pre_post}|{op_binary_over}|{op_binary_not_over} 132 133 133 134 %x COMMENT … … 361 362 362 363 "@=" { NAMEDOP_RETURN(ATassign); } 364 ":=" { NAMEDOP_RETURN(REFassign); } 363 365 364 366 /* CFA, operator identifier */
Note:
See TracChangeset
for help on using the changeset viewer.