 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dennis Landi Guest
|
Posted: Wed Apr 19, 2006 6:03 pm Post subject: SynEdit To Xml |
|
|
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
|
Posted: Thu Apr 20, 2006 7:03 am Post subject: Re: SynEdit To Xml |
|
|
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
|
|
| Back to top |
|
 |
Dennis Landi Guest
|
Posted: Thu Apr 20, 2006 1:03 pm Post subject: Re: SynEdit To Xml |
|
|
Uli Gerhardt wrote:
Thanks to Uli and Mike Lischke!
-d |
|
| Back to top |
|
 |
|
|
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
|
|