[code] Lexer creation problem.

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Sat, 7 Nov 2015 21:47:23 +0800

lexer.word_match() acts in a way that's a bit puzzling to me and I'm trying
to work out how to get around it. The issue is this: if I have a token
defined as, say lexer.word_match({"NE"}), this works as expected. "NE" is
properly highlighted in my file. FOO BAR NE BAZ has FOO, BAR, and BAZ not
highlighted and NE highlighted. Perfect. Until I feed it FOO BAR FINE
BAZ. Then NE is again highlighted. Which is really not how one generally
wants for keyword highlighting.

So ... how do I nicely have keywords that are highlighted only when they're
standing alone?

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sat 07 Nov 2015 - 08:47:23 EST

This archive was generated by hypermail 2.2.0 : Sun 08 Nov 2015 - 06:27:26 EST