The RUSL Keywords

David Tanzer (dodger-guglhupf@users.sourceforge.net), Fri Jul 06 20:54:32 GMT+02:00 2001
Home
Intro
The RLS
Basic BI
Keywords
Scripts
PDD-Files
Developers
Doc Rel
Summary
This is the definition of the keywords in rusl. This definition is written as XML-Schema. Here there should be defined all the basic parts of an object oriented programming language. Note that this Schema is far away from being finished, but I put it here as a base for the further discussions. If you want to join the discussions, look under Summary. This Schema is written and maintained by the Platypus Developers, mainliy by Peter Becker. him to the Developers page.


The Schema

Listing: rusl.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" elementFormDefault="qualified">
<xsd:element name="source">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="documentation" minOccurs="0"/>
<xsd:element name="class" type="classDefinition" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="documentation">
<xsd:annotation>
<xsd:documentation>There is no direct meta information as author, company etc. yet</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="HTML">
<xsd:annotation>
<xsd:documentation>Any HTML is allowed in here</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="http://www.w3.org/1999/xhtml"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DocBook">
<xsd:annotation>
<xsd:documentation>Any DocBook should be allowed in here</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="http://www.oasis-open.org/docbook/xmlschema">
<xsd:annotation>
<xsd:documentation>This is just a related link, I don't know the right URI for the DocBook schema -- I am not even sure if it is ready enough for the show</xsd:documentation>
</xsd:annotation>
</xsd:any>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="text" type="xsd:string">
<xsd:annotation>
<xsd:documentation>This is just plain text -- we might want to specify our own tags instead</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="classDefinition">
<xsd:sequence>
<xsd:element name="baseClass" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>(1) if everything is an object, there should be always a base class. (2) I used baseClass since this describes the element itself while extends describes the relation (3) baseClass might be an attribute (4) an interface is a kind of a baseClass, too</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="constructor" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>zero constructors means only static usage (instead of using private contructor)</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="methodDefinition" type="methodDefinition" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="methodDefinition">
<xsd:sequence>
<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="returnType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>no return type means void</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="implementation" type="blockStatement"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="blockStatement">
<xsd:sequence>
<xsd:choice>
<xsd:element name="assignment">
<xsd:annotation>
<xsd:documentation>not yet defined</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="for">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="init" type="blockStatement"/>
<xsd:element name="continue" type="expression"/>
<xsd:element name="action" type="blockStatement">
<xsd:annotation>
<xsd:documentation>action is not very specific, but I can't imagine a nice one yet</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="body" type="blockStatement"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="if">
<xsd:annotation>
<xsd:documentation>not yet defined</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="methodCall">
<xsd:annotation>
<xsd:documentation>how to do this one?</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="switch">
<xsd:annotation>
<xsd:documentation>not yet defined</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="try">
<xsd:annotation>
<xsd:documentation>I am not sure if I like the try keyword -- we could just assume that everything is tryed anyway and just allow catching wherever we want</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="statements" type="blockStatement"/>
<xsd:element name="catch" type="blockStatement" maxOccurs="unbounded"/>
<xsd:element name="finally"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="varDeclaration">
<xsd:annotation>
<xsd:documentation>not yet defined</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="while">
<xsd:annotation>
<xsd:documentation>not yet defined -- I'd just use while, implementing the do-while as pre/postcheck attribute</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="expression">
<xsd:annotation>
<xsd:documentation>not yet defined</xsd:documentation>
</xsd:annotation>
</xsd:complexType>
</xsd:schema>
All Graphics made with The GIMP SourceForge Logo Visit sourceforge.net for many interesting and useful free software projects. This Project Homepage was created with XWeb.