|
JavaScript 2.0
Notation
|
Wednesday, May 12, 1999
The main body of this proposal uses an informal syntax to describe language constructs. An example is the following:
< VersionRange [: Identifier] , ... , VersionRange [: Identifier] >].. [Version]VersionsAndRenames and VersionRange are the names of the grammar
rules. The black square brackets represent optional items, and the black ... together with its neighbors represents optional
repetition of zero or more items, so a VersionsAndRenames can have zero or more sets of VersionRange [: Identifier]
separated by commas. A black | indicates that either its left or right alternative may be present, but not both; |'s have
the lowest metasymbol precedence. Syntactic tokens to be typed literally are in a bold blue
monospaced font. Grammar nonterminals are in green italic and correspond to the nonterminals
in the parser grammar or lexer grammar.
The informal syntax descriptions sometimes list only the general or simplified syntax. Please refer to the parser grammar, lexer grammar, and their notation for the actual syntax.
This proposal uses the following conventions to denote literal characters:
Printable ASCII literal characters (values 20 through 7E hexadecimal) are in a blue monospaced font. Other
characters are denoted by enclosing their four-digit hexadecimal Unicode value between «u
and ». For example, the non-breakable space character would be denoted in this
document as «u00A0». A few of the common control characters are represented
by name:
| Abbreviation | Unicode Value |
|---|---|
«NUL» |
«u0000» |
«BS» |
«u0008» |
«TAB» |
«u0009» |
«LF» |
«u000A» |
«VT» |
«u000B» |
«FF» |
«u000C» |
«CR» |
«u000D» |
«SP» |
«u0020» |
A space character is denoted in this document either by a blank space where it's obvious from the context or by «SP»
where the space might be confused with some other notation.