Highlighting substrings with an underscore stopped working with UE 2022.1 on using default delimiters (solved)

Highlighting substrings with an underscore stopped working with UE 2022.1 on using default delimiters (solved)

3

    Aug 18, 2022#1

    I have had my syntax highlighting configuration working for years and recently this feature isn't working as it used to. I prefix my input arguments with i_ and constants with c_ for SQL stored procedures. Both are immutable once set in the procedure so I make them the same color. Recently, since upgrading to 2022.1.0.90 64-bit, only the prefix is highlighted not the entire prefix+word. It's like the syntax highlighting does not recognize the _ as part of the word.

    I have in the syntax highlighting wordfile:

    Code: Select all

    /C3"Constants" Colors = 128 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 1
    ** c_ i_
    I have the following code in an SQL file:

    Code: Select all

    replace procedure DB_Nme.ColumnMatch
    (
       in i_SelectDatabaseName          varchar(128)
      ,in i_SelectObjectName            varchar(128)
      ,in i_ReferenceDatabaseName       varchar(128)
      ,in i_ReferenceObjectName         varchar(128)
      ,out o_SQLCode                    integer
      ,out o_SQLState                   char(5)
      ,out o_RtnCode                    byteint
      ,out o_RtnMsg                     varchar(255)
    )
    Only i_ are being highlighted, not i_SelectDatabase, etc. I didn't change anything, I just upgraded UltraEdit.

    Thanks, Paul

    6,636551
    Grand MasterGrand Master
    6,636551

      Aug 18, 2022#2

      I cannot reproduce this issue with UltraEdit for Windows v2022.1.0.90. The substring highlighting worked in my test.

      Please compress the *.uew file used for syntax highlighting the SQL files and an example SQL file with 7-Zip, RAR or ZIP and attach the archive file to your next post so that I can review the wordfile.
      Best regards from an UC/UE/UES for Windows user from Austria

      10210
      Power UserPower User
      10210

        Aug 19, 2022#3

        Have noticed this morning that IDM have released an update for UE and UES to 2022.1.0.100 that addresses syntax highlighting issues.

        UltraEdit v2022.1.0.100 (released 2022-08-18)
        • Addressed crash related to reloading FTP files
        • Theme adjustments to improve contrast in selections containing highlighted code
        • Addressed issue with string character auto-completion
        • Addressed incorrect syntax highlighting colors in some themes
        • Addressed a few syntax highlighting issues
        • Addressed issue with HTML tag auto-completion in PHP files
        • Addressed issue with F5 not refreshing split File Explorer
        • Added support for relative paths for command palette file open
        • Addressed issue double-clicking file tab to close
        • Addressed other syntax highlighting issues
         
        Cheers,
        Frank

        3

          Aug 19, 2022#4

          I have updated to the very latest version (2022.1.0.100 64-bit). This did not solve my syntax highlighting issue though.
          I have also tried changing themes with no success. I expect to see i_ColumnType, i_ColumnLength, etc. to be colored orange.

          My syntax highlighting configuration file is attached.

          Many thanks and regards, Paul
          TeradataSQL.uew (13.74 KiB)   2
          Syntax highlighting wordfile for TeraData SQL and utilities.

          6,636551
          Grand MasterGrand Master
          6,636551

            Aug 19, 2022#5

            I don't know anything about the syntax of Teradata SQL. So it could be that some decisions made on fixing the syntax highlighting wordfile are not good.

            The attached ZIP file contains now the two wordfiles TeradataSQL.uew and TeraDataUtil.uew with following corrections and improvements.
            1. Added /Delimiters = to both wordfiles to define the word delimiting characters instead of depending on internal defaults of UltraEdit. The internal default changed obviously as the underscore is interpreted by UltraEdit v2022.1.0.90 and v2022.1.0.100 as word delimiter which was not the case before. I will ask support of UltraEdit if that change in default list of word delimiters is intentionally or by mistake. The definition of the word delimiters in both wordfiles fixes the problem with substring highlighting. The delimiters list is  based on the operators list as I don't know the TeraData SQL syntax fixes.
            2. Moved the syntax highlighting language Teradata Utilities into a separate wordfile required if ever using in future smart language templates.
            3. There was by mistake Line Block Line Comment = instead  of just Line Comment = in first line of both language definitions. In second language definition was even used wrong double quotes around this definition.
            4. Sorted the file extensions alphabetically for better readability (not necessary for UltraEdit).
            5. Removed all (?i) from the Perl regular expression search strings as this flag for a case-insensitive search is not necessary because of UltraEdit runs the searches for the strings to show in Function List always case-insensitive. See also Case sensitivity of Perl regular expressions in UE/UES.
            6. Removed all color and font style settings not read anymore from the *.uew files since UltraEdit for Windows v20.00. The color and font style settings of a syntax highlighting language are stored in the theme file of the used UltraEdit theme.
            7. Resorted all words in all color groups which fixes also the wrong word definitions of words starting with different character on same line like for /C2"Operators" in TeradataSQL.uew.
            8. Added / to color group for operators in TeradataSQL.uew.
            9. Fixed invalid word definitions like ."HELP BTEQ" or ."SHOW CONTROLS" containing the word delimiter space. It is impossible to define a string for syntax highlighting containing a word delimiter. There is one exception. The first character of a word or substring can be a word delimiter. I suppose the double quotes do not really exist in files with extension ARC FLD MLD.
            10. Removed the substring definition ${ as there is already in same color group the substring definition $ to syntax highlight all strings starting with a dollar sign.
            11. Removed on some color groups the space between the color group number and the color group name enclosed in double quotes.
            There is a remaining issue with TeradataSQL.uew which still contains the invalid substring definition \&& in color group 7. The characters \ and & are defined both as word delimiter. This substring definition is invalid for that reason. There can be removed either this substring definition or the character & is removed from the line beginning with /Delimiters =. I don't know what is better for TeraData SQL syntax highlighting.

            Color group 2 in TeraDataUtil.uew should get also a meaningful name for better identification in the Manage Themes window on customizing the colors and font style for this color group.

            Please let me know after fixing the last issue if there is still something not syntax highlighted as wanted by you and I will try to find a solution for you with the provided example.
            TeraDataSQL_v1.zip (5.72 KiB)   3
            The ZIP file contains the fixed and improved UltraEdit wordfiles for syntax highlighting TeraData SQL and TeraData utility files.
            Best regards from an UC/UE/UES for Windows user from Austria

            3

              Aug 20, 2022#6

              Thanks Mofi, this fixed my issue and I learnt a little from you too! I can deal with the Teradata specific syntax stuff. As you might be able to tell I've had that file for many versions and it's probably suffering from some middle-age spread 😌, thanks again, Paul

              6,636551
              Grand MasterGrand Master
              6,636551

                Oct 08, 2022#7

                Update: UltraEdit for Windows v2022.1.0.112 and UEStudio v2022.1.0.112 released on 2022-10-05 interpret an underscore again as word character and not as word delimiter if the used syntax highlighting wordfile does not contain /Delimiters = to explicitly define the word delimiters.
                Best regards from an UC/UE/UES for Windows user from Austria