Possibly the problem is easier to spot if you formatted like this: common_param : ( 'gender=' VAL ) | ( 'race=' VAL ) | ( 'name=' VAL ) | ( 'age=' VAL ) New_Line+ ; so it's obvious then that common_param has 4 productions, only one of which can end in a newline.