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

noreply@sourceforge.net noreply@sourceforge.net
Sat, 06 Jul 2002 10:33:24 -0700


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

Category: Parser/Compiler
Group: Not a Bug
>Status: Closed
>Resolution: Wont Fix
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


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

>Comment By: Jeremy Hylton (jhylton)
Date: 2002-07-06 17:33

Message:
Logged In: YES 
user_id=31392

We've got bigger fish to fry.


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

Comment By: Tim Peters (tim_one)
Date: 2002-06-13 13:35

Message:
Logged In: YES 
user_id=31435

Note that Python's parser tables are automatically generated 
from this file, so any change to the Grammar file generally 
requires altering Python compilers too.  Also changes to the 
Reference Manual and test suite.  That's a lot of work for 
something that doesn't matter <wink>.

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

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