> temp : (x=a)+ > //i want to create a list of integers here > // what should i do as statements here will be > // executed only when the entire rule is matched Embed the action in the "loop": temp { ArrayList ints = new ArrayList(); }: (x=a { ints.add(x); } )+ ; Regards, Martin