                     | "t"  => [[ CHAR: \t ]]
                     | "v"  => [[ CHAR: \v ]]
                     | "'"  => [[ CHAR: '  ]]
-                    | "\"" => [[ CHAR: \"  ]]
+                    | "\"" => [[ CHAR: \" ]]
                     | "\\" => [[ CHAR: \\ ]]
-HexDigit          = [0-9a-fA-F]
-HexEscape         = "x" (HexDigit HexDigit):d => [[ d hex> ]]
-UnicodeEscape     = "u" (HexDigit HexDigit HexDigit HexDigit):d => [[ d hex> ]]
-                    | "u{" HexDigit+:d "}" => [[ d hex> ]]
-EscapeChar         = "\\" (SingleEscape | HexEscape | UnicodeEscape):c => [[ c ]]
-StringChars1       = (EscapeChar | !('"""') .)* => [[ >string ]]
-StringChars2       = (EscapeChar | !('"') .)* => [[ >string ]]
-StringChars3       = (EscapeChar | !("'") .)* => [[ >string ]]
-Str                =   '"""' StringChars1:cs '"""' => [[ cs ast-string boa ]]
-                     | '"' StringChars2:cs '"' => [[ cs ast-string boa ]]
-                     | "'" StringChars3:cs "'" => [[ cs ast-string boa ]]
-RegExpFlags        = NameRest* => [[ >string ]]
-NonTerminator      = !([\n\r]) .
-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
+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:

Letter            = [a-zA-Z]
Digit             = [0-9]
Digits            = Digit+
SingleLineComment = "//" (!("\n") .)* "\n" => [[ ignore ]]
MultiLineComment  = "/*" (!("*/") .)* "*/" => [[ ignore ]]
Space             = [ \t\r\n] | SingleLineComment | MultiLineComment
Spaces            = Space* => [[ ignore ]]
NameFirst         = Letter | "$" => [[ CHAR: $ ]] | "_" => [[ CHAR: _ ]]
NameRest          = NameFirst | Digit

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