GSC Interpreter
A Turing-complete interpreter developed for a compiler course
|
#include <string>
Go to the source code of this file.
Enumerations | |
enum | TokenType { LEFT_PAREN , RIGHT_PAREN , LEFT_BRACE , RIGHT_BRACE , MINUS , PLUS , SEMICOLON , SLASH , STAR , BANG , BANG_EQUAL , EQUAL , EQUAL_EQUAL , GREATER , GREATER_EQUAL , LESS , LESS_EQUAL , IDENTIFIER , STRING , NUMBER , AND , OR , IF , ELSE , TRUE , FALSE , FOR , WHILE , NIL , PRINT , VAR , END_OF_FILE } |
Enum representing the different types of tokens in the GSC language. More... | |
Functions | |
std::string | toString (TokenType type) |
Variables | |
static const std::string | tokenStrings [] |
enum TokenType |
Enum representing the different types of tokens in the GSC language.
This enum is used to categorize tokens during lexical analysis.
Definition at line 10 of file tokenType.hpp.
std::string toString | ( | TokenType | type | ) |
Definition at line 3 of file tokenType.cpp.
|
static |
Definition at line 53 of file tokenType.hpp.