ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/doom3map_lexer.l
Revision: 1.2
Committed: Fri Nov 5 16:05:11 2004 UTC (19 years, 7 months ago) by root
Branch: MAIN
Changes since 1.1: +8 -4 lines
Log Message:
added some notes

File Contents

# Content
1 %{
2 #include <stdio.h>
3
4 #include "y.tab.h"
5
6 %}
7
8
9 DIGIT [0-9]
10
11
12 %%
13
14 \[.*\] ;
15 \"[^\"]*\" { yylval.string = strndup (yytext + 1, yyleng - 2); return STRING; }
16 [-+]?{DIGIT}+"."{DIGIT}* { yylval.num = atof ( yytext ); return NUMBER; }
17
18
19 \/\/.* ;
20
21 [\040\t\r,] ;
22 \n yylineno++;
23
24 [\;\{\}()] return yytext[0];
25
26 . printf ("unexpected character '%c' in config file line %d, skipping", yytext[0], yylineno);
27
28 %%
29
30 int yywrap ()
31 {
32 return 1;
33 }
34
35