From eee61ddbba165f772a0e720825dcf6810eaa2648 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 1 Aug 2018 23:25:46 +1200 Subject: Rename lexer and parser, fix compilation warnings --- lexer.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 lexer.h (limited to 'lexer.h') diff --git a/lexer.h b/lexer.h deleted file mode 100644 index 3ce15f4..0000000 --- a/lexer.h +++ /dev/null @@ -1,35 +0,0 @@ -#define MAX_IDENT_LENGTH 128 - -enum TOKEN_TYPE { - /* Keywords */ - TOK_MODULE, - TOK_INPUT, - TOK_EXPR, - TOK_COLON, - TOK_EOL, - TOK_OR, - TOK_AND, - TOK_XOR, - TOK_NOT, - - /* Etc */ - TOK_IDENT -}; - -struct location { - size_t line; - size_t column; - size_t leading_whitespace_len; -}; - -struct token { - enum TOKEN_TYPE type; - struct location loc; - char value[MAX_IDENT_LENGTH]; - size_t span; - struct token *next; -}; - -struct token* lex_file(FILE*); -const char *get_token_description(enum TOKEN_TYPE); - -- cgit v1.1