diff options
author | Guido van Rossum <guido@python.org> | 1997-04-02 05:22:18 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-02 05:22:18 (GMT) |
commit | 556440d278fa1f864edabfb77a89e4a3b7a6b27f (patch) | |
tree | 9f94d308cc7186b759ff3892b4775ff34a325fbb /Grammar | |
parent | 659a3b58817960e28daa60e9e09c09aaab3a83c6 (diff) | |
download | cpython-556440d278fa1f864edabfb77a89e4a3b7a6b27f.zip cpython-556440d278fa1f864edabfb77a89e4a3b7a6b27f.tar.gz cpython-556440d278fa1f864edabfb77a89e4a3b7a6b27f.tar.bz2 |
Added __assert__ statement (later to be renamed)
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/Grammar | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index 78ffd6f..cfaee6d 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -30,7 +30,7 @@ fplist: fpdef (',' fpdef)* [','] stmt: simple_stmt | compound_stmt 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 +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] @@ -49,6 +49,7 @@ global_stmt: 'global' NAME (',' NAME)* ## accesstype should be ('public' | 'protected' | 'private') ['read'] ['write'] ## but can't be because that would create undesirable reserved words! exec_stmt: 'exec' expr ['in' test [',' test]] +assert_stmt: '__assert__' test [',' test] compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite] |