Hi I have a project in which I have to build an algorithm visualization tool. Up until now I have been going in a static direction thinking of having in built menus that allowed a user to create an animation of a sorting algorithms but now my tutor wants me to make the tool more dynamic by allowing user defined algorithms that is my tool should be able to animate user defined algorithms. However I have no real idea of how to do this, I searched around a lot and guessed that I would allow the user to type the user defined algorithm in java and then have to parse the algorithm he/she entered and compile it and generate the animation. I am thinking of using JavaCC to generate a parser for the java programming language itself but I am not sure how to include it the parser and compiler in my project. Any help would be greatly appreciated. Thanks!
DARK_BYTE
0
Junior Poster in Training
Recommended Answers
Jump to PostIf you are on version 6 Java you can directly call methods written in scripting languages such as javascript
http://www.javabeat.net/articles/13-introduction-to-java-60-new-features-parti-2.html
This could be a good format for user-defined algorithms because (a) the syntax is simple and (b) you can call them, in source code form, directly from your Java …
All 3 Replies
JamesCherrill
4,667
Most Valuable Poster
Team Colleague
Featured Poster
DARK_BYTE
0
Junior Poster in Training
JamesCherrill
4,667
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.