Tapatalk

MUMPS (M) code -- New Highlighting Definitions

MUMPS (M) code -- New Highlighting Definitions

5
NewbieNewbie
5

    Aug 16, 2007#1

    I am looking to create an effective definition such that UE is the best tool going to edit with. I already downloaded the M wordfile that is in the "downloads".

    Attached to this post was a ZIP file with an updated wordfile and a MUMPS example file which was lost.

    6,685587
    Grand MasterGrand Master
    6,685587

      Aug 23, 2007#2

      I have looked into your example file and the wordfile and made some changes without really knowing how the code in the example file should be highlighted.

      I have changed the function strings.

      The 3 pairs of marker characters have been replaced by a substring definition.

      The list of delimiters is just resorted (not really necessary, but I like sorted delimiters).

      $J was duplicate in /C2 and /C3. I have deleted it from /C3. This duplicate keyword was detected by my ultimate test for duplicate words macro.

      The keywords have been resorted with my ultimate word definitions sorting macro.

      I have edited your post and replaced your MUMPS language definition with my version because your wordfile is already in the ZIP archive and I want to avoid loads and scrolls more than necessary in this topic for all users.

      Test my modifications and tell me if they are helpful or making it worser.
      Best regards from an UC/UE/UES for Windows user from Austria

      5
      NewbieNewbie
      5

        Aug 24, 2007#3

        Thanks much for your help. Your macros seem very useful. I wonder if macros could help me do some of what I want done here.

        The $J issue brings to light one of the difficulties in doing this for MUMPS. $J is repeated because it is both an intrinsic special variable ($J[OB]) and a function ($J[USTIFY]). The highlighting of $J is therefore a contextual question rather than an absolute. Is there any way to deal with this? See a code sample below:

        Write "My Job number is "_$JOB
        Or could be written
        W "My Job number is "_$J
        My Job number is 528516

        Further we could write:

        Write "My Job Number right justified to 10 places is "_$Justify($Job,10)_". See?"
        or
        W "My Job Number right justified to 10 places is "_$J($J,10)_". See?"
        My Job Number right justified to 10 places is ....528516. See? (I added the periods so that the spaces would remain visible)

        What do you think?

        6,685587
        Grand MasterGrand Master
        6,685587

          Aug 24, 2007#4

          What you want is not possible. I think, I have explained it good enough at The ultimate test for invalid words macro (second post).

          You can only use always $JUSTIFY for the function and $J for the variable and move $J to /C3. But if you use $J once as function and once as variable, one of them will be always highlighted wrong because UltraEdit does not understand the language. It is not a MUMPS interpreter.
          Best regards from an UC/UE/UES for Windows user from Austria

          1
          NewbieNewbie
          1

            May 26, 2010#5

            I know it's hard to believe, but there are still Mumps systems out there that need to be migrated. 8O
            I'm looking for tools/macros that could help me work with the M lang syntax as well as working with Pipe "|" delimited Flat files.

            I found this reference and tried to download this word file, but the board says file no longer exists.

            Could someone re-post it.

            Thanks
            Gw

            901
            MasterMaster
            901

              May 27, 2010#6

              Wordfiles are here: http://www.ultraedit.com/downloads/extr ... files.html
              The mumps wordfile, specifically, is here: http://www.ultraedit.com/files/wf/mumps.uew

              But this wordfile is not the one discussed here. None of the users really needed that updated MUMPS syntax highlighting wordfile sent the wordfile to IDM by email for uploading it to their server.