From: Joshua Kwan Date: Fri, 16 Jan 2004 02:32:33 +0000 (+0000) Subject: solaris X-Git-Tag: v1.6.1-roc-dev~577 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=de1e3fea9c075f39163b3479d23753310cd8cf36;p=dgamelaunch solaris git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@121 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- diff --git a/config.l b/config.l index 97afd86..8ee48a6 100644 --- a/config.l +++ b/config.l @@ -1,8 +1,5 @@ /* Lexical analyzer for dgamelaunch's configuration file. */ -%option nounput -%option noyywrap - %{ #include @@ -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; }