Label: ♦english

[87] Dao Language Specifications 1.1 (Draft: Alpha 1) - Introduction

Comment

Dao Language Specifications 1.1 (Draft: Alpha 1) - Introduction

  1. Introduction
  2. Lexical Structures
  3. Variables, Values and Types
  4. Expressions
  5. Statements
  6. Functions
  7. Classes
  8. Modules and Name Spaces

1 Introduction

 Top
  1. Notations
  2. Embedded Tests

This documentation will provide a detailed specification of the Dao programming language. The main purpose is two fold: (1) to produce a guidline for the implementation that shall lead to Dao 1.1; (2) to provide some essential materials for people who want to go deep into the language.

So this specification does NOT conform exactly to what is available in the current release (1.0), it may contain specifications that are going to be changed or added in the implementation for the next release. But this documentation will mark such places clearly. The version code in the title, Draft: Alpha 1 , does not corresponding to the version number of the Dao language and releases, it is merely a way to indicate the progress of the preparation of this specification.

1.1 Notations

 Top

Syntax definition: A ::= B , A is defined as B , which can be a descriptive sentence or a combination of the following definition items,
  1. Descriptive: " description "
  2. Alternative: S | Y
  3. Optional: [ S ]
  4. Grouping: ( S )
  5. Repeating: S * or S +
    • * : zero or more times;
    • + : once or more times;
Examples,
  • ( S | Y )+ represents all the possible sequences composed of S and Y: S; Y; SY; YS; SSY ...
  • S ( Y | N ) T represents: S Y T or S N T .

The following notation is used in a few places (mainly character class definition):
  1. Conditional definition: A ::= S & C(S)
    A is defined as S where C(S) is true.

1.2 Embedded Tests

 Top

Testing codes are embedded in this specification using the SDML tag demo , which can contain a block of Dao codes and the expected output of the codes. The expected output is separated from the source codes by [[output]] . When this document is processed by the tool that handles this documentation format, the codes inside the demo block will be executed and the output will be compared with the expected ones to check if the test is passed.
<demo  dao>
some  codes  with  output
[[output]]
expected  output
</demo>

2 Lexical Structures

 Top

3 Variables, Values and Types

 Top

4 Expressions

 Top

5 Statements

 Top

6 Functions

 Top

7 Classes

 Top

8 Modules and Name Spaces

 Top

Comments

Change picture:

Choose file:

12 3
456789 10
111213141516 17
181920212223 24
2526272829 30 31

fu: Many thanks (Jul.04,04:29)

klabim: fixed Hi, great, now my test works now :- ). (Jun.30,17:51)

Nightwalker: Few suggestions (Jul.03,14:37)

This site is powered by Dao
Copyright (C) 2009,2010, daovm.net.
Webmaster: admin@daovm.net