Community
    • Login

    Syntax Highlighting for EBNF

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 3.7k 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.
    • bluePlayerB
      bluePlayer
      last edited by bluePlayer

      I want to make custom syntax highlighting but I am not sure how to achieve some things.
      For example comment blocks in EBNF are written with (* and *) but braces “(” “)” are also used as special operators to express a set. I managed to set grey color for a comment block in EBNF, but once I set braces “(” “)” as operators the commented text becomes black again. Can you give me some ideas how to achieve this? Or is it at all plausible?

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

        Hello @bluePlayer,

        I used (* and *) for open/close in comment style
        and () in operators without a problem.

        If the operator ( is encased by a double quote then define this double quote as open close delimiter
        and assigne the same color as used in operator.

        How did you solve it?

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • bluePlayerB
          bluePlayer
          last edited by

          I used double quotes just to separate the braces from other text here on the post. But I don’t have double quotes set as escape character.

          1 Reply Last reply Reply Quote 0
          • bluePlayerB
            bluePlayer
            last edited by

            Ok tried to add some symbols as keywords and now its better. But still I need to work with EBNF to see if all is covered. Will post back here if i have a problem. Some research on EBNF

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