Mercurial > octave-nkf
comparison libinterp/parse-tree/lex.ll @ 16365:8097a052ec57
use secondary prompt when reading block comments
* lex.ll ^{S}*{CCHAR}\{{S}*{NL}): Decrement promptflag when pushing
block comment start state.
(<BLOCK_COMMENT_START>^{S}*{CCHAR}\}{S}*{NL}): Increment promptflag
when popping block comment start state.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 24 Mar 2013 13:22:06 -0400 |
parents | 1e064963c90a |
children | 2ed5bc680c71 4258750c76ed |
comparison
equal
deleted
inserted
replaced
16364:1e064963c90a | 16365:8097a052ec57 |
---|---|
434 curr_lexer->finish_comment (octave_comment_elt::full_line); | 434 curr_lexer->finish_comment (octave_comment_elt::full_line); |
435 | 435 |
436 curr_lexer->pop_start_state (); | 436 curr_lexer->pop_start_state (); |
437 } | 437 } |
438 | 438 |
439 curr_lexer->decrement_promptflag (); | |
440 | |
439 curr_lexer->push_start_state (BLOCK_COMMENT_START); | 441 curr_lexer->push_start_state (BLOCK_COMMENT_START); |
440 | 442 |
441 } | 443 } |
442 | 444 |
443 <BLOCK_COMMENT_START>^{S}*{CCHAR}\{{S}*{NL} { | 445 <BLOCK_COMMENT_START>^{S}*{CCHAR}\{{S}*{NL} { |
470 curr_lexer->finish_comment (octave_comment_elt::block); | 472 curr_lexer->finish_comment (octave_comment_elt::block); |
471 | 473 |
472 curr_lexer->block_comment_nesting_level--; | 474 curr_lexer->block_comment_nesting_level--; |
473 | 475 |
474 if (curr_lexer->block_comment_nesting_level == 0) | 476 if (curr_lexer->block_comment_nesting_level == 0) |
475 curr_lexer->pop_start_state (); | 477 { |
478 curr_lexer->increment_promptflag (); | |
479 | |
480 curr_lexer->pop_start_state (); | |
481 } | |
476 } | 482 } |
477 | 483 |
478 %{ | 484 %{ |
479 // Body of a block comment. | 485 // Body of a block comment. |
480 %} | 486 %} |