I'm trying to implement a tokenizer for Haskell, it has a bit involved token structure that can be seen in code here:
https://github.com/ghc/ghc/blob/master/compiler/basicTypes/Lexeme.hs
In regexp-like terms it would be:
(LowercaseLetter|OtherLetter|_)(UppercaseLetter|LowercaseLetter|OtherLetter|TitlecaseLetter|DecimalNumber|OtherNumber|'|_)*ModifierLetter*#*
In human terms: a non-uppercase letter or underscore, followed by any numbers of letters, numbers, underscores, apostrophes followed by any number of modifier letters followed by any number of hashes.
How do I write a regexp in emacs lisp that uses Unicode General Categories as indicated above?