changeset 8312:e9d29ff98f30

lex.l (<MATRIX_START>{S}+): Don't insert separator if next token is a separator.
author John W. Eaton <jwe@octave.org>
date Tue, 11 Nov 2008 14:34:37 -0500
parents 7124bffc89c7
children 86bc7785bf8b
files src/ChangeLog src/lex.l
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Nov 11 14:34:02 2008 -0500
+++ b/src/ChangeLog	Tue Nov 11 14:34:37 2008 -0500
@@ -1,5 +1,8 @@
 2008-11-11  John W. Eaton  <jwe@octave.org>
 
+	* lex.l (<MATRIX_START>{S}+): Don't insert separator if next token
+	is a separator.
+
 	* parse.y (F__parser_debug_flag__): New function.
 
 2008-10-31  Jaroslav Hajek <highegg@gmail.com>
--- a/src/lex.l	Tue Nov 11 14:34:02 2008 -0500
+++ b/src/lex.l	Tue Nov 11 14:34:37 2008 -0500
@@ -440,10 +440,11 @@
     current_input_column += yyleng;
 
     int tmp = eat_continuation ();
-    int bin_op = next_token_is_bin_op (true);
-    int postfix_un_op = next_token_is_postfix_unary_op (true);
-
-    if (! (postfix_un_op || bin_op)
+    bool bin_op = next_token_is_bin_op (true);
+    bool postfix_un_op = next_token_is_postfix_unary_op (true);
+    bool sep_op = next_token_is_sep_op ();
+
+    if (! (postfix_un_op || bin_op || sep_op)
 	&& nesting_level.is_bracket_or_brace ()
 	&& lexer_flags.convert_spaces_to_comma)
       {