archives

« Bugzilla Issues Index

#749 — 11.1.8: algorithm doesn't follow conventions


In 11.1.8 "Regular Expression Literals",
under "Runtime Semantics: Evaluation",
the algorithm isn't expressed in the usual conventions.

Change it to something more like:
1. Let /pattern/ be the characters comprising the /RegularExpressionBody/
of the /RegularExpressionLiteral/.
2. Let /flags/ be the characters comprising the /RegularExpressionFlags/
of the /RegularExpressionLiteral/.
3. Let /rx/ be a new object created as if by the expression
new RegExp(/pattern/, /flags/) where RegExp is the standard built-in
constructor with that name.
4. Return /rx/.

A more direct (and better, in my opinion) alternative for step 3 would be:
3. Let /rx/ be the result of the abstract operation RegExpCreate
with arguments /pattern/ and /flags/.

(Also, the algorithm is currently in sans-serif, whereas they're normally in a serif font.)


fixed in rev20 editor's draft


fixed in rev20 draft, Oct. 28, 2013