Apparently, some are reading that as since the \55 is not encoded directly as a 
<hyphen> the user's intent was to treat it as a literal (or any character 
specified this way), not ERE operator, as another means of specifying '\-' in 
this case. An implementation that doesn't use regcomp may only permit '-' 
encoded directly as the range operator, iow. Given the current text I don't 
think a conformance distinction can be made, as the expectation is not a 
requirement; that escapes are converted and then the string has to be 
re-scanned for ERE operators/delimiters. As a single-pass L2R parse, I'd say 
nawk, etc. are the conforming ones, not those that do 2 passes.


In a message dated 5/4/2018 11:11:26 AM Eastern Standard Time, 
[email protected] writes:

 
Re:

> You said earlier that,
> 
> echo b | awk '/[a\55c]/'
> 
> is required to match (on ASCII-based systems), but that's not
> the case with several implementations (like nawk on Solaris,
> bwk's awk, mawk, FreeBSD awk...).
> 
> Should those be considered non-compliant?

The previous discussion was \056 matching any character because it
becomes a <period>, but this case should match too (assuming both
ASCII encoding and POSIX locale; the latter because it's a range).

-- 
Geoff Clare <[email protected]>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to