Skip to main content



      Home
Home » Modeling » TMF (Xtext) » mismatched input '<EOF>' expecting
mismatched input '<EOF>' expecting [message #1038053] Wed, 10 April 2013 06:47 Go to next message
Eclipse UserFriend
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 07:18] by Moderator

Re: mismatched input '<EOF>' expecting [message #1038107 is a reply to message #1038053] Wed, 10 April 2013 08:12 Go to previous messageGo to next message
Eclipse UserFriend
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 08:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

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

Alex
Re: mismatched input '<EOF>' expecting [message #1038153 is a reply to message #1038129] Wed, 10 April 2013 09:23 Go to previous messageGo to next message
Eclipse UserFriend
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 09:32 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: mismatched input '<EOF>' expecting [message #1038170 is a reply to message #1038159] Wed, 10 April 2013 09:51 Go to previous messageGo to next message
Eclipse UserFriend
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 01:49 Go to previous messageGo to next message
Eclipse UserFriend
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 01:52 Go to previous messageGo to next message
Eclipse UserFriend
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 02:19 Go to previous messageGo to next message
Eclipse UserFriend
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 02:24 Go to previous messageGo to next message
Eclipse UserFriend
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 03:08 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 11:45:23 EDT 2025

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

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

Back to the top