Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » mismatched input '<EOF>' expecting
mismatched input '<EOF>' expecting [message #1038053] Wed, 10 April 2013 10:47 Go to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi All,

My grammar is below .I receive an error all time in the program.error :mismatched input '<EOF>' expecting RULE_NL. I do not solved this problem.I did several tests without success Sad Could anybody of you give me a hint? How can I solved Sad


Best Regards

Model :
elements += Elements*
;

Elements:
('abstract')? name =ID (':' inheritance= [Elements|ID] )? NL
( children += Child (':' compartment =[Elements|ID])? NL ( (NL children += Child NL)*)? )?

;
Child:

(name =ID)
;
terminal NL:
(('\r' '\n')? ('\t')? )
;

[Updated on: Wed, 10 April 2013 11:18]

Report message to a moderator

Re: mismatched input '<EOF>' expecting [message #1038107 is a reply to message #1038053] Wed, 10 April 2013 12:12 Go to previous messageGo to next message
Claudio Heeg is currently offline Claudio HeegFriend
Messages: 75
Registered: April 2013
Member
Hello,

as you should notice on running the Workflow, the language has ambiguities and thus, the terminal NL is ignored completely.
The main problem here is the terminal rule which, honestly, I can't make anything of. It's supposed to represent a new line, but can also be nothing or only a tab?
In any case, rules that could be built easily on terminals should be done with Datatype rules, as is nicely expressed here: [1].

That's just some general pointers from me, I suppose someone more experienced like Christian will deliver a more precise answer shortly.

--
[1] http://zarnekow.blogspot.de/2012/11/xtext-corner-6-data-types-terminals-why.html
Re: mismatched input '<EOF>' expecting [message #1038129 is a reply to message #1038053] Wed, 10 April 2013 12:44 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1162
Registered: July 2009
Senior Member
Hi,

could you explain why you need the NL terminal at all?

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: mismatched input '<EOF>' expecting [message #1038153 is a reply to message #1038129] Wed, 10 April 2013 13:23 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi,

I can try indentation based grammar. load program and you can see outline view.I can try to providing this for NL rule.


Re: mismatched input '<EOF>' expecting [message #1038159 is a reply to message #1038153] Wed, 10 April 2013 13:32 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1162
Registered: July 2009
Senior Member
Hi,

I don't think that your grammar approach will work for an indentation sensitive language. You may want to have a look at the following projects
http://code.google.com/p/arcas/source/browse/trunk/congen.xtext/?r=21#congen.xtext or https://github.com/sebastianbenz/eclipse-task-editor.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: mismatched input '<EOF>' expecting [message #1038170 is a reply to message #1038159] Wed, 10 April 2013 13:51 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Alex,

I can try only .I must look at example again.I will try example's method.thank you for help

Best Regards,
Re: mismatched input '<EOF>' expecting [message #1038642 is a reply to message #1038159] Thu, 11 April 2013 05:49 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Alex ,

I can not reach this example : https://github.com/sebastianbenz/eclipse-task-editor.
Password and user name are wanted for download.You could share ?

Best regards
Re: mismatched input '&lt;EOF&gt;' expecting [message #1038645 is a reply to message #1038642] Thu, 11 April 2013 05:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6550
Registered: July 2009
Senior Member
A simple git clone doesn't work?

--
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
Re: mismatched input '&lt;EOF&gt;' expecting [message #1038656 is a reply to message #1038645] Thu, 11 April 2013 06:19 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian,

Yes,authentication is required Sad

Best regards

Re: mismatched input '&lt;EOF&gt;' expecting [message #1038660 is a reply to message #1038656] Thu, 11 April 2013 06:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6550
Registered: July 2009
Senior Member
I am sute it goes without username and password if you use the anon url
git://github.com/sebastianbenz/eclipse-task-editor.git
Re: mismatched input '&lt;EOF&gt;' expecting [message #1038684 is a reply to message #1038660] Thu, 11 April 2013 07:08 Go to previous message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I reach Project ,thank you very much for help.

Best regards
Previous Topic:Possible move coloring after opening?
Next Topic:eclipse 4 DI
Goto Forum:
  


Current Time: Sun Dec 21 06:55:02 GMT 2014

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

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