Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Grammer Help Needed(Type There may not be two features named 'name')
Grammer Help Needed [message #1705459] Sun, 16 August 2015 01:00 Go to next message
Shafqat Ullah is currently offline Shafqat UllahFriend
Messages: 1
Registered: August 2015
Junior Member
I have the file uploaded, if i remove sv_logic I don't get the error, but if i add it, i get errors.
can you please help what mistakes I am doing.

I am very new to xtext, so please explain to me in a bit simple way. I will be very thankful.

Best Regards
/Shafqat
  • Attachment: ASIC.xtext
    (Size: 2.68KB, Downloaded 77 times)
Re: Grammer Help Needed [message #1705534 is a reply to message #1705459] Mon, 17 August 2015 12:21 Go to previous messageGo to next message
Stefan Oehme is currently offline Stefan OehmeFriend
Messages: 159
Registered: April 2010
Location: Kiel
Senior Member

Sorry, I misread the Grammar and made a false suggestion.

[Updated on: Mon, 17 August 2015 12:24]

Report message to a moderator

Re: Grammer Help Needed [message #1705539 is a reply to message #1705534] Mon, 17 August 2015 12:41 Go to previous message
Stefan Oehme is currently offline Stefan OehmeFriend
Messages: 159
Registered: April 2010
Location: Kiel
Senior Member

The problem is with the "sv_logic_in_port rule". Through this rule, "sv_in_port" is put in two inheritance hierarchies that both have a feature called "name": "sv_port" and "sv_logic_in_port". By rewriting the rule to

sv_logic_or_port: 
	sv_logic | sv_port;


You get a consistent hierarchy, pulling the "name" up above both "sv_logic" and "sv_port".

I understand that you originally came up with this rule to only allow logic or input ports at certain places. But instead of trying to put that constraint into the grammar, you can have a validation that checks the correctness of the model.
Previous Topic:Grammar debugging
Next Topic:Xtext and EMF Dynamic Templates
Goto Forum:
  


Current Time: Tue Mar 19 11:13:10 GMT 2024

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

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

Back to the top