modify some grammar such as foreach