summaryrefslogtreecommitdiffstats
path: root/dimension/lexer.l
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-12-19 19:16:33 -0500
committerTavian Barnes <tavianator@gmail.com>2009-12-19 19:27:26 -0500
commit970ecabc1ad30fa74e58f3d4ad9ccf41baffb8b0 (patch)
treefd2d4eb68391a5b911d5a158a5506487d04a6298 /dimension/lexer.l
parent51fda684667044e2fe3e56f28137ef5397ef03ee (diff)
downloaddimension-970ecabc1ad30fa74e58f3d4ad9ccf41baffb8b0.tar.xz
Implement a symbol table.
Diffstat (limited to 'dimension/lexer.l')
-rw-r--r--dimension/lexer.l6
1 files changed, 2 insertions, 4 deletions
diff --git a/dimension/lexer.l b/dimension/lexer.l
index 5001d3a..54d2040 100644
--- a/dimension/lexer.l
+++ b/dimension/lexer.l
@@ -80,8 +80,6 @@
#define STRING_TOKEN() \
do { \
NEW_TOKEN(DMNSN_T_STRING); \
- string_length = 0; \
- string_extent = 8; \
lvalp->value = malloc(string_extent); \
lvalp->value[0] = '\0'; \
CALCULATE_COLUMN(); \
@@ -100,7 +98,7 @@
} while(0)
int token;
-size_t string_length, string_extent;
+size_t string_length = 0, string_extent = 8;
unsigned long wchar;
%}
@@ -283,7 +281,7 @@ dmnsn_tokenize(FILE *file, const char *filename)
return tokens;
}
-void
+static void
dmnsn_delete_token(dmnsn_token token)
{
free(token.value);