]> skyeroc.xyz Git - dgamelaunch/commitdiff
For errors in config file, report the whole unrecognized token
authorPasi Kallinen <paxed@alt.org>
Sun, 6 Jan 2008 19:35:14 +0000 (19:35 +0000)
committerPasi Kallinen <paxed@alt.org>
Sun, 6 Jan 2008 19:35:14 +0000 (19:35 +0000)
(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

index 590664e10251b104f58ce965dc85137b2e0d6bbd..103f2cce79df094a9b1eaf1993ef7d7bc15e26cf 100644 (file)
--- 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);
 }
 
 %%