diff src/lex.l @ 3575:7576a76f6d7b

[project @ 2000-02-04 11:02:49 by jwe]
author jwe
date Fri, 04 Feb 2000 11:02:51 +0000
parents dd8998699aa8
children 0ae310231c46
line wrap: on
line diff
--- a/src/lex.l	Fri Feb 04 10:13:26 2000 +0000
+++ b/src/lex.l	Fri Feb 04 11:02:51 2000 +0000
@@ -855,6 +855,7 @@
 {
   std::string retval;
 
+  // XXX FIXME XXX -- specify minimum match length for these.
   static const char *plot_styles[] = 
     {
       "boxes",
@@ -901,6 +902,7 @@
 {
   std::string retval;
 
+  // XXX FIXME XXX -- specify minimum match length for these.
   static const char *plot_axes[] = 
     {
       "x1y1",
@@ -934,21 +936,21 @@
 is_plot_keyword (const std::string& s)
 {
   const char *t = s.c_str ();
-  if (almost_match ("title", t))
+  if (almost_match ("title", t, 1))
     {
       return TITLE;
     }
-  else if (almost_match ("using", t))
+  else if (almost_match ("using", t, 1))
     {
       lexer_flags.in_plot_using = true;
       return USING;
     }
-  else if (almost_match ("with", t))
+  else if (almost_match ("with", t, 1))
     {
       lexer_flags.in_plot_style = true;
       return WITH;
     }
-  else if (almost_match ("axes", t) || almost_match ("axis", t))
+  else if (almost_match ("axes", t, 2) || almost_match ("axis", t, 2))
     {
       lexer_flags.in_plot_axes = true;
       return AXES;
@@ -1568,7 +1570,7 @@
   lexer_flags.convert_spaces_to_comma = 1;
 
   if (lexer_flags.plotting && ! lexer_flags.in_plot_range)
-    lexer_flags.past_plot_range = 1;
+    lexer_flags.past_plot_range = true;
 
   yylval.tok_val = new token (value, yytext, input_line_number,
 			      current_input_column);
@@ -2047,7 +2049,7 @@
 
       if (nesting_level.none ())
 	plot_option_kw = is_plot_keyword (tok);
-
+      
       if (lexer_flags.cant_be_identifier && plot_option_kw)
 	TOK_RETURN (plot_option_kw);
     }