Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    re7aed49 rdd51906  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Wed Jun 22 21:20:18 2016
    13  * Update Count     : 456
     12 * Last Modified On : Mon Jun  6 18:08:27 2016
     13 * Update Count     : 451
    1414 */
    1515
     
    4949
    5050void 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;
    5353        for ( int i = 0; yytext[i] != '\0'; i += 1 ) {
    5454                if ( yytext[i] != '_' ) {
    55                         yytext[yyleng] = yytext[i];
    56                         yyleng += 1;
     55                        yytext[j] = yytext[i];
     56                        j += 1;
    5757                } // if
    5858        } // for
     59        yyleng = j;
    5960        yytext[yyleng] = '\0';
    6061}
     
    120121h_white [ ]|{h_tab}
    121122
    122                                 // overloadable operators
     123                                // operators
    123124op_unary_only "~"|"!"
    124125op_unary_binary "+"|"-"|"*"
     
    128129op_binary_only "/"|"%"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"&="|"|="|"^="|"<<="|">>="
    129130op_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}
     131op_binary_not_over "?"|"->"|"&&"|"||"
     132operator {op_unary_pre_post}|{op_binary_over}|{op_binary_not_over}
    132133
    133134%x COMMENT
     
    361362
    362363"@="                    { NAMEDOP_RETURN(ATassign); }
     364":="                    { NAMEDOP_RETURN(REFassign); }
    363365
    364366                                /* CFA, operator identifier */
Note: See TracChangeset for help on using the changeset viewer.