# HG changeset patch # User jwe # Date 829257643 0 # Node ID a75d2a5d67832edb4d77ee8bd712d7f0cb420dca # Parent fdad1594039e86d300fcc9f548c72313f62168b9 [project @ 1996-04-11 21:20:43 by jwe] diff --git a/src/lex.l b/src/lex.l --- a/src/lex.l +++ b/src/lex.l @@ -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; + } %%