Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Beginner tries on Xtext
Beginner tries on Xtext [message #1828528] Thu, 11 June 2020 07:41 Go to next message
Eclipse UserFriend
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 09:06 Go to previous messageGo to next message
Eclipse UserFriend
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 09:12] by Moderator

Re: Beginner tries on Xtext [message #1828558 is a reply to message #1828528] Fri, 12 June 2020 02:32 Go to previous message
Eclipse UserFriend
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: Sat Jul 19 16:46:29 EDT 2025

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

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

Back to the top