foxp/src/parser.h

28 lines
534 B
C
Raw Normal View History

2024-06-02 20:48:09 +00:00
#include <stdio.h>
2024-06-03 17:27:50 +00:00
#ifndef PARSER_H
#define PARSER_H
2024-06-03 18:02:30 +00:00
struct SyntaxElement* se_init(void);
struct SyntaxElement* se_bottom(struct SyntaxElement* syntaxelement);
struct SyntaxElement* se_next(struct SyntaxElement* syntaxelement);
void se_free(struct SyntaxElement* syntaxtree);
2024-06-02 20:48:09 +00:00
enum SyntaxElementType {
TOPTREE,
TREE,
TOKEN,
STRING,
NUMBER,
NONE
};
struct SyntaxElement {
enum SyntaxElementType type;
void* content;
struct SyntaxElement* next;
struct SyntaxElement* top;
};
struct SyntaxElement* parse(FILE* file);
2024-06-03 17:27:50 +00:00
#endif