|Specifying concrete syntax as text in Sirius [message #1777045]
||Fri, 24 November 2017 04:51
| Rohit Verma
Registered: August 2017
I am new to Modelling in general and Sirius in particular.
I am trying to create a language for defining expressions and already have a metamodel defined in EMF (ecore) which I see as the modelling world equivalent of a grammar file of a parser generator tool (Attached metamodel).
I took the starter tutorial and somewhat understand how I can define the concrete syntax of a language visually. However, I want to know if I can also define a textual syntax. So, in short, my metamodel would have a class "Plus", with two associations : 1) LHS which links to another class called IntegerLiteral, and 2) LHS which links to another class called FloatLiteral. The corresponding concrete syntax should be: "Plus" is represented as "+", IntegerLiteral is represented as "1", FloatLiteral is represented as "1.0". The model itself is therefore, "1+1".
Can I do this in Sirius? If yes, then how? Any links to articles/tutorials will be more than appreciated.
Powered by FUDForum
. Page generated in 0.01845 seconds