Setup for enhancing C

I'm trying to write some new statements to create an internal C DSL. The tool of my choice is MPS and the base is the c-core of mbeddr. I found this [1] tutorial on the internet. Since it is a little old, I am not able to duplicate the exact structure of the setup itself.

What I want to do is to create a new language. The language must be extended by com.mbeddr.core. I found, how to extend the language and did so. I needed to extend every single language com.mbeddr.core.* by its own, everything else did not work (it does not even work properly now).

The I created a new statement in a structure module. There I extended the concept to a Statement (c.m.c.statements.structure is shown). Then, following the video tutorial, I wanted to add an expression as a child, this is where it fails.

I am not sure where I went wrong here. It is very difficult to set it up properly, since all tutorials/guides are outdated.

Thanks for your help,

Best Simon

1 comment
Comment actions Permalink
Actually I have the similar problem when I want to add a new statement for C extension. I also followed that tutorial, and the intention shows the alias for that extended statement, but I could not be able to use that statement. I also have no idea what's going on.

But anyway, you can download the mbeddr tutorial projects, within which the source codes are included. Maybe you can get some insights from there.


Please sign in to leave a comment.