Modified how registers and opcodes are represented. This commit is a bit buggy but doesn't crash and burn at least. I just wanted the new structs push out before making a bigger mess of things as I try to organize this all.
This commit is contained in:
+20
-17
@@ -9,23 +9,26 @@
|
||||
#include "tokenizer.h"
|
||||
|
||||
typedef enum {
|
||||
TK_Add,
|
||||
TK_Sub,
|
||||
TK_Mul,
|
||||
TK_Div,
|
||||
TK_Power,
|
||||
TK_LParam,
|
||||
TK_RParam,
|
||||
TK_LBracket,
|
||||
TK_RBracket,
|
||||
TK_String,
|
||||
TK_Number,
|
||||
TK_Hex,
|
||||
TK_Opcode,
|
||||
TK_Register,
|
||||
TK_Directive,
|
||||
TK_Symbol,
|
||||
TK_Comma
|
||||
PLUS,
|
||||
MINUS,
|
||||
STAR,
|
||||
SLASH,
|
||||
POWER,
|
||||
LPARAM,
|
||||
RPARAM,
|
||||
LBRACKET,
|
||||
RBracket,
|
||||
COMMA,
|
||||
IDENTIFIER,
|
||||
NUMBER,
|
||||
HEX,
|
||||
//Keywords
|
||||
DB, ORG,
|
||||
//Opcodes
|
||||
COPY, ADD, SUB, JZ, INT, YLD, RET,
|
||||
CMP, IN, OUT,
|
||||
//Registers
|
||||
R1, R2, R3, R4, R5, R6, R7, R8
|
||||
} TokenType;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user