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
Problems when creating ANSI-C like grammar [message #1391163] Mon, 30 June 2014 14:27 Go to next message
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, I cannot post links)
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 somehow change 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 72 times)
Re: Problems when creating ANSI-C like grammar [message #1391171 is a reply to message #1391163] Mon, 30 June 2014 14:41 Go to previous message
St. K. is currently offline St. K.Friend
Messages: 6
Registered: June 2014
Junior Member
sorry, I just saw that I duplicated this...
If somebody could close/delete please

[Updated on: Mon, 30 June 2014 14:42]

Report message to a moderator

Previous Topic:Problems when creating ANSI-C like grammar
Next Topic:Open an XtextEditor and reveal a given EObject
Goto Forum:
  


Current Time: Mon Dec 16 03:21:09 GMT 2019

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

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

Back to the top