dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_scanner.l,1.7,1.8


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_scanner.l,1.7,1.8
Date: Fri, 14 Feb 2003 21:52:00 -0500

Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv7853/cscc/csharp

Modified Files:
        cs_scanner.l 
Log Message:


ParseIdentifier: short-cut character recognition so that
"ILGetUnicodeCategory" is only called for non-ASCII Unicode characters.


Index: cs_scanner.l
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_scanner.l,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** cs_scanner.l        31 Jan 2003 03:37:04 -0000      1.7
--- cs_scanner.l        15 Feb 2003 02:51:58 -0000      1.8
***************
*** 739,754 ****
  
                /* Validate it */
-               category = ILGetUnicodeCategory((unsigned)ch);
                if(first)
                {
!                       if(ch != '_' &&
!                          category != ILUnicode_UppercaseLetter &&
!                          category != ILUnicode_LowercaseLetter &&
!                          category != ILUnicode_TitlecaseLetter &&
!                          category != ILUnicode_ModifierLetter &&
!                          category != ILUnicode_OtherLetter &&
!                          category != ILUnicode_LetterNumber)
                        {
!                               invalid = 1;
                        }
                        first = 0;
--- 739,758 ----
  
                /* Validate it */
                if(first)
                {
!                       if(!((ch >= 'A' && ch <= 'Z') ||
!                            (ch >= 'a' && ch <= 'z') || ch == '_'))
                        {
!                               category = ILGetUnicodeCategory((unsigned)ch);
!                               if(ch != '_' &&
!                                  category != ILUnicode_UppercaseLetter &&
!                                  category != ILUnicode_LowercaseLetter &&
!                                  category != ILUnicode_TitlecaseLetter &&
!                                  category != ILUnicode_ModifierLetter &&
!                                  category != ILUnicode_OtherLetter &&
!                                  category != ILUnicode_LetterNumber)
!                               {
!                                       invalid = 1;
!                               }
                        }
                        first = 0;
***************
*** 756,772 ****
                else
                {
!                       if(category != ILUnicode_UppercaseLetter &&
!                          category != ILUnicode_LowercaseLetter &&
!                          category != ILUnicode_TitlecaseLetter &&
!                          category != ILUnicode_ModifierLetter &&
!                          category != ILUnicode_OtherLetter &&
!                          category != ILUnicode_LetterNumber &&
!                          category != ILUnicode_DecimalDigitNumber &&
!                          category != ILUnicode_NonSpacingMark &&
!                          category != ILUnicode_SpaceCombiningMark &&
!                          category != ILUnicode_ConnectorPunctuation &&
!                          category != ILUnicode_Format)
                        {
!                               invalid = 1;
                        }
                }
--- 760,782 ----
                else
                {
!                       if(!((ch >= 'A' && ch <= 'Z') ||
!                            (ch >= 'a' && ch <= 'z') ||
!                            (ch >= '0' && ch <= '9') || ch == '_'))
                        {
!                               category = ILGetUnicodeCategory((unsigned)ch);
!                               if(category != ILUnicode_UppercaseLetter &&
!                                  category != ILUnicode_LowercaseLetter &&
!                                  category != ILUnicode_TitlecaseLetter &&
!                                  category != ILUnicode_ModifierLetter &&
!                                  category != ILUnicode_OtherLetter &&
!                                  category != ILUnicode_LetterNumber &&
!                                  category != ILUnicode_DecimalDigitNumber &&
!                                  category != ILUnicode_NonSpacingMark &&
!                                  category != ILUnicode_SpaceCombiningMark &&
!                                  category != ILUnicode_ConnectorPunctuation &&
!                                  category != ILUnicode_Format)
!                               {
!                                       invalid = 1;
!                               }
                        }
                }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]