Expanded the tokenizer to recognize some opcodes and registers.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#ifndef OPCODES_H
|
||||
#define OPCODES_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define OPCODECOUNT 7
|
||||
#define REGISTERCOUNT 8
|
||||
|
||||
extern char *opcodes[OPCODECOUNT];
|
||||
extern char *registers[REGISTERCOUNT];
|
||||
|
||||
int IsOpcode(const char*);
|
||||
int IsRegister(const char*);
|
||||
|
||||
#endif
|
||||
@@ -21,6 +21,8 @@ typedef enum {
|
||||
TK_Text,
|
||||
TK_Number,
|
||||
TK_Hex,
|
||||
TK_Opcode,
|
||||
TK_Register,
|
||||
TK_Invalid
|
||||
} TokenType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user