[antlr-interest] Re: 2.7.2a4 ANTLR/C# - build ok, panic shutdown

slightlynew gackle at shaw.ca
Wed Dec 4 15:08:37 PST 2002


Hi Micheal & Richard,

Overriding panic() is certainly a workaround, and indeed was the 
first thing I did after discovering the problem.  However, I don't 
really see that as the point.  The important thing is whether a 
library should handle fatal errors by shutting down the calling 
application without warning!

A further problem with overriding panic() is that while you can do 
this for lexers, you cannot do it for parsers or tree parsers, where 
it is a static method.

By the way, Micheal, just for curiosity I also built the C# codegen 
with Antlr 2.7.2a6.  I was able to do so quite easily, and my unit 
tests all passed without modification (unlike the upgrade from 
2.7.2a2 to 2.7.2a4).  In fact, the discrepancies between the C# and 
the main Antlr branch are now quite few, which bodes well for merging 
the two streams.

What I wasn't able to get working in Antlr 2.7.2a6 was that third 
parameter that Terence added to the AST constructor syntax: #
[FOO, "Foo", "FooNode"] (or something like that!)  I couldn't get 
that to work either with Java or C# (having ported Terence's changes 
to the C# action.g).  Antlr rejects the third parameter with a syntax 
error saying "unexpected ','".  Is there something else one needs to 
do, to get Antlr to use the new action.g?

Daniel


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list