Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    r0a616e0 rb6ad601  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Sun Mar 10 09:13:09 2019
    13  * Update Count     : 706
     12 * Last Modified On : Thu Nov  1 20:57:35 2018
     13 * Update Count     : 687
    1414 */
    1515
     
    3939using namespace std;
    4040
    41 #include "config.h"                                                                             // configure info
    4241#include "ParseNode.h"
    4342#include "TypedefTable.h"
     
    6059#define IDENTIFIER_RETURN()     RETURN_VAL( typedefTable.isKind( yytext ) )
    6160#define ATTRIBUTE_RETURN()      RETURN_VAL( ATTR_IDENTIFIER )
    62 
    63 #ifdef HAVE_KEYWORDS_FLOATXX                                                            // GCC >= 7 => keyword, otherwise typedef
    64 #define FLOATXX(v) KEYWORD_RETURN(v);
    65 #else
    66 #define FLOATXX(v) IDENTIFIER_RETURN();
    67 #endif // HAVE_KEYWORDS_FLOATXX
    6861
    6962void rm_underscore() {
     
    9992hex_quad {hex}("_"?{hex}){3}
    10093size_opt (8|16|32|64|128)?
    101                                 // CFA: explicit l8/l16/l32/l64/l128, char 'hh', short 'h', int 'n'
    102 length ("ll"|"LL"|[lL]{size_opt})|("hh"|"HH"|[hHnN])
    103                                 // CFA: size_t 'z', pointer 'p', which define a sign and length
    104 integer_suffix_opt ("_"?(([uU]({length}?[iI]?)|([iI]{length}))|([iI]({length}?[uU]?)|([uU]{length}))|({length}([iI]?[uU]?)|([uU][iI]))|[zZ]|[pP]))?
     94length ("ll"|"LL"|[lL]{size_opt})|("hh"|"HH"|[hH])
     95integer_suffix_opt ("_"?(([uU]({length}?[iI]?)|([iI]{length}))|([iI]({length}?[uU]?)|([uU]{length}))|({length}([iI]?[uU]?)|([uU][iI]))|[zZ]))?
    10596
    10697octal_digits ({octal})|({octal}({octal}|"_")*{octal})
     
    121112                                // GCC: D (double) and iI (imaginary) suffixes, and DL (long double)
    122113exponent "_"?[eE]"_"?[+-]?{decimal_digits}
    123 floating_size 16|32|32x|64|64x|80|128|128x
    124 floating_length ([fFdDlLwWqQ]|[fF]{floating_size})
     114floating_size 32|64|80|128
     115floating_length ([fFdDlL]|[lL]{floating_size})
    125116floating_suffix ({floating_length}?[iI]?)|([iI]{floating_length})
    126117floating_suffix_opt ("_"?({floating_suffix}|"DL"))?
     
    249240finally                 { KEYWORD_RETURN(FINALLY); }                    // CFA
    250241float                   { KEYWORD_RETURN(FLOAT); }
    251 __float80               { KEYWORD_RETURN(uuFLOAT80); }                  // GCC
    252 float80                 { KEYWORD_RETURN(uuFLOAT80); }                  // GCC
    253 __float128              { KEYWORD_RETURN(uuFLOAT128); }                 // GCC
    254 float128                { KEYWORD_RETURN(uuFLOAT128); }                 // GCC
    255 _Float16                { FLOATXX(uFLOAT16); }                                  // GCC
    256 _Float32                { FLOATXX(uFLOAT32); }                                  // GCC
    257 _Float32x               { FLOATXX(uFLOAT32X); }                                 // GCC
    258 _Float64                { FLOATXX(uFLOAT64); }                                  // GCC
    259 _Float64x               { FLOATXX(uFLOAT64X); }                                 // GCC
    260 _Float128               { FLOATXX(uFLOAT128); }                                 // GCC
    261 _Float128x              { FLOATXX(uFLOAT128); }                                 // GCC
     242_Float32                { KEYWORD_RETURN(FLOAT); }                              // GCC
     243_Float32x               { KEYWORD_RETURN(FLOAT); }                              // GCC
     244_Float64                { KEYWORD_RETURN(DOUBLE); }                             // GCC
     245_Float64x               { KEYWORD_RETURN(DOUBLE); }                             // GCC
     246__float80               { KEYWORD_RETURN(FLOAT80); }                    // GCC
     247float80                 { KEYWORD_RETURN(FLOAT80); }                    // GCC
     248_Float128               { KEYWORD_RETURN(FLOAT128); }                   // GCC
     249_Float128x              { KEYWORD_RETURN(FLOAT128); }                   // GCC
     250__float128              { KEYWORD_RETURN(FLOAT128); }                   // GCC
     251float128                { KEYWORD_RETURN(FLOAT128); }                   // GCC
    262252for                             { KEYWORD_RETURN(FOR); }
    263253forall                  { KEYWORD_RETURN(FORALL); }                             // CFA
Note: See TracChangeset for help on using the changeset viewer.