haskell / happy

The Happy parser generator for Haskell
Other
291 stars 84 forks source link

Happy 2.1 broke `fortran-src` #324

Closed sgraf812 closed 1 month ago

sgraf812 commented 1 month ago

See https://github.com/camfort/fortran-src/issues/293. I tried reproducing the issue with 2.0.2 but failed to do so. I have an idea what has gone wrong: The error indicates that the Lexer emits a token that was not announced to happy via a %token declaration. Rather than panicking we should simply emit a parse error, like we used to (I think).

sgraf812 commented 1 month ago

Hmm. Strangely I couldn't reproduce the issue with 2.1 either.

Anyway, I got rid of the error call that caused https://github.com/camfort/fortran-src/issues/293 in #322, so we should be good after it lands.

Try the package candidate with the following cabal.project:

packages:
  .
  http://hackage.haskell.org/package/happy-lib-2.1.1/candidate/happy-lib-2.1.1.tar.gz
  http://hackage.haskell.org/package/happy-2.1.1/candidate/happy-2.1.1.tar.gz
sgraf812 commented 1 month ago

320 landed. Fixed in Happy 2.1.1.