foreach grammar and semantic actions should work