-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.h
30 lines (23 loc) · 821 Bytes
/
parser.h
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
/* add the string to the data collection
return the index of the first char */
int addStringInstructionToDC(char *dataStr);
/* add the data numbers to the data collection
return the index of the first number */
int addDataInstructionToDC(char *dataStr);
/* get the name of an instruction
return the appropriate enum value */
int getInstructionType(const char* instruction);
/* get the label name and check if it's valid
return true or false */
int isValidLabel(char *label);
/* get the input file
read each line assert if every line is valid
save symbols to the symbols table
and encode action statment */
void firstIteration(FILE* input);
/* get the input file
read each line assert if every line is valid
write to entry log file
add data to code collection
*/
void secondIteration(FILE* input);