[Python-checkins] python/nondist/sandbox/ast python.asdl,1.7,1.8

jhylton@sourceforge.net jhylton@sourceforge.net
Wed, 10 Apr 2002 16:03:34 -0700


Update of /cvsroot/python/python/nondist/sandbox/ast
In directory usw-pr-cvs1:/tmp/cvs-serv14803

Modified Files:
	python.asdl 
Log Message:
Rename stmts to stmt.  It only describes a single statement.  (Thanks
to Finn Bock for observing this.)

Make uses of stmt be stmt*, since there can be many statements or
none.

Q: Does we need "pass" or is that just a NULL stmt value?


Index: python.asdl
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/ast/python.asdl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** python.asdl	10 Apr 2002 03:58:01 -0000	1.7
--- python.asdl	10 Apr 2002 23:03:32 -0000	1.8
***************
*** 3,10 ****
  module Python
  {
! 	mod = Module(stmts body)
  
! 	stmts = FunctionDef(identifier name, arguments args, stmts body)
! 	      | ClassDef(identifier name, expr* bases, stmts body)
  	      | Return(expr value) | Yield(expr value)
  
--- 3,10 ----
  module Python
  {
! 	mod = Module(stmt* body)
  
! 	stmt = FunctionDef(identifier name, arguments args, stmt* body)
! 	      | ClassDef(identifier name, expr* bases, stmt* body)
  	      | Return(expr value) | Yield(expr value)
  
***************
*** 18,29 ****
  	      -- XXX use 'orelse' because else is a keyword
  	      -- need a better solution for that
! 	      | For(expr target, expr iter, stmts body, stmts orelse)
! 	      | While(expr test, stmts body, stmts orelse)
! 	      | If(expr test, stmts body, stmts? orelse)
  
  	      -- 'type' is a bad name
  	      | Raise(expr? type, expr? inst, expr? tback)
! 	      | TryExcept(stmts body, except* handlers)
! 	      | TryFinally(stmts body, stmts final)
  	      | Assert(expr test, expr? msg)
  
--- 18,29 ----
  	      -- XXX use 'orelse' because else is a keyword
  	      -- need a better solution for that
! 	      | For(expr target, expr iter, stmt body, stmt orelse)
! 	      | While(expr test, stmt body, stmt orelse)
! 	      | If(expr test, stmt body, stmt? orelse)
  
  	      -- 'type' is a bad name
  	      | Raise(expr? type, expr? inst, expr? tback)
! 	      | TryExcept(stmt body, except* handlers)
! 	      | TryFinally(stmt body, stmt final)
  	      | Assert(expr test, expr? msg)