Changeset 984dce6 for src/Parser/lex.ll


Ignore:
Timestamp:
Mar 22, 2016, 9:57:47 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, string, with_gc
Children:
94980502
Parents:
a752883
Message:

only implicitly generate typedef for structures if name not in use and overwrite typedef name if explicit name appears, upate parser symbol table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.ll

    ra752883 r984dce6  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Wed Mar  2 18:07:20 2016
    13  * Update Count     : 434
     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
Note: See TracChangeset for help on using the changeset viewer.