Parse and evaluate input