[gtksourceview/gnome-3-24] Add logcat.lang



commit 4fe2ea412644af49732c8057fbb19fda77a5b209
Author: Kasual <mushroomhead52e gmail com>
Date:   Sun Oct 15 12:50:42 2017 -0400

    Add logcat.lang
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789021

 data/language-specs/Makefile.am        |    1 +
 data/language-specs/language-specs.pot |    4 +-
 data/language-specs/logcat.lang        |  107 ++++++++++++++++++++++++++++++++
 po/POTFILES.skip                       |    1 +
 tests/syntax-highlighting/file.logcat  |   27 ++++++++
 5 files changed, 139 insertions(+), 1 deletions(-)
---
diff --git a/data/language-specs/Makefile.am b/data/language-specs/Makefile.am
index a113a00..7e4f0a2 100644
--- a/data/language-specs/Makefile.am
+++ b/data/language-specs/Makefile.am
@@ -67,6 +67,7 @@ LANGUAGES =                   \
        lex.lang                \
        libtool.lang            \
        llvm.lang               \
+       logcat.lang             \
        lua.lang                \
        m4.lang                 \
        makefile.lang           \
diff --git a/data/language-specs/language-specs.pot b/data/language-specs/language-specs.pot
index 7a5f500..7413654 100644
--- a/data/language-specs/language-specs.pot
+++ b/data/language-specs/language-specs.pot
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2017-09-06 16:26+0200\n"
+"POT-Creation-Date: 2017-10-28 09:17+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL li org>\n"
@@ -1230,6 +1230,7 @@ msgstr ""
 #. (itstool) path: ini.lang/language@_section
 #. (itstool) path: json.lang/language@_section
 #. (itstool) path: libtool.lang/language@_section
+#. (itstool) path: logcat.lang/language@_section
 #. (itstool) path: nsis.lang/language@_section
 #. (itstool) path: ocl.lang/language@_section
 #. (itstool) path: pkgconfig.lang/language@_section
@@ -1253,6 +1254,7 @@ msgstr ""
 #: ini.lang:23
 #: json.lang:30
 #: libtool.lang:24
+#: logcat.lang:23
 #: nsis.lang:24
 #: ocl.lang:33
 #: pkgconfig.lang:24
diff --git a/data/language-specs/logcat.lang b/data/language-specs/logcat.lang
new file mode 100644
index 0000000..a086f63
--- /dev/null
+++ b/data/language-specs/logcat.lang
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This file is part of GtkSourceView
+
+ Authors: Ryuinferno, Paul Lammertsma, Kelly Craft
+ Copyright (C) 2013 Ryuinferno <ryuinferno xda gmail com>
+ Copyright (C) 2014 Paul Lammertsma <paul pixplicity com>
+ Copyright (C) 2017 Kelly Craft <mushroomhead52e gmail com>
+
+ GtkSourceView is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ GtkSourceView 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <http://www.gnu.org/licenses/>.
+-->
+<language id="logcat" name="logcat" version="2.0" _section="Other">
+  <metadata>
+    <property name="mimetypes">text/x-logcat</property>
+    <property name="globs">*.logcat</property>
+  </metadata>
+
+  <styles>
+    <style id="comment" name="Comment" map-to="def:comment"/>
+    <style id="verbose" name="Verbose" map-to="def:identifier"/>
+    <style id="debug"   name="Debug"   map-to="def:shebang"/>
+    <style id="info"    name="Info"    map-to="def:string"/>
+    <style id="warning" name="Warning" map-to="def:statement"/>
+    <style id="error"   name="Error"   map-to="def:number"/>
+    <style id="fatal"   name="Fatal"   map-to="def:error"/>
+    <style id="others"  name="Others"  map-to="def:comment"/>
+  </styles>
+
+  <definitions>
+    <context id="comment1" style-ref="comment">
+      <start>^---------</start>
+      <end>$</end>
+    </context>
+
+    <context id="comment2" style-ref="comment">
+      <start>^#</start>
+      <end>$</end>
+    </context>
+
+    <context id="datetime" style-ref="comment">
+      <start>^([0-9]{4}-[0-9]{2}|[0-9]{2})-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}</start>
+      <end> </end>
+    </context>
+
+    <context id="thread" style-ref="comment">
+      <start>([ ]+[0-9]+[ ]+|[0-9]{5} )</start>
+      <end>([0-9]{5}|[0-9]{4}|[0-9]{3}|[0-9]{2}|[0-9]{1})</end>
+    </context>
+
+    <context id="verbose" style-ref="verbose">
+      <start>( V |V\/|V\()</start>
+      <end>$</end>
+    </context>
+
+    <context id="debug" style-ref="debug">
+      <start>( D |D\/|D\()</start>
+      <end>$</end>
+    </context>
+
+    <context id="info" style-ref="info">
+      <start>( I |I\/|I\()</start>
+      <end>$</end>
+    </context>
+
+    <context id="warning" style-ref="warning">
+      <start>( W |W\/|W\()</start>
+      <end>$</end>
+    </context>
+
+    <context id="error" style-ref="error">
+      <start>( E |E\/|E\()</start>
+      <end>$</end>
+    </context>
+
+    <context id="fatal" style-ref="fatal">
+      <start>( F |F\/|F\()</start>
+      <end>$</end>
+    </context>
+
+    <!-- Main context -->
+    <context id="logcat" class="no-spell-check">
+      <include>
+        <context ref="comment1"/>
+        <context ref="comment2"/>
+        <context ref="datetime"/>
+        <context ref="thread"/>
+        <context ref="verbose"/>
+        <context ref="debug"/>
+        <context ref="info"/>
+        <context ref="warning"/>
+        <context ref="error"/>
+        <context ref="fatal"/>
+      </include>
+    </context>
+  </definitions>
+</language>
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 8af6082..375e96c 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -70,6 +70,7 @@ data/language-specs/latex.lang
 data/language-specs/lex.lang
 data/language-specs/libtool.lang
 data/language-specs/llvm.lang
+data/language-specs/logcat.lang
 data/language-specs/lua.lang
 data/language-specs/m4.lang
 data/language-specs/makefile.lang
diff --git a/tests/syntax-highlighting/file.logcat b/tests/syntax-highlighting/file.logcat
new file mode 100644
index 0000000..4bcb5c2
--- /dev/null
+++ b/tests/syntax-highlighting/file.logcat
@@ -0,0 +1,27 @@
+--------- beginning of /dev/log/system
+V/test    (  145): The quick brown fox jumps over the lazy dog
+D/test    (  141): The quick brown fox jumps over the lazy dog
+I/test    (  141): The quick brown fox jumps over the lazy dog
+W/test    (  141): The quick brown fox jumps over the lazy dog
+E/test    (  141): The quick brown fox jumps over the lazy dog
+F/test    (  141): The quick brown fox jumps over the lazy dog
+--------- beginning of /dev/log/system
+V(test    (  145): The quick brown fox jumps over the lazy dog
+D(test    (  141): The quick brown fox jumps over the lazy dog
+I(test    (  141): The quick brown fox jumps over the lazy dog
+W(test    (  141): The quick brown fox jumps over the lazy dog
+E(test    (  141): The quick brown fox jumps over the lazy dog
+F(test    (  141): The quick brown fox jumps over the lazy dog
+--------- beginning of /dev/log/main
+01-28 12:36:22.826     8     8 V TEST    : "The quick brown fox jumps over the lazy dog"
+01-28 12:36:22.826    98    98 D TEST    : "The quick brown fox jumps over the lazy dog"
+01-28 12:36:22.826   398   398 I TEST    : "The quick brown fox jumps over the lazy dog"
+01-28 12:36:22.826  3398  3398 W TEST    : "The quick brown fox jumps over the lazy dog"
+01-28 12:36:22.827  3398  3398 E TEST    : "The quick brown fox jumps over the lazy dog"
+01-28 12:36:22.827  3398  3398 F TEST    : "The quick brown fox jumps over the lazy dog"
+2017-01-28 12:36:22.826     8     8 V TEST    : "The quick brown fox jumps over the lazy dog"
+2017-01-28 12:36:22.826    98    98 D TEST    : "The quick brown fox jumps over the lazy dog"
+2017-01-28 12:36:22.826   398   398 I TEST    : "The quick brown fox jumps over the lazy dog"
+2017-01-28 12:36:22.826  3398  3398 W TEST    : "The quick brown fox jumps over the lazy dog"
+2017-01-28 12:36:22.827  3398  3398 E TEST    : "The quick brown fox jumps over the lazy dog"
+2017-01-28 12:36:22.827  3398  3398 F TEST    : "The quick brown fox jumps over the lazy dog"


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