Gentee Programming Language > Documentation > Syntax Download documentation

Syntactical description

Actually, the syntax of Gentee is described using verbal characters as well as Backus-Naur Form(BNF) in this documentation. A syntactical description of Gentee using BNF provides in the appendix A.

The formula of BNF consists of two parts, as follows: the first part denotes the name of a defined notion enclosed in metacharacter braces < >, and followed by the ::= metacharacter; the second part defines a notion description. The following metacharacters are used for this description:

| - means OR
( ) - parentheses are group delimiters.
{ } - contents of the braces can be repeated any number of times or not once.
[ ] - contents of the square brackets are optional.

Note that characters of the language are enclosed in single quote marks in order to distinguish them from metacharacters used in the BNF description. Characters of the language can be represented in hexidemical notation: 0xCharacter_Code.

Exanples of formulas

<letter> ::= 'A' | 'B' | ... | 'Z' | 'a' | 'b' | ... | 'z' | 0x80 | 0x81 | ... | 0xFF
<name> ::= (<letter> | '_') {<letter> | '_' | <decimal digit>}

The first character of an identifier name must be a nondigit, i.e. it must be a letter or an underscore followed by letters, digits and underscores; an identifier name allows even one character.

See also

    Syntax Of the Gentee Language In BNF Form


 Copyright © 2004-2006 Gentee Inc. All rights reserved.