[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Finally, Python syntax highlightning!
From:       Per Wigren <wigren () hem ! passagen ! se>
Date:       2001-08-27 21:17:16
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

måndagen den 27 augusti 2001 22:50 skrev jowenn@bigfoot.com:
> Do you mind if I put it into CVS HEAD (KDE 3.0)
> and into a tgz archive, which can be downloaded as
> an extension for KDE 2.2/2.2.1 kate from the kate
> homepage ?

Of course not, go ahead!

Here is also my syntaxfile for makefiles, put that there also! I don't know 
all the features/syntax of makefiles, I made it just to learn how to make 
syntaxfiles! :) Judging from the comments I got when I posted it here in 
kde-devel, it seems to be correct though... I don't think I can implement 
more features in it with the current syntax highlightning features in Kate...
Or can you tell me a way to parse this?

bla1 bla2 bla3 \
bla4: foobar

Regards
Per Wigren
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7irjcyjnjcyLO8HkRAusCAJ4u21yi30DbFOv1tSs3KP/I/j+d1QCeNsIE
m9zSsUxVzvZHA34RG7MUFNs=
=xRME
-----END PGP SIGNATURE-----

["makefile.xml" (text/xml)]

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> -->
<language name="Makefile" section="Other" extensions="" mimetype="text/x-makefile">
	<highlighting>
		<list name = "keywords">
			<item> include </item>
			<item> define </item>
			<item> else </item>
			<item> endef </item>
			<item> endif </item>
			<item> ifdef </item>
			<item> ifeq </item>
			<item> ifndef </item>
			<item> ifneq </item>
		</list>

		<contexts>
			<context name="Normal" attribute="Normal Text" lineEndContext="0">
				<HlCStringChar attribute="Normal Text" lineEndContext="0"/>
				<keyword String="keywords" attribute="Keyword" context="0"/>
				<RegExpr String="#.*$" attribute="Comment" context="0"/>
				<RegExpr String="(^|;)\s*\S+\s*[?+:]?=" attribute="Variable" context="1"/>
				<RegExpr String="^.*:" attribute="Section" context="0"/>
				<RegExpr attribute="Operator" String="\$\(" context="4"/>
				<RegExpr attribute="Operator" String="\$\{" context="5"/>
				<RegExpr String="[+*/=%$()?:;\\]" attribute="Operator" context="0"/>
			</context>

			<context name="Value" attribute="String" lineEndContext="1">
				<HlCStringChar attribute="String Char" context="1"/>
				<RegExpr attribute="Operator" String="\\$"     context="1"/>
				<RegExpr attribute="String"   String="[^\\]?$" context="0"/>
				<RegExpr attribute="Operator" String="\$\("    context="2"/>
				<RegExpr attribute="Operator" String="\$\{"    context="3"/>
				<RegExpr attribute="Operator" String=";"       context="0"/>
			</context>

			<context name="ParanVarFromValue" attribute="Variable" lineEndContext="2">
				<HlCStringChar attribute="Variable" context="2"/>
				<RegExpr attribute="Operator" String="\)[^$]" context="1"/>
				<RegExpr attribute="Operator" String="\)$" context="0"/>
			</context>

			<context name="BrackVarFromValue" attribute="Variable" lineEndContext="3">
				<HlCStringChar attribute="Variable" context="3"/>
				<RegExpr attribute="Operator" String="\}[^$]" context="1"/>
				<RegExpr attribute="Operator" String="\}$" context="0"/>
			</context>

			<context name="ParanVarFromNormal" attribute="Variable" lineEndContext="4">
				<HlCChar attribute="Variable" context="4"/>
				<RegExpr attribute="Operator" String="\)" context="0"/>
			</context>

			<context name="BrackVarFromNormal" attribute="Variable" lineEndContext="5">
				<HlCChar attribute="Variable" context="5"/>
				<RegExpr attribute="Operator" String="\}" context="0"/>
			</context>

		</contexts>

		<itemDatas>
			<itemData name="Normal Text"	defStyleNum="dsNormal"/>
			<itemData name="Keyword"		defStyleNum="dsKeyword"/>
			<itemData name="Comment"		defStyleNum="dsComment"/>
			<itemData name="String"			defStyleNum="dsString"/>
			<itemData name="String Char"	defStyleNum="dsChar"/>
			<itemData name="Variable"		defStyleNum="dsDataType"/>
			<itemData name="Section"		defStyleNum="dsOthers"/>
			<itemData name="Operator"		defStyleNum="dsChar"/>
		</itemDatas>
	</highlighting>

	<general>
		<comments>
			<comment name = "singleLine" start = "#"/>
		</comments>
		<keywords casesensitive = "1" />
	</general>
</language>

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic