From: <fwi...@us...> - 2009-01-11 22:36:08
|
Revision: 5921 http://jython.svn.sourceforge.net/jython/?rev=5921&view=rev Author: fwierzbicki Date: 2009-01-11 22:36:00 +0000 (Sun, 11 Jan 2009) Log Message: ----------- sham star_expr just to save the spot, causes an ambiguity with arglist so can't implement it just yet. Modified Paths: -------------- branches/jy3k/grammar/Python.g Modified: branches/jy3k/grammar/Python.g =================================================================== --- branches/jy3k/grammar/Python.g 2009-01-11 22:26:38 UTC (rev 5920) +++ branches/jy3k/grammar/Python.g 2009-01-11 22:36:00 UTC (rev 5921) @@ -1043,7 +1043,7 @@ | comparison[ctype] ; -//comparison: expr (comp_op expr)* +//comparison: star_expr (comp_op star_expr)* comparison[expr_contextType ctype] @init { List cmps = new ArrayList(); @@ -1054,8 +1054,8 @@ actions.castExprs($right)); } } - : left=expr[ctype] - ( ( comp_op right+=expr[ctype] {cmps.add($comp_op.op);} + : left=star_expr[ctype] + ( ( comp_op right+=star_expr[ctype] {cmps.add($comp_op.op);} )+ | -> $left @@ -1076,6 +1076,10 @@ | IS NOT {$op = cmpopType.IsNot;} ; +//star_expr: ['*'] expr +star_expr[expr_contextType ect] + : expr[ect] + ; //expr: xor_expr ('|' xor_expr)* expr[expr_contextType ect] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |