I'm wrote a recursive descent parser for a project im working on and now I need to create a syntax tree using that parser. I'm not really familiar with any of the tree classes in the java api. So I was wondering what everyone thought would be a good choice. I have node classes that I have written myself. All of my nodes extend from my Node superclass.
Thanks,
Hunter
"If the facts don't fit the theory, get new facts" --Albert Einstein
Sorry everyone I just reread my assignment we dont actually have to create a tree, just need a tree class to hold the root node and are using tabs to indicate tree structure. Sorry for the wasted post.
Now I'm confused--you indicate that you're going to print out a tree structure (I assume you meant using tabs for indentation) but that you don't need a tree, just a tree class hold the root node?
Sorry I didnt explain it fully. All of my node classes inherit from a Node superclass. So all im doing to print out the tree structure is calling all of the node toString() methods and using tabs to indent it.
Ex:
Root
\t Sets:
\t\t digit {0,1,2,3,4,5,6,7,8,9}
\t States:
\t\t initial Q
\t\t final Dead
etc..
-Hunter
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.