-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.h
More file actions
54 lines (46 loc) · 922 Bytes
/
Copy pathstack.h
File metadata and controls
54 lines (46 loc) · 922 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//GROUP_23
//Akshika Goel (2016B5A70672P)
//Akriti Garg (2016B4A70480P)
//Shristi Kumari (2016B4A70574P)
//Pooja Tulsyan (2016B2A70721P)
#ifndef CHECK3
#define CHECK3
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "pra.h"
#define MAX_LEXEME_LENGTH 40 // just taking it twice of size of identifier
typedef struct t_node tree_node;
struct nonleaf_node{
NON_TERMINAL nt;
int rule_number;
tree_node * child;
tree_node* parent;
tree_node* sibling;
};
struct leaf_node{
struct token_info t;
tree_node * child;
tree_node * parent;
tree_node * sibling;
};
union node11{
struct nonleaf_node NL;
struct leaf_node L;
};
struct t_node{
union node11 n;
bool is_leaf;
};
typedef struct stack
{
bool is_term;
union{
TOKEN terminal;
NON_TERMINAL nonterminal;
}elem;
tree_node* ptr;
struct stack* next;
}stack;
#endif