[Python-checkins] python/dist/src/Include Python-ast.h, 1.1.2.9, 1.1.2.10

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Mon Mar 21 00:41:02 CET 2005


Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15588/Include

Modified Files:
      Tag: ast-branch
	Python-ast.h 
Log Message:
Fix Python/asdl_c.py so that generated files Include/Python-ast.h and
Python/Python-ast.c do proper casting so that the files now compile.

Also removed warning about ambiguous 'if' and 'else' blocks by putting in curly
braces.

Closes bug #1102710.  Thanks logistix.


Index: Python-ast.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/Attic/Python-ast.h,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -d -r1.1.2.9 -r1.1.2.10
--- Python-ast.h	16 Jan 2005 17:09:11 -0000	1.1.2.9
+++ Python-ast.h	20 Mar 2005 23:40:58 -0000	1.1.2.10
@@ -1,4 +1,4 @@
-/* File automatically generated by Parser/asdl_c.py */
+/* File automatically generated by ./Parser/asdl_c.py */
 
 #include "asdl.h"
 
@@ -15,14 +15,14 @@
 
 typedef enum _boolop { And=1, Or=2 } boolop_ty;
 
-typedef enum _operator { Add=1, Sub=2, Mult=3, Div=4, Mod=5, Pow=6,
-                         LShift=7, RShift=8, BitOr=9, BitXor=10, BitAnd=11,
-                         FloorDiv=12 } operator_ty;
+typedef enum _operator { Add=1, Sub=2, Mult=3, Div=4, Mod=5, Pow=6, LShift=7,
+                         RShift=8, BitOr=9, BitXor=10, BitAnd=11, FloorDiv=12 }
+                         operator_ty;
 
 typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty;
 
-typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7,
-                      IsNot=8, In=9, NotIn=10 } cmpop_ty;
+typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8,
+                      In=9, NotIn=10 } cmpop_ty;
 
 typedef struct _comprehension *comprehension_ty;
 
@@ -59,13 +59,12 @@
 
 struct _stmt {
         enum { FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3,
-               Yield_kind=4, Delete_kind=5, Assign_kind=6,
-               AugAssign_kind=7, Print_kind=8, For_kind=9, While_kind=10,
-               If_kind=11, Raise_kind=12, TryExcept_kind=13,
-               TryFinally_kind=14, Assert_kind=15, Import_kind=16,
-               ImportFrom_kind=17, Exec_kind=18, Global_kind=19,
-               Expr_kind=20, Pass_kind=21, Break_kind=22, Continue_kind=23
-               } kind;
+               Yield_kind=4, Delete_kind=5, Assign_kind=6, AugAssign_kind=7,
+               Print_kind=8, For_kind=9, While_kind=10, If_kind=11,
+               Raise_kind=12, TryExcept_kind=13, TryFinally_kind=14,
+               Assert_kind=15, Import_kind=16, ImportFrom_kind=17,
+               Exec_kind=18, Global_kind=19, Expr_kind=20, Pass_kind=21,
+               Break_kind=22, Continue_kind=23 } kind;
         union {
                 struct {
                         identifier name;
@@ -180,8 +179,8 @@
         enum { BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
                Dict_kind=5, ListComp_kind=6, GeneratorComp_kind=7,
                Compare_kind=8, Call_kind=9, Repr_kind=10, Num_kind=11,
-               Str_kind=12, Attribute_kind=13, Subscript_kind=14,
-               Name_kind=15, List_kind=16, Tuple_kind=17 } kind;
+               Str_kind=12, Attribute_kind=13, Subscript_kind=14, Name_kind=15,
+               List_kind=16, Tuple_kind=17 } kind;
         union {
                 struct {
                         boolop_ty op;
@@ -276,8 +275,8 @@
 };
 
 struct _slice {
-        enum { Ellipsis_kind=1, Slice_kind=2, ExtSlice_kind=3, Index_kind=4
-               } kind;
+        enum { Ellipsis_kind=1, Slice_kind=2, ExtSlice_kind=3, Index_kind=4 }
+               kind;
         union {
                 struct {
                         expr_ty lower;
@@ -329,24 +328,23 @@
 mod_ty Interactive(asdl_seq * body);
 mod_ty Expression(expr_ty body);
 mod_ty Suite(asdl_seq * body);
-stmt_ty FunctionDef(identifier name, arguments_ty args, asdl_seq * body,
-                    int lineno);
+stmt_ty FunctionDef(identifier name, arguments_ty args, asdl_seq * body, int
+                    lineno);
 stmt_ty ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, int
                  lineno);
 stmt_ty Return(expr_ty value, int lineno);
 stmt_ty Yield(expr_ty value, int lineno);
 stmt_ty Delete(asdl_seq * targets, int lineno);
 stmt_ty Assign(asdl_seq * targets, expr_ty value, int lineno);
-stmt_ty AugAssign(expr_ty target, operator_ty op, expr_ty value, int
-                  lineno);
+stmt_ty AugAssign(expr_ty target, operator_ty op, expr_ty value, int lineno);
 stmt_ty Print(expr_ty dest, asdl_seq * values, bool nl, int lineno);
-stmt_ty For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
-            orelse, int lineno);
+stmt_ty For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse,
+            int lineno);
 stmt_ty While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno);
 stmt_ty If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno);
 stmt_ty Raise(expr_ty type, expr_ty inst, expr_ty tback, int lineno);
-stmt_ty TryExcept(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse,
-                  int lineno);
+stmt_ty TryExcept(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse, int
+                  lineno);
 stmt_ty TryFinally(asdl_seq * body, asdl_seq * finalbody, int lineno);
 stmt_ty Assert(expr_ty test, expr_ty msg, int lineno);
 stmt_ty Import(asdl_seq * names, int lineno);
@@ -379,11 +377,10 @@
 slice_ty Slice(expr_ty lower, expr_ty upper, expr_ty step);
 slice_ty ExtSlice(asdl_seq * dims);
 slice_ty Index(expr_ty value);
-comprehension_ty comprehension(expr_ty target, expr_ty iter, asdl_seq *
-                               ifs);
+comprehension_ty comprehension(expr_ty target, expr_ty iter, asdl_seq * ifs);
 excepthandler_ty excepthandler(expr_ty type, expr_ty name, asdl_seq * body);
-arguments_ty arguments(asdl_seq * args, identifier vararg, identifier
-                       kwarg, asdl_seq * defaults);
+arguments_ty arguments(asdl_seq * args, identifier vararg, identifier kwarg,
+                       asdl_seq * defaults);
 keyword_ty keyword(identifier arg, expr_ty value);
 alias_ty alias(identifier name, identifier asname);
 void free_mod(mod_ty);



More information about the Python-checkins mailing list