View previous topic :: View next topic |
Author |
Message |
hyperspeed
Joined: 28 Sep 2006 Posts: 16
|
Posted: Wed Mar 07, 2007 6:14 am Post subject: SubLexer question |
|
|
Hello.
I want to get sub lexer example demo.
I'm now making MDI App. It use 1 SyntAnalyzer for Master SynObj
therefore All MDI Child windows have same SynObj for user can change
highlight setting of child windows at once.
but each MDI Child must have indivisual tag detector rule(syntax highlight)
.
So i intend to use sublexer(I guess it's a best solution isn't it?)
I did like below
1. Made SubLexer with tag detector rule and style
and Always enabled checked
2. Master SyntAnalyzer/Sub lexers/Sub lexer
Set SubLexer and End/Start at ... two Checked
Always enabled checked
(Start/End condition left blank)
After like above Editor highlight set as sublexer and master rules all gone..
I want to use Master rules and just only tag detector values of sublexer
get highlighte of sublexer....
How do i do that?
Thanks a lot. |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Wed Mar 14, 2007 8:14 pm Post subject: |
|
|
Hello,
To make derived lexer:
1. Create new lexer (master) with a set of new rules.
2. Mark each rule as "Always enabled"
3. Add Sub-Lexer to this lexer with attributes "Start at the bigin of text" and "End at the end of text".
In this case, initially will be executed master's rules, than all rules of inherited lexer (sub-lexer).
Michael. |
|
Back to top |
|
|
|