Directive prologue members, escapes, and retroactive syntax errors

Brendan Eich brendan at
Fri Oct 15 11:54:19 PDT 2010

On Oct 15, 2010, at 1:10 AM, Peter van der Zee wrote:

> I see your point. I don't know how SpiderMonkey exactly parses it, but it seems as much an edge case as RegularExpressionLiteral vs DivPunctuator. Eg. the parser should tell the lexer what it expects, div or regex.

How much lookahead or token buffering are you thinking of? The problem is the strict mode directive may not be processed by the parser until well after the lexer has tokenized a prior unrecognized directive that contains octal escapes.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es5-discuss mailing list