Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/lex.cc

    r68cd1ce rde62360d  
    13901390 * Created On       : Sat Sep 22 08:58:10 2001
    13911391 * Last Modified By : Peter A. Buhr
    1392  * Last Modified On : Thu Jun 11 21:52:35 2015
    1393  * Update Count     : 382
     1392 * Last Modified On : Fri Jun 19 11:10:14 2015
     1393 * Update Count     : 392
    13941394 */
    13951395#line 20 "lex.ll"
    1396 // This lexer assumes the program has been preprocessed by cpp. Hence, all user level preprocessor directive
    1397 // have been performed and removed from the source. The only exceptions are preprocessor directives passed to
    1398 // the compiler (e.g., line-number directives) and C/C++ style comments, which are ignored.
     1396// This lexer assumes the program has been preprocessed by cpp. Hence, all user level preprocessor directive have been
     1397// performed and removed from the source. The only exceptions are preprocessor directives passed to the compiler (e.g.,
     1398// line-number directives) and C/C++ style comments, which are ignored.
    13991399
    14001400//**************************** Includes and Defines ****************************
     
    14091409std::string *strtext;                                                                   // accumulate parts of character and string constant value
    14101410
    1411 #define RETURN_LOCN(x)          yylval.tok.loc.file = yyfilename; yylval.tok.loc.line = yylineno; return(x)
    1412 #define RETURN_VAL(x)           yylval.tok.str = new std::string( yytext ); RETURN_LOCN(x)
    1413 #define RETURN_CHAR(x)          yylval.tok.str = NULL; RETURN_LOCN(x)
    1414 #define RETURN_STR(x)           yylval.tok.str = strtext; RETURN_LOCN(x)
     1411#define RETURN_LOCN(x)          yylval.tok.loc.file = yyfilename; yylval.tok.loc.line = yylineno; return( x )
     1412#define RETURN_VAL(x)           yylval.tok.str = new std::string( yytext ); RETURN_LOCN( x )
     1413#define RETURN_CHAR(x)          yylval.tok.str = NULL; RETURN_LOCN( x )
     1414#define RETURN_STR(x)           yylval.tok.str = strtext; RETURN_LOCN( x )
    14151415
    14161416#define WHITE_RETURN(x)                                                                 // do nothing
    1417 #define NEWLINE_RETURN()        WHITE_RETURN('\n')
    1418 #define ASCIIOP_RETURN()        RETURN_CHAR((int)yytext[0])     // single character operator
    1419 #define NAMEDOP_RETURN(x)       RETURN_VAL(x)                           // multichar operator, with a name
    1420 #define NUMERIC_RETURN(x)       rm_underscore(); RETURN_VAL(x) // numeric constant
    1421 #define KEYWORD_RETURN(x)       RETURN_CHAR(x)                          // keyword
    1422 #define IDENTIFIER_RETURN()     RETURN_VAL((typedefTable.isIdentifier(yytext) ? IDENTIFIER : typedefTable.isTypedef(yytext) ? TYPEDEFname : TYPEGENname))
    1423 #define ATTRIBUTE_RETURN()      RETURN_VAL(ATTR_IDENTIFIER)
     1417#define NEWLINE_RETURN()        WHITE_RETURN( '\n' )
     1418#define ASCIIOP_RETURN()        RETURN_CHAR( (int)yytext[0] ) // single character operator
     1419#define NAMEDOP_RETURN(x)       RETURN_VAL( x )                         // multichar operator, with a name
     1420#define NUMERIC_RETURN(x)       rm_underscore(); RETURN_VAL( x ) // numeric constant
     1421#define KEYWORD_RETURN(x)       RETURN_CHAR( x )                        // keyword
     1422#define IDENTIFIER_RETURN()     RETURN_VAL( (typedefTable.isIdentifier( yytext ) ? IDENTIFIER : typedefTable.isTypedef( yytext ) ? TYPEDEFname : TYPEGENname ) )
     1423#define ATTRIBUTE_RETURN()      RETURN_VAL( ATTR_IDENTIFIER )
    14241424
    14251425void rm_underscore() {
     
    36523652
    36533653// Local Variables: //
    3654 // fill-column: 110 //
     3654// mode: c++ //
    36553655// tab-width: 4 //
    3656 // mode: c++ //
    36573656// compile-command: "make install" //
    36583657// End: //
Note: See TracChangeset for help on using the changeset viewer.