Program Synthesis and Semantic Parsing with Learned Code Idioms