Dynamic Elements of Language [message #1805166] |
Tue, 09 April 2019 02:28  |
Eclipse User |
|
|
|
Hi All,
Thanks for your guidance and support.
I want to know one of the feature availability in Xtext. Normally we have some language fundamentals which we used to write the program in the language.
For example,
Write "Hello world"
As per the language, this will get write in the output console as "Hello world".
In my case user also can create their own syntax of commands,
For example WriteString "I am new one"
For this, user will create a text file and write the name,format and description
like newcmd name="writestring" format="%s" desc="Print only String"
This can be changed, created at run time, based on the text file changes, it needs to refreshed automatically.
I need the help on the below,
1. Is it possible to import new grammar into already running eclipse?
2. Is it EMF model or some other concept help me to achieve this?
|
|
|
|
Re: Dynamic Elements of Language [message #1805191 is a reply to message #1805188] |
Tue, 09 April 2019 11:48  |
Eclipse User |
|
|
|
can the params be IDs too or strings, ints etc only.
if yes you could have two dsl (parts), one that declares things,
one that uses them.
if you know where params are and where a "call" is you could have a
callee=[Declaration] params+=Parameters*
|
|
|
Powered by
FUDForum. Page generated in 0.06537 seconds