* ILTables.cs: Comment out nan and inf keywords, these are not
authorJackson Harper <jackson@novell.com>
Fri, 23 May 2003 04:02:21 +0000 (04:02 -0000)
committerJackson Harper <jackson@novell.com>
Fri, 23 May 2003 04:02:21 +0000 (04:02 -0000)
referenced in the grammar. need to check if these keywords work on
MS ilasm.
* NumberHelper.cs: Parse numbers as Unsigned then cast to long
otherwise an overflow exception is thrown. (is this a classlib bug?)

svn path=/trunk/mcs/; revision=14822

mcs/ilasm/scanner/ChangeLog
mcs/ilasm/scanner/ILTables.cs
mcs/ilasm/scanner/NumberHelper.cs

index 16b3f73d7c3e27d615efac1d5ad4f3f5b2b7bbec..2364bf198a6cdfcb3bcd6fe76d752e075c56eefc 100644 (file)
@@ -1,6 +1,14 @@
+2003-05-22 Jackson Harper <jackson@latitudegeo.com>
+
+       * ILTables.cs: Comment out nan and inf keywords, these are not
+       referenced in the grammar. need to check if these keywords work on
+       MS ilasm.
+       * NumberHelper.cs: Parse numbers as Unsigned then cast to long
+       otherwise an overflow exception is thrown. (is this a classlib bug?)
+               
 2003-05-18 Jackson Harper <jackson@latitudegeo.com>
 
-       * ILTokenizer.cs: If toen.token does not create a keyword return
+       * ILTokenizer.cs: If token.token does not create a keyword return
        the first token as an id, not a keyword ie (add.exe should return
        "ID period ID" not "ADD period ID"
                
index 514bf3afdf40d7b595807fc53fca751443c06186..3a6c1ec45033a8b93fe8c7bdbdf7be7aabd79341 100644 (file)
@@ -517,8 +517,8 @@ namespace Mono.ILASM {
                                 keywords ["nometadata"] = new ILToken (Token.K_NOMETADATA, "nometadata");\r
                                 keywords ["algorithm"] = new ILToken (Token.K_ALGORITHM, "algorithm");\r
                                 keywords ["fullorigin"] = new ILToken (Token.K_FULLORIGIN, "fullorigin");\r
-                                keywords ["nan"] = new ILToken (Token.K_NAN, "nan");\r
-                                keywords ["inf"] = new ILToken (Token.K_INF, "inf");\r
+                                // keywords ["nan"] = new ILToken (Token.K_NAN, "nan");\r
+                                // keywords ["inf"] = new ILToken (Token.K_INF, "inf");\r
                                 keywords ["publickey"] = new ILToken (Token.K_PUBLICKEY, "publickey");\r
                                 keywords ["enablejittracking"] = new ILToken (Token.K_ENABLEJITTRACKING, "enablejittracking");\r
                                 keywords ["disablejitoptimizer"] = new ILToken (Token.K_DISABLEJITOPTIMIZER, "disablejitoptimizer");\r
index 596d32df33dd71b12f29c888e60613f074ace1a9..1a753668027fb383109af8c6e46cb2db9b5ddf66 100644 (file)
@@ -178,7 +178,7 @@ namespace Mono.ILASM {
                         num = num_builder.ToString ();\r
 \r
                         try {\r
-                                long i = Int64.Parse (num, nstyles);\r
+                                long i = (long) UInt64.Parse (num, nstyles);\r
                                 if (i < Int32.MinValue || i > Int32.MaxValue) {\r
                                         result.token = Token.INT64;\r
                                         result.val = i;\r
@@ -187,11 +187,12 @@ namespace Mono.ILASM {
                                         result.val = (int) i;\r
                                 }\r
                         } catch {\r
+                                string tnum = num;\r
                                 reader.Unread (num.ToCharArray ());\r
                                 reader.RestoreLocation ();\r
                                 num = String.Empty;\r
                                 Reset ();\r
-                                throw new ILSyntaxError ("Bad hex number format! '" + num + "'");\r
+                                throw new ILSyntaxError ("Bad hex number format! '" + tnum + "'");\r
                         }\r
 \r
                         return num;\r