[Python-bugs-list] [ python-Bugs-568412 ] minor improvement to Grammar file

noreply@sourceforge.net noreply@sourceforge.net
Thu, 13 Jun 2002 01:15:43 -0700


Bugs item #568412, was opened at 2002-06-13 01:15
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=568412&group_id=5470

Category: Parser/Compiler
Group: Not a Bug
Status: Open
Resolution: None
Priority: 5
Submitted By: Richard Y. Kim (emacsman)
Assigned to: Nobody/Anonymous (nobody)
Summary: minor improvement to Grammar file

Initial Comment:
The 'print_stmt' non-terminal duplicates the rule for
'testlist'
non-terminal. The diff shown below replaces the
duplicate rule with
'testlist'.

$ diff -c Grammar-orig Grammar
*** Grammar-orig	Thu Jun 13 00:53:53 2002
--- Grammar	Thu Jun 13 00:54:16 2002
***************
*** 40,46 ****
  expr_stmt: testlist (augassign testlist | ('='
testlist)*)
  augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' |
'|=' | '^=' | '<<=' | '>>=' | '**=' | '//='
  # For normal assignments, additional restrictions
enforced by the interpreter
! print_stmt: 'print' ( [ test (',' test)* [','] ] |
'>>' test [ (',' test)+ [','] ] )
  del_stmt: 'del' exprlist
  pass_stmt: 'pass'
  flow_stmt: break_stmt | continue_stmt | return_stmt |
raise_stmt | yield_stmt
--- 40,46 ----
  expr_stmt: testlist (augassign testlist | ('='
testlist)*)
  augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' |
'|=' | '^=' | '<<=' | '>>=' | '**=' | '//='
  # For normal assignments, additional restrictions
enforced by the interpreter
! print_stmt: 'print' ( [testlist] | '>>' test [ (','
test)+ [','] ] )
  del_stmt: 'del' exprlist
  pass_stmt: 'pass'
  flow_stmt: break_stmt | continue_stmt | return_stmt |
raise_stmt | yield_stmt


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=568412&group_id=5470