User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Syntax highlighting, code folding, brace matching, code indenting, and function list
6 posts Page 1 of 1
The language I'm using uses a '*' for comment. Prior to the recent release, anything on that line after the comment was shown as comment. Since the last release, if the comment contains a single quote, the rest of the document is marked as unresolved until it finds another unmatched single quote. Examples below:

Code: Select all
EQUATE VAR1 TO 1    ;* This is a good line and the comment shows correctly
EQUATE VAR2 TO 2    ;* This line's not good and anything after the "'" shows as unknown

I've tried various options but have not found a way to make it work properly. Suggestions?
Please post at least the first line of the wordfile used to syntax highlight your files and additionally the line starting with /Delimiters = because otherwise we both waste our time in speculations. Best would be you pack into a ZIP or RAR archive file the entire wordfile and an example highlighted file and attach the archive file to your next post.
Best regards from Austria
Thanks for the suggestion. I have attached a copy of the file and a sample program that demonstrates the issue. (Attached file was deleted later after fixing the issue.)
It was really important to have the wordfile for reproducing this issue with UE v24.00.0.53.

The wrong highlighting of the comments is caused by the multiple syntax highlighting languages defined in the used wordfile. It is standard to have only 1 language per wordfile stored in a wordfiles directory since UltraEdit for Windows v15.00, but a wordfile with multiple languages was nevertheless further supported.

But with the rewritten code for UltraEdit v24.00 there is obviously broken the support for wordfiles with multiple language definitions. The hotfix information page contains for UE 24.20.0.45 released 2017-02-16 the information:

  • Addressed crash when using (legacy) composite wordfile
But this definitely not the only problem as I could see with your wordfile and which I reported to IDM support by email. As long as the wordfile contains more than 1 language, the line comment highlighting for nearly all files by language Universe Basic-BancLine is not working correct.

But wrong language interpreting by UE v24.00.0.53 on using a wordfile with multiple language definitions is not the only problem with your wordfile. There are several other problems as well.

  1. The color and font style settings are not stored anymore in the wordfile and also not read anymore from wordfile since UE for Windows v20.00. Those settings are stored now in the theme file.
    Therefore I strongly recommend to use the macros in ultimate syntax highlighting tools to split the wordfile with multiple languages up into multiple wordfiles each with one language per wordfile, extract the color and font style settings from the wordfiles and import them into the themes file if not already done by UltraEdit on first start after upgrade, and finally delete all color and font style settings.
    For most languages it is most likely best to use the wordfiles installed with UltraEdit v24.00 than the older language definitions currently stored in the wordfile.
  2. String Chars = "'\ is definitely not correct as just 1 or 2 characters can be specified as string characters. I corrected this in attached wordfile to String Chars = "' Escape Char = \
  3. The line starting with /Delimiters = misses the space character required after the equal sign. I fixed this issue and sorted the delimiters alphabetically.
  4. I removed the color and font style settings with macro SettingsDelAll.
  5. The function string %[a-zA-Z_0-9]*: was modified by me to %[0-9a-z_]*: because the find for the function strings are always executed case-insensitive.
  6. The lines with /Indent Strings SOL = and /Unindent Strings SOL = were removed by me as UltraEdit never supported those invented keyphrases.
  7. I executed the macro SortLanguage on the language.
  8. I executed the macro TestForInvalid. Many strings in the color groups contained - which was also defined as word delimiter.
    I removed the dash character from line starting with /Delimiters = to get syntax highlighting of strings containing a dash working. Of course this change requires other delimiter characters left and right of a dash character which is interpreted as minus sign.
    And I fixed the remaining invalid word definitions. Most of them were operators with multiple delimiter characters. Many were variables with delimiter & at beginning (okay, supported) and & at end (wrong, not supported). Some were tags with delimiter < at beginning (okay, supported) and delimiter > at end (wrong, notsupported).
  9. I executed the macro TestForDuplicate which found hundreds of duplicate word definitions, mainly in C7 and C8. I kept for all duplicates the word in the color group with lowest color group number (used for highlighting) and deleted the others (never applied in highlighted file).
  10. I finally executed the macro SortLanguage on the language one more.
The attached ZIP file contains the wordfile for Universe Basic-BancLine with all corrections as described applied.

Let me know if you have more questions or need more help to redefine the set of wordfiles for usage in UltraEdit v24.00.

Update: The issue with wrong syntax highlighting because of using a composite wordfile containing multiple syntax highlighting language definitions was fixed with UE v24.00.0.73. So it is again possible to use a wordfile with multiple syntax highlighting definitions although really not recommended.

Attachments

Best regards from Austria
Thanks for the help! Perfect solution!
(Solved - see last sentence)

Hi

I also ran into the problem with the not highlighted comments after updating form UE 23 to UE 24 (parts of my wordfile are from UE 16 ...)

At first I want to confirm what kmccabe said here: The ultimate syntax highlighting tools
If the name of the language has an "ampersand" (&) or "Umlaute" (ä, ü, Ö, ..) the theme file will not be imported at the end.

I failed finally (not in total, but ...). What I did:

  • Opened my my.UEW file.
  • Ran Macro SplittoWorldFiles. There I get a bunch of split files.
  • Ran WorldFilesToTheme.js. This removed all color definitions from UEW and from split files and created a new file with a list of language color defintions.
  • Saved file to my.UEW.
  • Exported my current theme to "new.ue-theme".
  • Took all lines from language color defintion and merged it into "new.ue-theme" (and, after first error message, removed the "ü" from a language name).
  • Imported new.ue-theme.
  • Closed all files and UE
  • Started UE again.
Result:
  • I use the color reduced wordfile.
  • I use the new expanded theme. In the theme editor all my languages are displayed with all colors as they where before.
Should be fine - but my comments are still not highlighted.
What could be wrong?

Thanks for the great information and tools.

EDIT 1:
In the meantime I did it again, but created a new UEW, merged from all split and color free new files.
-> Same result.

EDIT 2 and solution:
It is wrong to merge the split files again. Each wordfile has to be saved separately!
-> Same result.
UltraEdit 21.00 German / Win 7 x 64 Pro
UltraEdit 24 German / Win 10 x 64 Pro
6 posts Page 1 of 1
cron