[antlr-interest] Summing values from "+="
    Johannes Luber 
    JALuber at gmx.de
       
    Thu Feb 12 03:51:38 PST 2009
    
    
  
> I have a simple function to sum values, where expression is numbers with
> operands, etc.
> 
> sumStat    :    'SUM' '('  (e+=expression (',' e+=expression)+) ')' ->
> ^('SUM' $e);
> 
> What I need to know is how I write the action statements to add the
> various
> numbers? Just to complicate it I am doing it using Flex ActionScript? If I
> understand it correctly += returns a Java List, so what would be returned
> with ActionScript?
> 
> ^('SUM' e=expression) {$value =??????;}
I don't know ActionScript, but you could simply look at the generated code to discern the correct class.
Johannes
> 
> Thanks
> Des
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
    
    
More information about the antlr-interest
mailing list