X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fparse.l;h=64896e07249d6806cb7f2d6678a5b3a417991b3e;hb=58ebc8f73cea0fc74d01cb0336dbb41d88cd5938;hp=427a55cdf2b8799e0b23edb2c47c9dc41a502d7b;hpb=e974208068e0b4cede25d35fe16b861c307f0bf4;p=chaz%2Fopenbox diff --git a/openbox/parse.l b/openbox/parse.l index 427a55cd..64896e07 100644 --- a/openbox/parse.l +++ b/openbox/parse.l @@ -4,7 +4,7 @@ # include #endif -int yylineno = 1; +extern int lineno; %} real [-0-9][0-9]*\.[0-9]+ @@ -15,9 +15,9 @@ bool ([tT][rR][uU][eE]|[fF][aA][lL][sS][eE]|[yY][eE][sS]|[nN][oO]|[oO][nN]|[oO][ %% -^[ \t]*#.*\n /* comment */ { ++yylineno; } +^[ \t]*#.*\n /* comment */ { ++lineno; } ^[ \t]*#.* /* comment */ -^[ \t]*\n /* empty lines */ { ++yylineno; } +^[ \t]*\n /* empty lines */ { ++lineno; } [ \t] /* whitespace */ {real} { yylval.real = atof(yytext); return REAL; } {integer} { yylval.integer = atoi(yytext); return INTEGER; } @@ -35,7 +35,7 @@ bool ([tT][rR][uU][eE]|[fF][aA][lL][sS][eE]|[yY][eE][sS]|[nN][oO]|[oO][nN]|[oO][ } {identifier} { yylval.identifier = g_strdup(yytext); return IDENTIFIER; } [{}()\[\]=,] { yylval.character = *yytext; return *yytext; } -\n { yylval.character = *yytext; ++yylineno; return *yytext; } +\n { yylval.character = *yytext; return *yytext; } . { return INVALID; } %%