Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross Reference within Quotation Marks
Cross Reference within Quotation Marks [message #1181013] Mon, 11 November 2013 10:02 Go to next message
Marc Herrmann is currently offline Marc HerrmannFriend
Messages: 19
Registered: November 2013
Junior Member
Hello Guys,

i am working on a special grammar for xtext. AT the moment, i am trying to put "Cross Reference" within Quoatation Marks. The specific rule is:

GoStatement hidden(WS):
 gosub?='gosub' '"' sub=[Subroutine|ID] '"'
;


With this rule, i get the following error: missing EOF at 'gosub'

When i Change the " to for example @ everythign is working fine.
Can you tell me how i get it working with Quotation Marks?
Thanks!
Re: Cross Reference within Quotation Marks [message #1181043 is a reply to message #1181013] Mon, 11 November 2013 10:30 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 248
Registered: June 2013
Senior Member
AFAIK, you may have a conflict with the terminal rule STRING if you use the standard xtext terminals.
grammar de.ulrichmerkel.Umecode1 with org.eclipse.xtext.common.Terminals

"terminal" implies that the content between the quotes is not evaluated any further.
You may delete the "with ..." and specify your own version of terminals
where double quotes no longer specify a terminal STRING
Re: Cross Reference within Quotation Marks [message #1181049 is a reply to message #1181043] Mon, 11 November 2013 10:35 Go to previous messageGo to next message
Marc Herrmann is currently offline Marc HerrmannFriend
Messages: 19
Registered: November 2013
Junior Member
Thank you very much for your answer Smile

The Problem is that the double Quotes should still imply String but just not in this specific rule ... Is that possible?
Re: Cross Reference within Quotation Marks [message #1181086 is a reply to message #1181049] Mon, 11 November 2013 11:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13488
Registered: July 2009
Senior Member
Hi what about ref=[Stuff|STRING]

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Cross Reference within Quotation Marks [message #1181092 is a reply to message #1181049] Mon, 11 November 2013 11:11 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 248
Registered: June 2013
Senior Member
Hi Marc,
I think that's a question for someone who is much more experienced than I am right now.
But IIRC, there was a similar question in this forum recently. If you have a look at the last topics ..
Re: Cross Reference within Quotation Marks [message #1181289 is a reply to message #1181092] Mon, 11 November 2013 14:02 Go to previous message
Marc Herrmann is currently offline Marc HerrmannFriend
Messages: 19
Registered: November 2013
Junior Member
ref=[Subroutine|STRNG
] solved my Problem Smile thanks a lot
Previous Topic:How does Xtext resolve references? [SOLVED]
Next Topic:Trouble with parser rules without assignments [SOLVED]
Goto Forum:
  


Current Time: Mon Jul 06 03:49:21 GMT 2020

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

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

Back to the top