[antlr-interest] rule syntax for throws and returns together

Ric Klaren klaren at cs.utwente.nl
Tue Aug 31 06:22:37 PDT 2004


On Tue, Aug 31, 2004 at 02:56:32PM +0200, Lucio Biondi wrote:
> Can anyone explains to me how antlr needs to get them ?
> 
> I tried :
> 
> parse
>     throws MyException
>     returns [MyObject object]
>     : somethingToParse
>     ;

Try this:

parse
    returns [MyObject object]
    throws MyException
    : somethingToParse
    ;

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++-------
     Innovation makes enemies of all those who prospered under the old
   regime, and only lukewarm support is forthcoming from those who would
               prosper under the new. --- Niccolò Machiavelli



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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





More information about the antlr-interest mailing list