Terence Parr | 1 Jun 2010 21:11
Gravatar

3.2.1 release?

Hi Guys, i have lots of little bug fixes to go out. anybody up for 3.2.1 release of ANTLR?
Ter
Jim Idle | 1 Jun 2010 21:36

Re: 3.2.1 release?

Yes. We need to do this. I want to catch up the C runtime for this  
release too.

Jim

On Jun 1, 2010, at 12:11, Terence Parr <parrt@...> wrote:

> Hi Guys, i have lots of little bug fixes to go out. anybody up for  
> 3.2.1 release of ANTLR?
> Ter
> _______________________________________________
> antlr-dev mailing list
> antlr-dev@...
> http://www.antlr.org/mailman/listinfo/antlr-dev
Terence Parr | 2 Jun 2010 03:04
Gravatar

Re: 3.2.1 release?

what's your timeframe, bro?
T
On Jun 1, 2010, at 12:36 PM, Jim Idle wrote:

> Yes. We need to do this. I want to catch up the C runtime for this  
> release too.
>
> Jim
>
> On Jun 1, 2010, at 12:11, Terence Parr <parrt@...> wrote:
>
>> Hi Guys, i have lots of little bug fixes to go out. anybody up for  
>> 3.2.1 release of ANTLR?
>> Ter
>> _______________________________________________
>> antlr-dev mailing list
>> antlr-dev@...
>> http://www.antlr.org/mailman/listinfo/antlr-dev

Ben McCann | 9 Jun 2010 06:52
Picon
Favicon

Non-deterministic output

<div></div>
Terence Parr | 9 Jun 2010 19:03
Gravatar

Re: Non-deterministic output

wow. that's weird.  surely the grammar changes between runs?  Computers are usually good about determinism ;)
What version of antlr?
Ter
On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:

Hi,
It appears that ANTLR is generating varying output between runs.  This causes problems for us when trying to diff to see if anything has changed.  Could someone file a bug for this?  I was not able to register for the JIRA.

Thanks,
Ben McCann
Software Engineer
Google Inc.


$diff ~/PathParser.java.1 ~/PathParser.java.2
560c560
<                     // elements: Variable, expr
---
>                     // elements: expr, Variable

_______________________________________________
antlr-dev mailing list
antlr-dev-ErkRXerACLvYtjvyW6yDsg@public.gmane.org
http://www.antlr.org/mailman/listinfo/antlr-dev

<div>wow. that's weird. &nbsp;surely the grammar changes between runs? &nbsp;Computers are usually good about determinism ;)<div>What version of antlr?</div>
<div>Ter<br><div>
<div>On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:</div>
<br class="Apple-interchange-newline"><blockquote type="cite">
<span class="Apple-style-span">Hi,<div>It appears that ANTLR is generating varying output between runs. &nbsp;This causes problems for us when trying to diff to see if anything has changed. &nbsp;Could someone file a bug for this? &nbsp;I was not able to register for the JIRA.<br><div><br></div>
<div>Thanks,</div>
<div>Ben McCann</div>
<div>Software Engineer</div>
<div>Google Inc.</div>
<div><br></div>
<div><br></div>
<div><span><div> $diff ~/PathParser.java.1 ~/PathParser.java.2</div>
<div>560c560</div>
<div>&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: Variable, expr</div> <div>---</div>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: expr, Variable</div>
<div><br></div> </span></div>
</div></span> _______________________________________________<br>antlr-dev mailing list<br><a href="mailto:antlr-dev@...">antlr-dev@...</a><br>http://www.antlr.org/mailman/listinfo/antlr-dev<br>
</blockquote>
</div>
<br>
</div>
</div>
Ben McCann | 9 Jun 2010 19:15
Picon
Favicon

Re: Non-deterministic output

We're using 3.2.  The only thing I've noticed changing between runs thus far is the code comments.  I should also mention the input is not changing at all.  I'm guessing it's something along the lines of using an Iterator from a Set instead of List so that there's no ordering guarantee.

Thanks,
Ben


On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr <parrt-XeM6X/PiNgr2fBVCVOL8/A@public.gmane.org> wrote:
wow. that's weird.  surely the grammar changes between runs?  Computers are usually good about determinism ;)
What version of antlr?
Ter
On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:

Hi,
It appears that ANTLR is generating varying output between runs.  This causes problems for us when trying to diff to see if anything has changed.  Could someone file a bug for this?  I was not able to register for the JIRA.

Thanks,
Ben McCann
Software Engineer
Google Inc.


$diff ~/PathParser.java.1 ~/PathParser.java.2
560c560
<                     // elements: Variable, expr
---
>                     // elements: expr, Variable

_______________________________________________
antlr-dev mailing list
antlr-dev-ErkRXerACLvYtjvyW6yDsg@public.gmane.org
http://www.antlr.org/mailman/listinfo/antlr-dev


<div>
<p>We're using 3.2.&nbsp; The only thing I've noticed changing between runs thus far is the code comments.&nbsp; I should also mention the input is not changing at all.&nbsp; I'm guessing it's something along the lines of using an Iterator from a Set instead of List so that there's no ordering guarantee.<br><br>Thanks,<br>Ben<br><br><br></p>
<div class="gmail_quote">On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr <span dir="ltr">&lt;<a href="mailto:parrt <at> cs.usfca.edu">parrt@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div>wow. that's weird. &nbsp;surely the grammar changes between runs? &nbsp;Computers are usually good about determinism ;)<div>What version of antlr?</div>
<div>Ter<br><div>
<div>
<div></div>
<div class="h5">
<div>On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:</div>
<br>
</div>
</div>
<blockquote type="cite">
<div>
<div></div>
<div class="h5"><span>Hi,<div>
It appears that ANTLR is generating varying output between runs. &nbsp;This causes problems for us when trying to diff to see if anything has changed. &nbsp;Could someone file a bug for this? &nbsp;I was not able to register for the JIRA.<br><div><br></div>
<div>Thanks,</div>
<div>Ben McCann</div>
<div>Software Engineer</div>
<div>Google Inc.</div>
<div><br></div>
<div><br></div>
<div><span><div>
 $diff ~/PathParser.java.1 ~/PathParser.java.2</div>
<div>560c560</div>
<div>&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: Variable, expr</div>
 <div>---</div>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: expr, Variable</div>
<div><br></div>
 </span></div>
</div></span></div>
</div>
<div class="im"> _______________________________________________<br>antlr-dev mailing list<br><a href="mailto:antlr-dev@..." target="_blank">antlr-dev@...</a><br><a href="http://www.antlr.org/mailman/listinfo/antlr-dev" target="_blank">http://www.antlr.org/mailman/listinfo/antlr-dev</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
Jim Idle | 9 Jun 2010 19:18

Re: Non-deterministic output

I think that we need to see the diff but is not just that there is a time stamp? Just alter the template not to include transient data and I should think it is fine. However, I am having a hard time seeing why caching the generated code would help anything. I am sure there is a good reason, but perhaps we can help better if we know what the rationale is?

 

Jim

 

From: antlr-dev-bounces-ErkRXerACLvYtjvyW6yDsg@public.gmane.org [mailto:antlr-dev-bounces-ErkRXerACLvYtjvyW6yDsg@public.gmane.org] On Behalf Of Terence Parr
Sent: Wednesday, June 09, 2010 10:04 AM
To: Ben McCann
Cc: antlr-dev-ErkRXerACLvYtjvyW6yDsg@public.gmane.org
Subject: Re: [antlr-dev] Non-deterministic output

 

wow. that's weird.  surely the grammar changes between runs?  Computers are usually good about determinism ;)

What version of antlr?

Ter

On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:



Hi,

It appears that ANTLR is generating varying output between runs.  This causes problems for us when trying to diff to see if anything has changed.  Could someone file a bug for this?  I was not able to register for the JIRA.

 

Thanks,

Ben McCann

Software Engineer

Google Inc.

 

 

$diff ~/PathParser.java.1 ~/PathParser.java.2

560c560

<                     // elements: Variable, expr

---

>                     // elements: expr, Variable

 

_______________________________________________
antlr-dev mailing list
antlr-dev-ErkRXerACLvYtjvyW6yDsg@public.gmane.org
http://www.antlr.org/mailman/listinfo/antlr-dev

 

<div>

<div class="WordSection1">

<p class="MsoNormal"><span>I think that we need to see the diff but is not just that there
is a time stamp? Just alter the template not to include transient data and I should
think it is fine. However, I am having a hard time seeing why caching the
generated code would help anything. I am sure there is a good reason, but perhaps
we can help better if we know what the rationale is?<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Jim<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<div>

<div>

<div>

<p class="MsoNormal"><span>From:</span><span> antlr-dev-bounces@...
[mailto:antlr-dev-bounces@...] On Behalf Of Terence Parr<br>Sent: Wednesday, June 09, 2010 10:04 AM<br>To: Ben McCann<br>Cc: antlr-dev@...<br>Subject: Re: [antlr-dev] Non-deterministic output<p></p></span></p>

</div>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">wow. that's weird. &nbsp;surely the grammar changes between
runs? &nbsp;Computers are usually good about determinism ;)<p></p></p>

<div>

<p class="MsoNormal">What version of antlr?<p></p></p>

</div>

<div>

<p class="MsoNormal">Ter<p></p></p>

<div>

<div>

<p class="MsoNormal">On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:<p></p></p>

</div>

<p class="MsoNormal"><br><br><p></p></p>

<p class="MsoNormal"><span class="apple-style-span"><span>Hi,</span></span><span class="apple-style-span"><span><p></p></span></span></p>

<div>

<p class="MsoNormal"><span>It appears that ANTLR is generating
varying output between runs. &nbsp;This causes problems for us when trying to
diff to see if anything has changed. &nbsp;Could someone file a bug for this?
&nbsp;I was not able to register for the JIRA.</span><p></p></p>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Thanks,<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Ben McCann<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Software Engineer<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Google Inc.<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

<div>

<div>

<p class="MsoNormal"><span>$diff ~/PathParser.java.1
~/PathParser.java.2</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>560c560</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: Variable, expr</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>---</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: expr, Variable</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

</div>

</div>

<p class="MsoNormal">_______________________________________________<br>
antlr-dev mailing list<br><a href="mailto:antlr-dev@...">antlr-dev@...</a><br>
http://www.antlr.org/mailman/listinfo/antlr-dev<p></p></p>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>

</div>

</div>
Terence Parr | 9 Jun 2010 19:21
Gravatar

Re: Non-deterministic output

yeah, there are Sets in there. i wonder why (how?) java alters the order for same computation across runs.  Come to think of it, i'm chasing something similar in ANTLR v4 unit tests.  I thought it was static data somewhere but could be some weird Set thing.

damn java. grr.... not sure how easily i can help you here...

Ter
On Jun 9, 2010, at 10:15 AM, Ben McCann wrote:

We're using 3.2.  The only thing I've noticed changing between runs thus far is the code comments.  I should also mention the input is not changing at all.  I'm guessing it's something along the lines of using an Iterator from a Set instead of List so that there's no ordering guarantee.

Thanks,
Ben


On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr <parrt-XeM6X/PiNgr2fBVCVOL8/A@public.gmane.org> wrote:
wow. that's weird.  surely the grammar changes between runs?  Computers are usually good about determinism ;)
What version of antlr?
Ter
On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:

Hi,
It appears that ANTLR is generating varying output between runs.  This causes problems for us when trying to diff to see if anything has changed.  Could someone file a bug for this?  I was not able to register for the JIRA.

Thanks,
Ben McCann
Software Engineer
Google Inc.


$diff ~/PathParser.java.1 ~/PathParser.java.2
560c560
<                     // elements: Variable, expr
---
>                     // elements: expr, Variable

_______________________________________________
antlr-dev mailing list
antlr-dev-ErkRXerACLvYtjvyW6yDsg@public.gmane.org
http://www.antlr.org/mailman/listinfo/antlr-dev



<div>yeah, there are Sets in there. i wonder why (how?) java alters the order for same computation across runs. &nbsp;Come to think of it, i'm chasing something similar in ANTLR v4 unit tests. &nbsp;I thought it was static data somewhere but could be some weird Set thing.<div><br></div>
<div>damn java. grr.... not sure how easily i can help you here...</div>
<div><br></div>
<div>Ter<br><div>
<div>On Jun 9, 2010, at 10:15 AM, Ben McCann wrote:</div>
<br class="Apple-interchange-newline"><blockquote type="cite">We're using 3.2.&nbsp; The only thing I've noticed changing between runs thus far is the code comments.&nbsp; I should also mention the input is not changing at all.&nbsp; I'm guessing it's something along the lines of using an Iterator from a Set instead of List so that there's no ordering guarantee.<br><br>Thanks,<br>Ben<br><br><br><div class="gmail_quote">On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr <span dir="ltr">&lt;<a href="mailto:parrt@...">parrt@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote"> <div>wow. that's weird. &nbsp;surely the grammar changes between runs? &nbsp;Computers are usually good about determinism ;)<div>What version of antlr?</div>
<div>Ter<br><div>
<div>
<div></div>
<div class="h5"> <div>On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:</div>
<br>
</div>
</div>
<blockquote type="cite">
<div>
<div></div>
<div class="h5"><span>Hi,<div> It appears that ANTLR is generating varying output between runs. &nbsp;This causes problems for us when trying to diff to see if anything has changed. &nbsp;Could someone file a bug for this? &nbsp;I was not able to register for the JIRA.<br><div><br></div>
<div>Thanks,</div>
<div>Ben McCann</div>
<div>Software Engineer</div>
<div>Google Inc.</div>
<div><br></div>
<div><br></div>
<div><span><div> $diff ~/PathParser.java.1 ~/PathParser.java.2</div>
<div>560c560</div>
<div>&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: Variable, expr</div> <div>---</div>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: expr, Variable</div>
<div><br></div> </span></div>
</div></span></div>
</div>
<div class="im"> _______________________________________________<br>antlr-dev mailing list<br><a href="mailto:antlr-dev@..." target="_blank">antlr-dev@...</a><br><a href="http://www.antlr.org/mailman/listinfo/antlr-dev" target="_blank">http://www.antlr.org/mailman/listinfo/antlr-dev</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
</div>
</div>
Ben McCann | 9 Jun 2010 19:34
Picon
Favicon

Re: Non-deterministic output

I'm not sure what you're referring to when you say timestamps.  The issue is that the code comments keep changing.  Would it be possible to just use a List instead of a Set?  That should solve the issue.

Thanks,
Ben


$ diff {/tmp/tmpaX6PX1,/tmp/tmp2-04O_}/JsonTemplateParser.java
307c307
<             // elements: value, DOC_COMMENT, startCommand
---
>             // elements: startCommand, value, DOC_COMMENT
521c521
<             // elements: DOC_COMMENT, entry, startCommand
---
>             // elements: startCommand, entry, DOC_COMMENT
1031c1031
<             // elements: DOC_COMMENT, entry
---
>             // elements: entry, DOC_COMMENT
1161c1161
<                     // elements: DOC_COMMENT, key, value
---
>                     // elements: key, value, DOC_COMMENT
1365c1365
<             // elements: value, DOC_COMMENT
---
>             // elements: DOC_COMMENT, value




On Wed, Jun 9, 2010 at 10:21 AM, Terence Parr <parrt-XeM6X/PiNgr2fBVCVOL8/A@public.gmane.org> wrote:
yeah, there are Sets in there. i wonder why (how?) java alters the order for same computation across runs.  Come to think of it, i'm chasing something similar in ANTLR v4 unit tests.  I thought it was static data somewhere but could be some weird Set thing.

damn java. grr.... not sure how easily i can help you here...

Ter

On Jun 9, 2010, at 10:15 AM, Ben McCann wrote:

We're using 3.2.  The only thing I've noticed changing between runs thus far is the code comments.  I should also mention the input is not changing at all.  I'm guessing it's something along the lines of using an Iterator from a Set instead of List so that there's no ordering guarantee.

Thanks,
Ben


On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr <parrt-XeM6X/PiNgr2fBVCVOL8/A@public.gmane.org> wrote:
wow. that's weird.  surely the grammar changes between runs?  Computers are usually good about determinism ;)
What version of antlr?
Ter
On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:

Hi,
It appears that ANTLR is generating varying output between runs.  This causes problems for us when trying to diff to see if anything has changed.  Could someone file a bug for this?  I was not able to register for the JIRA.

Thanks,
Ben McCann
Software Engineer
Google Inc.


$diff ~/PathParser.java.1 ~/PathParser.java.2
560c560
<                     // elements: Variable, expr
---
>                     // elements: expr, Variable

_______________________________________________
antlr-dev mailing list
antlr-dev-ErkRXerACLvYtjvyW6yDsg@public.gmane.org
http://www.antlr.org/mailman/listinfo/antlr-dev




<div>
<p>I'm not sure what you're referring to when you say timestamps.&nbsp; The issue is that the code comments keep changing.&nbsp; Would it be possible to just use a List instead of a Set?&nbsp; That should solve the issue.<br><br>Thanks,<br>
Ben<br><br><br>$ diff {/tmp/tmpaX6PX1,/tmp/tmp2-04O_}/JsonTemplateParser.java<br>307c307<br>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: value, DOC_COMMENT, startCommand<br>---<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: startCommand, value, DOC_COMMENT<br>
521c521<br>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: DOC_COMMENT, entry, startCommand<br>---<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: startCommand, entry, DOC_COMMENT<br>1031c1031<br>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: DOC_COMMENT, entry<br>---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: entry, DOC_COMMENT<br>1161c1161<br>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: DOC_COMMENT, key, value<br>---<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: key, value, DOC_COMMENT<br>1365c1365<br>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: value, DOC_COMMENT<br>
---<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // elements: DOC_COMMENT, value<br><br><br><br><br></p>
<div class="gmail_quote">On Wed, Jun 9, 2010 at 10:21 AM, Terence Parr <span dir="ltr">&lt;<a href="mailto:parrt@...a.edu">parrt@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote"><div>yeah, there are Sets in there. i wonder why (how?) java alters the order for same computation across runs. &nbsp;Come to think of it, i'm chasing something similar in ANTLR v4 unit tests. &nbsp;I thought it was static data somewhere but could be some weird Set thing.<div>
<br>
</div>
<div>damn java. grr.... not sure how easily i can help you here...</div>
<div><br></div>
<div>Ter<div>
<div></div>
<div class="h5">
<br><div>
<div>On Jun 9, 2010, at 10:15 AM, Ben McCann wrote:</div>
<br><blockquote type="cite">
We're using 3.2.&nbsp; The only thing I've noticed changing between runs thus far is the code comments.&nbsp; I should also mention the input is not changing at all.&nbsp; I'm guessing it's something along the lines of using an Iterator from a Set instead of List so that there's no ordering guarantee.<br><br>Thanks,<br>Ben<br><br><br><div class="gmail_quote">On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr <span dir="ltr">&lt;<a href="mailto:parrt <at> cs.usfca.edu" target="_blank">parrt@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
 <div>wow. that's weird. &nbsp;surely the grammar changes between runs? &nbsp;Computers are usually good about determinism ;)<div>What version of antlr?</div>
<div>Ter<br><div>
<div>
<div></div>
<div>
 <div>On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:</div>
<br>
</div>
</div>
<blockquote type="cite">
<div>
<div></div>
<div><span>Hi,<div>
 It appears that ANTLR is generating varying output between runs. &nbsp;This causes problems for us when trying to diff to see if anything has changed. &nbsp;Could someone file a bug for this? &nbsp;I was not able to register for the JIRA.<br><div><br></div>
<div>Thanks,</div>
<div>Ben McCann</div>
<div>Software Engineer</div>
<div>Google Inc.</div>
<div><br></div>
<div><br></div>
<div><span><div>
 $diff ~/PathParser.java.1 ~/PathParser.java.2</div>
<div>560c560</div>
<div>&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: Variable, expr</div>
 <div>---</div>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: expr, Variable</div>
<div><br></div>
 </span></div>
</div></span></div>
</div>
<div> _______________________________________________<br>antlr-dev mailing list<br><a href="mailto:antlr-dev <at> antlr.org" target="_blank">antlr-dev@...</a><br><a href="http://www.antlr.org/mailman/listinfo/antlr-dev" target="_blank">http://www.antlr.org/mailman/listinfo/antlr-dev</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div></blockquote>
</div>
<br>
</div>
Jim Idle | 9 Jun 2010 19:42

Re: Non-deterministic output

Yes, I saw your details after I replied. There was a timestamp in the generated code that was interfering with people doing this. Now I think about it, I seem to remember that we already took that out.

 

I will take a look at this out of interest (unless you are going to Ter?)

 

Jim

 

From: antlr-dev-bounces-ErkRXerACLvYtjvyW6yDsg@public.gmane.org [mailto:antlr-dev-bounces-ErkRXerACLvYtjvyW6yDsg@public.gmane.org] On Behalf Of Ben McCann
Sent: Wednesday, June 09, 2010 10:34 AM
To: Terence Parr
Cc: antlr-dev-ErkRXerACLvYtjvyW6yDsg@public.gmane.org
Subject: Re: [antlr-dev] Non-deterministic output

 

I'm not sure what you're referring to when you say timestamps.  The issue is that the code comments keep changing.  Would it be possible to just use a List instead of a Set?  That should solve the issue.

Thanks,
Ben


$ diff {/tmp/tmpaX6PX1,/tmp/tmp2-04O_}/JsonTemplateParser.java
307c307
<             // elements: value, DOC_COMMENT, startCommand
---
>             // elements: startCommand, value, DOC_COMMENT
521c521
<             // elements: DOC_COMMENT, entry, startCommand
---
>             // elements: startCommand, entry, DOC_COMMENT
1031c1031
<             // elements: DOC_COMMENT, entry
---
>             // elements: entry, DOC_COMMENT
1161c1161
<                     // elements: DOC_COMMENT, key, value
---
>                     // elements: key, value, DOC_COMMENT
1365c1365
<             // elements: value, DOC_COMMENT
---
>             // elements: DOC_COMMENT, value



On Wed, Jun 9, 2010 at 10:21 AM, Terence Parr <parrt-XeM6X/PiNgr2fBVCVOL8/A@public.gmane.org> wrote:

yeah, there are Sets in there. i wonder why (how?) java alters the order for same computation across runs.  Come to think of it, i'm chasing something similar in ANTLR v4 unit tests.  I thought it was static data somewhere but could be some weird Set thing.

 

damn java. grr.... not sure how easily i can help you here...

 

Ter

 

On Jun 9, 2010, at 10:15 AM, Ben McCann wrote:



We're using 3.2.  The only thing I've noticed changing between runs thus far is the code comments.  I should also mention the input is not changing at all.  I'm guessing it's something along the lines of using an Iterator from a Set instead of List so that there's no ordering guarantee.

Thanks,
Ben

On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr <parrt-XeM6X/PiNgr2fBVCVOL8/A@public.gmane.org> wrote:

wow. that's weird.  surely the grammar changes between runs?  Computers are usually good about determinism ;)

What version of antlr?

Ter

On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:

 

Hi,

It appears that ANTLR is generating varying output between runs.  This causes problems for us when trying to diff to see if anything has changed.  Could someone file a bug for this?  I was not able to register for the JIRA.

 

Thanks,

Ben McCann

Software Engineer

Google Inc.

 

 

$diff ~/PathParser.java.1 ~/PathParser.java.2

560c560

<                     // elements: Variable, expr

---

>                     // elements: expr, Variable

 

_______________________________________________
antlr-dev mailing list
antlr-dev-ErkRXerACLs@public.gmane.orgg
http://www.antlr.org/mailman/listinfo/antlr-dev

 

 

 

 

<div>

<div class="WordSection1">

<p class="MsoNormal"><span>Yes, I saw your details after I replied. There was a timestamp
in the generated code that was interfering with people doing this. Now I think
about it, I seem to remember that we already took that out.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>I will take a look at this out of interest (unless you are going
to Ter?)<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Jim<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<div>

<div>

<div>

<p class="MsoNormal"><span>From:</span><span>
antlr-dev-bounces@... [mailto:antlr-dev-bounces@...] On Behalf
Of Ben McCann<br>Sent: Wednesday, June 09, 2010 10:34 AM<br>To: Terence Parr<br>Cc: antlr-dev@...<br>Subject: Re: [antlr-dev] Non-deterministic output<p></p></span></p>

</div>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

<p class="MsoNormal">I'm not sure what you're
referring to when you say timestamps.&nbsp; The issue is that the code comments
keep changing.&nbsp; Would it be possible to just use a List instead of a
Set?&nbsp; That should solve the issue.<br><br>
Thanks,<br>
Ben<br><br><br>
$ diff {/tmp/tmpaX6PX1,/tmp/tmp2-04O_}/JsonTemplateParser.java<br>
307c307<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: value, DOC_COMMENT, startCommand<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: startCommand, value, DOC_COMMENT<br>
521c521<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: DOC_COMMENT, entry, startCommand<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: startCommand, entry, DOC_COMMENT<br>
1031c1031<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: DOC_COMMENT, entry<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: entry, DOC_COMMENT<br>
1161c1161<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// elements: DOC_COMMENT, key, value<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// elements: key, value, DOC_COMMENT<br>
1365c1365<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: value, DOC_COMMENT<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
elements: DOC_COMMENT, value<br><br><br><br><p></p></p>

<div>

<p class="MsoNormal">On Wed, Jun 9, 2010 at 10:21 AM, Terence Parr &lt;<a href="mailto:parrt@...">parrt@...</a>&gt; wrote:<p></p></p>

<div>

<p class="MsoNormal">yeah, there are Sets in there. i wonder why (how?) java
alters the order for same computation across runs. &nbsp;Come to think of it,
i'm chasing something similar in ANTLR v4 unit tests. &nbsp;I thought it was
static data somewhere but could be some weird Set thing.<p></p></p>

<div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

<div>

<p class="MsoNormal">damn java. grr.... not sure how easily i can help you
here...<p></p></p>

</div>

<div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

<div>

<p class="MsoNormal">Ter<p></p></p>

<div>

<div>

<p class="MsoNormal"><p>&nbsp;</p></p>

<div>

<div>

<p class="MsoNormal">On Jun 9, 2010, at 10:15 AM, Ben McCann wrote:<p></p></p>

</div>

<p class="MsoNormal"><br><br><p></p></p>

<p class="MsoNormal">We're using 3.2.&nbsp; The only
thing I've noticed changing between runs thus far is the code comments.&nbsp; I
should also mention the input is not changing at all.&nbsp; I'm guessing it's
something along the lines of using an Iterator from a Set instead of List so
that there's no ordering guarantee.<br><br>
Thanks,<br>
Ben<br><br><p></p></p>

<div>

<p class="MsoNormal">On Wed, Jun 9, 2010 at 10:03 AM, Terence Parr &lt;<a href="mailto:parrt@..." target="_blank">parrt@...</a>&gt;
wrote:<p></p></p>

<div>

<p class="MsoNormal">wow. that's weird. &nbsp;surely the grammar changes between
runs? &nbsp;Computers are usually good about determinism ;)<p></p></p>

<div>

<p class="MsoNormal">What version of antlr?<p></p></p>

</div>

<div>

<p class="MsoNormal">Ter<p></p></p>

<div>

<div>

<div>

<div>

<p class="MsoNormal">On Jun 8, 2010, at 9:52 PM, Ben McCann wrote:<p></p></p>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>

<blockquote>

<div>

<div>

<p class="MsoNormal"><span>Hi,<p></p></span></p>

<div>

<p class="MsoNormal"><span>It appears that ANTLR is generating
varying output between runs. &nbsp;This causes problems for us when trying to
diff to see if anything has changed. &nbsp;Could someone file a bug for this?
&nbsp;I was not able to register for the JIRA.<p></p></span></p>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Thanks,<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Ben McCann<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Software Engineer<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>Google Inc.<p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

<div>

<div>

<p class="MsoNormal"><span>$diff ~/PathParser.java.1
~/PathParser.java.2</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>560c560</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>&lt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: Variable, expr</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>---</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // elements: expr, Variable</span><span><p></p></span></p>

</div>

<div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

</div>

</div>

</div>

</div>

<div>

<p class="MsoNormal">_______________________________________________<br>
antlr-dev mailing list<br><a href="mailto:antlr-dev@..." target="_blank">antlr-dev@...g</a><br><a href="http://www.antlr.org/mailman/listinfo/antlr-dev" target="_blank">http://www.antlr.org/mailman/listinfo/antlr-dev</a><p></p></p>

</div>

</blockquote>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>

</div>

</div>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>

</div>

Gmane