#ifndef PARSER_H #define PARSER_H #include #include #include #include "list.h" #include "token.h" #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; typedef struct { List* Opcodes; SymbolTable* SymbolsTable; } IRState; IRState* ParseTokens(List*); #endif