/** * Consumes char at current position. If char is different, throws the exception. */ protected void consume(final char c) { if (input[ndx] != c) { syntaxError("Invalid char: expected " + c); } ndx++; }
syntaxError("Invalid escape char: " + c);
syntaxError("End of JSON"); return null; syntaxError("Trailing chars"); return null;
syntaxError("Trailing comma"); case ']': ndx++; break mainloop; case ',': ndx++; koma = true; break; default: syntaxError("Invalid char: expected ] or ,");
syntaxError("Trailing comma"); case '}': ndx++; break mainloop; case ',': ndx++; koma = true; break; default: syntaxError("Invalid char: expected } or ,");
syntaxError("Invalid char: " + input[ndx]); return null;