Changing Antlr build options in workflow? [message #1140764] |
Wed, 16 October 2013 11:45  |
Eclipse User |
|
|
|
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 13:13  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.17521 seconds