-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparserInt.h
35 lines (28 loc) · 1.03 KB
/
parserInt.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
31
32
33
34
35
/*
* parserInt.h
* Programming Assignment 3
* Spring 2023
*/
#ifndef PARSEINT_H_
#define PARSEINT_H_
#include <iostream>
using namespace std;
#include "lex.h"
#include "val.h"
extern bool Prog(istream& in, int& line);
extern bool StmtList(istream& in, int& line);
extern bool Stmt(istream& in, int& line);
extern bool WritelnStmt(istream& in, int& line);
extern bool IfStmt(istream& in, int& line);
extern bool AssignStmt(istream& in, int& line);
extern bool Var(istream& in, int& line, LexItem & idtok);
extern bool ExprList(istream& in, int& line);
extern bool Expr(istream& in, int& line, Value & retVal);
extern bool RelExpr(istream& in, int& line, Value & retVal);
extern bool AddExpr(istream& in, int& line, Value & retVal);
extern bool MultExpr(istream& in, int& line, Value & retVal);
extern bool ExponExpr(istream& in, int& line, Value & retVal);
extern bool UnaryExpr(istream& in, int& line, Value & retVal);
extern bool PrimaryExpr(istream& in, int& line, int sign, Value & retVal);
extern int ErrCount();
#endif /* PARSEINT_H_ */