Inconsistencies in &

Sukyoung Ryu sukyoung.ryu at
Mon Sep 24 19:30:02 PDT 2012


We found inconsistencies in ES5 regarding regular expressions:

In, the first step for the production "Term :: Assertion" is as follows:

1. Evaluate Assertion to obtain an AssertionTester t.

However, among the six productions for Assertion in, two of them do not return AssertionTester.  While each of the following four productions returns an internal AssertionTester closure:

Assertion :: ^
Assertion :: $
Assertion :: \ b
Assertion :: \ B

each of the following two productions returns an internal Matcher closure:

Assertion :: ( ? = Disjunction )
Assertion :: ( ? ! Disjunction )

We believe that the production "Term :: Assertion" in should evaluate by evaluating Assertion to obtain a Matcher and returning that Matcher, and the four productions for Assertion above should return an internal Matcher closure instead of an internal AssertionTester closure.

We would greatly appreciate any comments.


More information about the es-discuss mailing list