It has the look of a production grammar with the reduction actions stripped out (but whatever they used didn't strip the %{ initializer block). I would say that, for starters, you want to strip or modify the %{ block, and possibly remove/replace the empty { } actions in the grammar. More I can't say; I know yacc, not happy.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com