Wordpress Themes

A place for my programming projects and the occasional blog about technology related matters.

Binary Tree Image

Author einar | 20.09.2007 | Category C#, code

Recently I had a school project where we needed to parse a certain grammar into a syntax tree and do some analysis on the code. Everytime I’ve had to work with trees (which has only been for school projects actually) I’ve been frustrated because it can be hard to visualize the tree, especially when it starts getting large. I’ve pretty much done two things in that situation, either draw the tree on a piece of paper, which takes a lot of time and is very boring, or try to look through the structure in the debugger, which gives you some idea but is not really very convenient. So, when I was working on this new project I figured I could probably come up with some simple way of displaying the tree while I was working on it. I wanted the solution to be re-usable so I could pull it out again the next time I have to work with binary trees without having to change it to match the new project. So, here’s what I came up with.
Read More…