MasonAndUltraEdit


Warning: These wiki pages have not been edited in years and may well be out of date/inaccurate. We recommend that you use them as a starting point for further investigation, rather than gospel.
== Display Mason code properly in UltraEdit ==

=== The Problem ===

You might use UltraEdit, a top editor, to work on files containg Mason Syntax. You d'like to have displayed the code properly colored and too, that <%WHATEVER> blocks are recognized as a function, and therefore displayed in the UltraEdit function list.

=== The Solution ===

UltraEdit uses one file to enable the display of different syntaxes like Perl, C/C++, HTML, VB and so on ...

===== C:\Program Files\UltraEdit\WORDFILE.TXT =====

You just have to append a Mason entry (expanded Perl syntax) to this file. Add the following code:

/L1"Mason" Nocase HTML_LANG Line Comment Num = 2#
Block Comment On = <!--
Block Comment Off = -->
Block Comment On Alt = =pod
Block Comment Off Alt = =cut
String Chars = "'
File Extensions = COMP SNIP TMPL HTML SHTML MHTML PAGE SKIN CONF
Delimiters = ~!^&*()-+|\{}[]:;"'<> , .?
/Indent Strings = "{"
/Unindent Strings = "}"
/Function String = "%<^%[a-zA-Z_]*"
/C1"Tags"
<A </A> <ABBR> <ABBR </ABBR> <ABOVE> <ACRONYM> <ACRONYM </ACRONYM>
<ADDRESS> <ADDRESS </ADDRESS> <APPLET </APPLET> <ARRAY> <AREA </AREA
<B> <B </B> <BASE <BASEFONT <BDO> <BDO </BDO> <BGSOUND <BIG> <BIG
</BIG> <BLINK> </BLINK> <BLOCKQUOTE> <BLOCKQUOTE </BLOCKQUOTE> <BODY
<BODY> </BODY> <BOX> <BR <BR> <BIG <BLINK <BUTTON> </BUTTON> <CAPTION>
<CAPTION </CAPTION> <CENTER> <CENTER </CENTER> <CITE> <CITE </CITE> /
<CODE / <COL> <COLGROUP> </COLGROUP> <COMMENT> </COMMENT> <DD> <DD
</DD> <DEL> <DEL </DEL> <DFN> <DFN </DFN> <DIR> <DIR </DIR> <DIV> <DIV
</DIV> <DL> <DL </DL> <DT> <DT </DT> <EM> <EM </EM> <EMBED <FIELDSET>
<FIELDSET </FIELDSET> <FIG> <FONT </FONT> <FORM> <FORM </FORM> <FRAME
<FRAMESET </FRAMESET> <H1> <H1 </H1> <H2> <H2 </H2> <H3> <H3 </H3>
<H4> <H4 </H4> <H5> <H5 </H5> <H6> <H6 </H6> <HEAD> <HEAD </HEAD> <HR>
<HR <HTML> <HTML </HTML> <I> <I </I> <IFRAME> </IFRAME> <ILAYER>
</ILAYER> <IMG <INPUT> <INPUT <INS> <INS </INS> <ISINDEX> <ISINDEX
<KBD> <KBD </KBD> <LABEL> <LABEL </LABEL> <LAYER> <LAYER </LAYER>
<LEGEND> <LEGEND </LEGEND> <LI> <LI </LI> <LINK <LISTING> </LISTING>
<MAP </MAP> <MARQUEE </MARQUEE> <MENU> <MENU </MENU> <META <MULTICOL>
</MULTICOL> <NEXTID <NOBR> </NOBR> <NOFRAMES> </NOFRAMES> <NOLAYER>
</NOLAYER> <NOTE> </NOTE> <NOSCRIPT> </NOSCRIPT> <OBJECT> <OBJECT <OL>
<OL </OL> <OPTION> <OPTION </OPTION> <OPTGROUP> <OPTGROUP </OPTGROUP>
<P <P> </P> <PARAM <PRE> <PRE </PRE> <Q> <Q </Q> <QUOTE> <RANGE>
<ROOT> <S> <S </S> <SAMP> <SAMP </SAMP> <SCRIPT <SCRIPT> </SCRIPT>
<SELECT </SELECT> <SMALL> <SMALL </SMALL> <SOUND <SPACER> <SPAN> <SPAN
</SPAN> <SQRT> <STRIKE> <STRIKE </STRIKE> <STRONG> <STRONG </STRONG>
<STYLE> <STYLE </STYLE> <SUB> <SUB </SUB> <SUP> <SUP </SUP> <TABLE>
<TABLE </TABLE> <TBODY> <TBODY </TBODY> <TD <TD> </TD> <TEXT>
<TEXTAREA <TEXTAREA> </TEXTAREA> <TFOOT> <TFOOT </TFOOT> <TH <TH>
</TH> <THEAD> <THEAD </THEAD> <TITLE> </TITLE> <TR <TR> </TR> <TT>
</TT> <TT <U> <U </U> <UL> <UL </UL>
<VAR> </VAR> <VAR
<WBR>
<XMP> </XMP>
%
<% %>
<%PERL> </%PERL>
<%INIT> </%INIT>
<%CLEANUP> </%CLEANUP>
<%ARGS> </%ARGS>
<%ONCE> </%ONCE>
<%SHARED> </%SHARED>
<%ATTR> </%ATTR>
<%FILTER> </%FILTER>
<%DOC> </%DOC>
<%TEXT> </%TEXT>
<%FLAGS> </%FLAGS>
<%METHOD </%METHOD>
<%DEF </%DEF></pre>
<pre>/C2"Attributes"
ABBR= ACCEPT-CHARSET= ACCEPT= ACCESSKEY= ACTION= ALIGN= ALINK= ALT= ARCHIVE= AXIS=
BACKGROUND= BEHAVIOR BELOW BGCOLOR= BORDER=
CELLPADDING= CELLSPACING= CHAR= CHAROFF= CHARSET= CHECKED CITE= CLASS= CLASSID= CLEAR= CODE=
CODEBASE= CODETYPE= COLOR= COLS= COLSPAN=
COMPACT CONTENT= COORDS=
DATA= DATETIME= DECLARE DEFER DIR= DISABLED
ENCTYPE=
FACE= FOR= FRAME= FRAMEBORDER= FRAMESPACING=
HEADERS= HEIGHT= HIDDEN= HREF= HREFLANG= HSPACE= HTTP-EQUIV=
ID= ISMAP=
LABEL= LANG= LANGUAGE= LINK= LOOP= LONGDESC=
MAILTO= MARGINHEIGHT= MARGINWIDTH= MAXLENGTH= MEDIA= METHOD= MULTIPLE
NAME= NOHREF NORESIZE NOSHADE
OBJECT= ONBLUR= ONCHANGE= ONFOCUS= ONKEYDOWN= ONKEYPRESS= ONKEYUP= ONLOAD= ONRESET=
ONSELECT= ONSUBMIT= ONUNLOAD= ONCLICK= ONDBLCLICK=
ONMOUSEDOWN= ONMOUSEMOVE= ONMOUSEOUT= ONMOUSEOVER= ONMOUSEUP=
PROFILE= PROMPT=
READONLY REL= REV= ROWS= ROWSPAN= RULES=
SCHEME= SCOPE= SCROLLING= SELECTED SHAPE= SIZE= SPAN= SRC= STANDBY= START= STYLE= SUMMARY=
TABINDEX= TARGET= TEXT= TITLE= TOPMARGIN= TYPE=
URL= USEMAP=
VALIGN= VALUE= VALUETYPE= VERSION= VLINK= VSPACE=
WIDTH=
/C3"Variables"
** $ @ % $#
/C4"Constructs"
-A -B -C -M -O -R -S -T -W -X -b -c -d -e -f -g -k -l -o -p -r -s -t -u -w -x -z
__DATA__ __END__ __FILE__ __LINE__
continue
do
else elsif
for foreach
goto
if
last local
my
next no
package
redo return require
sub
until unless use
while
/C5"Functions"
accept alarm atan2
bind binmode bless
caller chdir chmod chomp chop chown chr chroot close closedir connect cos crypt
dbmclose dbmopen defined delete die dump
each endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exit exp exists
fcntl fileno flock fork formline format
getc getgrent getgrgid getgrname gethostbyaddr gethostbyname
gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername
getpgrp
getppid getpriority getprotobyname getprotobynumber getprotoent
getpwent getpwnam getpwuid getservbyname getservbyport getservent
getsockname getsockopt glob gmtime grep
hex
index int ioctl
join
keys kill
lc lcfirst length link listen localtime log lstat
map mkdir msgctl msgget msgrcv msgsnd
oct open opendir ord
pack pipe pop pos print printf push
quotemeta
rand read readdir readline readlink recv ref rename reset reverse rewinddir rindex rmdir
scalar seek seekdir select semctl semgett semop send setgrent
sethostent setnetent setpgrp setpriority setprotoent setpwent
setservent
setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep
socket socketpair sort splice split sprintf sqrt srand stat study
substr
symlink syscall sysopen sysread system syswrite
tell telldir tie tied time times truncate
uc ucfirst umask undef unlink unpack unshift utime
values vec
wait waitpid wantarray warn write
/C6"Operators"
AUTOLOAD
BEGIN
CORE
DESTROY
eq
END
&& ||
ge gt
le lt
ne not
m
or and
q qq qw qx
SUPER
s
tr
UNIVERSAL
x xor
y</pre>

=== Special Settings ===

/L1"Mason"

This tells UltraEdit to display Mason as first entry in the /"view as"/ list. Be sure that the previous L1 is changed, so that all L* are unique.

File Extensions = COMP SNIP TMPL HTML SHTML MHTML PAGE SKIN CONF

This tells UltraEdit which files are automatically displayed using the Mason rendering.

=== Add Mason to the Taglist ===

UltraEdit uses a file to keep a taglist for each language used.



===== C:\Program Files\UltraEdit\TAGLIST.TXT =====

You just have to append a Mason entry to this file. Add the following code:

[Tag Group - Mason]
0="$m->out(debug) :UEDS:$m->out("here= "); $m->abort; ... "
1="<%ARGS Section :UEDS:<%ARGS> ... </%ARGS>"
2="<%ATTR Section :UEDS:<%ATTR> ... </%ATTR>"
3="<%CLEANUP Section :UEDS:<%CLEANUP>^p ... </%CLEANUP>"
4="<%DEF Section :UEDS:<%DEF name> ... </%DEF>"
5="<%DOC Section :UEDS:<%DOC>^p Component: xxxYyyy.comp^p \
Date: 04.01.2003 01:17^p Author: Your Name, your@email^p \
Changed: 07.03.2003 00:55 Christian Hauser, \
c.hauser@itassistance.ch^p^pDescriptive text^p ... </%DOC>"
6="<%FLAGS Section :UEDS:<%FLAGS>^pinherit=>undef^p ... </%FLAGS>"
7="<%INIT Section :UEDS:<%INIT>^p ... </%INIT>"
8="<%METHOD Section :UEDS:<%METHOD name> ... </%METHOD>"
9="<%ONCE Section :UEDS:<%ONCE> ... </%ONCE>"
10="<%PERL Section :UEDS:<%PERL> ... </%PERL>"
11="<%SHARED Section :UEDS:<%SHARED> ... </%SHARED>"
12=

And add Mason to the group list::

[Group List]
0=COLD FUSION - Tags
1=HTML - Special Characters
2=HTML - Tags
3=Mason
4=



-- ChristianHauser