Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Define a limited string consisting out of figures only
Define a limited string consisting out of figures only [message #1835295] Mon, 30 November 2020 11:58 Go to next message
Nils K. is currently offline Nils K.Friend
Messages: 13
Registered: November 2020
Junior Member
Hello,

I want to define a string in my grammar that consists of figures only and is limited in length. In best case I want to verify further rules and if that figure matches a certain type (e.g. matches type long or is within the range of 100 to 2000). How can I do that in xtext?

I thought about something like the following rule, but to be honest I have still issues defining that grammar for all requirements here. Hints? Ideas?

terminal FIGURESTRING returns ecore::EString: '"' ('0'..'9')* '"' | "'" ('0'..'9')* "'";
Re: Define a limited string consisting out of figures only [message #1835306 is a reply to message #1835295] Mon, 30 November 2020 14:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
I think you accidentally posted to this forum when you intended to post to the TMF forum where I see you've previously posted questions about Xtext.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Define a limited string consisting out of figures only [message #1835315 is a reply to message #1835306] Mon, 30 November 2020 15:41 Go to previous message
Nils K. is currently offline Nils K.Friend
Messages: 13
Registered: November 2020
Junior Member
thanks for pointing that out - i thought it can be posted here as well and i feel as newcomer to xtend :)
Previous Topic:& symbol not working in plugin.xml
Next Topic:Unable to see the option to create new Javascript project
Goto Forum:
  


Current Time: Fri Mar 29 00:27:51 GMT 2024

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

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

Back to the top