throw c++ exception abort app
throw c++ exception abort app
- Subject: throw c++ exception abort app
- From: Gerard Iglesias <email@hidden>
- Date: Thu, 10 Jul 2003 22:40:13 +0200
Hello,
I know that it is an old question but didn't found real help in the
archive.
I am trying to finish a parser made with antlr in a Cocoa project (a
rib parser) but I have a big problem to get it usable, because in case
of not token recognized the throwed exception in the C++ antlr
generated code abort the program in place of raising and catching it?
the call stack is the same if I use the parser code in a pure C++ code
or and ObjC++ one.
the call stack is like this :
#0 0x9001a0ac in kill ()
#1 0x9008c8e0 in abort ()
#2 0x00021c84 in __cxxabiv1::__terminate(void (*)()) () at
/usr/include/gcc/darwin/3.3/c++/bits/stl_alloc.h:656
#3 0x00021cc8 in std::terminate() () at
/usr/include/gcc/darwin/3.3/c++/bits/stl_alloc.h:656
#4 0x00023c5c in __cxa_throw () at
/usr/include/gcc/darwin/3.3/c++/bits/stl_alloc.h:656
#5 0x00003328 in CalcLexer::nextToken() (this=0xbffff1c4) at
/usr/include/gcc/darwin/3.3/c++/bits/basic_string.h:355
#6 0x00010820 in antlr::TokenBuffer::fill(int) (this=0x380bd0,
amount=1) at ../antlr/CircularQueue.hpp:65
#7 0x00010a6c in antlr::TokenBuffer::LT(int) (this=0x380bd0, i=1) at
TokenBuffer.cpp:56
#8 0x000670f8 in antlr::LLkParser::LT(int) (this=0x0, i=-1610604616)
at
/Users/gerard/Developer/Tools/antlr-2.7.2/lib/cpp/antlr/
ParserSharedInputState.hpp:62
#9 0x000067f8 in CalcParser::atom() (this=0xbffffa80) at
/Users/gerard/Developer/Tools/antlr-2.7.2/lib/cpp/antlr/
ASTRefCount.hpp:74
#10 0x00005f2c in CalcParser::mexpr() (this=0xbffffa80) at
CalcParser.cpp:75
#11 0x00005690 in CalcParser::expr() (this=0xbffffa80) at
CalcParser.cpp:39
#12 0x000087c4 in main (argc=-1073744576, argv=0xbffffa80) at
Main2.cpp:50
I didn't looked at the darwin code yet.
Any help.
My parser is big and don't have the courage to rewrite it in lex/yacc,
and wanted to make it open source as a typical use of ANTLR in
OSX/Cocoa project :)
Thanks in advance.
Gerard
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.