Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Subset of Xtext grammar
Subset of Xtext grammar [message #1856153] Wed, 23 November 2022 08:52 Go to next message
Eclipse UserFriend
Hello,

I am considering the possibility of automatically generating Xtext grammar subsets. Starting from an Xtext grammar and some input (it could be a model, configuration file, etc.) that specifies the elements of the Xtext grammar I wish to include in the subset, I can use transformations to generate an Xtext grammar subset.
Based on your knowledge of Xtext and EBNF grammar, do you think this solution would be feasible, or would it be erroneous?

Thanks!
Re: Subset of Xtext grammar [message #1856160 is a reply to message #1856153] Wed, 23 November 2022 12:06 Go to previous message
Eclipse UserFriend
Hi

An Xtext grammar has an equivalent EMF model behind the scenes so you can certainly do transformations on one. (org.eclipse.ocl.examples.xtext2lpg uses MWE2 to sequence a cascade of 3 QVTo transformations to transform from an Xtext model to an LPG representation.)

Whether creating subsets is appropriate is another matter; it would require much more information to comment usefully.

Regards

Ed Willink
Previous Topic:Xtext 2.29.0 is released
Next Topic:Grammar: operation with optional left argument
Goto Forum:
  


Current Time: Wed May 21 11:00:55 EDT 2025

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

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

Back to the top