-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathtoken_type.h
More file actions
82 lines (73 loc) · 2.01 KB
/
token_type.h
File metadata and controls
82 lines (73 loc) · 2.01 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef TOKEN_TYPE_H
#define TOKEN_TYPE_H
#include "express/symbol.h"
#include "express/linklist.h"
#include "stack.h"
#include "express/express.h"
#include "express/schema.h"
#include "express/entity.h"
#include "express/resolve.h"
/* structured types for parse node decorations */
struct type_either {
Type type;
TypeBody body;
};
struct type_flags {
unsigned optional: 1;
unsigned unique: 1;
unsigned fixed: 1;
unsigned var: 1; /**< when formal is "VAR" */
};
struct entity_body {
Linked_List attributes;
Linked_List unique;
Linked_List where;
};
struct subsuper_decl {
Expression subtypes;
Linked_List supertypes;
bool abstract;
};
struct subtypes {
Expression subtypes;
bool abstract;
};
struct upper_lower {
Expression lower_limit;
Expression upper_limit;
};
struct qualifier {
Expression expr; /**< overall expression for qualifier */
Expression first; /**< first [syntactic] qualifier (if more than one is
* contained in this [semantic] qualifier - used for
* group_ref + attr_ref - see rule for qualifier)
*/
};
/** simple (single-valued) node types */
typedef union YYSTYPE {
Binary binary;
Case_Item case_item;
Expression expression;
Integer iVal;
Linked_List list;
Logical logical;
Op_Code op_code;
Qualified_Attr * qualified_attr;
Real rVal;
Statement statement;
Symbol * symbol;
char * string;
Type type;
TypeBody typebody;
Variable variable;
Where where;
struct type_either type_either;
struct type_flags type_flags;
struct entity_body entity_body;
struct subsuper_decl subsuper_decl;
struct subtypes subtypes;
struct upper_lower upper_lower;
struct qualifier qualifier;
unsigned int val;
} YYSTYPE;
#endif