[antlr-interest] Problem with the C treeparser.

Nico Kruithof Kruithof at jive.nl
Wed Sep 26 23:59:17 PDT 2007


Hi Jim,

Did you already have time to take a look? I can try to debug it myself
as well. Some hints would then be usefull. It seems the program
segfaults when I try to access the getText(id). Where does it get the
string from? Is it stored in a large array and referenced by a begin and
end pointer in that array?

Bests,
Nico


On Fri, 2007-09-21 at 11:59 +0100, Jim Idle wrote:
> I'll take a look over the next few days and see if it is a runtime bug.
> 
> Jim
> 
> > -----Original Message-----
> > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > bounces at antlr.org] On Behalf Of Nico Kruithof
> > Sent: 21 September 2007 09:02
> > To: antlr-interest at antlr.org
> > Subject: [antlr-interest] Problem with the C treeparser.
> > 
> > Hello,
> > 
> > I get this weird error with the C-tree parser (antlr-3.0.1) and I have
> > no clue what is going wrong. I wrote a simple grammar that reads in
> > words and stores them in the default AST. Then a tree-parser goes over
> > the tree and prints out the words. Now, everything is fine for 'small'
> > files (<130k), but for larger files, the program segfaults in a memmove
> > that is called from libantlr3c.so. Attached is the sample code, which
> > is as small as possible. A "make main && ./main test.in" should work.
> > If you remove the last line from test.in, the program runs fine.
> > 
> > I would be happy if someone could verify the error and tell me what is
> > wrong.
> > 
> > Thanks in advance,
> > Nico Kruithof
> 
> 



More information about the antlr-interest mailing list