[antlr-interest] how to specify cardinality in templates

Terence Parr parrt at cs.usfca.edu
Sat Aug 22 10:36:45 PDT 2009


something i'm thinking about for next ST version.
Ter
On Aug 22, 2009, at 9:55 AM, Marwan Ajraoui wrote:

> Hi comunity;
>
> Would like to know how do u specify in a template the possible
> repetition of some part of it.
>
> for example in that the instelseif and cond_elseif could apper 0..n  
> times:
>
> instif(cond,instif,instelseif,cond_elseif,instesle) ::= <<
> if(<cond>){
> <instif>
> }
> else if(<cond>){
> <instelseif>
> }
> else{
> <instelse>
> }>>
>
>
> Many thx
>
> -- 
> Marouane
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list