-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsemantic.h
52 lines (46 loc) · 843 Bytes
/
semantic.h
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
/*
Justin Canton, 1000017910
Samprit Raihan, 998138830
*/
#ifndef _SEMANTIC_H
#define _SEMANTIC_H
#include "ast.h"
#include "symbol.h"
#include "parser.tab.h"
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define INT 1
#define IVEC2 2
#define IVEC3 3
#define IVEC4 4
#define FLOAT 5
#define VEC2 6
#define VEC3 7
#define VEC4 8
#define BOOL 9
#define BVEC2 10
#define BVEC3 11
#define BVEC4 12
#define ITWO 13
#define ITHREE 14
#define IFOUR 15
#define BTWO 16
#define BTHREE 17
#define BFOUR 18
#define FTWO 19
#define FTHREE 20
#define FFOUR 21
#define IVEC32 22
#define IVEC42 23
#define VEC32 24
#define VEC42 25
#define CONSTANT 26
#define VALID 27
extern int scope;
extern symbol *a[20];
int semantic_check(node *ast, int assign);
char* get_Type(int value);
symbol* find_Symbol(char *name);
#endif