Started reworking the Parser to simplify how instructions will be represented. It will act like a 'first pass' that will do grammar checks but not verify the parameters of the opcodes.

This commit is contained in:
2022-10-02 22:54:18 -05:00
parent 55f4c32764
commit f7cd87f13f
6 changed files with 449 additions and 340 deletions
+1 -24
View File
@@ -9,30 +9,7 @@
#include "opcodes.h"
#include "symbols_table.h"
#define HIGHMEMORY 65535 //64KiB - 1 AKA 0xFFFF
// typedef struct {
// Token* token;
// int length;
// int address;
// int resolved;
// } Symbol;
// typedef struct {
// Mnemonic Mnemonic;
// TokenClass ParameterOneType;
// TokenClass ParameterTwoType;
// union {
// uint16_t Constant;
// Symbol* Address;
// } ParameterOne;
// union {
// uint16_t Constant;
// Symbol* Address;
// } ParameterTwo;
// } IROpcode;
//#define HIGHMEMORY 65535 //64KiB - 1 AKA 0xFFFF
typedef struct {
List* Instructions;
+1 -1
View File
@@ -9,7 +9,7 @@
#define SYMBOLSTABLE_DEFAULT_CAPACITY 128
typedef enum {
Data,
ValueAt,
Address
} SymbolType;