this fixes the previous beast of number highlighting (which broke some unrelated things, and wasn't complete) with a new beast. this beast, however, is believed to be complete for Racket numbers. also in this commit, lots of cleanup of stray syntax rules that were inefficiently specified or plain incorrect. adjust region match area for all parenthesized/bracketed highlight patterns, so that their contents get matched correctly as well. use \k where it makes more sense than long [everypossiblecharacter] collection matches. add the other "#\specialchar" patterns. still to do: change group linking around so that quoted areas are more easily distinguishable from non-quoted areas.
Words which start like numbers but which are not syntactically valid numbers on the whole are treated by Racket as normal identifiers. This change highlights them as such, and adds some recognition of a few extra number syntaxes not previously recognized. Also add "number-syntax-test.rkt", which has a bunch of test expressions which one can load manually in vim to make sure things are highlighted as expected when something changes. The approach to syntax matching taken here is not as clean as I'd like. The syntax specification for numbers in Racket is rather complex, and when I build a few large regular expression to handle all of it, vim complained about there being too many \(\)s! Now, instead, we match sequences of characters which might be valid numbers, and then try to detect invalid sequences of characters in contained match regions. If a sequence turns out not to be a number after all, and it wasn't qualified with a radix specifier like #d or #x, then overlay it with transparent non-highlightery with its own contains=TOP. This doesn't (and possibly can't, efficiently) identify all possible invalid numbers, but it does get a lot.