Hooked up the program counter in the parser to set the memory offset of symbols, well labels to be more acurrate.

This commit is contained in:
2023-06-18 14:51:37 -05:00
parent c6e6e2c5dc
commit 6741dde7ce
4 changed files with 72 additions and 25 deletions
+13 -1
View File
@@ -9,6 +9,7 @@
#include "../includes/parser.h"
List* LIST;
SymbolTable* Symbols;
void print(void);
@@ -27,12 +28,23 @@ int main(int argc, char* args[]) {
LIST = GenerateTokenList(source_code);
ParseTokens(LIST);
IRState* state = ParseTokens(LIST);
Symbols = state->SymbolsTable;
free(source_code);
}
// void assemble() {
// for(int i = 0; i < LIST->size; i++) {
// Token* current = LIST->content[i];
// if (current->Class != MnemonicClass) continue;
// }
// }
void print(void) {
char mnemonic[12];
printf("printing tokens...\n");