[antlr-interest] creating list in verilog

Martin Probst mail at martin-probst.com
Fri Apr 15 08:29:01 PDT 2005


> 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



More information about the antlr-interest mailing list