BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SynEdit To Xml

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Dennis Landi
Guest





PostPosted: Wed Apr 19, 2006 6:03 pm    Post subject: SynEdit To Xml Reply with quote



Hi,

I haven't used SynEdit before so I'm not familiar with its internal
design or code. So any pointers would be appreciated.

I want to be able to utilize SynEdit's Highlighting capabilities outside
of the SynEdit control itself. Ideally, I would like to produce a
non-visual high-lighted xml output instead of a visual "RichMemo" display.

Is that clear? Note, I am not asking about writing a highlighter for
XML (!). Instead, I want to capture as xml the highlighted syntax ouput
for the script that I pass into the parser. In a way, I want to create
a standalone "Highlighter Server" to which I submit "syntax" and get
back the same syntax as xml with xml markup representing the highlighted
information. Got it?

What is the bare minimum of units from the SynEdit code base that I need
to accomplish this?

(I'll try this newsgroup first; and, if this turns out not to be a
fruitful forum, I guess I'll try non-tech.)

Thanks.

-d
Back to top
Mike Lischke
Guest





PostPosted: Thu Apr 20, 2006 7:03 am    Post subject: Re: SynEdit To Xml Reply with quote



Dennis Landi wrote

Quote:
What is the bare minimum of units from the SynEdit code base that I need
to accomplish this?

I don't know SynEdit's structure anymore, but I guess it is very similar to
that of my Unicode Editor (http://www.soft-gems.net/UCE.php). The usual way
is that a special lexer class is created by some external tool which
provides additional information about a syntactic element (like identifer,
string, number etc.). This additional info (in case of a syntax
highlighter) is the font and color setting for that element. So all you
need is to instantiate the appropriate syntax highlighter and give it the
text to tokenize and iteratively call its nextToken method (or however it
is called). It will return the text of the next token along with its font
and color values.

Since this is not bound to any visual control I think this is what you need.

Mike
--
www.soft-gems.net
Back to top
Uli Gerhardt
Guest





PostPosted: Thu Apr 20, 2006 11:03 am    Post subject: Re: SynEdit To Xml Reply with quote



Quote:
Got it?
I'm not sure. Smile

IIUC maybe you want to have a look how "Source Export" in GExperts is
done. It uses SynEdit's export capabilities. (unit GX_SourceExport in e.g.
http://gexperts.sourceforge.net/daily/GXSource-Latest.zip)

HTH, Uli.



--- posted by geoForum on http://delphi.newswhat.com
Back to top
Dennis Landi
Guest





PostPosted: Thu Apr 20, 2006 1:03 pm    Post subject: Re: SynEdit To Xml Reply with quote

Uli Gerhardt wrote:
Quote:
Got it?

I'm not sure. Smile
IIUC maybe you want to have a look how "Source Export" in GExperts is
done. It uses SynEdit's export capabilities. (unit GX_SourceExport in e.g.
http://gexperts.sourceforge.net/daily/GXSource-Latest.zip)

HTH, Uli.



Thanks to Uli and Mike Lischke!

-d
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) 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, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.