Without the grammar, or a stack trace or some indication of whether you
mean that the 3.4 tool crashes when generating C, there is nothing I can do
to help you here. I imagine that there is something wrong with the grammar
that happens to be OK with the other targets and is not in the C target
code generating templates (which were changed between 3.3 and 3.4). However
you will need to experiment commenting out rules until you find the rule
that causes ANTLR to break. Also, did you try 3.3 instead of 3.4?



I am sorry but I can’t work out what you mean by “ANTLR.works gives me
green on the grammar (but doesn't generate the compiler either, however it
also has problems with the java target, so I better leave it out for tasks
other than editing and syntax checking).” In the first paragraph you said
that the Java target works, but here you seem to be saying that it does
not, or perhaps just does not with ANTLR Works?



Jim



*From:* antlr-dev-boun...@antlr.org [mailto:antlr-dev-boun...@antlr.org] *On
Behalf Of *Mike Lischke
*Sent:* Tuesday, April 03, 2012 8:35 AM
*To:* antlr-dev@antlr.org
*Subject:* [antlr-dev] C and C++ targets in ANTLR



Hi,



after long absence I am trying again to create new parsers. The last one
was with ANTLR 2.7 several years ago, now I go with 3.4.



My problem is that both the C and the C++ target crash with a stack
overflow error with a large grammar (MySQL 5.1 language). I can easily
create parsers and lexers for C# and Java. I tried increasing the VM memory
to 8GB, and antlr happily consumes it but still it crashes after about 15
minutes.



So, what strategy would be appropriate now to get this working? Since the
grammar works with the other targets and I actually need the full language
stripping down the grammar is not really an option. ANTLR.works gives me
green on the grammar (but doesn't generate the compiler either, however it
also has problems with the java target, so I better leave it out for tasks
other than editing and syntax checking).



Thanks for any help,



Mike
-- 
www.soft-gems.net
_______________________________________________
antlr-dev mailing list
antlr-dev@antlr.org
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to