-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexp_stack.h
More file actions
40 lines (31 loc) · 767 Bytes
/
Copy pathexp_stack.h
File metadata and controls
40 lines (31 loc) · 767 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
36
37
38
39
40
/**
* Projekt IFJ/IAL 2019 - Překladač imperativního jazyka IFJ19
*
* @file exp_stack.h
*
* @author Daniel Čechák (xcecha06)
*/
#ifndef EXP_STACK_H
#define EXP_STACK_H
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "error_code.h"
#include "scanner.h"
// Strucure of the element on stack
typedef struct ptstack_structure{
struct ptstack_structure *left;
struct exp_element *value;
} ptStack;
// Strucure of the stack
typedef struct {
ptStack *top_of_stack;
} ptrStack;
// Declaration of funcition for stack
ERROR_CODE exp_stackInit(ptrStack *);
ERROR_CODE exp_stackPush(ptrStack *, void *);
void exp_stackPop(ptrStack *);
bool exp_stackEmpty(ptrStack *);
bool exp_stackClear(ptrStack *);
#include "expression.h"
#endif