Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Whitespace validator in XText(Resolving the excessive whitespace at the end of a model or a parser rule by raising a validator)
Whitespace validator in XText [message #1806794] Wed, 15 May 2019 08:50 Go to next message
Vishal Balaji is currently offline Vishal BalajiFriend
Messages: 4
Registered: March 2019
Junior Member
Hi,
I am currently using XText 2.17. My issue is that I have to validate the excess whitespace at the end of a parser rule. My current XText code is as below:

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals hidden()

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"

Model:
greetings+=Greeting* ;

Greeting hidden(WS):
'Hello' name=ID WS*'!';

The issue is I don't want to use hidden and should parse white space with a warning. The current code doesn't allow me to do it. It just allows me to write with as many whitespace as possible. Thanks in advance.
Re: Whitespace validator in XText [message #1806801 is a reply to message #1806794] Wed, 15 May 2019 10:31 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
It's best to post to the Xtext forum: https://www.eclipse.org/forums/eclipse.modeling.tmf



Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Highlighting with multiple conditions in a cross tab
Next Topic:Updating: Missing org.osgi.service.event.EventAdmin
Goto Forum:
  


Current Time: Thu Sep 26 07:13:09 GMT 2024

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

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

Back to the top