2012-08-08 01:54:38 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
|
|
|
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
|
|
|
|
|
|
<start>
|
|
|
|
<choice>
|
|
|
|
<!-- Everything else not explicitly mentioned below. -->
|
|
|
|
<ref name="Other" />
|
|
|
|
|
|
|
|
<ref name="Function" />
|
|
|
|
<ref name="Class" />
|
|
|
|
<ref name="Variable" />
|
|
|
|
<ref name="Namespace" />
|
|
|
|
<ref name="Typedef" />
|
2012-08-08 02:59:04 +08:00
|
|
|
<ref name="Enum" />
|
2012-08-08 01:54:38 +08:00
|
|
|
</choice>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<define name="Other">
|
|
|
|
<element name="Other">
|
|
|
|
<ref name="attrSourceLocation" />
|
|
|
|
<ref name="Name" />
|
|
|
|
<optional>
|
|
|
|
<ref name="USR" />
|
|
|
|
</optional>
|
2013-02-01 07:12:39 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Headerfile" />
|
|
|
|
</optional>
|
2012-10-18 05:58:03 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Declaration" />
|
|
|
|
</optional>
|
2012-08-08 01:54:38 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Abstract" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="TemplateParameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Parameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ResultDiscussion" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Discussion" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Function">
|
|
|
|
<element name="Function">
|
|
|
|
<optional>
|
|
|
|
<attribute name="templateKind">
|
|
|
|
<choice>
|
|
|
|
<value>template</value>
|
|
|
|
<value>specialization</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="attrSourceLocation" />
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<attribute name="isInstanceMethod">
|
|
|
|
<data type="boolean" />
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="isClassMethod">
|
|
|
|
<data type="boolean" />
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<ref name="Name" />
|
|
|
|
<optional>
|
|
|
|
<ref name="USR" />
|
|
|
|
</optional>
|
|
|
|
<!-- TODO: Add exception specification. -->
|
2013-02-01 07:12:39 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Headerfile" />
|
|
|
|
</optional>
|
2012-10-18 05:58:03 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Declaration" />
|
|
|
|
</optional>
|
2012-08-08 01:54:38 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Abstract" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="TemplateParameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Parameters" />
|
|
|
|
</optional>
|
2012-09-29 06:35:49 +08:00
|
|
|
<zeroOrMore>
|
2012-10-02 02:42:25 +08:00
|
|
|
<ref name="Availability" />
|
2012-09-29 06:35:49 +08:00
|
|
|
</zeroOrMore>
|
2012-10-03 04:05:47 +08:00
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="Deprecated" />
|
|
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="Unavailable" />
|
|
|
|
</zeroOrMore>
|
2012-08-08 01:54:38 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="ResultDiscussion" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Discussion" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Class">
|
|
|
|
<element name="Class">
|
|
|
|
<optional>
|
|
|
|
<attribute name="templateKind">
|
|
|
|
<choice>
|
|
|
|
<value>template</value>
|
|
|
|
<value>specialization</value>
|
|
|
|
<value>partialSpecialization</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<ref name="attrSourceLocation" />
|
|
|
|
|
|
|
|
<ref name="Name" />
|
|
|
|
<optional>
|
|
|
|
<ref name="USR" />
|
|
|
|
</optional>
|
2013-02-01 07:12:39 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Headerfile" />
|
|
|
|
</optional>
|
2012-10-18 05:58:03 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Declaration" />
|
|
|
|
</optional>
|
2012-08-08 01:54:38 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Abstract" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="TemplateParameters" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- Parameters and results don't make sense for classes, but the user
|
|
|
|
can specify \param or \returns in a comment anyway. -->
|
|
|
|
<optional>
|
|
|
|
<ref name="Parameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ResultDiscussion" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="Discussion" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Variable">
|
|
|
|
<element name="Variable">
|
|
|
|
<ref name="attrSourceLocation" />
|
|
|
|
<ref name="Name" />
|
|
|
|
<optional>
|
|
|
|
<ref name="USR" />
|
|
|
|
</optional>
|
2013-02-01 07:12:39 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Headerfile" />
|
|
|
|
</optional>
|
2012-10-18 05:58:03 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Declaration" />
|
|
|
|
</optional>
|
2012-08-08 01:54:38 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Abstract" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- Template parameters, parameters and results don't make sense for
|
|
|
|
variables, but the user can specify \tparam \param or \returns
|
|
|
|
in a comment anyway. -->
|
|
|
|
<optional>
|
|
|
|
<ref name="TemplateParameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Parameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ResultDiscussion" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="Discussion" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Namespace">
|
|
|
|
<element name="Namespace">
|
|
|
|
<ref name="attrSourceLocation" />
|
|
|
|
<ref name="Name" />
|
|
|
|
<optional>
|
|
|
|
<ref name="USR" />
|
|
|
|
</optional>
|
2013-02-01 07:12:39 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Headerfile" />
|
|
|
|
</optional>
|
2012-10-18 05:58:03 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Declaration" />
|
|
|
|
</optional>
|
2012-08-08 01:54:38 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Abstract" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- Template parameters, parameters and results don't make sense for
|
|
|
|
namespaces, but the user can specify \tparam, \param or \returns
|
|
|
|
in a comment anyway. -->
|
|
|
|
<optional>
|
|
|
|
<ref name="TemplateParameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Parameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ResultDiscussion" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="Discussion" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Typedef">
|
|
|
|
<element name="Typedef">
|
|
|
|
<ref name="attrSourceLocation" />
|
|
|
|
<ref name="Name" />
|
|
|
|
<optional>
|
|
|
|
<ref name="USR" />
|
|
|
|
</optional>
|
2013-02-01 07:12:39 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Headerfile" />
|
|
|
|
</optional>
|
2012-10-18 05:58:03 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Declaration" />
|
|
|
|
</optional>
|
2012-08-08 01:54:38 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Abstract" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="TemplateParameters" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- Parameters and results might make sense for typedefs if the type is
|
|
|
|
a function pointer type. -->
|
|
|
|
<optional>
|
|
|
|
<ref name="Parameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ResultDiscussion" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="Discussion" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-08-08 02:59:04 +08:00
|
|
|
<define name="Enum">
|
|
|
|
<element name="Enum">
|
|
|
|
<ref name="attrSourceLocation" />
|
|
|
|
<ref name="Name" />
|
|
|
|
<optional>
|
|
|
|
<ref name="USR" />
|
|
|
|
</optional>
|
2013-02-01 07:12:39 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Headerfile" />
|
|
|
|
</optional>
|
2012-10-18 05:58:03 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Declaration" />
|
|
|
|
</optional>
|
2012-08-08 02:59:04 +08:00
|
|
|
<optional>
|
|
|
|
<ref name="Abstract" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<!-- Template parameters, parameters and results don't make sense for
|
|
|
|
enums, but the user can specify \tparam \param or \returns in a
|
|
|
|
comment anyway. -->
|
|
|
|
<optional>
|
|
|
|
<ref name="TemplateParameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Parameters" />
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="ResultDiscussion" />
|
|
|
|
</optional>
|
|
|
|
|
|
|
|
<optional>
|
|
|
|
<ref name="Discussion" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-08-08 01:54:38 +08:00
|
|
|
<define name="attrSourceLocation">
|
|
|
|
<optional>
|
|
|
|
<attribute name="file">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<attribute name="line">
|
|
|
|
<data type="positiveInteger" />
|
|
|
|
</attribute>
|
|
|
|
<attribute name="column">
|
|
|
|
<data type="positiveInteger" />
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Name">
|
|
|
|
<element name="Name">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="USR">
|
|
|
|
<element name="USR">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Abstract">
|
|
|
|
<element name="Abstract">
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="TextBlockContent" />
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-10-18 05:58:03 +08:00
|
|
|
<define name="Declaration">
|
|
|
|
<element name="Declaration">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string"/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2013-02-01 07:12:39 +08:00
|
|
|
<define name="Headerfile">
|
|
|
|
<element name="Headerfile">
|
|
|
|
<oneOrMore>
|
|
|
|
<ref name="TextBlockContent" />
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-08-08 01:54:38 +08:00
|
|
|
<define name="Discussion">
|
|
|
|
<element name="Discussion">
|
2012-09-14 05:32:58 +08:00
|
|
|
<zeroOrMore>
|
2012-08-08 01:54:38 +08:00
|
|
|
<ref name="TextBlockContent" />
|
2012-09-14 05:32:58 +08:00
|
|
|
</zeroOrMore>
|
2012-08-08 01:54:38 +08:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="TemplateParameters">
|
|
|
|
<element name="TemplateParameters">
|
|
|
|
<!-- Parameter elements should be sorted according to position. -->
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="Parameter">
|
|
|
|
<element name="Name">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<!-- This is index at depth 0. libclang API can return more
|
|
|
|
information about position, but we expose only essential
|
|
|
|
information here, since "Parameter" elements are already
|
|
|
|
sorted.
|
|
|
|
|
|
|
|
"Position" element could be added in future if needed. -->
|
|
|
|
<element name="Index">
|
|
|
|
<data type="nonNegativeInteger" />
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<!-- In general, template parameters with whitespace discussion
|
|
|
|
should not be emitted. Schema might be more strict here. -->
|
|
|
|
<element name="Discussion">
|
|
|
|
<ref name="TextBlockContent" />
|
|
|
|
</element>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Parameters">
|
|
|
|
<element name="Parameters">
|
|
|
|
<!-- Parameter elements should be sorted according to index. -->
|
|
|
|
<oneOrMore>
|
|
|
|
<element name="Parameter">
|
|
|
|
<element name="Name">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name="Index">
|
|
|
|
<data type="nonNegativeInteger" />
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<element name="Direction">
|
|
|
|
<attribute name="isExplicit">
|
|
|
|
<data type="boolean" />
|
|
|
|
</attribute>
|
|
|
|
<choice>
|
|
|
|
<value>in</value>
|
|
|
|
<value>out</value>
|
|
|
|
<value>in,out</value>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
<!-- In general, template parameters with whitespace discussion
|
|
|
|
should not be emitted, unless direction is explicitly specified.
|
|
|
|
Schema might be more strict here. -->
|
|
|
|
<element name="Discussion">
|
|
|
|
<ref name="TextBlockContent" />
|
|
|
|
</element>
|
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-10-03 17:04:56 +08:00
|
|
|
<define name="Availability">
|
|
|
|
<element name="Availability">
|
|
|
|
<attribute name="distribution">
|
|
|
|
<data type="string" />
|
|
|
|
</attribute>
|
|
|
|
<optional>
|
|
|
|
<element name="IntroducedInVersion">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">\d+|\d+\.\d+|\d+\.\d+.\d+</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="DeprecatedInVersion">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">\d+|\d+\.\d+|\d+\.\d+.\d+</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="RemovedAfterVersion">
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">\d+|\d+\.\d+|\d+\.\d+.\d+</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name="DeprecationSummary">
|
|
|
|
<data type="string" />
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name="Unavailable" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Deprecated">
|
|
|
|
<element name="Deprecated">
|
|
|
|
<optional>
|
|
|
|
<data type="string" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="Unavailable">
|
|
|
|
<element name="Unavailable">
|
|
|
|
<optional>
|
|
|
|
<data type="string" />
|
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2012-08-08 01:54:38 +08:00
|
|
|
<define name="ResultDiscussion">
|
|
|
|
<element name="ResultDiscussion">
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="TextBlockContent" />
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="TextBlockContent">
|
|
|
|
<choice>
|
|
|
|
<element name="Para">
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name="TextInlineContent" />
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
<element name="Verbatim">
|
2012-08-09 06:10:24 +08:00
|
|
|
<attribute name="xml:space">
|
|
|
|
<value>preserve</value>
|
|
|
|
</attribute>
|
2012-08-08 01:54:38 +08:00
|
|
|
<attribute name="kind">
|
|
|
|
<!-- TODO: add all Doxygen verbatim kinds -->
|
|
|
|
<choice>
|
|
|
|
<value>code</value>
|
|
|
|
<value>verbatim</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<text />
|
|
|
|
</element>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name="TextInlineContent">
|
|
|
|
<choice>
|
|
|
|
<text />
|
|
|
|
<element name="bold">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
<element name="monospaced">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
<element name="emphasized">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
<element name="rawHTML">
|
|
|
|
<!-- Non-empty text content. -->
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">.*\S.*</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
</grammar>
|
|
|
|
|