Skip to main content



      Home
Home » Modeling » TMF (Xtext) » AST always getting generated despite errors
AST always getting generated despite errors [message #1115085] Mon, 23 September 2013 12:32 Go to next message
Eclipse UserFriend
Hi All,

I have a XText DSL having certain validators specified.
I am using the generated AST in another code and storing it in the EMF model.

This AST is always generated even though there are certain DSL errors/validation errors, and the AST just 'skips' those specific error cases, and adds on the error free details. So the generated AST is a parsed format of the 'error-free' grammar only.

Is there some way wherein we donot generate the AST at all in case there is any grammar error, rather than the partial generation of the error-free grammar.

It would be great if any of you can provide some help.

Thanks,
Rohit
Re: AST always getting generated despite errors [message #1115136 is a reply to message #1115085] Mon, 23 September 2013 14:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

this is intended behaviour. why dont you simply ask the resource if it has errors?
Re: AST always getting generated despite errors [message #1115428 is a reply to message #1115136] Tue, 24 September 2013 01:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

Thanks for the reply, can you please elaborate on how to do that?

Thanks
Re: AST always getting generated despite errors [message #1115444 is a reply to message #1115428] Tue, 24 September 2013 01:46 Go to previous message
Eclipse UserFriend
Hi,

you did give no context what you do with the model and how you access it.
you would no change the parser or stuff but the code
that works with the AST

(if you have an EObject you can ask it for its eResource and that for errors.
Previous Topic:XPECT testing
Next Topic:Using DSL-Editor in an older Eclipse
Goto Forum:
  


Current Time: Tue Jul 22 23:43:56 EDT 2025

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

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

Back to the top