Changeset c1c1112 for src/Parser/lex.cc
- Timestamp:
- Aug 25, 2016, 9:14:06 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
- 4e2b9710
- Parents:
- 2acf5fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.cc
r2acf5fc rc1c1112 1469 1469 * Created On : Sat Sep 22 08:58:10 2001 1470 1470 * Last Modified By : Peter A. Buhr 1471 * Last Modified On : Thu Aug 18 22:17:3020161472 * Update Count : 4 721471 * Last Modified On : Wed Aug 24 13:27:04 2016 1472 * Update Count : 487 1473 1473 */ 1474 1474 #line 20 "lex.ll" … … 1827 1827 { 1828 1828 /* " stop highlighting */ 1829 static char *filename[FILENAME_MAX];// temporarily store current source-file name1829 static char filename[FILENAME_MAX]; // temporarily store current source-file name 1830 1830 char *end_num; 1831 1831 char *begin_string, *end_string; … … 1842 1842 //std::cout << "file " << filename << " line " << lineno << std::endl; 1843 1843 yylineno = lineno; 1844 yyfilename = filename [0];1844 yyfilename = filename; 1845 1845 } // if 1846 1846 } … … 2426 2426 YY_RULE_SETUP 2427 2427 #line 290 "lex.ll" 2428 { BEGIN QUOTE; rm_underscore(); strtext = new std::string ; *strtext += std::string( yytext); }2428 { BEGIN QUOTE; rm_underscore(); strtext = new std::string( yytext, yyleng ); } 2429 2429 YY_BREAK 2430 2430 case 116: 2431 2431 YY_RULE_SETUP 2432 2432 #line 291 "lex.ll" 2433 { *strtext += std::string( yytext); }2433 { strtext->append( yytext, yyleng ); } 2434 2434 YY_BREAK 2435 2435 case 117: … … 2437 2437 YY_RULE_SETUP 2438 2438 #line 292 "lex.ll" 2439 { BEGIN 0; *strtext += std::string( yytext); RETURN_STR(CHARACTERconstant); }2439 { BEGIN 0; strtext->append( yytext, yyleng ); RETURN_STR(CHARACTERconstant); } 2440 2440 YY_BREAK 2441 2441 /* ' stop highlighting */ … … 2444 2444 YY_RULE_SETUP 2445 2445 #line 296 "lex.ll" 2446 { BEGIN STRING; rm_underscore(); strtext = new std::string ; *strtext += std::string( yytext); }2446 { BEGIN STRING; rm_underscore(); strtext = new std::string( yytext, yyleng ); } 2447 2447 YY_BREAK 2448 2448 case 119: 2449 2449 YY_RULE_SETUP 2450 2450 #line 297 "lex.ll" 2451 { *strtext += std::string( yytext); }2451 { strtext->append( yytext, yyleng ); } 2452 2452 YY_BREAK 2453 2453 case 120: … … 2455 2455 YY_RULE_SETUP 2456 2456 #line 298 "lex.ll" 2457 { BEGIN 0; *strtext += std::string( yytext); RETURN_STR(STRINGliteral); }2457 { BEGIN 0; strtext->append( yytext, yyleng ); RETURN_STR(STRINGliteral); } 2458 2458 YY_BREAK 2459 2459 /* " stop highlighting */ … … 2462 2462 YY_RULE_SETUP 2463 2463 #line 302 "lex.ll" 2464 { rm_underscore(); *strtext += std::string( yytext); }2464 { rm_underscore(); strtext->append( yytext, yyleng ); } 2465 2465 YY_BREAK 2466 2466 case 122: … … 2473 2473 YY_RULE_SETUP 2474 2474 #line 304 "lex.ll" 2475 { *strtext += std::string( yytext); } // unknown escape character2475 { strtext->append( yytext, yyleng ); } // unknown escape character 2476 2476 YY_BREAK 2477 2477 /* punctuation */
Note: See TracChangeset
for help on using the changeset viewer.