| <?xml version="1.0" encoding="UTF-8"?> |
| <hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="name"> |
| <bundle id="bundle"> |
| <doc><p>This is a documentation node for a bundle element</p></doc> |
| <any id="someType"> |
| <doc>Any can hold anything. It provides the dynamic typing</doc> |
| </any> |
| <array id="anArray" of="someType" length="128"> |
| <doc><p>Array Doc</p></doc> |
| </array> |
| <boolean id="myBoolean"> |
| <doc>Boolean type</doc> |
| </boolean> |
| <character id="myChar" encoding="utf-16"> |
| <doc>Character type</doc> |
| </character> |
| <enumeration id="anEnumeration"> |
| <doc>This is anEnumeration</doc> |
| <enumerator id="one"/> |
| <enumerator id="two"/> |
| <enumerator id="three"/> |
| <enumerator id="four"/> |
| </enumeration> |
| <signed id="signed32Bit" bits="32"> |
| <doc>Signed 32 bit integer</doc> |
| </signed> |
| <signature id="sig1" result="signed32Bit" varargs="true"> |
| <doc>This is signature doc</doc> |
| <arg id="arg1" type="someType"> |
| <doc>Doc for "arg1"</doc> |
| </arg> |
| <arg id="arg2" type="anEnumeration"> |
| <doc><i>Doc for "arg2"</i></doc> |
| </arg> |
| </signature> |
| <opaque id="nada"> |
| <doc>Opaque types can't used. Useful for encapsulation</doc> |
| </opaque> |
| <pointer id="myPointer" to="sig1"> |
| <doc>This is a pointer to a function</doc> |
| </pointer> |
| <range id="myRange" min="-2" max="2"> |
| <doc>Pretty small range, huh?</doc> |
| </range> |
| <real id="myReal" mantissa="23" exponent="8"> |
| <doc>Should be equal to IEEE 754 single precision</doc> |
| </real> |
| <string id="myString" encoding="ucs"> |
| <doc>I wonder what encoding's HLVM will support?</doc> |
| </string> |
| <structure id="struct2"> |
| <doc>This is structure doc</doc> |
| <field id="field1" type="someType"> |
| <doc><p><i><b>Field 1 Documentation</b></i></p></doc> |
| </field> |
| <field id="field2" type="someType"> |
| <doc>Documentation for field 2</doc> |
| </field> |
| </structure> |
| <vector id="aVector" of="f32" length="128"> |
| <doc>Vector doc</doc> |
| </vector> |
| <unsigned id="unsigned32Bit" bits="32"> |
| <doc>Unsigned 32 bit integer</doc> |
| </unsigned> |
| <constant id="s32val" type="signed32Bit"> |
| <doc>32-bit signed integer</doc> |
| <dec>1234</dec> |
| </constant> |
| <constant id="unchanging" type="myBoolean"> |
| <true/> |
| </constant> |
| <constant id="intval" type="s32"> |
| <doc>32-bit signed integer</doc> |
| <dec>4321</dec> |
| </constant> |
| <function id="myFunc" type="sig1" linkage="internal"> |
| <doc><i>This function doesn't do much</i></doc> |
| <block> |
| <doc><i>This block just returns a constant result</i></doc> |
| <result> |
| <get id="s32val"> |
| <doc> |
| <b>This just references the intval constant as the result</b> |
| </doc> |
| </get> |
| </result> |
| <ret/> |
| </block> |
| </function> |
| <program id="doc"> |
| <doc> |
| <i>This program is a placeholder for testing doc elements</i> |
| </doc> |
| <block> |
| <doc>Again, doesn't do much but return a result</doc> |
| <result> |
| <get id="intval"> |
| <doc> |
| <b>This just references the intval constant as the result</b> |
| </doc> |
| </get> |
| </result> |
| <ret/> |
| </block> |
| </program> |
| <variable id="var" type="int"> |
| <doc><p>This is documentation for a <i>var</i>iable</p></doc> |
| </variable> |
| </bundle> |
| </hlvm> |