Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to define a rule for a version?
How to define a rule for a version? [message #636343] Sun, 31 October 2010 07:53 Go to next message
Eclipse UserFriend
I would like a rule for a version token like 1.0.20.23 or v1.0.20.23 or 1.0.20Beta.23

I'm trying the following, BUt the parser don't like my idea Wink I'm not really a antlr, AST, compiler Freak Sad

Version: (INT|ID)*('.'(INT|ID)*)?;

Fredy
Re: How to define a rule for a version? [message #636351 is a reply to message #636343] Sun, 31 October 2010 10:36 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Fredy,

please give

Version hidden():
(INT ID? | ID) ('.' (INT ID? | ID))*;

a try.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 31.10.10 08:53, schrieb hauschel:
> I would like a rule for a version token like 1.0.20.23 or v1.0.20.23 or
> 1.0.20Beta.23
>
> I'm trying the following, BUt the parser don't like my idea ;) I'm not
> really a antlr, AST, compiler Freak :(
> Version: (INT|ID)*('.'(INT|ID)*)?;
>
> Fredy
>
Re: How to define a rule for a version? [message #636366 is a reply to message #636351] Sun, 31 October 2010 17:16 Go to previous message
Eclipse UserFriend
Hi Sebastian,
seems to work! Thank you very much!

Fredy
Previous Topic:Importing an external metamodel with sub Epackages in a grammar
Next Topic:How to import existing metamodel (UML)?
Goto Forum:
  


Current Time: Wed Sep 25 22:47:01 GMT 2024

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

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

Back to the top