![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#12 |
|
Programmer
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0
![]() |
What about make intermediate representation based on ILOC?
__________________
Heh. |
|
|
|
|
|
#13 |
|
Newbie
Join Date: Nov 2006
Posts: 7
Rep Power: 0
![]() |
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) |
|
|
|
|
|
#14 |
|
Hobbyist Programmer
|
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 |
|
|
|
|
|
#15 |
|
Newbie
Join Date: Nov 2006
Posts: 7
Rep Power: 0
![]() |
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.
|
|
|
|
|
|
#16 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |