[antlr-interest] Unanswered FAQ question: how to handle multiple return values?

Ric Klaren klaren at cs.utwente.nl
Wed May 15 04:35:20 PDT 2002

On Wed, May 15, 2002 at 12:40:50AM -0000, jsrs701 wrote:
> There's a FAQ question that I suddenly am very interested in.  :)
> http://www.jguru.com/forums/view.jsp?EID=305752

For some vague reason jguru doesn't show a reply button :P

> "ANTLR allows to specify multiple return values for a rule. What is 
> the syntax to get those from a subrule? In PCCTS rule specifikation 
> and usage looked the same: rule > [ret1,ret2] How do I express this 
> with ANTLR 2.*?"
> Anybody know how to handle this?  Besides you, Ter?  I would hope you 
> already know the answer to this.  :)

Think this is a documentation bug. Not 100% sure though, I really cannot
recall anything in the codegenerators that would support this.

In C++ I'd use a 'tuple' class like provided by the boost library


    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
 Time what is time - I wish I knew how to tell You why - It hurts to know -
          Aren't we machines - Time what is time - Unlock the door
               - And see the truth - Then time is time again
                From: 'Time what is Time' by Blind Guardian


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list