I know that javacc can generate code, written in java, which can analyse your code (in a language that you create it's grammar). What I really need, is to generate the java code itself.For example, let's say I write this in my grammar:
show "hello world" (let's say this is in my language)
and then, I want the javacc to turn this line, into:
system.out.println("hello world");
and later I would compile this "generated" java code, and run it, and see the output.
Actually, the purpose is to create a language, which can produce xml files automatically in it. I was thinking of using javacc and some xml parser like dom. But I really don't know if it's a good way to go.
Many many thanks in advance.