|
ECMAScript 4 Netscape Proposal
Formal Description
Lexical Grammar
|
Monday, June 30, 2003
This LALR(1) grammar describes the lexical syntax of the ECMAScript 4 proposal. See also the description of the grammar notation.
This document is also available as a Word RTF file.
The lexer’s start symbols are:
NextInputElementnum if the
previous input element was a number;
NextInputElementre if the
previous input element was not a number and a / should be interpreted as a regular expression; and
NextInputElementdiv if the
previous input element was not a number and a / should be interpreted as a division or division-assignment
operator.
In addition to the above, the start symbol
StringNumericLiteral is used by the syntactic semantics for
string-to-number conversions and the start symbol
StringDecimalLiteral is used by the syntactic semantics for
implementing the parseFloat function.
«TAB» | «VT» | «FF» | «SP» | «u00A0»«u2000» | «u2001» | «u2002» | «u2003» | «u2004» | «u2005» | «u2006» | «u2007»«u2008» | «u2009» | «u200A» | «u200B»«u3000»!! =! = =%% =&& && & =& =()** =++ ++ =,-- -- =.. . .:: :;<< << < =< === == = =>> => >> > => > >> > > =?[]^^ =^ ^^ ^ ={|| =| || | =}~. FractionN a N|
Waldemar Horwat Last modified Monday, June 30, 2003 |