Files
assm-test/includes/parser.h
T

44 lines
792 B
C

#ifndef PARSER_H
#define PARSER_H
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#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* Instructions;
SymbolTable* SymbolsTable;
} IRState;
IRState* ParseTokens(List*);
#endif