[Hugo Ferreira][Positronic Dreams][]
"Somewhere, something incredible is waiting to be known."
- Carl Edward Sagan (1934 - 1996)
🔒 Locked
Script Code Editor - VB6
Advertisement
Original Post
Hi all,
i''m trying to do a small script editor in VB,
to edit scripts for the AI in my game.
I wanted to be able to change the text color
for keyword, like "if" "while" "double", etc...
I also wanted an intellisense and dictionary
option, but for this, a special window must appear
right below the place the cursor is at. So if
im writing function alphabeta, and i''m in the middle
of the word, he should present the "alphabeta" option
right below, for me to choose. Something like
automatic url completion in browsers.
Hope someone can point me in the right direction,
What you need to do is to parse the script while you edit it, build a parse tree and then use this parse tree to guess what the user is typing and to color the keywords (and variables, comments, etc.)
If this advice doesn''t make sense to you I recommend that you read a book on compiler construction theory. My own favourite is the "Dragon book":
Aho, Sethi, Ullman: Compilers - Principles, Techniques and Tools.
Writing a parser, interpreter/compiler is much easier with this theory in place and you will need it anyway when you try to actually make your script run.
If this advice doesn''t make sense to you I recommend that you read a book on compiler construction theory. My own favourite is the "Dragon book":
Aho, Sethi, Ullman: Compilers - Principles, Techniques and Tools.
Writing a parser, interpreter/compiler is much easier with this theory in place and you will need it anyway when you try to actually make your script run.
i was looking for something, a control, that would
enable me to locate word i''m right-mouse-cliking on...
enable me to locate word i''m right-mouse-cliking on...
[Hugo Ferreira][Positronic Dreams][Stick Soldiers]
"Redundant book title: "Windows For Dummies".
"Camouflage condoms: So they won''t see you coming".
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement