Menu

[r121]: / syntax / cpp.lang  Maximize  Restore  History

Download this file

107 lines (95 with data), 4.3 kB

<?xml version="1.0" encoding="UTF-8"?>
<!--

 Authors: Marco Barisione, Emanuele Aina
 Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
 Copyright (C) 2005-2007 Emanuele Aina

 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="cpp" _name="C++" version="2.0" _section="Sources">
    <metadata>
      <property name="mimetypes">text/x-c++;text/x-cpp;text/x-c++src</property>
      <property name="globs">*.cpp;*.cxx;*.cc;*.C;*.c++</property>
      <property name="line-comment-start">//</property>
      <property name="block-comment-start">/*</property>
      <property name="block-comment-end">*/</property>
    </metadata>

    <styles>
        <style id="keyword" _name="Keyword" map-to="c:keyword"/>
        <style id="type" _name="Data Type" map-to="c:type"/>
        <style id="common-defines" _name="Common Defines" map-to="c:common-defines"/>
    </styles>

    <definitions>
        <!-- C++-specific stuff (i.e. stuff which is not C) -->
        <context id="cpp-proper">
            <include>
                <context id="keywords" style-ref="keyword">
                    <keyword>and</keyword>
                    <keyword>and_eq</keyword>
                    <keyword>bitand</keyword>
                    <keyword>bitor</keyword>
                    <keyword>catch</keyword>
                    <keyword>compl</keyword>
                    <keyword>const_cast</keyword>
                    <keyword>delete</keyword>
                    <keyword>dynamic_cast</keyword>
                    <keyword>false</keyword>
                    <keyword>friend</keyword>
                    <keyword>new</keyword>
                    <keyword>not</keyword>
                    <keyword>not_eq</keyword>
                    <keyword>operator</keyword>
                    <keyword>or</keyword>
                    <keyword>or_eq</keyword>
                    <keyword>private</keyword>
                    <keyword>protected</keyword>
                    <keyword>public</keyword>
                    <keyword>reinterpret_cast</keyword>
                    <keyword>static_cast</keyword>
                    <keyword>this</keyword>
                    <keyword>throw</keyword>
                    <keyword>true</keyword>
                    <keyword>try</keyword>
                    <keyword>typeid</keyword>
                    <keyword>using</keyword>
                    <keyword>xor</keyword>
                    <keyword>xor_eq</keyword>

                    <keyword>class</keyword>
                    <keyword>namespace</keyword>
                    <keyword>typename</keyword>
                    <keyword>template</keyword>
                    <keyword>virtual</keyword>
                </context>

                <context id="types" style-ref="type">
                    <keyword>bool</keyword>
                    <keyword>explicit</keyword>
                    <keyword>export</keyword>
                    <keyword>inline</keyword>
                    <keyword>mutable</keyword>
                    <keyword>wchar_t</keyword>
                </context>

                <context id="common-defines" style-ref="common-defines">
                    <keyword>__STDC__</keyword>
                    <keyword>__cplusplus</keyword>
                </context>
            </include>
        </context>

        <!-- actual language definition: C++-specific stuff plus everything from C -->
        <context id="cpp">
            <include>
                <context ref="cpp-proper"/>
                <context ref="c:c"/>
            </include>
        </context>
    </definitions>
</language>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.