How to define third line comment symbol for Clipper / Harbour syntax highlighting?

How to define third line comment symbol for Clipper / Harbour syntax highlighting?

11
Basic UserBasic User
11

    Jan 20, 2018#1

    I need third line comment symbol for Clipper / Harbour project. Because there are a 3 different symbols for line comment:

    Code: Select all

    // this is a comment
    * this line is comment too
    && this line is also comment
    I use Line Comment = // Line Comment Alt = *, but can't find a way to define &&.

    6,675585
    Grand MasterGrand Master
    6,675585

      Jan 20, 2018#2

      Use either Block Comment On = && to highlight everything from && to end of line also with the color of line (and block) comments or Block Comment On Alt = && to highlight everything from && to end of line with the color for alternate block comments.

      A block or alternate block comment definition without an Off string definition is interpreted as one more line comment definition as explained in help of UltraEdit on page Syntax Highlighting as well as in forum topic template for syntax highlighting language wordfile.
      Best regards from an UC/UE/UES for Windows user from Austria

      11
      Basic UserBasic User
      11

        Jan 21, 2018#3

        Thank you very much! I need Block Comment On for block comment begin /*, but with Block Comment On Alt = && everything work fine! :) I made some other changes in file Clipper_xHarbour.uew, such removing Escape Char = \ command, that is not valid for dBase / Clipper. If somebody need this file, here it is:
        Clipper_xHarbour.7z (1.54 KiB)   47

          Jan 25, 2018#4

          Excuse me, but Clipper language have an really idiotic syntax. Any line, starting with * is threat as comment. But symbol * can be used in any other place as multiply operator. Other line comment symbols - && and // - can start comment from any position to the end of line. The only one solution that I found is to use Line Comment Valid Columns = [1-5] to limit position of the * to first 5 symbols. Is it possible to define an rule that any row with first character * is a comment, no matter how spaces and/or Tab symbols are placed before *? At example:

          Code: Select all

          * this line is a comment
                  * this line is also an comment
          ? 2*3 // but in this line comment begin form "//"

          6,675585
          Grand MasterGrand Master
          6,675585

            Jan 25, 2018#5

            There is only Line Comment Valid Columns = and Line Comment Preceding Chars = which can be both used. It is not possible to define that an asterisk should be interpreted as begin of a line comment only on being the first non whitespace character on a line. That would require a line comment definition using a regular expression search. But regular expression searches for syntax highlighting are not supported by UltraEdit v24.20.0.51 (which I know would be useful for a few languages with strange syntax while not needed for hundreds of other languages).

            My advice: Don't use * with the meaning as begin of a line comment. Existing Clipper / Harbour could be searched for ^([\t ]*)\* and replaced with \1// with a Unix or Perl regular expression Replace in Files. The search string is %^([^t ]++^)^* and the replace string ^1// on using UltraEdit regular expression engine. I would never use a programming/scripting language feature being ambiguity even on being supported by the syntax highlighting of used text editor.
            Best regards from an UC/UE/UES for Windows user from Austria