On Sat, Mar 13, 2010 at 10:28 AM, Bart Kiers <[email protected]> wrote:
> 2010/3/12 Marcin Rzeźnicki <[email protected]> > > > Hi > > I've got an awkward question. How can I return an array from rule? > > "rule_name returns [Object[] sth] " obviously does not work because > syntax > > checker thinks that closing bracket of Object[] closes returns. I could > not > > find anywhere how to escape it. Thx for any help.< > http://www.antlr.org/mailman/options/antlr-interest/your-email-address> > > > > This message from 2007 indicates it is not possible to have nested brackets > inside "rule return statements": > http://www.antlr.org/pipermail/antlr-interest/2007-March/019712.html > and AFAIK, this still is not possible. > > > Thanks, but this message seems to be outdated. I tried: returns[Object[\] blah] and it seemed to be working (I am not 100% sure 'cause I got error from somewhere else in my grammar and didn't have time to check it out) -- Greetings Marcin Rzeźnicki List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
