From 5adb568da4dfda6d5d9699ee4b92fe44b43fc4cf Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Thu, 30 Jul 2026 22:54:31 -0400 Subject: token names --- lexer.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'lexer.c') diff --git a/lexer.c b/lexer.c index c8c98db..b1d7f55 100644 --- a/lexer.c +++ b/lexer.c @@ -4,6 +4,59 @@ #include #include +const char* token_labels[] = { + "not found", + "identifier", + "integer literal", + "floating point literal", + "character literal", + "string literal", + "#", + "(", + ")", + "{", + "}", + "[", + "]", + ":", + ";", + ",", + ".", + "?", + "!", + "!=", + "^", + "^=", + "&", + "&&", + "&=", + "*", + "*=", + "-", + "-=", + "->", + "=", + "==", + "+", + "+=", + "\\", + "|", + "||", + "|=", + "/", + "/=", + "%", + "%=", + "<", + ">", + "<=", + ">=", + ">>", + ">>=", + "<<", + "<<=", +}; + static FILE* file = NULL; static int lookahead; static const char* PATH; -- cgit v1.2.3