[antlr-interest] Exception handling

Ric Klaren ric.klaren at gmail.com
Mon May 9 15:11:17 PDT 2005


Tapodyuti Mandal wrote:
>   I'm facing problem using ANTLR with gcc3.2.3 on Linux 7.2. The problem
> is with catch-throw. The parser is throwing MisMatchToken exception. 
> There's
> a catch immediately after throw. The catch doesn't work. It finally 
> gives SIGABORT
> signal. The same code works fine for gcc2.96. Can anyone shed some light 
> on the
> problem? I'm using antlr-2.7.4.

First guess maybe some stale .o files wandering around compiled with 
another version of gcc/or other options. Linking stuff from 2.96 with 
3.2.x ones is probably not a good idea. If I recall right there were 
some ABI changes between those versions. Note that 2.96 is a redhat hack 
and not an official gcc release (the first versions of it were horrible).

Second guess compiler bug. Upgrade gcc. the last 3.4.x ones are pretty 
reliable.

Cheers,

Ric


More information about the antlr-interest mailing list