Add tables to return and argument list, fix multiple argument parsing

This commit is contained in:
Steve Checkoway
2007-08-12 14:08:48 +00:00
parent f341130012
commit add9849290
2 changed files with 33 additions and 9 deletions
+9 -3
View File
@@ -43,6 +43,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="IdentifierOrTable">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z_][a-zA-Z0-9_]*|\{[a-zA-Z_][a-zA-Z0-9_]*\}" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="IdentifierOrNonemptyString">
<xs:restriction base="xs:string">
<!-- XXX: Doesn't support double quoted strings. -->
@@ -59,11 +65,11 @@
<xs:simpleType name="ArgumentList">
<xs:restriction base="xs:string">
<xs:whiteSpace value="collapse" />
<xs:pattern value="([a-zA-Z_][a-zA-Z0-9_]* [a-zA-Z_][a-zA-Z0-9_]*( ?, ?[a-zA-Z_][a-zA-Z0-9_]* [a-zA-Z_][a-zA-Z0-9_]*)*)?" />
<!-- ((IdentifierOrTable Identifier(, IdentifierOrTable Identifier)*(, ...)?)|...)? -->
<xs:pattern value="((([a-zA-Z_][a-zA-Z0-9_]*|\{[a-zA-Z_][a-zA-Z0-9_]*\}) [a-zA-Z_][a-zA-Z0-9_]*( ?, ?([a-zA-Z_][a-zA-Z0-9_]*|\{[a-zA-Z_][a-zA-Z0-9_]*\}) [a-zA-Z_][a-zA-Z0-9_]*)*)( ?, ?\.\.\.)?|\.\.\.)?" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Singletons">
<xs:sequence>
<xs:element name="Singleton" minOccurs="0" maxOccurs="unbounded">
@@ -118,7 +124,7 @@
<xs:complexType name="Function" mixed="true">
<xs:group ref="DocumentationGroup" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="name" type="Identifier" use="required" />
<xs:attribute name="return" type="Identifier" use="optional" />
<xs:attribute name="return" type="IdentifierOrTable" use="optional" />
<xs:attribute name="arguments" type="ArgumentList" use="optional" />
</xs:complexType>