[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4 ebcdic patch
From: |
Michael Elizabeth Chastain |
Subject: |
Re: m4 ebcdic patch |
Date: |
Mon, 15 Dec 2003 13:24:41 -0500 (EST) |
Hi Paul,
> It's in the regex code that looks for patterns like '[a-z]'; it
> compares for characters greater than or equal to 'a' and less than or
> equal to 'z' in the collating sequence.
I took care of this.
My patch fixes the code in regex.c:compile_range which expands ranges
to character sets. I call my new function make_range, which works
with any character encoding.
I also wrote new tests, like these:
regexp(`~{}\mec.was.here', `[A-Za-z'])
dnl @result{}4
patsubst(`Alpha_{}\~-bet.', `\w', `& ')
dnl @result{}A l p h a _ {}\~-b e t .
In the ebcdic table that I have, '~' falls between 'r' and 's', and '\'
falls between 'R' and 'S'. These tests show that they are not
matching [A-Za-z] and not matching \w.
Of course I could have missed something. Can you point to something
that I missed, or suggest a test case that you want to try? I don't
have access to an ebcdic machine, but I am happy to add more test cases
and ask Kevin Mullins to run the test suit on his s/390.
Michael C