Hi,

Rule templatisation might be a funky feature to be added, but it doesn't 
exist at present, AFAIK.

Sam

Martin Potier wrote:
> Hi all,
> 
> I've got something on my mind that the Definitive ANTLR Reference
> couldn't solve (yet, I'm not tottally through it).
> Is there a way with ANTLR v3 to automate some rule ?
> 
> Id est, while building a small wiki language I wrote this kind of rule :
> text
>     : (PURETEXT ( inlinenv | PURETEXT )*)
>     | (inlinenv (PURETEXT | inlinenv)*)
>     ;
> 
> In fact, I use the same sort of rule every time  I introduce text in a
> inlinenv.
> 
> I'd like to know if there's a way to create a generic rule like the
> following :
> generic altern ((ARG1, ARG2))
>     : (ARG1 (ARG2 | ARG1)*)
>     | (ARG2 (ARG1 | ARG2)*)
>     ;
> 
> And then reuse it, like an operator ?
> 
> 
> Cheers,
> Martin
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address


-- 
Sam Barnett-Cormack

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to