Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
I pushed a change to the warning message here (http://hg.savannah.gnu.org/hgweb/octave/rev/30afb3804d6e). Incidentally, Matlab doesn't let the programmer get away with unterminated block comments. It throws an error, rather than a warning, at the end of input.
I think the fact that we are getting two messages printed is due to an actual misunderstanding in using bison parser. The code in lex.ll is
<<EOF>> { return curr_lexer->handle_end_of_input (); }
I used a debugger with a breakpoint in handle_end_of_input and the function is called twice from this location.
I suspect the problem is that when EOF is encountered the token is somehow not being popped off the stack (possibly because of the return statement). Or in some other way we are not marking that we should abandon processing. Adding jwe to the CC list since he might understand what is going on.
This isn't a big deal, but consider the script below.
#{ comment line #} disp ('out of block comment');
When the script is run the output from the interpreter is:
warning: block comment open at end of input warning: near line 4 of file 'dbl_msg_print.m' warning: block comment open at end of input warning: near line 4 of file 'dbl_msg_print.m'
I get that the interpreter is unhappy, but it really only needs to print the message once.
On a second note, I think the warning message could be clearer. Maybe something like
warning: trailing text after block comment close
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 2 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.10