Initial commit
This commit is contained in:
27
src/parser.h
Normal file
27
src/parser.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef PARSER_H
|
||||
#define PARSER_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "types.h"
|
||||
#include "lexer.h"
|
||||
|
||||
typedef struct GroundProgram {
|
||||
GroundInstruction* instructions;
|
||||
size_t size;
|
||||
} GroundProgram;
|
||||
|
||||
// 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(LexedFile file);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user