Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problems when creating ANSI-C like grammar(Trying to convert ANTLR v3 to Xtext, then removing unnecessary features)
Problems when creating ANSI-C like grammar [message #1391122] Mon, 30 June 2014 13:25
St. K. is currently offline St. K.Friend
Messages: 6
Registered: June 2014
Junior Member
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 180 times)
Previous Topic:Getting All DSL Resources in the same Project or dir
Next Topic:Problems when creating ANSI-C like grammar
Goto Forum:
  


Current Time: Sun Dec 15 12:27:15 GMT 2019

Powered by FUDForum. Page generated in 0.01961 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top