Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Grammer Help Needed(Type There may not be two features named 'name')
Grammer Help Needed [message #1705459] Sat, 15 August 2015 21:00 Go to next message
Eclipse UserFriend
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 108 times)
Re: Grammer Help Needed [message #1705534 is a reply to message #1705459] Mon, 17 August 2015 08:21 Go to previous messageGo to next message
Eclipse UserFriend
Sorry, I misread the Grammar and made a false suggestion.

[Updated on: Mon, 17 August 2015 08:24] by Moderator

Re: Grammer Help Needed [message #1705539 is a reply to message #1705534] Mon, 17 August 2015 08:41 Go to previous message
Eclipse UserFriend
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: Thu Jul 03 20:30:53 EDT 2025

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

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

Back to the top