[gtksourceview] Added Mallard support



commit 01a63b0652e16dfd6f455e21ca0a798c60e965c0
Author: Milo Casagrande <milo ubuntu com>
Date:   Sat Jul 18 13:38:55 2009 +0200

    Added Mallard support
    	* Added mallard.lang file for Mallard syntax highlight
    	* Modified Makefile.am to add mallard.lang
    	* Modified POTFILES.in to add mallard.lang

 gtksourceview/language-specs/Makefile.am  |    1 +
 gtksourceview/language-specs/mallard.lang |  122 +++++++++++++++++++++++++++++
 po/POTFILES.in                            |    1 +
 3 files changed, 124 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/language-specs/Makefile.am b/gtksourceview/language-specs/Makefile.am
index 6d82150..d0f954f 100644
--- a/gtksourceview/language-specs/Makefile.am
+++ b/gtksourceview/language-specs/Makefile.am
@@ -41,6 +41,7 @@ LANGUAGES =			\
 	lua.lang		\
 	m4.lang			\
 	makefile.lang		\
+	mallard.lang	\
 	msil.lang		\
 	nemerle.lang		\
 	nsis.lang		\
diff --git a/gtksourceview/language-specs/mallard.lang b/gtksourceview/language-specs/mallard.lang
new file mode 100644
index 0000000..0f95ccd
--- /dev/null
+++ b/gtksourceview/language-specs/mallard.lang
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Author: Milo Casagrande <milo ubuntu com>
+ Copyright (C) 2009 Milo Casagrande <milo ubuntu com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+-->
+<language id="mallard" _name="Mallard" version="2.0" _section="Markup">
+
+  <metadata>
+    <property name="globs">*.page</property>
+    <property name="block-comment-start">&lt;!--</property>
+    <property name="block-comment-end">--&gt;</property>
+  </metadata>
+
+  <styles>
+    <style id="page"    _name="Page Elements"    map-to="def:identifier"/>
+    <style id="section" _name="Section Elements" map-to="def:identifier"/>
+    <style id="block"   _name="Block Elements"   map-to="def:identifier"/>
+    <style id="inline"  _name="Inline Elements"  map-to="def:identifier"/>
+  </styles>
+
+<definitions>
+
+  <context id="page-element" once-only="true" style-ref="page">
+    <keyword>page</keyword>
+  </context>
+
+  <context id="section-element" style-ref="section">
+    <keyword>section</keyword>
+  </context>
+
+  <context id="block-elements" style-ref="block">
+    <keyword>code</keyword>
+    <keyword>p</keyword>
+    <keyword>example</keyword>
+    <keyword>screen</keyword>
+    <keyword>media</keyword>
+    <keyword>comment</keyword>
+    <keyword>figure</keyword>
+    <keyword>listing</keyword>
+    <keyword>note</keyword>
+    <keyword>quote</keyword>
+    <keyword>synopsis</keyword>
+    <keyword>list</keyword>
+    <keyword>steps</keyword>
+    <keyword>terms</keyword>
+    <keyword>tree</keyword>
+    <keyword>table</keyword>
+    <keyword>col</keyword>
+    <keyword>colgroup</keyword>
+    <keyword>tr</keyword>
+    <keyword>td</keyword>
+    <keyword>item</keyword>
+  </context>
+
+  <context id="inline-elements" style-ref="inline">
+    <keyword>app</keyword>
+    <keyword>cmd</keyword>
+    <keyword>code</keyword>
+    <keyword>em</keyword>
+    <keyword>file</keyword>
+    <keyword>gui</keyword>
+    <keyword>guiseq</keyword>
+    <keyword>input</keyword>
+    <keyword>key</keyword>
+    <keyword>keyseq</keyword>
+    <keyword>link</keyword>
+    <keyword>media</keyword>
+    <keyword>output</keyword>
+    <keyword>span</keyword>
+    <keyword>sys</keyword>
+    <keyword>var</keyword>
+    <keyword>info</keyword>
+    <keyword>credit</keyword>
+    <keyword>name</keyword>
+    <keyword>email</keyword>
+    <keyword>copyright</keyword>
+    <keyword>year</keyword>
+    <keyword>license</keyword>
+    <keyword>desc</keyword>
+    <keyword>link</keyword>
+    <keyword>revision</keyword>
+    <keyword>title</keyword>
+    <keyword>subtitle</keyword>
+    <keyword>desc</keyword>
+    <keyword>cite</keyword>
+  </context>
+
+  <context id="mallard-tags">
+    <include>
+      <context ref="page-element"/>
+      <context ref="section-element"/>
+      <context ref="block-elements"/>
+      <context ref="inline-elements"/>
+      <context ref="xml:element-name" original="true"/>
+    </include>
+  </context>
+
+  <replace id="xml:element-name" ref="mallard-tags"/>
+
+  <context id="mallard">
+    <include>
+      <context ref="xml:xml"/>
+    </include>
+  </context>
+</definitions>
+
+</language>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cf61e82..d6022df 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -54,6 +54,7 @@ gtksourceview/language-specs/libtool.lang
 gtksourceview/language-specs/lua.lang
 gtksourceview/language-specs/m4.lang
 gtksourceview/language-specs/makefile.lang
+gtksourceview/language-specs/mallard.lang
 gtksourceview/language-specs/msil.lang
 gtksourceview/language-specs/msil.lang
 gtksourceview/language-specs/nemerle.lang



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]