Neal Norwitz | 897ff81 | 2005-12-11 21:18:22 +0000 | [diff] [blame] | 1 | /* File automatically generated by Parser/asdl_c.py */ |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 2 | |
| 3 | #include "asdl.h" |
| 4 | |
| 5 | typedef struct _mod *mod_ty; |
| 6 | |
| 7 | typedef struct _stmt *stmt_ty; |
| 8 | |
| 9 | typedef struct _expr *expr_ty; |
| 10 | |
| 11 | typedef enum _expr_context { Load=1, Store=2, Del=3, AugLoad=4, AugStore=5, |
| 12 | Param=6 } expr_context_ty; |
| 13 | |
| 14 | typedef struct _slice *slice_ty; |
| 15 | |
| 16 | typedef enum _boolop { And=1, Or=2 } boolop_ty; |
| 17 | |
| 18 | typedef enum _operator { Add=1, Sub=2, Mult=3, Div=4, Mod=5, Pow=6, LShift=7, |
| 19 | RShift=8, BitOr=9, BitXor=10, BitAnd=11, FloorDiv=12 } |
| 20 | operator_ty; |
| 21 | |
| 22 | typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty; |
| 23 | |
| 24 | typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8, |
| 25 | In=9, NotIn=10 } cmpop_ty; |
| 26 | |
| 27 | typedef struct _comprehension *comprehension_ty; |
| 28 | |
| 29 | typedef struct _excepthandler *excepthandler_ty; |
| 30 | |
| 31 | typedef struct _arguments *arguments_ty; |
| 32 | |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 33 | typedef struct _arg *arg_ty; |
| 34 | |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 35 | typedef struct _keyword *keyword_ty; |
| 36 | |
| 37 | typedef struct _alias *alias_ty; |
| 38 | |
Neal Norwitz | 7b5a604 | 2005-11-13 19:14:20 +0000 | [diff] [blame] | 39 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 40 | enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3, |
| 41 | Suite_kind=4}; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 42 | struct _mod { |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 43 | enum _mod_kind kind; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 44 | union { |
| 45 | struct { |
| 46 | asdl_seq *body; |
| 47 | } Module; |
| 48 | |
| 49 | struct { |
| 50 | asdl_seq *body; |
| 51 | } Interactive; |
| 52 | |
| 53 | struct { |
| 54 | expr_ty body; |
| 55 | } Expression; |
| 56 | |
| 57 | struct { |
| 58 | asdl_seq *body; |
| 59 | } Suite; |
| 60 | |
| 61 | } v; |
| 62 | }; |
| 63 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 64 | enum _stmt_kind {FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3, |
| 65 | Delete_kind=4, Assign_kind=5, AugAssign_kind=6, Print_kind=7, |
| 66 | For_kind=8, While_kind=9, If_kind=10, With_kind=11, |
| 67 | Raise_kind=12, TryExcept_kind=13, TryFinally_kind=14, |
| 68 | Assert_kind=15, Import_kind=16, ImportFrom_kind=17, |
Georg Brandl | 7cae87c | 2006-09-06 06:51:57 +0000 | [diff] [blame] | 69 | Global_kind=18, Expr_kind=19, Pass_kind=20, Break_kind=21, |
| 70 | Continue_kind=22}; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 71 | struct _stmt { |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 72 | enum _stmt_kind kind; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 73 | union { |
| 74 | struct { |
| 75 | identifier name; |
| 76 | arguments_ty args; |
| 77 | asdl_seq *body; |
| 78 | asdl_seq *decorators; |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 79 | expr_ty returns; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 80 | } FunctionDef; |
| 81 | |
| 82 | struct { |
| 83 | identifier name; |
| 84 | asdl_seq *bases; |
| 85 | asdl_seq *body; |
| 86 | } ClassDef; |
| 87 | |
| 88 | struct { |
| 89 | expr_ty value; |
| 90 | } Return; |
| 91 | |
| 92 | struct { |
| 93 | asdl_seq *targets; |
| 94 | } Delete; |
| 95 | |
| 96 | struct { |
| 97 | asdl_seq *targets; |
| 98 | expr_ty value; |
| 99 | } Assign; |
| 100 | |
| 101 | struct { |
| 102 | expr_ty target; |
| 103 | operator_ty op; |
| 104 | expr_ty value; |
| 105 | } AugAssign; |
| 106 | |
| 107 | struct { |
| 108 | expr_ty dest; |
| 109 | asdl_seq *values; |
| 110 | bool nl; |
| 111 | } Print; |
| 112 | |
| 113 | struct { |
| 114 | expr_ty target; |
| 115 | expr_ty iter; |
| 116 | asdl_seq *body; |
| 117 | asdl_seq *orelse; |
| 118 | } For; |
| 119 | |
| 120 | struct { |
| 121 | expr_ty test; |
| 122 | asdl_seq *body; |
| 123 | asdl_seq *orelse; |
| 124 | } While; |
| 125 | |
| 126 | struct { |
| 127 | expr_ty test; |
| 128 | asdl_seq *body; |
| 129 | asdl_seq *orelse; |
| 130 | } If; |
| 131 | |
| 132 | struct { |
Guido van Rossum | c2e2074 | 2006-02-27 22:32:47 +0000 | [diff] [blame] | 133 | expr_ty context_expr; |
| 134 | expr_ty optional_vars; |
| 135 | asdl_seq *body; |
| 136 | } With; |
| 137 | |
| 138 | struct { |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 139 | expr_ty type; |
| 140 | expr_ty inst; |
| 141 | expr_ty tback; |
| 142 | } Raise; |
| 143 | |
| 144 | struct { |
| 145 | asdl_seq *body; |
| 146 | asdl_seq *handlers; |
| 147 | asdl_seq *orelse; |
| 148 | } TryExcept; |
| 149 | |
| 150 | struct { |
| 151 | asdl_seq *body; |
| 152 | asdl_seq *finalbody; |
| 153 | } TryFinally; |
| 154 | |
| 155 | struct { |
| 156 | expr_ty test; |
| 157 | expr_ty msg; |
| 158 | } Assert; |
| 159 | |
| 160 | struct { |
| 161 | asdl_seq *names; |
| 162 | } Import; |
| 163 | |
| 164 | struct { |
| 165 | identifier module; |
| 166 | asdl_seq *names; |
Thomas Wouters | f7f438b | 2006-02-28 16:09:29 +0000 | [diff] [blame] | 167 | int level; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 168 | } ImportFrom; |
| 169 | |
| 170 | struct { |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 171 | asdl_seq *names; |
| 172 | } Global; |
| 173 | |
| 174 | struct { |
| 175 | expr_ty value; |
| 176 | } Expr; |
| 177 | |
| 178 | } v; |
| 179 | int lineno; |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 180 | int col_offset; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 181 | }; |
| 182 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 183 | enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4, |
Guido van Rossum | 86e58e2 | 2006-08-28 15:27:34 +0000 | [diff] [blame] | 184 | IfExp_kind=5, Dict_kind=6, Set_kind=7, ListComp_kind=8, |
| 185 | GeneratorExp_kind=9, Yield_kind=10, Compare_kind=11, |
Georg Brandl | 52318d6 | 2006-09-06 07:06:08 +0000 | [diff] [blame] | 186 | Call_kind=12, Num_kind=13, Str_kind=14, Ellipsis_kind=15, |
| 187 | Attribute_kind=16, Subscript_kind=17, Name_kind=18, |
| 188 | List_kind=19, Tuple_kind=20}; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 189 | struct _expr { |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 190 | enum _expr_kind kind; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 191 | union { |
| 192 | struct { |
| 193 | boolop_ty op; |
| 194 | asdl_seq *values; |
| 195 | } BoolOp; |
| 196 | |
| 197 | struct { |
| 198 | expr_ty left; |
| 199 | operator_ty op; |
| 200 | expr_ty right; |
| 201 | } BinOp; |
| 202 | |
| 203 | struct { |
| 204 | unaryop_ty op; |
| 205 | expr_ty operand; |
| 206 | } UnaryOp; |
| 207 | |
| 208 | struct { |
| 209 | arguments_ty args; |
| 210 | expr_ty body; |
| 211 | } Lambda; |
| 212 | |
| 213 | struct { |
Thomas Wouters | dca3b9c | 2006-02-27 00:24:13 +0000 | [diff] [blame] | 214 | expr_ty test; |
| 215 | expr_ty body; |
| 216 | expr_ty orelse; |
| 217 | } IfExp; |
| 218 | |
| 219 | struct { |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 220 | asdl_seq *keys; |
| 221 | asdl_seq *values; |
| 222 | } Dict; |
| 223 | |
| 224 | struct { |
Guido van Rossum | 86e58e2 | 2006-08-28 15:27:34 +0000 | [diff] [blame] | 225 | asdl_seq *elts; |
| 226 | } Set; |
| 227 | |
| 228 | struct { |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 229 | expr_ty elt; |
| 230 | asdl_seq *generators; |
| 231 | } ListComp; |
| 232 | |
| 233 | struct { |
| 234 | expr_ty elt; |
| 235 | asdl_seq *generators; |
| 236 | } GeneratorExp; |
| 237 | |
| 238 | struct { |
| 239 | expr_ty value; |
| 240 | } Yield; |
| 241 | |
| 242 | struct { |
| 243 | expr_ty left; |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 244 | asdl_int_seq *ops; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 245 | asdl_seq *comparators; |
| 246 | } Compare; |
| 247 | |
| 248 | struct { |
| 249 | expr_ty func; |
| 250 | asdl_seq *args; |
| 251 | asdl_seq *keywords; |
| 252 | expr_ty starargs; |
| 253 | expr_ty kwargs; |
| 254 | } Call; |
| 255 | |
| 256 | struct { |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 257 | object n; |
| 258 | } Num; |
| 259 | |
| 260 | struct { |
| 261 | string s; |
| 262 | } Str; |
| 263 | |
| 264 | struct { |
| 265 | expr_ty value; |
| 266 | identifier attr; |
| 267 | expr_context_ty ctx; |
| 268 | } Attribute; |
| 269 | |
| 270 | struct { |
| 271 | expr_ty value; |
| 272 | slice_ty slice; |
| 273 | expr_context_ty ctx; |
| 274 | } Subscript; |
| 275 | |
| 276 | struct { |
| 277 | identifier id; |
| 278 | expr_context_ty ctx; |
| 279 | } Name; |
| 280 | |
| 281 | struct { |
| 282 | asdl_seq *elts; |
| 283 | expr_context_ty ctx; |
| 284 | } List; |
| 285 | |
| 286 | struct { |
| 287 | asdl_seq *elts; |
| 288 | expr_context_ty ctx; |
| 289 | } Tuple; |
| 290 | |
| 291 | } v; |
| 292 | int lineno; |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 293 | int col_offset; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 294 | }; |
| 295 | |
Georg Brandl | 52318d6 | 2006-09-06 07:06:08 +0000 | [diff] [blame] | 296 | enum _slice_kind {Slice_kind=1, ExtSlice_kind=2, Index_kind=3}; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 297 | struct _slice { |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 298 | enum _slice_kind kind; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 299 | union { |
| 300 | struct { |
| 301 | expr_ty lower; |
| 302 | expr_ty upper; |
| 303 | expr_ty step; |
| 304 | } Slice; |
| 305 | |
| 306 | struct { |
| 307 | asdl_seq *dims; |
| 308 | } ExtSlice; |
| 309 | |
| 310 | struct { |
| 311 | expr_ty value; |
| 312 | } Index; |
| 313 | |
| 314 | } v; |
| 315 | }; |
| 316 | |
| 317 | struct _comprehension { |
| 318 | expr_ty target; |
| 319 | expr_ty iter; |
| 320 | asdl_seq *ifs; |
| 321 | }; |
| 322 | |
| 323 | struct _excepthandler { |
| 324 | expr_ty type; |
| 325 | expr_ty name; |
| 326 | asdl_seq *body; |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 327 | int lineno; |
| 328 | int col_offset; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 329 | }; |
| 330 | |
| 331 | struct _arguments { |
| 332 | asdl_seq *args; |
| 333 | identifier vararg; |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 334 | expr_ty varargannotation; |
Guido van Rossum | 4f72a78 | 2006-10-27 23:31:49 +0000 | [diff] [blame] | 335 | asdl_seq *kwonlyargs; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 336 | identifier kwarg; |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 337 | expr_ty kwargannotation; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 338 | asdl_seq *defaults; |
Guido van Rossum | 4f72a78 | 2006-10-27 23:31:49 +0000 | [diff] [blame] | 339 | asdl_seq *kw_defaults; |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 340 | }; |
| 341 | |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 342 | enum _arg_kind {SimpleArg_kind=1, NestedArgs_kind=2}; |
| 343 | struct _arg { |
| 344 | enum _arg_kind kind; |
| 345 | union { |
| 346 | struct { |
| 347 | identifier arg; |
| 348 | expr_ty annotation; |
| 349 | } SimpleArg; |
| 350 | |
| 351 | struct { |
| 352 | asdl_seq *args; |
| 353 | } NestedArgs; |
| 354 | |
| 355 | } v; |
| 356 | }; |
| 357 | |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 358 | struct _keyword { |
| 359 | identifier arg; |
| 360 | expr_ty value; |
| 361 | }; |
| 362 | |
| 363 | struct _alias { |
| 364 | identifier name; |
| 365 | identifier asname; |
| 366 | }; |
| 367 | |
Neal Norwitz | 7b5a604 | 2005-11-13 19:14:20 +0000 | [diff] [blame] | 368 | |
Neal Norwitz | adb69fc | 2005-12-17 20:54:49 +0000 | [diff] [blame] | 369 | mod_ty Module(asdl_seq * body, PyArena *arena); |
| 370 | mod_ty Interactive(asdl_seq * body, PyArena *arena); |
| 371 | mod_ty Expression(expr_ty body, PyArena *arena); |
| 372 | mod_ty Suite(asdl_seq * body, PyArena *arena); |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 373 | stmt_ty FunctionDef(identifier name, arguments_ty args, asdl_seq * body, |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 374 | asdl_seq * decorators, expr_ty returns, int lineno, int |
| 375 | col_offset, PyArena *arena); |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 376 | stmt_ty ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, int |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 377 | lineno, int col_offset, PyArena *arena); |
| 378 | stmt_ty Return(expr_ty value, int lineno, int col_offset, PyArena *arena); |
| 379 | stmt_ty Delete(asdl_seq * targets, int lineno, int col_offset, PyArena *arena); |
| 380 | stmt_ty Assign(asdl_seq * targets, expr_ty value, int lineno, int col_offset, |
| 381 | PyArena *arena); |
Neal Norwitz | adb69fc | 2005-12-17 20:54:49 +0000 | [diff] [blame] | 382 | stmt_ty AugAssign(expr_ty target, operator_ty op, expr_ty value, int lineno, |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 383 | int col_offset, PyArena *arena); |
| 384 | stmt_ty Print(expr_ty dest, asdl_seq * values, bool nl, int lineno, int |
| 385 | col_offset, PyArena *arena); |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 386 | stmt_ty For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse, |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 387 | int lineno, int col_offset, PyArena *arena); |
| 388 | stmt_ty While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int |
| 389 | col_offset, PyArena *arena); |
| 390 | stmt_ty If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int |
| 391 | col_offset, PyArena *arena); |
Guido van Rossum | c2e2074 | 2006-02-27 22:32:47 +0000 | [diff] [blame] | 392 | stmt_ty With(expr_ty context_expr, expr_ty optional_vars, asdl_seq * body, int |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 393 | lineno, int col_offset, PyArena *arena); |
| 394 | stmt_ty Raise(expr_ty type, expr_ty inst, expr_ty tback, int lineno, int |
| 395 | col_offset, PyArena *arena); |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 396 | stmt_ty TryExcept(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse, int |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 397 | lineno, int col_offset, PyArena *arena); |
| 398 | stmt_ty TryFinally(asdl_seq * body, asdl_seq * finalbody, int lineno, int |
| 399 | col_offset, PyArena *arena); |
| 400 | stmt_ty Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, PyArena |
| 401 | *arena); |
| 402 | stmt_ty Import(asdl_seq * names, int lineno, int col_offset, PyArena *arena); |
Thomas Wouters | f7f438b | 2006-02-28 16:09:29 +0000 | [diff] [blame] | 403 | stmt_ty ImportFrom(identifier module, asdl_seq * names, int level, int lineno, |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 404 | int col_offset, PyArena *arena); |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 405 | stmt_ty Global(asdl_seq * names, int lineno, int col_offset, PyArena *arena); |
| 406 | stmt_ty Expr(expr_ty value, int lineno, int col_offset, PyArena *arena); |
| 407 | stmt_ty Pass(int lineno, int col_offset, PyArena *arena); |
| 408 | stmt_ty Break(int lineno, int col_offset, PyArena *arena); |
| 409 | stmt_ty Continue(int lineno, int col_offset, PyArena *arena); |
| 410 | expr_ty BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset, |
| 411 | PyArena *arena); |
| 412 | expr_ty BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int |
| 413 | col_offset, PyArena *arena); |
| 414 | expr_ty UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset, |
| 415 | PyArena *arena); |
| 416 | expr_ty Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, |
| 417 | PyArena *arena); |
| 418 | expr_ty IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int |
| 419 | col_offset, PyArena *arena); |
| 420 | expr_ty Dict(asdl_seq * keys, asdl_seq * values, int lineno, int col_offset, |
| 421 | PyArena *arena); |
Guido van Rossum | 86e58e2 | 2006-08-28 15:27:34 +0000 | [diff] [blame] | 422 | expr_ty Set(asdl_seq * elts, int lineno, int col_offset, PyArena *arena); |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 423 | expr_ty ListComp(expr_ty elt, asdl_seq * generators, int lineno, int |
| 424 | col_offset, PyArena *arena); |
| 425 | expr_ty GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int |
| 426 | col_offset, PyArena *arena); |
| 427 | expr_ty Yield(expr_ty value, int lineno, int col_offset, PyArena *arena); |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 428 | expr_ty Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators, int |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 429 | lineno, int col_offset, PyArena *arena); |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 430 | expr_ty Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 431 | starargs, expr_ty kwargs, int lineno, int col_offset, PyArena |
| 432 | *arena); |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 433 | expr_ty Num(object n, int lineno, int col_offset, PyArena *arena); |
| 434 | expr_ty Str(string s, int lineno, int col_offset, PyArena *arena); |
Georg Brandl | 52318d6 | 2006-09-06 07:06:08 +0000 | [diff] [blame] | 435 | expr_ty Ellipsis(int lineno, int col_offset, PyArena *arena); |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 436 | expr_ty Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 437 | lineno, int col_offset, PyArena *arena); |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 438 | expr_ty Subscript(expr_ty value, slice_ty slice, expr_context_ty ctx, int |
Martin v. Löwis | 49c5da1 | 2006-03-01 22:49:05 +0000 | [diff] [blame] | 439 | lineno, int col_offset, PyArena *arena); |
| 440 | expr_ty Name(identifier id, expr_context_ty ctx, int lineno, int col_offset, |
| 441 | PyArena *arena); |
| 442 | expr_ty List(asdl_seq * elts, expr_context_ty ctx, int lineno, int col_offset, |
| 443 | PyArena *arena); |
| 444 | expr_ty Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int col_offset, |
| 445 | PyArena *arena); |
Neal Norwitz | adb69fc | 2005-12-17 20:54:49 +0000 | [diff] [blame] | 446 | slice_ty Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena); |
| 447 | slice_ty ExtSlice(asdl_seq * dims, PyArena *arena); |
| 448 | slice_ty Index(expr_ty value, PyArena *arena); |
| 449 | comprehension_ty comprehension(expr_ty target, expr_ty iter, asdl_seq * ifs, |
| 450 | PyArena *arena); |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 451 | excepthandler_ty excepthandler(expr_ty type, expr_ty name, asdl_seq * body, int |
| 452 | lineno, int col_offset, PyArena *arena); |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 453 | arguments_ty arguments(asdl_seq * args, identifier vararg, expr_ty |
| 454 | varargannotation, asdl_seq * kwonlyargs, identifier |
| 455 | kwarg, expr_ty kwargannotation, asdl_seq * defaults, |
Guido van Rossum | 4f72a78 | 2006-10-27 23:31:49 +0000 | [diff] [blame] | 456 | asdl_seq * kw_defaults, PyArena *arena); |
Neal Norwitz | c150536 | 2006-12-28 06:47:50 +0000 | [diff] [blame^] | 457 | arg_ty SimpleArg(identifier arg, expr_ty annotation, PyArena *arena); |
| 458 | arg_ty NestedArgs(asdl_seq * args, PyArena *arena); |
Neal Norwitz | adb69fc | 2005-12-17 20:54:49 +0000 | [diff] [blame] | 459 | keyword_ty keyword(identifier arg, expr_ty value, PyArena *arena); |
| 460 | alias_ty alias(identifier name, identifier asname, PyArena *arena); |
Neal Norwitz | 7b5a604 | 2005-11-13 19:14:20 +0000 | [diff] [blame] | 461 | |
Martin v. Löwis | bd260da | 2006-02-26 19:42:26 +0000 | [diff] [blame] | 462 | PyObject* PyAST_mod2obj(mod_ty t); |