[Python-checkins] CVS: python/dist/src/Grammar Grammar,1.40,1.41
Thomas Wouters
python-dev@python.org
Thu, 24 Aug 2000 13:11:37 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.26,2.27 classobject.h,2.31,2.32 graminit.h,2.15,2.16 object.h,2.63,2.64 opcode.h,2.29,2.30 token.h,2.15,2.16
- Next message: [Python-checkins] CVS: python/dist/src/Parser grammar.c,2.17,2.18 tokenizer.c,2.47,2.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Grammar
In directory slayer.i.sourceforge.net:/tmp/cvs-serv13530/Grammar
Modified Files:
Grammar
Log Message:
Support for three-token characters (**=, >>=, <<=) which was written by
Michael Hudson, and support in general for the augmented assignment syntax.
The graminit.c patch is large!
Index: Grammar
===================================================================
RCS file: /cvsroot/python/python/dist/src/Grammar/Grammar,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** Grammar 2000/08/23 15:45:28 1.40
--- Grammar 2000/08/24 20:11:30 1.41
***************
*** 38,44 ****
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
--- 38,45 ----
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 (augassign testlist | ('=' testlist)*)
! augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>>=' | '**='
! # For normal assignments, additional restrictions enforced by the interpreter
print_stmt: 'print' ( [ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ] )
del_stmt: 'del' exprlist
- Previous message: [Python-checkins] CVS: python/dist/src/Include abstract.h,2.26,2.27 classobject.h,2.31,2.32 graminit.h,2.15,2.16 object.h,2.63,2.64 opcode.h,2.29,2.30 token.h,2.15,2.16
- Next message: [Python-checkins] CVS: python/dist/src/Parser grammar.c,2.17,2.18 tokenizer.c,2.47,2.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]