home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / gtksourceview-2.0 / language-specs / t2t.lang < prev    next >
Encoding:
Extensible Markup Language  |  2010-08-16  |  5.1 KB  |  150 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Yevgen Muntyan <muntyan@tamu.edu>
  5.  Copyright (C) 2008 Yevgen Muntyan <muntyan@tamu.edu>
  6.  
  7.  This library is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU Library General Public
  9.  License as published by the Free Software Foundation; either
  10.  version 2 of the License, or (at your option) any later version.
  11.  
  12.  This library is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  Library General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU Library General Public
  18.  License along with this library; if not, write to the
  19.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  Boston, MA 02111-1307, USA.
  21.  
  22. -->
  23. <language id="t2t" _name="Text2Tags" version="2.0" _section="Markup">
  24.   <metadata>
  25.     <property name="globs">*.t2t</property>
  26.     <property name="line-comment-start">%</property>
  27.   </metadata>
  28.  
  29.   <styles>
  30.     <style id="comment" _name="Comment"/>
  31.     <style id="option" _name="Option"/>
  32.     <style id="option-name" _name="Option Name" map-to="def:keyword"/>
  33.     <style id="header" _name="Header" map-to="def:keyword"/>
  34.     <style id="section" _name="Section" map-to="def:keyword"/>
  35.     <style id="section-1" _name="Section 1" map-to="t2t:section"/>
  36.     <style id="section-2" _name="Section 2" map-to="t2t:section"/>
  37.     <style id="section-3" _name="Section 3" map-to="t2t:section"/>
  38.     <style id="section-4" _name="Section 4" map-to="t2t:section"/>
  39.     <style id="section-5" _name="Section 5" map-to="t2t:section"/>
  40.     <style id="anchor" _name="Anchor" map-to="t2t:section"/>
  41.     <style id="italic" _name="Italic"/>
  42.     <style id="bold" _name="Bold"/>
  43.     <style id="verbatim" _name="Verbatim"/>
  44.     <style id="verbatim-block" _name="Verbatim Block"/>
  45.   </styles>
  46.  
  47.   <definitions>
  48.     <context id="header" first-line-only="true" style-ref="header">
  49.       <match>.+</match>
  50.     </context>
  51.  
  52.     <context id="options">
  53.       <include>
  54.         <context id="option" style-ref="option">
  55.           <match>^(%!\s*(?:[Tt]arget|[Ee]ncoding|[Oo]ptions|[Pp](?:ost|re)proc|[Ii]nclude(?:conf)?|[Ss]tyle|[Gg]uicolors)(?:\(\S+\))?)\s*:.*</match>
  56.           <include>
  57.             <context id="option-name" sub-pattern="1" style-ref="option-name"/>
  58.           </include>
  59.         </context>
  60.         <context id="invalid-option" style-ref="def:error">
  61.           <match>^%!.*</match>
  62.         </context>
  63.       </include>
  64.     </context>
  65.  
  66.     <context id="comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
  67.       <start>^%</start>
  68.     </context>
  69.  
  70.     <context id="sections">
  71.       <include>
  72.         <context id="section-1">
  73.           <match>^(=(?!=).*(?<!=)=)(?!=)(\[.*\])?</match>
  74.           <include>
  75.             <context sub-pattern="1" style-ref="section-1"/>
  76.             <context sub-pattern="2" style-ref="anchor"/>
  77.           </include>
  78.         </context>
  79.         <context id="section-2">
  80.           <match>^(==(?!=).*(?<!=)==)(?!=)(\[.*\])?</match>
  81.           <include>
  82.             <context sub-pattern="1" style-ref="section-2"/>
  83.             <context sub-pattern="2" style-ref="anchor"/>
  84.           </include>
  85.         </context>
  86.         <context id="section-3">
  87.           <match>^(===(?!=).*(?<!=)===)(?!=)(\[.*\])?</match>
  88.           <include>
  89.             <context sub-pattern="1" style-ref="section-3"/>
  90.             <context sub-pattern="2" style-ref="anchor"/>
  91.           </include>
  92.         </context>
  93.         <context id="section-4">
  94.           <match>^(====(?!=).*(?<!=)====)(?!=)(\[.*\])?</match>
  95.           <include>
  96.             <context sub-pattern="1" style-ref="section-4"/>
  97.             <context sub-pattern="2" style-ref="anchor"/>
  98.           </include>
  99.         </context>
  100.         <context id="section-5">
  101.           <match>^(=====(?!=).*(?<!=)=====)(?!=)(\[.*\])?</match>
  102.           <include>
  103.             <context sub-pattern="1" style-ref="section-5"/>
  104.             <context sub-pattern="2" style-ref="anchor"/>
  105.           </include>
  106.         </context>
  107.       </include>
  108.     </context>
  109.  
  110.     <context id="italic">
  111.       <match>//(.*?)//</match>
  112.       <include>
  113.         <context sub-pattern="1" style-ref="italic"/>
  114.       </include>
  115.     </context>
  116.  
  117.     <context id="bold">
  118.       <match>\*\*(.*?)\*\*</match>
  119.       <include>
  120.         <context sub-pattern="1" style-ref="bold"/>
  121.       </include>
  122.     </context>
  123.  
  124.     <context id="verbatim">
  125.       <match>``(.*?)``</match>
  126.       <include>
  127.         <context sub-pattern="1" style-ref="verbatim"/>
  128.       </include>
  129.     </context>
  130.  
  131.     <context id="verbatim-block" style-ref="verbatim-block" style-inside="true">
  132.       <start>^```$</start>
  133.       <end>^```$</end>
  134.     </context>
  135.  
  136.     <context id="t2t" class="no-spell-check">
  137.       <include>
  138.         <context ref="header"/>
  139.         <context ref="sections"/>
  140.         <context ref="options"/>
  141.         <context ref="comment"/>
  142.         <context ref="italic"/>
  143.         <context ref="bold"/>
  144.         <context ref="verbatim"/>
  145.         <context ref="verbatim-block"/>
  146.       </include>
  147.     </context>
  148.   </definitions>
  149. </language>
  150.