modified for bison 3.0.2