Mercurial > hg > octave-lyh
changeset 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 | 6964e6b92fc1 |
files | libinterp/parse-tree/lex.ll |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -436,6 +436,8 @@ curr_lexer->pop_start_state (); } + curr_lexer->decrement_promptflag (); + curr_lexer->push_start_state (BLOCK_COMMENT_START); } @@ -472,7 +474,11 @@ curr_lexer->block_comment_nesting_level--; if (curr_lexer->block_comment_nesting_level == 0) - curr_lexer->pop_start_state (); + { + curr_lexer->increment_promptflag (); + + curr_lexer->pop_start_state (); + } } %{