All pastes #629455 Raw Edit

New def.lang

public xml v1 · immutable
·published 2007-07-22 09:46 UTC
rendered paste body
<?xml version="1.0" encoding="UTF-8"?><!-- Authors: Marco Barisione, Emanuele Aina, Paolo Maggi  Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com> Copyright (C) 2005-2007 Emanuele Aina Copyright (C) 2007 Paolo Maggi 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="def" _name="Defaults" hidden="true" version="2.0">    <styles>            <!-- Comment group -->            	<!-- Any comment -->        <style id="comment"         _name="Comment"/>        <!-- A shebang: #!/bin/sh -->        <style id="shebang"          _name="Shebang" map-to="def:comment"/>        <!-- A special comment containing documentation like in javadoc or             gtk-doc -->        <style id="doc-comment"      _name="Documentation comment" map-to="def:comment"/>	<!-- Special things inside a comment -->	<style id="special-comment" _name="Special comment" map-to="def:comment" />        <!-- A element inside a documentation comment: @author -->	<style id="doc-comment-element" _name="Documentation comment element" map-to="def:special-comment"/>        <!-- Constant group -->                       	<!-- Any constant -->        <style id="constant"        _name="Constant"/>	<!-- A string string constant: "this is a string" -->	        <style id="string"          _name="String" map-to="def:constant"/>                <!-- A character constant: 'c', '\n' -->        <style id="character"       _name="Character" map-to="def:constant"/>I think having it here makes sense: a minimalistic theme can live without highlighting %s in strings, gsv1 has done it for years.        <!-- Special character in a constant: "%s", "\t" -->	<style id="special-char"    _name="Special char" map-to="def:string" />        <!-- A generic number constant -->        <style id="number"          _name="Number" map-to="def:constant"/>                <!-- A boolean constant: TRUE, false -->        <style id="boolean"         _name="Boolean" map-to="def:constant"/>                <!-- A floating point constant: 2.3e10 -->	<style id="float"           _name="Float" map-to="def:number"/>        <!-- A decimal number: 1234 -->        <style id="decimal"         _name="Decimal" map-to="def:number"/>                <!-- A base-N number: 0xFFFF -->        <style id="base-n-integer"  _name="Base-N integer" map-to="def:number"/>                <!-- A complex number -->        <style id="complex"         _name="Complex" map-to="def:number"/>                <!-- For things like NULL in C. -->        <style id="special-value"   _name="Special value" map-to="def:constant"/>        	        <!-- Identifier group -->	<!-- Any variable name -->	<style id="identifier"      _name="Identifier" />	<!-- A function name (also: methods for classes) -->        <style id="function"        _name="Function" map-to="def:identifier"/>This is common in our lang files and useful for many scripting languages	<!-- A builtin name -->        <style id="builtin"        _name="Builtin" map-to="def:identifier"/>        <!-- Statement group -->        <!-- Any statement -->        <style id="statement"       _name="Statement"/>Conditional, repeat  and label look completely overboard to me "while" and "if" are just keywords and should be highlighted in the same way, so I would cut this group down to keyword, operator and exception        <!-- if, then, else, endif, switch, etc. -->        <style id="conditional"     _name="Conditional" map-to="def:statement"/>                <!-- for, do, while, etc. -->        <style id="repeat"          _name="Repeat" map-to="def:statement" />        <!-- case, default, etc. -->        <style id="label"           _name="Label" map-to="def:statement" />	<!-- "sizeof", "+", "*", etc. -->        <style id="operator"        _name="Operator" map-to="def:statement" />	<!-- Any other keyword -->        <style id="keyword"         _name="Keyword" map-to="def:statement" />	<!--try, catch, throw, etc. -->        <style id="exception"       _name="Exception" map-to="def:statement" />        <!-- Type group -->        <!--int, long, char, etc. -->        <style id="type"            _name="Type"/>I'd remove the following three: they are C specific, let c.lang define them and map them to def:type        <!-- static, register, volatile, etc. -->        <style id="storage-class"   _name="Storage class" map-to="def:type" />	<!-- struct, union, enum, etc. -->	<style id="structure"       _name="Structure" map-to="def:type" />	<!-- A typedef -->	<style id="typedef"         _name="Typedef" map-to="def:type" />	        <!-- Others -->	<!-- Any erroneous construct -->	<style id="error"           _name="Error"/>        <!-- anything that needs extra attention; mostly the keywords TODO FIXME and XXX -->        <style id="note"            _name="Note"/>        <!-- Text that stands out, HTML links, e-mail addresses. etc. -->        <style id="underlined"      _name="Underlined"/>	<!-- This one is for '#include <foo.h>' and "#pragma blah", or 'use foobar', etc.. -->        <style id="preprocessor"    _name="Preprocessor directive"/>    	<!-- A character that needs attention -->	<style id="delimiter"       _name="Delimiter" map-to="def:special" />        <!-- DEPRECATED -->        <!-- Next styles are deprecated and must not be used in new .lang files             and style schemes -->                  <style id="data-type"              name="" map-to="def:type"/>                <style id="floating-point"         name="" map-to="def:float"/>        <style id="net-address-in-comment" name="" map-to="def:underlined"/>        <style id="escape"                 name="" map-to="def:special-char"/>    </styles>