haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
297 stars 82 forks source link

[ fixed #46 ] give proper error when no lexing rules #157

Closed andreasabel closed 4 years ago

andreasabel commented 4 years ago

The new error

  file.x contains no lexer rules

can be tested with file.x containing

  :- <0> { }

The previous error was

  (Array.!): undefined array element

(I did not find a testsuite testing for error messages Alex gives, thus, no test case with this commit.)