From: <fwi...@us...> - 2008-08-27 19:51:19
|
Revision: 5258 http://jython.svn.sourceforge.net/jython/?rev=5258&view=rev Author: fwierzbicki Date: 2008-08-27 19:51:16 +0000 (Wed, 27 Aug 2008) Log Message: ----------- for not_test, replacing manual tree construction with ->. Modified Paths: -------------- branches/nowalker/grammar/Python.g Modified: branches/nowalker/grammar/Python.g =================================================================== --- branches/nowalker/grammar/Python.g 2008-08-27 16:07:35 UTC (rev 5257) +++ branches/nowalker/grammar/Python.g 2008-08-27 19:51:16 UTC (rev 5258) @@ -941,16 +941,9 @@ ; //not_test: 'not' not_test | comparison -not_test[expr_contextType ctype] returns [exprType etype] -@after { - if ($etype != null) { - $not_test.tree = $etype; - } -} +not_test[expr_contextType ctype] : NOT nt=not_test[ctype] - { - $etype = new UnaryOp($NOT, unaryopType.Not, (exprType)$nt.tree); - } + -> ^(NOT<UnaryOp>[$NOT, unaryopType.Not, (exprType)$nt.tree]) | comparison[ctype] ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |