[Python-checkins] CVS: python/dist/src/Grammar Grammar,1.37,1.38
Barry Warsaw
python-dev@python.org
Mon, 21 Aug 2000 08:34:36 -0700
Update of /cvsroot/python/python/dist/src/Grammar
In directory slayer.i.sourceforge.net:/tmp/cvs-serv22451
Modified Files:
Grammar
Log Message:
PEP 214, Extended print Statement, has been accepted by the BDFL.
This change modifies Python's grammar to include the extended print
form.
Index: Grammar
===================================================================
RCS file: /cvsroot/python/python/dist/src/Grammar/Grammar,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** Grammar 2000/08/17 22:54:59 1.37
--- Grammar 2000/08/21 15:34:33 1.38
***************
*** 31,38 ****
simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
#small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | access_stmt | exec_stmt
! small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt
expr_stmt: testlist ('=' testlist)*
# For assignments, additional restrictions enforced by the interpreter
! print_stmt: 'print' (test ',')* [test]
del_stmt: 'del' exprlist
pass_stmt: 'pass'
--- 31,38 ----
simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
#small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | access_stmt | exec_stmt
! small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt
expr_stmt: testlist ('=' testlist)*
# For assignments, additional restrictions enforced by the interpreter
! print_stmt: 'print' ( [ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ] )
del_stmt: 'del' exprlist
pass_stmt: 'pass'