From e310c2cf9bdfcf86cbd1294567905f537832a488 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 29 Jan 2010 15:54:04 -0500 Subject: Begin middle-tier lexer. --- dimension/lexer.l | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'dimension/lexer.l') 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 #include -#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; -- cgit v1.2.3