diff options
author | Guido van Rossum <guido@python.org> | 1996-07-30 16:43:44 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-07-30 16:43:44 (GMT) |
commit | 14f44516a4ae60dd0e83a3ad27729af337fb725c (patch) | |
tree | c29e7b22cc99b7c3ac2e5acb5f5cdf1080c1ab38 /Grammar | |
parent | e15d0dea071d37b44ac3ba55a5cc31af315e7ef4 (diff) | |
download | cpython-14f44516a4ae60dd0e83a3ad27729af337fb725c.zip cpython-14f44516a4ae60dd0e83a3ad27729af337fb725c.tar.gz cpython-14f44516a4ae60dd0e83a3ad27729af337fb725c.tar.bz2 |
Changes for stride in slices (x[a:b:c]) and ellipses (x[a,...,z])
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/Grammar | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index 3d957a7..faca858 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -74,8 +74,10 @@ factor: ('+'|'-'|'~') factor | power power: atom trailer* ('**' factor)* atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING+ lambdef: 'lambda' [varargslist] ':' test -trailer: '(' [arglist] ')' | '[' subscript ']' | '.' NAME -subscript: test (',' test)* [','] | [test] ':' [test] +trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME +subscriptlist: subscript (',' subscript)* [','] +subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop] +sliceop: ':' [test] exprlist: expr (',' expr)* [','] testlist: test (',' test)* [','] dictmaker: test ':' test (',' test ':' test)* [','] |