From c66148484cad66972348ffe850fd23bc9dca60f9 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 17 Dec 2009 03:12:34 -0500 Subject: Tokenize on-the-fly. No more manual tokenization and parsing, giving a simpler interface. Also, this brings us closer to a dmnsn_realize_string() interface. --- dimension/tokenize.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dimension/tokenize.h') diff --git a/dimension/tokenize.h b/dimension/tokenize.h index 67a386c..541c604 100644 --- a/dimension/tokenize.h +++ b/dimension/tokenize.h @@ -36,10 +36,11 @@ struct dmnsn_token { unsigned int line, col; }; -/* The workhorse */ -dmnsn_array *dmnsn_tokenize(const char *filename, FILE *file); +/* For debugging */ +dmnsn_array *dmnsn_tokenize(FILE *file, const char *filename); -/* Free an array of tokens - use this rather than dmnsn_delete_array() */ +/* Token destruction */ +void dmnsn_delete_token(dmnsn_token token); void dmnsn_delete_tokens(dmnsn_array *tokens); /* Print an S-expression of a list of tokens to `file' */ -- cgit v1.2.3