Why are implementations allowed to extend the regular expressions syntax?

Benjamin Gruenbaum benjamingr at gmail.com
Sat Jun 20 18:31:07 UTC 2015

Quoting the specification at

An implementation may extend the ECMAScript Regular Expression grammar
defined in 21.2.1, but it must not extend the RegularExpressionBody and
RegularExpressionFlags productions defined below or the productions used by
these productions.

Why are implementations allowed to diverge on regular expressions this way?
Has any implementation ever used this ability to extend the grammar?

Does this mean that the source property of a regular expression isn't
guaranteed to return a same "length"ed string for every implementation?

Original discussion here:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150620/31cd9f6d/attachment.html>

More information about the es-discuss mailing list