Adjust parse expression, and add some unit tests.