|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0757 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0757.
Report 0757 Actions
Problem Report Number 0757 Submitter's Classification Specification problem State Resolved Resolution Temporary Interpretation (TIN) Problem Resolution ID TIN.X.0048 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1995-09-09 08:00 Product Standard Commands and Utilities V2 (UNIX 95) Certification Program The Open Brand certification program Test Suite VSC version 4.1.4 Test Identification POSIX.cmd/expr 77 Specification Commands and Utilities Issue 4 Version 2 Location in Spec See Problem Text Problem Summary TIN4C.00013 Actual output from regular expression "^^" test may be 1 Problem Text
The behavior of the "^" (caret) in a BRE was recently the subject of an
IEEE interpretation (PASC Ref. #1003.2-120). The standard states that
it is unspecified (not implementation defined) whether "^" is a special
character in the context of the pattern being anchored to the beginning
of the string.
Note - our implementation does not support subexpression anchoring.Test Output
Assertion #77 (A): GA114
Note: An IEEE POSIX.2 interpretation request is pending on
'nothing will be written to indicate a null string'.
Note: An IEEE POSIX.2 interpretation request is pending on
behavior of the caret (^) anchor in an expr BRE
Testing regular expression "a^b"
Testing regular expression "a^b"
Testing regular expression "^^"
expected exit status 1, got 0
Contents of regb_err:
output differed from expected
Expect output: "0"
Actual output: "1"
Testing regular expression "^"
Testing regular expression "[c^b]"
Testing regular expression "[^ab]"
Testing regular expression "[^ab]"
Testing regular expression "[^^]"
Testing regular expression "(a^b)"
Testing regular expression "(a^b)"
Testing regular expression "(^)"
Assertion Result: FAIL
Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
pasc-1003.2-120 asks
Subclause 4.22.7.1 of POSIX.2 specifies the syntax and semantics of
the expr utility. This section reads:
The ':' matching operator shall compare the string
resulting from the evaluation of expr1 with the BRE
pattern resulting from the evaluation of expr2. BRE
syntax shall be that defined in 2.8.3, except that
all patterns are "anchored" to the beginning of the
string (that is, only sequences starting at the first
character of a string shall be matched by the BRE).
Therefore, it is unspecified whether ^ is a special
character in that context.
Note that this description does not say that it is "implementation defined",
but rather "unspecified" whether ^ is an anchor when used in the BRE of an
expr matching expression. As such, this implies that a conforming
implementation of expr need not even behave consistently from one invocation
to the next when a ^ is used in a BRE on the right side of a ':' operator.
Since the BRE is not a subexpression, the system defined behavior of anchors
in subexpressions does not apply here. Is this the intention?
The response is
It is difficult to state what the intention was, but the standard is
clear. If "implementation defined" were used instead of "unspecified",
it would not affect a conforming POSIX.2 application.
We believe this means that any behavior is acceptable in this case.
Anticipating acceptance this propsoed resolution a temporary
interpretation is recommended.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Temporary Interpretation (TIN) Review Conclusion
A Temporary Interpretation is granted.
Problem Reporting System Options:
- View Report 0757
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority