Fixed ulong constant not being accepted with an unchecked cast to long.
Fixed the argument passed to Substring. Java expects a position but C# expects a length.
This commit is contained in:
@@ -1770,7 +1770,7 @@ public class CSJavaFiles
|
||||
ostr.println(" default:");
|
||||
ostr.println(" if ((ch = str[i]) < 0x20 || ch > 0x7e) {");
|
||||
ostr.println(" String s = \"0000\" + ((int)ch).ToString(\"X\");");
|
||||
ostr.println(" retval.Append(\"\\\\u\" + s.Substring(s.Length - 4, s.Length));");
|
||||
ostr.println(" retval.Append(\"\\\\u\" + s.Substring(s.Length - 4, 4));");
|
||||
ostr.println(" } else {");
|
||||
ostr.println(" retval.Append(ch);");
|
||||
ostr.println(" }");
|
||||
|
||||
@@ -666,7 +666,7 @@ public class LexGen extends CSJavaCCGlobals implements CSJavaCCParserConstants{
|
||||
ostr.print("static long[] jjtoToken = {");
|
||||
for (i = 0; i < maxOrdinal / 64 + 1; i++){
|
||||
if (i % 4 == 0)ostr.print("\n ");
|
||||
ostr.print("0x" + Long.toHexString(toToken[i]) + "L, ");
|
||||
ostr.print("unchecked((long)0x" + Long.toHexString(toToken[i]) + "L), ");
|
||||
}
|
||||
ostr.println("\n};");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user