[gtksourceview] bennugd.lang: clean up to use refs to def and c (bug #651179) * ref comments to def.lang * ref char



commit 2e01198d08519859776b4cad8af6fdcaddd7d968
Author: Carnë Draug <carandraug+dev gmail com>
Date:   Thu May 26 19:36:57 2011 +0100

    bennugd.lang: clean up to use refs to def and c (bug #651179) * ref comments to def.lang * ref char and string to c * removed no longer necessary styles * removed trailing spaces

 data/language-specs/bennugd.lang |  162 +++++++++++++-------------------------
 1 files changed, 56 insertions(+), 106 deletions(-)
---
diff --git a/data/language-specs/bennugd.lang b/data/language-specs/bennugd.lang
index 497b566..1f91256 100644
--- a/data/language-specs/bennugd.lang
+++ b/data/language-specs/bennugd.lang
@@ -30,57 +30,25 @@
 
   <styles>
     <style id="comment"           _name="Comment"               map-to="def:comment"/>
-    <style id="error"             _name="Error"                 map-to="def:error"/>
     <style id="preprocessor"      _name="Preprocessor"          map-to="def:preprocessor"/>
     <style id="identifier"        _name="Identifier"            map-to="def:identifier"/>
     <style id="operator"          _name="Operator"              map-to="def:operator"/>
     <style id="keywords"          _name="Keyword"               map-to="def:keyword"/>
     <style id="types"             _name="Data Type"             map-to="def:type"/>
-    <style id="escaped-character" _name="Escaped Character"     map-to="def:special-char"/>
     <style id="floating-point"    _name="Floating point number" map-to="def:floating-point"/>
     <style id="decimal"           _name="Decimal number"        map-to="def:decimal"/>
     <style id="hexadecimal"       _name="Hexadecimal number"    map-to="def:base-n-integer"/>
     <style id="boolean"           _name="Boolean value"         map-to="def:boolean"/>
-    <style id="string"            _name="String"                map-to="def:string"/>
-    <style id="char"              _name="Character"             map-to="def:character"/>
   </styles>
 
   <default-regex-options case-sensitive="false" />
-
   <definitions>
 
+    <!--regexs-->
     <define-regex id="symbolchar">[-!+\\|=:&amp;&gt;&lt;]</define-regex>
-
-    <define-regex id="escaped-character" extended="true">
-      \\(             # leading backslash
-      [\\\"\'nrbtfav\?] |   # escaped character
-      [0-7]{1,3} |          # one, two, or three octal digits
-      x[0-9A-Fa-f]+         # 'x' followed by hex digits
-      )
-    </define-regex>
-
-    <!--Comments -->
-    <context id="comment" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check">
-      <start>//</start>
-      <include>
-        <context ref="def:in-line-comment"/>
-      </include>
-    </context>
-
-    <context id="comment-multiline" style-ref="comment" class-disabled="no-spell-check">
-      <start>/\*</start>
-      <end>\*/</end>
-      <include>
-        <context ref="def:in-comment"/>
-      </include>
-    </context>
-
-    <context id="close-comment-outside-comment" style-ref="error">
-      <match>\*/(?!\*)</match>
-    </context>
+    <define-regex id="preproc-start">^\s*#\s*</define-regex>
 
     <!--Preprocessor -->
-    <define-regex id="preproc-start">^\s*#\s*</define-regex>
     <context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
       <start extended="true">
         \%{preproc-start}
@@ -89,35 +57,17 @@
       </start>
       <include>
         <context ref="def:line-continue" ignore-style="true"/>
-        <context ref="string" ignore-style="true"/>
-        <context ref="comment"/>
-        <context ref="comment-multiline"/>
+        <context ref="c:string" ignore-style="true"/>
+        <context ref="def:c-like-comment"/>
+        <context ref="def:c-like-comment-multiline"/>
       </include>
     </context>
 
-    <!-- Different data-types -->
-    <context id="escaped-character" style-ref="escaped-character">
-      <match>\%{escaped-character}</match>
-    </context>
-    
-    <context id="string" style-ref="string" end-at-line-end="true">
-      <start>L?"</start>
-      <end>"</end>
-      <include>
-        <context ref="escaped-character"/>
-        <context ref="def:line-continue"/>
-      </include>
-    </context>
-    
-    <context id="char" style-ref="char">
-      <match>L?'(\%{escaped-character}|.)'</match>
-    </context>
-    
     <context id="boolean" style-ref="boolean">
       <keyword>false</keyword>
       <keyword>true</keyword>
     </context>
-    
+
     <context id="float" style-ref="floating-point">
       <match extended="true">
         (?&lt;![\w\.])
@@ -126,7 +76,7 @@
         (?![\w\.])
       </match>
     </context>
-    
+
     <context id="decimal-number" style-ref="decimal">
       <match extended="true">
          (?&lt;![\w\.])
@@ -134,7 +84,7 @@
          (?![\w\.])
        </match>
     </context>
-    
+
     <context id="hexadecimal-number" style-ref="hexadecimal">
       <match extended="true">
          (?&lt;![\w\.])
@@ -143,54 +93,54 @@
       </match>
     </context>
 
-    <!--Keywords --> 
+    <!--Keywords -->
     <context id="keywords" style-ref="keywords">
       <keyword>begin</keyword>
       <keyword>break</keyword>
-      <keyword>call</keyword> 
+      <keyword>call</keyword>
       <keyword>case</keyword>
-      <keyword>clone</keyword> 
-      <keyword>const</keyword> 
+      <keyword>clone</keyword>
+      <keyword>const</keyword>
       <keyword>continue</keyword>
-      <keyword>debug</keyword> 
-      <keyword>declare</keyword> 
-      <keyword>default</keyword> 
-      <keyword>dup</keyword> 
-      <keyword>elif</keyword> 
-      <keyword>else</keyword> 
-      <keyword>elseif</keyword> 
-      <keyword>elsif</keyword> 
-      <keyword>end</keyword> 
-      <keyword>error</keyword> 
+      <keyword>debug</keyword>
+      <keyword>declare</keyword>
+      <keyword>default</keyword>
+      <keyword>dup</keyword>
+      <keyword>elif</keyword>
+      <keyword>else</keyword>
+      <keyword>elseif</keyword>
+      <keyword>elsif</keyword>
+      <keyword>end</keyword>
+      <keyword>error</keyword>
       <keyword>exit</keyword>
-      <keyword>for</keyword> 
-      <keyword>frame</keyword> 
-      <keyword>from</keyword> 
+      <keyword>for</keyword>
+      <keyword>frame</keyword>
+      <keyword>from</keyword>
       <keyword>function</keyword>
-      <keyword>global</keyword> 
+      <keyword>global</keyword>
       <keyword>goto</keyword>
-      <keyword>if</keyword> 
-      <keyword>import</keyword> 
-      <keyword>include</keyword> 
+      <keyword>if</keyword>
+      <keyword>import</keyword>
+      <keyword>include</keyword>
       <keyword>jmp</keyword>
-      <keyword>local</keyword> 
+      <keyword>local</keyword>
       <keyword>loop</keyword>
-      <keyword>mod</keyword> 
+      <keyword>mod</keyword>
       <keyword>mouse</keyword>
       <keyword>next</keyword>
-      <keyword>offset</keyword> 
-      <keyword>on</keyword> 
-      <keyword>onerror</keyword> 
+      <keyword>offset</keyword>
+      <keyword>on</keyword>
+      <keyword>onerror</keyword>
       <keyword>onexit</keyword>
-      <keyword>private</keyword> 
-      <keyword>process</keyword> 
-      <keyword>program</keyword> 
+      <keyword>private</keyword>
+      <keyword>process</keyword>
+      <keyword>program</keyword>
       <keyword>public</keyword>
-      <keyword>repeat</keyword> 
-      <keyword>resume</keyword> 
+      <keyword>repeat</keyword>
+      <keyword>resume</keyword>
       <keyword>return</keyword>
-      <keyword>sizeof</keyword> 
-      <keyword>step</keyword> 
+      <keyword>sizeof</keyword>
+      <keyword>step</keyword>
       <keyword>switch</keyword>
       <keyword>to</keyword>
       <keyword>until</keyword>
@@ -202,7 +152,7 @@
       <keyword>argv</keyword>
       <keyword>os_id</keyword>
     </context>
-    
+
     <context id="locals" style-ref="keywords">
       <keyword>bigbro</keyword>
       <keyword>father</keyword>
@@ -243,18 +193,18 @@
 
     <context id="types" style-ref="types">
       <keyword>byte</keyword>
-      <keyword>char</keyword> 
+      <keyword>char</keyword>
       <keyword>dword</keyword>
-      <keyword>float</keyword> 
+      <keyword>float</keyword>
       <keyword>int</keyword>
-      <keyword>pointer</keyword> 
-      <keyword>short</keyword> 
-      <keyword>signed</keyword> 
-      <keyword>string</keyword> 
-      <keyword>struct</keyword> 
+      <keyword>pointer</keyword>
+      <keyword>short</keyword>
+      <keyword>signed</keyword>
+      <keyword>string</keyword>
+      <keyword>struct</keyword>
       <keyword>type</keyword>
       <keyword>unsigned</keyword>
-      <keyword>word</keyword>  
+      <keyword>word</keyword>
     </context>
 
     <context id="commonmacros" style-ref="preprocessor">
@@ -290,16 +240,16 @@
       <keyword>status_waiting</keyword>
       <keyword>__TIME__ </keyword>
       <keyword>__VERSION__</keyword>
-    </context>     
+    </context>
 
     <context id="bennugd" class="no-spell-check">
       <include>
-        <context ref="comment"/>
-        <context ref="comment-multiline"/>
-        <context ref="close-comment-outside-comment"/>
+        <context ref="def:c-like-comment"/>
+        <context ref="def:c-like-comment-multiline"/>
+        <context ref="def:c-like-close-comment-outside-comment"/>
         <context ref="preprocessor"/>
-        <context ref="string"/>
-        <context ref="char"/>
+        <context ref="c:string"/>
+        <context ref="c:char"/>
         <context ref="boolean"/>
         <context ref="float"/>
         <context ref="decimal-number"/>



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