added stuff to parse.y
merged with mike
's code