Changeset 7e419e7


Ignore:
Timestamp:
Mar 23, 2018, 9:29:09 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
af1ed1ad
Parents:
766309d
Message:

formatting, documentation

Location:
src/Parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    r766309d r7e419e7  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Thu Mar 22 14:14:46 2018
    13  * Update Count     : 667
     12 * Last Modified On : Thu Mar 22 16:47:06 2018
     13 * Update Count     : 668
    1414 */
    1515
     
    5454
    5555void rm_underscore() {
    56         // Remove underscores in numeric constant by copying the non-underscore characters to the front of the string.
     56        // SKULLDUGGERY: remove underscores (ok to shorten?)
    5757        yyleng = 0;
    58         for ( int i = 0; yytext[i] != '\0'; i += 1 ) {
     58        for ( int i = 0; yytext[i] != '\0'; i += 1 ) {          // copying non-underscore characters to front of string
    5959                if ( yytext[i] != '_' ) {
    6060                        yytext[yyleng] = yytext[i];
     
    6363        } // for
    6464        yytext[yyleng] = '\0';
    65 }
     65} // rm_underscore
    6666
    6767// Stop warning due to incorrectly generated flex code.
     
    304304                                /* identifier */
    305305{identifier}    { IDENTIFIER_RETURN(); }
    306 "`"{identifier}"`" {
    307         yytext[yyleng - 1] = '\0'; yytext += 1;                         // remove backquotes (ok to shorten)
     306"`"{identifier}"`" {                                                                    // CFA
     307        yytext[yyleng - 1] = '\0'; yytext += 1;                         // SKULLDUGGERY: remove backquotes (ok to shorten?)
    308308        IDENTIFIER_RETURN();
    309309}
     
    404404"?"({op_unary_pre_post}|"()"|"[?]"|"{}") { IDENTIFIER_RETURN(); }
    405405"^?{}"                  { IDENTIFIER_RETURN(); }
    406 "?`"{identifier} { IDENTIFIER_RETURN(); }                               // unit operator
     406"?`"{identifier} { IDENTIFIER_RETURN(); }                               // postfix operator
    407407"?"{op_binary_over}"?"  { IDENTIFIER_RETURN(); }                // binary
    408408        /*
  • src/Parser/parser.yy

    r766309d r7e419e7  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 22 16:25:19 2018
    13 // Update Count     : 3124
     12// Last Modified On : Thu Mar 22 16:56:21 2018
     13// Update Count     : 3125
    1414//
    1515
     
    486486        | '(' compound_statement ')'                                            // GCC, lambda expression
    487487                { $$ = new ExpressionNode( new StmtExpr( dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >($2) ) ) ); }
    488         | constant '`' IDENTIFIER                                                               // CFA
     488        | constant '`' IDENTIFIER                                                       // CFA, postfix call
    489489                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $3 ) ), $1 ) ); }
    490         | string_literal '`' IDENTIFIER                                         // CFA
     490        | string_literal '`' IDENTIFIER                                         // CFA, postfix call
    491491                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $3 ) ), new ExpressionNode( $1 ) ) ); }
    492         | IDENTIFIER '`' IDENTIFIER                                                     // CFA
     492        | IDENTIFIER '`' IDENTIFIER                                                     // CFA, postfix call
    493493                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $3 ) ), new ExpressionNode( build_varref( $1 ) ) ) ); }
    494         | tuple '`' IDENTIFIER                                                          // CFA
     494        | tuple '`' IDENTIFIER                                                          // CFA, postfix call
    495495                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $3 ) ), $1 ) ); }
    496         | '(' comma_expression ')' '`' IDENTIFIER                       // CFA
     496        | '(' comma_expression ')' '`' IDENTIFIER                       // CFA, postfix call
    497497                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $5 ) ), $2 ) ); }
    498498        | type_name '.' no_attr_identifier                                      // CFA, nested type
Note: See TracChangeset for help on using the changeset viewer.