[antlr-interest] Bug in ANTLR C# Codegen?

Ney, Richard richard.ney at aspect.com
Tue Nov 5 00:32:44 PST 2002


After I posted my fix to the unreachable code warnings I tested the new
ANTLR on some other grammar files and found what appears to be a bug that is
causing a throw exception statement to no get inserted. In this case when
genBlockFinish gets called it is passed a CSharpBlockFinishingInfo class and
what appears to be a valid noViableAction string containing an exception.
What appears strange is that the fields in the howToFinish instance of the
class states that both an IF and SWITCH were generated and the it doesn't
need a Error Clause. Based on the values for those fields the noViableAction
will never get printed to the output file. 

Has anyone else encountered this or is my fix to the warning the only thing
that has exposed this?

-Richard

----------------------------------------------------------------------------
------------------------
Richard Ney	Aspect Communications
Principal Software Engineer
http://www.aspect.com <http://www.aspect.com>
Main:  408.325.2200
mailto:richard.ney at aspect.com <mailto:richard.ney at aspect.com>
SJ Office: 408.325.2464
    	Home Office: 916.797.9602
----------------------------------------------------------------------------
------------------------

The Three Laws of Infernal Dynamics:
1. An object in motion will always be headed in the wrong direction.
2. An object at rest will always be in the wrong place.
3. The energy required to change either of these states will always be more
than you wish to expend, but never so much as to make the task appear
prospectively impossible.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20021105/68f0b950/attachment.html


More information about the antlr-interest mailing list