Community
    • Login

    Syntax Highlighting for EBNF

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 4.1k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors