1alternate AltIntNum
2    tag type
3    case i: int
4    case n: number
5alternate AltNumInt
6    tag type
7    case n: number
8    case i: int
9alternate AltNumStr
10    tag type
11    case n: number
12    case s: str
13alternate AltStrBool
14    tag type
15    case s: str
16    case b: bool
17alternate AltStrInt
18    tag type
19    case s: str
20    case i: int
21alternate AltStrNum
22    tag type
23    case s: str
24    case n: number
25event EVENT_A None
26   boxed=False
27event EVENT_B None
28   boxed=False
29event EVENT_C q_obj_EVENT_C-arg
30   boxed=False
31event EVENT_D q_obj_EVENT_D-arg
32   boxed=False
33event EVENT_E UserDefZero
34   boxed=True
35event EVENT_F UserDefAlternate
36   boxed=True
37object Empty1
38object Empty2
39    base Empty1
40enum EnumOne ['value1', 'value2', 'value3']
41object EventStructOne
42    member struct1: UserDefOne optional=False
43    member string: str optional=False
44    member enum2: EnumOne optional=True
45object ForceArrays
46    member unused1: UserDefOneList optional=False
47    member unused2: UserDefTwoList optional=False
48    member unused3: TestStructList optional=False
49enum MyEnum []
50object NestedEnumsOne
51    member enum1: EnumOne optional=False
52    member enum2: EnumOne optional=True
53    member enum3: EnumOne optional=False
54    member enum4: EnumOne optional=True
55enum QEnumTwo ['value1', 'value2']
56    prefix QENUM_TWO
57enum QType ['none', 'qnull', 'qint', 'qstring', 'qdict', 'qlist', 'qfloat', 'qbool']
58    prefix QTYPE
59object TestStruct
60    member integer: int optional=False
61    member boolean: bool optional=False
62    member string: str optional=False
63object UserDefA
64    member boolean: bool optional=False
65    member a_b: int optional=True
66alternate UserDefAlternate
67    tag type
68    case udfu: UserDefFlatUnion
69    case s: str
70    case i: int
71object UserDefB
72    member intb: int optional=False
73    member a-b: bool optional=True
74object UserDefC
75    member string1: str optional=False
76    member string2: str optional=False
77object UserDefFlatUnion
78    base UserDefUnionBase
79    tag enum1
80    case value1: UserDefA
81    case value2: UserDefB
82    case value3: UserDefB
83object UserDefFlatUnion2
84    base q_obj_UserDefFlatUnion2-base
85    tag enum1
86    case value1: UserDefC
87    case value2: UserDefB
88object UserDefNativeListUnion
89    member type: UserDefNativeListUnionKind optional=False
90    tag type
91    case integer: q_obj_intList-wrapper
92    case s8: q_obj_int8List-wrapper
93    case s16: q_obj_int16List-wrapper
94    case s32: q_obj_int32List-wrapper
95    case s64: q_obj_int64List-wrapper
96    case u8: q_obj_uint8List-wrapper
97    case u16: q_obj_uint16List-wrapper
98    case u32: q_obj_uint32List-wrapper
99    case u64: q_obj_uint64List-wrapper
100    case number: q_obj_numberList-wrapper
101    case boolean: q_obj_boolList-wrapper
102    case string: q_obj_strList-wrapper
103    case sizes: q_obj_sizeList-wrapper
104    case any: q_obj_anyList-wrapper
105enum UserDefNativeListUnionKind ['integer', 's8', 's16', 's32', 's64', 'u8', 'u16', 'u32', 'u64', 'number', 'boolean', 'string', 'sizes', 'any']
106object UserDefOne
107    base UserDefZero
108    member string: str optional=False
109    member enum1: EnumOne optional=True
110object UserDefOptions
111    member i64: intList optional=True
112    member u64: uint64List optional=True
113    member u16: uint16List optional=True
114    member i64x: int optional=True
115    member u64x: uint64 optional=True
116object UserDefTwo
117    member string0: str optional=False
118    member dict1: UserDefTwoDict optional=False
119object UserDefTwoDict
120    member string1: str optional=False
121    member dict2: UserDefTwoDictDict optional=False
122    member dict3: UserDefTwoDictDict optional=True
123object UserDefTwoDictDict
124    member userdef: UserDefOne optional=False
125    member string: str optional=False
126object UserDefUnionBase
127    base UserDefZero
128    member string: str optional=False
129    member enum1: EnumOne optional=False
130object UserDefZero
131    member integer: int optional=False
132object WrapAlternate
133    member alt: UserDefAlternate optional=False
134event __ORG.QEMU_X-EVENT __org.qemu_x-Struct
135   boxed=False
136alternate __org.qemu_x-Alt
137    tag type
138    case __org.qemu_x-branch: str
139    case b: __org.qemu_x-Base
140object __org.qemu_x-Base
141    member __org.qemu_x-member1: __org.qemu_x-Enum optional=False
142enum __org.qemu_x-Enum ['__org.qemu_x-value']
143object __org.qemu_x-Struct
144    base __org.qemu_x-Base
145    member __org.qemu_x-member2: str optional=False
146    member wchar-t: int optional=True
147object __org.qemu_x-Struct2
148    member array: __org.qemu_x-Union1List optional=False
149object __org.qemu_x-Union1
150    member type: __org.qemu_x-Union1Kind optional=False
151    tag type
152    case __org.qemu_x-branch: q_obj_str-wrapper
153enum __org.qemu_x-Union1Kind ['__org.qemu_x-branch']
154object __org.qemu_x-Union2
155    base __org.qemu_x-Base
156    tag __org.qemu_x-member1
157    case __org.qemu_x-value: __org.qemu_x-Struct2
158command __org.qemu_x-command q_obj___org.qemu_x-command-arg -> __org.qemu_x-Union1
159   gen=True success_response=True boxed=False
160command boxed-struct UserDefZero -> None
161   gen=True success_response=True boxed=True
162command boxed-union UserDefNativeListUnion -> None
163   gen=True success_response=True boxed=True
164command guest-get-time q_obj_guest-get-time-arg -> int
165   gen=True success_response=True boxed=False
166command guest-sync q_obj_guest-sync-arg -> any
167   gen=True success_response=True boxed=False
168object q_empty
169object q_obj_EVENT_C-arg
170    member a: int optional=True
171    member b: UserDefOne optional=True
172    member c: str optional=False
173object q_obj_EVENT_D-arg
174    member a: EventStructOne optional=False
175    member b: str optional=False
176    member c: str optional=True
177    member enum3: EnumOne optional=True
178object q_obj_UserDefFlatUnion2-base
179    member integer: int optional=True
180    member string: str optional=False
181    member enum1: QEnumTwo optional=False
182object q_obj___org.qemu_x-command-arg
183    member a: __org.qemu_x-EnumList optional=False
184    member b: __org.qemu_x-StructList optional=False
185    member c: __org.qemu_x-Union2 optional=False
186    member d: __org.qemu_x-Alt optional=False
187object q_obj_anyList-wrapper
188    member data: anyList optional=False
189object q_obj_boolList-wrapper
190    member data: boolList optional=False
191object q_obj_guest-get-time-arg
192    member a: int optional=False
193    member b: int optional=True
194object q_obj_guest-sync-arg
195    member arg: any optional=False
196object q_obj_int16List-wrapper
197    member data: int16List optional=False
198object q_obj_int32List-wrapper
199    member data: int32List optional=False
200object q_obj_int64List-wrapper
201    member data: int64List optional=False
202object q_obj_int8List-wrapper
203    member data: int8List optional=False
204object q_obj_intList-wrapper
205    member data: intList optional=False
206object q_obj_numberList-wrapper
207    member data: numberList optional=False
208object q_obj_sizeList-wrapper
209    member data: sizeList optional=False
210object q_obj_str-wrapper
211    member data: str optional=False
212object q_obj_strList-wrapper
213    member data: strList optional=False
214object q_obj_uint16List-wrapper
215    member data: uint16List optional=False
216object q_obj_uint32List-wrapper
217    member data: uint32List optional=False
218object q_obj_uint64List-wrapper
219    member data: uint64List optional=False
220object q_obj_uint8List-wrapper
221    member data: uint8List optional=False
222object q_obj_user_def_cmd1-arg
223    member ud1a: UserDefOne optional=False
224object q_obj_user_def_cmd2-arg
225    member ud1a: UserDefOne optional=False
226    member ud1b: UserDefOne optional=True
227command user_def_cmd None -> None
228   gen=True success_response=True boxed=False
229command user_def_cmd0 Empty2 -> Empty2
230   gen=True success_response=True boxed=False
231command user_def_cmd1 q_obj_user_def_cmd1-arg -> None
232   gen=True success_response=True boxed=False
233command user_def_cmd2 q_obj_user_def_cmd2-arg -> UserDefTwo
234   gen=True success_response=True boxed=False
235doc freeform
236    body=
237= Section
238== subsection
239
240Some text foo with *strong* and _emphasis_
2411. with a list
2422. like that @foo
243
244And some code:
245| $ echo foo
246| -> do this
247| <- get that
248
249Note: is not a meta
250doc symbol=TestStruct expr=('struct', 'TestStruct')
251    arg=integer
252foo
253blah
254
255bao
256    arg=boolean
257bar
258    arg=string
259baz
260    section=Example
261-> { "execute": ... }
262<- { "return": ... }
263    section=Since
2642.3
265    section=Note
266a note
267    body=
268body with @var
269doc symbol=NestedEnumsOne expr=('struct', 'NestedEnumsOne')
270    body=
271for testing enums
272doc symbol=MyEnum expr=('enum', 'MyEnum')
273    body=
274An empty enum, although unusual, is currently acceptable
275doc symbol=Empty1 expr=('struct', 'Empty1')
276    body=
277Likewise for an empty struct, including an empty base
278doc symbol=Empty2 expr=('struct', 'Empty2')
279doc symbol=user_def_cmd0 expr=('command', 'user_def_cmd0')
280doc symbol=QEnumTwo expr=('enum', 'QEnumTwo')
281    body=
282for testing override of default naming heuristic
283doc symbol=UserDefOne expr=('struct', 'UserDefOne')
284    body=
285for testing nested structs
286doc symbol=EnumOne expr=('enum', 'EnumOne')
287doc symbol=UserDefZero expr=('struct', 'UserDefZero')
288doc symbol=UserDefTwoDictDict expr=('struct', 'UserDefTwoDictDict')
289doc symbol=UserDefTwoDict expr=('struct', 'UserDefTwoDict')
290doc symbol=UserDefTwo expr=('struct', 'UserDefTwo')
291doc symbol=ForceArrays expr=('struct', 'ForceArrays')
292    body=
293dummy struct to force generation of array types not otherwise mentioned
294doc symbol=UserDefA expr=('struct', 'UserDefA')
295    body=
296for testing unions
297Among other things, test that a name collision between branches does
298not cause any problems (since only one branch can be in use at a time),
299by intentionally using two branches that both have a C member 'a_b'
300doc symbol=UserDefB expr=('struct', 'UserDefB')
301doc symbol=UserDefFlatUnion expr=('union', 'UserDefFlatUnion')
302doc symbol=UserDefUnionBase expr=('struct', 'UserDefUnionBase')
303doc symbol=UserDefFlatUnion2 expr=('union', 'UserDefFlatUnion2')
304    body=
305this variant of UserDefFlatUnion defaults to a union that uses members with
306allocated types to test corner cases in the cleanup/dealloc visitor
307doc symbol=WrapAlternate expr=('struct', 'WrapAlternate')
308doc symbol=UserDefAlternate expr=('alternate', 'UserDefAlternate')
309doc symbol=UserDefC expr=('struct', 'UserDefC')
310doc symbol=AltStrBool expr=('alternate', 'AltStrBool')
311doc symbol=AltStrNum expr=('alternate', 'AltStrNum')
312doc symbol=AltNumStr expr=('alternate', 'AltNumStr')
313doc symbol=AltStrInt expr=('alternate', 'AltStrInt')
314doc symbol=AltIntNum expr=('alternate', 'AltIntNum')
315doc symbol=AltNumInt expr=('alternate', 'AltNumInt')
316doc symbol=UserDefNativeListUnion expr=('union', 'UserDefNativeListUnion')
317    body=
318for testing native lists
319doc symbol=user_def_cmd expr=('command', 'user_def_cmd')
320doc symbol=user_def_cmd1 expr=('command', 'user_def_cmd1')
321doc symbol=user_def_cmd2 expr=('command', 'user_def_cmd2')
322doc freeform
323    body=
324Another comment
325doc symbol=guest-get-time expr=('command', 'guest-get-time')
326    arg=a
327an integer
328    arg=b
329#optional integer
330    section=Returns
331returns something
332    section=Example
333-> { "execute": "guest-get-time", ... }
334<- { "return": "42" }
335    body=
336@guest-get-time body
337doc symbol=guest-sync expr=('command', 'guest-sync')
338doc symbol=boxed-struct expr=('command', 'boxed-struct')
339doc symbol=boxed-union expr=('command', 'boxed-union')
340doc symbol=UserDefOptions expr=('struct', 'UserDefOptions')
341    body=
342For testing integer range flattening in opts-visitor. The following schema
343corresponds to the option format:
344
345-userdef i64=3-6,i64=-5--1,u64=2,u16=1,u16=7-12
346
347For simplicity, this example doesn't use [type=]discriminator nor optargs
348specific to discriminator values.
349doc symbol=EventStructOne expr=('struct', 'EventStructOne')
350doc symbol=EVENT_A expr=('event', 'EVENT_A')
351doc symbol=EVENT_B expr=('event', 'EVENT_B')
352doc symbol=EVENT_C expr=('event', 'EVENT_C')
353doc symbol=EVENT_D expr=('event', 'EVENT_D')
354doc symbol=EVENT_E expr=('event', 'EVENT_E')
355doc symbol=EVENT_F expr=('event', 'EVENT_F')
356doc symbol=__org.qemu_x-Enum expr=('enum', '__org.qemu_x-Enum')
357doc symbol=__org.qemu_x-Base expr=('struct', '__org.qemu_x-Base')
358doc symbol=__org.qemu_x-Struct expr=('struct', '__org.qemu_x-Struct')
359doc symbol=__org.qemu_x-Union1 expr=('union', '__org.qemu_x-Union1')
360doc symbol=__org.qemu_x-Struct2 expr=('struct', '__org.qemu_x-Struct2')
361doc symbol=__org.qemu_x-Union2 expr=('union', '__org.qemu_x-Union2')
362doc symbol=__org.qemu_x-Alt expr=('alternate', '__org.qemu_x-Alt')
363doc symbol=__ORG.QEMU_X-EVENT expr=('event', '__ORG.QEMU_X-EVENT')
364doc symbol=__org.qemu_x-command expr=('command', '__org.qemu_x-command')
365