Changeset 0f9e4403 for src/Parser/lex.ll


Ignore:
Timestamp:
Apr 15, 2016, 12:03:11 PM (10 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
29ad0ac
Parents:
c5833e8 (diff), 37f0da8 (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' into gc_noraii

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    rc5833e8 r0f9e4403  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Tue Feb  2 15:06:54 2016
    13  * Update Count     : 426
     12 * Last Modified On : Mon Mar 21 23:33:46 2016
     13 * Update Count     : 450
    1414 */
    1515
     
    2727
    2828#include "lex.h"
     29#include "parser.h"                                                                             // YACC generated definitions based on C++ grammar
    2930#include "ParseNode.h"
    30 #include "parser.h"                                                                             // YACC generated definitions based on C++ grammar
     31#include "TypedefTable.h"
    3132
    3233char *yyfilename;
     
    4445#define NUMERIC_RETURN(x)       rm_underscore(); RETURN_VAL( x ) // numeric constant
    4546#define KEYWORD_RETURN(x)       RETURN_CHAR( x )                        // keyword
    46 #define IDENTIFIER_RETURN()     RETURN_VAL( (typedefTable.isIdentifier( yytext ) ? IDENTIFIER : typedefTable.isTypedef( yytext ) ? TYPEDEFname : TYPEGENname ) )
     47#define IDENTIFIER_RETURN()     RETURN_VAL( typedefTable.isKind( yytext ) )
    4748#define ATTRIBUTE_RETURN()      RETURN_VAL( ATTR_IDENTIFIER )
    4849
     
    9596fractional_constant ({decimal_digits}?"."{decimal_digits})|({decimal_digits}".")
    9697exponent "_"?[eE]"_"?[+-]?{decimal_digits}
    97                                 // GCC: D (double), LD (long double) and iI (imaginary) suffixes
    98 floating_suffix "_"?([fFdD]?|([lL]?)|([iI][lLfFdD]?)|([lLfFdD][iI]))
     98                                // GCC: D (double), DL (long double) and iI (imaginary) suffixes
     99floating_suffix "_"?([fFdDlL][iI]?|"DL"|[iI][lLfFdD]?)
     100                                //floating_suffix "_"?([fFdD]|[lL]|[D][L])|([iI][lLfFdD])|([lLfFdD][iI]))
    99101floating_constant (({fractional_constant}{exponent}?)|({decimal_digits}{exponent})){floating_suffix}?
    100102
     
    137139%%
    138140                                   /* line directives */
    139 ^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["][^\n]*"\n" {
     141^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["].*"\n" {
    140142        /* " stop highlighting */
    141143        char *end_num;
     
    201203__const                 { KEYWORD_RETURN(CONST); }                              // GCC
    202204__const__               { KEYWORD_RETURN(CONST); }                              // GCC
    203 context                 { KEYWORD_RETURN(CONTEXT); }                    // CFA
    204205continue                { KEYWORD_RETURN(CONTINUE); }
    205206default                 { KEYWORD_RETURN(DEFAULT); }
     
    237238_Noreturn               { KEYWORD_RETURN(NORETURN); }                   // C11
    238239__builtin_offsetof { KEYWORD_RETURN(OFFSETOF); }                // GCC
     240otype                   { KEYWORD_RETURN(OTYPE); }                              // CFA
    239241register                { KEYWORD_RETURN(REGISTER); }
    240242restrict                { KEYWORD_RETURN(RESTRICT); }                   // C99
     
    254256throw                   { KEYWORD_RETURN(THROW); }                              // CFA
    255257throwResume             { KEYWORD_RETURN(THROWRESUME); }                // CFA
     258trait                   { KEYWORD_RETURN(TRAIT); }                              // CFA
    256259try                             { KEYWORD_RETURN(TRY); }                                // CFA
    257 type                    { KEYWORD_RETURN(TYPE); }                               // CFA
    258260typedef                 { KEYWORD_RETURN(TYPEDEF); }
    259261typeof                  { KEYWORD_RETURN(TYPEOF); }                             // GCC
     
    262264union                   { KEYWORD_RETURN(UNION); }
    263265unsigned                { KEYWORD_RETURN(UNSIGNED); }
     266__builtin_va_list { KEYWORD_RETURN(VALIST); }                   // GCC
    264267void                    { KEYWORD_RETURN(VOID); }
    265268volatile                { KEYWORD_RETURN(VOLATILE); }
Note: See TracChangeset for help on using the changeset viewer.