FunctionList Update 2

* Implemented XML Schema for functionList.xml.
* functionList.xml:
1. new layout of association map;
2. placed `displayName` before `id` attribute where applicable;
3. utilize inline comments;
4. parsers added: 'XML for FunctionList', Assembly, AutoIt3, InnoSetup, PowerShell, KRL, Sinumerik and UniVerse BASIC;
5. parsers improved: C, Java, Batch, Bash, XML and NSIS;
6. replaced `[\t\x20]` with `\h` where possible;
7. using upper case notation for hexadecimal values e.g. `\x7F-\xFF`;

Closes #2602
This commit is contained in:
MAPJe 2016-11-24 07:46:54 +01:00 committed by Don Ho
parent 1b1265302f
commit 9dc109f599
2 changed files with 1344 additions and 308 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
attributeFormDefault="unqualified"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:element name="NotepadPlus" type="NotepadPlusType" />
<xs:simpleType name="extType">
<xs:restriction base="xs:string">
<xs:pattern value="\.([A-Za-z0-9_~!@#$%^&amp;+`=\-\(\)\{\}\[\];',])+(\.([A-Za-z0-9_~!@#$%^&amp;+`=\-\(\)\{\}\[\];',])+)*" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="versionType">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,5}(\.[0-9]{1,5}){1,3}|[0-9]{4}[\-/]?[0-9]{2}[\-/]?[0-9]{2}" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="associationType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="langID" type="xs:byte" use="optional" />
<xs:attribute name="userDefinedLangName" type="xs:string" use="optional" />
<xs:attribute name="ext" type="extType" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="associationMapType">
<xs:sequence>
<xs:element name="association" type="associationType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="nameExprType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="expr" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="classNameType">
<xs:sequence>
<xs:element name="nameExpr" type="nameExprType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="funcNameExprType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="expr" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="functionNameType">
<xs:sequence>
<xs:element name="funcNameExpr" type="funcNameExprType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="nameExpr" type="nameExprType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="functionType" mixed="true">
<xs:sequence>
<xs:element name="functionName" type="functionNameType" minOccurs="0" />
<xs:element name="className" type="classNameType" minOccurs="0" />
</xs:sequence>
<xs:attribute name="mainExpr" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="classRangeType">
<xs:sequence>
<xs:element name="className" type="classNameType" />
<xs:element name="function" type="functionType" minOccurs="0" />
</xs:sequence>
<xs:attribute name="mainExpr" type="xs:string" use="required"/>
<xs:attribute name="openSymbole" type="xs:string" use="optional"/>
<xs:attribute name="closeSymbole" type="xs:string" use="optional"/>
<xs:attribute name="openSymbol" type="xs:string" use="optional"/>
<xs:attribute name="closeSymbol" type="xs:string" use="optional"/>
</xs:complexType>
<xs:complexType name="parserType" mixed="true">
<xs:sequence>
<xs:element name="classRange" type="classRangeType" minOccurs="0" />
<xs:element name="function" type="functionType" minOccurs="0" />
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="displayName" type="xs:string" use="optional"/>
<xs:attribute name="commentExpr" type="xs:string" use="optional"/>
<xs:attribute name="version" type="versionType" use="optional"/>
</xs:complexType>
<xs:complexType name="parsersType" mixed="true">
<xs:sequence>
<xs:element name="parser" type="parserType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="functionListType">
<xs:sequence>
<xs:element name="associationMap" type="associationMapType" />
<xs:element name="parsers" type="parsersType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="NotepadPlusType">
<xs:sequence>
<xs:element name="functionList" type="functionListType" />
</xs:sequence>
</xs:complexType>
</xs:schema>