May be try this one,
<?xml version="1.0" encoding="UTF-8"?>
<!-- Authors: Jsoftware -->
<language id="j" _name="J" version="2.0" _section="Sources">
<metadata>
<property name="mimetypes">text/x-j;text/x-jsrc</property>
<property name="globs">*.ijs</property>
<property name="line-comment-start">NB\.</property>
</metadata>
<styles>
<style id="comment" _name="comment" />
<style id="string" _name="string" />
<style id="parens" _name="parens" />
<style id="control" _name="control" />
<style id="global" _name="global" />
<style id="local" _name="local" />
<style id="primitive" _name="primitive" />
<style id="number" _name="number" />
<style id="noundef" _name="noundef" />
</styles>
<definitions>
<context id="j">
<include>
<!-- problems/shortcomings
perhaps control should be done as keywords
not sure how to include suffix
control words need word start marked
fubardo. should not color the do.
control words of form for_xyz. not colored
primitives other than =: =.
matched vs unmatched parens coloring
marking matching paren might be nice but how to
do () and not {} and [] -->
<!-- NB. -->
<context id="comment" style-ref="comment" end-at-line-end="true">
<start>NB\.</start>
</context>
<!-- 'abc' -->
<context id="string" style-ref="string" end-at-line-end="true">
<start>L?'</start><end>'</end>
</context>
<!-- () -->
<context id="parens" style-ref="parens">
<match extended="true">[\(\)]</match>
</context>
<!-- explicit definition -->
<context id="expdef" style-inside="true">
<start>\%[(([1-4]|13)\s+:\s*0|adverb\s+define|conjunction\s+define|verb\s+define|monad\s+define|dyad\s+define)\%]</start>
<end>^\)\s*$</end>
<include>
<context id="comment1" style-ref="comment"
end-at-line-end="true">
<start>NB\.</start>
</context>
<context id="control" style-ref="control">
<match extended="true">
\%[(assert\.|break\.|continue\.|for\.|do\.|end\.|if\.|
else\.|elseif\.|return\.|select\.|case\.|fcase\.|
throw\.|try\.|catch\.|catchd\.|catcht\.|while\.|whilst\.|
for_[a-zA-Z][a-zA-Z0-9_]*\.|
goto_[a-zA-Z][a-zA-Z0-9_]*\.|
label_[a-zA-Z][a-zA-Z0-9_]*\.)
</match>
</context>
</include>
</context>
<!-- explicit definition -->
<context id="noundef" style-ref="noundef" style-inside="true">
<start>\%[(0\s+:\s*0|noun\s+define)\s*$</start>
<end>^\)\s*$</end>
</context>
<context id="number" style-ref="number">
<match extended="true">\%[[_0-9][_0-9\.a-zA-Z]*\%]</match>
</context>
<!-- =: -->
<context style-ref="global">
<match extended="true">=\:</match>
</context>
<!-- =. -->
<context style-ref="local">
<match extended="true">=\.</match>
</context>
</include>
</context>
</definitions>
</language>
Пнд, 17 Май 2010, Chris Burke писал(а):
> The syntax coloring is defined in system/config/j.lang.
>
> Perhaps someone could take a look and see how it could be improved?
>
>
> On Monday, May 17, 2010 12:13 AM, John Baker wrote:
> [---=| TOFU protection by t-prot: 23 lines snipped |=---]
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm