Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    class method syntax udl highlighting
    5
    19
    4383
    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.
    • Scott Sumner
      Scott Sumner @Claudia Frank last edited by

      @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?

      Claudia Frank 1 Reply Last reply Reply Quote 2
      • Claudia Frank
        Claudia Frank @Scott Sumner last edited by

        @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
        • PeterJones
          PeterJones last edited by PeterJones

          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. :-)

          Claudia Frank 1 Reply Last reply Reply Quote 2
          • Claudia Frank
            Claudia Frank @PeterJones last edited by Claudia Frank

            @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
            • Claudia Frank
              Claudia Frank last edited by

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

              Cheers
              Claudia

              Χρήστος Κοτζιάς 1 Reply Last reply Reply Quote 2
              • Χρήστος Κοτζιάς
                Χρήστος Κοτζιάς @Claudia Frank last edited by Χρήστος Κοτζιάς

                @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 :)

                Claudia Frank 1 Reply Last reply Reply Quote 1
                • Claudia Frank
                  Claudia Frank @Χρήστος Κοτζιάς last edited by

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

                  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 Reply Quote 2
                  • Χρήστος Κοτζιάς
                    Χρήστος Κοτζιάς last edited by Χρήστος Κοτζιάς

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • Χρήστος Κοτζιάς
                      Χρήστος Κοτζιάς @Claudia Frank last edited by

                      @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?

                      Claudia Frank 1 Reply Last reply Reply Quote 0
                      • Claudia Frank
                        Claudia Frank @Χρήστος Κοτζιάς last edited by

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

                        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
                        • First post
                          Last post
                        Copyright © 2014 NodeBB Forums | Contributors