Abstract Syntax Tree ------------------------------------------------------------------------- *make sure the string you enter on startup has a () around it. Ex, inputting 10 + 10 is invalid, (10 + 10) is operators------------------------------------------------------------- What it accepts, each operator should be in a () Number inputs: single input after: e^,in,round,abs,floor,ceiling,sqrt,asin,acos,atan,sin,cos,tan,log,sig,tah,()!, one input before, one after +,-,*,/,^,mod String inputs, pattern should look like this: pick random () to () join()() letter () of () length of () explanation---------------------------------------------------------- |breaks an expression into a set of solvable steps | (10+(100/(sqrt16))) Current concept to create an AST for evaluation: Index - current letter Balance - if it's 0 at the end, the parenthesis are correct if the letter is (, change balance by 1. If the letter is ), change balance by -1 We can find layers in this way. (hello(world(again))) 1 2 3 210 each parenthesis will make a pair, a value and value -1 1 0 - (hello(world(again))) 2 1 - (world(again)) 3 2 - (again) You'll note that this fails if they more than one are nested in the same parenthesis: (hello(world)(again)) 1 2 12 10 To solve this, each pair that is the same will have its values changed by 1 after initial evaluation. (hello(world)(again)) 1 2 13 20 This way, we can support an infinite amount of variable parentheses combinations. -------------------------------------------------------------------------