Last active
March 3, 2017 17:08
-
-
Save tjvr/e2acb8182a4cf378c96fe3117043a4cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 71 functions generated | |
| // 37747 bytes | |
| (function(ctx) { | |
| return (function(lex) { | |
| function error(id) { | |
| throw new Error(id); | |
| } | |
| function g0() { | |
| switch (GOTO) { | |
| case "[": | |
| STACK.push(g15) | |
| NODES.push(DATA) | |
| CONT = g15 | |
| break | |
| case "{": | |
| STACK.push(g14) | |
| NODES.push(DATA) | |
| CONT = g14 | |
| break | |
| case "NUMBER": | |
| STACK.push(g13) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function number(x) { | |
| return +x.value | |
| })(c0) | |
| GOTO = "JSONNumber" | |
| STACK.push(g6) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g13 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g12) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| STACK.push(g5) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g12 | |
| } | |
| break | |
| case "FALSE": | |
| STACK.push(g11) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => false)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| STACK.push(g4) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g11 | |
| } | |
| break | |
| case "TRUE": | |
| STACK.push(g10) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => true)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| STACK.push(g4) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g10 | |
| } | |
| break | |
| case "NULL": | |
| STACK.push(g9) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => null)(c0) | |
| GOTO = "JSONNullLiteral" | |
| STACK.push(g3) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g9 | |
| } | |
| break | |
| case "JSONArray": | |
| STACK.push(g8) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g8 | |
| } | |
| break | |
| case "JSONObject": | |
| STACK.push(g7) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g7 | |
| } | |
| break | |
| case "JSONNumber": | |
| STACK.push(g6) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g6 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g5) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g5 | |
| } | |
| break | |
| case "JSONBooleanLiteral": | |
| STACK.push(g4) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g4 | |
| } | |
| break | |
| case "JSONNullLiteral": | |
| STACK.push(g3) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g3 | |
| } | |
| break | |
| case "JSONValue": | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g2 | |
| } | |
| break | |
| case "JSONText": | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| return null | |
| } else { | |
| CONT = g1 | |
| } | |
| break | |
| default: | |
| error("g0") | |
| } | |
| } | |
| function i0() { | |
| CONT = g0 | |
| } | |
| function g1() { | |
| error("g1") | |
| } | |
| function g2() { | |
| error("g2") | |
| } | |
| function g3() { | |
| error("g3") | |
| } | |
| function g4() { | |
| error("g4") | |
| } | |
| function g5() { | |
| error("g5") | |
| } | |
| function g6() { | |
| error("g6") | |
| } | |
| function g7() { | |
| error("g7") | |
| } | |
| function g8() { | |
| error("g8") | |
| } | |
| function g9() { | |
| error("g9") | |
| } | |
| function g10() { | |
| error("g10") | |
| } | |
| function g11() { | |
| error("g11") | |
| } | |
| function g12() { | |
| error("g12") | |
| } | |
| function g13() { | |
| error("g13") | |
| } | |
| function g14() { | |
| switch (GOTO) { | |
| case "STRING": | |
| STACK.push(g20) | |
| NODES.push(DATA) | |
| if (VAL === ":") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| } else { | |
| CONT = g20 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g19) | |
| NODES.push(DATA) | |
| CONT = g19 | |
| break | |
| case "JSONMember": | |
| STACK.push(g18) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (item => ({ | |
| [item.key]: item.value | |
| }))(c0) | |
| GOTO = "JSONMemberList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g18 | |
| } | |
| break | |
| case "JSONMemberList": | |
| STACK.push(g17) | |
| NODES.push(DATA) | |
| CONT = g17 | |
| break | |
| case "}": | |
| STACK.push(g16) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| STACK.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => ({}))(c0, c1) | |
| GOTO = "JSONObject" | |
| STACK.push(g7) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g16 | |
| } | |
| break | |
| default: | |
| error("g14") | |
| } | |
| } | |
| function g15() { | |
| switch (GOTO) { | |
| case "[": | |
| STACK.push(g36) | |
| NODES.push(DATA) | |
| CONT = g36 | |
| break | |
| case "{": | |
| STACK.push(g35) | |
| NODES.push(DATA) | |
| CONT = g35 | |
| break | |
| case "NUMBER": | |
| STACK.push(g34) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function number(x) { | |
| return +x.value | |
| })(c0) | |
| GOTO = "JSONNumber" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g34 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g33) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g33 | |
| } | |
| break | |
| case "FALSE": | |
| STACK.push(g32) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => false)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g32 | |
| } | |
| break | |
| case "TRUE": | |
| STACK.push(g31) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => true)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g31 | |
| } | |
| break | |
| case "NULL": | |
| STACK.push(g30) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => null)(c0) | |
| GOTO = "JSONNullLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g30 | |
| } | |
| break | |
| case "JSONArray": | |
| STACK.push(g29) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g29 | |
| } | |
| break | |
| case "JSONObject": | |
| STACK.push(g28) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g28 | |
| } | |
| break | |
| case "JSONNumber": | |
| STACK.push(g27) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g27 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g26) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g26 | |
| } | |
| break | |
| case "JSONBooleanLiteral": | |
| STACK.push(g25) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g25 | |
| } | |
| break | |
| case "JSONNullLiteral": | |
| STACK.push(g24) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g24 | |
| } | |
| break | |
| case "JSONValue": | |
| STACK.push(g23) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (value => [value])(c0) | |
| GOTO = "JSONElementList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g23 | |
| } | |
| break | |
| case "JSONElementList": | |
| STACK.push(g22) | |
| NODES.push(DATA) | |
| CONT = g22 | |
| break | |
| case "]": | |
| STACK.push(g21) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| STACK.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => [])(c0, c1) | |
| GOTO = "JSONArray" | |
| STACK.push(g8) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g21 | |
| } | |
| break | |
| default: | |
| error("g15") | |
| } | |
| } | |
| function g16() { | |
| error("g16") | |
| } | |
| function g17() { | |
| switch (GOTO) { | |
| case ",": | |
| STACK.push(g38) | |
| NODES.push(DATA) | |
| CONT = g38 | |
| break | |
| case "}": | |
| STACK.push(g37) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((_, dict, _2) => dict)(c0, c1, c2) | |
| GOTO = "JSONObject" | |
| STACK.push(g7) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g37 | |
| } | |
| break | |
| default: | |
| error("g17") | |
| } | |
| } | |
| function g18() { | |
| error("g18") | |
| } | |
| function g19() { | |
| if (GOTO === ":") { | |
| STACK.push(g39) | |
| NODES.push(DATA) | |
| CONT = g39 | |
| } else { | |
| error("g19") | |
| } | |
| } | |
| function g20() { | |
| error("g20") | |
| } | |
| function g21() { | |
| error("g21") | |
| } | |
| function g22() { | |
| switch (GOTO) { | |
| case ",": | |
| STACK.push(g41) | |
| NODES.push(DATA) | |
| CONT = g41 | |
| break | |
| case "]": | |
| STACK.push(g40) | |
| NODES.push(DATA) | |
| if (VAL === "$") { | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((_, a, _2) => a)(c0, c1, c2) | |
| GOTO = "JSONArray" | |
| STACK.push(g8) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g2) | |
| NODES.push(DATA) | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONText" | |
| STACK.push(g1) | |
| NODES.push(DATA) | |
| return null | |
| } else { | |
| CONT = g40 | |
| } | |
| break | |
| default: | |
| error("g22") | |
| } | |
| } | |
| function g23() { | |
| error("g23") | |
| } | |
| function g24() { | |
| error("g24") | |
| } | |
| function g25() { | |
| error("g25") | |
| } | |
| function g26() { | |
| error("g26") | |
| } | |
| function g27() { | |
| error("g27") | |
| } | |
| function g28() { | |
| error("g28") | |
| } | |
| function g29() { | |
| error("g29") | |
| } | |
| function g30() { | |
| error("g30") | |
| } | |
| function g31() { | |
| error("g31") | |
| } | |
| function g32() { | |
| error("g32") | |
| } | |
| function g33() { | |
| error("g33") | |
| } | |
| function g34() { | |
| error("g34") | |
| } | |
| function g35() { | |
| switch (GOTO) { | |
| case "JSONMemberList": | |
| STACK.push(g43) | |
| NODES.push(DATA) | |
| CONT = g43 | |
| break | |
| case "}": | |
| STACK.push(g42) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| STACK.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => ({}))(c0, c1) | |
| GOTO = "JSONObject" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g42 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g20) | |
| NODES.push(DATA) | |
| if (VAL === ":") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| } else { | |
| CONT = g20 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g19) | |
| NODES.push(DATA) | |
| CONT = g19 | |
| break | |
| case "JSONMember": | |
| STACK.push(g18) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (item => ({ | |
| [item.key]: item.value | |
| }))(c0) | |
| GOTO = "JSONMemberList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g18 | |
| } | |
| break | |
| default: | |
| error("g35") | |
| } | |
| } | |
| function g36() { | |
| switch (GOTO) { | |
| case "JSONElementList": | |
| STACK.push(g45) | |
| NODES.push(DATA) | |
| CONT = g45 | |
| break | |
| case "]": | |
| STACK.push(g44) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| STACK.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => [])(c0, c1) | |
| GOTO = "JSONArray" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g44 | |
| } | |
| break | |
| case "[": | |
| STACK.push(g36) | |
| NODES.push(DATA) | |
| CONT = g36 | |
| break | |
| case "{": | |
| STACK.push(g35) | |
| NODES.push(DATA) | |
| CONT = g35 | |
| break | |
| case "NUMBER": | |
| STACK.push(g34) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function number(x) { | |
| return +x.value | |
| })(c0) | |
| GOTO = "JSONNumber" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g34 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g33) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g33 | |
| } | |
| break | |
| case "FALSE": | |
| STACK.push(g32) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => false)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g32 | |
| } | |
| break | |
| case "TRUE": | |
| STACK.push(g31) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => true)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g31 | |
| } | |
| break | |
| case "NULL": | |
| STACK.push(g30) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => null)(c0) | |
| GOTO = "JSONNullLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g30 | |
| } | |
| break | |
| case "JSONArray": | |
| STACK.push(g29) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g29 | |
| } | |
| break | |
| case "JSONObject": | |
| STACK.push(g28) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g28 | |
| } | |
| break | |
| case "JSONNumber": | |
| STACK.push(g27) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g27 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g26) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g26 | |
| } | |
| break | |
| case "JSONBooleanLiteral": | |
| STACK.push(g25) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g25 | |
| } | |
| break | |
| case "JSONNullLiteral": | |
| STACK.push(g24) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g24 | |
| } | |
| break | |
| case "JSONValue": | |
| STACK.push(g23) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (value => [value])(c0) | |
| GOTO = "JSONElementList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g23 | |
| } | |
| break | |
| default: | |
| error("g36") | |
| } | |
| } | |
| function g37() { | |
| error("g37") | |
| } | |
| function g38() { | |
| switch (GOTO) { | |
| case "JSONMember": | |
| STACK.push(g46) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((dict, _, item) => { | |
| dict[item.key] = item.value | |
| return dict | |
| })(c0, c1, c2) | |
| GOTO = "JSONMemberList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g46 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g20) | |
| NODES.push(DATA) | |
| if (VAL === ":") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| } else { | |
| CONT = g20 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g19) | |
| NODES.push(DATA) | |
| CONT = g19 | |
| break | |
| default: | |
| error("g38") | |
| } | |
| } | |
| function g39() { | |
| switch (GOTO) { | |
| case "[": | |
| STACK.push(g60) | |
| NODES.push(DATA) | |
| CONT = g60 | |
| break | |
| case "{": | |
| STACK.push(g59) | |
| NODES.push(DATA) | |
| CONT = g59 | |
| break | |
| case "NUMBER": | |
| STACK.push(g58) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function number(x) { | |
| return +x.value | |
| })(c0) | |
| GOTO = "JSONNumber" | |
| STACK.push(g51) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g51 | |
| } | |
| break | |
| default: | |
| CONT = g58 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g57) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| STACK.push(g50) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g50 | |
| } | |
| break | |
| default: | |
| CONT = g57 | |
| } | |
| break | |
| case "FALSE": | |
| STACK.push(g56) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => false)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| STACK.push(g49) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g49 | |
| } | |
| break | |
| default: | |
| CONT = g56 | |
| } | |
| break | |
| case "TRUE": | |
| STACK.push(g55) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => true)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| STACK.push(g49) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g49 | |
| } | |
| break | |
| default: | |
| CONT = g55 | |
| } | |
| break | |
| case "NULL": | |
| STACK.push(g54) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => null)(c0) | |
| GOTO = "JSONNullLiteral" | |
| STACK.push(g48) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g48 | |
| } | |
| break | |
| default: | |
| CONT = g54 | |
| } | |
| break | |
| case "JSONArray": | |
| STACK.push(g53) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g53 | |
| } | |
| break | |
| case "JSONObject": | |
| STACK.push(g52) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g52 | |
| } | |
| break | |
| case "JSONNumber": | |
| STACK.push(g51) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g51 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g50) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g50 | |
| } | |
| break | |
| case "JSONBooleanLiteral": | |
| STACK.push(g49) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g49 | |
| } | |
| break | |
| case "JSONNullLiteral": | |
| STACK.push(g48) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g48 | |
| } | |
| break | |
| case "JSONValue": | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| error("g39") | |
| } | |
| } | |
| function g40() { | |
| error("g40") | |
| } | |
| function g41() { | |
| switch (GOTO) { | |
| case "JSONValue": | |
| STACK.push(g61) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((array, _, value) => { | |
| array.push(value) | |
| return array | |
| })(c0, c1, c2) | |
| GOTO = "JSONElementList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g61 | |
| } | |
| break | |
| case "[": | |
| STACK.push(g36) | |
| NODES.push(DATA) | |
| CONT = g36 | |
| break | |
| case "{": | |
| STACK.push(g35) | |
| NODES.push(DATA) | |
| CONT = g35 | |
| break | |
| case "NUMBER": | |
| STACK.push(g34) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function number(x) { | |
| return +x.value | |
| })(c0) | |
| GOTO = "JSONNumber" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g34 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g33) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g33 | |
| } | |
| break | |
| case "FALSE": | |
| STACK.push(g32) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => false)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g32 | |
| } | |
| break | |
| case "TRUE": | |
| STACK.push(g31) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => true)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g31 | |
| } | |
| break | |
| case "NULL": | |
| STACK.push(g30) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => null)(c0) | |
| GOTO = "JSONNullLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g30 | |
| } | |
| break | |
| case "JSONArray": | |
| STACK.push(g29) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g29 | |
| } | |
| break | |
| case "JSONObject": | |
| STACK.push(g28) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g28 | |
| } | |
| break | |
| case "JSONNumber": | |
| STACK.push(g27) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g27 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g26) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g26 | |
| } | |
| break | |
| case "JSONBooleanLiteral": | |
| STACK.push(g25) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g25 | |
| } | |
| break | |
| case "JSONNullLiteral": | |
| STACK.push(g24) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g24 | |
| } | |
| break | |
| default: | |
| error("g41") | |
| } | |
| } | |
| function g42() { | |
| error("g42") | |
| } | |
| function g43() { | |
| switch (GOTO) { | |
| case "}": | |
| STACK.push(g62) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((_, dict, _2) => dict)(c0, c1, c2) | |
| GOTO = "JSONObject" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g62 | |
| } | |
| break | |
| case ",": | |
| STACK.push(g38) | |
| NODES.push(DATA) | |
| CONT = g38 | |
| break | |
| default: | |
| error("g43") | |
| } | |
| } | |
| function g44() { | |
| error("g44") | |
| } | |
| function g45() { | |
| switch (GOTO) { | |
| case "]": | |
| STACK.push(g63) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((_, a, _2) => a)(c0, c1, c2) | |
| GOTO = "JSONArray" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g63 | |
| } | |
| break | |
| case ",": | |
| STACK.push(g41) | |
| NODES.push(DATA) | |
| CONT = g41 | |
| break | |
| default: | |
| error("g45") | |
| } | |
| } | |
| function g46() { | |
| error("g46") | |
| } | |
| function g47() { | |
| error("g47") | |
| } | |
| function g48() { | |
| error("g48") | |
| } | |
| function g49() { | |
| error("g49") | |
| } | |
| function g50() { | |
| error("g50") | |
| } | |
| function g51() { | |
| error("g51") | |
| } | |
| function g52() { | |
| error("g52") | |
| } | |
| function g53() { | |
| error("g53") | |
| } | |
| function g54() { | |
| error("g54") | |
| } | |
| function g55() { | |
| error("g55") | |
| } | |
| function g56() { | |
| error("g56") | |
| } | |
| function g57() { | |
| error("g57") | |
| } | |
| function g58() { | |
| error("g58") | |
| } | |
| function g59() { | |
| switch (GOTO) { | |
| case "JSONMemberList": | |
| STACK.push(g65) | |
| NODES.push(DATA) | |
| CONT = g65 | |
| break | |
| case "}": | |
| STACK.push(g64) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => ({}))(c0, c1) | |
| GOTO = "JSONObject" | |
| STACK.push(g52) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g52 | |
| } | |
| break | |
| default: | |
| CONT = g64 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g20) | |
| NODES.push(DATA) | |
| if (VAL === ":") { | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| } else { | |
| CONT = g20 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g19) | |
| NODES.push(DATA) | |
| CONT = g19 | |
| break | |
| case "JSONMember": | |
| STACK.push(g18) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (item => ({ | |
| [item.key]: item.value | |
| }))(c0) | |
| GOTO = "JSONMemberList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g18 | |
| } | |
| break | |
| default: | |
| error("g59") | |
| } | |
| } | |
| function g60() { | |
| switch (GOTO) { | |
| case "JSONElementList": | |
| STACK.push(g67) | |
| NODES.push(DATA) | |
| CONT = g67 | |
| break | |
| case "]": | |
| STACK.push(g66) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => [])(c0, c1) | |
| GOTO = "JSONArray" | |
| STACK.push(g53) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g53 | |
| } | |
| break | |
| default: | |
| CONT = g66 | |
| } | |
| break | |
| case "[": | |
| STACK.push(g36) | |
| NODES.push(DATA) | |
| CONT = g36 | |
| break | |
| case "{": | |
| STACK.push(g35) | |
| NODES.push(DATA) | |
| CONT = g35 | |
| break | |
| case "NUMBER": | |
| STACK.push(g34) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function number(x) { | |
| return +x.value | |
| })(c0) | |
| GOTO = "JSONNumber" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g34 | |
| } | |
| break | |
| case "STRING": | |
| STACK.push(g33) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function string(x) { | |
| return JSON.parse(x.value) | |
| })(c0) | |
| GOTO = "JSONString" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g33 | |
| } | |
| break | |
| case "FALSE": | |
| STACK.push(g32) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => false)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g32 | |
| } | |
| break | |
| case "TRUE": | |
| STACK.push(g31) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => true)(c0) | |
| GOTO = "JSONBooleanLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g31 | |
| } | |
| break | |
| case "NULL": | |
| STACK.push(g30) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (() => null)(c0) | |
| GOTO = "JSONNullLiteral" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g30 | |
| } | |
| break | |
| case "JSONArray": | |
| STACK.push(g29) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g29 | |
| } | |
| break | |
| case "JSONObject": | |
| STACK.push(g28) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g28 | |
| } | |
| break | |
| case "JSONNumber": | |
| STACK.push(g27) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g27 | |
| } | |
| break | |
| case "JSONString": | |
| STACK.push(g26) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g26 | |
| } | |
| break | |
| case "JSONBooleanLiteral": | |
| STACK.push(g25) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g25 | |
| } | |
| break | |
| case "JSONNullLiteral": | |
| STACK.push(g24) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g24 | |
| } | |
| break | |
| case "JSONValue": | |
| STACK.push(g23) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "]": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (value => [value])(c0) | |
| GOTO = "JSONElementList" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g23 | |
| } | |
| break | |
| default: | |
| error("g60") | |
| } | |
| } | |
| function g61() { | |
| error("g61") | |
| } | |
| function g62() { | |
| error("g62") | |
| } | |
| function g63() { | |
| error("g63") | |
| } | |
| function g64() { | |
| error("g64") | |
| } | |
| function g65() { | |
| switch (GOTO) { | |
| case "}": | |
| STACK.push(g68) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((_, dict, _2) => dict)(c0, c1, c2) | |
| GOTO = "JSONObject" | |
| STACK.push(g52) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g52 | |
| } | |
| break | |
| default: | |
| CONT = g68 | |
| } | |
| break | |
| case ",": | |
| STACK.push(g38) | |
| NODES.push(DATA) | |
| CONT = g38 | |
| break | |
| default: | |
| error("g65") | |
| } | |
| } | |
| function g66() { | |
| error("g66") | |
| } | |
| function g67() { | |
| switch (GOTO) { | |
| case "]": | |
| STACK.push(g69) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((_, a, _2) => a)(c0, c1, c2) | |
| GOTO = "JSONArray" | |
| STACK.push(g53) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| var c0 = NODES.pop() | |
| DATA = (function id(x) { | |
| return x | |
| })(c0) | |
| GOTO = "JSONValue" | |
| STACK.push(g47) | |
| NODES.push(DATA) | |
| switch (VAL) { | |
| case ",": | |
| case "}": | |
| STACK.pop() | |
| STACK.pop() | |
| STACK.pop() | |
| var c2 = NODES.pop() | |
| var c1 = NODES.pop() | |
| var c0 = NODES.pop() | |
| DATA = ((key, _, value) => ({ | |
| key, | |
| value | |
| }))(c0, c1, c2) | |
| GOTO = "JSONMember" | |
| return STACK[STACK.length - 1] | |
| break | |
| default: | |
| CONT = g47 | |
| } | |
| break | |
| default: | |
| CONT = g53 | |
| } | |
| break | |
| default: | |
| CONT = g69 | |
| } | |
| break | |
| case ",": | |
| STACK.push(g41) | |
| NODES.push(DATA) | |
| CONT = g41 | |
| break | |
| default: | |
| error("g67") | |
| } | |
| } | |
| function g68() { | |
| error("g68") | |
| } | |
| function g69() { | |
| error("g69") | |
| } | |
| var TOKEN | |
| var VAL | |
| var GOTO | |
| var NODES = [] | |
| var STACK = [g0] | |
| var DATA | |
| var CONT = i0 | |
| do { | |
| TOKEN = lex() | |
| VAL = TOKEN.type | |
| var cont = CONT | |
| CONT = null | |
| while (cont) { | |
| cont = cont() | |
| } | |
| DATA = TOKEN | |
| GOTO = VAL | |
| } while (VAL !== "$") | |
| return NODES[0] | |
| }) | |
| }()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment