diff src/lex.l @ 4248:eef64f3f9a4c

[project @ 2002-12-31 00:00:20 by jwe]
author jwe
date Tue, 31 Dec 2002 00:00:20 +0000
parents 71209cc7ad4a
children 4e2d2516da22
line wrap: on
line diff
--- a/src/lex.l	Mon Dec 30 23:05:27 2002 +0000
+++ b/src/lex.l	Tue Dec 31 00:00:20 2002 +0000
@@ -792,12 +792,16 @@
 . {
     // EOF happens here if we are parsing nested functions.
 
-    if (yytext[0] != EOF)
+    unput (yytext[0]);
+
+    int c = yyinput ();
+
+    if (c != EOF)
       {
 	current_input_column++;
 
 	error ("invalid character `%s' (ASCII %d) near line %d, column %d",
-	       undo_string_escape (yytext[0]), static_cast<int> (yytext[0]),
+	       undo_string_escape (static_cast<char> (c)), c,
 	       input_line_number, current_input_column);
 
 	return LEXICAL_ERROR;