<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/lpg/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/lpg/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/lpg/bugs/</id><updated>2011-02-08T11:22:23Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Missing copyright statements</title><link href="https://sourceforge.net/p/lpg/bugs/6/" rel="alternate"/><published>2011-02-08T11:22:23Z</published><updated>2011-02-08T11:22:23Z</updated><author><name>Niels Thykier</name><uri>https://sourceforge.net/u/nthykier/</uri></author><id>https://sourceforge.net23b5595bd5f39d7efb04d1f47afb892e993b21ed</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey&lt;/p&gt;
&lt;p&gt;At least the Java part lacks copyright statements (this may also extend to the C/CPP code, but I did not check). At least the Java src zip file contains an license, but I cannot find one for the src cpp zip file (I only checked the source zips of version 2.0.20).&lt;/p&gt;
&lt;p&gt;The consequences of this is:&lt;/p&gt;
&lt;p&gt;The Java zip file violates its own license (EPL 1.0 section 3):&lt;br /&gt;
"""&lt;br /&gt;
Each Contributor must identify itself as the originator of its Contribution,&lt;br /&gt;
if any, in a manner that reasonably allows subsequent Recipients to identify&lt;br /&gt;
the originator of the Contribution.&lt;br /&gt;
"""&lt;/p&gt;
&lt;p&gt;The CPP zip is probably not redistributable, since lack of license implies "All&lt;br /&gt;
rights reserved". Assuming the CPP zip is under EPL 1.0 (or intended to be&lt;br /&gt;
under said license), then it (also) violates section 3.:&lt;/p&gt;
&lt;p&gt;"""&lt;br /&gt;
When the Program is made available in source code form:&lt;/p&gt;
&lt;p&gt;a) it must be made available under this Agreement; and&lt;/p&gt;
&lt;p&gt;b) a copy of this Agreement must be included with each copy of the Program.&lt;br /&gt;
"""&lt;/p&gt;
&lt;p&gt;Though again, that is only if the CPP part is under EPL 1.0.&lt;/p&gt;
&lt;p&gt;Thank you in advance,&lt;br /&gt;
~Niels&lt;/p&gt;
&lt;p&gt;PS: I originally filed this as &lt;a href="https://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3175629&amp;amp;group_id=155963&amp;amp;atid=797881"&gt;https://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=3175629&amp;amp;group_id=155963&amp;amp;atid=797881&lt;/a&gt;, but I am refiling it here because that was the wrong tracker and I could not move it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>LexParser.parseActions (2.0.20) bug</title><link href="https://sourceforge.net/p/lpg/bugs/5/" rel="alternate"/><published>2010-12-21T21:23:09Z</published><updated>2010-12-21T21:23:09Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net3944c522968236de4dcc24972c6bb5eafeab9c11</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;line 648 - current_kind = tokStream.getKind(curtok)&lt;br /&gt;
should be moved up and inserted after&lt;br /&gt;
line 646 - curtok = tokStream.getNext(curtok);&lt;/p&gt;
&lt;p&gt;otherwise in incremented parse mode current_kind is not always updated&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Memory leak in generated parsers</title><link href="https://sourceforge.net/p/lpg/bugs/4/" rel="alternate"/><published>2009-06-28T18:52:38Z</published><updated>2009-06-28T18:52:38Z</updated><author><name>Dieter Kleinrath</name><uri>https://sourceforge.net/u/dkleinrath/</uri></author><id>https://sourceforge.net81c0d00191663e57eb14241ae3d12895c9b9cfd2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Reusing a parser instance (DeterministicParser or BacktrackingParser) results in a memory leak caused by the method lpg.runtime.Stacks.reallocateStacks(). This method is called before parsing a new file and it will copy the current stacks into new arrays of length "stack_length = old_stack_length + STACK_INCREMENT;". Because of this the stacks will continue to grow when reusing a parser.&lt;/p&gt;
&lt;p&gt;A potential fix for this bug is adding the following lines to the reset method in the DeterministicParser/BacktrackingParser:&lt;br /&gt;
locationStack = null;&lt;br /&gt;
parseStack= null;&lt;br /&gt;
stateStack= null;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Memory Leak in spell.h</title><link href="https://sourceforge.net/p/lpg/bugs/3/" rel="alternate"/><published>2008-02-04T14:22:59Z</published><updated>2008-02-04T14:22:59Z</updated><author><name>Michael Pfeiffer</name><uri>https://sourceforge.net/u/laplace/</uri></author><id>https://sourceforge.netbf8a43c187ae4f96acacf4e3ab4d75c436b30a4d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;At line 46 the method returns without deleting the allocated memory for strings s1 and s2 at line 14 and 15.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lpg.cvs.sourceforge.net/lpg/lpg.generator.cpp/src/spell.h?revision=1.1&amp;amp;view=markup"&gt;http://lpg.cvs.sourceforge.net/lpg/lpg.generator.cpp/src/spell.h?revision=1.1&amp;amp;view=markup&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>BacktrackingParser constructor is very slow</title><link href="https://sourceforge.net/p/lpg/bugs/2/" rel="alternate"/><published>2007-06-07T15:33:40Z</published><updated>2007-06-07T15:33:40Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netcabf0bf219644877f1b27a838824054904cda32c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The BacktrackingParser constructor method allocates a huge int array (1 &amp;lt;&amp;lt; 20) for recording actions. Unfortunately allocating this array is dirt slow (it may even be causing the garbage collector to fire).&lt;/p&gt;
&lt;p&gt;When using LPG to parse a large project in CDT I have noticed huge performance gains by pooling and reusing BacktrackingParser objects rater than instantiating one for every file. However, now I have to write and maintain an object pool for parsers, this shouldn't be necessary.&lt;/p&gt;
&lt;p&gt;I tracked down this bottleneck using TPTP.&lt;/p&gt;
&lt;p&gt;Mike Kucera&lt;br /&gt;
Software Developer&lt;br /&gt;
IBM CDT Team&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>BacktrackingParser: Parsing an empty stream leads Exception</title><link href="https://sourceforge.net/p/lpg/bugs/1/" rel="alternate"/><published>2006-07-20T10:30:49Z</published><updated>2006-07-20T10:30:49Z</updated><author><name>Uwe Voigt</name><uri>https://sourceforge.net/u/userid-582288/</uri></author><id>https://sourceforge.net1e12ea1815c690e68c413546b910bc5f086ad31d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;java.lang.ArrayIndexOutOfBoundsException: 0&lt;br /&gt;
at lpg.lpgjavaruntime.IntTuple.add(IntTuple.java:75)&lt;br /&gt;
at&lt;br /&gt;
lpg.lpgjavaruntime.BacktrackingParser.parse(BacktrackingParser.java:129)&lt;/p&gt;
&lt;p&gt;adding one to the size of the newly created array would&lt;br /&gt;
smoothly fix this issue&lt;/p&gt;
&lt;p&gt;System.arraycopy(array, 0, array = new int[i * 2 + 1],&lt;br /&gt;
0, i);&lt;br /&gt;
----&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>