Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 20th, 2006, 8:01 AM   #11
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
The AST for your parser should probably be a binary tree. I'm thinking you need to think about binary trees a bit (re-read Lectric's stuff, and elsewhere). I say that because the concept is simple and shouldn't bumfuzzle you (implementation might). There are definite uses for ternary trees and general trees, but I don't believe that's where you want to go. I wouldn't characterize balanced/unbalanced trees as two different types -- to me, that's just a condition, like a flat tire.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 20th, 2006, 8:38 AM   #12
mikaoj
Programmer
 
mikaoj's Avatar
 
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0 mikaoj is an unknown quantity at this point
What about make intermediate representation based on ILOC?
__________________
Heh.
mikaoj is offline   Reply With Quote
Old Nov 2nd, 2006, 10:32 PM   #13
spaceknight
Newbie
 
spaceknight's Avatar
 
Join Date: Nov 2006
Posts: 7
Rep Power: 0 spaceknight is on a distinguished road
since your all talking about trees, i would like ask if someone here has a sample program or a concept or an algoritm on how to program a tree, that is not binary.

like

\root
- item1
- subitem1.1
- subitem1.2
- subitem1.3
- subitem1.4
- item2
- subitem2.1
- subitem2.2
- subitem2.3
- subitem2.4
- item3
- subitem3.1
- subitem3.2
- subitem3.3
- subitem3.4
- subitem3.5
- subitem3.6
- subitem3.7

yes, like a directory tree in the computer (files and folders)
spaceknight is offline   Reply With Quote
Old Nov 2nd, 2006, 10:47 PM   #14
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: WA, USA
Posts: 343
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
dont dig up old posts, especialy if your not helping the OP.

do not hijack posts.

google first ask questions later
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Old Nov 2nd, 2006, 10:51 PM   #15
spaceknight
Newbie
 
spaceknight's Avatar
 
Join Date: Nov 2006
Posts: 7
Rep Power: 0 spaceknight is on a distinguished road
geez. thanks! i didnt know that. all i have searched was dated 2005. this is closer to lastest... but maybe i should post a new one.
spaceknight is offline   Reply With Quote
Old Nov 2nd, 2006, 11:37 PM   #16
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You should post your problem in a new thread. You also might want to look up "general tree".
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning an array of lists deanosrs C 42 Apr 13th, 2006 2:35 PM
Moving directory trees via .bat files Mansooj Bash / Shell Scripting 11 Jan 17th, 2006 3:45 AM
Flattening Trees Into Arrays Will Piovano C 2 Nov 11th, 2005 9:00 AM
Trees & Checkboxes quants Delphi 0 Apr 18th, 2005 11:18 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:17 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC