From: <fwi...@us...> - 2008-08-27 20:51:23
|
Revision: 5261 http://jython.svn.sourceforge.net/jython/?rev=5261&view=rev Author: fwierzbicki Date: 2008-08-27 20:51:19 +0000 (Wed, 27 Aug 2008) Log Message: ----------- simplify testlist. Modified Paths: -------------- branches/nowalker/grammar/Python.g Modified: branches/nowalker/grammar/Python.g =================================================================== --- branches/nowalker/grammar/Python.g 2008-08-27 20:35:54 UTC (rev 5260) +++ branches/nowalker/grammar/Python.g 2008-08-27 20:51:19 UTC (rev 5261) @@ -1357,21 +1357,10 @@ //testlist: test (',' test)* [','] testlist[expr_contextType ctype] -@init { - exprType etype = null; -} -@after { - $testlist.tree = etype; -} : (test[null] COMMA) => t+=test[ctype] (options {k=2;}: COMMA t+=test[ctype])* (COMMA)? - { - etype = new Tuple($testlist.start, actions.makeExprs($t), ctype); - } + -> ^(COMMA<Tuple>[$testlist.start, actions.makeExprs($t), ctype]) | test[ctype] - { - etype = (exprType)$test.tree; - } ; //dictmaker: test ':' test (',' test ':' test)* [','] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |