summaryrefslogtreecommitdiff
path: root/parse.h
blob: 84b36137169587a7bf3a4540e0469dd969e40a69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef PARSE
#define PARSE
#include "proposition.h"
typedef struct Scope {
	int id;
	int depth;
	struct Scope* parent;
} scope_t;
scope_t init_scope(int id, int depth, scope_t* parent);
typedef struct Line {
	scope_t scope;
	prop_t proposition;
	just_t justification;
} line_t;
line_t init_line(scope_t scope, prop_t proposition, just_t justification);
typedef struct LineSet {
	line_t* lines;
	int count;
} lineSet_t;
lineSet_t init_lineset(line_t* lines, int count);
int count_lines(char* content);
lineSet_t parse_lines(char* content, int lineCount);
line_t parse_line(char* content);
prop_t parse_proposition(tokenSet_t tokenSet, int* seek, char isNegative);
just_t parse_justification(tokenSet_t tokenSet);
char peq(prop_t prop1, prop_t prop2);
#endif