improved greatly the value parsing process;
replaced stack mechanism with recursion, and made the state to keep the parsed value instead of a string. (resolves #4)