comparison libinterp/parse-tree/lex.ll @ 16280:0dc6731fc0da classdef

avoid eat_continuation in classdef branch * lex.ll (octave_lexer::handle_superclass_identifier, octave_lexer::handle_meta_identifier): Don't strip trailing whitespace from yytext since the pattern no longer allows it. Don't call eat_continuation.
author John W. Eaton <jwe@octave.org>
date Mon, 11 Mar 2013 15:36:46 -0400
parents ea78011f66bf
children 82ff1c5bbff0
comparison
equal deleted inserted replaced
16278:ea78011f66bf 16280:0dc6731fc0da
2460 } 2460 }
2461 2461
2462 int 2462 int
2463 octave_lexer::handle_superclass_identifier (void) 2463 octave_lexer::handle_superclass_identifier (void)
2464 { 2464 {
2465 char *yytxt = flex_yytext (); 2465 std::string meth = flex_yytext ();
2466 int c = yytxt[flex_yyleng()-1];
2467
2468 std::string meth = strip_trailing_whitespace (yytxt);
2469
2470 int cont_is_spc = eat_continuation ();
2471
2472 int spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
2473 2466
2474 size_t pos = meth.find ("@"); 2467 size_t pos = meth.find ("@");
2475 std::string cls = meth.substr (pos + 1); 2468 std::string cls = meth.substr (pos + 1);
2476 meth = meth.substr (0, pos); 2469 meth = meth.substr (0, pos);
2477 2470
2500 } 2493 }
2501 2494
2502 int 2495 int
2503 octave_lexer::handle_meta_identifier (void) 2496 octave_lexer::handle_meta_identifier (void)
2504 { 2497 {
2505 char *yytxt = flex_yytext (); 2498 std::string cls = std::string(flex_yytext ()).substr (1);
2506 int c = yytxt[flex_yyleng()-1];
2507
2508 std::string cls = strip_trailing_whitespace (yytxt).substr (1);
2509
2510 int cont_is_spc = eat_continuation ();
2511
2512 int spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
2513 2499
2514 std::string pkg; 2500 std::string pkg;
2515 size_t pos = cls.find ("."); 2501 size_t pos = cls.find (".");
2516 if (pos != std::string::npos) 2502 if (pos != std::string::npos)
2517 { 2503 {