|Using an Xbase subset [message #1759651]
||Fri, 14 April 2017 14:17
| Marco Ullrich
Registered: December 2016
during my studies I created an beginner-friendly procedural programming language for educational purpose.
Hence the language had to be simple it only needed to support basic expressions (like additions, multiplikations, etc.) and primitive types like int, float, string and boolean (see attached xtext-file).
This language was created without Xbase because I thought the Xbase-Expressions would be to powerful and complicated for beginners.
Now i need to create a similar, but object-oriented, language.
The language should provide the same operations and types as the procedural language plus user defined classes/objects.
The language should also support debugging.
Therefor I decided to use Xbase this time because it supports debugging and i can quiet directly map my DSL to java-concepts.
But I still have the problem, that the provided expressions and types are too powerful.
I know, that i can rip out some parts of the Xbase-grammar by overriding the grammar-rules (e.g. XSynchronizedExpression).
But then i sill need to reduce the available Java-types to int ,float, string ,boolean and arrays / lists.
So my questions are:
1. Is it a good approach to use Xbase and cut it down to my needs or is there a simpler / better way?
2. Which parts of the framework (e.g. classes) would be a good starting-points for this customization
3. Because I only need a small subset of Xbase, would it be a good idea to skip the Xbase-grammar and use the JVM-Types (http://www.eclipse.org/xtext/common/JavaVMTypes) directly or would this mean a lot of extra work because the validations rely on Xbase?
4. How can I reduce the available Java types to int ,float, string ,boolean and arrays / lists?
5. Are there alternatives to provide debugging for an Xtext DSL?
Thank you in advance and kind regards,
(Size: 3.85KB, Downloaded 58 times)
Powered by FUDForum
. Page generated in 0.01710 seconds