[GHC-Bugs] Happy 1.9's behaviour for terminals differs from docs and 1.8 ?

Michael Zinn michaelz at cse.unsw.edu.au
Fri Feb 23 07:13:47 EST 2001


The handling of terminals in happy 1.9 seems to have been broken to some
extent;

terminals which DON'T have an explict $$ in them,
ie, tokens defined like:
     %token INT { TokenInt _ }

          as opposed to

     %token INT { TokenInt $$ }

do not get a sibstitution for a happy_var_<position> at all, so referring to
them with $<position> doesn't work.

This is different to the the behaviour in Happy 1.8, where one would get the
whole terminal matched to the happy_var_<position>.

I have done -a- fix for it, which happens to work for my circumstances, and
ought to work in general, but I haven't really thought hard about it enough
to be sure, and in any case, there's probably a better solution :-)
... but if you want it, its at:

http://www.cse.unsw.edu.au/~michaelz/files/ProduceCode.patch
(made with diff -c 5)


I had compiled happy-1.9 from a source tarball, downloaded from

http://www.haskell.org/happy/dist/1.9/happy-1.9-src.tar.gz

on 22/02/2001


Yaay my first bug report out into the big wide world :-)

-- 
Michael `Wumpus' Zinn | "The Universe speaks in many languages, but only one
  michael.z at acm.org   |  voice ... it speaks in the language of hope... trust
         <*>          |  ... and compassion; it is the language of the Heart"
                      |    -- G'Kar's Declaration of Principles (Babylon 5)




More information about the Glasgow-haskell-bugs mailing list