diff src/DLD-FUNCTIONS/__gnuplot_raw__.l @ 5958:85c7dc4afe6b

[project @ 2006-08-23 18:35:38 by jwe]
author jwe
date Wed, 23 Aug 2006 18:35:39 +0000
parents 5e41e06f6a78
children 5c2747f40b56
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__gnuplot_raw__.l	Wed Aug 23 14:09:40 2006 +0000
+++ b/src/DLD-FUNCTIONS/__gnuplot_raw__.l	Wed Aug 23 18:35:39 2006 +0000
@@ -57,7 +57,7 @@
 #include "defun-dld.h"
 #include "file-io.h"
 #include "gripes.h"
-#include "load-save.h"
+#include "ls-oct-ascii.h"
 #include "parse.h"
 #include "procstream.h"
 #include "sighandlers.h"
@@ -76,6 +76,7 @@
     SEMICOLON,
     COMMA,
     QUOTE,
+    DOLLAR,
     IDENT,
     NUMBER,
     BINOP,
@@ -194,6 +195,12 @@
       }
     }
 
+"$" {
+    gpt_quote_is_transpose = false;
+    return DOLLAR;
+    }
+
+
 "\"" {
     return handle_string ('"');
     }
@@ -577,13 +584,18 @@
     {
       expr_str = read_until (colon_plottok_or_end_p, tok);
 
-      tmp_data = eval_string (expr_str, true, status);
-      if (status != 0 || ! tmp_data.is_real_scalar ())
-	throw gpt_parse_error ();
+      if (! expr_str.empty () &&  expr_str[0] == '(')
+	retstr += expr_str;
+      else
+	{
+	  tmp_data = eval_string (expr_str, true, status);
+	  if (status != 0 || ! tmp_data.is_real_scalar ())
+	    throw gpt_parse_error ();
 
-      std::ostringstream tmp_buf;
-      tmp_data.print_raw (tmp_buf);
-      retstr += tmp_buf.str ();
+	  std::ostringstream tmp_buf;
+	  tmp_data.print_raw (tmp_buf);
+	  retstr += tmp_buf.str ();
+	}
 
       if (tok == COLON)
 	retstr += ":";