All Downloads are FREE. Search and download functionalities are using the official Maven repository.

modes.myghty.xml Maven / Gradle / Ivy

Go to download

This project aims to build a command line tool that can create HTML view with syntax highlighted source code. It uses Jedit syntax highlighting engine and support all languages that are supported in JEdit. Which are currently: ActionScript, Ada 95, ANTLR, Apache HTTPD, APDL, AppleScript, ASP, Aspect-J, Assembly, AWK, B formal method, Batch, BBj, BCEL, BibTeX, C, C++, C#, CHILL, CIL, COBOL, ColdFusion, CSS, CVS Commit, D, DOxygen, DSSSL, Eiffel, EmbPerl, Erlang, Factor, Fortran, Foxpro, FreeMarker, Fortran, Gettext, Groovy, Haskell, HTML, Icon, IDL, Inform, INI, Inno Setup, Informix 4GL, Interlis, Io, Java, JavaScript, JCL, JHTML, JMK, JSP, Latex, Lilypond, Lisp, LOTOS, Lua, Makefile, Maple, ML, Modula-3, MoinMoin, MQSC, NetRexx, NQC, NSIS2, Objective C, ObjectRexx, Occam, Omnimark, Parrot, Pascal, Patch, Perl, PHP, Pike, PL-SQL, PL/I, Pop11, PostScript, Povray, PowerDynamo, Progress 4GL, Prolog, Properties, PSP, PV-WAVE, Pyrex, Python, REBOL, Redcode, Relax-NG, RelationalView, Rest, Rib, RPM spec, RTF, Ruby, Ruby-HTML, RView, S+, S#, SAS, Scheme, SDL/PL, SGML, Shell Script, SHTML, Smalltalk, SMI MIB, SQR, Squidconf, SVN Commit, Swig, TCL, TeX, Texinfo, TPL, Transact-SQL, UnrealScript, VBScript, Velocity, Verilog, VHDL, XML, XSL, ZPT

The newest version!
<?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="&lt;!--" />
		<PROPERTY NAME="commentEnd" VALUE="--&gt;" />
	</PROPS>
	<RULES IGNORE_CASE="TRUE">

		<EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">#</EOL_SPAN>
		<!-- <SEQ TYPE="LITERAL4" AT_LINE_END="TRUE">\</SEQ> -->

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

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

		<!-- doc block -->
		<SPAN TYPE="COMMENT4">
			<BEGIN>&lt;%doc&gt;</BEGIN>
			<END>&lt;/%doc&gt;</END>
		</SPAN>

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

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

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

		<!-- text block -->
		<SPAN TYPE="LITERAL3">
			<BEGIN>&lt;%text&gt;</BEGIN>
			<END>&lt;/%text&gt;</END>
		</SPAN>

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

		<!-- substitutions -->
		<SPAN TYPE="LITERAL3" DELEGATE="MYGHTY">
			<BEGIN>&lt;%</BEGIN>
			<END>%&gt;</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>
			<NULL>attr</NULL>
			<NULL>cleanup</NULL>
			<NULL>closure</NULL>
			<NULL>def</NULL>
			<NULL>doc</NULL>
			<NULL>filter</NULL>
			<NULL>flags</NULL>
			<NULL>global</NULL>
			<NULL>init</NULL>
			<NULL>method</NULL>
			<NULL>once</NULL>
			<NULL>python</NULL>
			<NULL>requestlocal</NULL>
			<NULL>requestonce</NULL>
			<NULL>shared</NULL>
			<NULL>threadlocal</NULL>
			<NULL>threadonce</NULL>
		</KEYWORDS>

	</RULES>

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy