Changeset 02153feb for src


Ignore:
Timestamp:
May 18, 2017, 11:36:51 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
c7a3081
Parents:
4203f71 (diff), ba2356b (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:/u/cforall/software/cfa/cfa-cc

Location:
src
Files:
2 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    r4203f71 r02153feb  
    1010// Created On       : Sat May 16 13:17:07 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 17:02:46 2017
    13 // Update Count     : 515
     12// Last Modified On : Wed May 17 21:31:01 2017
     13// Update Count     : 527
    1414//
    1515
     
    207207} // build_field_name_fraction_constants
    208208
     209
     210
    209211Expression * build_field_name_REALFRACTIONconstant( const std::string & str ) {
    210         assert( str[0] == '.' );
     212        if ( str.find_first_not_of( "0123456789", 1 ) != string::npos ) throw SemanticError( "invalid tuple index " + str );
    211213        Expression * ret = build_constantInteger( *new std::string( str.substr(1) ) );
    212214        delete &str;
     
    215217
    216218Expression * build_field_name_REALDECIMALconstant( const std::string & str ) {
    217         assert( str[str.size()-1] == '.' );
     219        if ( str[str.size()-1] != '.' ) throw SemanticError( "invalid tuple index " + str );
    218220        Expression * ret = build_constantInteger( *new std::string( str.substr( 0, str.size()-1 ) ) );
    219221        delete &str;
  • src/Parser/lex.ll

    r4203f71 r02153feb  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Mon Mar 13 08:36:17 2017
    13  * Update Count     : 506
     12 * Last Modified On : Thu May 18 09:03:49 2017
     13 * Update Count     : 513
    1414 */
    1515
     
    7777                                // numeric constants, CFA: '_' in constant
    7878hex_quad {hex}("_"?{hex}){3}
    79 integer_suffix "_"?(([uU][lL]?)|([uU]("ll"|"LL")?)|([lL][uU]?)|("ll"|"LL")[uU]?)
     79integer_suffix "_"?(([uU](("ll"|"LL"|[lL])[iI]|[iI]?("ll"|"LL"|[lL])?))|([iI](("ll"|"LL"|[lL])[uU]|[uU]?("ll"|"LL"|[lL])?))|(("ll"|"LL"|[lL])([iI][uU]|[uU]?[iI]?)))
    8080
    8181octal_digits ({octal})|({octal}({octal}|"_")*{octal})
     
    9191
    9292decimal_digits ({decimal})|({decimal}({decimal}|"_")*{decimal})
    93 real_decimal {decimal_digits}"."
    94 real_fraction "."{decimal_digits}
    95 real_constant {decimal_digits}?{real_fraction}
     93real_decimal {decimal_digits}"."{exponent}?{floating_suffix}?
     94real_fraction "."{decimal_digits}{exponent}?{floating_suffix}?
     95real_constant {decimal_digits}{real_fraction}
    9696exponent "_"?[eE]"_"?[+-]?{decimal_digits}
    97                                 // GCC: D (double), DL (long double) and iI (imaginary) suffixes
    98 floating_suffix "_"?([fFdDlL][iI]?|"DL"|[iI][lLfFdD]?)
    99                                 //floating_suffix "_"?([fFdD]|[lL]|[D][L])|([iI][lLfFdD])|([lLfFdD][iI]))
     97                                // GCC: D (double) and iI (imaginary) suffixes, and DL (long double)
     98floating_suffix "_"?([fFdDlL][iI]?|[iI][lLfFdD]?|"DL")
    10099floating_constant (({real_constant}{exponent}?)|({decimal_digits}{exponent})){floating_suffix}?
    101100
Note: See TracChangeset for help on using the changeset viewer.