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 (21 years, 10 months ago) by root
Branch: MAIN
Changes since 1.1: +8 -4 lines
Log Message:
added some notes

File Contents

# User Rev Content
1 root 1.1 %{
2     #include <stdio.h>
3    
4     #include "y.tab.h"
5    
6     %}
7    
8 root 1.2
9     DIGIT [0-9]
10    
11    
12 root 1.1 %%
13    
14     \[.*\] ;
15     \"[^\"]*\" { yylval.string = strndup (yytext + 1, yyleng - 2); return STRING; }
16 root 1.2 [-+]?{DIGIT}+"."{DIGIT}* { yylval.num = atof ( yytext ); return NUMBER; }
17    
18 root 1.1
19 root 1.2 \/\/.* ;
20 root 1.1
21     [\040\t\r,] ;
22     \n yylineno++;
23    
24 root 1.2 [\;\{\}()] return yytext[0];
25 root 1.1
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