node-structure

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
abstract xs:boolean optional
default-trailing-trivia xs:string optional
has-default-factory xs:boolean optional
name xs:string required
no-factory xs:boolean optional
parent xs:string optional
partial xs:boolean optional
token-root xs:boolean optional
trivia-root xs:boolean optional

Source

<xs:element minOccurs="0" maxOccurs="unbounded" name="node-structure">
  <xs:complexType>
    <xs:sequence>
      <xs:group ref="DescriptionAndEquivalents"/>
      <!-- A spec-section element defines the cross-reference to the language spec. -->
      <xs:element minOccurs="0" maxOccurs="unbounded" name="spec-section" type="xs:string"/>
      <!-- A grammar element defins the grammar non-terminal -->
      <xs:element minOccurs="0" maxOccurs="unbounded" name="grammar" type="xs:string"/>
      <!-- A node-kind defines an element of the NodeKind enumeration that refers to this node.
                      At least one is required, unless the node-structure is marked abstract, in which case none are allowed. 
                      Attributes:
                         name - name of the enumerator [required]
                         token-text - if this is a token, the default text for this token.
                         no-factory - if true, no factory method is generated for this kind.
                      Sub-Elements:
                         description - description of the kind [optional]
                         lm-equiv - equivalent enumerator in Language Model [multiple allowed]
                         native-equiv - equivalent enumerator in native parse tress [multiple allowed]
                        -->
      <xs:element minOccurs="0" maxOccurs="unbounded" name="node-kind">
        <xs:complexType>
          <xs:sequence>
            <xs:group ref="DescriptionAndEquivalents"/>
            <xs:element minOccurs="0" maxOccurs="1" name="child">
              <xs:complexType>
                <xs:attribute name="name" type="xs:string" use="required"/>
                <xs:attribute name="kind" type="xs:string" use="required"/>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="token-text" type="xs:string" use="optional"/>
          <xs:attribute name="no-factory" type="xs:boolean" use="optional"/>
        </xs:complexType>
      </xs:element>
      <!-- A "field" elements defines a field of the node-structure that is not a child node. 
                      Attributes:
                         name - name of the field [required] 
                         type - type of the field (boolean, text, character, int32, uint32, int64, uint64, float32, float64, datetime, decimal,
                                  or an enumeration name) [required] 
                      Sub-Elements:
                         description - description of the field [optional]
                         lm-equiv - equivalent field in Language Model [multiple allowed]
                         native-equiv - equivalent field in native parse tress [multiple allowed]
                      -->
      <xs:element minOccurs="0" maxOccurs="unbounded" name="field">
        <xs:complexType>
          <xs:group ref="DescriptionAndEquivalents"/>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="type" type="xs:string" use="required"/>
        </xs:complexType>
      </xs:element>
      <!-- A "child" element defines a child node of the node-structure 
                      Attributes:
                        name - name of the field [required]
                        kind - the kind of the field. This is one of the following: [required]
                             A node-kind name. 
                             a node-kind-alias name.
                             @ followed by a node-structure name
                             multiple of the above separated by "|"
                        order - (float, default 0). Set the order in which this child occurs. Useful for relating ordering
                           between base and derived classes.
                        optional - (boolean, default false) If true, this child is optional.
                        list - (boolean, default false) If true, the child is a list of the kinds of nodes.
                        separator-kind - used only if list is true.
                             Indicates the list is a separated list, and this is the kind of the separators.
                        separator-name - used only if separator-kind is set
                             Gives the name of the separators list
                        optional-elements - used only if list if true
                             Indicates the elements of the list are optional; some might be null.
                        no-constructor - (boolean, default false) If true, this child is not included in the constructor or factory.  A separate method
                             is provided for adding this child.                             
                             
                       Sub-Elements:
                         description - description of the child [optional]
                         lm-equiv - equivalent child in Language Model [multiple allowed]
                         native-equiv - equivalent child in native parse tress [multiple allowed]
                       
                      -->
      <xs:element minOccurs="0" maxOccurs="unbounded" name="child">
        <xs:complexType>
          <xs:sequence>
            <xs:group ref="DescriptionAndEquivalents"/>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="kind">
              <xs:complexType>
                <xs:attribute name="name" type="xs:string" use="required"/>
                <xs:attribute name="node-kind" type="xs:string" use="required"/>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="kind" type="xs:string" use="optional"/>
          <xs:attribute name="list" type="xs:boolean" use="optional"/>
          <xs:attribute name="order" type="xs:float" use="optional"/>
          <xs:attribute name="optional" type="xs:boolean" use="optional"/>
          <xs:attribute name="optional-elements" type="xs:boolean" use="optional"/>
          <xs:attribute name="separator-kind" type="xs:string" use="optional"/>
          <xs:attribute name="separator-name" type="xs:string" use="optional"/>
          <xs:attribute name="not-in-factory" type="xs:boolean" use="optional"/>
          <xs:attribute name="generate-with" type="xs:boolean" use="optional"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="parent" type="xs:string" use="optional"/>
    <xs:attribute name="abstract" type="xs:boolean" use="optional"/>
    <xs:attribute name="partial" type="xs:boolean" use="optional"/>
    <xs:attribute name="token-root" type="xs:boolean" use="optional"/>
    <xs:attribute name="trivia-root" type="xs:boolean" use="optional"/>
    <xs:attribute name="default-trailing-trivia" type="xs:string" use="optional"/>
    <xs:attribute name="no-factory" type="xs:boolean" use="optional"/>
    <xs:attribute name="has-default-factory" type="xs:boolean" use="optional"/>
  </xs:complexType>
</xs:element>

Sample