April 2002 Draft
JavaScript 2.0
Formal Description
Unit Semantics
|
Thursday, February 7, 2002
The unit semantics describe the actions the lexer takes in order to interpret a quoted unit pattern. The input to these semantics is the unit string literal’s contents after the string literal has been processed. For convenience, the unit grammar is repeated here. See also the description of the semantic notation.
This document is also available as a Word 98 rtf file.
The start nonterminal is UnitPattern.
«TAB»
| «VT»
| «FF»
| «SP»
| «u00A0»
«u2000»
| «u2001»
| «u2002»
| «u2003»
| «u2004»
| «u2005»
| «u2006»
| «u2007»
«u2008»
| «u2009»
| «u200A»
| «u200B»
«u3000»
/
WhiteSpacewsopt UnitProductwsopt2]
= Value[UnitProductwsopt1] unitReciprocal(Value[UnitProductwsopt2]);*
WhiteSpacewsopt UnitFactor]
= Value[UnitProductwsopt1] Value[UnitFactor];^
WhiteSpacewsopt SignedInteger WhiteSpace]
= [UnitFactoridentifier: Name[Identifier], exponent: IntegerValue[SignedInteger]];
Waldemar Horwat Last modified Thursday, February 7, 2002 |