[antlr-interest] C# Target Unreachable Code

Ben Gillis wbgillis at gmail.com
Fri Oct 31 16:47:10 PDT 2008


why the unreachable code generation?

...
else if ( (true) )
{
    alt8 = 3;
}
else 
{
    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
    NoViableAltException nvae_d8s1 =
    new NoViableAltException("", 8, 1, input);
    throw nvae_d8s1;
}

It seems fairly harmless to disable 0219 (unused variables), but disabling unreachable code warnings perhaps not.

Regards,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081031/db065864/attachment.html 


More information about the antlr-interest mailing list