• Login
Community
  • Login

Does the UDL miss the ablity to recognize methods and classes?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
classmethodsyntaxudlhighlighting
19 Posts 5 Posters 5.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.
  • C
    Claudia Frank @Scott Sumner
    last edited by Aug 10, 2018, 11:55 AM

    @Scott-Sumner

    well, might happen when you start scrolling :-D

    Cheers
    Claudia

    S 1 Reply Last reply Aug 10, 2018, 11:57 AM Reply Quote 2
    • S
      Scott Sumner @Claudia Frank
      last edited by Scott Sumner Aug 10, 2018, 11:58 AM Aug 10, 2018, 11:57 AM

      @Claudia-Frank

      Got it! (I guess I expected them to be closer together, like is shown here )

      :-D

      C 1 Reply Last reply Aug 10, 2018, 12:02 PM Reply Quote 0
      • C
        Claudia Frank @Scott Sumner
        last edited by Aug 10, 2018, 12:02 PM

        @Scott-Sumner

        well sometimes you have to have changes in your life to keep it exciting :-)
        Seems we are back to future again - I answered your question 1 minute before you
        were asking it and you did it even 3 minutes before I was answering it :-D

        Cheers
        Claudia

        S 1 Reply Last reply Aug 10, 2018, 12:12 PM Reply Quote 3
        • S
          Scott Sumner @Claudia Frank
          last edited by Aug 10, 2018, 12:12 PM

          @Claudia-Frank

          back to the future again

          Yea, I’d much rather see 10-Aug-2018 7:47a than 2 minutes ago or six months ago anyway, but geez, if they’re going to do it that way (relatively), can’t they at least get it right? This will be confusing to any future readers, so here is the progression of the last several posting timestamps, as of RIGHT NOW:

          Imgur

          It would be really cool to go to an absolute timestamp here, how can that be made to happen?

          C 1 Reply Last reply Aug 10, 2018, 12:17 PM Reply Quote 2
          • C
            Claudia Frank @Scott Sumner
            last edited by Aug 10, 2018, 12:17 PM

            @Scott-Sumner

            Now it is back on track - thx for your image otherwise future readers must think we are insane :-)

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 2
            • P
              PeterJones
              last edited by PeterJones Aug 10, 2018, 1:10 PM Aug 10, 2018, 1:09 PM

              There have been times that immediately after hitting SUBMIT, I see “PeterJones posted 7 minutes ago”…

              I almost wonder if the timestamp issue here is similar to the one I described in the browser refresh thread : if there’s more than one server here, with different times – so that some people get one timestamp and some get the other.

              The other possibility I can think of: NodeBB might assign the timestamp when you hit REPLY and get the compose window, rather than when you hit SUBMIT. So if you take longer to author and post your node, your post goes farther into the past. (Though if you’re replying to an existing node, I don’t see how that would explain your post showing with an earlier timestamp than the one you’re replying to. That goes back to my multiple-server-times hypothesis.)

              update: appropriately, this one showed up as exactly “7 minutes ago” like I said above. :-)

              C 1 Reply Last reply Aug 10, 2018, 1:29 PM Reply Quote 2
              • C
                Claudia Frank @PeterJones
                last edited by Claudia Frank Aug 10, 2018, 1:31 PM Aug 10, 2018, 1:29 PM

                @PeterJones

                what is strange is that if you hover over the timestamp then it does show the correct time.
                Although I don’t know the server setup I would say that nowadays no server-ops should
                have troubles to install “clustered” servers with time sync - most OSes which
                support clustering do have it anyway and rely on it to work correctly.
                It’s really strange …

                Cheers
                Claudia

                Update: just said and proven to be incorrect. Just hovered, immediately after submitting the post,
                over the timestamp and … it is wrong.

                1 Reply Last reply Reply Quote 2
                • C
                  Claudia Frank
                  last edited by Aug 10, 2018, 1:36 PM

                  I see - once the post passes the “lead time” it is correct again.

                  Cheers
                  Claudia

                  Χ 1 Reply Last reply Aug 14, 2018, 6:20 AM Reply Quote 2
                  • Χ
                    Χρήστος Κοτζιάς @Claudia Frank
                    last edited by Χρήστος Κοτζιάς Aug 14, 2018, 6:22 AM Aug 14, 2018, 6:20 AM

                    @Claudia-Frank

                    *AUTO
                    DEMODISK = 0
                    ORG = $5400
                    TR ON
                    LST OFF

                    ***PRINCE OF PERSIA
                    ***COPYRIGHT 1989 JORDAN MECHNER

                    ORG ORG

                    JMP AUTOCTRL
                    JMP CHECKSTRIKE
                    JMP CHECKSTAB
                    JMP AUTOPLAYBACK
                    JMP CUTCHECK

                    JMP CUTGUARD
                    JMP ADDGUARD
                    JMP CUT

                    ADDAMOB LDX $0500 ;THIS IS A COMMENT, THE ABOVE LINE ISN’T ACTUALCODE

                    (LABEL MNEMONIC(LDX) OPERAND($0500) ;COMMENT)

                    CPX #MAXMOB
                    BEQ :RTS

                    INX
                    STX NUMMOB

                    JMP SAVEMOB

                    .
                    .
                    .
                    .

                    This is a 6502 assembly source code made with the Merlin assembler for the Prince of Persia game (copyright to Jordan Mechner)

                    Somewhere in the middle of that code you will see the typical syntax of the assembler. It goes like --> a) LABEL b) MENMONIC c) OPERAND and d) COMMENTS

                    4 columns all the time, some of them are optional (LABELS and COMMENTS and rarely OPERANDS)

                    1. Mnemonics are fixed keywords. I can highlight them. :)
                    2. Operands are sometimes fixed and sometimes not, but I don’t want to highlight the non-fixed since I can highlight the fixed ones.
                    3. Comments start with “;” or “*” and I can highlight them.
                    4. Labels are not fixed keywords and I want to use a different color for them.
                      LABELS -always- start in the beginning of a new line. NO space precedes them.
                      Is it possible to color every word and ONLY THAT WORD who is the first ONE of each line of code???

                    Thanks in advance :)

                    C 1 Reply Last reply Aug 14, 2018, 1:01 PM Reply Quote 1
                    • C
                      Claudia Frank @Χρήστος Κοτζιάς
                      last edited by Aug 14, 2018, 1:01 PM

                      @Χρήστος-Κοτζιάς

                      Yes, can be done when you are willing to install python script plugin.

                      From my understanding of 6502 assembler and your description the label needs to be
                      followed by known mnemonic fields. Keeping this in mind and using a slightly
                      modified version of the script I posted above you would get something like

                      The part of the script which needs to be modified is within the main function

                          def main(self):
                              # 2. define the lexer language, normally like what is returned by notepad.getLanguageName
                              self.lexer_name = 'Assembly'
                      
                              # 3. define needed indicator_ids, indicator_fore_colors and regexes
                              self.regex_dict = {
                                                  self.set_indicator_attributes(18, fore=(131,255,245)) : u'^\w+?(?= LDA| LDX| LDY)',
                                                }
                      
                              self.set_lexer_doc(True)
                              self.style()
                      

                      First you need to change the self.lexer_name with your udl name.
                      Run notepad.getLanguageName(notepad.getLangType()) in the python script console
                      after assigning your udl language to a document. I chose the assembly lexer for
                      demonstration purpose.

                      Second you need to extend the list of know mnemonic words in the regex

                      u'^\w+?(?= LDA| LDX| LDY)',
                      

                      Cheers
                      Claudia

                      Χ 1 Reply Last reply Aug 15, 2018, 8:55 AM Reply Quote 2
                      • Χ
                        Χρήστος Κοτζιάς
                        last edited by Χρήστος Κοτζιάς Aug 15, 2018, 8:24 AM Aug 15, 2018, 8:22 AM

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • Χ
                          Χρήστος Κοτζιάς @Claudia Frank
                          last edited by Aug 15, 2018, 8:55 AM

                          @Claudia-Frank

                          http://tinypic.com/r/4r4904/9

                          I have uploaded a screenshot from the built-in editor of the Merlin Pro assembler (Applewin emulator, Enhanced Apple IIe system)

                          Can you see it?

                          C 1 Reply Last reply Aug 15, 2018, 11:57 AM Reply Quote 0
                          • C
                            Claudia Frank @Χρήστος Κοτζιάς
                            last edited by Aug 15, 2018, 11:57 AM

                            @Χρήστος-Κοτζιάς

                            Yes, I’m able to see your uploaded image.
                            What is your question or what did I miss?

                            Cheers
                            Claudia

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