generate from an array of semantic actions