Fork me on GitHub

BinarytreeDrawer

By Chenbo.Li

Your browser does not support Canvas element. Please upgrade your browser asap.
Use `RightClick -> Save as` to save the image as png format.

Note: Try to input an expression of a BinaryTree with the form LBTR(Li's BinaryTree Representation) which defines as follows:

Key ::= [^\(\)]+
BinaryTree ::= <Key>()()
BinaryTree ::= <Key>(<BinaryTree>)()
BinaryTree ::= <Key>()(<BinaryTree>)
BinaryTree ::= <Key>(<BinaryTree>)(<BinaryTree>)

Try to be used to it with the following examples:
(Copy and Paste them to the textbox once a line)
A()()
A(B()())()
A()(C()())
A(D()(E(G()())()))(HelloWorld!()())

Thanks to nihilogic for providing a converter from canvas to img file. This solves the problem of non-firefox browser.