User Defined Language: Comment & Number vs. Keywords Lists

  • I found a NPP UDL someone else had developed back in 2012 for IBM Cognos TM1. I have since updated it with new keywords to cover the new functions among other enhancements. Two questions:

    1. Is there a common NPP community where I can upload the definition for other folks?
    2. Back ground: TM1 uses # as the comment notation character. There is a third-party add-on tool named QUBEdocs which allows for automation of model documentation. This product takes advantage of the comment character (#) by allowing tags such as #LASTCHANGE which can be entered into the code and then are picked up by QUBEdocs and placed into the HTML documentation it generates.
      Here is the challenge and question: I have identified # as the Open Comment line style and place the QUBEdocs tags in a Keywords Lists group. However, all lines which start with # are styled the same and the QUBEdocs keywords are not styled according to the assigned definition. This leads me to believe that the comment is processed before the keywords. How can I change this language definition so the QUBEdocs tags are styled separately?

  • @Christopher-Redmond

    I don’t know TM1 but what you could try is to use # as a delimiter and
    allow nesting of your keywords.


  • If there aren’t many of the #keywords, you can use the delimiters on the Operators & Delimiters tab.

    Define the #keywords from longest to shortest and choose whatever style(s) you want for each:

    Delimiter 1: Open = “#LASTCHANGE”, Close = “((EOL))”
    Delimiter 2: Open = “#OTHER”, Close = “((EOL))”

    Delimiter 8: Open = “#”, Close = “((EOL))”

  • @Christopher-Redmond

    Actually, I think you can define several #keywords in one delimiter style (separate them with spaces):

    Close = “((EOL)) ((EOL)) ((EOL))”

Log in to reply