Files
cground/src/parser.h
2025-12-06 11:50:42 +11:00

23 lines
529 B
C

#ifndef PARSER_H
#define PARSER_H
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "types.h"
#include "lexer.h"
// Creates a new GroundProgram
GroundProgram createGroundProgram();
// Adds instruction (instruction) to GroundProgram (gp)
void addInstructionToProgram(GroundProgram* gp, GroundInstruction instruction);
// Frees all GroundInstructions in GroundProgram (gp)
void freeGroundProgram(GroundProgram* gp);
// Parses the file into a GroundProgram
GroundProgram parseFile(const char* file);
#endif