Skip to main content



      Home
Home » Modeling » TMF (Xtext) » [SOLVED]Validation- Grammar mixin semantic validation(How to call semantic validator of the imported grammar? )
[SOLVED]Validation- Grammar mixin semantic validation [message #1352049] Tue, 13 May 2014 05:25 Go to next message
Eclipse UserFriend
Hi guys

I'm developping a new textual dsl with xtext, I have splitted the whole grammar in 3 differents xtext projects related each other as follow:

  • org.xtext.odata (odata.xtext)
  • org.xtext.ogda extends org.xtext.odata (ogda.xtext)
  • org.xtext.obcp extends org.xtext.odata (obcp.xtext)

The extending grammar include the base grammar with the "with" clause and everything works fine. I can use the rule of the super-grammar inside the sub-grammar and there are no generation errors.
Now, I have created many semantic validator classes for the rules specified in the odata grammar but these are not called during the validation of the model of the sub grammar.

There is a mechanism that allow me to include the super grammar validator classes during the validation of sub-grammar models?

I hope I explained it well, thanks Smile

[Updated on: Tue, 13 May 2014 14:21] by Moderator

Re: Validation- Grammar mixin semantic validation [message #1352943 is a reply to message #1352049] Tue, 13 May 2014 14:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

i am note sure if i get your problem. with a simple example it more or less works out of the box if you register all packages in the validators
org.xtext.example.mydslb.validation.AbstractMyDslBValidator.getEPackages()
Re: Validation- Grammar mixin semantic validation [message #1352971 is a reply to message #1352943] Tue, 13 May 2014 14:17 Go to previous message
Eclipse UserFriend
Thanks for your response Christian, I made the override of the getEPackages() method and now works great!

thanks!
Previous Topic:"XtextReconcilerJob" internal error
Next Topic:"XtextReconcilerJob" internal error
Goto Forum:
  


Current Time: Tue Jul 15 19:22:54 EDT 2025

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

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

Back to the top