MUMPS (M) code -- New Highlighting Definitions

Syntax highlighting, code folding, brace matching, code indenting, and function list

MUMPS (M) code -- New Highlighting Definitions

Postby nvng » Wed Aug 15, 2007 8:55 pm

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.
nvng
Newbie
 
Posts: 5
Joined: Sun Aug 12, 2007 11:00 pm

Re: MUMPS (M) code -- New Highlighting Definitions

Postby Mofi » Thu Aug 23, 2007 10:39 am

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4066
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: MUMPS (M) code -- New Highlighting Definitions

Postby nvng » Thu Aug 23, 2007 8:00 pm

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?
nvng
Newbie
 
Posts: 5
Joined: Sun Aug 12, 2007 11:00 pm

Re: MUMPS (M) code -- New Highlighting Definitions

Postby Mofi » Fri Aug 24, 2007 6:35 am

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4066
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: MUMPS (M) code -- New Highlighting Definitions

Postby GeeWiz » Wed May 26, 2010 3:09 pm

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
GeeWiz
Newbie
 
Posts: 1
Joined: Wed May 26, 2010 3:05 pm

Re: MUMPS (M) code -- New Highlighting Definitions

Postby bulgrien » Thu May 27, 2010 1:43 am

Wordfiles are here: http://www.ultraedit.com/downloads/extras.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.
User avatar
bulgrien
Master
Master
 
Posts: 92
Joined: Fri Dec 11, 2009 1:02 am
Location: Pennsylvania, USA


Return to Syntax Highlighting