                     | "void"
                     | "while"
                     | "with") !(NameRest)
+FutureReserved    =  ("class"
+                    | "const"
+                    | "enum"
+                    | "export"
+                    | "extends"
+                    | "import"
+                    | "super")
 Name              = !(Keyword) iName  => [[ ast-name boa ]]
-Number            =   Digits:ws '.' Digits:fs => [[ ws "." fs 3array "" concat-as string>number ast-number boa ]]
-                    | Digits => [[ >string string>number ast-number boa ]]
+HexInteger        = "0"~ [xX]~ HexDigit+ => [[ hex> ]]
+OctInteger        = "0"~ OctDigit+ => [[ oct> ]]
+ExponentPart      = ("e"|"E") ("+"|"-")? Digits => [[ concat ]]
+Decimal           =  (Digits "." Digits? ExponentPart?
+                    | "." Digits ExponentPart?
+                    | Digits ExponentPart?) => [[ concat string>number ]]
+Number            = HexInteger | OctInteger | Decimal => [[ ast-number boa ]]
 
 SingleEscape      =   "b"  => [[ CHAR: \b ]]
                     | "f"  => [[ CHAR: \f ]]

                    | "case"
                    | "catch"
                    | "continue"
                    | "default"
                    | "delete"
                    | "do"

                    | "t"  => [[ CHAR: \t ]]
                    | "v"  => [[ CHAR: \v ]]
                    | "'"  => [[ CHAR: '  ]]
                    | "\"" => [[ CHAR: \" ]]
                    | "\\" => [[ CHAR: \\ ]]
OctEscape         =  ([0-3] OctDigit OctDigit?
                    | [4-7] OctDigit) [[ sift oct> ]]
HexEscape         = "x"~ (HexDigit HexDigit) => [[ hex> ]]
UnicodeEscape     =  ("u"~ (HexDigit HexDigit HexDigit HexDigit)
                    | "u{"~ HexDigit+ "}"~) => [[ hex> ]]
EscapeChar        = "\\" (SingleEscape | OctEscape | HexEscape | UnicodeEscape):c => [[ c ]]
LineContinuation  = "\\" LineTerminator => [[ drop f ]]
StringChars1      = (EscapeChar | LineContinuation | !('"""') .)
StringChars2      = (EscapeChar | LineContinuation | !('"') .)
StringChars3      = (EscapeChar | LineContinuation | !("'") .)
Str               = ( '"""'~ StringChars1* '"""'~
                    | '"'~ StringChars2* '"'~
                    | "'"~ StringChars3* "'"~ ) => [[ sift >string ast-string boa ]]
RegExpFlags       = NameRest* => [[ >string ]]
NonTerminator     = !(LineTerminator) .
BackslashSequence = "\\" NonTerminator => [[ second ]]
RegExpFirstChar   =   !([*\\/]) NonTerminator
                    | BackslashSequence
RegExpChar        =   !([\\/]) NonTerminator
                    | BackslashSequence
RegExpChars       = RegExpChar*
RegExpBody        = RegExpFirstChar RegExpChars => [[ first2 swap prefix >string ]]
RegExp            = "/" RegExpBody:b "/" RegExpFlags:fl => [[ b fl ast-regexp boa ]]
Special           =   "("    | ")"   | "{"   | "}"   | "["   | "]"   | ","   | ";"
                    | "?"    | ":"   | "!==" | "!="  | "===" | "=="  | "="   | ">="
                    | ">>>=" | ">>>" | ">>=" | ">>"  | ">"   | "<="  | "<<=" | "<<"
                    | "<"    | "++"  | "+="  | "+"   | "--"  | "-="  | "-"   | "*="
                    | "*"    | "/="  | "/"   | "%="  | "%"   | "&&=" | "&&"  | "||="
                    | "||"   | "."   | "!"   | "&="  | "&"   | "|="  | "|"   | "^="
                    | "^"    | "~"
Tok               = Spaces (Name | Keyword | Number | Str | RegExp | Special )
Toks              = Tok* Spaces
]=]

! Grammar for JavaScript. Based on OMeta-JS example from:
