@cjeffery The method deEscape in the ch3 token.java class that we implement causes an infinite loop and the jvm runs out of memory. The issue is that the while loop checks sin.length but never updates it unless it goes into the if(c=='\\'). You may have been thinking that you would use the int i variable as a counter because it's never used.
I think there should be a sin = sin.substring(1); after the sout.append(c);.
That's what I put it and it fixed the issue.
Also which version of java are you using that has a static String.substring method? I am assuming it's meant to call sin.substring(...).
@cjeffery The method deEscape in the ch3 token.java class that we implement causes an infinite loop and the jvm runs out of memory. The issue is that the while loop checks
sin.length
but never updates it unless it goes into theif(c=='\\')
. You may have been thinking that you would use theint i
variable as a counter because it's never used.I think there should be a
sin = sin.substring(1);
after thesout.append(c);
.That's what I put it and it fixed the issue.
Also which version of java are you using that has a static
String.substring
method? I am assuming it's meant to callsin.substring(...)
.