Changeset f80e0218 for src/Parser/lex.ll


Ignore:
Timestamp:
Jun 30, 2016, 4:32:56 PM (10 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
ea29e73
Parents:
1b5c81ed (diff), 84d4d6f (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.
Message:

Merge branch 'master' into gc_noraii

Conflicts:

Jenkinsfile
src/SymTab/Validate.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    r1b5c81ed rf80e0218  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Mon Mar 21 23:33:46 2016
    13  * Update Count     : 450
     12 * Last Modified On : Thu Jun 23 07:29:30 2016
     13 * Update Count     : 457
    1414 */
    1515
     
    4949
    5050void rm_underscore() {
    51         // remove underscores in numeric constant
    52         int j = 0;
     51        // Remove underscores in numeric constant by copying the non-underscore characters to the front of the string.
     52        yyleng = 0;
    5353        for ( int i = 0; yytext[i] != '\0'; i += 1 ) {
    5454                if ( yytext[i] != '_' ) {
    55                         yytext[j] = yytext[i];
    56                         j += 1;
     55                        yytext[yyleng] = yytext[i];
     56                        yyleng += 1;
    5757                } // if
    5858        } // for
    59         yyleng = j;
    6059        yytext[yyleng] = '\0';
    6160}
     
    121120h_white [ ]|{h_tab}
    122121
    123                                 // operators
     122                                // overloadable operators
    124123op_unary_only "~"|"!"
    125124op_unary_binary "+"|"-"|"*"
     
    129128op_binary_only "/"|"%"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"&="|"|="|"^="|"<<="|">>="
    130129op_binary_over {op_unary_binary}|{op_binary_only}
    131 op_binary_not_over "?"|"->"|"&&"|"||"
    132 operator {op_unary_pre_post}|{op_binary_over}|{op_binary_not_over}
     130                                // op_binary_not_over "?"|"->"|"."|"&&"|"||"|"@="
     131                                // operator {op_unary_pre_post}|{op_binary_over}|{op_binary_not_over}
    133132
    134133%x COMMENT
     
    274273{identifier}    { IDENTIFIER_RETURN(); }
    275274{attr_identifier} { ATTRIBUTE_RETURN(); }
    276 "`"                     { BEGIN BKQUOTE; }
     275"`"                             { BEGIN BKQUOTE; }
    277276<BKQUOTE>{identifier} { IDENTIFIER_RETURN(); }
    278277<BKQUOTE>"`"    { BEGIN 0; }
Note: See TracChangeset for help on using the changeset viewer.