java/src/json/ext/Parser.java in json_pure-1.6.7 vs java/src/json/ext/Parser.java in json_pure-1.6.8

- old
+ new

@@ -164,11 +164,11 @@ this.maxNesting = opts.getInt("max_nesting", DEFAULT_MAX_NESTING); this.allowNaN = opts.getBool("allow_nan", false); this.symbolizeNames = opts.getBool("symbolize_names", false); this.quirksMode = opts.getBool("quirks_mode", false); this.createId = opts.getString("create_id", getCreateId(context)); - this.createAdditions = opts.getBool("create_additions", true); + this.createAdditions = opts.getBool("create_additions", false); this.objectClass = opts.getClass("object_class", runtime.getHash()); this.arrayClass = opts.getClass("array_class", runtime.getArray()); this.match_string = opts.getHash("match_string"); this.vSource = args[0].convertToString(); @@ -1615,18 +1615,18 @@ result = parser.arrayClass.newInstance(context, IRubyObject.NULL_ARRAY, Block.NULL_BLOCK); } -// line 1623 "Parser.java" +// line 1621 "Parser.java" { cs = JSON_array_start; } -// line 714 "Parser.rl" +// line 712 "Parser.rl" -// line 1630 "Parser.java" +// line 1628 "Parser.java" { int _klen; int _trans = 0; int _acts; int _nacts; @@ -1726,11 +1726,11 @@ { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 1734 "Parser.java" +// line 1732 "Parser.java" } } } case 2: @@ -1746,21 +1746,21 @@ case 5: } break; } } -// line 715 "Parser.rl" +// line 713 "Parser.rl" if (cs >= JSON_array_first_final) { res.update(result, p + 1); } else { throw unexpectedToken(p, pe); } } -// line 1764 "Parser.java" +// line 1762 "Parser.java" private static byte[] init__JSON_object_actions_0() { return new byte [] { 0, 1, 0, 1, 1, 1, 2 }; @@ -1879,11 +1879,11 @@ static final int JSON_object_error = 0; static final int JSON_object_en_main = 1; -// line 774 "Parser.rl" +// line 772 "Parser.rl" void parseObject(ParserResult res, int p, int pe) { int cs = EVIL; IRubyObject lastName = null; @@ -1904,18 +1904,18 @@ result = parser.objectClass.newInstance(context, IRubyObject.NULL_ARRAY, Block.NULL_BLOCK); } -// line 1912 "Parser.java" +// line 1910 "Parser.java" { cs = JSON_object_start; } -// line 798 "Parser.rl" +// line 796 "Parser.rl" -// line 1919 "Parser.java" +// line 1917 "Parser.java" { int _klen; int _trans = 0; int _acts; int _nacts; @@ -1992,11 +1992,11 @@ while ( _nacts-- > 0 ) { switch ( _JSON_object_actions[_acts++] ) { case 0: -// line 729 "Parser.rl" +// line 727 "Parser.rl" { parseValue(res, p, pe); if (res.result == null) { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} @@ -2009,11 +2009,11 @@ {p = (( res.p))-1;} } } break; case 1: -// line 744 "Parser.rl" +// line 742 "Parser.rl" { parseString(res, p, pe); if (res.result == null) { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} @@ -2029,17 +2029,17 @@ {p = (( res.p))-1;} } } break; case 2: -// line 762 "Parser.rl" +// line 760 "Parser.rl" { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 2043 "Parser.java" +// line 2041 "Parser.java" } } } case 2: @@ -2055,11 +2055,11 @@ case 5: } break; } } -// line 799 "Parser.rl" +// line 797 "Parser.rl" if (cs < JSON_object_first_final) { res.update(null, p + 1); return; } @@ -2088,11 +2088,11 @@ } res.update(returnedResult, p + 1); } -// line 2096 "Parser.java" +// line 2094 "Parser.java" private static byte[] init__JSON_actions_0() { return new byte [] { 0, 1, 0, 1, 1 }; @@ -2192,30 +2192,30 @@ static final int JSON_error = 0; static final int JSON_en_main = 1; -// line 864 "Parser.rl" +// line 862 "Parser.rl" public IRubyObject parseStrict() { int cs = EVIL; int p, pe; IRubyObject result = null; ParserResult res = new ParserResult(); -// line 2210 "Parser.java" +// line 2208 "Parser.java" { cs = JSON_start; } -// line 873 "Parser.rl" +// line 871 "Parser.rl" p = byteList.begin(); pe = p + byteList.length(); -// line 2219 "Parser.java" +// line 2217 "Parser.java" { int _klen; int _trans = 0; int _acts; int _nacts; @@ -2292,11 +2292,11 @@ while ( _nacts-- > 0 ) { switch ( _JSON_actions[_acts++] ) { case 0: -// line 836 "Parser.rl" +// line 834 "Parser.rl" { currentNesting = 1; parseObject(res, p, pe); if (res.result == null) { p--; @@ -2306,11 +2306,11 @@ {p = (( res.p))-1;} } } break; case 1: -// line 848 "Parser.rl" +// line 846 "Parser.rl" { currentNesting = 1; parseArray(res, p, pe); if (res.result == null) { p--; @@ -2319,11 +2319,11 @@ result = res.result; {p = (( res.p))-1;} } } break; -// line 2327 "Parser.java" +// line 2325 "Parser.java" } } } case 2: @@ -2339,21 +2339,21 @@ case 5: } break; } } -// line 876 "Parser.rl" +// line 874 "Parser.rl" if (cs >= JSON_first_final && p == pe) { return result; } else { throw unexpectedToken(p, pe); } } -// line 2357 "Parser.java" +// line 2355 "Parser.java" private static byte[] init__JSON_quirks_mode_actions_0() { return new byte [] { 0, 1, 0 }; @@ -2452,30 +2452,30 @@ static final int JSON_quirks_mode_error = 0; static final int JSON_quirks_mode_en_main = 1; -// line 904 "Parser.rl" +// line 902 "Parser.rl" public IRubyObject parseQuirksMode() { int cs = EVIL; int p, pe; IRubyObject result = null; ParserResult res = new ParserResult(); -// line 2470 "Parser.java" +// line 2468 "Parser.java" { cs = JSON_quirks_mode_start; } -// line 913 "Parser.rl" +// line 911 "Parser.rl" p = byteList.begin(); pe = p + byteList.length(); -// line 2479 "Parser.java" +// line 2477 "Parser.java" { int _klen; int _trans = 0; int _acts; int _nacts; @@ -2552,11 +2552,11 @@ while ( _nacts-- > 0 ) { switch ( _JSON_quirks_mode_actions[_acts++] ) { case 0: -// line 890 "Parser.rl" +// line 888 "Parser.rl" { parseValue(res, p, pe); if (res.result == null) { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} @@ -2564,11 +2564,11 @@ result = res.result; {p = (( res.p))-1;} } } break; -// line 2572 "Parser.java" +// line 2570 "Parser.java" } } } case 2: @@ -2584,10 +2584,10 @@ case 5: } break; } } -// line 916 "Parser.rl" +// line 914 "Parser.rl" if (cs >= JSON_quirks_mode_first_final && p == pe) { return result; } else { throw unexpectedToken(p, pe);