diff -r 795b040ac8f2 -r 5ab1cb07a530 rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java Thu Nov 27 20:23:35 2014 +0100 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java Sun Nov 30 16:21:27 2014 +0100 @@ -263,7 +263,9 @@ if (emul == null) { throw new IOException("Can't find " + resource); } + append("\n// resource from ").append(resource).append("\n"); readResource(emul, this); + append("\n"); } private static void readResource(InputStream emul, Appendable out) throws IOException { @@ -277,35 +279,7 @@ if (ch < 0 || ch > 255) { throw new IOException("Invalid char in emulation " + ch); } - switch (state) { - case 0: - if (ch == '/') { - state = 1; - } else { - out.append((char)ch); - } - break; - case 1: - if (ch == '*') { - state = 2; - } else { - out.append('/').append((char)ch); - state = 0; - } - break; - case 2: - if (ch == '*') { - state = 3; - } - break; - case 3: - if (ch == '/') { - state = 0; - } else { - state = 2; - } - break; - } + out.append((char)ch); } } finally { emul.close();