4.9 BNF Notation


The Extended Backus-Naur Formalism (BNF) notation makes use of several special symbols. These are listed below, together with their meanings:

Symbol Usage

<> Enclose term names

| Separates alternatives (exclusive OR)

[] Term enclosed is optional (not used or used once)

{} Term enclosed is used zero or more times

() Enclose groups of alternative terms

Note that in SAIFtalk end-of-line characters are insignificant and are ignored, with the following exception. In either CSN or OSN a comment line may be given starting with a "//" pair, followed by any number of characters, and ending with an end-of-line character. Note that characters and text are assumed to be ANSI X3.4.

Token definitions

<openDefinition> ::= "<"

<closeDefinition> ::= ">"

<openBracket> ::= "["

<closeBracket> ::= "]"

<openParen> ::= "("

<closeParen> ::= ")"

<openBrace> ::= "{"

<closeBrace> ::= "}"

<doubleQuote> ::= """

<setTo> ::= ":"

<selector> ::= "."

<comma> ::= ","

<chooser> ::= "|"

<excludedType> ::= "~"

<forceType> ::= "^"

<wildCard> ::= "*"

<poundSign> ::= "#"

<dash> ::= "-"

<lowerCaseLetter> ::= "a"|"b"|"c"|"d"|"e"|"f"|"g"|"h"|"i"|"j"|"k"|"l"|"m"|

"n"|"o"|"p"|"q"|"r"|"s"|"t"|"u"|"v"|"w"|"x"|"y"|"z"

<upperCaseLetter> ::= "A"|"B"|"C"|"D"|"E"|"F"|"G"|"H"|"I"|"J"|"K"|"L"|"M"|

"N"|"O"|"P"|"Q"|"R"|"S"|"T"|"U"|"V"|"W"|"X"|"Y"|"Z"

<sym> ::= "_"

<digit> ::= "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"

<bit> ::= "0"|"1"

<hexDigit> ::= "A"|"B"|"C"|"D"|"E"|"F"|

"0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"

<hexValue> ::= <hexDigit> <hexDigit>

<otherSym> ::= "!"|"#"|"$"|"%"|"&"|"'"|"("|")"|"*"|"+"|","|"-"|"."|

"/"|":"|";"|"<"|"="|">"|"?"|"@"|"["|"\"|"]"|"^"|"_"|"`"|

"{"|"|"|"}"|"~"

<whitespace> ::= " "

<letter> ::= <upperCaseLetter> | <lowerCaseLetter>

<character> ::= <letter> | <digit> | <sym>

<textString> ::= <doubleQuote> <text> <doubleQuote>

<bitString> ::= <doubleQuote> <bit> { <bit> } <doubleQuote>

<octetString> ::= <doubleQuote> <hexValue> { <hexValue> } <doubleQuote>

<text> ::= ( <character> | <whitespace> | <otherSym> )

{ { <character> } { whitespace }

{ <otherSym> } }

<lowerName> ::= <lowerCaseLetter> {<character>}

<upperName ::= <upperCaseLetter> {<character>}

<unsignedInteger> ::= <digit> {<digit>}

<integer> ::= ["+"|"-"] <unsignedInteger>

<exponent> ::= "E" <integer>

<float> ::= (["+"|"-"]{<digit>}"."<digit>

{<digit>}[<exponent>]) |

(["+"|"-"]<digit>{<digit>}"."

{<digit>}[<exponent> )


Links to: Previous Section -- Next Section -- Table of Contents -- Up to Section 4.0 -- SAIF class list