Create multiple outputs using combined grammar

21 views
Skip to first unread message

Madhu Rajagopalan

unread,
Feb 11, 2015, 4:09:59 AM2/11/15
to antlr-di...@googlegroups.com
Hi,

I'm not proficient with Java, this might be a basic question.

I want to 
a. gather meta-data about a given program, while also, 
b. rewriting it to another language

For (b), I've written a string template.
Is it possible to achieve both (a) & (b) and have output for (a) routed to out_metadata.txt & output for (b) routed to out_file2.txt?
Pl advise.

THank you.

Eric Vergnaud

unread,
Feb 11, 2015, 7:31:34 AM2/11/15
to antlr-di...@googlegroups.com
ANTLR4 makes it easy to divide this work in 3 steps:
 - 1 parse the input
 - 2 using a listener or visitor gather meta data
 - 3 using another listener or visitor, rewrite in another language
Reply all
Reply to author
Forward
0 new messages