| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600 |
- <?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" />
- <ref name="Enum" />
- </choice>
- </start>
- <define name="Other">
- <element name="Other">
- <ref name="attrSourceLocation" />
- <ref name="Name" />
- <optional>
- <ref name="USR" />
- </optional>
- <optional>
- <ref name="Headerfile" />
- </optional>
- <optional>
- <ref name="Declaration" />
- </optional>
- <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>
- <optional>
- <ref name="Headerfile" />
- </optional>
- <optional>
- <ref name="Declaration" />
- </optional>
- <optional>
- <ref name="Abstract" />
- </optional>
- <optional>
- <ref name="TemplateParameters" />
- </optional>
- <optional>
- <ref name="Parameters" />
- </optional>
- <optional>
- <ref name="Exceptions" />
- </optional>
- <zeroOrMore>
- <ref name="Availability" />
- </zeroOrMore>
- <zeroOrMore>
- <ref name="Deprecated" />
- </zeroOrMore>
- <zeroOrMore>
- <ref name="Unavailable" />
- </zeroOrMore>
- <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>
- <optional>
- <ref name="Headerfile" />
- </optional>
- <optional>
- <ref name="Declaration" />
- </optional>
- <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>
- <optional>
- <ref name="Headerfile" />
- </optional>
- <optional>
- <ref name="Declaration" />
- </optional>
- <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>
- <optional>
- <ref name="Headerfile" />
- </optional>
- <optional>
- <ref name="Declaration" />
- </optional>
- <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>
- <optional>
- <ref name="Headerfile" />
- </optional>
- <optional>
- <ref name="Declaration" />
- </optional>
- <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>
- <define name="Enum">
- <element name="Enum">
- <ref name="attrSourceLocation" />
- <ref name="Name" />
- <optional>
- <ref name="USR" />
- </optional>
- <optional>
- <ref name="Headerfile" />
- </optional>
- <optional>
- <ref name="Declaration" />
- </optional>
- <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>
- <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>
- <define name="Declaration">
- <element name="Declaration">
- <!-- Non-empty text content. -->
- <data type="string"/>
- </element>
- </define>
- <define name="Headerfile">
- <element name="Headerfile">
- <oneOrMore>
- <ref name="TextBlockContent" />
- </oneOrMore>
- </element>
- </define>
- <define name="Discussion">
- <element name="Discussion">
- <zeroOrMore>
- <ref name="TextBlockContent" />
- </zeroOrMore>
- </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>
- <choice>
- <element name="Index">
- <data type="nonNegativeInteger" />
- </element>
- <element name="IsVarArg">
- <empty />
- </element>
- </choice>
- </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>
- <define name="Exceptions">
- <element name="Exceptions">
- <oneOrMore>
- <ref name="TextBlockContent" />
- </oneOrMore>
- </element>
- </define>
- <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>
- <define name="ResultDiscussion">
- <element name="ResultDiscussion">
- <zeroOrMore>
- <ref name="TextBlockContent" />
- </zeroOrMore>
- </element>
- </define>
- <define name="TextBlockContent">
- <choice>
- <element name="Para">
- <optional>
- <attribute name="kind">
- <choice>
- <value>attention</value>
- <value>author</value>
- <value>authors</value>
- <value>bug</value>
- <value>copyright</value>
- <value>date</value>
- <value>invariant</value>
- <value>note</value>
- <value>post</value>
- <value>pre</value>
- <value>remark</value>
- <value>remarks</value>
- <value>sa</value>
- <value>see</value>
- <value>since</value>
- <value>todo</value>
- <value>version</value>
- <value>warning</value>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="TextInlineContent" />
- </zeroOrMore>
- </element>
- <element name="Verbatim">
- <attribute name="xml:space">
- <value>preserve</value>
- </attribute>
- <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">
- <optional>
- <!-- If not specified, the default value is 'false'. -->
- <!-- The value 'false' or absence of the attribute does not imply
- that the HTML is actually well-formed. -->
- <attribute name="isMalformed">
- <data type="boolean" />
- </attribute>
- </optional>
- <!-- Non-empty text content. -->
- <data type="string">
- <param name="pattern">.*\S.*</param>
- </data>
- </element>
- </choice>
- </define>
- </grammar>
|