Changeset d3b5a14


Ignore:
Timestamp:
Jun 19, 2021, 3:50:04 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
4b891e9
Parents:
572a02f
Message:

lex gcc types _Decimal32/64/128 and return them as float/double/uuFLOAT128

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    r572a02f rd3b5a14  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Thu Apr  1 13:22:31 2021
    13  * Update Count     : 754
     12 * Last Modified On : Sat Jun 19 15:23:05 2021
     13 * Update Count     : 758
    1414 */
    1515
     
    117117hex_constant {hex_prefix}{hex_digits}{integer_suffix_opt}
    118118
    119                                 // GCC: D (double) and iI (imaginary) suffixes, and DL (long double)
     119                                // GCC: floating D (double), imaginary iI, and decimal floating DF, DD, DL
    120120exponent "_"?[eE]"_"?[+-]?{decimal_digits}
    121121floating_size 16|32|32x|64|64x|80|128|128x
    122122floating_length ([fFdDlLwWqQ]|[fF]{floating_size})
    123123floating_suffix ({floating_length}?[iI]?)|([iI]{floating_length})
    124 floating_suffix_opt ("_"?({floating_suffix}|"DL"))?
     124decimal_floating_suffix [dD][fFdDlL]
     125floating_suffix_opt ("_"?({floating_suffix}|{decimal_floating_suffix}))?
    125126decimal_digits ({decimal})|({decimal}({decimal}|"_")*{decimal})
    126127floating_decimal {decimal_digits}"."{exponent}?{floating_suffix_opt}
     
    234235continue                { KEYWORD_RETURN(CONTINUE); }
    235236coroutine               { KEYWORD_RETURN(COROUTINE); }                  // CFA
     237_Decimal32              { KEYWORD_RETURN(FLOAT); }                              // GCC
     238_Decimal64              { KEYWORD_RETURN(DOUBLE); }                             // GCC
     239_Decimal128             { KEYWORD_RETURN(uuFLOAT128); }                 // GCC
    236240default                 { KEYWORD_RETURN(DEFAULT); }
    237241disable                 { KEYWORD_RETURN(DISABLE); }                    // CFA
Note: See TracChangeset for help on using the changeset viewer.