]> skyeroc.xyz Git - dgamelaunch/commitdiff
solaris
authorJoshua Kwan <joshk@triplehelix.org>
Fri, 16 Jan 2004 02:32:33 +0000 (02:32 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Fri, 16 Jan 2004 02:32:33 +0000 (02:32 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@121 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

config.l

index 97afd861314db44afce92559a23f98f01a5bb27c..8ee48a6731097df743860dbaa39f1d83d46d5934 100644 (file)
--- a/config.l
+++ b/config.l
@@ -1,8 +1,5 @@
 /* Lexical analyzer for dgamelaunch's configuration file. */
 
-%option nounput
-%option noyywrap
-
 %{
 
 #include <stdio.h>
@@ -27,13 +24,12 @@ WHITE               [\t ]*
 COMMENT                ^#.*
 LONGCOMMENT    "/*"
 
-%%             /* BEGIN RULES SECTION */
+%%
 
 {NUMBER} { yylval.i = atoi(yytext); return TYPE_NUMBER; }
 {VALUE}        {
   yytext[yyleng - 1] = '\0'; /* Kill the trailing quote */
-  yytext++; /* Kill the leading quote */
-  yylval.s = strdup(yytext);
+  yylval.s = strdup(yytext + 1); /* kill leading quote */
   return TYPE_VALUE;
 }