Using Scanner to parse expression