• Login
Community
  • Login

Create a User Defined Language from existing

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 6 Posters 10.5k 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.
  • B
    Bence Gyula Bujtor
    last edited by Jan 13, 2017, 9:05 AM

    Hey All,

    I wish to make my own Assembly language for my project.
    Is there a way to use the existing Assembly in Notepad++ by creating my own version based on what’s already in?

    Thanks
    Ben

    C G 2 Replies Last reply Jan 13, 2017, 12:31 PM Reply Quote 1
    • C
      Claudia Frank @Bence Gyula Bujtor
      last edited by Jan 13, 2017, 12:31 PM

      @Bence-Gyula-Bujtor

      there is no direct export/import way to do this.
      What you need to do is
      Open langs.xml file which is either under %APPDATA%\notepad++ or within
      installation directory, depends on your configuration, copy the keywords and put it into
      the new UDL keywords box(es).
      Instead of the file you can use the GUI -> Settings->StyleConfigurator->YOUR_LANGUAGE
      and click through the names under Style to get the listed keywords.

      Cheers
      Claudia

      Y 1 Reply Last reply Aug 26, 2021, 12:38 PM Reply Quote 0
      • M
        My1
        last edited by Jan 23, 2017, 11:04 AM

        will there be a way to do this in the future? directly. because I also want to modify a few aspects of the Language I use.

        1 Reply Last reply Reply Quote 0
        • G
          gstavi @Bence Gyula Bujtor
          last edited by Jan 23, 2017, 12:17 PM

          @Bence-Gyula-Bujtor
          Just to make sure that you mean UDL1 based on UDL2.
          This should be easy enough since every UDL is based on textual definition.
          You will never be able to create a UDL that is based on Scintilla Lexer since these are implemented in C.

          1 Reply Last reply Reply Quote 0
          • Y
            Yoan Soucy @Claudia Frank
            last edited by Aug 26, 2021, 12:38 PM

            @Claudia-Frank This solution is good to recreate styling based on keywords, but is there a way to find out the configurations about operators and delimiters from standard languages?

            I would like to have a new UDL combining the standard styling for html, xml and sql and add some specific user language keywords.

            Thanks

            P 1 Reply Last reply Aug 26, 2021, 1:22 PM Reply Quote 0
            • P
              PeterJones @Yoan Soucy
              last edited by Aug 26, 2021, 1:22 PM

              @Yoan-Soucy ,

              Sorry. The UDL and the Lexers are two separate bits of code, so you cannot just “inherit” or “export” the original lexer to a UDL.

              However, you can add extra highlighting to any builtin lexer (like the HTML or XML or SQL lexer) or to a User Defined Language (UDL) using regexes via the script EnhanceAnyLexer.py that @Ekopalypse shares in his github repo … this might allow you to provide the extra syntax that either the lexer alone or the UDL alone won’t give you.

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