-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.h
More file actions
74 lines (57 loc) · 1.28 KB
/
Copy pathparser.h
File metadata and controls
74 lines (57 loc) · 1.28 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* Projekt IFJ/IAL 2019 - Překladač imperativního jazyka IFJ19
*
* @file parser.h
*
* @author Daniel Pátek (xpatek08)
*/
#ifndef IFJ_PARSER_H
#define IFJ_PARSER_H
#include "error_code.h"
#include "scanner.h"
#include "string.h"
#include "expression.h"
#include "exp_stack.h"
#include "stack.h"
#include "generator.h"
#include "linear_list.h"
#include "symtable.h"
#include <stdbool.h>
//actual token
Token token;
//one token ahead
Token peekToken;
//scanner stack
tStack s;
//expression stack
ptrStack stack_expression;
//line variable for scanner
bool line_flag;
//bool var to check when we expect a docstring from scanner
bool nowExpression;
//var for actual function name
string functionName;
//index counter for params in function
int paramIndex;
//counter for generating labels
int labelCounter;
//global symtable
symtable glSymtable;
//local symtable
symtable lcSymtable;
//instruction list
instruction_list instrList;
//function list
ERROR_CODE parse();
ERROR_CODE program();
ERROR_CODE programBody();
ERROR_CODE functionHead();
ERROR_CODE functionParam();
ERROR_CODE functionDef();
ERROR_CODE functionBody();
ERROR_CODE command();
ERROR_CODE functionParam();
ERROR_CODE nextFunctionParam();
ERROR_CODE commands();
ERROR_CODE checkDefinedFunctions(struct tBSTNode* Root);
#endif