Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » how to avoid/ignore some code section(how to avoid/ignore some code section which need not to be taken to the xtext model)
how to avoid/ignore some code section [message #629654] Wed, 29 September 2010 07:03 Go to next message
Raj  is currently offline Raj Friend
Messages: 2
Registered: September 2010
Junior Member
Hi

I am designing a DSL using xtext to host c grammar and few tags based syntax. i like to know how to avoid/ignore some code section which is not needed to be taken to my xtext model. Thanks in advance.

Raj
Re: how to avoid/ignore some code section [message #629671 is a reply to message #629654] Wed, 29 September 2010 08:26 Go to previous message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
It all depends on whether you can recognize where such sections start and end. If you want to ignore them, you can basically treat them as comments. That means that if you can come up with a terminal rule to recognize such sections then you can expand the comments terminal rule to include that new rule. Alternatively, you can have an attribute in a type rule which "parses away" the whole section -that way the whole section will be in the model (as a long String), but you can choose not to do anything more with it.

Previous Topic:Adding a prefix to Cross Reference field
Next Topic:Unresolved global references in validation
Goto Forum:
  


Current Time: Fri Apr 26 10:28:46 GMT 2024

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

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

Back to the top