]> granicus.if.org Git - flex/commitdiff
Changed explicit 'A'-'Z' to isupper(), where correct to do so.
authorJohn Millaway <john43@users.sourceforge.net>
Sat, 25 Mar 2006 17:57:52 +0000 (17:57 +0000)
committerJohn Millaway <john43@users.sourceforge.net>
Sat, 25 Mar 2006 17:57:52 +0000 (17:57 +0000)
Documentation.

doc/flex.texi
parse.y

index 3cc533ba1ea98bdc976a55c888a452ad3aa0be5d..97d22751c5580b0175315499a5424f09579543ef 100644 (file)
@@ -8405,6 +8405,11 @@ Technically, the above pattern does not encompass all possible C99 identifiers,
 "implementation-defined" characters. In practice, C compilers follow the above pattern, with the
 addition of the @samp{$} character.
 
+@item UTF-8 Encoded Unicode Code Point
+@verbatim
+[\x09\x0A\x0D\x20-\x7E]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF]([\x80-\xBF]{2})|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF]([\x80-\xBF]{2})|[\xF1-\xF3]([\x80-\xBF]{3})|\xF4[\x80-\x8F]([\x80-\xBF]{2})
+@end verbatim
+
 @end table
 
 @node Quoted Constructs, Addresses, Identifiers, Common Patterns
diff --git a/parse.y b/parse.y
index 1a37341b3a71a52cff738bab8c987f2ac13494a4..2b80bb7e5e231b8353da1c6834f0a78a4166b908 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -786,7 +786,7 @@ singleton   :  singleton '*'
                        {
                        ++rulelen;
 
-                       if ( caseins && $1 >= 'A' && $1 <= 'Z' )
+                       if ( caseins && isupper($1))
                                $1 = clower( $1 );
 
                        if ($1 == nlch)
@@ -867,7 +867,7 @@ ccl         :  ccl CHAR '-' CHAR
 
                |  ccl CHAR
                        {
-                       if ( caseins && $2 >= 'A' && $2 <= 'Z' )
+                       if ( caseins && isupper($2))
                                $2 = clower( $2 );
 
                        ccladd( $1, $2 );
@@ -936,7 +936,7 @@ ccl_expr:
                
 string         :  string CHAR
                        {
-                       if ( caseins && $2 >= 'A' && $2 <= 'Z' )
+                       if ( caseins && isupper($2))
                                $2 = clower( $2 );
 
                        if ( $2 == nlch )