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 #141 ] regex: allow arbitary repetitions #158

Closed andreasabel closed 4 years ago

andreasabel commented 4 years ago

Previously, the r{n,m} and related forms were restricted to single digit numbers n and m.

We fix this by recognizing numbers of > 1 digits as NUM token and adding rules to the regex parsing that also allows NUMs for n and m. Previously, only CHAR was allowed, which subsumes single digits.

simonmar commented 4 years ago

Thanks!