diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-12 15:29:36 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-12 15:29:36 +0000 |
commit | 1b2d223bc80114ab97e5af7bf5270927ae350ba4 (patch) | |
tree | b0495c5afa84a084c55f59a788dec505857bb867 /regcomp.c | |
parent | da32f63e54ca956472e919d15f2271b9494ad04e (diff) | |
download | perl-1b2d223bc80114ab97e5af7bf5270927ae350ba4.tar.gz |
EBCDIC: make t/op/pat #242 and 243 finally succeed.
p4raw-id: //depot/perl@16556
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -3523,6 +3523,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) UV n; bool optimize_invert = TRUE; AV* unicode_alternate = 0; +#ifdef EBCDIC + UV literal_endpoint = 0; +#endif ret = reganode(pRExC_state, ANYOF, 0); @@ -3685,6 +3688,10 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) break; } } /* end of \blah */ +#ifdef EBCDIC + else + literal_endpoint++; +#endif if (namedclass > OOB_NAMEDCLASS) { /* this is a named class \blah */ @@ -4087,8 +4094,11 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) IV ceilvalue = value < 256 ? value : 255; #ifdef EBCDIC - if ((isLOWER(prevvalue) && isLOWER(ceilvalue)) || - (isUPPER(prevvalue) && isUPPER(ceilvalue))) + /* In EBCDIC [\x89-\x91] should include + * the \x8e but [i-j] should not. */ + if (literal_endpoint == 2 && + ((isLOWER(prevvalue) && isLOWER(ceilvalue)) || + (isUPPER(prevvalue) && isUPPER(ceilvalue)))) { if (isLOWER(prevvalue)) { for (i = prevvalue; i <= ceilvalue; i++) @@ -4168,6 +4178,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) } } } +#ifdef EBCDIC + literal_endpoint = 0; +#endif } range = 0; /* this range (if it was one) is done now */ |