diff src/lex.l @ 3174:390d5e396682

[project @ 1998-05-04 16:36:17 by jwe]
author jwe
date Mon, 04 May 1998 16:36:26 +0000
parents e4bbfc196e53
children c17387059fd3
line wrap: on
line diff
--- a/src/lex.l	Fri Apr 24 04:38:15 1998 +0000
+++ b/src/lex.l	Mon May 04 16:36:26 1998 +0000
@@ -704,7 +704,9 @@
 
   // Only ask for input from stdin if we are expecting interactive
   // input.
-  if (interactive && ! (reading_fcn_file || get_input_from_eval_string))
+  if ((interactive || forced_interactive)
+      && ! (reading_fcn_file || get_input_from_eval_string
+	    || input_from_startup_file))
     yyrestart (stdin);
 
   // Clear the buffer for help text.
@@ -1057,6 +1059,20 @@
 	    }
 	  break;
 
+        case magic_file_kw:
+	  {
+	    if ((reading_fcn_file || reading_script_file)
+		&& ! curr_fcn_file_full_name.empty ())
+	      yylval.tok_val = new token (curr_fcn_file_full_name, l, c);
+	    else
+	      yylval.tok_val = new token ("stdin", l, c);
+	  }
+	  break;
+
+        case magic_line_kw:
+	  yylval.tok_val = new token (static_cast<double> (l), "", l, c);
+	  break;
+
 	default:
 	  panic_impossible ();
 	}