-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.h
More file actions
28 lines (25 loc) · 794 Bytes
/
stack.h
File metadata and controls
28 lines (25 loc) · 794 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
/************************************************************************
*
* Compiler implementation for imperative programming language IFJ18
*
* Autors:
* Sasák Tomáš - xsasak01
* Venkrbec Tomáš - xvenkr01
* Krajči Martin - xkrajc21
* Natália Dižová - xdizov00
*
***********************************************************************/
#include "scanner.h"
#define EMPTY 999
typedef struct tokenStack tStack;
typedef struct tokenStack
{
tToken head; // root of current pushed token
tStack *next; // pointer to the next member of the stack
}tokenStack;
void free_stack(tStack *stack);
void init_stack(tStack *stack);
tToken head_stack(tStack *stack);
void clear_stack(tStack *stack);
void pop_stack(tStack *stack);
void push_stack(tStack *stack, tToken new);