Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Changing Antlr build options in workflow?
Changing Antlr build options in workflow? [message #1140764] Wed, 16 October 2013 15:45 Go to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Hi,

Is it possible to change the Antlr build options from the workflow definition?

Specifically I'd like to enable the Antlr -trace option so I can see which grammar rules are being invoked.

Thanks, Steve
Re: Changing Antlr build options in workflow? [message #1140863 is a reply to message #1140764] Wed, 16 October 2013 17:13 Go to previous message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Hi,

You can add Antlr command line parameters to the mwe2 workflow file as follows:

// The antlr parser generator fragment.
fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject {
antlrParam = "-trace"
// options = {
// backtrack = true
// }
}

The trace option results loads of trace statement that will help in tracking the parsers progress, eg:

enter ruleAAAA [@3,8:8='(',<48>,1:8]
enter ruleBBBB [@3,8:8='(',<48>,1:8]
enter ruleCCCC [@4,9:9=')',<49>,1:9]
exit ruleBBBB [@4,9:9=')',<49>,1:9]
...

Cheers, Steve




Previous Topic:Migrating from Xtext 1.0.2 to Xtext 2.0
Next Topic:How to limit the selection of enum literals?
Goto Forum:
  


Current Time: Fri Nov 27 18:53:11 GMT 2020

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

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

Back to the top