[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/39002: harmful AWK extension: non-portable escaped character
>> This remark is for regular expressions, not for constant strings.
>> Regexps are different case. And my patch concerns lexical analisis
> Yes, but when reading the rationale section they specifically mention
> the characters accepted via \ escapes has varied over time and they
> simply put down the set which has to be supported. They then go on to
> talk about it's overall relation to C and specifically excluding the
> \x style of escapes for hex sequences.
> Based on that (plus the regex section) I still think anything beyond
> the the base escapes is undefined territory and even your examples
> show different awks do different things.
Even if it is so, the better solution whould be neither treat \x and x
nor as \x. If HP-UX, mawk, probably Solaris and others on the one hand
and mawk and gawk on the other hand have completely different "long
standing trandition", it is better to implement the third solution -
WARNING message or even FATAL error. Just like sigaction was
introduced two decades ago. In this case those who program under
NetBSD and those who use it will be notified about this
incompatibility. Also warning/error message in awk can explicitly
mention POSIX to make a message clearer.
Best regards, Aleksey Cheusov.
Main Index |
Thread Index |