From: Vern Paxson Date: Mon, 5 Jul 1993 21:36:47 +0000 (+0000) Subject: Fixed bug with Z-a character classes as per Wilhelms X-Git-Tag: flex-2-5-5b~432 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e1c7e268616ce081bd9b8c14a35f345486ffeb2;p=flex Fixed bug with Z-a character classes as per Wilhelms --- diff --git a/parse.y b/parse.y index 828e0e2..c70d7d6 100644 --- a/parse.y +++ b/parse.y @@ -604,19 +604,19 @@ fullccl : '[' ccl ']' ccl : ccl CHAR '-' CHAR { + if ( caseins ) + { + if ( $2 >= 'A' && $2 <= 'Z' ) + $2 = clower( $2 ); + if ( $4 >= 'A' && $4 <= 'Z' ) + $4 = clower( $4 ); + } + if ( $2 > $4 ) synerr( "negative range in character class" ); else { - if ( caseins ) - { - if ( $2 >= 'A' && $2 <= 'Z' ) - $2 = clower( $2 ); - if ( $4 >= 'A' && $4 <= 'Z' ) - $4 = clower( $4 ); - } - for ( i = $2; i <= $4; ++i ) ccladd( $1, i );