Tuesday, 27 August 2013

Translator: pseudo-code to a concrete language (PHP, JAVA) library suggestion

Translator: pseudo-code to a concrete language (PHP, JAVA) library suggestion

I'm building a visual programming tool and was wondering if you could
suggest a library or even throw at me ideas about a tool that I can build
myself that translates the pseudo-code to a concrete language as PHP,
JAVA. For example for a pseudocode like that:
do i = 1 to 100
print "Hello World !!!";
newline;
end do
I would like to get something similar to:
in PHP:
for ($i = 1; $x <= 100; $x++) {
echo "Hello World !!!";
echo PHP_EOL;
}
in Java:
for(int i = 1; x <= 100; x++) {
System.out.print("Hello World !!!");
System.out.print("\n");
}
I don't just want a translator from PHP to Java or vise versa. I guess my
question is: Will I be able to generate code in all kinds of languages
after specifying some basic language structure rules and writing the
pseudo-code? I want to break the gap between the pseudocode and code in a
concrete language so I won't need to translate the code by hand. Also by
writing the algorithm in pseudocode once, I would generate the code in a
whatever language I want.
Thank you for your feedback!

No comments:

Post a Comment