Problems when creating ANSI-C like grammar [message #1391122] |
Mon, 30 June 2014 09:25 |
Eclipse User |
|
|
|
I am working on a project where we are trying to create an IDE and some analysis tools for a scripting language that is very close to ANSI-C.
For this project I have taken the ANTLR-grammar I found here
https:// github.com/antlr/examples-v3/blob/master/C/C/C.g (sorry, cannot post it as a link)
and converted it to serve Ctl (the name of the scripting language) .
I had to do some minor adaptions, but in general it should be VERY close to the C grammar.
Some specifics about the language:
- there are no structs, enums or typedefs
- the language supports exceptions
- there are no pointers
- there are &-parameters in function definitions ("out"-parameters)
When I am trying to compile the language I run into
"java.lang.OutOfMemoryError: GC overhead limit exceeded"
exceptions and also
error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279): could not even do k=1 for decision 39; reason: timed out (>10000ms)
Does somebody have an idea how I can debug this or change the xtext to stop the errors from happening?
I am looking forward to your replies!
Thank you,
Stefan
PS: I am using the following options in my the MWE2 workflow:
options
antlrParam = "-Xconversiontimeout" antlrParam = "10000"
options = {
backtrack = true
memoize = true
kAsString = "2"
}
Attachment: Ctl.xtext
(Size: 28.93KB, Downloaded 221 times)
|
|
|
Powered by
FUDForum. Page generated in 0.04809 seconds