Input for single production,isTerminal array,function.