Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Adding a terminal makes UI editor fail?
Adding a terminal makes UI editor fail? [message #1391799] Tue, 01 July 2014 12:28 Go to next message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
Hey!

I'm running out of ideas here. What i ultimately want is to color java-doc style comments (/** -> */) differently from normale comments (/* -> */). I started experimenting with adding an additional terminal and shadowing the existing ML_COMMENT so that it only matches comments with one star. I had troubles with that. I reduced my changes to only adding a new hidden terminal which handles a completely different syntax (for testing):

terminal MY_DOC_COMMENT	: '(**' -> '*)';


this terminal is hidden, so should not interfere with anybody... However now when i fire up eclipse (without changing a single model file), it gives me this error /after/ the first keyword in each file (why after the first keyword?! why at all? i just added a terminal that nobody is using (yet)):

Multiple markers at this line
- missing EOF at '\n\n'
- extraneous input ' ' expecting RULE_ID

What am i doing wrong?
Re: Adding a terminal makes UI editor fail? [message #1391816 is a reply to message #1391799] Tue, 01 July 2014 13:00 Go to previous messageGo to next message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
hmmm.. as soon as i remove the "hidden(MY_DOC_COMMENT)" instruction, it works (i cannot add comments inline of course because they are not expected at that location .... nobody uses the terminal rule after all)
Re: Adding a terminal makes UI editor fail? [message #1391819 is a reply to message #1391816] Tue, 01 July 2014 13:09 Go to previous message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
nevermind... still not my day today - i need to specify /all/ terminals that should be hidden, not only the ones from this file. otherwise WS is no longer hidden and a whitespace will be a syntax error... Sad
Previous Topic:How to detect parse errors when loading from ResourceSet?
Next Topic:Generating Enums with Xbase
Goto Forum:
  


Current Time: Wed Dec 11 12:11:11 GMT 2019

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

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

Back to the top