Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Beginner tries on Xtext
Beginner tries on Xtext [message #1828528] Thu, 11 June 2020 11:41 Go to next message
Frank Müller is currently offline Frank MüllerFriend
Messages: 1
Registered: June 2020
Junior Member
Hello,

i got an task about Xtext and have already created a first version. I should design a DSL where a user story should be displayed in this form:

As a <role> I can <capability>, so that <receive benefit>

For me the German version is easier, so i did it in German.

Als <Rolle> möchte ich <Ziel>, um <Nutzen>.

There I have defined the part "<Nutzen>" as non seperable Verb for my first try.

Model:
    usestory+=UseStory*;
    
UseStory:
title=Title    role=Role target=Target use=Use;
    
Title:   
    title= NOUN VERB ':';
    
Role:
    'Als' role=NOUN;
    
Target:
    'möchte' 'ich' target=NOUN;
    
Use:
    use=Verbtype;


Verbtype: Simpleverb | NotSeperableVerb;

Simpleverb:
    'zu' simpleverb=VERB;


NotSeperableVerb:
    notseperable=NOTSEPERABLE;

terminal NOTSEPERABLE:
    'be'VERB | 'emp'VERB |'ent'VERB | 'er'VERB | 'ge'VERB | 'miss'VERB | 'ver'VERB | 'zer' VERB;
terminal NOUN: ('A'..'Z')('a'..'z')*;
terminal VERB: ('a'..'z')+;



I would be grateful for information on what could be left and what should be changed.

Thanks in advance!
Re: Beginner tries on Xtext [message #1828533 is a reply to message #1828528] Thu, 11 June 2020 13:06 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
Hello Frank,

you can take a look at the Jnario and Natural open source projects. They provide similar functionalities.

Both are listed on the Xtext Community Website.

Hope that helps,
Tamás

[Updated on: Thu, 11 June 2020 13:12]

Report message to a moderator

Re: Beginner tries on Xtext [message #1828558 is a reply to message #1828528] Fri, 12 June 2020 06:32 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Please read Christoph's blogs about that:
https://blogs.itemis.com/en/xtext-and-controlled-natural-languages-for-software-requirements-part-1
https://blogs.itemis.com/en/part-2-controlled-use-of-natural-language
Previous Topic:"The method or field Literals is undefined for the type Class<...>"
Next Topic:Formatting and quickfix with model modification
Goto Forum:
  


Current Time: Fri Apr 26 16:54:08 GMT 2024

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

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

Back to the top