From 1be65e801bf5d30467ecaae3c1526d442bf09d60 Mon Sep 17 00:00:00 2001 From: Mingun Date: Sun, 26 Nov 2017 21:22:23 +0500 Subject: [PATCH] Issue #194: Regenerate parser --- lib/parser.js | 605 +++++++++++++++++++++++++------------------------- 1 file changed, 307 insertions(+), 298 deletions(-) diff --git a/lib/parser.js b/lib/parser.js index 5d7dd7f80..9a45645b1 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -51,6 +51,10 @@ peg$SyntaxError.buildMessage = function(expected, found) { other: function(expectation) { return expectation.description; + }, + + not: function(expectation) { + return "not " + describeExpectation(expectation.expected); } }; @@ -486,8 +490,7 @@ function peg$parse(input, options) { var peg$currPos = 0; var peg$savedPos = 0; var peg$posDetailsCache = [{ line: 1, column: 1 }]; - var peg$maxFailPos = 0; - var peg$maxFailExpected = []; + var peg$expected = []; var peg$silentFails = 0; var peg$result; @@ -609,15 +612,37 @@ function peg$parse(input, options) { }; } - function peg$fail(expected) { - if (peg$currPos < peg$maxFailPos) { return; } + function peg$begin() { + peg$expected.push({ pos: peg$currPos, variants: [] }); + } + + function peg$expect(expected) { + var top = peg$expected[peg$expected.length - 1]; + + if (peg$currPos < top.pos) { return; } + + if (peg$currPos > top.pos) { + top.pos = peg$currPos; + top.variants = []; + } + + top.variants.push(expected); + } + + function peg$end(invert) { + var expected = peg$expected.pop(); + var top = peg$expected[peg$expected.length - 1]; + var variants = expected.variants; - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; + if (top.pos !== expected.pos) { return; } + + if (invert) { + variants = variants.map(function(e) { + return e.type === "not" ? e.expected : { type: "not", expected: e }; + }); } - peg$maxFailExpected.push(expected); + Array.prototype.push.apply(top.variants, variants); } function peg$buildSimpleError(message, location) { @@ -633,6 +658,19 @@ function peg$parse(input, options) { ); } + function peg$buildError() { + var expected = peg$expected[0]; + var failPos = expected.pos; + + return peg$buildStructuredError( + expected.variants, + failPos < input.length ? input.charAt(failPos) : null, + failPos < input.length + ? peg$computeLocation(failPos, failPos + 1) + : peg$computeLocation(failPos, failPos) + ); + } + function peg$parseGrammar() { var s0, s1, s2, s3, s4, s5, s6; @@ -764,12 +802,12 @@ function peg$parse(input, options) { s3 = null; } if (s3 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c3); } if (input.charCodeAt(peg$currPos) === 61) { s4 = peg$c2; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c3); } } if (s4 !== peg$FAILED) { s5 = peg$parse__(); @@ -822,12 +860,12 @@ function peg$parse(input, options) { s3 = peg$currPos; s4 = peg$parse__(); if (s4 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c6); } if (input.charCodeAt(peg$currPos) === 47) { s5 = peg$c5; peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c6); } } if (s5 !== peg$FAILED) { s6 = peg$parse__(); @@ -857,12 +895,12 @@ function peg$parse(input, options) { s3 = peg$currPos; s4 = peg$parse__(); if (s4 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c6); } if (input.charCodeAt(peg$currPos) === 47) { s5 = peg$c5; peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c6); } } if (s5 !== peg$FAILED) { s6 = peg$parse__(); @@ -1005,12 +1043,12 @@ function peg$parse(input, options) { if (s1 !== peg$FAILED) { s2 = peg$parse__(); if (s2 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c11); } if (input.charCodeAt(peg$currPos) === 58) { s3 = peg$c10; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c11); } } if (s3 !== peg$FAILED) { s4 = peg$parse__(); @@ -1080,28 +1118,28 @@ function peg$parse(input, options) { function peg$parsePrefixedOperator() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c15); } if (input.charCodeAt(peg$currPos) === 36) { s0 = peg$c14; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c15); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c17); } if (input.charCodeAt(peg$currPos) === 38) { s0 = peg$c16; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c17); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c19); } if (input.charCodeAt(peg$currPos) === 33) { s0 = peg$c18; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c19); } } } } @@ -1143,28 +1181,28 @@ function peg$parse(input, options) { function peg$parseSuffixedOperator() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c22); } if (input.charCodeAt(peg$currPos) === 63) { s0 = peg$c21; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c22); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c24); } if (input.charCodeAt(peg$currPos) === 42) { s0 = peg$c23; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c24); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c26); } if (input.charCodeAt(peg$currPos) === 43) { s0 = peg$c25; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c26); } } } } @@ -1186,12 +1224,12 @@ function peg$parse(input, options) { s0 = peg$parseSemanticPredicateExpression(); if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c28); } if (input.charCodeAt(peg$currPos) === 40) { s1 = peg$c27; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c28); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -1200,12 +1238,12 @@ function peg$parse(input, options) { if (s3 !== peg$FAILED) { s4 = peg$parse__(); if (s4 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c30); } if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c29; peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c30); } } if (s5 !== peg$FAILED) { peg$savedPos = s0; @@ -1246,7 +1284,7 @@ function peg$parse(input, options) { s1 = peg$parseIdentifierName(); if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$currPos; s4 = peg$parse__(); if (s4 !== peg$FAILED) { @@ -1269,12 +1307,12 @@ function peg$parse(input, options) { s5 = null; } if (s5 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c3); } if (input.charCodeAt(peg$currPos) === 61) { s6 = peg$c2; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c3); } } if (s6 !== peg$FAILED) { s4 = [s4, s5, s6]; @@ -1291,7 +1329,7 @@ function peg$parse(input, options) { peg$currPos = s3; s3 = peg$FAILED; } - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -1344,20 +1382,20 @@ function peg$parse(input, options) { function peg$parseSemanticPredicateOperator() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c17); } if (input.charCodeAt(peg$currPos) === 38) { s0 = peg$c16; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c17); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c19); } if (input.charCodeAt(peg$currPos) === 33) { s0 = peg$c18; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c19); } } } @@ -1367,67 +1405,68 @@ function peg$parse(input, options) { function peg$parseSourceCharacter() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c34); } if (input.length > peg$currPos) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c34); } } return s0; } function peg$parseWhiteSpace() { - var s0, s1; + var s0; + if (peg$silentFails === 0) { peg$expect(peg$c35); } peg$silentFails++; + if (peg$silentFails === 0) { peg$expect(peg$c37); } if (input.charCodeAt(peg$currPos) === 9) { s0 = peg$c36; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c37); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c39); } if (input.charCodeAt(peg$currPos) === 11) { s0 = peg$c38; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c39); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c41); } if (input.charCodeAt(peg$currPos) === 12) { s0 = peg$c40; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c41); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c43); } if (input.charCodeAt(peg$currPos) === 32) { s0 = peg$c42; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c43); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c45); } if (input.charCodeAt(peg$currPos) === 160) { s0 = peg$c44; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c45); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c47); } if (input.charCodeAt(peg$currPos) === 65279) { s0 = peg$c46; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c47); } } if (s0 === peg$FAILED) { s0 = peg$parseZs(); @@ -1438,10 +1477,6 @@ function peg$parse(input, options) { } } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c35); } - } return s0; } @@ -1449,86 +1484,80 @@ function peg$parse(input, options) { function peg$parseLineTerminator() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c49); } if (peg$c48.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c49); } } return s0; } function peg$parseLineTerminatorSequence() { - var s0, s1; + var s0; + if (peg$silentFails === 0) { peg$expect(peg$c50); } peg$silentFails++; + if (peg$silentFails === 0) { peg$expect(peg$c52); } if (input.charCodeAt(peg$currPos) === 10) { s0 = peg$c51; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c52); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c54); } if (input.substr(peg$currPos, 2) === peg$c53) { s0 = peg$c53; peg$currPos += 2; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c54); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c56); } if (input.charCodeAt(peg$currPos) === 13) { s0 = peg$c55; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c56); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c58); } if (input.charCodeAt(peg$currPos) === 8232) { s0 = peg$c57; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c58); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c60); } if (input.charCodeAt(peg$currPos) === 8233) { s0 = peg$c59; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c60); } } } } } } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c50); } - } return s0; } function peg$parseComment() { - var s0, s1; + var s0; + if (peg$silentFails === 0) { peg$expect(peg$c61); } peg$silentFails++; s0 = peg$parseMultiLineComment(); if (s0 === peg$FAILED) { s0 = peg$parseSingleLineComment(); } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c61); } - } return s0; } @@ -1537,26 +1566,26 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c63); } if (input.substr(peg$currPos, 2) === peg$c62) { s1 = peg$c62; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c63); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c65); } if (input.substr(peg$currPos, 2) === peg$c64) { s5 = peg$c64; peg$currPos += 2; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c65); } } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -1580,15 +1609,15 @@ function peg$parse(input, options) { s2.push(s3); s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c65); } if (input.substr(peg$currPos, 2) === peg$c64) { s5 = peg$c64; peg$currPos += 2; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c65); } } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -1610,12 +1639,12 @@ function peg$parse(input, options) { } } if (s2 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c65); } if (input.substr(peg$currPos, 2) === peg$c64) { s3 = peg$c64; peg$currPos += 2; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c65); } } if (s3 !== peg$FAILED) { s1 = [s1, s2, s3]; @@ -1640,29 +1669,29 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c63); } if (input.substr(peg$currPos, 2) === peg$c62) { s1 = peg$c62; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c63); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c65); } if (input.substr(peg$currPos, 2) === peg$c64) { s5 = peg$c64; peg$currPos += 2; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c65); } } if (s5 === peg$FAILED) { s5 = peg$parseLineTerminator(); } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -1686,18 +1715,18 @@ function peg$parse(input, options) { s2.push(s3); s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c65); } if (input.substr(peg$currPos, 2) === peg$c64) { s5 = peg$c64; peg$currPos += 2; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c65); } } if (s5 === peg$FAILED) { s5 = peg$parseLineTerminator(); } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -1719,12 +1748,12 @@ function peg$parse(input, options) { } } if (s2 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c65); } if (input.substr(peg$currPos, 2) === peg$c64) { s3 = peg$c64; peg$currPos += 2; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c65); } } if (s3 !== peg$FAILED) { s1 = [s1, s2, s3]; @@ -1749,20 +1778,20 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c67); } if (input.substr(peg$currPos, 2) === peg$c66) { s1 = peg$c66; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c67); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); s5 = peg$parseLineTerminator(); - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -1786,9 +1815,9 @@ function peg$parse(input, options) { s2.push(s3); s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); s5 = peg$parseLineTerminator(); - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -1829,9 +1858,9 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; - peg$silentFails++; + peg$begin(); s2 = peg$parseReservedWord(); - peg$silentFails--; + peg$end(true); if (s2 === peg$FAILED) { s1 = undefined; } else { @@ -1858,6 +1887,7 @@ function peg$parse(input, options) { function peg$parseIdentifierName() { var s0, s1, s2, s3; + if (peg$silentFails === 0) { peg$expect(peg$c69); } peg$silentFails++; s0 = peg$currPos; s1 = peg$parseIdentifierStart(); @@ -1880,10 +1910,6 @@ function peg$parse(input, options) { s0 = peg$FAILED; } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c69); } - } return s0; } @@ -1893,29 +1919,29 @@ function peg$parse(input, options) { s0 = peg$parseUnicodeLetter(); if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c15); } if (input.charCodeAt(peg$currPos) === 36) { s0 = peg$c14; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c15); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c72); } if (input.charCodeAt(peg$currPos) === 95) { s0 = peg$c71; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c72); } } if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s1 !== peg$FAILED) { s2 = peg$parseUnicodeEscapeSequence(); @@ -1948,20 +1974,20 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$parsePc(); if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c77); } if (input.charCodeAt(peg$currPos) === 8204) { s0 = peg$c76; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c79); } if (input.charCodeAt(peg$currPos) === 8205) { s0 = peg$c78; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c79); } } } } @@ -2146,16 +2172,17 @@ function peg$parse(input, options) { function peg$parseLiteralMatcher() { var s0, s1, s2; + if (peg$silentFails === 0) { peg$expect(peg$c80); } peg$silentFails++; s0 = peg$currPos; s1 = peg$parseStringLiteral(); if (s1 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c82); } if (input.charCodeAt(peg$currPos) === 105) { s2 = peg$c81; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c82); } } if (s2 === peg$FAILED) { s2 = null; @@ -2172,10 +2199,6 @@ function peg$parse(input, options) { s0 = peg$FAILED; } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c80); } - } return s0; } @@ -2183,14 +2206,15 @@ function peg$parse(input, options) { function peg$parseStringLiteral() { var s0, s1, s2, s3; + if (peg$silentFails === 0) { peg$expect(peg$c84); } peg$silentFails++; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c86); } if (input.charCodeAt(peg$currPos) === 34) { s1 = peg$c85; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } } if (s1 !== peg$FAILED) { s2 = []; @@ -2200,12 +2224,12 @@ function peg$parse(input, options) { s3 = peg$parseDoubleStringCharacter(); } if (s2 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c86); } if (input.charCodeAt(peg$currPos) === 34) { s3 = peg$c85; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; @@ -2224,12 +2248,12 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c89); } if (input.charCodeAt(peg$currPos) === 39) { s1 = peg$c88; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c89); } } if (s1 !== peg$FAILED) { s2 = []; @@ -2239,12 +2263,12 @@ function peg$parse(input, options) { s3 = peg$parseSingleStringCharacter(); } if (s2 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c89); } if (input.charCodeAt(peg$currPos) === 39) { s3 = peg$c88; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c89); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; @@ -2263,10 +2287,6 @@ function peg$parse(input, options) { } } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84); } - } return s0; } @@ -2276,27 +2296,27 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c86); } if (input.charCodeAt(peg$currPos) === 34) { s2 = peg$c85; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } } if (s2 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s2 = peg$c73; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s2 === peg$FAILED) { s2 = peg$parseLineTerminator(); } } - peg$silentFails--; + peg$end(true); if (s2 === peg$FAILED) { s1 = undefined; } else { @@ -2318,12 +2338,12 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s1 !== peg$FAILED) { s2 = peg$parseEscapeSequence(); @@ -2351,27 +2371,27 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c89); } if (input.charCodeAt(peg$currPos) === 39) { s2 = peg$c88; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c89); } } if (s2 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s2 = peg$c73; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s2 === peg$FAILED) { s2 = peg$parseLineTerminator(); } } - peg$silentFails--; + peg$end(true); if (s2 === peg$FAILED) { s1 = undefined; } else { @@ -2393,12 +2413,12 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s1 !== peg$FAILED) { s2 = peg$parseEscapeSequence(); @@ -2424,22 +2444,23 @@ function peg$parse(input, options) { function peg$parseCharacterClassMatcher() { var s0, s1, s2, s3, s4, s5; + if (peg$silentFails === 0) { peg$expect(peg$c91); } peg$silentFails++; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c93); } if (input.charCodeAt(peg$currPos) === 91) { s1 = peg$c92; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c93); } } if (s1 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c95); } if (input.charCodeAt(peg$currPos) === 94) { s2 = peg$c94; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c95); } } if (s2 === peg$FAILED) { s2 = null; @@ -2458,20 +2479,20 @@ function peg$parse(input, options) { } } if (s3 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c97); } if (input.charCodeAt(peg$currPos) === 93) { s4 = peg$c96; peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c97); } } if (s4 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c82); } if (input.charCodeAt(peg$currPos) === 105) { s5 = peg$c81; peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c82); } } if (s5 === peg$FAILED) { s5 = null; @@ -2500,10 +2521,6 @@ function peg$parse(input, options) { s0 = peg$FAILED; } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c91); } - } return s0; } @@ -2514,12 +2531,12 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parseClassCharacter(); if (s1 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c100); } if (input.charCodeAt(peg$currPos) === 45) { s2 = peg$c99; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c100); } } if (s2 !== peg$FAILED) { s3 = peg$parseClassCharacter(); @@ -2547,27 +2564,27 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c97); } if (input.charCodeAt(peg$currPos) === 93) { s2 = peg$c96; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c97); } } if (s2 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s2 = peg$c73; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s2 === peg$FAILED) { s2 = peg$parseLineTerminator(); } } - peg$silentFails--; + peg$end(true); if (s2 === peg$FAILED) { s1 = undefined; } else { @@ -2589,12 +2606,12 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s1 !== peg$FAILED) { s2 = peg$parseEscapeSequence(); @@ -2621,12 +2638,12 @@ function peg$parse(input, options) { var s0, s1, s2; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s1 !== peg$FAILED) { s2 = peg$parseLineTerminatorSequence(); @@ -2651,18 +2668,18 @@ function peg$parse(input, options) { s0 = peg$parseCharacterEscapeSequence(); if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c104); } if (input.charCodeAt(peg$currPos) === 48) { s1 = peg$c103; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c104); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseDecimalDigit(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -2705,37 +2722,37 @@ function peg$parse(input, options) { function peg$parseSingleEscapeCharacter() { var s0, s1; + if (peg$silentFails === 0) { peg$expect(peg$c89); } if (input.charCodeAt(peg$currPos) === 39) { s0 = peg$c88; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c89); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c86); } if (input.charCodeAt(peg$currPos) === 34) { s0 = peg$c85; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c74); } if (input.charCodeAt(peg$currPos) === 92) { s0 = peg$c73; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c107); } if (input.charCodeAt(peg$currPos) === 98) { s1 = peg$c106; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c107); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -2744,12 +2761,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c110); } if (input.charCodeAt(peg$currPos) === 102) { s1 = peg$c109; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c110); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -2758,12 +2775,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c113); } if (input.charCodeAt(peg$currPos) === 110) { s1 = peg$c112; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c113); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -2772,12 +2789,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c116); } if (input.charCodeAt(peg$currPos) === 114) { s1 = peg$c115; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c116); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -2786,12 +2803,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c119); } if (input.charCodeAt(peg$currPos) === 116) { s1 = peg$c118; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c119); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -2800,12 +2817,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c122); } if (input.charCodeAt(peg$currPos) === 118) { s1 = peg$c121; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c122); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -2829,12 +2846,12 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; - peg$silentFails++; + peg$begin(); s2 = peg$parseEscapeCharacter(); if (s2 === peg$FAILED) { s2 = peg$parseLineTerminator(); } - peg$silentFails--; + peg$end(true); if (s2 === peg$FAILED) { s1 = undefined; } else { @@ -2865,20 +2882,20 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$parseDecimalDigit(); if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c125); } if (input.charCodeAt(peg$currPos) === 120) { s0 = peg$c124; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c125); } } if (s0 === peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c127); } if (input.charCodeAt(peg$currPos) === 117) { s0 = peg$c126; peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c127); } } } } @@ -2891,12 +2908,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c125); } if (input.charCodeAt(peg$currPos) === 120) { s1 = peg$c124; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c125); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2939,12 +2956,12 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c127); } if (input.charCodeAt(peg$currPos) === 117) { s1 = peg$c126; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c127); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2998,12 +3015,12 @@ function peg$parse(input, options) { function peg$parseDecimalDigit() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c130); } if (peg$c129.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c130); } } return s0; @@ -3012,12 +3029,12 @@ function peg$parse(input, options) { function peg$parseHexDigit() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c132); } if (peg$c131.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c132); } } return s0; @@ -3027,12 +3044,12 @@ function peg$parse(input, options) { var s0, s1; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c134); } if (input.charCodeAt(peg$currPos) === 46) { s1 = peg$c133; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c134); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3046,24 +3063,25 @@ function peg$parse(input, options) { function peg$parseCodeBlock() { var s0, s1, s2, s3; + if (peg$silentFails === 0) { peg$expect(peg$c136); } peg$silentFails++; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c138); } if (input.charCodeAt(peg$currPos) === 123) { s1 = peg$c137; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c138); } } if (s1 !== peg$FAILED) { s2 = peg$parseCode(); if (s2 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c140); } if (input.charCodeAt(peg$currPos) === 125) { s3 = peg$c139; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c140); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; @@ -3082,12 +3100,12 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c138); } if (input.charCodeAt(peg$currPos) === 123) { s1 = peg$c137; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c138); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3096,10 +3114,6 @@ function peg$parse(input, options) { s0 = s1; } peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c136); } - } return s0; } @@ -3112,15 +3126,15 @@ function peg$parse(input, options) { s2 = []; s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c144); } if (peg$c143.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c144); } } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -3145,15 +3159,15 @@ function peg$parse(input, options) { s2.push(s3); s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c144); } if (peg$c143.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c144); } } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -3179,22 +3193,22 @@ function peg$parse(input, options) { } if (s2 === peg$FAILED) { s2 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c138); } if (input.charCodeAt(peg$currPos) === 123) { s3 = peg$c137; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c138); } } if (s3 !== peg$FAILED) { s4 = peg$parseCode(); if (s4 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c140); } if (input.charCodeAt(peg$currPos) === 125) { s5 = peg$c139; peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c140); } } if (s5 !== peg$FAILED) { s3 = [s3, s4, s5]; @@ -3217,15 +3231,15 @@ function peg$parse(input, options) { s2 = []; s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c144); } if (peg$c143.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c144); } } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -3250,15 +3264,15 @@ function peg$parse(input, options) { s2.push(s3); s3 = peg$currPos; s4 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c144); } if (peg$c143.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c144); } } - peg$silentFails--; + peg$end(true); if (s5 === peg$FAILED) { s4 = undefined; } else { @@ -3284,22 +3298,22 @@ function peg$parse(input, options) { } if (s2 === peg$FAILED) { s2 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c138); } if (input.charCodeAt(peg$currPos) === 123) { s3 = peg$c137; peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c138); } } if (s3 !== peg$FAILED) { s4 = peg$parseCode(); if (s4 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c140); } if (input.charCodeAt(peg$currPos) === 125) { s5 = peg$c139; peg$currPos++; } else { s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c140); } } if (s5 !== peg$FAILED) { s3 = [s3, s4, s5]; @@ -3330,12 +3344,12 @@ function peg$parse(input, options) { function peg$parseLl() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c146); } if (peg$c145.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c146); } } return s0; @@ -3344,12 +3358,12 @@ function peg$parse(input, options) { function peg$parseLm() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c148); } if (peg$c147.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c148); } } return s0; @@ -3358,12 +3372,12 @@ function peg$parse(input, options) { function peg$parseLo() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c150); } if (peg$c149.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c150); } } return s0; @@ -3372,12 +3386,12 @@ function peg$parse(input, options) { function peg$parseLt() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c152); } if (peg$c151.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c152); } } return s0; @@ -3386,12 +3400,12 @@ function peg$parse(input, options) { function peg$parseLu() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c154); } if (peg$c153.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c154); } } return s0; @@ -3400,12 +3414,12 @@ function peg$parse(input, options) { function peg$parseMc() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c156); } if (peg$c155.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c156); } } return s0; @@ -3414,12 +3428,12 @@ function peg$parse(input, options) { function peg$parseMn() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c158); } if (peg$c157.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c158); } } return s0; @@ -3428,12 +3442,12 @@ function peg$parse(input, options) { function peg$parseNd() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c160); } if (peg$c159.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c160); } } return s0; @@ -3442,12 +3456,12 @@ function peg$parse(input, options) { function peg$parseNl() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c162); } if (peg$c161.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c162); } } return s0; @@ -3456,12 +3470,12 @@ function peg$parse(input, options) { function peg$parsePc() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c164); } if (peg$c163.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c164); } } return s0; @@ -3470,12 +3484,12 @@ function peg$parse(input, options) { function peg$parseZs() { var s0; + if (peg$silentFails === 0) { peg$expect(peg$c166); } if (peg$c165.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c166); } } return s0; @@ -3485,18 +3499,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c168); } if (input.substr(peg$currPos, 5) === peg$c167) { s1 = peg$c167; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c168); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3522,18 +3536,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c170); } if (input.substr(peg$currPos, 4) === peg$c169) { s1 = peg$c169; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c170); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3559,18 +3573,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c172); } if (input.substr(peg$currPos, 5) === peg$c171) { s1 = peg$c171; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c172); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3596,18 +3610,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c174); } if (input.substr(peg$currPos, 5) === peg$c173) { s1 = peg$c173; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c174); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3633,18 +3647,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c176); } if (input.substr(peg$currPos, 5) === peg$c175) { s1 = peg$c175; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c176); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3670,18 +3684,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c178); } if (input.substr(peg$currPos, 8) === peg$c177) { s1 = peg$c177; peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c178); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3707,18 +3721,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c180); } if (input.substr(peg$currPos, 8) === peg$c179) { s1 = peg$c179; peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c180); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3744,18 +3758,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c182); } if (input.substr(peg$currPos, 7) === peg$c181) { s1 = peg$c181; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c182); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3781,18 +3795,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c184); } if (input.substr(peg$currPos, 6) === peg$c183) { s1 = peg$c183; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c184); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3818,18 +3832,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c186); } if (input.substr(peg$currPos, 2) === peg$c185) { s1 = peg$c185; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c186); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3855,18 +3869,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c188); } if (input.substr(peg$currPos, 4) === peg$c187) { s1 = peg$c187; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c188); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3892,18 +3906,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c190); } if (input.substr(peg$currPos, 4) === peg$c189) { s1 = peg$c189; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c190); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3929,18 +3943,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c192); } if (input.substr(peg$currPos, 6) === peg$c191) { s1 = peg$c191; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c192); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -3966,18 +3980,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c194); } if (input.substr(peg$currPos, 7) === peg$c193) { s1 = peg$c193; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c194); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4003,18 +4017,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c196); } if (input.substr(peg$currPos, 5) === peg$c195) { s1 = peg$c195; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c196); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4040,18 +4054,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c198); } if (input.substr(peg$currPos, 7) === peg$c197) { s1 = peg$c197; peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c198); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4077,18 +4091,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c200); } if (input.substr(peg$currPos, 3) === peg$c199) { s1 = peg$c199; peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c200); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4114,18 +4128,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c202); } if (input.substr(peg$currPos, 8) === peg$c201) { s1 = peg$c201; peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c202); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4151,18 +4165,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c204); } if (input.substr(peg$currPos, 2) === peg$c203) { s1 = peg$c203; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c204); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4188,18 +4202,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c206); } if (input.substr(peg$currPos, 6) === peg$c205) { s1 = peg$c205; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c206); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4225,18 +4239,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c208); } if (input.substr(peg$currPos, 10) === peg$c207) { s1 = peg$c207; peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c208); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4262,18 +4276,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c210); } if (input.substr(peg$currPos, 2) === peg$c209) { s1 = peg$c209; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c210); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4299,18 +4313,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c212); } if (input.substr(peg$currPos, 3) === peg$c211) { s1 = peg$c211; peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c212); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4336,18 +4350,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c214); } if (input.substr(peg$currPos, 4) === peg$c213) { s1 = peg$c213; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c214); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4373,18 +4387,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c216); } if (input.substr(peg$currPos, 6) === peg$c215) { s1 = peg$c215; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c216); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4410,18 +4424,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c218); } if (input.substr(peg$currPos, 5) === peg$c217) { s1 = peg$c217; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c218); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4447,18 +4461,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c220); } if (input.substr(peg$currPos, 6) === peg$c219) { s1 = peg$c219; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c220); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4484,18 +4498,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c222); } if (input.substr(peg$currPos, 4) === peg$c221) { s1 = peg$c221; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c222); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4521,18 +4535,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c224); } if (input.substr(peg$currPos, 5) === peg$c223) { s1 = peg$c223; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c224); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4558,18 +4572,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c226); } if (input.substr(peg$currPos, 4) === peg$c225) { s1 = peg$c225; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c226); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4595,18 +4609,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c228); } if (input.substr(peg$currPos, 3) === peg$c227) { s1 = peg$c227; peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c228); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4632,18 +4646,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c230); } if (input.substr(peg$currPos, 6) === peg$c229) { s1 = peg$c229; peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c230); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4669,18 +4683,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c232); } if (input.substr(peg$currPos, 3) === peg$c231) { s1 = peg$c231; peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c232); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4706,18 +4720,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c234); } if (input.substr(peg$currPos, 4) === peg$c233) { s1 = peg$c233; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c234); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4743,18 +4757,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c236); } if (input.substr(peg$currPos, 5) === peg$c235) { s1 = peg$c235; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c236); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4780,18 +4794,18 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; + if (peg$silentFails === 0) { peg$expect(peg$c238); } if (input.substr(peg$currPos, 4) === peg$c237) { s1 = peg$c237; peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c238); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; - peg$silentFails++; + peg$begin(); s3 = peg$parseIdentifierPart(); - peg$silentFails--; + peg$end(true); if (s3 === peg$FAILED) { s2 = undefined; } else { @@ -4863,12 +4877,12 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse__(); if (s1 !== peg$FAILED) { + if (peg$silentFails === 0) { peg$expect(peg$c240); } if (input.charCodeAt(peg$currPos) === 59) { s2 = peg$c239; peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c240); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -4932,15 +4946,15 @@ function peg$parse(input, options) { var s0, s1; s0 = peg$currPos; - peg$silentFails++; + peg$begin(); + if (peg$silentFails === 0) { peg$expect(peg$c34); } if (input.length > peg$currPos) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c34); } } - peg$silentFails--; + peg$end(true); if (s1 === peg$FAILED) { s0 = undefined; } else { @@ -4982,22 +4996,17 @@ function peg$parse(input, options) { } + peg$begin(); peg$result = peg$startRuleFunction(); if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail(peg$endExpectation()); + peg$expect(peg$endExpectation()); } - throw peg$buildStructuredError( - peg$maxFailExpected, - peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, - peg$maxFailPos < input.length - ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) - : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) - ); + throw peg$buildError(); } }