Changeset b826e6b for src/Parser/lex.ll


Ignore:
Timestamp:
Jul 19, 2017, 11:49:33 AM (9 years ago)
Author:
Aaron Moss <a3moss@…>
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, resolv-new, with_gc
Children:
9cc0472
Parents:
fea3faa (diff), a57cb58 (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    rfea3faa rb826e6b  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Tue May 30 22:00:48 2017
    13  * Update Count     : 527
     12 * Last Modified On : Tue Jul 18 07:11:48 2017
     13 * Update Count     : 544
    1414 */
    1515
     
    2727#include <cstdio>                                                                               // FILENAME_MAX
    2828
    29 #include "lex.h"
    30 #include "parser.h"                                                                             // YACC generated definitions based on C++ grammar
    3129#include "ParseNode.h"
    3230#include "TypedefTable.h"
     
    6159}
    6260
     61// Stop warning due to incorrectly generated flex code.
     62#pragma GCC diagnostic ignored "-Wsign-compare"
    6363%}
    6464
     
    125125op_unary {op_unary_only}|{op_unary_binary}|{op_unary_pre_post}
    126126
    127 op_binary_only "/"|"%"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"&="|"|="|"^="|"<<="|">>="
     127op_binary_only "/"|"%"|"\\"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"\\="|"&="|"|="|"^="|"<<="|">>="
    128128op_binary_over {op_unary_binary}|{op_binary_only}
    129129                                // op_binary_not_over "?"|"->"|"."|"&&"|"||"|"@="
     
    136136
    137137%%
    138                                    /* line directives */
     138                                /* line directives */
    139139^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["].*"\n" {
    140140        /* " stop highlighting */
     
    232232int                             { KEYWORD_RETURN(INT); }
    233233__int128                { KEYWORD_RETURN(INT); }                                // GCC
     234__int128_t              { KEYWORD_RETURN(INT); }                                // GCC
    234235__label__               { KEYWORD_RETURN(LABEL); }                              // GCC
    235236long                    { KEYWORD_RETURN(LONG); }
     
    266267__typeof                { KEYWORD_RETURN(TYPEOF); }                             // GCC
    267268__typeof__              { KEYWORD_RETURN(TYPEOF); }                             // GCC
     269__uint128_t             { KEYWORD_RETURN(INT); }                                // GCC
    268270union                   { KEYWORD_RETURN(UNION); }
    269271unsigned                { KEYWORD_RETURN(UNSIGNED); }
     
    274276__volatile__    { KEYWORD_RETURN(VOLATILE); }                   // GCC
    275277while                   { KEYWORD_RETURN(WHILE); }
     278with                    { KEYWORD_RETURN(WITH); }                               // CFA
    276279zero_t                  { NUMERIC_RETURN(ZERO_T); }                             // CFA
    277280
     
    336339"-"                             { ASCIIOP_RETURN(); }
    337340"*"                             { ASCIIOP_RETURN(); }
     341"\\"                    { ASCIIOP_RETURN(); }                                   // CFA, exponentiation
    338342"/"                             { ASCIIOP_RETURN(); }
    339343"%"                             { ASCIIOP_RETURN(); }
     
    360364"+="                    { NAMEDOP_RETURN(PLUSassign); }
    361365"-="                    { NAMEDOP_RETURN(MINUSassign); }
     366"\\="                   { NAMEDOP_RETURN(EXPassign); }                  // CFA, exponentiation
    362367"*="                    { NAMEDOP_RETURN(MULTassign); }
    363368"/="                    { NAMEDOP_RETURN(DIVassign); }
Note: See TracChangeset for help on using the changeset viewer.