fixed the duplication bug, the parser works as expected with the current test. precedence is yet to be implemented.