EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SubLexer question

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
hyperspeed



Joined: 28 Sep 2006
Posts: 16

PostPosted: Wed Mar 07, 2007 6:14 am    Post subject: SubLexer question Reply with quote

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
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Wed Mar 14, 2007 8:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group