Brendan Eich wrote:
One solution already used in ECMA-262 to regain LR(1) parsing of the standard grammar is lookahead restriction. Observe that with postfix-'?' in patterns, the legal lookahead set is {'=', ':' , ',', '}', ']'}. So we could simply write a lookahead restriction.

Amended per the formal parameter case that Claude Pache provoked me to consider:

  lookahead not in {'=', ':' , ',', '}', ']', ')'}

after the postfix-'?' optionally following an object or array literal in the main (cover) grammar.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to