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
|