-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaparse.h
More file actions
42 lines (37 loc) · 1.26 KB
/
Copy pathaparse.h
File metadata and controls
42 lines (37 loc) · 1.26 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
#ifndef __APARSE_H___
#define __APARSE_H___
#define BUFFER 256
// checks if given keyword is valid
int isKeywordValid(char*);
// checks if an Input Expression is also an Arithmetic Expression
int isIExpAExp(char*);
// get keyword from the buffer
void getKeyword(char*,char*);
// returns the Arithmetic Expression from an Input Expression
int getAExp(char*,char*);
// removes any extra spaces
void cleanStr(char*);
// initializes the parameter's contents to NULL
void zeroFill(char*, int);
// returns the number of occurences of a character from a stream
// of characters
int ccount(char*,char);
// analyzes the input and designates the keyword and expression
void gin(char*, char*, char*);
// performs the task specified by the keyword and the
// input expression
int inparse(char*, char*);
// returns the index of a given keyword from the materlist
int getKwdIdx(char*);
// performs the aparse command
void aparse(char*);
// builds Arithmetic Expression Tree from a Arithmetic Expression
struct NODE* bAExpr3(char*);
struct NODE* _bAExpr3(char*, struct NODE*);
// returns the operator of highest precedence
char getOpt(char*);
// get Left and Right sub-expression
void getLRExpr(char*, char*, char*, char);
// converts one char to string
char* char2str(char);
#endif // __APARSE_H___