Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » I have a problem with grammar
I have a problem with grammar [message #51823] Tue, 16 June 2009 11:14 Go to next message
farah Mising name is currently offline farah Mising nameFriend
Messages: 58
Registered: July 2009
Member
Hello, I want to use the tool but my problem is that I can not really, can
I use a simple BNF grammar or is there a particular format to respect?
Thank you for your help
Re: I have a problem with grammar [message #51906 is a reply to message #51823] Tue, 16 June 2009 18:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter.friese.itemis.com

Farah,

On 2009-06-16 13:14:26 +0200, farah.fourati@hotmail.fr (farah ) said:

> Hello, I want to use the tool but my problem is that I can not really,
> can I use a simple BNF grammar or is there a particular format to
> respect? Thank you for your help

You have to use the Xtext grammar to define your DSL. It is quite
similar to EBNF. If you have an existing EBNF-style grammar it should
be easy to translate it (manually).

If you like, you can post your EBNF grammar here and we will provide
clues on how to translate it.

Peter
Re: I have a problem with grammar [message #51931 is a reply to message #51906] Tue, 16 June 2009 23:07 Go to previous messageGo to next message
farah Mising name is currently offline farah Mising nameFriend
Messages: 58
Registered: July 2009
Member
Hello,
this is an extract from BNF that I would look for its metamodel

SpecList := Spec | SpecList Spec;
Spec := Configuration | Style;

Style := "Style" SimpleName
[ TypeList ]
[ "Constraints"
[ ConstraintExpression ] ]
"End Style";

TypeList := Type | TypeList Type ;
Type := Component | Connector | InterfaceType;

...

Please I would like to know how it is possible to do it manually

thank you for your help

Farah
Re: I have a problem with grammar [message #51984 is a reply to message #51931] Wed, 17 June 2009 01:41 Go to previous messageGo to next message
Bruno Fischel is currently offline Bruno FischelFriend
Messages: 6
Registered: July 2009
Junior Member
I made some changes below, but I cannot complete since you did not post
the whole grammar.

Spec : Configuration | Style;

Style : "Style" name=SimpleName
(type+=Type)*
( "Constraints"
(expression=ConstraintExpression)? )?
"End Style";


Type : Component | Connector | InterfaceType;

Look into: http://wiki.eclipse.org/Xtext/GettingStarted
Re: I have a problem with grammar [message #52330 is a reply to message #51984] Thu, 18 June 2009 23:11 Go to previous message
farah Mising name is currently offline farah Mising nameFriend
Messages: 58
Registered: July 2009
Member
hello all of you:

i just want to demonstrate how i made the installation, i want to know if
it is correct or not.
i'm working on platform Windows
jdk java_ee_sdk-5_07-windows-ml
then I unzipped Xtext and i put it in a hidden folder/dropins
then help ->Install new software -> Galileo -
http://download.eclipse.org/releases/galileo
-> modelling ->next...finish
i'd asked you to help because when opening the page I receive 7 warnings
for grammar I would like to have an address where I can contact you.
Do you have a document that helps me and tell me what to do?
thanks
Previous Topic:Re-designed xtext website
Next Topic:getting link name after link resolution failure
Goto Forum:
  


Current Time: Wed Jan 15 13:51:16 GMT 2025

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

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

Back to the top