From 61ac74268c5f0098af672461928f2d44d4f68aa4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 6 Jan 2008 19:35:14 +0000 Subject: [PATCH] For errors in config file, report the whole unrecognized token (and quit right after it) instead of error per char. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@405 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- config.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.l b/config.l index 590664e..103f2cc 100644 --- a/config.l +++ b/config.l @@ -93,8 +93,9 @@ DEFINE { return TYPE_DEFINE_GAME; } \n { line++; col = 0; } -. { +[0-9a-zA-Z_]+ { fprintf(stderr, "%s:%d:%d unrecognized token \"%s\"\n", config, line, col, yytext); + graceful_exit(1); } %%