From: <fwi...@us...> - 2008-08-11 19:25:58
|
Revision: 5152 http://jython.svn.sourceforge.net/jython/?rev=5152&view=rev Author: fwierzbicki Date: 2008-08-11 19:25:46 +0000 (Mon, 11 Aug 2008) Log Message: ----------- Tightened up eval and uncommented tests in test_jy_compile. Modified Paths: -------------- branches/asm/Lib/test/test_jy_compile.py branches/asm/grammar/Python.g branches/asm/grammar/PythonPartial.g Modified: branches/asm/Lib/test/test_jy_compile.py =================================================================== --- branches/asm/Lib/test/test_jy_compile.py 2008-08-11 18:31:41 UTC (rev 5151) +++ branches/asm/Lib/test/test_jy_compile.py 2008-08-11 19:25:46 UTC (rev 5152) @@ -148,13 +148,10 @@ ai("a = 'a\\ ") ai("a = 'a\\\n") - #XXX: eval is hopelessly permissive right now -- but the rest of this - # test_jy_compile is really important to me for flagging new bugs - - # so commenting out some of these for now. - ###ai("a = 1","eval") - ###ai("a = (","eval") + ai("a = 1","eval") + ai("a = (","eval") ai("]","eval") - ###ai("())","eval") + ai("())","eval") ai("[}","eval") ai("9+","eval") ai("lambda z:","eval") Modified: branches/asm/grammar/Python.g =================================================================== --- branches/asm/grammar/Python.g 2008-08-11 18:31:41 UTC (rev 5151) +++ branches/asm/grammar/Python.g 2008-08-11 19:25:46 UTC (rev 5152) @@ -298,7 +298,7 @@ ; //eval_input: testlist NEWLINE* ENDMARKER -eval_input : LEADING_WS? (NEWLINE)* testlist[expr_contextType.Load] (NEWLINE)* -> ^(Expression testlist) +eval_input : LEADING_WS? (NEWLINE)* testlist[expr_contextType.Load] (NEWLINE)* EOF -> ^(Expression testlist) ; //not in CPython's Grammar file Modified: branches/asm/grammar/PythonPartial.g =================================================================== --- branches/asm/grammar/PythonPartial.g 2008-08-11 18:31:41 UTC (rev 5151) +++ branches/asm/grammar/PythonPartial.g 2008-08-11 19:25:46 UTC (rev 5152) @@ -193,7 +193,7 @@ ; //eval_input: testlist NEWLINE* ENDMARKER -eval_input : (NEWLINE)* testlist? (NEWLINE)* +eval_input : LEADING_WS? (NEWLINE)* testlist? (NEWLINE)* ENDMARKER ; decorators: decorator+ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |