Idea for code generation visualization (Does ANTLR do this?)

30 views
Skip to first unread message

John Carlson

unread,
Jun 8, 2016, 7:37:48 AM6/8/16
to antlr-discussion
So I have source code, a grammar/translator and generated code.  Can I mouse over a section in the source code or generated code, have the system automatically highlight the related code (where it was generated from or what it generates) and highlight the grammar/translators sections which generated or parsed the code?


Thanks,

John

Mike Lischke

unread,
Jun 8, 2016, 7:49:27 AM6/8/16
to antlr-di...@googlegroups.com
John,

> So I have source code, a grammar/translator and generated code. Can I mouse over a section in the source code or generated code, have the system automatically highlight the related code (where it was generated from or what it generates) and highlight the grammar/translators sections which generated or parsed the code?


Try running the code generation with the -XdbgST flag. That will open a simple java app that allows to browse the generated code and shows which template generated it. Is that what you want?

Mike
--
www.soft-gems.net

John Carlson

unread,
Jun 8, 2016, 7:57:20 AM6/8/16
to antlr-di...@googlegroups.com
I also want the original document to be highlighted when I mouse over a template or the generated code. I want all three highlighted at the same time.

Thanks,

John
> --
> You received this message because you are subscribed to a topic in the Google Groups "antlr-discussion" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/antlr-discussion/bj8SpJJkf7I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to antlr-discussi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

John Carlson

unread,
Jun 8, 2016, 8:16:06 AM6/8/16
to antlr-di...@googlegroups.com
It’s very close. Thanks a lot for the clue of the command line argument. Now I just need to find an XSLT implementation. Antlr wouldn’t happen to implement XSLT would it?

John
> On Jun 8, 2016, at 7:49 AM, 'Mike Lischke' via antlr-discussion <antlr-di...@googlegroups.com> wrote:
>

Mike Lischke

unread,
Jun 8, 2016, 8:58:34 AM6/8/16
to antlr-di...@googlegroups.com
> It’s very close. Thanks a lot for the clue of the command line argument. Now I just need to find an XSLT implementation. Antlr wouldn’t happen to implement XSLT would it?

Nope, all what's available (to my knowledge) is this "debugger".

>
> John
>> On Jun 8, 2016, at 7:49 AM, 'Mike Lischke' via antlr-discussion <antlr-di...@googlegroups.com> wrote:
>>
>> John,
>>
>>> So I have source code, a grammar/translator and generated code. Can I mouse over a section in the source code or generated code, have the system automatically highlight the related code (where it was generated from or what it generates) and highlight the grammar/translators sections which generated or parsed the code?
>>
>>
>> Try running the code generation with the -XdbgST flag. That will open a simple java app that allows to browse the generated code and shows which template generated it. Is that what you want?
>>
>> Mike
>> --
>> www.soft-gems.net
>>
>> --
>> You received this message because you are subscribed to a topic in the Google Groups "antlr-discussion" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/topic/antlr-discussion/bj8SpJJkf7I/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to antlr-discussi...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mike
--
www.soft-gems.net

Reply all
Reply to author
Forward
0 new messages