Community
    • Login

    UDL Parsing sequence - should honor comments first

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Gerry PalmerG
      Gerry Palmer
      last edited by

      I created a new UDL and encountered a problem caused, apparently, by the UDL parsing sequence. My UDL has comments defined with a specific character sequence that must occur at the start of the line. That generally works, but lines that should be treated as comments but which happen to contain words defined as keywords or characters defined as delimiters or operators give erroneous results. The keywords or delimiters/operators are recognized and highlighted according to the defined styles, but those lines are not treated as comments. This causes numerous bad results. For example, this UDL uses the apostrophe character as a string delimiter, with a leading and a trailing apostrophe. But if there happens to be an apostrophe in a comment line (“yesterday’s file” or some such thing) it is being treated as the start of a delimited string (and highlighted according to the defined style for the delimited strings). The same thing happens if the comment line happens to contain a keyword. The keyword is highlighted according to the style for that keyword type, but the line is not treated as a comment.

      I think that is exactly backwards. When the comment indicator is defined as having to be at the start of the line, then if that comment indicator does occur at the start of a line, no other parsing should occur for that line. It should be highlighted in the “comment” style, but nothing in that comment line should be further scanned for keywords, delimiters, operators, or whatever. If it is a comment, treat it as such.

      Agree? Disagree? Will the UDL developers see this, or is there a better way to pass this suggestion on to them?

      Thanks!

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Gerry Palmer
        last edited by

        @Gerry-Palmer

        actually I think this is the case, maybe I misunderstood your concerns.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors