alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

jEdit example source code file (myghty.xml)

This example jEdit source code file (myghty.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - jEdit tags/keywords

begin, begin, delegate, delegate, end, keyword4, literal4, myghty, null, null, span, span_regexp, type, type

The jEdit myghty.xml source code

<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<!--
<MODE NAME="myghty"			FILE="myghty.xml"
				FILE_NAME_GLOB="*.myt"/>
-->

<MODE>
	<PROPS>
		<PROPERTY NAME="commentStart" VALUE="<!--" />
		<PROPERTY NAME="commentEnd" VALUE="-->" />
	</PROPS>
	<RULES IGNORE_CASE="TRUE">

		<EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">#
		<!--  -->

		<!-- attr block (python) -->
		<SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
			<BEGIN><%attr>
			<END></%attr>
		</SPAN>

		<!-- def, closure, method -->
		<SPAN_REGEXP HASH_CHAR="<%" TYPE="LITERAL4" DELEGATE="DEF">
			<BEGIN><%(def|closure|method)
			<END>>
		</SPAN_REGEXP>
		<SEQ_REGEXP HASH_CHAR="</%" TYPE="LITERAL4"></%(def|closure|method)>

		<!-- doc block -->
		<SPAN TYPE="COMMENT4">
			<BEGIN><%doc>
			<END></%doc>
		</SPAN>

		<!-- flags block (python) -->
		<SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
			<BEGIN><%flags>
			<END></%flags>
		</SPAN>

		<!-- python block -->
		<SPAN_REGEXP HASH_CHAR="<%python" DELEGATE="MYGHTY" TYPE="LITERAL4">
			<BEGIN><%python[^>]*>
			<END></%python>
		</SPAN_REGEXP>

		<!-- python block aliases - don't take args -->
		<SPAN_REGEXP HASH_CHAR="<%" DELEGATE="MYGHTY" TYPE="LITERAL4">
			<BEGIN><%(args|cleanup|filter|global|init|once|requestlocal|requestonce|shared|threadlocal|threadonce)>
			<END></%$1>
		</SPAN_REGEXP>

		<!-- text block -->
		<SPAN TYPE="LITERAL3">
			<BEGIN><%text>
			<END></%text>
		</SPAN>

		<!-- calling component -->
		<SEQ TYPE="LITERAL4"></&>
		<SPAN_REGEXP HASH_CHAR="<&" TYPE="LITERAL4" DELEGATE="MYGHTY">
			<BEGIN><&[|]?
			<END>&>
		</SPAN_REGEXP>

		<!-- substitutions -->
		<SPAN TYPE="LITERAL3" DELEGATE="MYGHTY">
			<BEGIN><%
			<END>%>
		</SPAN>

		<EOL_SPAN 
			AT_LINE_START="TRUE" 
			DELEGATE="MYGHTY" 
			TYPE="LITERAL4">%</EOL_SPAN>

		<IMPORT DELEGATE="html::MAIN"/>

		<KEYWORDS>
			<!-- only here for complete-word -->
			<NULL>args
			<NULL>attr
			<NULL>cleanup
			<NULL>closure
			<NULL>def
			<NULL>doc
			<NULL>filter
			<NULL>flags
			<NULL>global
			<NULL>init
			<NULL>method
			<NULL>once
			<NULL>python
			<NULL>requestlocal
			<NULL>requestonce
			<NULL>shared
			<NULL>threadlocal
			<NULL>threadonce
		</KEYWORDS>

	</RULES>

	<RULES IGNORE_CASE="FALSE" SET="MYGHTY">
		<!-- alias for MODULE -->
		<SEQ TYPE="KEYWORD4">@
		<IMPORT DELEGATE="python::MAIN"/>
		<KEYWORDS>
			<KEYWORD4>ARGS
			<KEYWORD4>MODULE
			<KEYWORD4>SELF
			<KEYWORD4>m
			<!-- request -->
			<KEYWORD4>r
			<!-- session -->
			<KEYWORD4>s
			<!-- URL encode -->
			<KEYWORD4>u
			<!-- HTML encode -->
			<KEYWORD4>h
		</KEYWORDS>
	</RULES>

	<!-- only exists to color component name like a function -->
	<RULES IGNORE_CASE="TRUE" SET="DEF" DEFAULT="FUNCTION">
	</RULES>
</MODE>

Other jEdit examples (source code examples)

Here is a short list of links related to this jEdit myghty.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.