About Us | Contact Us | Sign In
ForceOne Technologies
Home Games Illusions References Tools Contact Us About Us
BackForceOne Technologies Backus-Naur Form (F1TBNF) Specification v1.2
ForceOne Technologies Backus-Naur Form (F1TBNF) Specification  
Author: William Pantoja
Version: 1.2
Date: December 22, 2011
Copyright: Copyright (c) 2011 ForceOne Technologies
 
   

Contents

1. Overview
1.1. Terminology
1.1.1. MUST
1.1.2. MUST NOT
1.1.3. SHOULD
1.1.4. SHOULD NOT
1.1.5. MAY

2. Definitions
2.1. Characters
2.2. Whitespace Character
2.3. Digit
2.4. Hexadecimal Digit

3. Predefined Symbols
3.1. Characters
3.1.1. Control Characters
3.1.2. Symbols
3.2. Character Ranges
3.3. XML
3.4. Misc.

4. Statements

5. Symbols

6. Expressions

7. Characters
7.1. Unicode Characters
7.2. Character Sets
7.3. Character Ranges
7.4. Negated Character Sets

8. Literal Strings
8.1. Escape Codes
8.1.1. Backslash
8.1.2. Unicode Character
8.1.3. Double Quote
8.1.4. Carriage Return
8.1.5. Line Feed
8.1.6. Tab

9. Operators
9.1. Grouping
9.2. Concatenation
9.3. Alternation
9.4. Exclusion
9.5. Negation
9.6. Repetition
9.6.1. n or More Occurrences
9.6.2. n to m Occurrences
9.6.3. One or More Occurrences
9.6.4. Zero or More Occurrences
9.6.5. Optional
9.7. Case Insensitivity

10. Comments

11. Order of Operations

Appendix A. F1TBNF Definition of F1TBNF

Appendix B. References

Appendix C. Legal

1. Overview

A standard format syntax is needed for use in specifications to define requirements in a simple, concise and standard format. ForceOne Technologies Backus-Naur Form (F1TBNF) is modified version of Extended Backus–Naur Form (EBNF). This document describes naming rules, operators, and pre-defined symbols that adds to representational power of EBNF.

1.1. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in ITEF RFC 2119.

1.1.1. MUST

The words "MUST", "REQUIRED", and "SHALL" mean that the definition is an absolute requirement of the specification.

1.1.2. MUST NOT

The phrases "MUST NOT" and "SHALL NOT" mean that the definition is an absolute prohibition of the specification.

1.1.3. SHOULD

The words "SHOULD" and "RECOMMENDED" mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

1.1.4. SHOULD NOT

The phrases "SHOULD NOT" and "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label.

1.1.5. MAY

The words "MAY" and "OPTIONAL" mean that an item is truly optional.

2. Definitions

This document uses the following definitions when describing F1TBNF.

2.1. Characters

A character in the document is specified using the following syntax:

U+nnnn

where nnnn is a hexadecimal integer whose value indicates the character whose number (code point) in [Unicode] equals the hexadecimal integer.

2.2. Whitespace Character

A whitespace character MUST be the character U+0009 (tab), U+000A (line feed), U+000D (carriage return), or U+0020 (space).

2.3. Digit

A digit MUST be a character between U+0030 ("0") and U+0039 ("9") inclusive.

2.4. Hexadecimal Digit

A hexadecimal digit MUST be a character between U+0030 ("0") and U+0039 ("9") inclusive or between U+0041 ("A") and U+0046 ("F") inclusive.

3. Predefined Symbols

3.1. Characters

3.1.1. Control Characters

NUL ::= u0000;
NULL ::= NUL;

SOH ::= u0001;
STARTOFHEADER ::= SOH;

STX ::= u0002;
STARTOFTEXT ::= STX;

ETX ::= u0003;
ENDOFTEXT ::= ETX;

EOT ::= u0004;
ENDOFTRANSMISSION ::= EOT;

ENQ ::= u0005;
ENQQUIRY ::= ENQ;

ACK ::= u0006;
ACKNOWLEDGEMENT ::= ACK;

BEL ::= u0007;
BELL ::= BEL;

BS ::= u0008;
BACKSPACE ::= BS;

HT ::= u0009;
HORIZONTALTAB ::= HT;
TAB ::= HT;

LF ::= u000A;
LINEFEED ::= LF;

VT ::= u000B;
VERTICALTAB ::= VT;

FF ::= u000C;
FORMFEED ::= FF;

CR ::= u000D;
CARRIAGERETURN ::= CR;
ENTER ::= CR;

SO ::= u000E;
SHIFTOUT ::= SO;

SI ::= u000F;
SHIFTIN ::= SI;

DLE ::= u0010;
DATALINKESCAPE ::= DLE;

DC1 ::= u0011;
DEVICECONTROL1 ::= DC1;
XON ::= DC1;

DC2 ::= u0012;
DEVICECONTROL2 ::= DC2;

DC3 ::= u0013;
DEVICECONTROL3 ::= DC3;
XOFF ::= DC3;

DC4 ::= u0014;
DEVICECONTROL4 ::= DC4;

NAK ::= u0015;
NEGATIVEACKKNOWLEDGEMENT ::= NAK;

SYN ::= u0016;
SYNCHRONOUSIDLE ::= SYN;

ETB ::= u0017;
ENDOFTRANSMISSIONBLOCK ::= ETB;

CAN ::= u0018;
CANCEL ::= CAN;

EM ::= u0019;
ENDOFMEDIUM ::= EM;

SUB ::= u001A;
SUBSTITUTE ::= SUB;

ESC ::= u001B;
ESCAPE ::= ESC;

FS ::= u001C;
FILESEPERATOR ::= FS;

GS ::= u001D;
GROUPSEPERATOR ::= GS;

RS ::= u001E;
RECORDSEPERATOR ::= RS;

US ::= u001F;
UNITSEPERATOR ::= US;

3.1.2. Symbols

SPACE ::= u0020;

EXCLAMATION ::= u0021;
EXCLAMATIONPOINT ::= EXCLAMATION;
EXCLAMATIONMARK ::= EXCLAMATION;
BANG ::= EXCLAMATION;

DOUBLEQUOTE ::= u0022;
DOUBLEQUOTES ::= DOUBLEQUOTE;
QUOTES ::= DOUBLEQUOTE;
QUOTATIONMARK ::= DOUBLEQUOTE;

NUMBERSIGN ::= u0023;

DOLLARSIGN ::= u0024;
DOLLAR ::= DOLLARSIGN;

PERCENT ::= u0025;

AMPERSAND ::= u0026;

SINGLEQUOTE ::= u0027;
APOSTROPHE ::= SINGLEQUOTE;

LEFTPARENTHESIS ::= u0028;
LEFTPAREN ::= LEFTPARENTHESIS;
OPENPARENTHESIS ::= LEFTPARENTHESIS;
OPENPAREN ::= LEFTPARENTHESIS;

RIGHTPARENTHESIS ::= u0029;
RIGHTPAREN ::= RIGHTPARENTHESIS;
OPENPARENTHESIS ::= RIGHTPARENTHESIS;
OPENPAREN ::= RIGHTPARENTHESIS;

ASTERISK ::= u002A;
STAR ::= ASTERISK;

PLUS ::= u002B;

COMMA ::= u002C;

HYPHEN ::= u002D;
DASH ::= HYPHEN;

PERIOD ::= u002E;

FORWARDSLASH ::= u002F;

COLON ::= u003A;

SEMICOLON ::= u003B;

LEFTANGLEBRACKET ::= u003C;
LESSTHAN ::= LEFTANGLEBRACKET;

EQUAL ::= u003D;

RIGHTANGLEBRACKET ::= u003E;
GREATERTHAN ::= RIGHTANGLEBRACKET;

QUESTION ::= u003F;
QUESTIONMARK ::= QUESTION;

ATSIGN ::= u0040;

LEFTSQUAREBRACKET ::= u005B;
LEFTSQUAREBRACE ::= LEFTSQUAREBRACKET;

BACKSLASH ::= u003C;

RIGHTSQUAREBRACKET ::= u005D;
RIGHTSQUAREBRACE ::= RIGHTSQUAREBRACKET;

CAROT ::= u005E;
CIRCUMFLECACCENT ::= CAROT;

UNDERSCORE ::= u005F;

ACCENT ::= u0060;
GRAVEACCENT ::= ACCENT;

LEFTCURLYBRACKET ::= u007B;
LEFTCURLYBRACE ::= LEFTCURLYBRACKET;

VERTICALLINE ::= u007C;
PIPE ::= VERTICALLIGHT;

RIGHTCURLYBRACKET ::= u007D;
RIGHTCURLYBRACE ::= RIGHTCURLYBRACKET;

TILDE ::= u007E;

DEL ::= u007F;

3.2. Character Ranges

DIGIT ::= [0-9];
HEXDIGIT ::= DIGIT | [a-fA-F];
LOWERALPHA ::= [a-z];
UPPERALPHA ::= [A-Z];
ALPHA ::= LOWERALPHA | UPPERALPHA;
ALPHANUMERIC ::= ALPHA | DIGIT;
WSP ::= TAB | SPACE;
LWSP ::= WSP | CR | LF;
CONTROL ::= [\u0000-u001F];
SYMBOL ::= [\u0021-u002F] | [\u003A-u0040] | [\u005B-u0060] | [\u007B-u007E];
ASCII ::= CONTROL | SYMBOL | ALPHANUMERIC | [\u007F-u00FF];
TEXT ::= LWSP | [\u0021-u007E];
ANY ::= [\u0000-uFFFF];

3.3. XML

NAMESTARTCHAR ::= ALPHA | COLON | UNDERSCORE | [\u00C0-u00D6] | [\u00D8-u00F6] | [\u00F8-u02FF] | [\u0370-u037D] | [\u037F-u1FFF] |
[\u200C-u200D] | [\u2070-u218F] | [\u2C00-u2FEF] | [\u2001-uD7FF] | [\uF900-uFDCF] | [\uFDF0-uFFFD] |
[\u10000-uEFFFF];
NAMECHAR ::= NAMESTARTCHAR | HYPHEN | PERIOD | DIGIT | u00B7 | [\u0300-u036F] | [\u203F-u2040];
NAME ::= NAMESTARTCHAR NAMECHAR*;
NAMES ::= NAME (SPACE NAME)*;
NMTOKEN ::= NAMECHAR+;
NMTOKENS ::= NMTOKEN (SPACE NMTOKEN)*;

XMLENTITY ::= AMPERSAND (NAME | NUMBERSIGN (DIGIT+ | "x" HEXDIGIT+)) SEMICOLON;
XMLCHAR ::= ANY - (LEFTANGLEBRACKET | RIGHTANGLEBRACKET | AMPERSAND) | XMLENTITY;
XMLATTRIBUTECHAR ::= ANY - (LEFTANGLEBRACKET | AMPERSAND | DOUBLEQUOTE) | XMLENTITY;

3.4. Misc.

CRLF ::= CR LF;

4. Statements

Statements are the building blocks of the grammar. Each statement in the grammar defines one symbol.

A statement SHALL be comprised of a symbol, equality operator, expression, and a statement terminator in that order.
The equality operator MUST be the characters U+003A (colon), U+003A (colon), and U+003D (equals) in the order.
Any number of whitespace characters MAY precede or succeed the equality operator.
The statement terminator MUST be the character U+003B (semi-colon).
Any number of whitespace characters MAY precede or succeed the statement terminator.
A comment MAY appear after a statement.
A statement MAY contain only a comment.

Syntax:

Assignment ::= COLON COLON EQUAL;
AssignmentStatement ::= Symbol LWSP* Assignment LWSP* Expression;

StatementTerminator ::= SEMICOLON;
Statement ::= AssignmentStatement LWSP* StatementTerminator | Comment | LWSP;
Statements ::= Statement+;

Example:

symbol ::= expression;

5. Symbols

A symbol represents an expression that may be used in subsequent expressions in its stead.

A symbol SHALL be defined prior to its use within an expression.
A symbol SHALL be at least one character in length.
A symbol SHALL begin with a character between U+0041 ("A") and U+005A ("Z") inclusive; or between U+0061 ("a") and U+007A ("z") inclusive.
A symbol SHALL NOT contain characters that are not between U+0030 ("0") and U+0039 ("9") inclusive; between U+0041 ("A") and U+005A ("Z") inclusive; between U+0061 ("a") and U+007A ("z") inclusive; or equal to U+005F (underscore).
A symbol SHALL be case-sensitive.

Syntax:

Symbol ::= ALPHA (ALPHANUMERIC | UNDERSCORE)*;

6. Expressions

An expression is a fragment of grammar that can be matched to a single value. Expressions can contain symbols, characters, an operator and its operands, or literal strings.

An expression SHALL consist of one symbol, character, literal string, or operator.

Syntax:

Expression ::= Symbol | Character | LiteralString | Operator;

7. Characters

Single characters are represented using one of the following constructs.

Syntax:

Character ::= UnicodeCharacter | CharacterSet;

7.1. Unicode Characters

The characters U+005C (backslash) and U+0075 ("u") followed by one to six hexadecimal digits SHALL match the character whose number (code point) in [Unicode] is the value of the number represented by the four hexadecimal digits.

Syntax:

UnicodeCharacter ::= BACKSLASH "u" {1,6}HEXDIGIT;

Example:

u004F

7.2. Character Sets

A character set is a series of characters enclosed within square brackets. A character matches a character set if the character matches one of the characters specified in the character set.

A character set SHALL begin with the character U+005B (left square bracket) and MUST end with the character U+005D (right square bracket). Collectively these two characters shall be known as the character set delimiters. The characters that appear between the delimiters shall be known as the character set content.
The character set content SHALL be comprised one or more characters or character ranges in any order.
A character specified within the character set content SHALL be any character in the range U+0021 (exclamation mark) to U+007E (tilde) inclusive except for the characters U+005B (left square bracket), U+005D (right square bracket) and U+005E (circumflex accent); the character U+002D (hyphen) (see 7.3. Character Ranges); or a Unicode character (see 7.1. Unicode Characters).
The character set content MAY be preceded by the character U+005E (circumflex accent). If the character set content is preceded by the character U+005E (circumflex accent) then that character SHALL indicate the negation of the character set content (see 7.4. Negated Character Sets).

Syntax:

CharacterSetCharacter ::= UnicodeCharacter | [\u0021-u005A] | u005C | [\u005F-u007E];
CharacterSet ::= LEFTSQUAREBRACKET CAROT? (CharacterSetCharacter | CharacterSetRange)+ RIGHTSQUAREBRACKET;

7.3. Character Ranges

A character range is two characters separated by the character U+002D (hyphen). A character range SHALL be functionally equivalent to specifying all the characters whose character number (code point) in [Unicode] is between the first character's number (code point) in [Unicode] and the second character's number (code point) in [Unicode] inclusive.

Syntax:

CharacterSetRange ::= CharacterSetCharacter HYPHEN CharacterSetCharacter;

Examples:

[a-z]

matches the characters "a" through "z".

[\u0030-u0039]

matches the characters "0" through "9".

7.4. Negated Character Sets

If the first character of the character set content is the character U+005E (circumflex accent) then the characters that match the characters in the character set content SHALL represent all those characters that are NOT specified by the characters in the character set content.

Examples:

[^abc]

matches all characters except for "a", "b", and "c".

[^f-i]

matches all characters except for "f", "g", "h", and "i".

[^am-o]

matches all characters except for "a", "m", "n", and "o".

8. Literal Strings

A symbol represents an expression that may be used in subsequent expressions in its stead.

A literal string SHALL be enclosed within U+0022 (quotation mark) characters.
A literal string SHALL NOT contain U+000D (carriage return), U+0009 (tab), or U+000A (line feed), or U+0022 (quotation mark) characters.

Syntax:

EscapeCode ::= EscapedBackslash | EscapedCharacter | EscapedDoubleQuote | EscapedCarriageReturn | EscapedLineFeed | EscapedTab;
LiteralString ::= DOUBLEQUOTE (WSP | (SYMBOL - BACKSLASH) | ALPHANUMERIC | EscapeCode)* DOUBLEQUOTE;

8.1. Escape Codes

The following escape codes MAY be used within a literal string:

8.1.1. Backslash

Two U+005C (back slash) characters SHALL match the character U+005C (back slash).

Syntax:

EscapedBackslash ::= {2,2}BACKSLASH;

Example:

"\"

matches "".

8.1.2. Unicode Character

A U+005C (back slash) character followed by a U+0075 ("u") character followed by a one to six digit hexadecimal integer SHALL match the character whose number (code point) in [Unicode] is equal to the four digit hexadecimal integer.

Syntax:

EscapedCharacter ::= BACKSLASH "u" {1,6}HEXDIGIT;

Example:

"u0021"

matches "!".

8.1.3. Double Quote

A U+005C (back slash) character followed by a U+0022 (double quote) character SHALL match the character U+0022 (double quote).

Syntax:

EscapedDoubleQuote ::= BACKSLASH DOUBLEQUOTE;

Example:

"

matches """.

8.1.4. Carriage Return

A U+005C (back slash) character followed by a U+0072 ("r") character SHALL match the character U+000D (carriage return).

Syntax:

EscapedCarriageReturn ::= BACKSLASH "r";

Example:

r

matches a carriage return character.

8.1.5. Line Feed

A U+005C (back slash) character followed by a U+006E ("n") character SHALL match the character U+000A (line feed).

Syntax:

EscapedCarriageReturn ::= BACKSLASH "n";

Example:

n

matches a line feed character.

8.1.6. Tab

A U+005C (back slash) character followed by a U+0074 ("t") character SHALL match the character U+0009 (tab).

Syntax:

EscapedCarriageReturn ::= BACKSLASH "t";

Example:

t

matches a tab character.

9. Operators

These symbols may be combined to match more complex patterns.

Syntax:

Operator ::= Grouping | Concatenation | Alternation | Exclusion | Negation | Repetition;

9.1. Grouping

A group is an expression that is treated as a unit.

A group SHALL begin with the character U+0028 (left parenthesis).
A group SHALL end with the character U+0029 (right parenthesis).
Any number of whitespace characters MAY succeed the left parenthesis.
Any number of whitespace characters MAY precede the right parenthesis.

Syntax:

Grouping ::= LEFTPARENTHESIS LWSP* Expression LWSP* RIGHTPARENTHESIS;

Example:

("abc" | "def") "ghi"

matches "abcghi" or "defghi".

9.2. Concatenation

Two expressions may be concatenated together.

One or more white space characters separating two expressions SHALL indicate that those two expressions MUST be concatenated together in the order the expressions appear.

Syntax:

Concatenation ::= Expression LWSP+ Expression;

Example:

"abc" "def"

matches "abcdef".

9.3. Alternation

Alternation provides a choice between two expressions.

The two expressions separated by the character U+007C (vertical line) SHALL indicate that at least one of the expressions MUST match.
Any number of whitespace characters MAY precede or succeed the alternation operator.

Syntax:

Alternation ::= Expression LWSP* VERTICALLINE LWSP* Expression;

Example:

"abc" | "def"

matches "abc" or "def".

9.4. Exclusion

The exclusion operator allows you to match the first expression, but not the second.

The two expressions separated by the character U+002D (hyphen) SHALL indicate that expression on the left MUST match AND the expression on the right MUST NOT match.
Any number of whitespace characters MAY precede or succeed the exclusion operator.

Syntax:

Exclusion ::= Expression LWSP* HYPHEN LWSP* Expression;

Example:

[abc] - "b"

matches "a" or "c".

9.5. Negation

The negation operator allows you to match everything that does not match the expression.

The character U+007E (tilde) followed by an expression SHALL indicate that the expression matches everything that does not match the expression up to but not including what the remaining part of the statement matches.

Syntax:

Negation ::= TILDE Expression;

Example:

~"abc"

matches anything that does not match "abc".

9.6. Repetition

The repetition operators allow you to indicate that an expression matches a specified number of times.

Syntax:

Repetition ::= (NOrMore | NToM) Expression | Expression (OneOrMore | ZeroOrMore | Optional);

9.6.1. n or More Occurrences

This repetition allows you to specify that n or more occurrences of an expression must match.

The character U+007B (left curly bracket) followed by a decimal integer followed by the character U+007D (right curly bracket) followed by an expression SHALL indicate that the expression MUST match the number of times equal to or greater than the value of the decimal integer.
The decimal integer SHALL not be less than 0.

Syntax:

NOrMore ::= LEFTCURLYBRACKET DIGIT+ RIGHTCURLYBRACKET;

Example:

{2}"a"

matches "aa", "aaa", "aaaa", "aaaaa", etc..

9.6.2. n to m Occurrences

This repetition allows you to specify that n or more occurrences of an expression must match.

The character U+007B (left curly bracket) followed by a decimal integer followed by the character U+002C (comma) followed by a decimal integer followed by the character U+007D (right curly bracket) followed by an expression SHALL indicate that the expression MUST match the number of times equal to or greater than the value of the first decimal integer AND MUST match the number of times equal to or less than the value of the second decimal integer.
The value of the first decimal integer SHALL not be less than 0.
The value of the second decimal integer SHALL be greater than or equal to value of the first decimal integer.

Syntax:

NToM ::= LEFTCURLYBRACKET DIGIT+ COMMA DIGIT+ RIGHTCURLYBRACKET;

Example:

{2,4}"a"

matches "aa", "aaa", or "aaaa".

9.6.3. One or More Occurrences

This repetition allows you to specify that one or more occurrences of an expression match.

An expression followed character U+002B (plus sign) SHALL indicate that the expression MUST match the one or more times.

Syntax:

OneOrMore ::= PLUS;

Example:

"abc"+

matches "abc", "abcabc", "abcabcabcabc", etc..

9.6.4. Zero or More Occurrences

This repetition allows you to specify that zero or more occurrences of an expression match.

An expression followed character U+002B (plus sign) SHALL indicate that the expression MUST match the zero or more times.

Syntax:

ZeroOrMore ::= ASTERISK;

Example:

"abc"*

matches "", "abc", "abcabc", "abcabcabcabc", etc..

9.6.5. Optional

This repetition allows you to specify that zero or one occurrences of an expression match.

An expression followed character U+002B (plus sign) SHALL indicate that the expression MUST match the zero or one times.

Syntax:

Optional ::= QUESTIONMARK;

Example:

"abc"?

matches "" or "abc".

9.7. Case Insensitivity

The case insensitivity operator allows you to match an expression without regard to case.

The character U+0021 (exclamation mark) followed by an expression SHALL indicate that the expression matches regardless of case.

Syntax:

CaseInsensitive ::= EXCLAMATIONPOINT Expression;

Example:

!"abc"

matches "abc", "Abc", "aBc", "abC", "ABc", "AbC", "aBC", or "ABC".

10. Comments

Comments allow annotations to be specified in the grammar.

The contents of the comment SHALL be ignored.
A comment SHALL begin with the characters U+002F (forward slash) and U+002A (asterisk).
A comment SHALL be terminated with the characters U+002A (asterisk) and U+002F (forward slash).
A comment SHALL NOT be nested within another comment.

Syntax:

CommentStart ::= FORWARDSLASH ASTERISK;
CommentEnd ::= ASTERISK FORWARDSLASH;
Comment ::= CommentStart (ALPHANUMERIC | SYMBOL | LWSP)* - CommentEnd CommentEnd;

Example:

/* The is a comment. */

11. Order of Operations

Comments allow annotations to be specified in the grammar.

The order of operations SHALL be as follows in order from highest to lowest:
Characters, literal strings, and symbols
Case Insensitivity Operator
Negation Operator
Repetition Operators
Grouping Operator
Concatenation Operator
Alternation Operator
Exclusion Operator
When two expressions have the same order of operations evaluation SHALL proceed from left to right.

Appendix A. F1TBNF Definition of F1TBNF

/*------------------------------------------------------------------------*/
/* Control Characters */
/*------------------------------------------------------------------------*/

NUL ::= u0000;
NULL ::= NUL;

SOH ::= u0001;
STARTOFHEADER ::= SOH;

STX ::= u0002;
STARTOFTEXT ::= STX;

ETX ::= u0003;
ENDOFTEXT ::= ETX;

EOT ::= u0004;
ENDOFTRANSMISSION ::= EOT;

ENQ ::= u0005;
ENQQUIRY ::= ENQ;

ACK ::= u0006;
ACKNOWLEDGEMENT ::= ACK;

BEL ::= u0007;
BELL ::= BEL;

BS ::= u0008;
BACKSPACE ::= BS;

HT ::= u0009;
HORIZONTALTAB ::= HT;
TAB ::= HT;

LF ::= u000A;
LINEFEED ::= LF;

VT ::= u000B;
VERTICALTAB ::= VT;

FF ::= u000C;
FORMFEED ::= FF;

CR ::= u000D;
CARRIAGERETURN ::= CR;
ENTER ::= CR;

SO ::= u000E;
SHIFTOUT ::= SO;

SI ::= u000F;
SHIFTIN ::= SI;

DLE ::= u0010;
DATALINKESCAPE ::= DLE;

DC1 ::= u0011;
DEVICECONTROL1 ::= DC1;
XON ::= DC1;

DC2 ::= u0012;
DEVICECONTROL2 ::= DC2;

DC3 ::= u0013;
DEVICECONTROL3 ::= DC3;
XOFF ::= DC3;

DC4 ::= u0014;
DEVICECONTROL4 ::= DC4;

NAK ::= u0015;
NEGATIVEACKKNOWLEDGEMENT ::= NAK;

SYN ::= u0016;
SYNCHRONOUSIDLE ::= SYN;

ETB ::= u0017;
ENDOFTRANSMISSIONBLOCK ::= ETB;

CAN ::= u0018;
CANCEL ::= CAN;

EM ::= u0019;
ENDOFMEDIUM ::= EM;

SUB ::= u001A;
SUBSTITUTE ::= SUB;

ESC ::= u001B;
ESCAPE ::= ESC;

FS ::= u001C;
FILESEPERATOR ::= FS;

GS ::= u001D;
GROUPSEPERATOR ::= GS;

RS ::= u001E;
RECORDSEPERATOR ::= RS;

US ::= u001F;
UNITSEPERATOR ::= US;

/*------------------------------------------------------------------------*/
/* Symbols */
/*------------------------------------------------------------------------*/

SPACE ::= u0020;

EXCLAMATION ::= u0021;
EXCLAMATIONPOINT ::= EXCLAMATION;
EXCLAMATIONMARK ::= EXCLAMATION;
BANG ::= EXCLAMATION;

DOUBLEQUOTE ::= u0022;
DOUBLEQUOTES ::= DOUBLEQUOTE;
QUOTES ::= DOUBLEQUOTE;
QUOTATIONMARK ::= DOUBLEQUOTE;

NUMBERSIGN ::= u0023;

DOLLARSIGN ::= u0024;
DOLLAR ::= DOLLARSIGN;

PERCENT ::= u0025;

AMPERSAND ::= u0026;

SINGLEQUOTE ::= u0027;
APOSTROPHE ::= SINGLEQUOTE;

LEFTPARENTHESIS ::= u0028;
LEFTPAREN ::= LEFTPARENTHESIS;
OPENPARENTHESIS ::= LEFTPARENTHESIS;
OPENPAREN ::= LEFTPARENTHESIS;

RIGHTPARENTHESIS ::= u0029;
RIGHTPAREN ::= RIGHTPARENTHESIS;
OPENPARENTHESIS ::= RIGHTPARENTHESIS;
OPENPAREN ::= RIGHTPARENTHESIS;

ASTERISK ::= u002A;
STAR ::= ASTERISK;

PLUS ::= u002B;

COMMA ::= u002C;

HYPHEN ::= u002D;
DASH ::= HYPHEN;

PERIOD ::= u002E;

FORWARDSLASH ::= u002F;

COLON ::= u003A;

SEMICOLON ::= u003B;

LEFTANGLEBRACKET ::= u003C;
LESSTHAN ::= LEFTANGLEBRACKET;

EQUAL ::= u003D;

RIGHTANGLEBRACKET ::= u003E;
GREATERTHAN ::= RIGHTANGLEBRACKET;

QUESTION ::= u003F;
QUESTIONMARK ::= QUESTION;

ATSIGN ::= u0040;

LEFTSQUAREBRACKET ::= u005B;
LEFTSQUAREBRACE ::= LEFTSQUAREBRACKET;

BACKSLASH ::= u003C;

RIGHTSQUAREBRACKET ::= u005D;
RIGHTSQUAREBRACE ::= RIGHTSQUAREBRACKET;

CAROT ::= u005E;
CIRCUMFLECACCENT ::= CAROT;

UNDERSCORE ::= u005F;

ACCENT ::= u0060;
GRAVEACCENT ::= ACCENT;

LEFTCURLYBRACKET ::= u007B;
LEFTCURLYBRACE ::= LEFTCURLYBRACKET;

VERTICALLINE ::= u007C;
PIPE ::= VERTICALLIGHT;

RIGHTCURLYBRACKET ::= u007D;
RIGHTCURLYBRACE ::= RIGHTCURLYBRACKET;

TILDE ::= u007E;

DEL ::= u007F;

/*------------------------------------------------------------------------*/
/* Character Ranges */
/*------------------------------------------------------------------------*/

DIGIT ::= [0-9];
HEXDIGIT ::= DIGIT | [a-fA-F];
LOWERALPHA ::= [a-z];
UPPERALPHA ::= [A-Z];
ALPHA ::= LOWERALPHA | UPPERALPHA;
ALPHANUMERIC ::= ALPHA | DIGIT;
WSP ::= TAB | SPACE;
LWSP ::= WSP | CR | LF;
CONTROL ::= [\u0000-u001F];
SYMBOL ::= [\u0021-u002F] | [\u003A-u0040] | [\u005B-u0060] | [\u007B-u007E];
ASCII ::= CONTROL | SYMBOL | ALPHANUMERIC | [\u007F-u00FF];
TEXT ::= LWSP | [\u0021-u007E];
ANY ::= [\u0000-uFFFF];

/*------------------------------------------------------------------------*/
/* XML */
/*------------------------------------------------------------------------*/

NAMESTARTCHAR ::= ALPHA | COLON | UNDERSCORE | [\u00C0-u00D6] | [\u00D8-u00F6] | [\u00F8-u02FF] | [\u0370-u037D] | [\u037F-u1FFF] |
[\u200C-u200D] | [\u2070-u218F] | [\u2C00-u2FEF] | [\u2001-uD7FF] | [\uF900-uFDCF] | [\uFDF0-uFFFD] |
[\u10000-uEFFFF];
NAMECHAR ::= NAMESTARTCHAR | HYPHEN | PERIOD | DIGIT | u00B7 | [\u0300-u036F] | [\u203F-u2040];
NAME ::= NAMESTARTCHAR NAMECHAR*;
NAMES ::= NAME (SPACE NAME)*;
NMTOKEN ::= NAMECHAR+;
NMTOKENS ::= NMTOKEN (SPACE NMTOKEN)*;

XMLENTITY ::= AMPERSAND (NAME | NUMBERSIGN (DIGIT+ | "x" HEXDIGIT+)) SEMICOLON;
XMLCHAR ::= ANY - (LEFTANGLEBRACKET | RIGHTANGLEBRACKET | AMPERSAND) | XMLENTITY;
XMLATTRIBUTECHAR ::= ANY - (LEFTANGLEBRACKET | AMPERSAND | DOUBLEQUOTE) | XMLENTITY;

/*------------------------------------------------------------------------*/
/* Misc. */
/*------------------------------------------------------------------------*/

CRLF ::= CR LF;

/*------------------------------------------------------------------------*/
/* F1TBNF */
/*------------------------------------------------------------------------*/

Grouping ::= LEFTPARENTHESIS LWSP* Expression LWSP* RIGHTPARENTHESIS;

Concatenation ::= Expression LWSP+ Expression;

Alternation ::= Expression LWSP* VERTICALLINE LWSP* Expression;

Exclusion ::= Expression LWSP* HYPHEN LWSP* Expression;

Negation ::= TILDE Expression;

NOrMore ::= LEFTCURLYBRACKET DIGIT+ RIGHTCURLYBRACKET;
NToM ::= LEFTCURLYBRACKET DIGIT+ COMMA DIGIT+ RIGHTCURLYBRACKET;
OneOrMore ::= PLUS;
ZeroOrMore ::= ASTERISK;
Optional ::= QUESTIONMARK;
Repetition ::= (NOrMore | NToM) Expression | Expression (OneOrMore | ZeroOrMore | Optional);

Operator ::= Grouping | Concatenation | Alternation | Exclusion | Negation | Repetition;

EscapedBackslash ::= {2,2}BACKSLASH;
EscapedCharacter ::= BACKSLASH "u" {1,6}HEXDIGIT;
EscapedDoubleQuote ::= BACKSLASH DOUBLEQUOTE;
EscapedCarriageReturn ::= BACKSLASH "r";
EscapedLineFeed ::= BACKSLASH "n";
EscapedTab ::= BACKSLASH "t";
EscapeCode ::= EscapedBackslash | EscapedCharacter | EscapedDoubleQuote | EscapedCarriageReturn | EscapedLineFeed | EscapedTab;

LiteralString ::= DOUBLEQUOTE (WSP | (SYMBOL - BACKSLASH) | ALPHANUMERIC | EscapeCode)* DOUBLEQUOTE;

UnicodeCharacter ::= BACKSLASH "u" {1,6}HEXDIGIT;
CharacterSetCharacter ::= UnicodeCharacter | [\u0021-u005A] | u005C | [\u005F-u007E];
CharacterSetRange ::= CharacterSetCharacter HYPHEN CharacterSetCharacter;
CharacterSet ::= LEFTSQUAREBRACKET CAROT? (CharacterSetCharacter | CharacterSetRange)+ RIGHTSQUAREBRACKET;
Character ::= UnicodeCharacter | CharacterSet;

Expression ::= Symbol | Character | LiteralString | Operator;

Symbol ::= ALPHA (ALPHANUMERIC | UNDERSCORE)*;
CommentStart ::= FORWARDSLASH ASTERISK;
CommentEnd ::= ASTERISK FORWARDSLASH;
Comment ::= CommentStart (ALPHANUMERIC | SYMBOL | LWSP)* - CommentEnd CommentEnd;

Assignment ::= COLON COLON EQUAL;
AssignmentStatement ::= Symbol LWSP* Assignment LWSP* Expression;

StatementTerminator ::= SEMICOLON;
Statement ::= AssignmentStatement LWSP* StatementTerminator | Comment | LWSP;
Statements ::= Statement+;

Appendix B. References

Extended Backus–Naur Form

International Organization for Standardization (ISO). ISO/IEC 14977:1996(E): Information technology - Syntactic metalanguage - Extended BNF. ISO/IEC, 1996 (See http://standards.iso.org/ittf/PubliclyAvailableStandards/s026153_ISO_IEC_14977_1996(E).zip).

ITEF RFC 2119

Internet Engineering Task Force (IETF). RFC 2119: Key words for use in RFCs to Indicate Requirement Levels. Scott Bradner, 1997 (See http://www.ietf.org/rfc/rfc2119.txt).

Unicode

The Unicode Consortium. The Unicode Standard, Version 6.0.0, (Mountain View, CA: The Unicode Consortium, 2011. ISBN 978-1-936213-01-6) http://www.unicode.org/versions/Unicode6.0.0/

XML 1.1

World Wide Web Consortium (W3C). Extensible Markup Language (XML) 1.1 (Second Edition). Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, François Yergeau, John Cowan (editors) (See http://www.w3.org/TR/xml11/).

Appendix C. Legal

License

By using and/or copying this document you (the licensee) agree that you have read, understood, and will comply with all of the following terms and conditions:

Permission to copy and distribute the contents of this document in any medium for any purpose and without fee or royalty is hereby granted provided that you include the following on ALL copies of the document, or portions thereof, that you use:

A link or URL to the original document.
The pre-existing copyright notice of the original author or, if it doesn't exist, a notice of the form: Copyright (c) [date-of-document] ForceOne technologies (http://www.forceonetech.com). All rights reserved.

No right to create modifications or derivatives of this document is granted pursuant to this license.

Disclaimers

THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders.

Copyright (c) 2011 ForceOne Technologies. Web site design copyright (c) 2011 ForceOne Technologies. Logos are copyright and/or trademarked by their respective holders. All rights reserved.
Home | Games | Illusions | References | Contact Us | About Us | Mobile Site