Author Topic: QE_with_colours' evolution  (Read 6996 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10316
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: QE_with_colours' evolution
« Reply #15 on: March 18, 2020, 02:28:21 AM »
The way I did the words 20 years ago was to load them into a hash table that I had in PowerBASIC so that access time for getting the words was fast enough. I don't have one written for masm but I think you can make a IF based tree grouping words that start with the same character to reduce the number of branches that you would have in a linear word list. To get the different colours I grouped each class of words with a single number so for example, registers=1, directives=2 etc ....

I would be inclined to do all the words in a single case rather than having both upper, and lower case as well as mixed case as a case conversion is fast enough not to have to bother with all the options and it reduces by half that number of entries.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

HSE

  • Member
  • *****
  • Posts: 2366
  • AMD 7-32 / i3 10-64
Re: QE_with_colours' evolution
« Reply #16 on: March 18, 2020, 03:39:00 AM »
The way I did the words 20 years ago was to load them into a hash table
You mention that recently. I taked note  :thumbsup:

I would be inclined to do all the words in a single case...
Yes. It's the only way that syntax highlighting work like "typing error detection". Some words can be written in upper or lower case but, for example, I don't write registers in upper case, and so on.
Equations in Assembly: SmplMath

HSE

  • Member
  • *****
  • Posts: 2366
  • AMD 7-32 / i3 10-64
Re: QE_with_colours' evolution
« Reply #17 on: March 20, 2020, 09:27:29 AM »
Just playing a little more  :biggrin:

Words are detected now. And that requiere also detect numbers!

Only CPU registers are detected, using some kind of tree. I found there is examples of hashtables in \masm32\examples\advanced to copy but that will be in some future  :cool:.

Files updated in first post.
Equations in Assembly: SmplMath

zedd151

  • Member
  • *****
  • Posts: 1932
Re: QE_with_colours' evolution
« Reply #18 on: October 01, 2022, 04:56:04 AM »
As some here know, I like writing and using qeditor plugins. There are many useful features/fuctions that can be added with them. I am surprised I hadn't seen this thread already. I found this thread by looking at the 'Who's Online' list. (I like seeing what other users find interesting) A Guest was viewing the thread, so I followed and found it.
The closest thing I had done with a qeditor plugin was to have a plugin that searches the text for a string and highlights the occurrences of that string if found.
Nice little plugin HSE.  :thumbsup:

For this type of plugin I would probably use an external file with the words needed to be highlighted and their color. This way the user can change the words to be highlighted and their colors without having to rebuild the plugin (of course would be slower). Would be nice if a plugin could run automatically at the startup of qeditor, rather than having to select it from the menu. (Not a request hutch-- for any changes  :tongue: ) Would make using this type of plugin much easier.
Regards, zedd.
:tongue:

HSE

  • Member
  • *****
  • Posts: 2366
  • AMD 7-32 / i3 10-64
Re: QE_with_colours' evolution
« Reply #19 on: October 01, 2022, 06:13:54 AM »
Thanks :thumbsup:

Second plugin, Iczelion syntax method, use a file with several word categories.
Equations in Assembly: SmplMath

zedd151

  • Member
  • *****
  • Posts: 1932
Re: QE_with_colours' evolution
« Reply #20 on: October 01, 2022, 06:22:37 AM »
Second plugin, Iczelion syntax method, use a file with several word categories.
I totally missed that one (I didn't read through all the replies). Nice.  :biggrin:
Regards, zedd.
:tongue: