From db373254f918ef75062698757e6cd6e13e26289f Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 18 May 2014 17:53:00 +0200 Subject: Format code (100 chars line) --- src/org/json/simple/JSONArray.java | 3 +- src/org/json/simple/JSONObject.java | 3 +- src/org/json/simple/JSONValue.java | 4 +- src/org/json/simple/parser/JSONParser.java | 39 ++++++++++----- src/org/json/simple/parser/ParseException.java | 9 ++-- src/org/json/simple/parser/Yylex.java | 68 +++++++++++++++++++++----- 6 files changed, 95 insertions(+), 31 deletions(-) (limited to 'src/org') diff --git a/src/org/json/simple/JSONArray.java b/src/org/json/simple/JSONArray.java index e2c7042..a71a221 100644 --- a/src/org/json/simple/JSONArray.java +++ b/src/org/json/simple/JSONArray.java @@ -49,7 +49,8 @@ public class JSONArray extends ArrayList implements JSONAware, JSONStrea * @param collection * @param out */ - public static void writeJSONString(final Collection collection, final Writer out) throws IOException { + public static void writeJSONString(final Collection collection, final Writer out) + throws IOException { if (collection == null) { out.write("null"); return; diff --git a/src/org/json/simple/JSONObject.java b/src/org/json/simple/JSONObject.java index 55eeeb6..ee6bf0a 100644 --- a/src/org/json/simple/JSONObject.java +++ b/src/org/json/simple/JSONObject.java @@ -19,7 +19,8 @@ import rejava.io.Writer; * @author FangYidong */ @SuppressWarnings("rawtypes") -public class JSONObject extends HashMap implements Map, JSONAware, JSONStreamAware { +public class JSONObject extends HashMap implements Map, JSONAware, + JSONStreamAware { private static final long serialVersionUID = -503443796854799292L; diff --git a/src/org/json/simple/JSONValue.java b/src/org/json/simple/JSONValue.java index 3d42315..47a1abe 100644 --- a/src/org/json/simple/JSONValue.java +++ b/src/org/json/simple/JSONValue.java @@ -300,7 +300,9 @@ public class JSONValue { break; default: // Reference: http://www.unicode.org/versions/Unicode5.1.0/ - if (((ch >= '\u0000') && (ch <= '\u001F')) || ((ch >= '\u007F') && (ch <= '\u009F')) || ((ch >= '\u2000') && (ch <= '\u20FF'))) { + if (((ch >= '\u0000') && (ch <= '\u001F')) + || ((ch >= '\u007F') && (ch <= '\u009F')) + || ((ch >= '\u2000') && (ch <= '\u20FF'))) { final String ss = Integer.toHexString(ch); sb.append("\\u"); for (int k = 0; k < (4 - ss.length()); k++) { diff --git a/src/org/json/simple/parser/JSONParser.java b/src/org/json/simple/parser/JSONParser.java index 4874eea..85472bb 100644 --- a/src/org/json/simple/parser/JSONParser.java +++ b/src/org/json/simple/parser/JSONParser.java @@ -78,7 +78,8 @@ public class JSONParser { return this.parse(s, (ContainerFactory) null); } - public Object parse(final String s, final ContainerFactory containerFactory) throws ParseException { + public Object parse(final String s, final ContainerFactory containerFactory) + throws ParseException { final StringReader in = new StringReader(s); try { return this.parse(in, containerFactory); @@ -109,7 +110,8 @@ public class JSONParser { * @throws ParseException */ @SuppressWarnings({ "rawtypes", "unchecked" }) - public Object parse(final Reader in, final ContainerFactory containerFactory) throws IOException, ParseException { + public Object parse(final Reader in, final ContainerFactory containerFactory) + throws IOException, ParseException { this.reset(in); final LinkedList statusStack = new LinkedList(); final LinkedList valueStack = new LinkedList(); @@ -144,7 +146,8 @@ public class JSONParser { if (this.token.type == Yytoken.TYPE_EOF) { return valueStack.removeFirst(); } else { - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), + ParseException.ERROR_UNEXPECTED_TOKEN, this.token); } case S_IN_OBJECT: @@ -250,17 +253,20 @@ public class JSONParser { }// inner switch break; case S_IN_ERROR: - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), + ParseException.ERROR_UNEXPECTED_TOKEN, this.token); }// switch if (this.status == JSONParser.S_IN_ERROR) { - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), + ParseException.ERROR_UNEXPECTED_TOKEN, this.token); } } while (this.token.type != Yytoken.TYPE_EOF); } catch (final IOException ie) { throw ie; } - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, + this.token); } private void nextToken() throws ParseException, IOException { @@ -298,7 +304,8 @@ public class JSONParser { this.parse(s, contentHandler, false); } - public void parse(final String s, final ContentHandler contentHandler, final boolean isResume) throws ParseException { + public void parse(final String s, final ContentHandler contentHandler, final boolean isResume) + throws ParseException { final StringReader in = new StringReader(s); try { this.parse(in, contentHandler, isResume); @@ -310,7 +317,8 @@ public class JSONParser { } } - public void parse(final Reader in, final ContentHandler contentHandler) throws IOException, ParseException { + public void parse(final Reader in, final ContentHandler contentHandler) throws IOException, + ParseException { this.parse(in, contentHandler, false); } @@ -331,7 +339,8 @@ public class JSONParser { * @throws ParseException */ @SuppressWarnings({ "unchecked", "rawtypes" }) - public void parse(final Reader in, final ContentHandler contentHandler, boolean isResume) throws IOException, ParseException { + public void parse(final Reader in, final ContentHandler contentHandler, boolean isResume) + throws IOException, ParseException { if (!isResume) { this.reset(in); this.handlerStatusStack = new LinkedList<>(); @@ -386,7 +395,8 @@ public class JSONParser { return; } else { this.status = JSONParser.S_IN_ERROR; - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), + ParseException.ERROR_UNEXPECTED_TOKEN, this.token); } case S_IN_OBJECT: @@ -518,10 +528,12 @@ public class JSONParser { return; case S_IN_ERROR: - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), + ParseException.ERROR_UNEXPECTED_TOKEN, this.token); }// switch if (this.status == JSONParser.S_IN_ERROR) { - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), + ParseException.ERROR_UNEXPECTED_TOKEN, this.token); } } while (this.token.type != Yytoken.TYPE_EOF); } catch (final IOException ie) { @@ -539,6 +551,7 @@ public class JSONParser { } this.status = JSONParser.S_IN_ERROR; - throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, this.token); + throw new ParseException(this.getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, + this.token); } } diff --git a/src/org/json/simple/parser/ParseException.java b/src/org/json/simple/parser/ParseException.java index df1b1d1..6bd8d8c 100644 --- a/src/org/json/simple/parser/ParseException.java +++ b/src/org/json/simple/parser/ParseException.java @@ -75,13 +75,16 @@ public class ParseException extends Exception { switch (this.errorType) { case ERROR_UNEXPECTED_CHAR: - sb.append("Unexpected character (").append(this.unexpectedObject).append(") at position ").append(this.position).append("."); + sb.append("Unexpected character (").append(this.unexpectedObject).append( + ") at position ").append(this.position).append("."); break; case ERROR_UNEXPECTED_TOKEN: - sb.append("Unexpected token ").append(this.unexpectedObject).append(" at position ").append(this.position).append("."); + sb.append("Unexpected token ").append(this.unexpectedObject).append(" at position ") + .append(this.position).append("."); break; case ERROR_UNEXPECTED_EXCEPTION: - sb.append("Unexpected exception at position ").append(this.position).append(": ").append(this.unexpectedObject); + sb.append("Unexpected exception at position ").append(this.position).append(": ") + .append(this.unexpectedObject); break; default: sb.append("Unkown error at position ").append(this.position).append("."); diff --git a/src/org/json/simple/parser/Yylex.java b/src/org/json/simple/parser/Yylex.java index 10049c4..c1cf09d 100644 --- a/src/org/json/simple/parser/Yylex.java +++ b/src/org/json/simple/parser/Yylex.java @@ -24,7 +24,10 @@ class Yylex { /** * Translates characters to character classes */ - private static final String ZZ_CMAP_PACKED = "\11\0\1\7\1\7\2\0\1\7\22\0\1\7\1\0\1\11\10\0" + "\1\6\1\31\1\2\1\4\1\12\12\3\1\32\6\0\4\1\1\5" + "\1\1\24\0\1\27\1\10\1\30\3\0\1\22\1\13\2\1\1\21" + "\1\14\5\0\1\23\1\0\1\15\3\0\1\16\1\24\1\17\1\20" + "\5\0\1\25\1\0\1\26\uff82\0"; + private static final String ZZ_CMAP_PACKED = "\11\0\1\7\1\7\2\0\1\7\22\0\1\7\1\0\1\11\10\0" + + "\1\6\1\31\1\2\1\4\1\12\12\3\1\32\6\0\4\1\1\5" + + "\1\1\24\0\1\27\1\10\1\30\3\0\1\22\1\13\2\1\1\21" + + "\1\14\5\0\1\23\1\0\1\15\3\0\1\16\1\24\1\17\1\20" + "\5\0\1\25\1\0\1\26\uff82\0"; /** * Translates characters to character classes @@ -36,7 +39,9 @@ class Yylex { */ private static final int[] ZZ_ACTION = Yylex.zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = "\2\0\2\1\1\2\1\3\1\4\3\1\1\5\1\6" + "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\5\0" + "\1\14\1\16\1\17\1\20\1\21\1\22\1\23\1\24" + "\1\0\1\25\1\0\1\25\4\0\1\26\1\27\2\0" + "\1\30"; + private static final String ZZ_ACTION_PACKED_0 = "\2\0\2\1\1\2\1\3\1\4\3\1\1\5\1\6" + + "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\5\0" + "\1\14\1\16\1\17\1\20\1\21\1\22\1\23\1\24" + + "\1\0\1\25\1\0\1\25\4\0\1\26\1\27\2\0" + "\1\30"; private static int[] zzUnpackAction() { final int[] result = new int[45]; @@ -64,7 +69,12 @@ class Yylex { */ private static final int[] ZZ_ROWMAP = Yylex.zzUnpackRowMap(); - private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\33\0\66\0\121\0\154\0\207\0\66\0\242" + "\0\275\0\330\0\66\0\66\0\66\0\66\0\66\0\66" + "\0\363\0\u010e\0\66\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195" + "\0\66\0\66\0\66\0\66\0\66\0\66\0\66\0\66" + "\0\u01b0\0\u01cb\0\u01e6\0\u01e6\0\u0201\0\u021c\0\u0237\0\u0252" + "\0\66\0\66\0\u026d\0\u0288\0\66"; + private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\33\0\66\0\121\0\154\0\207\0\66\0\242" + + "\0\275\0\330\0\66\0\66\0\66\0\66\0\66\0\66" + + "\0\363\0\u010e\0\66\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195" + + "\0\66\0\66\0\66\0\66\0\66\0\66\0\66\0\66" + + "\0\u01b0\0\u01cb\0\u01e6\0\u01e6\0\u0201\0\u021c\0\u0237\0\u0252" + + "\0\66\0\66\0\u026d\0\u0288\0\66"; private static int[] zzUnpackRowMap() { final int[] result = new int[45]; @@ -87,9 +97,37 @@ class Yylex { /** * The transition table of the DFA */ - private static final int ZZ_TRANS[] = { 2, 2, 3, 4, 2, 2, 2, 5, 2, 6, 2, 2, 7, 8, 2, 9, 2, 2, 2, 2, 2, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, - 16, 16, 16, 16, 16, 16, 16, -1, -1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, 35, -1, -1, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, 39, -1, 39, -1, -1, -1, -1, -1, 39, 39, -1, -1, -1, -1, 39, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, 42, -1, 42, -1, -1, -1, -1, -1, 42, 42, -1, -1, -1, -1, 42, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, 43, -1, 43, -1, -1, -1, -1, -1, 43, 43, -1, -1, -1, -1, 43, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, 44, -1, 44, -1, -1, -1, -1, -1, 44, 44, -1, -1, -1, -1, 44, 44, -1, -1, -1, -1, -1, -1, -1, -1, }; + private static final int ZZ_TRANS[] = { 2, 2, 3, 4, 2, 2, 2, 5, 2, 6, 2, 2, 7, 8, 2, 9, 2, 2, + 2, 2, 2, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 4, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 16, 16, 16, 16, 16, 16, 16, 16, -1, -1, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, 24, 25, 26, 27, + 28, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 34, 35, -1, -1, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, 39, + -1, 39, -1, -1, -1, -1, -1, 39, 39, -1, -1, -1, -1, 39, 39, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 33, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 42, -1, 42, -1, 42, -1, -1, -1, -1, -1, 42, 42, -1, -1, -1, -1, 42, + 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, 43, -1, 43, -1, -1, -1, -1, -1, 43, 43, + -1, -1, -1, -1, 43, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, 44, -1, 44, -1, -1, + -1, -1, -1, 44, 44, -1, -1, -1, -1, 44, 44, -1, -1, -1, -1, -1, -1, -1, -1, }; /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; @@ -97,14 +135,16 @@ class Yylex { private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; + private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", + "Error: could not match input", "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state aState */ private static final int[] ZZ_ATTRIBUTE = Yylex.zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 = "\2\0\1\11\3\1\1\11\3\1\6\11\2\1\1\11" + "\5\0\10\11\1\0\1\1\1\0\1\1\4\0\2\11" + "\2\0\1\11"; + private static final String ZZ_ATTRIBUTE_PACKED_0 = "\2\0\1\11\3\1\1\11\3\1\6\11\2\1\1\11" + + "\5\0\10\11\1\0\1\1\1\0\1\1\4\0\2\11" + "\2\0\1\11"; private static int[] zzUnpackAttribute() { final int[] result = new int[45]; @@ -239,7 +279,8 @@ class Yylex { /* first: make room (if you can) */ if (this.zzStartRead > 0) { - System.arraycopy(this.zzBuffer, this.zzStartRead, this.zzBuffer, 0, this.zzEndRead - this.zzStartRead); + System.arraycopy(this.zzBuffer, this.zzStartRead, this.zzBuffer, 0, this.zzEndRead + - this.zzStartRead); /* translate stored positions */ this.zzEndRead -= this.zzStartRead; @@ -257,7 +298,8 @@ class Yylex { } /* finally: fill the buffer with new input */ - final int numRead = this.zzReader.read(this.zzBuffer, this.zzEndRead, this.zzBuffer.length - this.zzEndRead); + final int numRead = this.zzReader.read(this.zzBuffer, this.zzEndRead, this.zzBuffer.length + - this.zzEndRead); if (numRead > 0) { this.zzEndRead += numRead; @@ -532,7 +574,8 @@ class Yylex { case 33: break; case 1: { - throw new ParseException(this.yychar, ParseException.ERROR_UNEXPECTED_CHAR, new Character(this.yycharat(0))); + throw new ParseException(this.yychar, ParseException.ERROR_UNEXPECTED_CHAR, + new Character(this.yycharat(0))); } case 34: break; @@ -576,7 +619,8 @@ class Yylex { final int ch = Integer.parseInt(this.yytext().substring(2), 16); this.sb.append((char) ch); } catch (final Exception e) { - throw new ParseException(this.yychar, ParseException.ERROR_UNEXPECTED_EXCEPTION, e); + throw new ParseException(this.yychar, + ParseException.ERROR_UNEXPECTED_EXCEPTION, e); } } case 42: -- cgit v1.2.3