[TxMt] Verilog language bundle

Charilaos Skiadas cskiadas at uchicago.edu
Mon Dec 5 02:53:54 UTC 2005


You had a parenthesis wrong further down the line I think, try this:

match = "\b(((([0-9]*)'b[0-1zZ\?]*)|0(x|X)[0-9a-fA-F]*)|(([0-9]+\.? 
[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?(L|l|UL|ul|u|U|F|f|ll|LL|ull| 
ULL)?)\b";

This correctly highlights the binary things, though it does not  
recognize them if they start with ', not sure why not yet, but if you  
are worried about the ', just use double quotes on the outsides, and  
then you don't have to escape it. Let's just hope you don't have to  
match both ' and " at the same time.

Ok, I now know why it doesn't recognize then when you start with '.   
The \b is a "word boundary" so checks changes from what is happening  
before. I don't understand it myself very well, but your problem here  
is that \b followed by a non-number will expect a number before it,  
and so it won't get triggered unless there is a number before the '.  
So if you remove the \b's from both ends, it should work, though  
maybe it breaks elsewhere. I'm sure there is a better answer, but  
I'll leave someone with more experience with the oniguruma syntax  
answer that. I guess it depends on what is allowed to precede the '  
in the overall syntax etc.

Haris






More information about the textmate mailing list