summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-12 22:00:53 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-12 22:00:53 (GMT)
commit0dfcf753ad75892c0ad2a68713841402183514d4 (patch)
treeae704c4e11a11f44c5efd229d78c6558d3b0b78a /Grammar
parentaacdc9da75e31a48a90a8354f5ea29af4267a178 (diff)
downloadcpython-0dfcf753ad75892c0ad2a68713841402183514d4.zip
cpython-0dfcf753ad75892c0ad2a68713841402183514d4.tar.gz
cpython-0dfcf753ad75892c0ad2a68713841402183514d4.tar.bz2
Disable support for access statement
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar11
1 files changed, 6 insertions, 5 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index faca858..78ffd6f 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -29,7 +29,8 @@ 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 | access_stmt | exec_stmt
+small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt
expr_stmt: testlist ('=' testlist)*
# For assignments, additional restrictions enforced by the interpreter
print_stmt: 'print' (test ',')* [test]
@@ -43,10 +44,10 @@ raise_stmt: 'raise' test [',' test [',' test]]
import_stmt: 'import' dotted_name (',' dotted_name)* | 'from' dotted_name 'import' ('*' | NAME (',' NAME)*)
dotted_name: NAME ('.' NAME)*
global_stmt: 'global' NAME (',' NAME)*
-access_stmt: 'access' ('*' | NAME (',' NAME)*) ':' accesstype (',' accesstype)*
-accesstype: NAME+
-# accesstype should be ('public' | 'protected' | 'private') ['read'] ['write']
-# but can't be because that would create undesirable reserved words!
+#access_stmt: 'access' ('*' | NAME (',' NAME)*) ':' accesstype (',' accesstype)*
+#accesstype: 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]]
compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef