diff options
author | David Walter Seikel | 2012-01-12 03:14:17 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-12 03:14:17 +1000 |
commit | fc5d487de27aa7aa17502008c848d06758223888 (patch) | |
tree | 8f3007f53f49c146ae6c30a100decd3b3a0af1dd /LuaSL/src/LuaSL_lexer.l | |
parent | Leaf cloner. (diff) | |
download | SledjHamr-fc5d487de27aa7aa17502008c848d06758223888.zip SledjHamr-fc5d487de27aa7aa17502008c848d06758223888.tar.gz SledjHamr-fc5d487de27aa7aa17502008c848d06758223888.tar.bz2 SledjHamr-fc5d487de27aa7aa17502008c848d06758223888.tar.xz |
Switch to the lemon parser.
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_lexer.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_lexer.l b/LuaSL/src/LuaSL_lexer.l index d81eb29..ddcb520 100644 --- a/LuaSL/src/LuaSL_lexer.l +++ b/LuaSL/src/LuaSL_lexer.l | |||
@@ -100,7 +100,7 @@ IDENTIFIER [[:alpha:]](_|[[:alpha:]]|[[:digit:]])* | |||
100 | "}" %{ return common(yylval, yytext, TRUE, LSL_BLOCK_CLOSE); %} | 100 | "}" %{ return common(yylval, yytext, TRUE, LSL_BLOCK_CLOSE); %} |
101 | ";" %{ return common(yylval, yytext, TRUE, LSL_STATEMENT); %} | 101 | ";" %{ return common(yylval, yytext, TRUE, LSL_STATEMENT); %} |
102 | 102 | ||
103 | <<EOF>> { yyterminate(); } | 103 | <<EOF>> { return common(yylval, yytext, TRUE, LSL_SCRIPT); } |
104 | 104 | ||
105 | /* Everything else */ | 105 | /* Everything else */ |
106 | . %{ printf(" unexpected character.\n"); yylval->value.unknownValue = strdup(yytext); common(yylval, yytext, TRUE, LSL_UNKNOWN); %} | 106 | . %{ printf(" unexpected character.\n"); yylval->value.unknownValue = strdup(yytext); common(yylval, yytext, TRUE, LSL_UNKNOWN); %} |
@@ -150,7 +150,7 @@ int common(YYSTYPE *lval, char *text, boolean checkIgnorable, int type) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | #ifdef LUASL_DEBUG | 152 | #ifdef LUASL_DEBUG |
153 | printf ("%04d, %04d [%s]\n", line, column, text); | 153 | printf ("******************************common(%s, \"%s\", , %d) %04d, %04d\n", lval->token->token, text, type, line, column); |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | return type; | 156 | return type; |