This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: minor improvement to Grammar file
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: emacsman, jhylton, tim.peters
Priority: normal Keywords:

Created on 2002-06-13 08:15 by emacsman, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg11193 - (view) Author: Richard Y. Kim (emacsman) Date: 2002-06-13 08:15
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
msg11194 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-06-13 13:35
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>.
msg11195 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-07-06 17:33
Logged In: YES 
user_id=31392

We've got bigger fish to fry.
History
Date User Action Args
2022-04-10 16:05:25adminsetgithub: 36745
2002-06-13 08:15:43emacsmancreate