How to define pascal/delphi conditionals in wordfile (if possible)?

How to define pascal/delphi conditionals in wordfile (if possible)?

7
NewbieNewbie
7

    Aug 30, 2009#1

    Does anyone have a solution to how to define those into the wordfile?
    i.e {$DEFINE sometexthere} etc..

    Delphi already uses both comment types ({...} and (*...*) ), but {$ ...} is not.

    I used wordfile Delphi 1.8 .net as my starting point, but I can't seem to get it to handle this properly.

    UE highlighting is somewhat basic for most languages (I'm used to EditPad Pro), but I'd like it to at least do this..

    I use UEStudio 09.20.1005.

    6,686585
    Grand MasterGrand Master
    6,686585

      Aug 30, 2009#2

      Yes, the syntax highlighting engine of UE/UES does not support regular expression definitions for highlighting making such special highlighting requirements sometimes impossible. I can give you no advice how to solve this syntax highlighting problem of UE/UES for this Delphi language special because I could not find a solution. I can only suggest not to use {...} for block commenting which is probably inacceptable for you. Only possible is to define (* and *) as block comment strings and { and } as alternate block comment. Alternate block comments can be highlighted with a different color. That could be used to highlight compiler directives {$...} and of course block comments using {...} completely in a different color.

      delphi1-8(dotnet).uew seems to be very old. Therefore I had attached (already deleted) to this post a hopefully improved version. I don't know much about Delphi nor do I have example files. So please tell me if my version is better and if IDM should upload this version to their server.
      Best regards from an UC/UE/UES for Windows user from Austria

      7
      NewbieNewbie
      7

        Aug 30, 2009#3

        I'm sad to hear that.. I guess it is one of the disadvantages of UE(S).
        However, the file you provided improved some things a bit though (folding), which I've integrated into my wordfile (attached).

        Mine is mostly similar, although it defines some common types etc.
        The {} block comment is rather standard now (while the (**) isn't so much anymore) so that is a no can do.
        I tried using {} as the main comment, and {$} as the alternative, just on a hunch.. It didn't work however.

        One thing I can't seem to get working with the new or old wordfile is ":=" (remove quotes).
        delphi1-8(dotnet).zip (1.27 KiB)   369
        My wordfile

        6,686585
        Grand MasterGrand Master
        6,686585

          Aug 31, 2009#4

          Block Comment On = {$ Block Comment Off = } Block Comment On Alt = { Block Comment Off Alt = }

          would work and favor highlighting of compiler directives over block comments. But line comments, alternate line comments and block comments are all highlighted with the same color and therefore I think this is no help for you.

          The problem you have with highlighting := is probably caused by bad delimiters. Use the attached wordfile which contains all your words and all your color and font style settings and those setting lines created by mistake deleted.

          The only chance to get compiler directives not highlighted as block comment is to use for example always {! or {# as block comment starting string in your Delphi source files and specify this string as block comment on string. That is definitely not the best solution, but would be a helpful workaround for this syntax highlighting problem with UE/UES.
          delphi_wordfile.zip (1.22 KiB)   531
          Updated wordfile with lines and delimiters fixed
          Best regards from an UC/UE/UES for Windows user from Austria

          7
          NewbieNewbie
          7

            Aug 31, 2009#5

            Thank you.. It did solve the := issue.

            In regards to the {$} issue, that's another matter though..