1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <grammar xmlns=
"http://relaxng.org/ns/structure/1.0"
4 datatypeLibrary=
"http://www.w3.org/2001/XMLSchema-datatypes">
8 <!-- Everything else not explicitly mentioned below. -->
11 <ref name=
"Function" />
13 <ref name=
"Variable" />
14 <ref name=
"Namespace" />
15 <ref name=
"Typedef" />
21 <element name=
"Other">
22 <ref name=
"attrSourceLocation" />
28 <ref name=
"Headerfile" />
31 <ref name=
"Declaration" />
34 <ref name=
"Abstract" />
37 <ref name=
"TemplateParameters" />
40 <ref name=
"Parameters" />
43 <ref name=
"ResultDiscussion" />
46 <ref name=
"Discussion" />
51 <define name=
"Function">
52 <element name=
"Function">
54 <attribute name=
"templateKind">
56 <value>template
</value>
57 <value>specialization
</value>
61 <ref name=
"attrSourceLocation" />
64 <attribute name=
"isInstanceMethod">
65 <data type=
"boolean" />
69 <attribute name=
"isClassMethod">
70 <data type=
"boolean" />
79 <ref name=
"Headerfile" />
82 <ref name=
"Declaration" />
85 <ref name=
"Abstract" />
88 <ref name=
"TemplateParameters" />
91 <ref name=
"Parameters" />
94 <ref name=
"Exceptions" />
97 <ref name=
"Availability" />
100 <ref name=
"Deprecated" />
103 <ref name=
"Unavailable" />
106 <ref name=
"ResultDiscussion" />
109 <ref name=
"Discussion" />
114 <define name=
"Class">
115 <element name=
"Class">
117 <attribute name=
"templateKind">
119 <value>template
</value>
120 <value>specialization
</value>
121 <value>partialSpecialization
</value>
125 <ref name=
"attrSourceLocation" />
132 <ref name=
"Headerfile" />
135 <ref name=
"Declaration" />
138 <ref name=
"Abstract" />
141 <ref name=
"TemplateParameters" />
144 <!-- Parameters and results don't make sense for classes, but the user
145 can specify \param or \returns in a comment anyway. -->
147 <ref name=
"Parameters" />
150 <ref name=
"ResultDiscussion" />
154 <ref name=
"Discussion" />
159 <define name=
"Variable">
160 <element name=
"Variable">
161 <ref name=
"attrSourceLocation" />
167 <ref name=
"Headerfile" />
170 <ref name=
"Declaration" />
173 <ref name=
"Abstract" />
176 <!-- Template parameters, parameters and results don't make sense for
177 variables, but the user can specify \tparam \param or \returns
178 in a comment anyway. -->
180 <ref name=
"TemplateParameters" />
183 <ref name=
"Parameters" />
186 <ref name=
"ResultDiscussion" />
190 <ref name=
"Discussion" />
195 <define name=
"Namespace">
196 <element name=
"Namespace">
197 <ref name=
"attrSourceLocation" />
203 <ref name=
"Headerfile" />
206 <ref name=
"Declaration" />
209 <ref name=
"Abstract" />
212 <!-- Template parameters, parameters and results don't make sense for
213 namespaces, but the user can specify \tparam, \param or \returns
214 in a comment anyway. -->
216 <ref name=
"TemplateParameters" />
219 <ref name=
"Parameters" />
222 <ref name=
"ResultDiscussion" />
226 <ref name=
"Discussion" />
231 <define name=
"Typedef">
232 <element name=
"Typedef">
233 <ref name=
"attrSourceLocation" />
239 <ref name=
"Headerfile" />
242 <ref name=
"Declaration" />
245 <ref name=
"Abstract" />
249 <ref name=
"TemplateParameters" />
252 <!-- Parameters and results might make sense for typedefs if the type is
253 a function pointer type. -->
255 <ref name=
"Parameters" />
258 <ref name=
"ResultDiscussion" />
262 <ref name=
"Discussion" />
268 <element name=
"Enum">
269 <ref name=
"attrSourceLocation" />
275 <ref name=
"Headerfile" />
278 <ref name=
"Declaration" />
281 <ref name=
"Abstract" />
284 <!-- Template parameters, parameters and results don't make sense for
285 enums, but the user can specify \tparam \param or \returns in a
288 <ref name=
"TemplateParameters" />
291 <ref name=
"Parameters" />
294 <ref name=
"ResultDiscussion" />
298 <ref name=
"Discussion" />
303 <define name=
"attrSourceLocation">
305 <attribute name=
"file">
306 <!-- Non-empty text content. -->
308 <param name=
"pattern">.*\S.*
</param>
313 <attribute name=
"line">
314 <data type=
"positiveInteger" />
316 <attribute name=
"column">
317 <data type=
"positiveInteger" />
323 <element name=
"Name">
324 <!-- Non-empty text content. -->
326 <param name=
"pattern">.*\S.*
</param>
333 <!-- Non-empty text content. -->
335 <param name=
"pattern">.*\S.*
</param>
340 <define name=
"Abstract">
341 <element name=
"Abstract">
343 <ref name=
"TextBlockContent" />
348 <define name=
"Declaration">
349 <element name=
"Declaration">
350 <!-- Non-empty text content. -->
351 <data type=
"string"/>
355 <define name=
"Headerfile">
356 <element name=
"Headerfile">
358 <ref name=
"TextBlockContent" />
363 <define name=
"Discussion">
364 <element name=
"Discussion">
366 <ref name=
"TextBlockContent" />
371 <define name=
"TemplateParameters">
372 <element name=
"TemplateParameters">
373 <!-- Parameter elements should be sorted according to position. -->
375 <element name=
"Parameter">
376 <element name=
"Name">
377 <!-- Non-empty text content. -->
379 <param name=
"pattern">.*\S.*
</param>
383 <!-- This is index at depth 0. libclang API can return more
384 information about position, but we expose only essential
385 information here, since "Parameter" elements are already
388 "Position" element could be added in future if needed. -->
389 <element name=
"Index">
390 <data type=
"nonNegativeInteger" />
393 <!-- In general, template parameters with whitespace discussion
394 should not be emitted. Schema might be more strict here. -->
395 <element name=
"Discussion">
396 <ref name=
"TextBlockContent" />
403 <define name=
"Parameters">
404 <element name=
"Parameters">
405 <!-- Parameter elements should be sorted according to index. -->
407 <element name=
"Parameter">
408 <element name=
"Name">
409 <!-- Non-empty text content. -->
411 <param name=
"pattern">.*\S.*
</param>
416 <element name=
"Index">
417 <data type=
"nonNegativeInteger" />
419 <element name=
"IsVarArg">
424 <element name=
"Direction">
425 <attribute name=
"isExplicit">
426 <data type=
"boolean" />
431 <value>in,out
</value>
434 <!-- In general, template parameters with whitespace discussion
435 should not be emitted, unless direction is explicitly specified.
436 Schema might be more strict here. -->
437 <element name=
"Discussion">
438 <ref name=
"TextBlockContent" />
445 <define name=
"Exceptions">
446 <element name=
"Exceptions">
448 <ref name=
"TextBlockContent" />
453 <define name=
"Availability">
454 <element name=
"Availability">
455 <attribute name=
"distribution">
456 <data type=
"string" />
459 <element name=
"IntroducedInVersion">
461 <param name=
"pattern">\d+|\d+\.\d+|\d+\.\d+.\d+
</param>
466 <element name=
"DeprecatedInVersion">
468 <param name=
"pattern">\d+|\d+\.\d+|\d+\.\d+.\d+
</param>
473 <element name=
"RemovedAfterVersion">
475 <param name=
"pattern">\d+|\d+\.\d+|\d+\.\d+.\d+
</param>
480 <element name=
"DeprecationSummary">
481 <data type=
"string" />
485 <ref name=
"Unavailable" />
490 <define name=
"Deprecated">
491 <element name=
"Deprecated">
493 <data type=
"string" />
498 <define name=
"Unavailable">
499 <element name=
"Unavailable">
501 <data type=
"string" />
506 <define name=
"ResultDiscussion">
507 <element name=
"ResultDiscussion">
509 <ref name=
"TextBlockContent" />
514 <define name=
"TextBlockContent">
516 <element name=
"Para">
518 <attribute name=
"kind">
520 <value>attention
</value>
521 <value>author
</value>
522 <value>authors
</value>
524 <value>copyright
</value>
526 <value>invariant
</value>
530 <value>remark
</value>
531 <value>remarks
</value>
536 <value>version
</value>
537 <value>warning
</value>
542 <ref name=
"TextInlineContent" />
545 <element name=
"Verbatim">
546 <attribute name=
"xml:space">
547 <value>preserve
</value>
549 <attribute name=
"kind">
550 <!-- TODO: add all Doxygen verbatim kinds -->
553 <value>verbatim
</value>
561 <define name=
"TextInlineContent">
564 <element name=
"bold">
565 <!-- Non-empty text content. -->
567 <param name=
"pattern">.*\S.*
</param>
570 <element name=
"monospaced">
571 <!-- Non-empty text content. -->
573 <param name=
"pattern">.*\S.*
</param>
576 <element name=
"emphasized">
577 <!-- Non-empty text content. -->
579 <param name=
"pattern">.*\S.*
</param>
582 <element name=
"anchor">
583 <attribute name=
"id">
585 <!-- Non-empty text content without whitespace. -->
586 <param name=
"pattern">\S+
</param>
590 <element name=
"rawHTML">
592 <!-- If not specified, the default value is 'false'. -->
593 <!-- The value 'false' or absence of the attribute does not imply
594 that the HTML is actually well-formed. -->
595 <attribute name=
"isMalformed">
596 <data type=
"boolean" />
599 <!-- Non-empty text content. -->
601 <param name=
"pattern">.*\S.*
</param>