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

Jens Boeykens jens.boeykens at gmail.com
Tue Jul 8 01:32:55 PDT 2008


Thanks it worked!!

I've encounterd another issue with ANTLRv3.g but it's not a very important
one. When you end your grammar with a single line comment like

// this is my comment<eof>

thus no '\n' at the end but directly end of file, the parser will complain
it is looking for a '\n'.

Jens

2008/7/7 Terence Parr <parrt at cs.usfca.edu>:

>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080708/f3390887/attachment.html 


More information about the antlr-interest mailing list