-
Notifications
You must be signed in to change notification settings - Fork 0
/
parserInt.h
27 lines (23 loc) · 985 Bytes
/
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
#ifndef PARSEINT_H_
#define PARSEINT_H_
#include <iostream>
#include "lex.h"
#include "val.h"
using namespace std;
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_ */