[antlr-interest] Problem with the C treeparser.

Nico Kruithof Kruithof at jive.nl
Fri Sep 21 01:01:34 PDT 2007


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_treeparser.tgz
Type: application/x-compressed-tar
Size: 5012 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20070921/e4111bc0/attachment.bin 


More information about the antlr-interest mailing list