Changeset 201aeb9 for src/Parser/lex.ll


Ignore:
Timestamp:
Sep 26, 2017, 11:22:08 PM (7 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, resolv-new, with_gc
Children:
d67cdb7
Parents:
9bae71f
Message:

first attempt at new basic-type int128, and length suffix with explicit size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    r9bae71f r201aeb9  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Sun Sep 10 22:29:15 2017
    13  * Update Count     : 620
     12 * Last Modified On : Sat Sep 23 17:29:28 2017
     13 * Update Count     : 632
    1414 */
    1515
     
    9393                                // numeric constants, CFA: '_' in constant
    9494hex_quad {hex}("_"?{hex}){3}
    95 length ("ll"|"LL"|[lL])|("hh"|"HH"|[hH])
     95size_opt (8|16|32|64|128)?
     96length ("ll"|"LL"|[lL]{size_opt})|("hh"|"HH"|[hH])
    9697integer_suffix_opt ("_"?(([uU]({length}?[iI]?)|([iI]{length}))|([iI]({length}?[uU]?)|([uU]{length}))|({length}([iI]?[uU]?)|([uU][iI]))|[zZ]))?{user_suffix_opt}
    9798
     
    109110                                // GCC: D (double) and iI (imaginary) suffixes, and DL (long double)
    110111exponent "_"?[eE]"_"?[+-]?{decimal_digits}
    111 floating_suffix ([fFdDlL]?[iI]?)|([iI][lLfFdD])
     112floating_size 32|64|80|128
     113floating_length ([fFdDlL]|[lL]{floating_size})
     114floating_suffix ({floating_length}?[iI]?)|([iI]{floating_length})
    112115floating_suffix_opt ("_"?({floating_suffix}|"DL"))?{user_suffix_opt}
    113116decimal_digits ({decimal})|({decimal}({decimal}|"_")*{decimal})
     
    234237finally                 { KEYWORD_RETURN(FINALLY); }                    // CFA
    235238float                   { KEYWORD_RETURN(FLOAT); }
    236 __float128              { KEYWORD_RETURN(FLOAT); }                              // GCC
     239__float80               { KEYWORD_RETURN(FLOAT80); }                    // GCC
     240float80                 { KEYWORD_RETURN(FLOAT80); }                    // GCC
     241__float128              { KEYWORD_RETURN(FLOAT128); }                   // GCC
     242float128                { KEYWORD_RETURN(FLOAT128); }                   // GCC
    237243for                             { KEYWORD_RETURN(FOR); }
    238244forall                  { KEYWORD_RETURN(FORALL); }                             // CFA
     
    249255__inline__              { KEYWORD_RETURN(INLINE); }                             // GCC
    250256int                             { KEYWORD_RETURN(INT); }
    251 __int128                { KEYWORD_RETURN(INT); }                                // GCC
    252 __int128_t              { KEYWORD_RETURN(INT); }                                // GCC
     257__int128                { KEYWORD_RETURN(INT128); }                             // GCC
     258int128                  { KEYWORD_RETURN(INT128); }                             // GCC
    253259__label__               { KEYWORD_RETURN(LABEL); }                              // GCC
    254260long                    { KEYWORD_RETURN(LONG); }
     
    285291__typeof                { KEYWORD_RETURN(TYPEOF); }                             // GCC
    286292__typeof__              { KEYWORD_RETURN(TYPEOF); }                             // GCC
    287 __uint128_t             { KEYWORD_RETURN(INT); }                                // GCC
    288293union                   { KEYWORD_RETURN(UNION); }
    289294unsigned                { KEYWORD_RETURN(UNSIGNED); }
Note: See TracChangeset for help on using the changeset viewer.