diff src/lex.l @ 747:6182de8cb3b7

[project @ 1994-09-30 15:09:36 by jwe]
author jwe
date Fri, 30 Sep 1994 15:12:14 +0000
parents 9ccf86647203
children 42731861ee09
line wrap: on
line diff
--- a/src/lex.l	Fri Sep 30 15:05:10 1994 +0000
+++ b/src/lex.l	Fri Sep 30 15:12:14 1994 +0000
@@ -685,6 +685,9 @@
   in_plot_style = 0;
   doing_set = 0;
 
+// Not initially looking at indirect references.
+  looking_at_indirect_ref = 0;
+
 // Error may have occurred inside some parentheses or braces.
   in_brace_or_paren.clear ();
 
@@ -1357,6 +1360,16 @@
 static int
 handle_identifier (char *tok, int next_tok_is_eq)
 {
+// If we are expecting a structure element, we just want to return
+// TEXT_ID, which is a string that is also a valid identifier.
+
+  if (looking_at_indirect_ref)
+    {
+      yylval.tok_val = new token (tok);
+      token_stack.push (yylval.tok_val);
+      TOK_RETURN (TEXT_ID);
+    }
+
 // If we have a regular keyword, or a plot STYLE, return it.  STYLE is
 // special only because it can't be followed by an identifier.
 
@@ -1469,7 +1482,7 @@
 
       int c1 = yyinput ();
       unput (c1);
-      int other_op = match_any (c1, ",;\n]");
+      int other_op = match_any (c1, ".,;\n]");
       int index_op = (c1 == '('
 		      && (user_pref.commas_in_literal_matrix == 0
 			  || ! spc_prev));