Hello,
I would like to know if I need to "check for null" for every
optional sub rule return value.
Like in the following example:
event
@init
{
StringTemplate ddd = new StringTemplate();
StringTemplate iii = new StringTemplate();
String ggg = new String();
}
: 'on' n=IDENT ('if' i=identifierList)? ('do' d=identifierList)? ('goto'
g=IDENT)?
{
if (d != null) ddd = $d.st;
if (i != null) iii = $i.st;
if (g != null) ggg = $g.text;
}
-> event(eventName={$n.text}, doList={ddd}, ifList={iii},
gotoSate={ggg})
;
Thank you,
Vincent
_________________________________________________________________
Avec Windows Live, vous gardez le contact avec tous vos amis au même endroit.
http://go.microsoft.com/?linkid=9660830
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address