changeset 1082:d1a1608f1028

[project @ 1995-01-27 22:26:33 by jwe]
author jwe
date Fri, 27 Jan 1995 22:26:33 +0000
parents 5972ef4972cc
children fb8ca633c439
files src/lex.l
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lex.l	Fri Jan 27 16:45:21 1995 +0000
+++ b/src/lex.l	Fri Jan 27 22:26:33 1995 +0000
@@ -255,9 +255,9 @@
 %}
 
 <MATRIX>{SNLCMT}*\n{SNLCMT}* {
+    fixup_column_count (yytext);
     if (user_pref.whitespace_in_literal_matrix != 2)
       {
-	fixup_column_count (yytext);
 	quote_is_transpose = 0;
 	cant_be_identifier = 0;
 	convert_spaces_to_comma = 1;
@@ -277,9 +277,12 @@
 %}
 
 \[{S}* {
-    fixup_column_count (yytext);
+    nesting_level.push (BRACE);
 
-    nesting_level.push (BRACE);
+    current_input_column += yyleng;
+    quote_is_transpose = 0;
+    cant_be_identifier = 0;
+    convert_spaces_to_comma = 1;
 
     promptflag--;
     eat_whitespace ();
@@ -287,14 +290,14 @@
     if (plotting && ! past_plot_range)
       {
 	in_plot_range = 1;
-	TOK_RETURN (OPEN_BRACE);
+	return OPEN_BRACE;
       }
     else
       {
 	mlnm.push (1);
 	braceflag++;
 	BEGIN MATRIX;
-	TOK_RETURN ('[');
+	return '[';
       }
   }
 
@@ -1383,6 +1386,7 @@
 
  done:
   yyunput (c, yytext);
+  current_input_column--;
   return retval;
 }