summaryrefslogtreecommitdiff
path: root/sdl-test
diff options
context:
space:
mode:
authorDamien Appert <dappert>2010-11-03 11:54:11 +0000
committerDamien Appert <dappert>2010-11-03 11:54:11 +0000
commit38b41dda4ad1296249eefcd306e3db77d9b42128 (patch)
tree2b9418bb1f0f04c410ef0e41bbcbd7b97fc4d7c7 /sdl-test
parente6778b2de41f7d36ea638322a4f122241a6609cc (diff)
download2010-netlemmings-38b41dda4ad1296249eefcd306e3db77d9b42128.tar.gz
2010-netlemmings-38b41dda4ad1296249eefcd306e3db77d9b42128.tar.bz2
2010-netlemmings-38b41dda4ad1296249eefcd306e3db77d9b42128.zip
comment in lexer
git-svn-id: file:///var/svn/2010-netlemmings/trunk@133 077b3477-7977-48bd-8428-443f22f7bfda
Diffstat (limited to 'sdl-test')
-rw-r--r--sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.lex58
1 files changed, 29 insertions, 29 deletions
diff --git a/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.lex b/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.lex
index 8eee2f2..1c05073 100644
--- a/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.lex
+++ b/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.lex
@@ -32,7 +32,7 @@ COMMENT "#"[^\n]*
%x : exclusive start condition (règles sans <cond> inactives)
<INI_VALUE>[^,\n-][^\n]* {
- printf("INI_VALUE->STR-> [%s]\n",yytext);
+ //-DEBUG-printf("INI_VALUE->STR-> [%s]\n",yytext);
return string(STR);
}
@@ -41,101 +41,101 @@ COMMENT "#"[^\n]*
%%
"=" {
- printf("[=]\n");
- printf("--AUTO INI_VALUE--\n");
+ //-DEBUG-printf("[=]\n");
+ //-DEBUG-printf("--AUTO INI_VALUE--\n");
BEGIN(INI_VALUE);
return AFF;
}
<INI_VALUE>\n {
- printf("[INI_VALUE->\\n]\n");
+ //-DEBUG-printf("[INI_VALUE->\\n]\n");
yylineno++;
- printf("--AUTO INITIAL--\n");
+ //-DEBUG-printf("--AUTO INITIAL--\n");
BEGIN(INITIAL);
return EOL;
}
<INI_VALUE>{NUMBER}{BLANK}*{COMMENT}? {
- printf("INI_VALUE->INT-> [%d]\n",atoi(yytext));
+ //-DEBUG-printf("INI_VALUE->INT-> [%d]\n",atoi(yytext));
yylval.num = atoi(yytext);
return INT;
}
<INI_VALUE>"," {
- printf("INI_VALUE->VIR-> [,]\n");
+ //-DEBUG-printf("INI_VALUE->VIR-> [,]\n");
return VIR;
}
"style" {
- printf("style\n");
- printf("--AUTO STR_M--\n");
+ //-DEBUG-printf("style\n");
+ //-DEBUG-printf("--AUTO STR_M--\n");
BEGIN(STR_M);
return STYLE;
}
"name" {
- printf("name\n");
- printf("--AUTO STR_M--\n");
+ //-DEBUG-printf("name\n");
+ //-DEBUG-printf("--AUTO STR_M--\n");
BEGIN(STR_M);
return NAME;
}
"superlemming" {
- printf("superlemming\n");
- printf("--AUTO STR_M--\n");
+ //-DEBUG-printf("superlemming\n");
+ //-DEBUG-printf("--AUTO STR_M--\n");
BEGIN(STR_M);
return SLEM;
}
"bgColor" {
- printf("bgColor\n");
- printf("--AUTO STR_M--\n");
+ //-DEBUG-printf("bgColor\n");
+ //-DEBUG-printf("--AUTO STR_M--\n");
BEGIN(STR_M);
return BGCOLOR;
}
"debrisColor" {
- printf("debrisColor\n");
- printf("--AUTO STR_M--\n");
+ //-DEBUG-printf("debrisColor\n");
+ //-DEBUG-printf("--AUTO STR_M--\n");
BEGIN(STR_M);
return DEBRISCOLOR;
}
"particleColor" {
- printf("particleColor\n");
- printf("--AUTO STR_M--\n");
+ //-DEBUG-printf("particleColor\n");
+ //-DEBUG-printf("--AUTO STR_M--\n");
BEGIN(STR_M);
return PARTICLECOLOR;
}
<STR_M>{BLANK}*"="{BLANK}* {
- printf("STR_M-> [=]\n");
- printf("--AUTO STR_MM--\n");
+ //-DEBUG-printf("STR_M-> [=]\n");
+ //-DEBUG-printf("--AUTO STR_MM--\n");
BEGIN(STR_MM);
return AFF;
}
<STR_M>{BLANK}*
<STR_MM>{BLANK}*
<STR_MM>{BLANK}*[^\n]* {
- printf("STR_MM->STR-> [%s]\n",yytext);
- printf("--AUTO INITIAL--\n");
+ //-DEBUG-printf("STR_MM->STR-> [%s]\n",yytext);
+ //-DEBUG-printf("--AUTO INITIAL--\n");
BEGIN(INITIAL);
return string(STR);
}
<STR_MM>\n {
- printf("[STR_MM->\\n]\n");
+ //-DEBUG-printf("[STR_MM->\\n]\n");
yylineno++;
- printf("--AUTO INITIAL--\n");
+ //-DEBUG-printf("--AUTO INITIAL--\n");
BEGIN(INITIAL);
return EOL;
}
{IDENT} {
- printf("[%s]\n",yytext);
+ //-DEBUG-printf("[%s]\n",yytext);
return string(IDENT);
}
"#"[^\n]*\n {
- printf("[COMMENT:%s]\n[\\n]\n",yytext);
+ //-DEBUG-printf("[COMMENT:%s]\n[\\n]\n",yytext);
yylineno++;
} /* Single line Comment*/
\r /* http://fr.wikipedia.org/wiki/Fin_de_ligne : CRLF*/
\n {
- printf("[\\n]\n");
+ //-DEBUG-printf("[\\n]\n");
yylineno++;
return EOL;
- } /* printf("\n"); */
+ } /* //-DEBUG-printf("\n"); */
{BLANK}* /* Ignore */