Bonj,
Here is the starting point - the rest is up to you (p.s. I have implemented
one of these for (PL/SQL))
1) You need to get a good book on writing compilers - one that has a good
coverage of token concepts, scanning, and parsing techniques.
2) Build your keyword table. Make user that you handle the complete grammar
(identify all delimiters, know the implications of keyword context - for
instance NULL is a keyword, but may appear in many contexts; as a rvalue or
in an expression, or in a literal constant such as a string or comment)...
Whether or not you have a good design starts with the design of the keyword
table.
3) For the control, use the richedit control to display the text. Here is a
link:
http://msdn.microsoft.com/library/d...it/richeditcontrols/aboutricheditcontrols.asp
The richedit control does a lot, and therefore, it quite a monster to
master, but there is a lot of documentation. As for flicker, DO NOT reload
the control all of the time. The most common mistake is to rebuild and
reload all of the time. Do all of the edits and modifications in place. If
this is a dynamic control, and if the user changes the following:
v_firstName := noll;
to this
v_firstName := null;
know that the third token on the line is now a reserved work, and set the
attributes accordingly - do not redraw the entire control...
4) This is not a novice undertaking. If you have already have a good grasp
on 1) and 2), then 3) will be but a walk in the park.
regards,
that's all i have for you on this matter...
roy fine