blob: aa750edb43132786fccca6b24293a7719026b24b [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001/*
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 union node *next;
105 int fd;
106 union node *fname;
107 char *expfname;
108};
109
110
111struct ndup {
112 int type;
113 union node *next;
114 int fd;
115 int dupfd;
116 union node *vname;
117};
118
119
120struct nhere {
121 int type;
122 union node *next;
123 int fd;
124 union node *doc;
125};
126
127
128struct nnot {
129 int type;
130 union node *com;
131};
132
133
134union node {
135 int type;
136 struct nbinary nbinary;
137 struct ncmd ncmd;
138 struct npipe npipe;
139 struct nredir nredir;
140 struct nif nif;
141 struct nfor nfor;
142 struct ncase ncase;
143 struct nclist nclist;
144 struct narg narg;
145 struct nfile nfile;
146 struct ndup ndup;
147 struct nhere nhere;
148 struct nnot nnot;
149};
150
151
152struct nodelist {
153 struct nodelist *next;
154 union node *n;
155};
156
157
158union node *copyfunc(union node *);
159void freefunc(union node *);