" isn't delimiter!!

" isn't delimiter!!

15
Basic UserBasic User
15

    Oct 29, 2004#1

    I've downloaded latest TCL wordfile however, the highlighting engine is treating '\"' as a string delimiter, where as obviously it isn't (I think in any language).
    [It's strange that freeware like Crimson Editor (which is quickly catching up to UE as super-fast WIN editor) can do a much better job..]
    Or, perhaps, I can do it... Anyone can tell me how?

    2
    NewbieNewbie
    2

      Re: \" isn't delimiter!!

      Oct 30, 2004#2

      sometimes i use \\" or even \\\" and almost every editor dies on them.

      somehow they don't recognize if they are in a single or double quoted string

      '\\\"' and "\\\""

      I just comment a extra quote on the next line like
      //' or #'

      6,686585
      Grand MasterGrand Master
      6,686585

        Re: \" isn't delimiter!!

        Oct 30, 2004#3

        It is configurable in UltraEdit, which characters are delimiters. Open the wordfile, go to the language for TCL. The second line starts with /Delimiters =. Delete '\' from that line.

        The wordfiles at the download section are not created by IDM. They are created by users.

        If '\' is normally a delimiter, but is also used as escape character in strings, Escape Char = \ must be defined in the language definition line. See help of UltraEdit about Syntax Highlighting for details.
        Best regards from an UC/UE/UES for Windows user from Austria

        15
        Basic UserBasic User
        15

          Re: \" isn't delimiter!!

          Nov 01, 2004#4

          Mofi, I think you misunderstand the requirement... The double quote is normally a delimiter. However, when prepended with a backslash, it's not a delimiter anymore. That's the problem!
          It seems that syntax highlighting implementation is grade-school programming level in UE - it's completely language-context independent.
          If I'm incorrect, then please tell me how to make \" a non-delimiter whilst keeping \ and " as delimters.

          6,686585
          Grand MasterGrand Master
          6,686585

            Re: \" isn't delimiter!!

            Nov 01, 2004#5

            Okay, now I have understood. You have to define '\' as escape character with Escape Char = \ at the language definition line which should then look like

            /L20"Tcl/tk" Line Comment = # Escape Char = \ File Extensions = TCL TK

            \ and " are still word delimiters, but \" is not a string delimiter anymore. So a string like "string in \"quotes\"" is completely highlighted as string instead of "string in \"quotes\"". But a double click on quotes to select the word marks only quotes without \".
            Best regards from an UC/UE/UES for Windows user from Austria

            15
            Basic UserBasic User
            15

              Re: \" isn't delimiter!!

              Nov 01, 2004#6

              Mofi, thank you very much... It does work!
              May I ask for something else...
              In these TCL instructions,
              set referenceId A85
              set prefix 819045
              both A85 and 819045 are valid TCL scalars.. yet, in UE, only 819045 is highlighted (as a scalar)... How can I change wordfile to make A85 be highlighted as a scalar?

              6,686585
              Grand MasterGrand Master
              6,686585

                Re: \" isn't delimiter!!

                Nov 01, 2004#7

                Hexadecimal numbers, always a problem of highlighting.

                The best solution is to write a 0 before the hexadecimal number (0A85), if the number starts with A-F. Many interpreters even requests this.

                The only workaround for highlighting hexadecimal numbers without a preceding 0 is to add all hexadecimal numbers of your file manually to a color section and set the color for this section to the same of the numbers.
                Best regards from an UC/UE/UES for Windows user from Austria

                15
                Basic UserBasic User
                15

                  Re: \" isn't delimiter!!

                  Nov 02, 2004#8

                  Mofi, "A85" in the example is not a hex number (at least not in TCL)... it's a valid TCL scalar!
                  That's why syntax highlighting cannot be done based on syntax-independence. I had a look at method used by UE and standby my conclusion It seems that syntax highlighting implementation is grade-school programming level in UE.