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

modes.rest.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>
	<PROPS>
		<PROPERTY NAME="lineComment" VALUE=".. "/>
		<!-- indent after literal blocks and directives -->
		<PROPERTY NAME="indentNextLines" VALUE=".*::$"/>
	</PROPS>

	<RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE">

		<!-- targets -->
		<EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">__</EOL_SPAN>
		<EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">.. _</EOL_SPAN>

		<!-- section titles -->
		<SEQ_REGEXP HASH_CHAR="===" TYPE="LABEL">={3,}</SEQ_REGEXP>
		<SEQ_REGEXP HASH_CHAR="---" TYPE="LABEL">-{3,}</SEQ_REGEXP>
		<SEQ_REGEXP HASH_CHAR="~~~" TYPE="LABEL">~{3,}</SEQ_REGEXP>
		<SEQ_REGEXP HASH_CHAR="###" TYPE="LABEL">#{3,}</SEQ_REGEXP>
		<SEQ_REGEXP HASH_CHAR='"""' TYPE="LABEL">"{3,}</SEQ_REGEXP>
		<SEQ_REGEXP HASH_CHAR="^^^" TYPE="LABEL">\^{3,}</SEQ_REGEXP>
		<SEQ_REGEXP HASH_CHAR="+++" TYPE="LABEL">\+{3,}</SEQ_REGEXP>
		<SEQ_REGEXP HASH_CHAR="***" TYPE="LABEL">\*{3,}</SEQ_REGEXP>

		<!-- replacement -->
		<SEQ_REGEXP
			HASH_CHAR=".."
			AT_LINE_START="TRUE"
			TYPE="LITERAL3"
		>\.\.\s\|[^|]+\|</SEQ_REGEXP>

		<!-- substitution -->
		<SEQ_REGEXP
			HASH_CHAR="|"
			AT_LINE_START="FALSE"
			TYPE="LITERAL4"
		>\|[^|]+\|</SEQ_REGEXP>

		<!-- directives: .. name:: -->
		<SEQ_REGEXP
			HASH_CHAR=".."
			AT_LINE_START="TRUE"
			TYPE="LITERAL2"
		>\.\.\s[A-z][A-z0-9-_]+::</SEQ_REGEXP>

		<!-- strong emphasis: **...** -->
		<SEQ_REGEXP
			HASH_CHAR="**"
			AT_LINE_START="FALSE"
			TYPE="KEYWORD2"
		>\*\*[^*]+\*\*</SEQ_REGEXP>

		<!-- emphasis: *...* -->
		<SEQ_REGEXP
			HASH_CHAR="*"
			AT_LINE_START="FALSE"
			TYPE="KEYWORD4"
		>\*[^\s*][^*]*\*</SEQ_REGEXP>

		<!-- comments -->
		<EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">.. </EOL_SPAN>

		<!-- links: `...`_ or `...`__ -->
		<SEQ_REGEXP
			HASH_CHAR="`"
			TYPE="LABEL"
		>`[A-z0-9]+[^`]+`_{1,2}</SEQ_REGEXP>

		<!-- footnote reference: [0]_ -->
		<SEQ_REGEXP
			HASH_CHAR="["
			TYPE="LABEL"
		>\[[0-9]+\]_</SEQ_REGEXP>

		<!-- footnote reference: [#]_ or [#foo]_ -->
		<SEQ_REGEXP
			HASH_CHAR="[#"
			TYPE="LABEL"
		>\[#[A-z0-9_]*\]_</SEQ_REGEXP>

		<!-- footnote reference: [*]_ -->
		<SEQ TYPE="LABEL">[*]_</SEQ>

		<!-- citation reference: [foo]_ -->
		<SEQ_REGEXP
			HASH_CHAR="["
			TYPE="LABEL"
		>\[[A-z][A-z0-9_-]*\]_</SEQ_REGEXP>

		<!-- inline literal: ``...``-->
		<!--<SEQ_REGEXP
			HASH_CHAR="``"
			TYPE="LITERAL1"
		>``[^`]+``</SEQ_REGEXP>-->
		<SPAN TYPE="LITERAL1" ESCAPE="\">
			<BEGIN>``</BEGIN>
			<END>``</END>
		</SPAN>

		<!-- interpreted text: `...` -->
		<!--
		<SEQ_REGEXP
			HASH_CHAR="`"
			TYPE="KEYWORD1"
		>`[^`]+`</SEQ_REGEXP>
		-->
		<SPAN TYPE="KEYWORD1">
			<BEGIN>`</BEGIN>
			<END>`</END>
		</SPAN>

		<SEQ_REGEXP HASH_CHAR="```" TYPE="LABEL">`{3,}</SEQ_REGEXP>

		<!-- :field list: -->
		<SEQ_REGEXP
			HASH_CHAR=":"
			TYPE="KEYWORD1"
		>:[A-z][A-z0-9 	=\s\t_]*:</SEQ_REGEXP>

		<!-- table -->
		<SEQ_REGEXP
			HASH_CHAR="+-"
			TYPE="LABEL"
		>\+-[+-]+</SEQ_REGEXP>
		<SEQ_REGEXP
			HASH_CHAR="+?"
			TYPE="LABEL"
		>\+=[+=]+</SEQ_REGEXP>

	</RULES>

</MODE>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy