[antlr-interest] Problem with Java runtime

Toni Menzel toni at okidokiteam.com
Tue Sep 30 03:56:05 PDT 2008


Dont't worry, thats a warning that your generated code is using unchecked
type conversion where it could have used generics.
I guess the generated code produces java < 5 compatible code where generics
haven't existed.

Depending on your IDE, you can set the sourcecode level to 1.4 or uncheck a
box in your settings like "warn when using unchecked type conversion" or
alike.

cheers,
Toni

On Tue, Sep 30, 2008 at 12:40 PM, David Wigg <wiggjd at bcs.org.uk> wrote:

> To whom it may concern,
>
> I get this warning when compiling the Java runtime.
>
> .\TestRecursion_JavaParser.java:64: warning: [unchecked] unchecked call to
> push(E) as a member of the raw type java.util.Stack
>         block_stack.push(new block_scope());
> I attach the source code and the grammar which produced it.
>
> The "Java" in the name refers to the runtime language in this case.
>
> Am I doing something wrong? If not, I wonder if the warning could possibly
> be removed in future?
>
> For our information, I also have a C runtime version. This version does not
> seem to work in quite the same way as the Java version in that the block
> data appears to be popped before performing any @after processing (instead
> of after any @after processing as in the Java runtime) so that any
> appropriate block data is no longer available..
>
> Thanks,
>
> David.
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
>


-- 
Toni Menzel
Software Developer
Podbielskistr. 262
30655 Hannover
toni at okidokiteam.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080930/c7d4225a/attachment.html 


More information about the antlr-interest mailing list