summaryrefslogtreecommitdiff
path: root/graphs/piscine/evalexpr/src/stack.h
blob: d08e46571e1277292dc9e9ff63b64ef9494ddc0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef STACK_H
#define STACK_H

#include "evalexpr.h"
#include "stack_struct.h"

struct tstack
{
    struct token *token;
    struct tstack *next;
};

struct stack *stack_push(struct stack *s, int e);
struct stack *stack_pop(struct stack *s);
int stack_peek(struct stack *s);

struct tstack *tstack_push(struct tstack *s, struct token *e);
struct tstack *tstack_pop(struct tstack *s);
struct token *tstack_peek(struct tstack *s);
#endif /* !STACK_H */