From: <fwi...@us...> - 2009-01-07 01:21:12
|
Revision: 5860 http://jython.svn.sourceforge.net/jython/?rev=5860&view=rev Author: fwierzbicki Date: 2009-01-07 01:21:04 +0000 (Wed, 07 Jan 2009) Log Message: ----------- with is a keyword now. Modified Paths: -------------- branches/jy3k/grammar/Python.g branches/jy3k/src/org/python/compiler/CodeCompiler.java Modified: branches/jy3k/grammar/Python.g =================================================================== --- branches/jy3k/grammar/Python.g 2009-01-06 21:58:40 UTC (rev 5859) +++ branches/jy3k/grammar/Python.g 2009-01-07 01:21:04 UTC (rev 5860) @@ -444,10 +444,10 @@ } ; -//parameters: '(' [varargslist] ')' +//parameters: '(' [typedargslist] ')' parameters returns [arguments args] : LPAREN - (varargslist {$args = $varargslist.args;} + (typedargslist {$args = $typedargslist.args;} | { $args = new arguments($parameters.start, new ArrayList<arg>(), null, null, new ArrayList<arg>(), null, null, new ArrayList<expr>(), new ArrayList<expr>()); } ) @@ -578,7 +578,7 @@ ; //small_stmt: (expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | -// import_stmt | global_stmt | exec_stmt | assert_stmt) +// import_stmt | global_stmt | assert_stmt) small_stmt : expr_stmt | del_stmt | pass_stmt @@ -1571,7 +1571,6 @@ DELETE : 'del' ; ELIF : 'elif' ; EXCEPT : 'except' ; -EXEC : 'exec' ; FINALLY : 'finally' ; FROM : 'from' ; FOR : 'for' ; Modified: branches/jy3k/src/org/python/compiler/CodeCompiler.java =================================================================== --- branches/jy3k/src/org/python/compiler/CodeCompiler.java 2009-01-06 21:58:40 UTC (rev 5859) +++ branches/jy3k/src/org/python/compiler/CodeCompiler.java 2009-01-07 01:21:04 UTC (rev 5860) @@ -2151,10 +2151,6 @@ @Override public Object visitWith(With node) throws Exception { - if (!module.getFutures().withStatementSupported()) { - throw new ParseException("'with' will become a reserved keyword in Python 2.6", node); - } - final Label label_body_start = new Label(); final Label label_body_end = new Label(); final Label label_catch = new Label(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |