<?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/beaver/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/beaver/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/beaver/bugs/</id><updated>2012-07-11T20:06:22Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Phrase error recovery always throws away unexpected token</title><link href="https://sourceforge.net/p/beaver/bugs/31/" rel="alternate"/><published>2012-07-11T20:06:22Z</published><updated>2012-07-11T20:06:22Z</updated><author><name>Carl Reinke</name><uri>https://sourceforge.net/u/mindless2112/</uri></author><id>https://sourceforge.net89c2fd3794a0ffb4745f869a14a0dcadd43f0a9d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When the parser reaches phrase-level error recovery, it never retries the unexpected token after shifting the error token.  This is problematic when that token begins a valid phrase -- the result is that a valid phrase following an error phrase is also thrown away as a part of the error phrase.&lt;/p&gt;
&lt;p&gt;The attached patch addresses this issue, as well as improving the accuracy of the source range of the error token.  (I also changed the termination condition for the simulator since reinserting the unexpected token can make the stream buffer full.)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error recovery throws NullPointerException</title><link href="https://sourceforge.net/p/beaver/bugs/30/" rel="alternate"/><published>2012-01-27T17:42:40Z</published><updated>2012-01-27T17:42:40Z</updated><author><name>Carl Reinke</name><uri>https://sourceforge.net/u/mindless2112/</uri></author><id>https://sourceforge.net24c0f9c29afa0cfe93e7fb5ca0455b0b9b615ae9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;During error recovery the parser throws NullPointerException (buffer is null during call to Parser.remove(int i)).&lt;/p&gt;
&lt;p&gt;It is possible that I am simply misusing the "error" non-terminal, in which case it would be helpful for beaver-cc to emit a warning.&lt;/p&gt;
&lt;p&gt;The attached example (a modification of the MLton grammar for Standard ML), results in the following output:&lt;/p&gt;
&lt;p&gt;:0,0-0,0: Syntax Error: unexpected token "else"&lt;br /&gt;
:0,0-0,0: Recovered: replaced unexpected token with #21&lt;br /&gt;
:0,0-0,0: Syntax Error: unexpected token ""fail:\n""&lt;br /&gt;
:0,0-0,0: Recovered: removed unexpected token ""fail:\n""&lt;br /&gt;
:0,0-0,0: Syntax Error: unexpected token ";"&lt;br /&gt;
:0,0-0,0: Recovered: replaced unexpected token with #28&lt;br /&gt;
:0,0-0,0: Syntax Error: unexpected token "end"&lt;br /&gt;
:0,0-0,0: Recovered: removed unexpected token "end"&lt;br /&gt;
:0,0-0,0: Syntax Error: unexpected token "fun"&lt;br /&gt;
Exception in thread "main" java.lang.NullPointerException&lt;br /&gt;
    at beaver.Parser$TokenStream.remove(Parser.java:240)&lt;br /&gt;
    at beaver.Parser.recoverFromError(Parser.java:667)&lt;br /&gt;
    at beaver.Parser.parse(Parser.java:468)&lt;br /&gt;
    at beaver.Parser.parse(Parser.java:409)&lt;br /&gt;
    at Main.main(Main.java:15)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>unused nonterminal cause IllegalStateException</title><link href="https://sourceforge.net/p/beaver/bugs/29/" rel="alternate"/><published>2012-01-20T03:40:44Z</published><updated>2012-01-20T03:40:44Z</updated><author><name>Carl Reinke</name><uri>https://sourceforge.net/u/mindless2112/</uri></author><id>https://sourceforge.net1aa8c4d39048527d5f0b500ffcfb707377ff41a7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Instead of warning about unused nonterminal (as with unused terminals), an exception is thrown:&lt;/p&gt;
&lt;p&gt;java.lang.IllegalStateException: found less nonterminals than previously counted&lt;br /&gt;
    at beaver.spec.GrammarBuilder.getNonTerminals(GrammarBuilder.java:602)&lt;br /&gt;
    at beaver.spec.GrammarBuilder.visit(GrammarBuilder.java:530)&lt;br /&gt;
    at beaver.spec.ast.GrammarTreeRoot.accept(GrammarTreeRoot.java:27)&lt;br /&gt;
    at beaver.comp.ParserGenerator.parseGrammar(ParserGenerator.java:837)&lt;br /&gt;
    at beaver.comp.ParserGenerator.compile(ParserGenerator.java:787)&lt;br /&gt;
    at beaver.comp.run.Make.compile(Make.java:128)&lt;br /&gt;
    at beaver.comp.run.Make.main(Make.java:165)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Out-of-index-exception in GrammarBuilder.java:trim()</title><link href="https://sourceforge.net/p/beaver/bugs/28/" rel="alternate"/><published>2009-10-31T00:50:31Z</published><updated>2009-10-31T00:50:31Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net44e66e30e0a6e65a501791454de62db56ddfc775</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In some cases the method GrammarBuilder.trim() throw an out-of-index exception, e. g. if the passed parameter is already empty (but not null). Then the statement "code.charAt(--i)" try to access the element at position -1. The same problem can occur when \r and \n are cutted at the end of the string. The attached patch fix this problem by adding check-code for index i.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>exit code is  0 on error</title><link href="https://sourceforge.net/p/beaver/bugs/27/" rel="alternate"/><published>2009-08-15T02:33:42Z</published><updated>2009-08-15T02:33:42Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net6cd8814581b05eec8bb8becc066021e73f7a5450</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The exit code is always 0, also if there is an error. This cause problems if beaver is used in a build environment. The attached patch set the exit code to 1 if the grammar contain an error or when an illegal argument exception occur.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>missing Ant task parameters</title><link href="https://sourceforge.net/p/beaver/bugs/26/" rel="alternate"/><published>2005-10-22T17:42:21Z</published><updated>2005-10-22T17:42:21Z</updated><author><name>Blaine Simpson</name><uri>https://sourceforge.net/u/unsaved/</uri></author><id>https://sourceforge.netab4760af941f6de9bfed6af74dc4d9573bc2372b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;According to the Beaver how2run.html page:&lt;/p&gt;
&lt;p&gt;"The task attributes have one to one correspondence&lt;br /&gt;
with command line switches."&lt;/p&gt;
&lt;p&gt;(Ant calls task attributes "parameters").  However,&lt;br /&gt;
there are 10 command line&lt;br /&gt;
switches and only 9 Ant task parameters.  I&lt;br /&gt;
particularly want to use the .stat&lt;br /&gt;
file option from Ant, and it's not available.&lt;/p&gt;
&lt;p&gt;I'm adding this issue as a bug instead of a feature&lt;br /&gt;
request only because&lt;br /&gt;
the Ant target does not behave according to the Beaver&lt;br /&gt;
docs without this&lt;br /&gt;
feature.  No problem if you want to close this tracker&lt;br /&gt;
and open a new&lt;br /&gt;
feature request instead.&lt;/p&gt;
&lt;p&gt;(Even if all command line switches were implemented for&lt;br /&gt;
Ant, there would still&lt;br /&gt;
not be a 1:1 correspondence, since there is also a&lt;br /&gt;
target parameter for&lt;br /&gt;
"file", which is a command line argument but not a&lt;br /&gt;
command line switch.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Type is not propagated on shortcuts</title><link href="https://sourceforge.net/p/beaver/bugs/25/" rel="alternate"/><published>2005-02-17T01:27:34Z</published><updated>2005-02-17T01:27:34Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net737496ee58292a80e78d7949605fc66532b2fc62</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;beaver is great work! &lt;/p&gt;
&lt;p&gt;1) Is it possible to make beaver support mutiple goals?&lt;br /&gt;
Somtimes i need only to parse sub parts.&lt;/p&gt;
&lt;p&gt;2 less important) If i assign to an nonterminal 'x' a java &lt;br /&gt;
type 'X'. The list detection generates for the 'xlist' the &lt;br /&gt;
type 'X[]'. That is very goot for effectiv work. But this &lt;br /&gt;
works only for 'x.javavarname' and not &lt;br /&gt;
for 'x.javavarname?'. For 'x.javavarname' the type is &lt;br /&gt;
Symbol. It woul be better if it is 'X[]' too.&lt;/p&gt;
&lt;p&gt;Question) Could it be that beaver or flex changes hash &lt;br /&gt;
values of the parsed java objects? In my debugger i &lt;br /&gt;
have seen Strings same content and with diffrent hash. &lt;br /&gt;
This causes problems with HashMaps.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Michael Wagner&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Sources ought to be in sf.net CVS</title><link href="https://sourceforge.net/p/beaver/bugs/24/" rel="alternate"/><published>2004-10-07T13:00:04Z</published><updated>2004-10-07T13:00:04Z</updated><author><name>Jochen Wiedmann</name><uri>https://sourceforge.net/u/joe/</uri></author><id>https://sourceforge.net59ed8b6bdad415804b03094e5de9479ddf264ece</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;For integration within gump (see&lt;br /&gt;
&lt;a href="http://gump.apache.org" rel="nofollow"&gt;http://gump.apache.org&lt;/a&gt;), it would&lt;br /&gt;
be nice, if the sources were available in the sf.net CVS.&lt;/p&gt;
&lt;p&gt;The nice thing is, that this would create automatic&lt;br /&gt;
error messages,&lt;br /&gt;
whenever a dependent Apache project (Jaxme in that&lt;br /&gt;
case) would&lt;br /&gt;
be in conflict with the CVS head.&lt;/p&gt;
&lt;p&gt;Jochen&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>documentation: meaning of symbol()</title><link href="https://sourceforge.net/p/beaver/bugs/23/" rel="alternate"/><published>2004-09-17T15:08:43Z</published><updated>2004-09-17T15:08:43Z</updated><author><name>Uli Bubenheimer</name><uri>https://sourceforge.net/u/ulibube/</uri></author><id>https://sourceforge.net66c996ee083d4fe33f604041197c4354feb27625</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;From one of the code samples on the spec.html&lt;br /&gt;
documentation page:&lt;/p&gt;
&lt;p&gt;return symbol(lst); // "symbol" is a shortcut for "new&lt;br /&gt;
beaver.Symbol"&lt;/p&gt;
&lt;p&gt;I understand this to mean: Use "symbol(lst)" and Beaver&lt;br /&gt;
will take care of expanding it to "new&lt;br /&gt;
beaver.Symbol(lst)" somehow.&lt;/p&gt;
&lt;p&gt;But apparently that is not what happens. Is it just&lt;br /&gt;
there for confusion?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Unhelpful class name lookup error message</title><link href="https://sourceforge.net/p/beaver/bugs/22/" rel="alternate"/><published>2004-09-16T16:12:43Z</published><updated>2004-09-16T16:12:43Z</updated><author><name>Uli Bubenheimer</name><uri>https://sourceforge.net/u/ulibube/</uri></author><id>https://sourceforge.netc368283d95a83198d530e5ca9acfe1255854750a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I tried to compile a grammar specification with&lt;br /&gt;
0.9.3.4, which I had written for 0.9.1.4. When running&lt;br /&gt;
my Ant build script, I got the following error:&lt;/p&gt;
&lt;p&gt;BUILD FAILED: C:\KOP\build.xml:63: Failed to lookup&lt;br /&gt;
class name in&lt;br /&gt;
C:\KOP\src\com\certusoft\koprt\ADLParser.beaver&lt;/p&gt;
&lt;p&gt;This error message does not give an indication what the&lt;br /&gt;
problem is. Several issues:&lt;br /&gt;
1. The message does not indicate that this is an error&lt;br /&gt;
which occurred while trying to find the name of the&lt;br /&gt;
target class as specified by the %class directive in&lt;br /&gt;
the ADLParser.beaver specification file. "Class name"&lt;br /&gt;
could mean anything, some beaver class, some ant class,&lt;br /&gt;
some application class, whatever.&lt;/p&gt;
&lt;p&gt;2. There is no indication what the actual problem is.&lt;br /&gt;
At least the message part of the original exception&lt;br /&gt;
should be printed.&lt;/p&gt;
&lt;p&gt;3. I assume the actual reason for this error is that my&lt;br /&gt;
ADLParser.beaver file still uses plain curly braces&lt;br /&gt;
rather than {: and }:. Beaver should say something like&lt;br /&gt;
"syntax error" with a line number, etc., to indicate&lt;br /&gt;
what the problem is, since it might be tricky to find&lt;br /&gt;
otherwise. I am attaching the actual exception (which I&lt;br /&gt;
obtained by adding a printStackTrace in the code).&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>