+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"
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
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
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