summaryrefslogtreecommitdiffstats
path: root/dimension/lexer.l
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-01-29 15:54:04 -0500
committerTavian Barnes <tavianator@gmail.com>2010-01-29 15:54:04 -0500
commite310c2cf9bdfcf86cbd1294567905f537832a488 (patch)
tree15b7f12c5aa23171c14bca8437236d82aa20d6e3 /dimension/lexer.l
parent15269687f6a9bdccd30dd370875bf18416f60dca (diff)
downloaddimension-e310c2cf9bdfcf86cbd1294567905f537832a488.tar.xz
Begin middle-tier lexer.
Diffstat (limited to 'dimension/lexer.l')
-rw-r--r--dimension/lexer.l10
1 files changed, 6 insertions, 4 deletions
diff --git a/dimension/lexer.l b/dimension/lexer.l
index 03f91dd..90c5a6b 100644
--- a/dimension/lexer.l
+++ b/dimension/lexer.l
@@ -32,9 +32,10 @@
#include <stdlib.h>
#include <stdio.h>
-#define YY_DECL int yylex(dmnsn_parse_item *lvalp, \
- dmnsn_parse_location *llocp, \
- const char *filename, yyscan_t yyscanner)
+#define YY_DECL int dmnsn_yylex_impl(dmnsn_parse_item *lvalp, \
+ dmnsn_parse_location *llocp, \
+ const char *filename, \
+ yyscan_t yyscanner)
%}
%x DMNSN_BLOCK_COMMENT
@@ -278,7 +279,8 @@ dmnsn_tokenize(FILE *file, const char *filename)
yylex_init(&scanner);
yyset_in(file, scanner);
- while ((token.type = yylex(&item, &location, filename, scanner)) != 0) {
+ while ((token.type = dmnsn_yylex_impl(&item, &location, filename, scanner))
+ != 0) {
if (token.type == 1 || token.type == 2) {
dmnsn_delete_tokens(tokens);
tokens = NULL;