View previous topic :: View next topic |
Author |
Message |
mstaszew
Joined: 21 Jul 2006 Posts: 67 Location: North Carolina, USA
|
Posted: Wed May 13, 2009 1:38 pm Post subject: Lexer parser rules expression not working correctly |
|
|
I am not sure what exactly is going on, but let me explain what I'm seeing.
I have some text in the editor that is a mix of ASCII and Korean characters. I have a parser rule with the expression set to [\l]+. When I mouse over the editor I have code set to retrieve TokenAtPos. The return value is -1 for the Korean whereas it is something valid for the ASCII. I have a highlighting style as well set that is not coloring the Korean correctly. On the other hand, if I use that expression in the Find dialog then it correctly locates the Korean text as well as the ASCII.
Also, if I add Korean directly to the conditions list of a Tag Detector rule then the Korean is not colored correctly either.
Thanks,
Michael |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Mon May 18, 2009 5:25 pm Post subject: |
|
|
Hello,
In lexers option (?r) is by default off. So \l metaclass is equal to \g (i.e. latin letter) .
To process national characters (depending on chracter set of the lexer) add option (?r).
Instead of
use
|
|
Back to top |
|
|
mstaszew
Joined: 21 Jul 2006 Posts: 67 Location: North Carolina, USA
|
Posted: Wed May 27, 2009 3:01 pm Post subject: |
|
|
Thanks. This works as expected. |
|
Back to top |
|
|
|