string manipulation, it seems like pushdown automata, but much easier than that, just string parse