[antlr-interest] Matching lists of items
Johannes Luber
jaluber at gmx.de
Mon Feb 11 03:21:26 PST 2008
Jamie Penney schrieb:
> Hi All,
> If I have a list of expressions that are separated by a separator
> character (say ','), is there a concise way of matching this? So far I
> am using the following:
>
> expression (',' expression)*
>
> but it seems quite verbose. Is there a shortcut for this? It gets quite
> cumbersome once the expression part gets large.
You could create an extra rule for expression, but I don't know if one
can really write it shorter except via creating a special syntax.
Johannes
More information about the antlr-interest
mailing list