Another detail for rule rewrite_tree_atom that I am not sure if it is correct:<br><br>In ANTLRv3.g : ^(TOKEN_REF ARG_ACTION?)<br>In ANTLRv3Tree.g: ^(TOKEN_REF ARG_ACTION)<br><br>The question mark dissapeared. I added it in my code, but not sure if it is necessary...<br>
<br>Another thing I did not understand very well (probably my own fault ;) ) :<br>There is a rule called "rewrite_template_block" which is defined, but no other rule seems to be using it. Does this make the rule obsolete? I noticed this because I have not yet encountered a testcase where the rule was used, so I am not sure wether I should write more tests or the rule is indeed obsolete.<br>
<br>Kind regards<br><br><div class="gmail_quote">2008/7/8 Jens Boeykens <<a href="mailto:jens.boeykens@gmail.com">jens.boeykens@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks it worked!!<br><br>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<br><br>// this is my comment<eof><br><br>thus no '\n' at the end but directly end of file, the parser will complain it is looking for a '\n'.<br>
<br>Jens<br><br><div class="gmail_quote">2008/7/7 Terence Parr <<a href="mailto:parrt@cs.usfca.edu" target="_blank">parrt@cs.usfca.edu</a>>:<div><div></div><div class="Wj3C7c"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br>
On Jul 7, 2008, at 2:23 PM, Jens Boeykens wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
block(blok, optionsSpec, alternative, rewrite, eob) ::= <<<br>
<alternative,rewrite: {alt,rw | <alt> <rw> | }><br>
>><br>
<br>
I have one '|' too many in my output:<br>
r: a -> int | b -> char |;<br>
</blockquote>
<br>
Use <...; separator="|"><br>
</blockquote>
<br>
Sorry I can't find the exact syntax to use here. Remember I need 2 lists here.<br>
<alternative,rewrite; separator=" | "> and <alternative rewrite; separator=" | "> give errors...<br>
</blockquote>
<br></div>
Oh, sorry.<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<alternative,rewrite: {alt,rw | <alt> <rw>}; separator="|"><br>
</blockquote></blockquote></blockquote>
<br>
Should work<br>
Ter<br>
</blockquote></div></div></div><br>
</blockquote></div><br>