-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.h
More file actions
35 lines (28 loc) · 734 Bytes
/
stack.h
File metadata and controls
35 lines (28 loc) · 734 Bytes
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
#ifndef STACK_H_INCLUDED
#define STACK_H_INCLUDED
#include <iostream>
#define info(P) P->info
#define next(P) P->next
#define top(S) ((S).top)
#define nil NULL
using namespace std;
typedef char infotype;
typedef struct elmStack *address;
struct elmStack{
infotype info;
address next;
};
struct myStack{
address top;
};
void createStack(myStack &S);
bool isEmpty(myStack S);
void createNewElmt(infotype info, address &P);
void push(myStack &S, address P);
void pop(myStack &S, address &P);
bool isiSubjek(myStack &S);
bool isiPredikat(myStack &S);
bool isiObjek(myStack &S);
bool isiKeterangan(myStack &S);
bool cekKalimat(myStack &S1, myStack &S2, myStack &S3, myStack &S4, myStack &S5);
#endif // STACK_H_INCLUDED