Changeset 60a8062 for src/Parser/lex.ll


Ignore:
Timestamp:
Feb 18, 2020, 8:48:49 PM (22 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
6988dc6
Parents:
5ccee64
Message:

rewrite most of OperatorTable? and change caller modules to use new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    r5ccee64 r60a8062  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Fri Feb  7 19:02:43 2020
    13  * Update Count     : 725
     12 * Last Modified On : Sat Feb 15 11:05:50 2020
     13 * Update Count     : 737
    1414 */
    1515
     
    4242#include "ParseNode.h"
    4343#include "TypedefTable.h"
     44
     45string * build_postfix_name( string * name );
    4446
    4547char *yyfilename;
     
    432434"?"({op_unary_pre_post}|"()"|"[?]"|"{}") { IDENTIFIER_RETURN(); }
    433435"^?{}"                  { IDENTIFIER_RETURN(); }
    434 "?`"{identifier} { IDENTIFIER_RETURN(); }                               // postfix operator
     436"?`"{identifier} {                                                                              // postfix operator
     437        yylval.tok.str = new string( &yytext[2] );                      // remove ?`
     438        yylval.tok.str = build_postfix_name( yylval.tok.str ); // add prefix
     439        RETURN_LOCN( typedefTable.isKind( *yylval.tok.str ) );
     440}
    435441"?"{op_binary_over}"?"  { IDENTIFIER_RETURN(); }                // binary
    436442        /*
Note: See TracChangeset for help on using the changeset viewer.