Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Rule to ignore a whole line of text(I need a rule that detects a line beginning with a word that I haven't specified and ignore it.)
Rule to ignore a whole line of text [message #1780256] Fri, 19 January 2018 11:02 Go to next message
James Hayes is currently offline James HayesFriend
Messages: 1
Registered: January 2018
Junior Member
I have the following grammar:



'.title=' Title=STRING ';'


(A | B |C| D)

'.a=' name=STRING ';'

'.b=' name=STRING ';'

'.c=' name=STRING ';'

'.d=' name=STRING ';'

What I want is to detect any lines that do not begin with those strings and ignore the entire line up until the line ending ';'.

Thanks very much.
Re: Rule to ignore a whole line of text [message #1780936 is a reply to message #1780256] Tue, 30 January 2018 08:06 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 759
Registered: July 2009
Location: Hamburg
Senior Member
You could try to define your own terminal rules that include the linebreaks.
You don't want to inherit from "Terminals".
You may want to use "hidden".

Get professional support from the Xtext committers at
Previous Topic:Crossreferencing graphiti resources from xtext grammar
Next Topic:Xtext DSL evolution
Goto Forum:

Current Time: Tue Oct 16 06:16:09 GMT 2018

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

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

Back to the top