haskell / haskell/alex

Empty language crashes alex with (Array.!): undefined array element

Open
#164 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
323
Forks
87
PR merge metrics
No merged PRs in 30d

Description

Alex does not seem to handle the empty language well. MWE:
```
alex --version
echo ":- [] ;" > Test.x
alex Test.x
```
gives
```
Alex version 3.2.6, (c) 2003 Chris Dornan and Simon Marlow
alex: (Array.!): undefined array element
```
I think Alex should report a proper error, or find a way to handle the empty language (e.g. by ignoring it as it can never match anything).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.