Thanks John for a prompt reply. Appreciate your response but your example
was bit hard for me to understand though 'Putting it in the Loop' made
sense.
So this is what I did... now I can sleep like a baby :)
parse
: ('Basket' basket)*
;
basket
@init {
Basket basket;
String state= "";
String employee= "";
String phone= "";
String zip= "";
}
@after {
basket= new Basket(state, employee);
basket.setPhone(phone);
this.somelist.addBakets(basket);
print(basket.toString());
//start again
//parse(); --------? Is this right approach /// Not a right approach
}
: ('state' st=TOKEN { state= $st.text; }
| 'employee' et=TOKEN { employee= $et.text; }
| 'phone' pt=TOKEN { phone= $pt.text; }
| 'zip')* //For looop
;
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.