Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Highlighting Issues with related keyword varieties
Highlighting Issues with related keyword varieties [message #1733926] Thu, 02 June 2016 09:34 Go to next message
Jonathan L. is currently offline Jonathan L.Friend
Messages: 24
Registered: May 2016
Junior Member
Hi,

I got a problem with the highlighting of the following rule:
Par:
	( 'par' | 'par/and' | 'par/or' ) 'do' 
		block+=Block 
		('with' block+=Block)+
	'end'
;

If I place the keywords via content-assist there are no problems and the highlighting works fine.
But there are the following problems:

  • If I type the different keywords manually they will not get highlighted resp. only the part after the '/' will
  • When I write 'par' this will get highlighted; If I then add '/and' or '/or' highlighting get off and even if I delete back to 'par' it will not highlight.

When the Keywords are not highlighted and I change something in the File before this place they will get highlighted again. The same happens if I close and reopen the file.

I figured out that this problem only occures when there are more than two alternatives.
So if I reduce to ( 'par' | 'par/and' ) everything works fine.

Can this get fixed without implementing an extra lexial highlighting?
Re: Highlighting Issues with related keyword varieties [message #1733928 is a reply to message #1733926] Thu, 02 June 2016 09:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
can you share a complete grammar reproducing the problem

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Highlighting Issues with related keyword varieties [message #1733929 is a reply to message #1733928] Thu, 02 June 2016 09:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
p.s. can you please file a bug for that

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Highlighting Issues with related keyword varieties [message #1733930 is a reply to message #1733928] Thu, 02 June 2016 09:59 Go to previous messageGo to next message
Jonathan L. is currently offline Jonathan L.Friend
Messages: 24
Registered: May 2016
Junior Member
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals

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

Root:
	statements+=Statement*;

Statement:
	('par' | 'par/and' | 'par/or') 
	'do' block=Block 'end'
;

Block:
	statements+=Statement*
;


The problem only occurs when there is a special character as seperator.
Re: Highlighting Issues with related keyword varieties [message #1733933 is a reply to message #1733930] Thu, 02 June 2016 10:09 Go to previous message
Jonathan L. is currently offline Jonathan L.Friend
Messages: 24
Registered: May 2016
Junior Member
filed it to https://bugs.eclipse.org/bugs/show_bug.cgi?id=495261
Previous Topic:Make a block ignored by Parser
Next Topic:Xbase fails at finding common Types
Goto Forum:
  


Current Time: Fri Apr 19 19:00:03 GMT 2024

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

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

Back to the top