[antlr-interest] found more bugs in ANTLRv3.g + howto add separator when parallel iterating 2 lists in stringtemplate

Terence Parr parrt at cs.usfca.edu
Mon Jul 7 14:57:47 PDT 2008


On Jul 7, 2008, at 2:23 PM, Jens Boeykens wrote:
>>> block(blok, optionsSpec, alternative, rewrite, eob) ::= <<
>>> <alternative,rewrite: {alt,rw | <alt> <rw> | }>
>>> >>
>>>
>>> I have one '|' too many in my output:
>>> r: a -> int | b -> char |;
>>
>> Use <...; separator="|">
>
> Sorry I can't find the exact syntax to use here. Remember I need 2  
> lists here.
> <alternative,rewrite; separator=" | ">  and <alternative rewrite;  
> separator=" | "> give errors...

Oh, sorry.

>>> <alternative,rewrite: {alt,rw | <alt> <rw>}; separator="|">

Should work
Ter


More information about the antlr-interest mailing list