source: trunk/src/kash/generated/nodes.h@ 3449

Last change on this file since 3449 was 3449, checked in by bird, 5 years ago

kash: Eliminate the 'temp' node field in nfile so we can share node trees later.

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/*
2 * This file was generated by mknodes.sh
3 */
4
5#define NSEMI 0
6#define NCMD 1
7#define NPIPE 2
8#define NREDIR 3
9#define NBACKGND 4
10#define NSUBSHELL 5
11#define NAND 6
12#define NOR 7
13#define NIF 8
14#define NWHILE 9
15#define NUNTIL 10
16#define NFOR 11
17#define NCASE 12
18#define NCLIST 13
19#define NDEFUN 14
20#define NARG 15
21#define NTO 16
22#define NCLOBBER 17
23#define NFROM 18
24#define NFROMTO 19
25#define NAPPEND 20
26#define NTOFD 21
27#define NFROMFD 22
28#define NHERE 23
29#define NXHERE 24
30#define NNOT 25
31
32
33
34struct nbinary {
35 int type;
36 union node *ch1;
37 union node *ch2;
38};
39
40
41struct ncmd {
42 int type;
43 int backgnd;
44 union node *args;
45 union node *redirect;
46};
47
48
49struct npipe {
50 int type;
51 int backgnd;
52 struct nodelist *cmdlist;
53};
54
55
56struct nredir {
57 int type;
58 union node *n;
59 union node *redirect;
60};
61
62
63struct nif {
64 int type;
65 union node *test;
66 union node *ifpart;
67 union node *elsepart;
68};
69
70
71struct nfor {
72 int type;
73 union node *args;
74 union node *body;
75 char *var;
76};
77
78
79struct ncase {
80 int type;
81 union node *expr;
82 union node *cases;
83};
84
85
86struct nclist {
87 int type;
88 union node *next;
89 union node *pattern;
90 union node *body;
91};
92
93
94struct narg {
95 int type;
96 union node *next;
97 char *text;
98 struct nodelist *backquote;
99};
100
101
102struct nfile {
103 int type;
104 int fd;
105 union node *next;
106 union node *fname;
107};
108
109
110struct ndup {
111 int type;
112 int fd;
113 union node *next;
114 int dupfd;
115 union node *vname;
116};
117
118
119struct nhere {
120 int type;
121 int fd;
122 union node *next;
123 union node *doc;
124};
125
126
127struct nnot {
128 int type;
129 union node *com;
130};
131
132
133union node {
134 int type;
135 struct nbinary nbinary;
136 struct ncmd ncmd;
137 struct npipe npipe;
138 struct nredir nredir;
139 struct nif nif;
140 struct nfor nfor;
141 struct ncase ncase;
142 struct nclist nclist;
143 struct narg narg;
144 struct nfile nfile;
145 struct ndup ndup;
146 struct nhere nhere;
147 struct nnot nnot;
148};
149
150
151struct nodelist {
152 struct nodelist *next;
153 union node *n;
154};
155
156
157union node *copyfunc(struct shinstance *, union node *);
158void freefunc(struct shinstance *, union node *);
Note: See TracBrowser for help on using the repository browser.