changeset 2066:a75d2a5d6783

[project @ 1996-04-11 21:20:43 by jwe]
author jwe
date Thu, 11 Apr 1996 21:20:43 +0000
parents fdad1594039e
children fa64e30d7496
files src/lex.l
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lex.l	Tue Apr 09 01:01:13 1996 +0000
+++ b/src/lex.l	Thu Apr 11 21:20:43 1996 +0000
@@ -571,15 +571,23 @@
     return ')';
   }
 
+"." {
+    TOK_RETURN ('.');
+  }
+
 %{
-// We return everything else as single character tokens, which should
-// eventually result in a parse error.
+// Unrecognized input is a lexical error.
 %}
 
 . {
-    error ("invalid character `%s' on input", undo_string_escape (yytext[0]));
-    TOK_RETURN (yytext[0]);
-}
+    current_input_column++;
+
+    error ("invalid character `%s' near line %d, column %d",
+	   undo_string_escape (yytext[0]), input_line_number,
+	   current_input_column);
+
+    return LEXICAL_ERROR;
+  }
 
 %%