Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-20-2011, 01:54 PM   PM User | #1
BrickInTheWall
Regular Coder

 
BrickInTheWall's Avatar
 
Join Date: Mar 2009
Location: Munich, Germany
Posts: 139
Thanks: 1
Thanked 13 Times in 13 Posts
BrickInTheWall is on a distinguished road
Java Tree Class

Hi everybody,
I need to implement something, and using an abstract syntax tree seems to be the easiest method. Sadly, I have to do it in Java, and was wondering if there is already a built in Java tree class that I can use for this, or if I have to write my own. I will have to do a lot of transformations on the tree. I would normally use C++ for this kind of work as I already have loads of templates lying around, but I have no option.

Cheers,
Brick
__________________
Call me Brick, if you like!
BrickInTheWall is offline   Reply With Quote
Old 04-20-2011, 04:49 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,661
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
You'll need to write your own Tree, or find an already created package. The core doesn't appear to include a tree. There is a TreeSet and TreeMap, both of which follow an underlying tree model, but when it comes to an ADT where you are doing lots of your own transformations, I think it would just be easier to write your own instead of trying to adapt the currently existing models.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
BrickInTheWall (04-20-2011)
Old 04-20-2011, 05:22 PM   PM User | #3
BrickInTheWall
Regular Coder

 
BrickInTheWall's Avatar
 
Join Date: Mar 2009
Location: Munich, Germany
Posts: 139
Thanks: 1
Thanked 13 Times in 13 Posts
BrickInTheWall is on a distinguished road
Ok, thanks for the info!
__________________
Call me Brick, if you like!
BrickInTheWall is offline   Reply With Quote
Old 04-27-2011, 10:07 AM   PM User | #4
chillchill061
New to the CF scene

 
Join Date: Apr 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
chillchill061 is an unknown quantity at this point
Thanks for the info.
chillchill061 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:38 AM.


Advertisement
Log in to turn off these ads.