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

Last change on this file since 1214 was 1214, checked in by bird, 18 years ago

some more cleanup.

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