ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/doom3map_lexer.l
(Generate patch)

Comparing libgender/doom3map_lexer.l (file contents):
Revision 1.2 by root, Fri Nov 5 16:05:11 2004 UTC vs.
Revision 1.3 by root, Sat Nov 6 00:44:50 2004 UTC

1%{ 1%{
2#include <stdio.h> 2#include <stdio.h>
3 3
4#include "y.tab.h" 4#include "doom3map_parser.tab.h++"
5 5
6%} 6%}
7%x IN_COMMENT
7 8
8 9
9DIGIT [0-9] 10DIGIT [0-9]
10 11
11 12
12%% 13%%
13 14
15<INITIAL>{
16"/*" BEGIN(IN_COMMENT);
17}
18<IN_COMMENT>{
19"*/" BEGIN(INITIAL);
20[^*\n]+
21"*"
22\n yylineno++;
23}
24
14\[.*\] ; 25\[.*\] ;
15\"[^\"]*\" { yylval.string = strndup (yytext + 1, yyleng - 2); return STRING; } 26\"[^\"]*\" { yylval.string = strndup (yytext + 1, yyleng - 2); return STRING; }
27{DIGIT}+ { yylval.num = atof (yytext); return NUMBER; }
16[-+]?{DIGIT}+"."{DIGIT}* { yylval.num = atof ( yytext ); return NUMBER; } 28[-+]?{DIGIT}+"."{DIGIT}* { yylval.num = atof (yytext); return NUMBER; }
17 29
18 30
19\/\/.* ; 31\/\/.* ;
20 32
21[\040\t\r,] ; 33[\040\t\r,] ;
22\n yylineno++; 34\n yylineno++;
23 35
24[\;\{\}()] return yytext[0]; 36[\;\{\}()] return yytext[0];
25 37
26. printf ("unexpected character '%c' in config file line %d, skipping", yytext[0], yylineno); 38model return MODEL;
39
40interAreaPortals return IAPO;
41nodes return NODES;
42shadowModel return SHADOWMODEL;
43
44[A-Za-z0-9_]+ { yylval.string = strndup (yytext, yyleng); return ID; }
27 45
28%% 46%%
29 47
30int yywrap () 48int yywrap ()
31{ 49{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines