Community
    • Login

    Enhance UDL lexer

    Scheduled Pinned Locked Moved General Discussion
    udl
    41 Posts 9 Posters 11.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.
    • Gerald KirchnerG
      Gerald Kirchner
      last edited by

      I have all files zipped.
      http://www.berlin12524.de/npp/DSM4COM_comment.7z
      I will now test the last template.

      EkopalypseE 1 Reply Last reply Reply Quote 2
      • EkopalypseE
        Ekopalypse @Gerald Kirchner
        last edited by

        @Gerald-Kirchner

        am I correct to say that the line /* block comment in one line, forbidden */
        should be colored?
        If so, then you have to remove style 1 from excluded style list, like
        excluded_styles = [2, 16, 17, 18, 19, 20, 21, 22, 23]

        1 Reply Last reply Reply Quote 2
        • Gerald KirchnerG
          Gerald Kirchner
          last edited by

          I have 2 removed. 1 is line style.

          1 Reply Last reply Reply Quote 0
          • EkopalypseE
            Ekopalypse
            last edited by

            Ich schreibe jetzt einfach mal auf Deutsch, da müssen die anderen durch. :-)
            Ich hoffe ich liege dabei auch richtig.

            Die exclusion Liste soll dafür dienen, RegexMatches in Bereichen welche bereits von
            anderen Styles genutzt werden zu ignorieren.
            In Ihrem Fall wollen Sie aber genau hier ansetzen, da diese Art von CommentBlock
            wohl falsch ist, daher muß Style 1 herausgenommen werden damit der Match auch
            farblich dargestellt wird.
            Ich hoffe ich habe mich einigermaßen deutlich ausgedrückt.

            1 Reply Last reply Reply Quote 2
            • Gerald KirchnerG
              Gerald Kirchner
              last edited by

              Dann mal auf Deutsch. Das fällt mir leichter :-)
              Ja, es funktioniert mit weglassen der 1. Auch mit der Vorlage aus /enhance-udl-lexer/7.
              Aber ich begreife nicht warum.
              Definition of which area should not be styled
              übersetze ich mit
              Festlegung, welcher Bereich nicht gestaltet werden soll
              comment line style is ; <-- der soll so bleiben
              comment style is /* */ <-- den will ich ändern

              <Keywords name="Comments">00; 01 02 03/* 04*/</Keywords>
              
              1 Reply Last reply Reply Quote 1
              • EkopalypseE
                Ekopalypse
                last edited by Ekopalypse

                Das fällt mir leichter :-)

                Mir ebenfalls und erspart den Umweg über DeepL.com :-)

                Ich verstehe die Verwirrung. Eigentlich ist es genauso gedacht.
                Zum Beispiel: Sie suchen nach Wörter die meinetwegen auf $ enden aber nur dann
                wenn sie nicht in einem Kommentarfeld sind. Dann macht die exclusion Liste diesen Filter. Da das Wort in einem Kommentarfeld gefunden wurde und entweder Style1 der 2
                benutzt würde der Match ignoriert.
                Bei Ihnen ist der Anwendungsfall nun gerade umgekehrt. Sie wollen die Zeilen finden,
                welche den Style 1 benutzt aber fehlerhaft geschrieben wurde, da nur in einer Zeile
                und nicht wie vorgesehen über mehrere Zeilen. Nun darf die exclusion Liste diesen Style nicht mehr enthalten damit dies auch farblich dargestellt wird.

                1 Reply Last reply Reply Quote 2
                • Gerald KirchnerG
                  Gerald Kirchner
                  last edited by

                  Nach der Definition

                  Definition of which area should not be styled
                  1 = comment line style
                  2 = comment style
                  

                  will ich aber genau die 2 bearbeiten. Und nicht die 1.
                  Kann es sein, das die Definition eventuell mit 0 beginnt und bei mir deshalb die 1 als “comment style” passt?
                  In welcher Quelle findet man diese Zuweisung?

                  1 Reply Last reply Reply Quote 1
                  • EkopalypseE
                    Ekopalypse
                    last edited by

                    Der Source Code zu UDL ist hier einzusehen.

                    Aber das Problem liegt bei mir.
                    Ich habe comment style id und comment line style id verwechselt.
                    Es muß genau anders herum sein

                    1 = comment style
                    2 = comment line style
                    

                    Sorry, verdameleite …

                    1 Reply Last reply Reply Quote 1
                    • Alan KilbornA
                      Alan Kilborn
                      last edited by Alan Kilborn

                      English, anyone?

                      Normally I wouldn’t complain, except Chrome right-click Translate to English failed on this.

                      EkopalypseE 2 Replies Last reply Reply Quote 4
                      • EkopalypseE
                        Ekopalypse @Alan Kilborn
                        last edited by

                        @Alan-Kilborn

                        :-D
                        https://www.deepl.com/translator

                        Alan KilbornA 1 Reply Last reply Reply Quote 1
                        • Alan KilbornA
                          Alan Kilborn @Ekopalypse
                          last edited by

                          @Ekopalypse

                          I’d say the burden is on posters to post in English, not others to translate later. (AFAIK, the accepted language of this forum in English.)

                          EkopalypseE 1 Reply Last reply Reply Quote 3
                          • EkopalypseE
                            Ekopalypse @Alan Kilborn
                            last edited by

                            @Alan-Kilborn

                            Manager summary :-)

                            I failed at the documentation by stating that comment style is using id 2 and
                            comment line style is using 1 whereas it is exactly the opposite.

                            1 Reply Last reply Reply Quote 2
                            • EkopalypseE
                              Ekopalypse @Alan Kilborn
                              last edited by

                              @Alan-Kilborn

                              (AFAIK, the accepted language of this forum in English.)

                              maybe one accepted language as we see more often :-)

                              Meta ChuhM 1 Reply Last reply Reply Quote 1
                              • PeterJonesP
                                PeterJones
                                last edited by

                                But thanks, @Alan-Kilborn,

                                Chrome used to be my backup browser, but I’ve recently switched to it being my primary, and I didn’t know there was an easy RClick>Translate option in Chrome. When I ran it on the German on this page, it translated okay for me. (Which is good, because my 2 years of highschool German from more than a quarter-century ago just didn’t cut it.)

                                But I do agree that the forum’s default language is English, and if people want help here, they should at least provide the translation for us. I understand that some of the posters might be more comfortable (or equally comfortable) in German; and it’s fine for someone fluent in German to answer in German; but also provide a translation to English, so the other people who read this thread – both for those who have started to help, and got lost when it switched language; and for those who come here searching for a solution to a similar problem, and find that the actual answer is buried in another language, when it started in English.

                                1 Reply Last reply Reply Quote 2
                                • Gerald KirchnerG
                                  Gerald Kirchner
                                  last edited by

                                  In the source code I find the place where the numbers are assigned or do not arise.
                                  I would like to find that to be able to understand it.
                                  Then the template would have to be adjusted.

                                  EkopalypseE 1 Reply Last reply Reply Quote 0
                                  • EkopalypseE
                                    Ekopalypse
                                    last edited by

                                    Ok, :-D

                                    the outcome of the discussion is that I need to post another version of the script
                                    which hopefully adresses @guy038 findings as well,

                                    So dear future reader,
                                    if you have read until here - forget about everything you read and hope that you will find
                                    a new version of the script as another post after this one.
                                    :-D

                                    1 Reply Last reply Reply Quote 1
                                    • Meta ChuhM
                                      Meta Chuh moderator @Ekopalypse
                                      last edited by

                                      @Ekopalypse

                                      omg … you are german speaking … that’s the last thing i would have expected … your name sounded so apocalyptically greek 😉

                                      EkopalypseE 1 Reply Last reply Reply Quote 3
                                      • EkopalypseE
                                        Ekopalypse @Gerald Kirchner
                                        last edited by

                                        @Gerald-Kirchner

                                        starting from line 266.

                                        1 Reply Last reply Reply Quote 1
                                        • EkopalypseE
                                          Ekopalypse @Meta Chuh
                                          last edited by Ekopalypse

                                          @Meta-Chuh

                                          well my name is eren and a nickname is eko.
                                          And you are absolutely right about apocalypse.
                                          In my first week at work, everyone learned that I could be called eko.
                                          At one time I did something terribly wrong which lead to an failure of the
                                          whole production system. My colleague said something like
                                          “this must be the feeling when the 4 apocalyptic riders arrive” and another one
                                          managed to make eko and apocalyptic to result in ekopalypse.
                                          So here comes the ekopalypse :-D

                                          Meta ChuhM 1 Reply Last reply Reply Quote 4
                                          • Meta ChuhM
                                            Meta Chuh moderator @Ekopalypse
                                            last edited by

                                            thanks for the insight, @Ekopalypse
                                            the combination of all, name, mishap at work, and this community, gives way to a perfect book title:

                                            … the holy apocalypse and his fantastic 4 riders … 😂😂👍

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