Best JavaScript code snippet using fast-check-monorepo
LogicScriptParser.generated.ts
Source:LogicScriptParser.generated.ts
1import { LogicScriptProgram } from './LogicScriptParserTypes';2// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.3.1 )3//4// https://pegjs.org/ https://github.com/metadevpro/ts-pegjs5('use strict');6export interface IFilePosition {7 offset: number;8 line: number;9 column: number;10}11export interface IFileRange {12 start: IFilePosition;13 end: IFilePosition;14}15export interface ILiteralExpectation {16 type: 'literal';17 text: string;18 ignoreCase: boolean;19}20export interface IClassParts extends Array<string | IClassParts> {}21export interface IClassExpectation {22 type: 'class';23 parts: IClassParts;24 inverted: boolean;25 ignoreCase: boolean;26}27export interface IAnyExpectation {28 type: 'any';29}30export interface IEndExpectation {31 type: 'end';32}33export interface IOtherExpectation {34 type: 'other';35 description: string;36}37export type Expectation =38 | ILiteralExpectation39 | IClassExpectation40 | IAnyExpectation41 | IEndExpectation42 | IOtherExpectation;43export class SyntaxError extends Error {44 public static buildMessage(expected: Expectation[], found: string | null) {45 function hex(ch: string): string {46 return ch.charCodeAt(0).toString(16).toUpperCase();47 }48 function literalEscape(s: string): string {49 return s50 .replace(/\\/g, '\\\\')51 .replace(/"/g, '\\"')52 .replace(/\0/g, '\\0')53 .replace(/\t/g, '\\t')54 .replace(/\n/g, '\\n')55 .replace(/\r/g, '\\r')56 .replace(/[\x00-\x0F]/g, (ch) => '\\x0' + hex(ch))57 .replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => '\\x' + hex(ch));58 }59 function classEscape(s: string): string {60 return s61 .replace(/\\/g, '\\\\')62 .replace(/\]/g, '\\]')63 .replace(/\^/g, '\\^')64 .replace(/-/g, '\\-')65 .replace(/\0/g, '\\0')66 .replace(/\t/g, '\\t')67 .replace(/\n/g, '\\n')68 .replace(/\r/g, '\\r')69 .replace(/[\x00-\x0F]/g, (ch) => '\\x0' + hex(ch))70 .replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => '\\x' + hex(ch));71 }72 function describeExpectation(expectation: Expectation) {73 switch (expectation.type) {74 case 'literal':75 return '"' + literalEscape(expectation.text) + '"';76 case 'class':77 const escapedParts = expectation.parts.map((part) => {78 return Array.isArray(part)79 ? classEscape(part[0] as string) + '-' + classEscape(part[1] as string)80 : classEscape(part);81 });82 return '[' + (expectation.inverted ? '^' : '') + escapedParts + ']';83 case 'any':84 return 'any character';85 case 'end':86 return 'end of input';87 case 'other':88 return expectation.description;89 }90 }91 function describeExpected(expected1: Expectation[]) {92 const descriptions = expected1.map(describeExpectation);93 let i: number;94 let j: number;95 descriptions.sort();96 if (descriptions.length > 0) {97 for (i = 1, j = 1; i < descriptions.length; i++) {98 if (descriptions[i - 1] !== descriptions[i]) {99 descriptions[j] = descriptions[i];100 j++;101 }102 }103 descriptions.length = j;104 }105 switch (descriptions.length) {106 case 1:107 return descriptions[0];108 case 2:109 return descriptions[0] + ' or ' + descriptions[1];110 default:111 return (112 descriptions.slice(0, -1).join(', ') + ', or ' + descriptions[descriptions.length - 1]113 );114 }115 }116 function describeFound(found1: string | null) {117 return found1 ? '"' + literalEscape(found1) + '"' : 'end of input';118 }119 return 'Expected ' + describeExpected(expected) + ' but ' + describeFound(found) + ' found.';120 }121 public message: string;122 public expected: Expectation[];123 public found: string | null;124 public location: IFileRange;125 public name: string;126 constructor(127 message: string,128 expected: Expectation[],129 found: string | null,130 location: IFileRange,131 ) {132 super();133 this.message = message;134 this.expected = expected;135 this.found = found;136 this.location = location;137 this.name = 'SyntaxError';138 if (typeof (Error as any).captureStackTrace === 'function') {139 (Error as any).captureStackTrace(this, SyntaxError);140 }141 }142}143function peg$parse(input: string, options?: IParseOptions) {144 options = options !== undefined ? options : {};145 const peg$FAILED: Readonly<any> = {};146 const peg$startRuleFunctions: { [id: string]: any } = { Program: peg$parseProgram };147 let peg$startRuleFunction: () => any = peg$parseProgram;148 const peg$c0 = peg$anyExpectation();149 const peg$c1 = function (): any {150 return text();151 };152 const peg$c2 = '\n';153 const peg$c3 = peg$literalExpectation('\n', false);154 const peg$c4 = '\r';155 const peg$c5 = peg$literalExpectation('\r', false);156 const peg$c6 = ' ';157 const peg$c7 = peg$literalExpectation(' ', false);158 const peg$c8 = '\t';159 const peg$c9 = peg$literalExpectation('\t', false);160 const peg$c10 = peg$otherExpectation('comment');161 const peg$c11 = '/*';162 const peg$c12 = peg$literalExpectation('/*', false);163 const peg$c13 = '*/';164 const peg$c14 = peg$literalExpectation('*/', false);165 const peg$c15 = function (comment: any): any {166 return {167 type: 'Comment',168 comment: comment.map((parts: any[]) => parts[1]).join(''),169 location: location(),170 };171 };172 const peg$c16 = '//';173 const peg$c17 = peg$literalExpectation('//', false);174 const peg$c18 = function (head: any, tail: any): any {175 return {176 type: 'Identifier',177 name: head + tail.join(''),178 location: location(),179 };180 };181 const peg$c19 = /^[A-Za-z_]/;182 const peg$c20 = peg$classExpectation([['A', 'Z'], ['a', 'z'], '_'], false, false);183 const peg$c21 = /^[A-Za-z0-9_.]/;184 const peg$c22 = peg$classExpectation(185 [['A', 'Z'], ['a', 'z'], ['0', '9'], '_', '.'],186 false,187 false,188 );189 const peg$c23 = 'if';190 const peg$c24 = peg$literalExpectation('if', false);191 const peg$c25 = function (): any {192 return {193 type: 'Keyword',194 keyword: 'if',195 location: location(),196 };197 };198 const peg$c26 = 'else';199 const peg$c27 = peg$literalExpectation('else', false);200 const peg$c28 = function (): any {201 return {202 type: 'Keyword',203 keyword: 'else',204 location: location(),205 };206 };207 const peg$c29 = ':';208 const peg$c30 = peg$literalExpectation(':', false);209 const peg$c31 = function (label: any): any {210 return {211 type: 'Label',212 label: label.name,213 location: location(),214 };215 };216 const peg$c32 = peg$otherExpectation('number');217 const peg$c33 = function (literal: any): any {218 return literal;219 };220 const peg$c34 = /^[0-9]/;221 const peg$c35 = peg$classExpectation([['0', '9']], false, false);222 const peg$c36 = /^[+\-]/;223 const peg$c37 = peg$classExpectation(['+', '-'], false, false);224 const peg$c38 = function (sign: any, digits: any): any {225 return { type: 'Literal', value: parseInt(text(), 10), location: location() };226 };227 const peg$c39 = '0x';228 const peg$c40 = peg$literalExpectation('0x', true);229 const peg$c41 = function (digits: any): any {230 return { type: 'Literal', value: parseInt(digits, 16), location: location() };231 };232 const peg$c42 = /^[0-9a-f]/i;233 const peg$c43 = peg$classExpectation(234 [235 ['0', '9'],236 ['a', 'f'],237 ],238 false,239 true,240 );241 const peg$c44 = peg$otherExpectation('string');242 const peg$c45 = '"';243 const peg$c46 = peg$literalExpectation('"', false);244 const peg$c47 = function (chars: any): any {245 return { type: 'Literal', value: chars.join(''), location: location() };246 };247 const peg$c48 = "'";248 const peg$c49 = peg$literalExpectation("'", false);249 const peg$c50 = function (head: any, tail: any): any {250 return {251 type: 'Literal',252 value: [253 head.value,254 ...tail.map((parts: [{ value: string }, ...string[]]) => parts[0].value),255 ].join(''),256 location: location(),257 stringLocations: [258 head.location,259 ...tail.map((parts: [{ location: any }, ...string[]]) => parts[0].location),260 ],261 };262 };263 const peg$c51 = '\\';264 const peg$c52 = peg$literalExpectation('\\', false);265 const peg$c53 = function (sequence: any): any {266 return sequence;267 };268 const peg$c54 = function (): any {269 return '';270 };271 const peg$c55 = '0';272 const peg$c56 = peg$literalExpectation('0', false);273 const peg$c57 = function (): any {274 return '\0';275 };276 const peg$c58 = 'b';277 const peg$c59 = peg$literalExpectation('b', false);278 const peg$c60 = function (): any {279 return '\b';280 };281 const peg$c61 = 'f';282 const peg$c62 = peg$literalExpectation('f', false);283 const peg$c63 = function (): any {284 return '\f';285 };286 const peg$c64 = 'n';287 const peg$c65 = peg$literalExpectation('n', false);288 const peg$c66 = function (): any {289 return '\n';290 };291 const peg$c67 = 'r';292 const peg$c68 = peg$literalExpectation('r', false);293 const peg$c69 = function (): any {294 return '\r';295 };296 const peg$c70 = 't';297 const peg$c71 = peg$literalExpectation('t', false);298 const peg$c72 = function (): any {299 return '\t';300 };301 const peg$c73 = 'v';302 const peg$c74 = peg$literalExpectation('v', false);303 const peg$c75 = function (): any {304 return '\v';305 };306 const peg$c76 = 'x';307 const peg$c77 = peg$literalExpectation('x', false);308 const peg$c78 = 'u';309 const peg$c79 = peg$literalExpectation('u', false);310 const peg$c80 = function (digits: any): any {311 return String.fromCharCode(parseInt(digits, 16));312 };313 const peg$c81 = '(';314 const peg$c82 = peg$literalExpectation('(', false);315 const peg$c83 = ')';316 const peg$c84 = peg$literalExpectation(')', false);317 const peg$c85 = ';';318 const peg$c86 = peg$literalExpectation(';', false);319 const peg$c87 = function (commandName: any, argumentList: any): any {320 return {321 type: 'CommandCall',322 commandName: commandName.name,323 argumentList: argumentList ?? [],324 location: location(),325 commandNameLocation: commandName.location,326 };327 };328 const peg$c88 = function (first: any, rest: any): any {329 if (first) {330 return [first, ...rest];331 }332 return [];333 };334 const peg$c89 = ',';335 const peg$c90 = peg$literalExpectation(',', false);336 const peg$c91 = function (argument: any): any {337 return argument;338 };339 const peg$c92 = function (testName: any, argumentList: any): any {340 return {341 type: 'TestCall',342 testName: testName.name,343 argumentList: argumentList ?? [],344 location: location(),345 testNameLocation: testName.location,346 };347 };348 const peg$c93 = '<';349 const peg$c94 = peg$literalExpectation('<', false);350 const peg$c95 = '>';351 const peg$c96 = peg$literalExpectation('>', false);352 const peg$c97 = '<=';353 const peg$c98 = peg$literalExpectation('<=', false);354 const peg$c99 = '>=';355 const peg$c100 = peg$literalExpectation('>=', false);356 const peg$c101 = '==';357 const peg$c102 = peg$literalExpectation('==', false);358 const peg$c103 = '!=';359 const peg$c104 = peg$literalExpectation('!=', false);360 const peg$c105 = function (left: any, operator: any, right: any): any {361 return {362 type: 'BooleanBinaryOperation',363 operator,364 left,365 right,366 location: location(),367 };368 };369 const peg$c106 = '&&';370 const peg$c107 = peg$literalExpectation('&&', false);371 const peg$c108 = function (first: any, remaining: any): any {372 return {373 type: 'AndExpression',374 clauses: [first, ...remaining.map((parts: any) => parts[2])],375 location: location(),376 };377 };378 const peg$c109 = '||';379 const peg$c110 = peg$literalExpectation('||', false);380 const peg$c111 = function (first: any, remaining: any): any {381 return {382 type: 'OrExpression',383 clauses: [first, ...remaining.map((parts: any) => parts[2])],384 location: location(),385 };386 };387 const peg$c112 = '!';388 const peg$c113 = peg$literalExpectation('!', false);389 const peg$c114 = function (expression: any): any {390 return {391 type: 'NotExpression',392 expression,393 location: location(),394 };395 };396 const peg$c115 = function (expression: any): any {397 return expression;398 };399 const peg$c116 = '{';400 const peg$c117 = peg$literalExpectation('{', false);401 const peg$c118 = '}';402 const peg$c119 = peg$literalExpectation('}', false);403 const peg$c120 = function (404 ifKeyword: any,405 conditions: any,406 thenStatements: any,407 elseClause: any,408 ): any {409 return {410 type: 'IfStatement',411 conditions,412 thenStatements,413 elseStatements: elseClause?.statements ?? [],414 location: location(),415 ifKeyword,416 elseKeyword: elseClause?.elseKeyword,417 };418 };419 const peg$c121 = function (elseKeyword: any, statements: any): any {420 return { elseKeyword, statements };421 };422 const peg$c122 = '#message';423 const peg$c123 = peg$literalExpectation('#message', false);424 const peg$c124 = function (): any {425 return {426 type: 'DirectiveKeyword',427 keyword: 'message',428 location: location(),429 };430 };431 const peg$c125 = function (keyword: any, number: any, message: any): any {432 return {433 type: 'MessageDirective',434 number,435 message,436 location: location(),437 keyword,438 };439 };440 const peg$c126 = '#include';441 const peg$c127 = peg$literalExpectation('#include', false);442 const peg$c128 = function (): any {443 return {444 type: 'DirectiveKeyword',445 keyword: 'include',446 location: location(),447 };448 };449 const peg$c129 = function (keyword: any, filename: any): any {450 return {451 type: 'IncludeDirective',452 filename,453 location: location(),454 keyword,455 };456 };457 const peg$c130 = '#define';458 const peg$c131 = peg$literalExpectation('#define', false);459 const peg$c132 = function (): any {460 return {461 type: 'DirectiveKeyword',462 keyword: 'define',463 location: location(),464 };465 };466 const peg$c133 = function (keyword: any, identifier: any, value: any): any {467 return {468 type: 'DefineDirective',469 identifier,470 value,471 location: location(),472 keyword,473 };474 };475 const peg$c134 = '++';476 const peg$c135 = peg$literalExpectation('++', false);477 const peg$c136 = '--';478 const peg$c137 = peg$literalExpectation('--', false);479 const peg$c138 = function (identifier: any, operation: any): any {480 return {481 type: 'UnaryOperationStatement',482 identifier,483 operation,484 location: location(),485 };486 };487 const peg$c139 = '=';488 const peg$c140 = peg$literalExpectation('=', false);489 const peg$c141 = function (assignee: any, value: any): any {490 return {491 type: 'ValueAssignmentStatement',492 assignee,493 value,494 location: location(),495 };496 };497 const peg$c142 = '+';498 const peg$c143 = peg$literalExpectation('+', false);499 const peg$c144 = '-';500 const peg$c145 = peg$literalExpectation('-', false);501 const peg$c146 = '*';502 const peg$c147 = peg$literalExpectation('*', false);503 const peg$c148 = '/';504 const peg$c149 = peg$literalExpectation('/', false);505 const peg$c150 = function (assignee: any, assignee2: any, operator: any, value: any): any {506 assignee.name === assignee2.name;507 };508 const peg$c151 = function (assignee: any, assignee2: any, operator: any, value: any): any {509 return {510 type: 'ArithmeticAssignmentStatement',511 operator,512 assignee,513 value,514 location: location(),515 };516 };517 const peg$c152 = function (assignee: any, value: any, operator: any, assignee2: any): any {518 assignee.name === assignee2.name;519 };520 const peg$c153 = function (assignee: any, value: any, operator: any, assignee2: any): any {521 return {522 type: 'ArithmeticAssignmentStatement',523 operator,524 assignee,525 value,526 location: location(),527 };528 };529 const peg$c154 = function (assignee: any, operator: any, value: any): any {530 return {531 type: 'ArithmeticAssignmentStatement',532 operator,533 assignee,534 value,535 location: location(),536 };537 };538 const peg$c155 = function (assigneePointer: any, value: any): any {539 return {540 type: 'LeftIndirectAssignmentStatement',541 assigneePointer,542 value,543 location: location(),544 };545 };546 const peg$c156 = function (assignee: any, valuePointer: any): any {547 return {548 type: 'RightIndirectAssignmentStatement',549 assignee,550 valuePointer,551 location: location(),552 };553 };554 const peg$c157 = function (statements: any): any {555 return statements.map((statement: any) => statement[1]);556 };557 let peg$currPos = 0;558 let peg$savedPos = 0;559 const peg$posDetailsCache = [{ line: 1, column: 1 }];560 let peg$maxFailPos = 0;561 let peg$maxFailExpected: Expectation[] = [];562 let peg$silentFails = 0;563 let peg$result;564 if (options.startRule !== undefined) {565 if (!(options.startRule in peg$startRuleFunctions)) {566 throw new Error('Can\'t start parsing from rule "' + options.startRule + '".');567 }568 peg$startRuleFunction = peg$startRuleFunctions[options.startRule];569 }570 function text(): string {571 return input.substring(peg$savedPos, peg$currPos);572 }573 function location(): IFileRange {574 return peg$computeLocation(peg$savedPos, peg$currPos);575 }576 function expected(description: string, location1?: IFileRange) {577 location1 =578 location1 !== undefined ? location1 : peg$computeLocation(peg$savedPos, peg$currPos);579 throw peg$buildStructuredError(580 [peg$otherExpectation(description)],581 input.substring(peg$savedPos, peg$currPos),582 location1,583 );584 }585 function error(message: string, location1?: IFileRange) {586 location1 =587 location1 !== undefined ? location1 : peg$computeLocation(peg$savedPos, peg$currPos);588 throw peg$buildSimpleError(message, location1);589 }590 function peg$literalExpectation(text1: string, ignoreCase: boolean): ILiteralExpectation {591 return { type: 'literal', text: text1, ignoreCase: ignoreCase };592 }593 function peg$classExpectation(594 parts: IClassParts,595 inverted: boolean,596 ignoreCase: boolean,597 ): IClassExpectation {598 return { type: 'class', parts: parts, inverted: inverted, ignoreCase: ignoreCase };599 }600 function peg$anyExpectation(): IAnyExpectation {601 return { type: 'any' };602 }603 function peg$endExpectation(): IEndExpectation {604 return { type: 'end' };605 }606 function peg$otherExpectation(description: string): IOtherExpectation {607 return { type: 'other', description: description };608 }609 function peg$computePosDetails(pos: number) {610 let details = peg$posDetailsCache[pos];611 let p;612 if (details) {613 return details;614 } else {615 p = pos - 1;616 while (!peg$posDetailsCache[p]) {617 p--;618 }619 details = peg$posDetailsCache[p];620 details = {621 line: details.line,622 column: details.column,623 };624 while (p < pos) {625 if (input.charCodeAt(p) === 10) {626 details.line++;627 details.column = 1;628 } else {629 details.column++;630 }631 p++;632 }633 peg$posDetailsCache[pos] = details;634 return details;635 }636 }637 function peg$computeLocation(startPos: number, endPos: number): IFileRange {638 const startPosDetails = peg$computePosDetails(startPos);639 const endPosDetails = peg$computePosDetails(endPos);640 return {641 start: {642 offset: startPos,643 line: startPosDetails.line,644 column: startPosDetails.column,645 },646 end: {647 offset: endPos,648 line: endPosDetails.line,649 column: endPosDetails.column,650 },651 };652 }653 function peg$fail(expected1: Expectation) {654 if (peg$currPos < peg$maxFailPos) {655 return;656 }657 if (peg$currPos > peg$maxFailPos) {658 peg$maxFailPos = peg$currPos;659 peg$maxFailExpected = [];660 }661 peg$maxFailExpected.push(expected1);662 }663 function peg$buildSimpleError(message: string, location1: IFileRange) {664 return new SyntaxError(message, [], '', location1);665 }666 function peg$buildStructuredError(667 expected1: Expectation[],668 found: string | null,669 location1: IFileRange,670 ) {671 return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);672 }673 function peg$parseProgram(): any {674 let s0;675 s0 = peg$parseStatementList();676 return s0;677 }678 function peg$parseSourceCharacter(): any {679 let s0, s1;680 s0 = peg$currPos;681 if (input.length > peg$currPos) {682 s1 = input.charAt(peg$currPos);683 peg$currPos++;684 } else {685 s1 = peg$FAILED;686 if (peg$silentFails === 0) {687 peg$fail(peg$c0);688 }689 }690 if (s1 !== peg$FAILED) {691 peg$savedPos = s0;692 s1 = peg$c1();693 }694 s0 = s1;695 return s0;696 }697 function peg$parseLineTerminator(): any {698 let s0;699 if (input.charCodeAt(peg$currPos) === 10) {700 s0 = peg$c2;701 peg$currPos++;702 } else {703 s0 = peg$FAILED;704 if (peg$silentFails === 0) {705 peg$fail(peg$c3);706 }707 }708 if (s0 === peg$FAILED) {709 if (input.charCodeAt(peg$currPos) === 13) {710 s0 = peg$c4;711 peg$currPos++;712 } else {713 s0 = peg$FAILED;714 if (peg$silentFails === 0) {715 peg$fail(peg$c5);716 }717 }718 }719 return s0;720 }721 function peg$parseWhiteSpace(): any {722 let s0;723 if (input.charCodeAt(peg$currPos) === 32) {724 s0 = peg$c6;725 peg$currPos++;726 } else {727 s0 = peg$FAILED;728 if (peg$silentFails === 0) {729 peg$fail(peg$c7);730 }731 }732 if (s0 === peg$FAILED) {733 if (input.charCodeAt(peg$currPos) === 9) {734 s0 = peg$c8;735 peg$currPos++;736 } else {737 s0 = peg$FAILED;738 if (peg$silentFails === 0) {739 peg$fail(peg$c9);740 }741 }742 if (s0 === peg$FAILED) {743 s0 = peg$parseLineTerminator();744 }745 }746 return s0;747 }748 function peg$parseComment(): any {749 let s0, s1;750 peg$silentFails++;751 s0 = peg$parseMultiLineComment();752 if (s0 === peg$FAILED) {753 s0 = peg$parseSingleLineComment();754 }755 peg$silentFails--;756 if (s0 === peg$FAILED) {757 s1 = peg$FAILED;758 if (peg$silentFails === 0) {759 peg$fail(peg$c10);760 }761 }762 return s0;763 }764 function peg$parseWSC(): any {765 let s0;766 s0 = peg$parseWhiteSpace();767 if (s0 === peg$FAILED) {768 s0 = peg$parseComment();769 }770 return s0;771 }772 function peg$parseMultiLineComment(): any {773 let s0, s1, s2, s3, s4, s5;774 s0 = peg$currPos;775 if (input.substr(peg$currPos, 2) === peg$c11) {776 s1 = peg$c11;777 peg$currPos += 2;778 } else {779 s1 = peg$FAILED;780 if (peg$silentFails === 0) {781 peg$fail(peg$c12);782 }783 }784 if (s1 !== peg$FAILED) {785 s2 = [];786 s3 = peg$currPos;787 s4 = peg$currPos;788 peg$silentFails++;789 if (input.substr(peg$currPos, 2) === peg$c13) {790 s5 = peg$c13;791 peg$currPos += 2;792 } else {793 s5 = peg$FAILED;794 if (peg$silentFails === 0) {795 peg$fail(peg$c14);796 }797 }798 peg$silentFails--;799 if (s5 === peg$FAILED) {800 s4 = undefined;801 } else {802 peg$currPos = s4;803 s4 = peg$FAILED;804 }805 if (s4 !== peg$FAILED) {806 s5 = peg$parseSourceCharacter();807 if (s5 !== peg$FAILED) {808 s4 = [s4, s5];809 s3 = s4;810 } else {811 peg$currPos = s3;812 s3 = peg$FAILED;813 }814 } else {815 peg$currPos = s3;816 s3 = peg$FAILED;817 }818 while (s3 !== peg$FAILED) {819 s2.push(s3);820 s3 = peg$currPos;821 s4 = peg$currPos;822 peg$silentFails++;823 if (input.substr(peg$currPos, 2) === peg$c13) {824 s5 = peg$c13;825 peg$currPos += 2;826 } else {827 s5 = peg$FAILED;828 if (peg$silentFails === 0) {829 peg$fail(peg$c14);830 }831 }832 peg$silentFails--;833 if (s5 === peg$FAILED) {834 s4 = undefined;835 } else {836 peg$currPos = s4;837 s4 = peg$FAILED;838 }839 if (s4 !== peg$FAILED) {840 s5 = peg$parseSourceCharacter();841 if (s5 !== peg$FAILED) {842 s4 = [s4, s5];843 s3 = s4;844 } else {845 peg$currPos = s3;846 s3 = peg$FAILED;847 }848 } else {849 peg$currPos = s3;850 s3 = peg$FAILED;851 }852 }853 if (s2 !== peg$FAILED) {854 if (input.substr(peg$currPos, 2) === peg$c13) {855 s3 = peg$c13;856 peg$currPos += 2;857 } else {858 s3 = peg$FAILED;859 if (peg$silentFails === 0) {860 peg$fail(peg$c14);861 }862 }863 if (s3 !== peg$FAILED) {864 peg$savedPos = s0;865 s1 = peg$c15(s2);866 s0 = s1;867 } else {868 peg$currPos = s0;869 s0 = peg$FAILED;870 }871 } else {872 peg$currPos = s0;873 s0 = peg$FAILED;874 }875 } else {876 peg$currPos = s0;877 s0 = peg$FAILED;878 }879 return s0;880 }881 function peg$parseMultiLineCommentNoLineTerminator(): any {882 let s0, s1, s2, s3, s4, s5;883 s0 = peg$currPos;884 if (input.substr(peg$currPos, 2) === peg$c11) {885 s1 = peg$c11;886 peg$currPos += 2;887 } else {888 s1 = peg$FAILED;889 if (peg$silentFails === 0) {890 peg$fail(peg$c12);891 }892 }893 if (s1 !== peg$FAILED) {894 s2 = [];895 s3 = peg$currPos;896 s4 = peg$currPos;897 peg$silentFails++;898 if (input.substr(peg$currPos, 2) === peg$c13) {899 s5 = peg$c13;900 peg$currPos += 2;901 } else {902 s5 = peg$FAILED;903 if (peg$silentFails === 0) {904 peg$fail(peg$c14);905 }906 }907 if (s5 === peg$FAILED) {908 s5 = peg$parseLineTerminator();909 }910 peg$silentFails--;911 if (s5 === peg$FAILED) {912 s4 = undefined;913 } else {914 peg$currPos = s4;915 s4 = peg$FAILED;916 }917 if (s4 !== peg$FAILED) {918 s5 = peg$parseSourceCharacter();919 if (s5 !== peg$FAILED) {920 s4 = [s4, s5];921 s3 = s4;922 } else {923 peg$currPos = s3;924 s3 = peg$FAILED;925 }926 } else {927 peg$currPos = s3;928 s3 = peg$FAILED;929 }930 while (s3 !== peg$FAILED) {931 s2.push(s3);932 s3 = peg$currPos;933 s4 = peg$currPos;934 peg$silentFails++;935 if (input.substr(peg$currPos, 2) === peg$c13) {936 s5 = peg$c13;937 peg$currPos += 2;938 } else {939 s5 = peg$FAILED;940 if (peg$silentFails === 0) {941 peg$fail(peg$c14);942 }943 }944 if (s5 === peg$FAILED) {945 s5 = peg$parseLineTerminator();946 }947 peg$silentFails--;948 if (s5 === peg$FAILED) {949 s4 = undefined;950 } else {951 peg$currPos = s4;952 s4 = peg$FAILED;953 }954 if (s4 !== peg$FAILED) {955 s5 = peg$parseSourceCharacter();956 if (s5 !== peg$FAILED) {957 s4 = [s4, s5];958 s3 = s4;959 } else {960 peg$currPos = s3;961 s3 = peg$FAILED;962 }963 } else {964 peg$currPos = s3;965 s3 = peg$FAILED;966 }967 }968 if (s2 !== peg$FAILED) {969 if (input.substr(peg$currPos, 2) === peg$c13) {970 s3 = peg$c13;971 peg$currPos += 2;972 } else {973 s3 = peg$FAILED;974 if (peg$silentFails === 0) {975 peg$fail(peg$c14);976 }977 }978 if (s3 !== peg$FAILED) {979 peg$savedPos = s0;980 s1 = peg$c15(s2);981 s0 = s1;982 } else {983 peg$currPos = s0;984 s0 = peg$FAILED;985 }986 } else {987 peg$currPos = s0;988 s0 = peg$FAILED;989 }990 } else {991 peg$currPos = s0;992 s0 = peg$FAILED;993 }994 return s0;995 }996 function peg$parseSingleLineComment(): any {997 let s0, s1, s2, s3, s4, s5;998 s0 = peg$currPos;999 if (input.substr(peg$currPos, 2) === peg$c16) {1000 s1 = peg$c16;1001 peg$currPos += 2;1002 } else {1003 s1 = peg$FAILED;1004 if (peg$silentFails === 0) {1005 peg$fail(peg$c17);1006 }1007 }1008 if (s1 !== peg$FAILED) {1009 s2 = [];1010 s3 = peg$currPos;1011 s4 = peg$currPos;1012 peg$silentFails++;1013 s5 = peg$parseLineTerminator();1014 peg$silentFails--;1015 if (s5 === peg$FAILED) {1016 s4 = undefined;1017 } else {1018 peg$currPos = s4;1019 s4 = peg$FAILED;1020 }1021 if (s4 !== peg$FAILED) {1022 s5 = peg$parseSourceCharacter();1023 if (s5 !== peg$FAILED) {1024 s4 = [s4, s5];1025 s3 = s4;1026 } else {1027 peg$currPos = s3;1028 s3 = peg$FAILED;1029 }1030 } else {1031 peg$currPos = s3;1032 s3 = peg$FAILED;1033 }1034 while (s3 !== peg$FAILED) {1035 s2.push(s3);1036 s3 = peg$currPos;1037 s4 = peg$currPos;1038 peg$silentFails++;1039 s5 = peg$parseLineTerminator();1040 peg$silentFails--;1041 if (s5 === peg$FAILED) {1042 s4 = undefined;1043 } else {1044 peg$currPos = s4;1045 s4 = peg$FAILED;1046 }1047 if (s4 !== peg$FAILED) {1048 s5 = peg$parseSourceCharacter();1049 if (s5 !== peg$FAILED) {1050 s4 = [s4, s5];1051 s3 = s4;1052 } else {1053 peg$currPos = s3;1054 s3 = peg$FAILED;1055 }1056 } else {1057 peg$currPos = s3;1058 s3 = peg$FAILED;1059 }1060 }1061 if (s2 !== peg$FAILED) {1062 peg$savedPos = s0;1063 s1 = peg$c15(s2);1064 s0 = s1;1065 } else {1066 peg$currPos = s0;1067 s0 = peg$FAILED;1068 }1069 } else {1070 peg$currPos = s0;1071 s0 = peg$FAILED;1072 }1073 return s0;1074 }1075 function peg$parseIdentifier(): any {1076 let s0, s1, s2, s3, s4;1077 s0 = peg$currPos;1078 s1 = peg$currPos;1079 peg$silentFails++;1080 s2 = peg$parseKeyword();1081 peg$silentFails--;1082 if (s2 === peg$FAILED) {1083 s1 = undefined;1084 } else {1085 peg$currPos = s1;1086 s1 = peg$FAILED;1087 }1088 if (s1 !== peg$FAILED) {1089 s2 = peg$parseIdentifierStart();1090 if (s2 !== peg$FAILED) {1091 s3 = [];1092 s4 = peg$parseIdentifierPart();1093 while (s4 !== peg$FAILED) {1094 s3.push(s4);1095 s4 = peg$parseIdentifierPart();1096 }1097 if (s3 !== peg$FAILED) {1098 peg$savedPos = s0;1099 s1 = peg$c18(s2, s3);1100 s0 = s1;1101 } else {1102 peg$currPos = s0;1103 s0 = peg$FAILED;1104 }1105 } else {1106 peg$currPos = s0;1107 s0 = peg$FAILED;1108 }1109 } else {1110 peg$currPos = s0;1111 s0 = peg$FAILED;1112 }1113 return s0;1114 }1115 function peg$parseIdentifierStart(): any {1116 let s0;1117 if (peg$c19.test(input.charAt(peg$currPos))) {1118 s0 = input.charAt(peg$currPos);1119 peg$currPos++;1120 } else {1121 s0 = peg$FAILED;1122 if (peg$silentFails === 0) {1123 peg$fail(peg$c20);1124 }1125 }1126 return s0;1127 }1128 function peg$parseIdentifierPart(): any {1129 let s0;1130 if (peg$c21.test(input.charAt(peg$currPos))) {1131 s0 = input.charAt(peg$currPos);1132 peg$currPos++;1133 } else {1134 s0 = peg$FAILED;1135 if (peg$silentFails === 0) {1136 peg$fail(peg$c22);1137 }1138 }1139 return s0;1140 }1141 function peg$parseKeyword(): any {1142 let s0;1143 s0 = peg$parseIfToken();1144 if (s0 === peg$FAILED) {1145 s0 = peg$parseElseToken();1146 }1147 return s0;1148 }1149 function peg$parseIfToken(): any {1150 let s0, s1, s2, s3;1151 s0 = peg$currPos;1152 if (input.substr(peg$currPos, 2) === peg$c23) {1153 s1 = peg$c23;1154 peg$currPos += 2;1155 } else {1156 s1 = peg$FAILED;1157 if (peg$silentFails === 0) {1158 peg$fail(peg$c24);1159 }1160 }1161 if (s1 !== peg$FAILED) {1162 s2 = peg$currPos;1163 peg$silentFails++;1164 s3 = peg$parseIdentifierPart();1165 peg$silentFails--;1166 if (s3 === peg$FAILED) {1167 s2 = undefined;1168 } else {1169 peg$currPos = s2;1170 s2 = peg$FAILED;1171 }1172 if (s2 !== peg$FAILED) {1173 peg$savedPos = s0;1174 s1 = peg$c25();1175 s0 = s1;1176 } else {1177 peg$currPos = s0;1178 s0 = peg$FAILED;1179 }1180 } else {1181 peg$currPos = s0;1182 s0 = peg$FAILED;1183 }1184 return s0;1185 }1186 function peg$parseElseToken(): any {1187 let s0, s1, s2, s3;1188 s0 = peg$currPos;1189 if (input.substr(peg$currPos, 4) === peg$c26) {1190 s1 = peg$c26;1191 peg$currPos += 4;1192 } else {1193 s1 = peg$FAILED;1194 if (peg$silentFails === 0) {1195 peg$fail(peg$c27);1196 }1197 }1198 if (s1 !== peg$FAILED) {1199 s2 = peg$currPos;1200 peg$silentFails++;1201 s3 = peg$parseIdentifierPart();1202 peg$silentFails--;1203 if (s3 === peg$FAILED) {1204 s2 = undefined;1205 } else {1206 peg$currPos = s2;1207 s2 = peg$FAILED;1208 }1209 if (s2 !== peg$FAILED) {1210 peg$savedPos = s0;1211 s1 = peg$c28();1212 s0 = s1;1213 } else {1214 peg$currPos = s0;1215 s0 = peg$FAILED;1216 }1217 } else {1218 peg$currPos = s0;1219 s0 = peg$FAILED;1220 }1221 return s0;1222 }1223 function peg$parseLabel(): any {1224 let s0, s1, s2;1225 s0 = peg$currPos;1226 s1 = peg$parseIdentifier();1227 if (s1 !== peg$FAILED) {1228 if (input.charCodeAt(peg$currPos) === 58) {1229 s2 = peg$c29;1230 peg$currPos++;1231 } else {1232 s2 = peg$FAILED;1233 if (peg$silentFails === 0) {1234 peg$fail(peg$c30);1235 }1236 }1237 if (s2 !== peg$FAILED) {1238 peg$savedPos = s0;1239 s1 = peg$c31(s1);1240 s0 = s1;1241 } else {1242 peg$currPos = s0;1243 s0 = peg$FAILED;1244 }1245 } else {1246 peg$currPos = s0;1247 s0 = peg$FAILED;1248 }1249 return s0;1250 }1251 function peg$parseLiteral(): any {1252 let s0;1253 s0 = peg$parseNumericLiteral();1254 if (s0 === peg$FAILED) {1255 s0 = peg$parseStringLiteral();1256 }1257 return s0;1258 }1259 function peg$parseNumericLiteral(): any {1260 let s0, s1, s2, s3;1261 peg$silentFails++;1262 s0 = peg$currPos;1263 s1 = peg$parseHexIntegerLiteral();1264 if (s1 !== peg$FAILED) {1265 s2 = peg$currPos;1266 peg$silentFails++;1267 s3 = peg$parseIdentifierStart();1268 if (s3 === peg$FAILED) {1269 s3 = peg$parseDecimalDigit();1270 }1271 peg$silentFails--;1272 if (s3 === peg$FAILED) {1273 s2 = undefined;1274 } else {1275 peg$currPos = s2;1276 s2 = peg$FAILED;1277 }1278 if (s2 !== peg$FAILED) {1279 peg$savedPos = s0;1280 s1 = peg$c33(s1);1281 s0 = s1;1282 } else {1283 peg$currPos = s0;1284 s0 = peg$FAILED;1285 }1286 } else {1287 peg$currPos = s0;1288 s0 = peg$FAILED;1289 }1290 if (s0 === peg$FAILED) {1291 s0 = peg$currPos;1292 s1 = peg$parseDecimalLiteral();1293 if (s1 !== peg$FAILED) {1294 s2 = peg$currPos;1295 peg$silentFails++;1296 s3 = peg$parseIdentifierStart();1297 if (s3 === peg$FAILED) {1298 s3 = peg$parseDecimalDigit();1299 }1300 peg$silentFails--;1301 if (s3 === peg$FAILED) {1302 s2 = undefined;1303 } else {1304 peg$currPos = s2;1305 s2 = peg$FAILED;1306 }1307 if (s2 !== peg$FAILED) {1308 peg$savedPos = s0;1309 s1 = peg$c33(s1);1310 s0 = s1;1311 } else {1312 peg$currPos = s0;1313 s0 = peg$FAILED;1314 }1315 } else {1316 peg$currPos = s0;1317 s0 = peg$FAILED;1318 }1319 }1320 peg$silentFails--;1321 if (s0 === peg$FAILED) {1322 s1 = peg$FAILED;1323 if (peg$silentFails === 0) {1324 peg$fail(peg$c32);1325 }1326 }1327 return s0;1328 }1329 function peg$parseDecimalDigit(): any {1330 let s0;1331 if (peg$c34.test(input.charAt(peg$currPos))) {1332 s0 = input.charAt(peg$currPos);1333 peg$currPos++;1334 } else {1335 s0 = peg$FAILED;1336 if (peg$silentFails === 0) {1337 peg$fail(peg$c35);1338 }1339 }1340 return s0;1341 }1342 function peg$parseDecimalLiteral(): any {1343 let s0, s1, s2, s3;1344 s0 = peg$currPos;1345 if (peg$c36.test(input.charAt(peg$currPos))) {1346 s1 = input.charAt(peg$currPos);1347 peg$currPos++;1348 } else {1349 s1 = peg$FAILED;1350 if (peg$silentFails === 0) {1351 peg$fail(peg$c37);1352 }1353 }1354 if (s1 === peg$FAILED) {1355 s1 = null;1356 }1357 if (s1 !== peg$FAILED) {1358 s2 = [];1359 s3 = peg$parseDecimalDigit();1360 if (s3 !== peg$FAILED) {1361 while (s3 !== peg$FAILED) {1362 s2.push(s3);1363 s3 = peg$parseDecimalDigit();1364 }1365 } else {1366 s2 = peg$FAILED;1367 }1368 if (s2 !== peg$FAILED) {1369 peg$savedPos = s0;1370 s1 = peg$c38(s1, s2);1371 s0 = s1;1372 } else {1373 peg$currPos = s0;1374 s0 = peg$FAILED;1375 }1376 } else {1377 peg$currPos = s0;1378 s0 = peg$FAILED;1379 }1380 return s0;1381 }1382 function peg$parseHexIntegerLiteral(): any {1383 let s0, s1, s2, s3, s4;1384 s0 = peg$currPos;1385 if (input.substr(peg$currPos, 2).toLowerCase() === peg$c39) {1386 s1 = input.substr(peg$currPos, 2);1387 peg$currPos += 2;1388 } else {1389 s1 = peg$FAILED;1390 if (peg$silentFails === 0) {1391 peg$fail(peg$c40);1392 }1393 }1394 if (s1 !== peg$FAILED) {1395 s2 = peg$currPos;1396 s3 = [];1397 s4 = peg$parseHexDigit();1398 if (s4 !== peg$FAILED) {1399 while (s4 !== peg$FAILED) {1400 s3.push(s4);1401 s4 = peg$parseHexDigit();1402 }1403 } else {1404 s3 = peg$FAILED;1405 }1406 if (s3 !== peg$FAILED) {1407 s2 = input.substring(s2, peg$currPos);1408 } else {1409 s2 = s3;1410 }1411 if (s2 !== peg$FAILED) {1412 peg$savedPos = s0;1413 s1 = peg$c41(s2);1414 s0 = s1;1415 } else {1416 peg$currPos = s0;1417 s0 = peg$FAILED;1418 }1419 } else {1420 peg$currPos = s0;1421 s0 = peg$FAILED;1422 }1423 return s0;1424 }1425 function peg$parseHexDigit(): any {1426 let s0;1427 if (peg$c42.test(input.charAt(peg$currPos))) {1428 s0 = input.charAt(peg$currPos);1429 peg$currPos++;1430 } else {1431 s0 = peg$FAILED;1432 if (peg$silentFails === 0) {1433 peg$fail(peg$c43);1434 }1435 }1436 return s0;1437 }1438 function peg$parseSingleStringLiteral(): any {1439 let s0, s1, s2, s3;1440 peg$silentFails++;1441 s0 = peg$currPos;1442 if (input.charCodeAt(peg$currPos) === 34) {1443 s1 = peg$c45;1444 peg$currPos++;1445 } else {1446 s1 = peg$FAILED;1447 if (peg$silentFails === 0) {1448 peg$fail(peg$c46);1449 }1450 }1451 if (s1 !== peg$FAILED) {1452 s2 = [];1453 s3 = peg$parseDoubleStringCharacter();1454 while (s3 !== peg$FAILED) {1455 s2.push(s3);1456 s3 = peg$parseDoubleStringCharacter();1457 }1458 if (s2 !== peg$FAILED) {1459 if (input.charCodeAt(peg$currPos) === 34) {1460 s3 = peg$c45;1461 peg$currPos++;1462 } else {1463 s3 = peg$FAILED;1464 if (peg$silentFails === 0) {1465 peg$fail(peg$c46);1466 }1467 }1468 if (s3 !== peg$FAILED) {1469 peg$savedPos = s0;1470 s1 = peg$c47(s2);1471 s0 = s1;1472 } else {1473 peg$currPos = s0;1474 s0 = peg$FAILED;1475 }1476 } else {1477 peg$currPos = s0;1478 s0 = peg$FAILED;1479 }1480 } else {1481 peg$currPos = s0;1482 s0 = peg$FAILED;1483 }1484 if (s0 === peg$FAILED) {1485 s0 = peg$currPos;1486 if (input.charCodeAt(peg$currPos) === 39) {1487 s1 = peg$c48;1488 peg$currPos++;1489 } else {1490 s1 = peg$FAILED;1491 if (peg$silentFails === 0) {1492 peg$fail(peg$c49);1493 }1494 }1495 if (s1 !== peg$FAILED) {1496 s2 = [];1497 s3 = peg$parseSingleStringCharacter();1498 while (s3 !== peg$FAILED) {1499 s2.push(s3);1500 s3 = peg$parseSingleStringCharacter();1501 }1502 if (s2 !== peg$FAILED) {1503 if (input.charCodeAt(peg$currPos) === 39) {1504 s3 = peg$c48;1505 peg$currPos++;1506 } else {1507 s3 = peg$FAILED;1508 if (peg$silentFails === 0) {1509 peg$fail(peg$c49);1510 }1511 }1512 if (s3 !== peg$FAILED) {1513 peg$savedPos = s0;1514 s1 = peg$c47(s2);1515 s0 = s1;1516 } else {1517 peg$currPos = s0;1518 s0 = peg$FAILED;1519 }1520 } else {1521 peg$currPos = s0;1522 s0 = peg$FAILED;1523 }1524 } else {1525 peg$currPos = s0;1526 s0 = peg$FAILED;1527 }1528 }1529 peg$silentFails--;1530 if (s0 === peg$FAILED) {1531 s1 = peg$FAILED;1532 if (peg$silentFails === 0) {1533 peg$fail(peg$c44);1534 }1535 }1536 return s0;1537 }1538 function peg$parseStringLiteral(): any {1539 let s0, s1, s2, s3, s4, s5;1540 s0 = peg$currPos;1541 s1 = peg$parseSingleStringLiteral();1542 if (s1 !== peg$FAILED) {1543 s2 = [];1544 s3 = peg$currPos;1545 s4 = [];1546 s5 = peg$parseWSC();1547 while (s5 !== peg$FAILED) {1548 s4.push(s5);1549 s5 = peg$parseWSC();1550 }1551 if (s4 !== peg$FAILED) {1552 s5 = peg$parseSingleStringLiteral();1553 if (s5 !== peg$FAILED) {1554 s4 = [s4, s5];1555 s3 = s4;1556 } else {1557 peg$currPos = s3;1558 s3 = peg$FAILED;1559 }1560 } else {1561 peg$currPos = s3;1562 s3 = peg$FAILED;1563 }1564 while (s3 !== peg$FAILED) {1565 s2.push(s3);1566 s3 = peg$currPos;1567 s4 = [];1568 s5 = peg$parseWSC();1569 while (s5 !== peg$FAILED) {1570 s4.push(s5);1571 s5 = peg$parseWSC();1572 }1573 if (s4 !== peg$FAILED) {1574 s5 = peg$parseSingleStringLiteral();1575 if (s5 !== peg$FAILED) {1576 s4 = [s4, s5];1577 s3 = s4;1578 } else {1579 peg$currPos = s3;1580 s3 = peg$FAILED;1581 }1582 } else {1583 peg$currPos = s3;1584 s3 = peg$FAILED;1585 }1586 }1587 if (s2 !== peg$FAILED) {1588 peg$savedPos = s0;1589 s1 = peg$c50(s1, s2);1590 s0 = s1;1591 } else {1592 peg$currPos = s0;1593 s0 = peg$FAILED;1594 }1595 } else {1596 peg$currPos = s0;1597 s0 = peg$FAILED;1598 }1599 return s0;1600 }1601 function peg$parseDoubleStringCharacter(): any {1602 let s0, s1, s2;1603 s0 = peg$currPos;1604 s1 = peg$currPos;1605 peg$silentFails++;1606 if (input.charCodeAt(peg$currPos) === 34) {1607 s2 = peg$c45;1608 peg$currPos++;1609 } else {1610 s2 = peg$FAILED;1611 if (peg$silentFails === 0) {1612 peg$fail(peg$c46);1613 }1614 }1615 if (s2 === peg$FAILED) {1616 if (input.charCodeAt(peg$currPos) === 92) {1617 s2 = peg$c51;1618 peg$currPos++;1619 } else {1620 s2 = peg$FAILED;1621 if (peg$silentFails === 0) {1622 peg$fail(peg$c52);1623 }1624 }1625 if (s2 === peg$FAILED) {1626 s2 = peg$parseLineTerminator();1627 }1628 }1629 peg$silentFails--;1630 if (s2 === peg$FAILED) {1631 s1 = undefined;1632 } else {1633 peg$currPos = s1;1634 s1 = peg$FAILED;1635 }1636 if (s1 !== peg$FAILED) {1637 s2 = peg$parseSourceCharacter();1638 if (s2 !== peg$FAILED) {1639 peg$savedPos = s0;1640 s1 = peg$c1();1641 s0 = s1;1642 } else {1643 peg$currPos = s0;1644 s0 = peg$FAILED;1645 }1646 } else {1647 peg$currPos = s0;1648 s0 = peg$FAILED;1649 }1650 if (s0 === peg$FAILED) {1651 s0 = peg$currPos;1652 if (input.charCodeAt(peg$currPos) === 92) {1653 s1 = peg$c51;1654 peg$currPos++;1655 } else {1656 s1 = peg$FAILED;1657 if (peg$silentFails === 0) {1658 peg$fail(peg$c52);1659 }1660 }1661 if (s1 !== peg$FAILED) {1662 s2 = peg$parseEscapeSequence();1663 if (s2 !== peg$FAILED) {1664 peg$savedPos = s0;1665 s1 = peg$c53(s2);1666 s0 = s1;1667 } else {1668 peg$currPos = s0;1669 s0 = peg$FAILED;1670 }1671 } else {1672 peg$currPos = s0;1673 s0 = peg$FAILED;1674 }1675 if (s0 === peg$FAILED) {1676 s0 = peg$parseLineContinuation();1677 }1678 }1679 return s0;1680 }1681 function peg$parseSingleStringCharacter(): any {1682 let s0, s1, s2;1683 s0 = peg$currPos;1684 s1 = peg$currPos;1685 peg$silentFails++;1686 if (input.charCodeAt(peg$currPos) === 39) {1687 s2 = peg$c48;1688 peg$currPos++;1689 } else {1690 s2 = peg$FAILED;1691 if (peg$silentFails === 0) {1692 peg$fail(peg$c49);1693 }1694 }1695 if (s2 === peg$FAILED) {1696 if (input.charCodeAt(peg$currPos) === 92) {1697 s2 = peg$c51;1698 peg$currPos++;1699 } else {1700 s2 = peg$FAILED;1701 if (peg$silentFails === 0) {1702 peg$fail(peg$c52);1703 }1704 }1705 if (s2 === peg$FAILED) {1706 s2 = peg$parseLineTerminator();1707 }1708 }1709 peg$silentFails--;1710 if (s2 === peg$FAILED) {1711 s1 = undefined;1712 } else {1713 peg$currPos = s1;1714 s1 = peg$FAILED;1715 }1716 if (s1 !== peg$FAILED) {1717 s2 = peg$parseSourceCharacter();1718 if (s2 !== peg$FAILED) {1719 peg$savedPos = s0;1720 s1 = peg$c1();1721 s0 = s1;1722 } else {1723 peg$currPos = s0;1724 s0 = peg$FAILED;1725 }1726 } else {1727 peg$currPos = s0;1728 s0 = peg$FAILED;1729 }1730 if (s0 === peg$FAILED) {1731 s0 = peg$currPos;1732 if (input.charCodeAt(peg$currPos) === 92) {1733 s1 = peg$c51;1734 peg$currPos++;1735 } else {1736 s1 = peg$FAILED;1737 if (peg$silentFails === 0) {1738 peg$fail(peg$c52);1739 }1740 }1741 if (s1 !== peg$FAILED) {1742 s2 = peg$parseEscapeSequence();1743 if (s2 !== peg$FAILED) {1744 peg$savedPos = s0;1745 s1 = peg$c53(s2);1746 s0 = s1;1747 } else {1748 peg$currPos = s0;1749 s0 = peg$FAILED;1750 }1751 } else {1752 peg$currPos = s0;1753 s0 = peg$FAILED;1754 }1755 if (s0 === peg$FAILED) {1756 s0 = peg$parseLineContinuation();1757 }1758 }1759 return s0;1760 }1761 function peg$parseLineContinuation(): any {1762 let s0, s1, s2;1763 s0 = peg$currPos;1764 if (input.charCodeAt(peg$currPos) === 92) {1765 s1 = peg$c51;1766 peg$currPos++;1767 } else {1768 s1 = peg$FAILED;1769 if (peg$silentFails === 0) {1770 peg$fail(peg$c52);1771 }1772 }1773 if (s1 !== peg$FAILED) {1774 s2 = peg$parseLineTerminator();1775 if (s2 !== peg$FAILED) {1776 peg$savedPos = s0;1777 s1 = peg$c54();1778 s0 = s1;1779 } else {1780 peg$currPos = s0;1781 s0 = peg$FAILED;1782 }1783 } else {1784 peg$currPos = s0;1785 s0 = peg$FAILED;1786 }1787 return s0;1788 }1789 function peg$parseEscapeSequence(): any {1790 let s0, s1, s2, s3;1791 s0 = peg$parseCharacterEscapeSequence();1792 if (s0 === peg$FAILED) {1793 s0 = peg$currPos;1794 if (input.charCodeAt(peg$currPos) === 48) {1795 s1 = peg$c55;1796 peg$currPos++;1797 } else {1798 s1 = peg$FAILED;1799 if (peg$silentFails === 0) {1800 peg$fail(peg$c56);1801 }1802 }1803 if (s1 !== peg$FAILED) {1804 s2 = peg$currPos;1805 peg$silentFails++;1806 s3 = peg$parseDecimalDigit();1807 peg$silentFails--;1808 if (s3 === peg$FAILED) {1809 s2 = undefined;1810 } else {1811 peg$currPos = s2;1812 s2 = peg$FAILED;1813 }1814 if (s2 !== peg$FAILED) {1815 peg$savedPos = s0;1816 s1 = peg$c57();1817 s0 = s1;1818 } else {1819 peg$currPos = s0;1820 s0 = peg$FAILED;1821 }1822 } else {1823 peg$currPos = s0;1824 s0 = peg$FAILED;1825 }1826 if (s0 === peg$FAILED) {1827 s0 = peg$parseHexEscapeSequence();1828 }1829 }1830 return s0;1831 }1832 function peg$parseCharacterEscapeSequence(): any {1833 let s0;1834 s0 = peg$parseSingleEscapeCharacter();1835 if (s0 === peg$FAILED) {1836 s0 = peg$parseNonEscapeCharacter();1837 }1838 return s0;1839 }1840 function peg$parseSingleEscapeCharacter(): any {1841 let s0, s1;1842 if (input.charCodeAt(peg$currPos) === 39) {1843 s0 = peg$c48;1844 peg$currPos++;1845 } else {1846 s0 = peg$FAILED;1847 if (peg$silentFails === 0) {1848 peg$fail(peg$c49);1849 }1850 }1851 if (s0 === peg$FAILED) {1852 if (input.charCodeAt(peg$currPos) === 34) {1853 s0 = peg$c45;1854 peg$currPos++;1855 } else {1856 s0 = peg$FAILED;1857 if (peg$silentFails === 0) {1858 peg$fail(peg$c46);1859 }1860 }1861 if (s0 === peg$FAILED) {1862 if (input.charCodeAt(peg$currPos) === 92) {1863 s0 = peg$c51;1864 peg$currPos++;1865 } else {1866 s0 = peg$FAILED;1867 if (peg$silentFails === 0) {1868 peg$fail(peg$c52);1869 }1870 }1871 if (s0 === peg$FAILED) {1872 s0 = peg$currPos;1873 if (input.charCodeAt(peg$currPos) === 98) {1874 s1 = peg$c58;1875 peg$currPos++;1876 } else {1877 s1 = peg$FAILED;1878 if (peg$silentFails === 0) {1879 peg$fail(peg$c59);1880 }1881 }1882 if (s1 !== peg$FAILED) {1883 peg$savedPos = s0;1884 s1 = peg$c60();1885 }1886 s0 = s1;1887 if (s0 === peg$FAILED) {1888 s0 = peg$currPos;1889 if (input.charCodeAt(peg$currPos) === 102) {1890 s1 = peg$c61;1891 peg$currPos++;1892 } else {1893 s1 = peg$FAILED;1894 if (peg$silentFails === 0) {1895 peg$fail(peg$c62);1896 }1897 }1898 if (s1 !== peg$FAILED) {1899 peg$savedPos = s0;1900 s1 = peg$c63();1901 }1902 s0 = s1;1903 if (s0 === peg$FAILED) {1904 s0 = peg$currPos;1905 if (input.charCodeAt(peg$currPos) === 110) {1906 s1 = peg$c64;1907 peg$currPos++;1908 } else {1909 s1 = peg$FAILED;1910 if (peg$silentFails === 0) {1911 peg$fail(peg$c65);1912 }1913 }1914 if (s1 !== peg$FAILED) {1915 peg$savedPos = s0;1916 s1 = peg$c66();1917 }1918 s0 = s1;1919 if (s0 === peg$FAILED) {1920 s0 = peg$currPos;1921 if (input.charCodeAt(peg$currPos) === 114) {1922 s1 = peg$c67;1923 peg$currPos++;1924 } else {1925 s1 = peg$FAILED;1926 if (peg$silentFails === 0) {1927 peg$fail(peg$c68);1928 }1929 }1930 if (s1 !== peg$FAILED) {1931 peg$savedPos = s0;1932 s1 = peg$c69();1933 }1934 s0 = s1;1935 if (s0 === peg$FAILED) {1936 s0 = peg$currPos;1937 if (input.charCodeAt(peg$currPos) === 116) {1938 s1 = peg$c70;1939 peg$currPos++;1940 } else {1941 s1 = peg$FAILED;1942 if (peg$silentFails === 0) {1943 peg$fail(peg$c71);1944 }1945 }1946 if (s1 !== peg$FAILED) {1947 peg$savedPos = s0;1948 s1 = peg$c72();1949 }1950 s0 = s1;1951 if (s0 === peg$FAILED) {1952 s0 = peg$currPos;1953 if (input.charCodeAt(peg$currPos) === 118) {1954 s1 = peg$c73;1955 peg$currPos++;1956 } else {1957 s1 = peg$FAILED;1958 if (peg$silentFails === 0) {1959 peg$fail(peg$c74);1960 }1961 }1962 if (s1 !== peg$FAILED) {1963 peg$savedPos = s0;1964 s1 = peg$c75();1965 }1966 s0 = s1;1967 }1968 }1969 }1970 }1971 }1972 }1973 }1974 }1975 return s0;1976 }1977 function peg$parseNonEscapeCharacter(): any {1978 let s0, s1, s2;1979 s0 = peg$currPos;1980 s1 = peg$currPos;1981 peg$silentFails++;1982 s2 = peg$parseEscapeCharacter();1983 if (s2 === peg$FAILED) {1984 s2 = peg$parseLineTerminator();1985 }1986 peg$silentFails--;1987 if (s2 === peg$FAILED) {1988 s1 = undefined;1989 } else {1990 peg$currPos = s1;1991 s1 = peg$FAILED;1992 }1993 if (s1 !== peg$FAILED) {1994 s2 = peg$parseSourceCharacter();1995 if (s2 !== peg$FAILED) {1996 peg$savedPos = s0;1997 s1 = peg$c1();1998 s0 = s1;1999 } else {2000 peg$currPos = s0;2001 s0 = peg$FAILED;2002 }2003 } else {2004 peg$currPos = s0;2005 s0 = peg$FAILED;2006 }2007 return s0;2008 }2009 function peg$parseEscapeCharacter(): any {2010 let s0;2011 s0 = peg$parseSingleEscapeCharacter();2012 if (s0 === peg$FAILED) {2013 s0 = peg$parseDecimalDigit();2014 if (s0 === peg$FAILED) {2015 if (input.charCodeAt(peg$currPos) === 120) {2016 s0 = peg$c76;2017 peg$currPos++;2018 } else {2019 s0 = peg$FAILED;2020 if (peg$silentFails === 0) {2021 peg$fail(peg$c77);2022 }2023 }2024 if (s0 === peg$FAILED) {2025 if (input.charCodeAt(peg$currPos) === 117) {2026 s0 = peg$c78;2027 peg$currPos++;2028 } else {2029 s0 = peg$FAILED;2030 if (peg$silentFails === 0) {2031 peg$fail(peg$c79);2032 }2033 }2034 }2035 }2036 }2037 return s0;2038 }2039 function peg$parseHexEscapeSequence(): any {2040 let s0, s1, s2, s3, s4, s5;2041 s0 = peg$currPos;2042 if (input.charCodeAt(peg$currPos) === 120) {2043 s1 = peg$c76;2044 peg$currPos++;2045 } else {2046 s1 = peg$FAILED;2047 if (peg$silentFails === 0) {2048 peg$fail(peg$c77);2049 }2050 }2051 if (s1 !== peg$FAILED) {2052 s2 = peg$currPos;2053 s3 = peg$currPos;2054 s4 = peg$parseHexDigit();2055 if (s4 !== peg$FAILED) {2056 s5 = peg$parseHexDigit();2057 if (s5 !== peg$FAILED) {2058 s4 = [s4, s5];2059 s3 = s4;2060 } else {2061 peg$currPos = s3;2062 s3 = peg$FAILED;2063 }2064 } else {2065 peg$currPos = s3;2066 s3 = peg$FAILED;2067 }2068 if (s3 !== peg$FAILED) {2069 s2 = input.substring(s2, peg$currPos);2070 } else {2071 s2 = s3;2072 }2073 if (s2 !== peg$FAILED) {2074 peg$savedPos = s0;2075 s1 = peg$c80(s2);2076 s0 = s1;2077 } else {2078 peg$currPos = s0;2079 s0 = peg$FAILED;2080 }2081 } else {2082 peg$currPos = s0;2083 s0 = peg$FAILED;2084 }2085 return s0;2086 }2087 function peg$parseCommandCall(): any {2088 let s0, s1, s2, s3, s4, s5, s6, s7, s8;2089 s0 = peg$currPos;2090 s1 = peg$parseIdentifier();2091 if (s1 !== peg$FAILED) {2092 if (input.charCodeAt(peg$currPos) === 40) {2093 s2 = peg$c81;2094 peg$currPos++;2095 } else {2096 s2 = peg$FAILED;2097 if (peg$silentFails === 0) {2098 peg$fail(peg$c82);2099 }2100 }2101 if (s2 !== peg$FAILED) {2102 s3 = [];2103 s4 = peg$parseWSC();2104 while (s4 !== peg$FAILED) {2105 s3.push(s4);2106 s4 = peg$parseWSC();2107 }2108 if (s3 !== peg$FAILED) {2109 s4 = peg$parseArgumentList();2110 if (s4 === peg$FAILED) {2111 s4 = null;2112 }2113 if (s4 !== peg$FAILED) {2114 s5 = [];2115 s6 = peg$parseWSC();2116 while (s6 !== peg$FAILED) {2117 s5.push(s6);2118 s6 = peg$parseWSC();2119 }2120 if (s5 !== peg$FAILED) {2121 if (input.charCodeAt(peg$currPos) === 41) {2122 s6 = peg$c83;2123 peg$currPos++;2124 } else {2125 s6 = peg$FAILED;2126 if (peg$silentFails === 0) {2127 peg$fail(peg$c84);2128 }2129 }2130 if (s6 !== peg$FAILED) {2131 s7 = [];2132 s8 = peg$parseWSC();2133 while (s8 !== peg$FAILED) {2134 s7.push(s8);2135 s8 = peg$parseWSC();2136 }2137 if (s7 !== peg$FAILED) {2138 if (input.charCodeAt(peg$currPos) === 59) {2139 s8 = peg$c85;2140 peg$currPos++;2141 } else {2142 s8 = peg$FAILED;2143 if (peg$silentFails === 0) {2144 peg$fail(peg$c86);2145 }2146 }2147 if (s8 !== peg$FAILED) {2148 peg$savedPos = s0;2149 s1 = peg$c87(s1, s4);2150 s0 = s1;2151 } else {2152 peg$currPos = s0;2153 s0 = peg$FAILED;2154 }2155 } else {2156 peg$currPos = s0;2157 s0 = peg$FAILED;2158 }2159 } else {2160 peg$currPos = s0;2161 s0 = peg$FAILED;2162 }2163 } else {2164 peg$currPos = s0;2165 s0 = peg$FAILED;2166 }2167 } else {2168 peg$currPos = s0;2169 s0 = peg$FAILED;2170 }2171 } else {2172 peg$currPos = s0;2173 s0 = peg$FAILED;2174 }2175 } else {2176 peg$currPos = s0;2177 s0 = peg$FAILED;2178 }2179 } else {2180 peg$currPos = s0;2181 s0 = peg$FAILED;2182 }2183 return s0;2184 }2185 function peg$parseArgumentList(): any {2186 let s0, s1, s2, s3;2187 s0 = peg$currPos;2188 s1 = peg$parseArgument();2189 if (s1 === peg$FAILED) {2190 s1 = null;2191 }2192 if (s1 !== peg$FAILED) {2193 s2 = [];2194 s3 = peg$parseSubsequentArgument();2195 while (s3 !== peg$FAILED) {2196 s2.push(s3);2197 s3 = peg$parseSubsequentArgument();2198 }2199 if (s2 !== peg$FAILED) {2200 peg$savedPos = s0;2201 s1 = peg$c88(s1, s2);2202 s0 = s1;2203 } else {2204 peg$currPos = s0;2205 s0 = peg$FAILED;2206 }2207 } else {2208 peg$currPos = s0;2209 s0 = peg$FAILED;2210 }2211 return s0;2212 }2213 function peg$parseArgument(): any {2214 let s0;2215 s0 = peg$parseIdentifier();2216 if (s0 === peg$FAILED) {2217 s0 = peg$parseLiteral();2218 }2219 return s0;2220 }2221 function peg$parseSubsequentArgument(): any {2222 let s0, s1, s2, s3, s4;2223 s0 = peg$currPos;2224 s1 = [];2225 s2 = peg$parseWSC();2226 while (s2 !== peg$FAILED) {2227 s1.push(s2);2228 s2 = peg$parseWSC();2229 }2230 if (s1 !== peg$FAILED) {2231 if (input.charCodeAt(peg$currPos) === 44) {2232 s2 = peg$c89;2233 peg$currPos++;2234 } else {2235 s2 = peg$FAILED;2236 if (peg$silentFails === 0) {2237 peg$fail(peg$c90);2238 }2239 }2240 if (s2 !== peg$FAILED) {2241 s3 = [];2242 s4 = peg$parseWSC();2243 while (s4 !== peg$FAILED) {2244 s3.push(s4);2245 s4 = peg$parseWSC();2246 }2247 if (s3 !== peg$FAILED) {2248 s4 = peg$parseArgument();2249 if (s4 !== peg$FAILED) {2250 peg$savedPos = s0;2251 s1 = peg$c91(s4);2252 s0 = s1;2253 } else {2254 peg$currPos = s0;2255 s0 = peg$FAILED;2256 }2257 } else {2258 peg$currPos = s0;2259 s0 = peg$FAILED;2260 }2261 } else {2262 peg$currPos = s0;2263 s0 = peg$FAILED;2264 }2265 } else {2266 peg$currPos = s0;2267 s0 = peg$FAILED;2268 }2269 return s0;2270 }2271 function peg$parseTestCall(): any {2272 let s0, s1, s2, s3, s4, s5, s6;2273 s0 = peg$currPos;2274 s1 = peg$parseIdentifier();2275 if (s1 !== peg$FAILED) {2276 if (input.charCodeAt(peg$currPos) === 40) {2277 s2 = peg$c81;2278 peg$currPos++;2279 } else {2280 s2 = peg$FAILED;2281 if (peg$silentFails === 0) {2282 peg$fail(peg$c82);2283 }2284 }2285 if (s2 !== peg$FAILED) {2286 s3 = [];2287 s4 = peg$parseWSC();2288 while (s4 !== peg$FAILED) {2289 s3.push(s4);2290 s4 = peg$parseWSC();2291 }2292 if (s3 !== peg$FAILED) {2293 s4 = peg$parseArgumentList();2294 if (s4 !== peg$FAILED) {2295 s5 = [];2296 s6 = peg$parseWSC();2297 while (s6 !== peg$FAILED) {2298 s5.push(s6);2299 s6 = peg$parseWSC();2300 }2301 if (s5 !== peg$FAILED) {2302 if (input.charCodeAt(peg$currPos) === 41) {2303 s6 = peg$c83;2304 peg$currPos++;2305 } else {2306 s6 = peg$FAILED;2307 if (peg$silentFails === 0) {2308 peg$fail(peg$c84);2309 }2310 }2311 if (s6 !== peg$FAILED) {2312 peg$savedPos = s0;2313 s1 = peg$c92(s1, s4);2314 s0 = s1;2315 } else {2316 peg$currPos = s0;2317 s0 = peg$FAILED;2318 }2319 } else {2320 peg$currPos = s0;2321 s0 = peg$FAILED;2322 }2323 } else {2324 peg$currPos = s0;2325 s0 = peg$FAILED;2326 }2327 } else {2328 peg$currPos = s0;2329 s0 = peg$FAILED;2330 }2331 } else {2332 peg$currPos = s0;2333 s0 = peg$FAILED;2334 }2335 } else {2336 peg$currPos = s0;2337 s0 = peg$FAILED;2338 }2339 return s0;2340 }2341 function peg$parseBooleanBinaryOperator(): any {2342 let s0;2343 if (input.charCodeAt(peg$currPos) === 60) {2344 s0 = peg$c93;2345 peg$currPos++;2346 } else {2347 s0 = peg$FAILED;2348 if (peg$silentFails === 0) {2349 peg$fail(peg$c94);2350 }2351 }2352 if (s0 === peg$FAILED) {2353 if (input.charCodeAt(peg$currPos) === 62) {2354 s0 = peg$c95;2355 peg$currPos++;2356 } else {2357 s0 = peg$FAILED;2358 if (peg$silentFails === 0) {2359 peg$fail(peg$c96);2360 }2361 }2362 if (s0 === peg$FAILED) {2363 if (input.substr(peg$currPos, 2) === peg$c97) {2364 s0 = peg$c97;2365 peg$currPos += 2;2366 } else {2367 s0 = peg$FAILED;2368 if (peg$silentFails === 0) {2369 peg$fail(peg$c98);2370 }2371 }2372 if (s0 === peg$FAILED) {2373 if (input.substr(peg$currPos, 2) === peg$c99) {2374 s0 = peg$c99;2375 peg$currPos += 2;2376 } else {2377 s0 = peg$FAILED;2378 if (peg$silentFails === 0) {2379 peg$fail(peg$c100);2380 }2381 }2382 if (s0 === peg$FAILED) {2383 if (input.substr(peg$currPos, 2) === peg$c101) {2384 s0 = peg$c101;2385 peg$currPos += 2;2386 } else {2387 s0 = peg$FAILED;2388 if (peg$silentFails === 0) {2389 peg$fail(peg$c102);2390 }2391 }2392 if (s0 === peg$FAILED) {2393 if (input.substr(peg$currPos, 2) === peg$c103) {2394 s0 = peg$c103;2395 peg$currPos += 2;2396 } else {2397 s0 = peg$FAILED;2398 if (peg$silentFails === 0) {2399 peg$fail(peg$c104);2400 }2401 }2402 }2403 }2404 }2405 }2406 }2407 return s0;2408 }2409 function peg$parseBooleanBinaryOperation(): any {2410 let s0, s1, s2, s3, s4, s5;2411 s0 = peg$currPos;2412 s1 = peg$parseArgument();2413 if (s1 !== peg$FAILED) {2414 s2 = [];2415 s3 = peg$parseWSC();2416 while (s3 !== peg$FAILED) {2417 s2.push(s3);2418 s3 = peg$parseWSC();2419 }2420 if (s2 !== peg$FAILED) {2421 s3 = peg$parseBooleanBinaryOperator();2422 if (s3 !== peg$FAILED) {2423 s4 = [];2424 s5 = peg$parseWSC();2425 while (s5 !== peg$FAILED) {2426 s4.push(s5);2427 s5 = peg$parseWSC();2428 }2429 if (s4 !== peg$FAILED) {2430 s5 = peg$parseArgument();2431 if (s5 !== peg$FAILED) {2432 peg$savedPos = s0;2433 s1 = peg$c105(s1, s3, s5);2434 s0 = s1;2435 } else {2436 peg$currPos = s0;2437 s0 = peg$FAILED;2438 }2439 } else {2440 peg$currPos = s0;2441 s0 = peg$FAILED;2442 }2443 } else {2444 peg$currPos = s0;2445 s0 = peg$FAILED;2446 }2447 } else {2448 peg$currPos = s0;2449 s0 = peg$FAILED;2450 }2451 } else {2452 peg$currPos = s0;2453 s0 = peg$FAILED;2454 }2455 return s0;2456 }2457 function peg$parseSingleBooleanClause(): any {2458 let s0;2459 s0 = peg$parseTestCall();2460 if (s0 === peg$FAILED) {2461 s0 = peg$parseBooleanBinaryOperation();2462 if (s0 === peg$FAILED) {2463 s0 = peg$parseParenthesizedBooleanExpression();2464 if (s0 === peg$FAILED) {2465 s0 = peg$parseNotExpression();2466 if (s0 === peg$FAILED) {2467 s0 = peg$parseIdentifier();2468 }2469 }2470 }2471 }2472 return s0;2473 }2474 function peg$parseAndExpression(): any {2475 let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;2476 s0 = peg$currPos;2477 s1 = peg$parseSingleBooleanClause();2478 if (s1 !== peg$FAILED) {2479 s2 = [];2480 s3 = peg$parseWSC();2481 while (s3 !== peg$FAILED) {2482 s2.push(s3);2483 s3 = peg$parseWSC();2484 }2485 if (s2 !== peg$FAILED) {2486 s3 = [];2487 s4 = peg$currPos;2488 if (input.substr(peg$currPos, 2) === peg$c106) {2489 s5 = peg$c106;2490 peg$currPos += 2;2491 } else {2492 s5 = peg$FAILED;2493 if (peg$silentFails === 0) {2494 peg$fail(peg$c107);2495 }2496 }2497 if (s5 !== peg$FAILED) {2498 s6 = [];2499 s7 = peg$parseWSC();2500 while (s7 !== peg$FAILED) {2501 s6.push(s7);2502 s7 = peg$parseWSC();2503 }2504 if (s6 !== peg$FAILED) {2505 s7 = peg$parseSingleBooleanClause();2506 if (s7 !== peg$FAILED) {2507 s8 = [];2508 s9 = peg$parseWSC();2509 while (s9 !== peg$FAILED) {2510 s8.push(s9);2511 s9 = peg$parseWSC();2512 }2513 if (s8 !== peg$FAILED) {2514 s5 = [s5, s6, s7, s8];2515 s4 = s5;2516 } else {2517 peg$currPos = s4;2518 s4 = peg$FAILED;2519 }2520 } else {2521 peg$currPos = s4;2522 s4 = peg$FAILED;2523 }2524 } else {2525 peg$currPos = s4;2526 s4 = peg$FAILED;2527 }2528 } else {2529 peg$currPos = s4;2530 s4 = peg$FAILED;2531 }2532 if (s4 !== peg$FAILED) {2533 while (s4 !== peg$FAILED) {2534 s3.push(s4);2535 s4 = peg$currPos;2536 if (input.substr(peg$currPos, 2) === peg$c106) {2537 s5 = peg$c106;2538 peg$currPos += 2;2539 } else {2540 s5 = peg$FAILED;2541 if (peg$silentFails === 0) {2542 peg$fail(peg$c107);2543 }2544 }2545 if (s5 !== peg$FAILED) {2546 s6 = [];2547 s7 = peg$parseWSC();2548 while (s7 !== peg$FAILED) {2549 s6.push(s7);2550 s7 = peg$parseWSC();2551 }2552 if (s6 !== peg$FAILED) {2553 s7 = peg$parseSingleBooleanClause();2554 if (s7 !== peg$FAILED) {2555 s8 = [];2556 s9 = peg$parseWSC();2557 while (s9 !== peg$FAILED) {2558 s8.push(s9);2559 s9 = peg$parseWSC();2560 }2561 if (s8 !== peg$FAILED) {2562 s5 = [s5, s6, s7, s8];2563 s4 = s5;2564 } else {2565 peg$currPos = s4;2566 s4 = peg$FAILED;2567 }2568 } else {2569 peg$currPos = s4;2570 s4 = peg$FAILED;2571 }2572 } else {2573 peg$currPos = s4;2574 s4 = peg$FAILED;2575 }2576 } else {2577 peg$currPos = s4;2578 s4 = peg$FAILED;2579 }2580 }2581 } else {2582 s3 = peg$FAILED;2583 }2584 if (s3 !== peg$FAILED) {2585 peg$savedPos = s0;2586 s1 = peg$c108(s1, s3);2587 s0 = s1;2588 } else {2589 peg$currPos = s0;2590 s0 = peg$FAILED;2591 }2592 } else {2593 peg$currPos = s0;2594 s0 = peg$FAILED;2595 }2596 } else {2597 peg$currPos = s0;2598 s0 = peg$FAILED;2599 }2600 return s0;2601 }2602 function peg$parseOrExpression(): any {2603 let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;2604 s0 = peg$currPos;2605 s1 = peg$parseSingleBooleanClause();2606 if (s1 !== peg$FAILED) {2607 s2 = [];2608 s3 = peg$parseWSC();2609 while (s3 !== peg$FAILED) {2610 s2.push(s3);2611 s3 = peg$parseWSC();2612 }2613 if (s2 !== peg$FAILED) {2614 s3 = [];2615 s4 = peg$currPos;2616 if (input.substr(peg$currPos, 2) === peg$c109) {2617 s5 = peg$c109;2618 peg$currPos += 2;2619 } else {2620 s5 = peg$FAILED;2621 if (peg$silentFails === 0) {2622 peg$fail(peg$c110);2623 }2624 }2625 if (s5 !== peg$FAILED) {2626 s6 = [];2627 s7 = peg$parseWSC();2628 while (s7 !== peg$FAILED) {2629 s6.push(s7);2630 s7 = peg$parseWSC();2631 }2632 if (s6 !== peg$FAILED) {2633 s7 = peg$parseSingleBooleanClause();2634 if (s7 !== peg$FAILED) {2635 s8 = [];2636 s9 = peg$parseWSC();2637 while (s9 !== peg$FAILED) {2638 s8.push(s9);2639 s9 = peg$parseWSC();2640 }2641 if (s8 !== peg$FAILED) {2642 s5 = [s5, s6, s7, s8];2643 s4 = s5;2644 } else {2645 peg$currPos = s4;2646 s4 = peg$FAILED;2647 }2648 } else {2649 peg$currPos = s4;2650 s4 = peg$FAILED;2651 }2652 } else {2653 peg$currPos = s4;2654 s4 = peg$FAILED;2655 }2656 } else {2657 peg$currPos = s4;2658 s4 = peg$FAILED;2659 }2660 if (s4 !== peg$FAILED) {2661 while (s4 !== peg$FAILED) {2662 s3.push(s4);2663 s4 = peg$currPos;2664 if (input.substr(peg$currPos, 2) === peg$c109) {2665 s5 = peg$c109;2666 peg$currPos += 2;2667 } else {2668 s5 = peg$FAILED;2669 if (peg$silentFails === 0) {2670 peg$fail(peg$c110);2671 }2672 }2673 if (s5 !== peg$FAILED) {2674 s6 = [];2675 s7 = peg$parseWSC();2676 while (s7 !== peg$FAILED) {2677 s6.push(s7);2678 s7 = peg$parseWSC();2679 }2680 if (s6 !== peg$FAILED) {2681 s7 = peg$parseSingleBooleanClause();2682 if (s7 !== peg$FAILED) {2683 s8 = [];2684 s9 = peg$parseWSC();2685 while (s9 !== peg$FAILED) {2686 s8.push(s9);2687 s9 = peg$parseWSC();2688 }2689 if (s8 !== peg$FAILED) {2690 s5 = [s5, s6, s7, s8];2691 s4 = s5;2692 } else {2693 peg$currPos = s4;2694 s4 = peg$FAILED;2695 }2696 } else {2697 peg$currPos = s4;2698 s4 = peg$FAILED;2699 }2700 } else {2701 peg$currPos = s4;2702 s4 = peg$FAILED;2703 }2704 } else {2705 peg$currPos = s4;2706 s4 = peg$FAILED;2707 }2708 }2709 } else {2710 s3 = peg$FAILED;2711 }2712 if (s3 !== peg$FAILED) {2713 peg$savedPos = s0;2714 s1 = peg$c111(s1, s3);2715 s0 = s1;2716 } else {2717 peg$currPos = s0;2718 s0 = peg$FAILED;2719 }2720 } else {2721 peg$currPos = s0;2722 s0 = peg$FAILED;2723 }2724 } else {2725 peg$currPos = s0;2726 s0 = peg$FAILED;2727 }2728 return s0;2729 }2730 function peg$parseNotExpression(): any {2731 let s0, s1, s2;2732 s0 = peg$currPos;2733 if (input.charCodeAt(peg$currPos) === 33) {2734 s1 = peg$c112;2735 peg$currPos++;2736 } else {2737 s1 = peg$FAILED;2738 if (peg$silentFails === 0) {2739 peg$fail(peg$c113);2740 }2741 }2742 if (s1 !== peg$FAILED) {2743 s2 = peg$parseSingleBooleanClause();2744 if (s2 !== peg$FAILED) {2745 peg$savedPos = s0;2746 s1 = peg$c114(s2);2747 s0 = s1;2748 } else {2749 peg$currPos = s0;2750 s0 = peg$FAILED;2751 }2752 } else {2753 peg$currPos = s0;2754 s0 = peg$FAILED;2755 }2756 return s0;2757 }2758 function peg$parseBooleanExpression(): any {2759 let s0;2760 s0 = peg$parseAndExpression();2761 if (s0 === peg$FAILED) {2762 s0 = peg$parseOrExpression();2763 if (s0 === peg$FAILED) {2764 s0 = peg$parseNotExpression();2765 if (s0 === peg$FAILED) {2766 s0 = peg$parseBooleanBinaryOperation();2767 if (s0 === peg$FAILED) {2768 s0 = peg$parseTestCall();2769 if (s0 === peg$FAILED) {2770 s0 = peg$parseIdentifier();2771 if (s0 === peg$FAILED) {2772 s0 = peg$parseParenthesizedBooleanExpression();2773 }2774 }2775 }2776 }2777 }2778 }2779 return s0;2780 }2781 function peg$parseParenthesizedBooleanExpression(): any {2782 let s0, s1, s2, s3, s4, s5;2783 s0 = peg$currPos;2784 if (input.charCodeAt(peg$currPos) === 40) {2785 s1 = peg$c81;2786 peg$currPos++;2787 } else {2788 s1 = peg$FAILED;2789 if (peg$silentFails === 0) {2790 peg$fail(peg$c82);2791 }2792 }2793 if (s1 !== peg$FAILED) {2794 s2 = [];2795 s3 = peg$parseWSC();2796 while (s3 !== peg$FAILED) {2797 s2.push(s3);2798 s3 = peg$parseWSC();2799 }2800 if (s2 !== peg$FAILED) {2801 s3 = peg$parseBooleanExpression();2802 if (s3 !== peg$FAILED) {2803 s4 = [];2804 s5 = peg$parseWSC();2805 while (s5 !== peg$FAILED) {2806 s4.push(s5);2807 s5 = peg$parseWSC();2808 }2809 if (s4 !== peg$FAILED) {2810 if (input.charCodeAt(peg$currPos) === 41) {2811 s5 = peg$c83;2812 peg$currPos++;2813 } else {2814 s5 = peg$FAILED;2815 if (peg$silentFails === 0) {2816 peg$fail(peg$c84);2817 }2818 }2819 if (s5 !== peg$FAILED) {2820 peg$savedPos = s0;2821 s1 = peg$c115(s3);2822 s0 = s1;2823 } else {2824 peg$currPos = s0;2825 s0 = peg$FAILED;2826 }2827 } else {2828 peg$currPos = s0;2829 s0 = peg$FAILED;2830 }2831 } else {2832 peg$currPos = s0;2833 s0 = peg$FAILED;2834 }2835 } else {2836 peg$currPos = s0;2837 s0 = peg$FAILED;2838 }2839 } else {2840 peg$currPos = s0;2841 s0 = peg$FAILED;2842 }2843 return s0;2844 }2845 function peg$parseIfStatement(): any {2846 let s0, s1, s2, s3, s4, s5, s6, s7, s8;2847 s0 = peg$currPos;2848 s1 = peg$parseIfToken();2849 if (s1 !== peg$FAILED) {2850 s2 = [];2851 s3 = peg$parseWSC();2852 while (s3 !== peg$FAILED) {2853 s2.push(s3);2854 s3 = peg$parseWSC();2855 }2856 if (s2 !== peg$FAILED) {2857 s3 = peg$parseParenthesizedBooleanExpression();2858 if (s3 !== peg$FAILED) {2859 s4 = [];2860 s5 = peg$parseWSC();2861 while (s5 !== peg$FAILED) {2862 s4.push(s5);2863 s5 = peg$parseWSC();2864 }2865 if (s4 !== peg$FAILED) {2866 if (input.charCodeAt(peg$currPos) === 123) {2867 s5 = peg$c116;2868 peg$currPos++;2869 } else {2870 s5 = peg$FAILED;2871 if (peg$silentFails === 0) {2872 peg$fail(peg$c117);2873 }2874 }2875 if (s5 !== peg$FAILED) {2876 s6 = peg$parseStatementList();2877 if (s6 !== peg$FAILED) {2878 if (input.charCodeAt(peg$currPos) === 125) {2879 s7 = peg$c118;2880 peg$currPos++;2881 } else {2882 s7 = peg$FAILED;2883 if (peg$silentFails === 0) {2884 peg$fail(peg$c119);2885 }2886 }2887 if (s7 !== peg$FAILED) {2888 s8 = peg$parseElseClause();2889 if (s8 === peg$FAILED) {2890 s8 = null;2891 }2892 if (s8 !== peg$FAILED) {2893 peg$savedPos = s0;2894 s1 = peg$c120(s1, s3, s6, s8);2895 s0 = s1;2896 } else {2897 peg$currPos = s0;2898 s0 = peg$FAILED;2899 }2900 } else {2901 peg$currPos = s0;2902 s0 = peg$FAILED;2903 }2904 } else {2905 peg$currPos = s0;2906 s0 = peg$FAILED;2907 }2908 } else {2909 peg$currPos = s0;2910 s0 = peg$FAILED;2911 }2912 } else {2913 peg$currPos = s0;2914 s0 = peg$FAILED;2915 }2916 } else {2917 peg$currPos = s0;2918 s0 = peg$FAILED;2919 }2920 } else {2921 peg$currPos = s0;2922 s0 = peg$FAILED;2923 }2924 } else {2925 peg$currPos = s0;2926 s0 = peg$FAILED;2927 }2928 return s0;2929 }2930 function peg$parseElseClause(): any {2931 let s0, s1, s2, s3, s4, s5, s6, s7, s8;2932 s0 = peg$currPos;2933 s1 = [];2934 s2 = peg$parseWSC();2935 while (s2 !== peg$FAILED) {2936 s1.push(s2);2937 s2 = peg$parseWSC();2938 }2939 if (s1 !== peg$FAILED) {2940 s2 = peg$parseElseToken();2941 if (s2 !== peg$FAILED) {2942 s3 = [];2943 s4 = peg$parseWSC();2944 while (s4 !== peg$FAILED) {2945 s3.push(s4);2946 s4 = peg$parseWSC();2947 }2948 if (s3 !== peg$FAILED) {2949 if (input.charCodeAt(peg$currPos) === 123) {2950 s4 = peg$c116;2951 peg$currPos++;2952 } else {2953 s4 = peg$FAILED;2954 if (peg$silentFails === 0) {2955 peg$fail(peg$c117);2956 }2957 }2958 if (s4 !== peg$FAILED) {2959 s5 = [];2960 s6 = peg$parseWSC();2961 while (s6 !== peg$FAILED) {2962 s5.push(s6);2963 s6 = peg$parseWSC();2964 }2965 if (s5 !== peg$FAILED) {2966 s6 = peg$parseStatementList();2967 if (s6 === peg$FAILED) {2968 s6 = null;2969 }2970 if (s6 !== peg$FAILED) {2971 s7 = [];2972 s8 = peg$parseWSC();2973 while (s8 !== peg$FAILED) {2974 s7.push(s8);2975 s8 = peg$parseWSC();2976 }2977 if (s7 !== peg$FAILED) {2978 if (input.charCodeAt(peg$currPos) === 125) {2979 s8 = peg$c118;2980 peg$currPos++;2981 } else {2982 s8 = peg$FAILED;2983 if (peg$silentFails === 0) {2984 peg$fail(peg$c119);2985 }2986 }2987 if (s8 !== peg$FAILED) {2988 peg$savedPos = s0;2989 s1 = peg$c121(s2, s6);2990 s0 = s1;2991 } else {2992 peg$currPos = s0;2993 s0 = peg$FAILED;2994 }2995 } else {2996 peg$currPos = s0;2997 s0 = peg$FAILED;2998 }2999 } else {3000 peg$currPos = s0;3001 s0 = peg$FAILED;3002 }3003 } else {3004 peg$currPos = s0;3005 s0 = peg$FAILED;3006 }3007 } else {3008 peg$currPos = s0;3009 s0 = peg$FAILED;3010 }3011 } else {3012 peg$currPos = s0;3013 s0 = peg$FAILED;3014 }3015 } else {3016 peg$currPos = s0;3017 s0 = peg$FAILED;3018 }3019 } else {3020 peg$currPos = s0;3021 s0 = peg$FAILED;3022 }3023 return s0;3024 }3025 function peg$parseMessageDirectiveKeyword(): any {3026 let s0, s1;3027 s0 = peg$currPos;3028 if (input.substr(peg$currPos, 8) === peg$c122) {3029 s1 = peg$c122;3030 peg$currPos += 8;3031 } else {3032 s1 = peg$FAILED;3033 if (peg$silentFails === 0) {3034 peg$fail(peg$c123);3035 }3036 }3037 if (s1 !== peg$FAILED) {3038 peg$savedPos = s0;3039 s1 = peg$c124();3040 }3041 s0 = s1;3042 return s0;3043 }3044 function peg$parseMessageDirective(): any {3045 let s0, s1, s2, s3, s4, s5;3046 s0 = peg$currPos;3047 s1 = peg$parseMessageDirectiveKeyword();3048 if (s1 !== peg$FAILED) {3049 s2 = [];3050 if (input.charCodeAt(peg$currPos) === 32) {3051 s3 = peg$c6;3052 peg$currPos++;3053 } else {3054 s3 = peg$FAILED;3055 if (peg$silentFails === 0) {3056 peg$fail(peg$c7);3057 }3058 }3059 if (s3 !== peg$FAILED) {3060 while (s3 !== peg$FAILED) {3061 s2.push(s3);3062 if (input.charCodeAt(peg$currPos) === 32) {3063 s3 = peg$c6;3064 peg$currPos++;3065 } else {3066 s3 = peg$FAILED;3067 if (peg$silentFails === 0) {3068 peg$fail(peg$c7);3069 }3070 }3071 }3072 } else {3073 s2 = peg$FAILED;3074 }3075 if (s2 !== peg$FAILED) {3076 s3 = peg$parseDecimalLiteral();3077 if (s3 !== peg$FAILED) {3078 s4 = [];3079 if (input.charCodeAt(peg$currPos) === 32) {3080 s5 = peg$c6;3081 peg$currPos++;3082 } else {3083 s5 = peg$FAILED;3084 if (peg$silentFails === 0) {3085 peg$fail(peg$c7);3086 }3087 }3088 if (s5 !== peg$FAILED) {3089 while (s5 !== peg$FAILED) {3090 s4.push(s5);3091 if (input.charCodeAt(peg$currPos) === 32) {3092 s5 = peg$c6;3093 peg$currPos++;3094 } else {3095 s5 = peg$FAILED;3096 if (peg$silentFails === 0) {3097 peg$fail(peg$c7);3098 }3099 }3100 }3101 } else {3102 s4 = peg$FAILED;3103 }3104 if (s4 !== peg$FAILED) {3105 s5 = peg$parseStringLiteral();3106 if (s5 !== peg$FAILED) {3107 peg$savedPos = s0;3108 s1 = peg$c125(s1, s3, s5);3109 s0 = s1;3110 } else {3111 peg$currPos = s0;3112 s0 = peg$FAILED;3113 }3114 } else {3115 peg$currPos = s0;3116 s0 = peg$FAILED;3117 }3118 } else {3119 peg$currPos = s0;3120 s0 = peg$FAILED;3121 }3122 } else {3123 peg$currPos = s0;3124 s0 = peg$FAILED;3125 }3126 } else {3127 peg$currPos = s0;3128 s0 = peg$FAILED;3129 }3130 return s0;3131 }3132 function peg$parseIncludeDirectiveKeyword(): any {3133 let s0, s1;3134 s0 = peg$currPos;3135 if (input.substr(peg$currPos, 8) === peg$c126) {3136 s1 = peg$c126;3137 peg$currPos += 8;3138 } else {3139 s1 = peg$FAILED;3140 if (peg$silentFails === 0) {3141 peg$fail(peg$c127);3142 }3143 }3144 if (s1 !== peg$FAILED) {3145 peg$savedPos = s0;3146 s1 = peg$c128();3147 }3148 s0 = s1;3149 return s0;3150 }3151 function peg$parseIncludeDirective(): any {3152 let s0, s1, s2, s3;3153 s0 = peg$currPos;3154 s1 = peg$parseIncludeDirectiveKeyword();3155 if (s1 !== peg$FAILED) {3156 s2 = [];3157 if (input.charCodeAt(peg$currPos) === 32) {3158 s3 = peg$c6;3159 peg$currPos++;3160 } else {3161 s3 = peg$FAILED;3162 if (peg$silentFails === 0) {3163 peg$fail(peg$c7);3164 }3165 }3166 if (s3 !== peg$FAILED) {3167 while (s3 !== peg$FAILED) {3168 s2.push(s3);3169 if (input.charCodeAt(peg$currPos) === 32) {3170 s3 = peg$c6;3171 peg$currPos++;3172 } else {3173 s3 = peg$FAILED;3174 if (peg$silentFails === 0) {3175 peg$fail(peg$c7);3176 }3177 }3178 }3179 } else {3180 s2 = peg$FAILED;3181 }3182 if (s2 !== peg$FAILED) {3183 s3 = peg$parseStringLiteral();3184 if (s3 !== peg$FAILED) {3185 peg$savedPos = s0;3186 s1 = peg$c129(s1, s3);3187 s0 = s1;3188 } else {3189 peg$currPos = s0;3190 s0 = peg$FAILED;3191 }3192 } else {3193 peg$currPos = s0;3194 s0 = peg$FAILED;3195 }3196 } else {3197 peg$currPos = s0;3198 s0 = peg$FAILED;3199 }3200 return s0;3201 }3202 function peg$parseDefineDirectiveKeyword(): any {3203 let s0, s1;3204 s0 = peg$currPos;3205 if (input.substr(peg$currPos, 7) === peg$c130) {3206 s1 = peg$c130;3207 peg$currPos += 7;3208 } else {3209 s1 = peg$FAILED;3210 if (peg$silentFails === 0) {3211 peg$fail(peg$c131);3212 }3213 }3214 if (s1 !== peg$FAILED) {3215 peg$savedPos = s0;3216 s1 = peg$c132();3217 }3218 s0 = s1;3219 return s0;3220 }3221 function peg$parseDefineDirective(): any {3222 let s0, s1, s2, s3, s4, s5;3223 s0 = peg$currPos;3224 s1 = peg$parseDefineDirectiveKeyword();3225 if (s1 !== peg$FAILED) {3226 s2 = [];3227 if (input.charCodeAt(peg$currPos) === 32) {3228 s3 = peg$c6;3229 peg$currPos++;3230 } else {3231 s3 = peg$FAILED;3232 if (peg$silentFails === 0) {3233 peg$fail(peg$c7);3234 }3235 }3236 if (s3 !== peg$FAILED) {3237 while (s3 !== peg$FAILED) {3238 s2.push(s3);3239 if (input.charCodeAt(peg$currPos) === 32) {3240 s3 = peg$c6;3241 peg$currPos++;3242 } else {3243 s3 = peg$FAILED;3244 if (peg$silentFails === 0) {3245 peg$fail(peg$c7);3246 }3247 }3248 }3249 } else {3250 s2 = peg$FAILED;3251 }3252 if (s2 !== peg$FAILED) {3253 s3 = peg$parseIdentifier();3254 if (s3 !== peg$FAILED) {3255 s4 = [];3256 if (input.charCodeAt(peg$currPos) === 32) {3257 s5 = peg$c6;3258 peg$currPos++;3259 } else {3260 s5 = peg$FAILED;3261 if (peg$silentFails === 0) {3262 peg$fail(peg$c7);3263 }3264 }3265 if (s5 !== peg$FAILED) {3266 while (s5 !== peg$FAILED) {3267 s4.push(s5);3268 if (input.charCodeAt(peg$currPos) === 32) {3269 s5 = peg$c6;3270 peg$currPos++;3271 } else {3272 s5 = peg$FAILED;3273 if (peg$silentFails === 0) {3274 peg$fail(peg$c7);3275 }3276 }3277 }3278 } else {3279 s4 = peg$FAILED;3280 }3281 if (s4 !== peg$FAILED) {3282 s5 = peg$parseIdentifier();3283 if (s5 === peg$FAILED) {3284 s5 = peg$parseLiteral();3285 }3286 if (s5 !== peg$FAILED) {3287 peg$savedPos = s0;3288 s1 = peg$c133(s1, s3, s5);3289 s0 = s1;3290 } else {3291 peg$currPos = s0;3292 s0 = peg$FAILED;3293 }3294 } else {3295 peg$currPos = s0;3296 s0 = peg$FAILED;3297 }3298 } else {3299 peg$currPos = s0;3300 s0 = peg$FAILED;3301 }3302 } else {3303 peg$currPos = s0;3304 s0 = peg$FAILED;3305 }3306 } else {3307 peg$currPos = s0;3308 s0 = peg$FAILED;3309 }3310 return s0;3311 }3312 function peg$parseUnaryOperationStatement(): any {3313 let s0, s1, s2, s3, s4, s5;3314 s0 = peg$currPos;3315 s1 = peg$parseIdentifier();3316 if (s1 !== peg$FAILED) {3317 s2 = [];3318 s3 = peg$parseWSC();3319 while (s3 !== peg$FAILED) {3320 s2.push(s3);3321 s3 = peg$parseWSC();3322 }3323 if (s2 !== peg$FAILED) {3324 if (input.substr(peg$currPos, 2) === peg$c134) {3325 s3 = peg$c134;3326 peg$currPos += 2;3327 } else {3328 s3 = peg$FAILED;3329 if (peg$silentFails === 0) {3330 peg$fail(peg$c135);3331 }3332 }3333 if (s3 === peg$FAILED) {3334 if (input.substr(peg$currPos, 2) === peg$c136) {3335 s3 = peg$c136;3336 peg$currPos += 2;3337 } else {3338 s3 = peg$FAILED;3339 if (peg$silentFails === 0) {3340 peg$fail(peg$c137);3341 }3342 }3343 }3344 if (s3 !== peg$FAILED) {3345 s4 = [];3346 s5 = peg$parseWSC();3347 while (s5 !== peg$FAILED) {3348 s4.push(s5);3349 s5 = peg$parseWSC();3350 }3351 if (s4 !== peg$FAILED) {3352 if (input.charCodeAt(peg$currPos) === 59) {3353 s5 = peg$c85;3354 peg$currPos++;3355 } else {3356 s5 = peg$FAILED;3357 if (peg$silentFails === 0) {3358 peg$fail(peg$c86);3359 }3360 }3361 if (s5 !== peg$FAILED) {3362 peg$savedPos = s0;3363 s1 = peg$c138(s1, s3);3364 s0 = s1;3365 } else {3366 peg$currPos = s0;3367 s0 = peg$FAILED;3368 }3369 } else {3370 peg$currPos = s0;3371 s0 = peg$FAILED;3372 }3373 } else {3374 peg$currPos = s0;3375 s0 = peg$FAILED;3376 }3377 } else {3378 peg$currPos = s0;3379 s0 = peg$FAILED;3380 }3381 } else {3382 peg$currPos = s0;3383 s0 = peg$FAILED;3384 }3385 return s0;3386 }3387 function peg$parseValueAssignmentStatement(): any {3388 let s0, s1, s2, s3, s4, s5, s6;3389 s0 = peg$currPos;3390 s1 = peg$parseIdentifier();3391 if (s1 !== peg$FAILED) {3392 s2 = [];3393 s3 = peg$parseWSC();3394 while (s3 !== peg$FAILED) {3395 s2.push(s3);3396 s3 = peg$parseWSC();3397 }3398 if (s2 !== peg$FAILED) {3399 if (input.charCodeAt(peg$currPos) === 61) {3400 s3 = peg$c139;3401 peg$currPos++;3402 } else {3403 s3 = peg$FAILED;3404 if (peg$silentFails === 0) {3405 peg$fail(peg$c140);3406 }3407 }3408 if (s3 !== peg$FAILED) {3409 s4 = [];3410 s5 = peg$parseWSC();3411 while (s5 !== peg$FAILED) {3412 s4.push(s5);3413 s5 = peg$parseWSC();3414 }3415 if (s4 !== peg$FAILED) {3416 s5 = peg$parseIdentifier();3417 if (s5 === peg$FAILED) {3418 s5 = peg$parseNumericLiteral();3419 }3420 if (s5 !== peg$FAILED) {3421 if (input.charCodeAt(peg$currPos) === 59) {3422 s6 = peg$c85;3423 peg$currPos++;3424 } else {3425 s6 = peg$FAILED;3426 if (peg$silentFails === 0) {3427 peg$fail(peg$c86);3428 }3429 }3430 if (s6 !== peg$FAILED) {3431 peg$savedPos = s0;3432 s1 = peg$c141(s1, s5);3433 s0 = s1;3434 } else {3435 peg$currPos = s0;3436 s0 = peg$FAILED;3437 }3438 } else {3439 peg$currPos = s0;3440 s0 = peg$FAILED;3441 }3442 } else {3443 peg$currPos = s0;3444 s0 = peg$FAILED;3445 }3446 } else {3447 peg$currPos = s0;3448 s0 = peg$FAILED;3449 }3450 } else {3451 peg$currPos = s0;3452 s0 = peg$FAILED;3453 }3454 } else {3455 peg$currPos = s0;3456 s0 = peg$FAILED;3457 }3458 return s0;3459 }3460 function peg$parseArithmeticOperator(): any {3461 let s0;3462 if (input.charCodeAt(peg$currPos) === 43) {3463 s0 = peg$c142;3464 peg$currPos++;3465 } else {3466 s0 = peg$FAILED;3467 if (peg$silentFails === 0) {3468 peg$fail(peg$c143);3469 }3470 }3471 if (s0 === peg$FAILED) {3472 if (input.charCodeAt(peg$currPos) === 45) {3473 s0 = peg$c144;3474 peg$currPos++;3475 } else {3476 s0 = peg$FAILED;3477 if (peg$silentFails === 0) {3478 peg$fail(peg$c145);3479 }3480 }3481 if (s0 === peg$FAILED) {3482 if (input.charCodeAt(peg$currPos) === 42) {3483 s0 = peg$c146;3484 peg$currPos++;3485 } else {3486 s0 = peg$FAILED;3487 if (peg$silentFails === 0) {3488 peg$fail(peg$c147);3489 }3490 }3491 if (s0 === peg$FAILED) {3492 if (input.charCodeAt(peg$currPos) === 47) {3493 s0 = peg$c148;3494 peg$currPos++;3495 } else {3496 s0 = peg$FAILED;3497 if (peg$silentFails === 0) {3498 peg$fail(peg$c149);3499 }3500 }3501 }3502 }3503 }3504 return s0;3505 }3506 function peg$parseLongArithmeticAssignmentStatementLeft(): any {3507 let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;3508 s0 = peg$currPos;3509 s1 = peg$parseIdentifier();3510 if (s1 !== peg$FAILED) {3511 s2 = [];3512 s3 = peg$parseWSC();3513 while (s3 !== peg$FAILED) {3514 s2.push(s3);3515 s3 = peg$parseWSC();3516 }3517 if (s2 !== peg$FAILED) {3518 if (input.charCodeAt(peg$currPos) === 61) {3519 s3 = peg$c139;3520 peg$currPos++;3521 } else {3522 s3 = peg$FAILED;3523 if (peg$silentFails === 0) {3524 peg$fail(peg$c140);3525 }3526 }3527 if (s3 !== peg$FAILED) {3528 s4 = [];3529 s5 = peg$parseWSC();3530 while (s5 !== peg$FAILED) {3531 s4.push(s5);3532 s5 = peg$parseWSC();3533 }3534 if (s4 !== peg$FAILED) {3535 s5 = peg$parseIdentifier();3536 if (s5 !== peg$FAILED) {3537 s6 = [];3538 s7 = peg$parseWSC();3539 while (s7 !== peg$FAILED) {3540 s6.push(s7);3541 s7 = peg$parseWSC();3542 }3543 if (s6 !== peg$FAILED) {3544 s7 = peg$parseArithmeticOperator();3545 if (s7 !== peg$FAILED) {3546 s8 = [];3547 s9 = peg$parseWSC();3548 while (s9 !== peg$FAILED) {3549 s8.push(s9);3550 s9 = peg$parseWSC();3551 }3552 if (s8 !== peg$FAILED) {3553 s9 = peg$parseIdentifier();3554 if (s9 === peg$FAILED) {3555 s9 = peg$parseNumericLiteral();3556 }3557 if (s9 !== peg$FAILED) {3558 s10 = [];3559 s11 = peg$parseWSC();3560 while (s11 !== peg$FAILED) {3561 s10.push(s11);3562 s11 = peg$parseWSC();3563 }3564 if (s10 !== peg$FAILED) {3565 if (input.charCodeAt(peg$currPos) === 59) {3566 s11 = peg$c85;3567 peg$currPos++;3568 } else {3569 s11 = peg$FAILED;3570 if (peg$silentFails === 0) {3571 peg$fail(peg$c86);3572 }3573 }3574 if (s11 !== peg$FAILED) {3575 peg$savedPos = peg$currPos;3576 s12 = peg$c150(s1, s5, s7, s9);3577 if (s12) {3578 s12 = undefined;3579 } else {3580 s12 = peg$FAILED;3581 }3582 if (s12 !== peg$FAILED) {3583 peg$savedPos = s0;3584 s1 = peg$c151(s1, s5, s7, s9);3585 s0 = s1;3586 } else {3587 peg$currPos = s0;3588 s0 = peg$FAILED;3589 }3590 } else {3591 peg$currPos = s0;3592 s0 = peg$FAILED;3593 }3594 } else {3595 peg$currPos = s0;3596 s0 = peg$FAILED;3597 }3598 } else {3599 peg$currPos = s0;3600 s0 = peg$FAILED;3601 }3602 } else {3603 peg$currPos = s0;3604 s0 = peg$FAILED;3605 }3606 } else {3607 peg$currPos = s0;3608 s0 = peg$FAILED;3609 }3610 } else {3611 peg$currPos = s0;3612 s0 = peg$FAILED;3613 }3614 } else {3615 peg$currPos = s0;3616 s0 = peg$FAILED;3617 }3618 } else {3619 peg$currPos = s0;3620 s0 = peg$FAILED;3621 }3622 } else {3623 peg$currPos = s0;3624 s0 = peg$FAILED;3625 }3626 } else {3627 peg$currPos = s0;3628 s0 = peg$FAILED;3629 }3630 } else {3631 peg$currPos = s0;3632 s0 = peg$FAILED;3633 }3634 return s0;3635 }3636 function peg$parseLongArithmeticAssignmentStatementRight(): any {3637 let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;3638 s0 = peg$currPos;3639 s1 = peg$parseIdentifier();3640 if (s1 !== peg$FAILED) {3641 s2 = [];3642 s3 = peg$parseWSC();3643 while (s3 !== peg$FAILED) {3644 s2.push(s3);3645 s3 = peg$parseWSC();3646 }3647 if (s2 !== peg$FAILED) {3648 if (input.charCodeAt(peg$currPos) === 61) {3649 s3 = peg$c139;3650 peg$currPos++;3651 } else {3652 s3 = peg$FAILED;3653 if (peg$silentFails === 0) {3654 peg$fail(peg$c140);3655 }3656 }3657 if (s3 !== peg$FAILED) {3658 s4 = [];3659 s5 = peg$parseWSC();3660 while (s5 !== peg$FAILED) {3661 s4.push(s5);3662 s5 = peg$parseWSC();3663 }3664 if (s4 !== peg$FAILED) {3665 s5 = peg$parseIdentifier();3666 if (s5 === peg$FAILED) {3667 s5 = peg$parseNumericLiteral();3668 }3669 if (s5 !== peg$FAILED) {3670 s6 = [];3671 s7 = peg$parseWSC();3672 while (s7 !== peg$FAILED) {3673 s6.push(s7);3674 s7 = peg$parseWSC();3675 }3676 if (s6 !== peg$FAILED) {3677 s7 = peg$parseArithmeticOperator();3678 if (s7 !== peg$FAILED) {3679 s8 = [];3680 s9 = peg$parseWSC();3681 while (s9 !== peg$FAILED) {3682 s8.push(s9);3683 s9 = peg$parseWSC();3684 }3685 if (s8 !== peg$FAILED) {3686 s9 = peg$parseIdentifier();3687 if (s9 !== peg$FAILED) {3688 s10 = [];3689 s11 = peg$parseWSC();3690 while (s11 !== peg$FAILED) {3691 s10.push(s11);3692 s11 = peg$parseWSC();3693 }3694 if (s10 !== peg$FAILED) {3695 if (input.charCodeAt(peg$currPos) === 59) {3696 s11 = peg$c85;3697 peg$currPos++;3698 } else {3699 s11 = peg$FAILED;3700 if (peg$silentFails === 0) {3701 peg$fail(peg$c86);3702 }3703 }3704 if (s11 !== peg$FAILED) {3705 peg$savedPos = peg$currPos;3706 s12 = peg$c152(s1, s5, s7, s9);3707 if (s12) {3708 s12 = undefined;3709 } else {3710 s12 = peg$FAILED;3711 }3712 if (s12 !== peg$FAILED) {3713 peg$savedPos = s0;3714 s1 = peg$c153(s1, s5, s7, s9);3715 s0 = s1;3716 } else {3717 peg$currPos = s0;3718 s0 = peg$FAILED;3719 }3720 } else {3721 peg$currPos = s0;3722 s0 = peg$FAILED;3723 }3724 } else {3725 peg$currPos = s0;3726 s0 = peg$FAILED;3727 }3728 } else {3729 peg$currPos = s0;3730 s0 = peg$FAILED;3731 }3732 } else {3733 peg$currPos = s0;3734 s0 = peg$FAILED;3735 }3736 } else {3737 peg$currPos = s0;3738 s0 = peg$FAILED;3739 }3740 } else {3741 peg$currPos = s0;3742 s0 = peg$FAILED;3743 }3744 } else {3745 peg$currPos = s0;3746 s0 = peg$FAILED;3747 }3748 } else {3749 peg$currPos = s0;3750 s0 = peg$FAILED;3751 }3752 } else {3753 peg$currPos = s0;3754 s0 = peg$FAILED;3755 }3756 } else {3757 peg$currPos = s0;3758 s0 = peg$FAILED;3759 }3760 } else {3761 peg$currPos = s0;3762 s0 = peg$FAILED;3763 }3764 return s0;3765 }3766 function peg$parseShortArithmeticAssignmentStatement(): any {3767 let s0, s1, s2, s3, s4, s5, s6, s7, s8;3768 s0 = peg$currPos;3769 s1 = peg$parseIdentifier();3770 if (s1 !== peg$FAILED) {3771 s2 = [];3772 s3 = peg$parseWSC();3773 while (s3 !== peg$FAILED) {3774 s2.push(s3);3775 s3 = peg$parseWSC();3776 }3777 if (s2 !== peg$FAILED) {3778 s3 = peg$parseArithmeticOperator();3779 if (s3 !== peg$FAILED) {3780 if (input.charCodeAt(peg$currPos) === 61) {3781 s4 = peg$c139;3782 peg$currPos++;3783 } else {3784 s4 = peg$FAILED;3785 if (peg$silentFails === 0) {3786 peg$fail(peg$c140);3787 }3788 }3789 if (s4 !== peg$FAILED) {3790 s5 = [];3791 s6 = peg$parseWSC();3792 while (s6 !== peg$FAILED) {3793 s5.push(s6);3794 s6 = peg$parseWSC();3795 }3796 if (s5 !== peg$FAILED) {3797 s6 = peg$parseIdentifier();3798 if (s6 === peg$FAILED) {3799 s6 = peg$parseNumericLiteral();3800 }3801 if (s6 !== peg$FAILED) {3802 s7 = [];3803 s8 = peg$parseWSC();3804 while (s8 !== peg$FAILED) {3805 s7.push(s8);3806 s8 = peg$parseWSC();3807 }3808 if (s7 !== peg$FAILED) {3809 if (input.charCodeAt(peg$currPos) === 59) {3810 s8 = peg$c85;3811 peg$currPos++;3812 } else {3813 s8 = peg$FAILED;3814 if (peg$silentFails === 0) {3815 peg$fail(peg$c86);3816 }3817 }3818 if (s8 !== peg$FAILED) {3819 peg$savedPos = s0;3820 s1 = peg$c154(s1, s3, s6);3821 s0 = s1;3822 } else {3823 peg$currPos = s0;3824 s0 = peg$FAILED;3825 }3826 } else {3827 peg$currPos = s0;3828 s0 = peg$FAILED;3829 }3830 } else {3831 peg$currPos = s0;3832 s0 = peg$FAILED;3833 }3834 } else {3835 peg$currPos = s0;3836 s0 = peg$FAILED;3837 }3838 } else {3839 peg$currPos = s0;3840 s0 = peg$FAILED;3841 }3842 } else {3843 peg$currPos = s0;3844 s0 = peg$FAILED;3845 }3846 } else {3847 peg$currPos = s0;3848 s0 = peg$FAILED;3849 }3850 } else {3851 peg$currPos = s0;3852 s0 = peg$FAILED;3853 }3854 return s0;3855 }3856 function peg$parseArithmeticAssignmentStatement(): any {3857 let s0;3858 s0 = peg$parseLongArithmeticAssignmentStatementLeft();3859 if (s0 === peg$FAILED) {3860 s0 = peg$parseLongArithmeticAssignmentStatementRight();3861 if (s0 === peg$FAILED) {3862 s0 = peg$parseShortArithmeticAssignmentStatement();3863 }3864 }3865 return s0;3866 }3867 function peg$parseLeftIndirectAssignmentStatement(): any {3868 let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;3869 s0 = peg$currPos;3870 if (input.charCodeAt(peg$currPos) === 42) {3871 s1 = peg$c146;3872 peg$currPos++;3873 } else {3874 s1 = peg$FAILED;3875 if (peg$silentFails === 0) {3876 peg$fail(peg$c147);3877 }3878 }3879 if (s1 !== peg$FAILED) {3880 s2 = [];3881 s3 = peg$parseWSC();3882 while (s3 !== peg$FAILED) {3883 s2.push(s3);3884 s3 = peg$parseWSC();3885 }3886 if (s2 !== peg$FAILED) {3887 s3 = peg$parseIdentifier();3888 if (s3 !== peg$FAILED) {3889 s4 = [];3890 s5 = peg$parseWSC();3891 while (s5 !== peg$FAILED) {3892 s4.push(s5);3893 s5 = peg$parseWSC();3894 }3895 if (s4 !== peg$FAILED) {3896 if (input.charCodeAt(peg$currPos) === 61) {3897 s5 = peg$c139;3898 peg$currPos++;3899 } else {3900 s5 = peg$FAILED;3901 if (peg$silentFails === 0) {3902 peg$fail(peg$c140);3903 }3904 }3905 if (s5 !== peg$FAILED) {3906 s6 = [];3907 s7 = peg$parseWSC();3908 while (s7 !== peg$FAILED) {3909 s6.push(s7);3910 s7 = peg$parseWSC();3911 }3912 if (s6 !== peg$FAILED) {3913 s7 = peg$parseIdentifier();3914 if (s7 === peg$FAILED) {3915 s7 = peg$parseNumericLiteral();3916 }3917 if (s7 !== peg$FAILED) {3918 s8 = [];3919 s9 = peg$parseWSC();3920 while (s9 !== peg$FAILED) {3921 s8.push(s9);3922 s9 = peg$parseWSC();3923 }3924 if (s8 !== peg$FAILED) {3925 if (input.charCodeAt(peg$currPos) === 59) {3926 s9 = peg$c85;3927 peg$currPos++;3928 } else {3929 s9 = peg$FAILED;3930 if (peg$silentFails === 0) {3931 peg$fail(peg$c86);3932 }3933 }3934 if (s9 !== peg$FAILED) {3935 peg$savedPos = s0;3936 s1 = peg$c155(s3, s7);3937 s0 = s1;3938 } else {3939 peg$currPos = s0;3940 s0 = peg$FAILED;3941 }3942 } else {3943 peg$currPos = s0;3944 s0 = peg$FAILED;3945 }3946 } else {3947 peg$currPos = s0;3948 s0 = peg$FAILED;3949 }3950 } else {3951 peg$currPos = s0;3952 s0 = peg$FAILED;3953 }3954 } else {3955 peg$currPos = s0;3956 s0 = peg$FAILED;3957 }3958 } else {3959 peg$currPos = s0;3960 s0 = peg$FAILED;3961 }3962 } else {3963 peg$currPos = s0;3964 s0 = peg$FAILED;3965 }3966 } else {3967 peg$currPos = s0;3968 s0 = peg$FAILED;3969 }3970 } else {3971 peg$currPos = s0;3972 s0 = peg$FAILED;3973 }3974 return s0;3975 }3976 function peg$parseRightIndirectAssignmentStatement(): any {3977 let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;3978 s0 = peg$currPos;3979 s1 = peg$parseIdentifier();3980 if (s1 !== peg$FAILED) {3981 s2 = [];3982 s3 = peg$parseWSC();3983 while (s3 !== peg$FAILED) {3984 s2.push(s3);3985 s3 = peg$parseWSC();3986 }3987 if (s2 !== peg$FAILED) {3988 if (input.charCodeAt(peg$currPos) === 61) {3989 s3 = peg$c139;3990 peg$currPos++;3991 } else {3992 s3 = peg$FAILED;3993 if (peg$silentFails === 0) {3994 peg$fail(peg$c140);3995 }3996 }3997 if (s3 !== peg$FAILED) {3998 s4 = [];3999 s5 = peg$parseWSC();4000 while (s5 !== peg$FAILED) {4001 s4.push(s5);4002 s5 = peg$parseWSC();4003 }4004 if (s4 !== peg$FAILED) {4005 if (input.charCodeAt(peg$currPos) === 42) {4006 s5 = peg$c146;4007 peg$currPos++;4008 } else {4009 s5 = peg$FAILED;4010 if (peg$silentFails === 0) {4011 peg$fail(peg$c147);4012 }4013 }4014 if (s5 !== peg$FAILED) {4015 s6 = [];4016 s7 = peg$parseWSC();4017 while (s7 !== peg$FAILED) {4018 s6.push(s7);4019 s7 = peg$parseWSC();4020 }4021 if (s6 !== peg$FAILED) {4022 s7 = peg$parseIdentifier();4023 if (s7 !== peg$FAILED) {4024 s8 = [];4025 s9 = peg$parseWSC();4026 while (s9 !== peg$FAILED) {4027 s8.push(s9);4028 s9 = peg$parseWSC();4029 }4030 if (s8 !== peg$FAILED) {4031 if (input.charCodeAt(peg$currPos) === 59) {4032 s9 = peg$c85;4033 peg$currPos++;4034 } else {4035 s9 = peg$FAILED;4036 if (peg$silentFails === 0) {4037 peg$fail(peg$c86);4038 }4039 }4040 if (s9 !== peg$FAILED) {4041 peg$savedPos = s0;4042 s1 = peg$c156(s1, s7);4043 s0 = s1;4044 } else {4045 peg$currPos = s0;4046 s0 = peg$FAILED;4047 }4048 } else {4049 peg$currPos = s0;4050 s0 = peg$FAILED;4051 }4052 } else {4053 peg$currPos = s0;4054 s0 = peg$FAILED;4055 }4056 } else {4057 peg$currPos = s0;4058 s0 = peg$FAILED;4059 }4060 } else {4061 peg$currPos = s0;4062 s0 = peg$FAILED;4063 }4064 } else {4065 peg$currPos = s0;4066 s0 = peg$FAILED;4067 }4068 } else {4069 peg$currPos = s0;4070 s0 = peg$FAILED;4071 }4072 } else {4073 peg$currPos = s0;4074 s0 = peg$FAILED;4075 }4076 } else {4077 peg$currPos = s0;4078 s0 = peg$FAILED;4079 }4080 return s0;4081 }4082 function peg$parseStatement(): any {4083 let s0;4084 s0 = peg$parseLabel();4085 if (s0 === peg$FAILED) {4086 s0 = peg$parseCommandCall();4087 if (s0 === peg$FAILED) {4088 s0 = peg$parseIfStatement();4089 if (s0 === peg$FAILED) {4090 s0 = peg$parseComment();4091 if (s0 === peg$FAILED) {4092 s0 = peg$parseMessageDirective();4093 if (s0 === peg$FAILED) {4094 s0 = peg$parseIncludeDirective();4095 if (s0 === peg$FAILED) {4096 s0 = peg$parseDefineDirective();4097 if (s0 === peg$FAILED) {4098 s0 = peg$parseUnaryOperationStatement();4099 if (s0 === peg$FAILED) {4100 s0 = peg$parseValueAssignmentStatement();4101 if (s0 === peg$FAILED) {4102 s0 = peg$parseArithmeticAssignmentStatement();4103 if (s0 === peg$FAILED) {4104 s0 = peg$parseLeftIndirectAssignmentStatement();4105 if (s0 === peg$FAILED) {4106 s0 = peg$parseRightIndirectAssignmentStatement();4107 }4108 }4109 }4110 }4111 }4112 }4113 }4114 }4115 }4116 }4117 }4118 return s0;4119 }4120 function peg$parseStatementList(): any {4121 let s0, s1, s2, s3, s4, s5, s6;4122 s0 = peg$currPos;4123 s1 = [];4124 s2 = peg$currPos;4125 s3 = [];4126 s4 = peg$parseWhiteSpace();4127 while (s4 !== peg$FAILED) {4128 s3.push(s4);4129 s4 = peg$parseWhiteSpace();4130 }4131 if (s3 !== peg$FAILED) {4132 s4 = peg$parseStatement();4133 if (s4 !== peg$FAILED) {4134 s5 = [];4135 s6 = peg$parseWhiteSpace();4136 while (s6 !== peg$FAILED) {4137 s5.push(s6);4138 s6 = peg$parseWhiteSpace();4139 }4140 if (s5 !== peg$FAILED) {4141 s3 = [s3, s4, s5];4142 s2 = s3;4143 } else {4144 peg$currPos = s2;4145 s2 = peg$FAILED;4146 }4147 } else {4148 peg$currPos = s2;4149 s2 = peg$FAILED;4150 }4151 } else {4152 peg$currPos = s2;4153 s2 = peg$FAILED;4154 }4155 while (s2 !== peg$FAILED) {4156 s1.push(s2);4157 s2 = peg$currPos;4158 s3 = [];4159 s4 = peg$parseWhiteSpace();4160 while (s4 !== peg$FAILED) {4161 s3.push(s4);4162 s4 = peg$parseWhiteSpace();4163 }4164 if (s3 !== peg$FAILED) {4165 s4 = peg$parseStatement();4166 if (s4 !== peg$FAILED) {4167 s5 = [];4168 s6 = peg$parseWhiteSpace();4169 while (s6 !== peg$FAILED) {4170 s5.push(s6);4171 s6 = peg$parseWhiteSpace();4172 }4173 if (s5 !== peg$FAILED) {4174 s3 = [s3, s4, s5];4175 s2 = s3;4176 } else {4177 peg$currPos = s2;4178 s2 = peg$FAILED;4179 }4180 } else {4181 peg$currPos = s2;4182 s2 = peg$FAILED;4183 }4184 } else {4185 peg$currPos = s2;4186 s2 = peg$FAILED;4187 }4188 }4189 if (s1 !== peg$FAILED) {4190 peg$savedPos = s0;4191 s1 = peg$c157(s1);4192 }4193 s0 = s1;4194 return s0;4195 }4196 peg$result = peg$startRuleFunction();4197 if (peg$result !== peg$FAILED && peg$currPos === input.length) {4198 return peg$result;4199 } else {4200 if (peg$result !== peg$FAILED && peg$currPos < input.length) {4201 peg$fail(peg$endExpectation());4202 }4203 throw peg$buildStructuredError(4204 peg$maxFailExpected,4205 peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,4206 peg$maxFailPos < input.length4207 ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)4208 : peg$computeLocation(peg$maxFailPos, peg$maxFailPos),4209 );4210 }4211}4212export interface IParseOptions {4213 filename?: string;4214 startRule?: string;4215 tracer?: any;4216 [key: string]: any;4217}4218export type ParseFunction = (input: string, options?: IParseOptions) => any;...
APIErrors.js
Source:APIErrors.js
1import { defineMessages } from 'react-intl'2const ns = 'app.APIErrors'3const m = defineMessages({4 'key-is-already-confirmed': {5 defaultMessage: 'Key is already confirmed',6 id: `${ns}.key-is-already-confirmed`7 },8 'too-many-cc-addresses': {9 defaultMessage: 'Too many CC addresses',10 id: `${ns}.too-many-cc-addresses`11 },12 'plan-id-is-invalid': {13 defaultMessage: 'The plan id is invalid',14 id: `${ns}.plan-id-is-invalid`15 },16 'server-error-api-error': {17 defaultMessage: 'There was a server side api error please try again',18 id: `${ns}.server-error-api-error`19 },20 'change-password-auth-failed': {21 defaultMessage: 'Authentication failed',22 id: `${ns}.change-password-auth-failed`23 },24 'add-failed': {25 defaultMessage: 'Add failed',26 id: `${ns}.add-failed`27 },28 'email-address-already-confirmed-different-account': {29 defaultMessage: 'The email address is confirmed on different account',30 id: `${ns}.email-address-already-confirmed-different-account`31 },32 'server-error-request-failed-dont-try-again': {33 defaultMessage: 'The request failed dont try again',34 id: `${ns}.server-error-request-failed-dont-try-again`35 },36 'email-address-not-active': {37 defaultMessage: 'Email address is not set to active',38 id: `${ns}.email-address-not-active`39 },40 'invalid-decrypt-token': {41 defaultMessage: 'Invalid decrypt token',42 id: `${ns}.invalid-decrypt-token`43 },44 'no-plans-available': {45 defaultMessage: 'There are no plans available',46 id: `${ns}.no-plans-available`47 },48 'request-exceeds-max': {49 defaultMessage: 'The request exceeds maximum allowed',50 id: `${ns}.request-exceeds-max`51 },52 'email-address-already-confirmed': {53 defaultMessage: 'The email address is already confirmed',54 id: `${ns}.email-address-already-confirmed`55 },56 'update-failed': {57 defaultMessage: 'Update failed',58 id: `${ns}.update-failed`59 },60 'invalid-request-missing-id': {61 defaultMessage: 'Invalid request missing id',62 id: `${ns}.invalid-request-missing-id`63 },64 'password-reset-request-expired': {65 defaultMessage: 'Password reset request is expired',66 id: `${ns}.password-reset-request-expired`67 },68 'contact-email-duplicate': {69 defaultMessage: 'The contact (email address) exists',70 id: `${ns}.contact-email-duplicate`71 },72 'domain-not-available': {73 defaultMessage: 'Domain not available',74 id: `${ns}.domain-not-available`75 },76 'email-address-duplicate-on-your-account': {77 defaultMessage: 'The email address is already in use by your account',78 id: `${ns}.email-address-duplicate-on-your-account`79 },80 'username-not-available': {81 defaultMessage: 'The username is not available',82 id: `${ns}.username-not-available`83 },84 'user-credit-grather-than-price': {85 defaultMessage: 'Your available user credit is greater than price',86 id: `${ns}.user-credit-grather-than-price`87 },88 'http-pickup-failure-expired': {89 defaultMessage: 'Message is expired',90 id: `${ns}.http-pickup-failure-expired`91 },92 'invalid-mailbox-action-type': {93 defaultMessage: 'The mailbox action type is invalid',94 id: `${ns}.invalid-mailbox-action-type`95 },96 'invalid-pem-format': {97 defaultMessage: 'Invalid pem format',98 id: `${ns}.invalid-pem-format`99 },100 'domain-is-premium-not-supported': {101 defaultMessage: 'Domain is premium class - not supported at this time',102 id: `${ns}.domain-is-premium-not-supported`103 },104 'email-bad-grammar': {105 defaultMessage: 'The email address provided has bad grammar',106 id: `${ns}.email-bad-grammar`107 },108 'login-failed': {109 defaultMessage: 'Incorrect credentials',110 id: `${ns}.login-failed`111 },112 'vcard-parse-error': {113 defaultMessage: 'There was an error parsing the vcard data',114 id: `${ns}.vcard-parse-error`115 },116 'identity-email-grammar-error': {117 defaultMessage: 'The email address does not meet grammar requirements',118 id: `${ns}.identity-email-grammar-error`119 },120 'payment-failed-to-process': {121 defaultMessage: 'Payment failed to process',122 id: `${ns}.payment-failed-to-process`123 },124 'http-pickup-failure-message-not-configured': {125 defaultMessage: 'Message is not configured for http pickup',126 id: `${ns}.http-pickup-failure-message-not-configured`127 },128 'missing-cc-info': {129 defaultMessage: 'Missing credit card information',130 id: `${ns}.missing-cc-info`131 },132 'coupon-already-used': {133 defaultMessage: 'The coupon has already been used',134 id: `${ns}.coupon-already-used`135 },136 'invalid-key-owner-type': {137 defaultMessage: 'Invalid key owner type',138 id: `${ns}.invalid-key-owner-type`139 },140 'max-identities-upgrade-your-plan': {141 defaultMessage: 'Max identities reached. Please upgrade your plan',142 id: `${ns}.max-identities-upgrade-your-plan`143 },144 'invalid-request': {145 defaultMessage: 'Invalid request',146 id: `${ns}.invalid-request`147 },148 'username-bad-grammar': {149 defaultMessage: 'Please try another username',150 id: `${ns}.username-bad-grammar`151 },152 'connection-not-available': {153 defaultMessage: 'Connection not available',154 id: `${ns}.connection-not-available`155 },156 'invalid-arguments': {157 defaultMessage: 'Invalid arguments',158 id: `${ns}.invalid-arguments`159 },160 'key-is-duplicate': {161 defaultMessage: 'Key is duplicate',162 id: `${ns}.key-is-duplicate`163 },164 'email-address-is-not-valid': {165 defaultMessage: 'Email address is not valid',166 id: `${ns}.email-address-is-not-valid`167 },168 'no-features-available': {169 defaultMessage: 'There are no features available',170 id: `${ns}.no-features-available`171 },172 'email-address-must-be-confirmed': {173 defaultMessage: 'Email address not confirmed',174 id: `${ns}.email-address-must-be-confirmed`175 },176 'invalid-coupon': {177 defaultMessage: 'The coupon is invalid',178 id: `${ns}.invalid-coupon`179 },180 'invalid-date-interval': {181 defaultMessage: 'Invalid date interval, use hour/day/year/week',182 id: `${ns}.invalid-date-interval`183 },184 'domain-service-not-available': {185 defaultMessage: 'Domain service not available',186 id: `${ns}.domain-service-not-available`187 },188 'invalid-key-enc-type': {189 defaultMessage: 'Invalid key enc type',190 id: `${ns}.invalid-key-enc-type`191 },192 'get-failed': {193 defaultMessage: 'Get failed',194 id: `${ns}.get-failed`195 },196 'invalid-metadata-key-grammar': {197 defaultMessage: 'Invalid metadata key grammar',198 id: `${ns}.invalid-metadata-key-grammar`199 },200 'error-confirming-email-address': {201 defaultMessage: 'Error confirming your email address',202 id: `${ns}.error-confirming-email-address`203 },204 'invalid-metadata-val-grammar': {205 defaultMessage: 'Invalid metadata val grammar',206 id: `${ns}.invalid-metadata-val-grammar`207 },208 'invalid-fingerprint': {209 defaultMessage: 'Invalid fingerprint',210 id: `${ns}.invalid-fingerprint`211 },212 'server-error-generating-smime-and-pgp-keys': {213 defaultMessage: 'There was an error generating smime and pgp keys',214 id: `${ns}.server-error-generating-smime-and-pgp-keys`215 },216 'client-error-invalid-domain-not-purchased': {217 defaultMessage: 'The domain is not purchased with MsgSafe',218 id: `${ns}.client-error-invalid-domain-not-purchased`219 },220 'identity-not-active': {221 defaultMessage: 'The identity is not active',222 id: `${ns}.identity-not-active`223 },224 'no-active-email-address': {225 defaultMessage: 'Missing an active email address',226 id: `${ns}.no-active-email-address`227 },228 'invitation-exists': {229 defaultMessage: 'Invitiation exists',230 id: `${ns}.invitation-exists`231 },232 'invalid-payment-type': {233 defaultMessage: 'Invalid payment type',234 id: `${ns}.invalid-payment-type`235 },236 'delete-failed': {237 defaultMessage: 'Delete failed',238 id: `${ns}.delete-failed`239 },240 'non-sufficient-user-credit': {241 defaultMessage: 'Your available user credit is less than price',242 id: `${ns}.non-sufficient-user-credit`243 },244 'failed-to-fetch-identity': {245 defaultMessage: 'Failed to fetch the identities. Please try again.',246 id: `${ns}.failed-to-fetch-identity`247 },248 'identity-email-address-not-available': {249 defaultMessage: 'The email address is not available',250 id: `${ns}.identity-email-address-not-available`251 },252 'identity-email-not-valid-for-esp': {253 defaultMessage: 'This email address is already taken',254 id: `${ns}.identity-email-not-valid-for-esp`255 },256 'failed-to-fetch-contact': {257 defaultMessage: 'Failed to fetch the contacts. Please try again.',258 id: `${ns}.failed-to-fetch-contact`259 },260 'failed-to-create-contact': {261 defaultMessage: 'Failed to create the contact. Please try again.',262 id: `${ns}.failed-to-create-contact`263 },264 'failed-to-update-contact': {265 defaultMessage: 'Failed to update the contact. Please try again.',266 id: `${ns}.failed-to-update-contact`267 },268 'failed-to-remove-contact': {269 defaultMessage: 'Failed to remove the contact. Please try again.',270 id: `${ns}.failed-to-remove-contact`271 },272 'failed-to-fetch': {273 defaultMessage: 'Failed to fetch. Please try again.',274 id: `${ns}.failed-to-fetch`275 },276 'failed-to-create': {277 defaultMessage: 'Failed to create. Please try again.',278 id: `${ns}.failed-to-create`279 },280 'failed-to-update': {281 defaultMessage: 'Failed to update. Please try again.',282 id: `${ns}.failed-to-update`283 },284 'failed-to-remove': {285 defaultMessage: 'Failed to remove. Please try again.',286 id: `${ns}.failed-to-remove`287 },288 'request-failed': {289 defaultMessage: 'Request Failed. Please try again.',290 id: `${ns}.request-failed`291 },292 'failed-to-fetch-missed-call': {293 defaultMessage: 'Failed to fetch missed call history',294 id: `${ns}.failed-to-fetch-missed-call`295 },296 'failed-to-fetch-call-history': {297 defaultMessage: 'Failed to fetch call history',298 id: `${ns}.failed-to-fetch-call-history`299 },300 'failed-to-fetch-domains': {301 defaultMessage: 'Failed to fetch domains. Please try again.',302 id: `${ns}.failed-to-fetch-domains`303 },304 'failed-to-create-domain': {305 defaultMessage: 'Failed to create domain. Please try again.',306 id: `${ns}.failed-to-create-domain`307 },308 'failed-to-update-domain': {309 defaultMessage: 'Failed to update domain. Please try again.',310 id: `${ns}.failed-to-update-domain`311 },312 'failed-to-delete-domain': {313 defaultMessage: 'Failed to delete domain. Please try again.',314 id: `${ns}.failed-to-delete-domain`315 },316 'domain-request-failed': {317 defaultMessage: 'Domain request failed. Please try again.',318 id: `${ns}.domain-request-failed`319 },320 'failed-to-fetch-regions': {321 defaultMessage: 'Failed to fetch the regions',322 id: `${ns}.failed-to-fetch-regions`323 },324 'failed-to-fetch-payment-history': {325 defaultMessage: 'Failed to fetch the payment history. Please try again.',326 id: `${ns}.failed-to-fetch-payment-history`327 },328 'failed-to-fetch-payment-methods': {329 defaultMessage: 'Failed to fetch the payment methods. Please try again.',330 id: `${ns}.failed-to-fetch-payment-methods`331 },332 'failed-to-create-payment-method': {333 defaultMessage: 'Failed to create the payment. Please try again.',334 id: `${ns}.failed-to-create-payment-method`335 },336 'failed-to-update-payment-method': {337 defaultMessage: 'Failed to update the payment. Please try again.',338 id: `${ns}.failed-to-update-payment-method`339 },340 'failed-to-fetch-user-emails': {341 defaultMessage: 'Failed to fetch the user emails. Please try again.',342 id: `${ns}.failed-to-fetch-user-emails`343 },344 'unable-to-login': {345 defaultMessage: 'Unable to login, please check username & password and try again',346 id: `${ns}.unable-to-login`347 },348 'unable-to-signup': {349 defaultMessage: 'Unable to signup, please try again',350 id: `${ns}.unable-to-signup`351 },352 'failed-to-send-username': {353 defaultMessage: 'Failed to send username. Please try again.',354 id: `${ns}.failed-to-send-username`355 },356 'failed-to-request-password-reset': {357 defaultMessage: 'Failed to request password reset. Please try again.',358 id: `${ns}.failed-to-request-password-reset`359 },360 'failed-to-reset-password': {361 defaultMessage: 'Failed to reset password. Please try again.',362 id: `${ns}.failed-to-reset-password`363 },364 'failed-to-update-profile': {365 defaultMessage: 'Failed to update the profile. Please try again.',366 id: `${ns}.failed-to-update-profile`367 },368 'failed-to-update-identity-settings': {369 defaultMessage: 'Failed to update the identity settings. Please try again.',370 id: `${ns}.failed-to-update-identity-settings`371 },372 captchaIncorrect: {373 id: `${ns}.captcha-incorrect`,374 defaultMessage: 'Verification failed, please try again.'375 },376 'failed-to-fetch-mailbox': {377 defaultMessage: 'Failed to fetch the mailbox data. Please try again.',378 id: `${ns}.failed-to-fetch-mailbox`379 },380 'failed-to-retrieve-mailbox': {381 defaultMessage: 'Failed to fetch the mailbox data. Please try again.',382 id: `${ns}.failed-to-fetch-mailbox`383 },384 'failed-to-update-mailbox': {385 defaultMessage: 'Failed to update the mailbox data. Please try again.',386 id: `${ns}.failed-to-update-mailbox`387 },388 'failed-to-fetch-your-email': {389 defaultMessage: 'Failed to fetch your email, please try again',390 id: `${ns}.failed-to-fetch-your-email`391 },392 'connect-to-internet-and-retry': {393 defaultMessage: 'Please connect to internet and retry.',394 id: `${ns}.connect-to-internet-and-retry`395 },396 'failed-to-send-email': {397 defaultMessage: 'Failed to send the email. Please try again.',398 id: `${ns}.failed-to-send-email`399 },400 'chat-room-already-exist': {401 defaultMessage: 'Chat Room with {contactEmail} already exist',402 id: `${ns}.chat-room-already-exist`403 },404 'room-not-found': {405 defaultMessage: 'Room not found',406 id: `${ns}.room-not-found`407 },408 'contact-not-available': {409 defaultMessage: 'This contact is not available',410 id: `${ns}.contact-not-available`411 }412})...
en-US.js
Source:en-US.js
1'use strict'2module.exports = {3 'params-format-validate-failed': 'åæ°%sæ ¼å¼æ ¡éªå¤±è´¥',4 'params-validate-failed': 'åæ°%sæ ¡éªå¤±è´¥',5 'params-required-validate-failed': '缺å°å¿
éåæ°',6 'params-comb-validate-failed': 'ç»ååæ°%sæ ¡éªå¤±è´¥',7 'params-relevance-validate-failed': 'åæ°%sä¹é´å
³èæ§æ ¡éªå¤±è´¥',8 'user-authentication-failed': 'ç¨æ·è®¤è¯å¤±è´¥,请ç»å½',9 'user-authorization-failed': 'ææ失败,å½åç¨æ·æ²¡ææä½æé',10 'resource-entity-not-found': 'æªæ¾å°æå®èµæº',11 'resource-invalid': 'æªæ¾å°ææèµæº',12 'node-entity-not-found': 'æªæ¾å°èç¹',13 'node-invalid': 'æªæ¾å°ææèç¹',14 'node-authentication-failed': 'èç¹è®¤è¯å¤±è´¥,请ç»å½',15 'presentable-entity-not-found': 'æªæ¾å°èç¹èµæº',16 'presentable-invalid': 'æªæ¾å°ææèç¹èµæº',17 'contract-entity-not-found': 'æªæ¾å°åå',18 'contract-invalid': 'æªæ¾å°ææåå',19 'auth-contract-notActivated': 'æªè·å¾ååææ',20 'policy-authorization-failed': 'æªè·å¾çç¥ææ',21 'auth-recontractable-failed': 'èµæºæªè·å¾åç¾çº¦ææ',22 'auth-presentable-failed': 'èµæºæªè·å¾é¶å®ææ',23 'auth-policy-authorizationObject-failed': 'æªè·å¾çç¥èº«ä»½ææ',24 'user-entity-not-found': 'æªæ¾å°ç¨æ·ä¿¡æ¯',25 'user-invalid': 'æªæ¾å°ææç¨æ·ä¿¡æ¯',26 'jwt-signature-validate-failed': 'JWTç¾åæ ¡éªå¤±è´¥',27 'jwt-format-validate-failed': 'JWTæ°æ®æ ¼å¼æ ¡éªå¤±è´¥',28 'resource-form-enctype-validate-failed': '表åenctypeå±æ§å¼é误,å¿
é¡»æ¯%s',29 'resource-upload-duplicate-error': 'ä¸è½ä¸ä¼ éå¤çèµæºæ件',30 'resource-create-duplicate-error': 'ä¸è½å建éå¤çèµæº',31 'policy-create-duplicate-error': 'ä¸è½æ·»å å·²ç»åå¨ççç¥',32 'resource-image-extension-validate-failed': 'èµæºä¸æ¯ç³»ç»ææ¯æçå¾çæ ¼å¼%s',33 'resource-file-size-limit-validate-failed': 'æ件大å°è¶
åºéå¶,æ大ä¸è½è¶
è¿%s',34 'resource-image-width-height-limit-validate-failed': 'å¾ç宽é«è¶
åºéå¶,æ大æ¯æ尺寸为%s',35 'policy-text-validate-failed': 'çç¥ææ¬æ ¡éªå¤±è´¥',36 'resource-circle-dependency-validate-failed': 'ä¾èµèµæºä¸åå¨å¾ªç¯ä¾èµ',37 'resource-widget-create-duplicate-validate-failed': 'æ件%så·²åå¨,ä¸è½éå¤å建',38 'mock-resource-entity-not-found': 'æªæ¾å°mockèµæº',39 'resource-depend-upcast-resolve-integrity-validate-failed': 'èµæºçä¾èµåè¡ä»¥åå
¶ä¸ææªå
¨é¨å¤ç',40 'release-name-is-exist-validate-failed': 'åè¡åå·²åå¨',41 'resource-cycle-depend-validate-failed': 'èµæºä¸è½è½¬å为å½ååè¡,åå¨å¾ªç¯ä¾èµ',42 'release-scheme-upcast-validate-failed': 'åè¡çåºç¡ä¸æèå´ä¸ä¾èµçåè¡ä¸å¹é
',43 'resource-version-must-be-greater-than-latest-version': 'èµæºçæ¬å·ä¸è½éå',44 'resource-version-existing-error': 'èµæºççæ¬å·²ç»åå¨,ä¸è½éå¤',45 'release-available-policy-not-found': 'æ¹æ¡ççç¥ä¸åå¨æå·²ä¸æ¶',46 'release-policy-identity-authorization-failed': 'çç¥ä¸ç身份ææ失败,æ æ³ç¾çº¦',47 //'release-policy-sign-authorization-failed': 'åè¡çä¸æ¸¸ååéå¶äºç¾çº¦ææ',48 'resource-depend-release-invalid': 'èµæºä¾èµçåè¡æ æ',49 'resource-depend-mock-invalid': 'èµæºä¾èµçmockèµæºæ æ',50 'resource-depend-release-update-refuse': 'èµæºå·²ç»å å
¥åè¡,ä¾èµé¡¹ä¸å
许ååæ´',51 //'resource-depend-release-sign-auth-refuse': 'ä¾èµåè¡ä¸åå¨æªè·å¾ç¾çº¦ææçé¨å',52 'resource-depend-release-versionRange-invalid': 'èµæºä¾èµçåè¡çæ¬èå´æ æ',53 'release-resource-deny-repetition-error': 'å½ååè¡æ个çæ¬å·²ç»åå¨è¯¥èµæº,ä¸è½éå¤æ·»å ',54 'release-resource-type-validate-failed': 'èµæºçç±»åååè¡çèµæºç±»åå¿
é¡»ä¿æä¸è´',55 'release-scheme-update-resolve-release-invalid-error': 'æ¹æ¡ä¸çä¾èµè§£å³é¡¹åå¨æ æçåè¡',56 'bucket-create-count-limit-validate-failed': 'bucketè¶
åºå建éå¶æ°é(%s)',57 'mock-convert-to-resource-depend-validate-failed': 'mockèµæºçä¾èµä¸åå¨å
¶ä»mock,æ æ³è½¬æ¢æèµæº',58 'release-circular-dependency-error': '循ç¯ä¾èµä¸æ¯æææ',59 'subject-policy-validate-failed': 'èµæºçç¥æ ¡éªå¤±è´¥,请æ£æ¥',60 'subject-policy-create-failed': 'èµæºçç¥å建失败,请ç¨ååè¯',61 'subject-policy-name-duplicate-failed': 'çç¥å称åå¨éå¤',62 'subject-policy-repeatability-validate-failed': 'èµæºçç¥æ ¡éªå¤±è´¥,åå¨éå¤ççç¥'...
Using AI Code Generation
1const fc = require('fast-check');2const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');3const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');4const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');5const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');6const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');7const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');8const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');9const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');10const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');11const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');12const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');13const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');14const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');15const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');16const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');17const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');18const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');19const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');20const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');21const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');22const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');23const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');24const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');25const { stringOf } = require('fast-check/lib/check/arbitrary/StringArbitrary');26const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');27const { integer } = require('fast-check/lib/check/arbitrary/IntegerArbitrary');28const { stringOf
Using AI Code Generation
1const fc = require('fast-check');2fc.assert(3 fc.property(fc.integer(1, 100), (n) => {4 return n >= 1 && n <= 100;5 }),6 { numRuns: 100 }7);
Using AI Code Generation
1const fc = require('fast-check');2const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');3const arb = failed();4fc.assert(5 fc.property(arb, () => true)6);7const fc = require('fast-check');8const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');9const arb = failed();10fc.assert(11 fc.property(arb, () => true)12);13const fc = require('fast-check');14const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');15const arb = failed();16fc.assert(17 fc.property(arb, () => true)18);19const fc = require('fast-check');20const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');21const arb = failed();22fc.assert(23 fc.property(arb, () => true)24);25const fc = require('fast-check');26const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');27const arb = failed();28fc.assert(29 fc.property(arb, () => true)30);31const fc = require('fast-check');32const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');33const arb = failed();34fc.assert(35 fc.property(arb, () => true)36);37const fc = require('fast-check');38const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');39const arb = failed();40fc.assert(41 fc.property(arb, () => true)42);43const fc = require('fast-check');44const { failed } = require('fast-check/lib/check/arbitrary/definition/FailedArbitrary');45const arb = failed();46fc.assert(47 fc.property(arb, () => true)48);
Using AI Code Generation
1const fc = require('fast-check');2const { failed } = require('fast-check/lib/check/runner/FailedRunDetails');3const result = fc.check(fc.property(fc.integer(), fc.integer(), (a, b) => a + b === a + b), { seed: 0, numRuns: 1 });4console.log(failed(result).value);5const fc = require('fast-check');6const { failed } = require('fast-check/lib/check/runner/FailedRunDetails');7const result = fc.check(fc.property(fc.integer(), fc.integer(), (a, b) => a + b === a + b), { seed: 0, numRuns: 1 });8console.log(failed(result).value);
Using AI Code Generation
1const fc = require('fast-check');2const arb = fc.integer();3fc.assert(fc.property(arb, (a) => a === a));4const fc = require('fast-check');5const arb = fc.integer();6fc.assert(fc.property(arb, (a) => a === a));7const fc = require('fast-check');8const arb = fc.integer();9fc.assert(fc.property(arb, (a) => a === a));10const fc = require('fast-check');11const arb = fc.integer();12fc.assert(fc.property(arb, (a) => a === a));13const fc = require('fast-check');14const arb = fc.integer();15fc.assert(fc.property(arb, (a) => a === a));16const fc = require('fast-check');17const arb = fc.integer();18fc.assert(fc.property(arb, (a) => a === a));19const fc = require('fast-check');20const arb = fc.integer();21fc.assert(fc.property(arb, (a) => a === a));22const fc = require('fast-check');23const arb = fc.integer();24fc.assert(fc.property(arb, (a) => a === a));25const fc = require('fast-check');26const arb = fc.integer();27fc.assert(fc.property(arb, (a) => a === a));28const fc = require('fast-check');29const arb = fc.integer();30fc.assert(fc.property(arb, (a) => a === a));31const fc = require('fast-check');32const arb = fc.integer();33fc.assert(fc.property(arb, (a) => a === a));
Using AI Code Generation
1const { fc, property, asyncProperty } = require('fast-check');2const { expect } = require('chai');3const myArb = fc.array(fc.integer({ min: 0, max: 100 }), { minLength: 3, maxLength: 3 });4describe('Test 3', () => {5 it('should pass', () => {6 fc.assert(7 asyncProperty(myArb, async (arr) => {8 expect(arr.length).to.equal(3);9 })10 );11 });12});13const { fc, property, asyncProperty } = require('fast-check');14const { expect } = require('chai');15const myArb = fc.array(fc.integer({ min: 0, max: 100 }), { minLength: 3, maxLength: 3 });16describe('Test 4', () => {17 it('should pass', () => {18 fc.assert(19 property(myArb, (arr) => {20 expect(arr.length).to.equal(3);21 })22 );23 });24});25const { fc, property, asyncProperty } = require('fast-check');26const { expect } = require('chai');27const myArb = fc.array(fc.integer({ min: 0, max: 100 }), { minLength: 3, maxLength: 3 });28describe('Test 5', () => {29 it('should pass', () => {30 fc.assert(31 asyncProperty(myArb, (arr) => {32 expect(arr.length).to.equal(3);33 })34 );35 });36});37const { fc, property, asyncProperty } = require('fast-check');38const { expect } = require('chai');39const myArb = fc.array(fc.integer({ min: 0, max: 100 }), { minLength: 3, maxLength: 3 });40describe('Test 6', () => {41 it('should pass', () => {42 fc.assert(43 property(myArb, async (arr) => {44 expect(arr.length).to.equal(3);45 })46 );47 });48});
Using AI Code Generation
1test('test3.js', () => {2 const fc = require('fast-check');3 expect(fc).toBeDefined();4 expect(fc.fail).toBeDefined();5 expect(fc.fail).toBeInstanceOf(Function);6 const [a, b] = fc.check(fc.property(fc.integer(), fc.integer(), (a, b) => {7 fc.fail();8 return a + b === 0;9 }));10 expect(a).toBe(false);11 expect(b.counterexample).toBeDefined();12 expect(b.counterexample).toBeInstanceOf(Array);13 expect(b.counterexample.length).toBe(0);14});15test('test4.js', () => {16 const fc = require('fast-check');17 expect(fc).toBeDefined();18 expect(fc.fail).toBeDefined();19 expect(fc.fail).toBeInstanceOf(Function);20 const [a, b] = fc.check(fc.property(fc.integer(), fc.integer(), (a, b) => {21 fc.fail();22 return a + b === 0;23 }));24 expect(a).toBe(false);25 expect(b.counterexample).toBeDefined();26 expect(b.counterexample).toBeInstanceOf(Array);27 expect(b.counterexample.length).toBe(0);28});29test('test5.js', () => {30 const fc = require('fast-check');31 expect(fc).toBeDefined();32 expect(fc.fail).toBeDefined();33 expect(fc.fail).toBeInstanceOf(Function);34 const [a, b] = fc.check(fc.property(fc.integer(), fc.integer(), (a, b) => {35 fc.fail();36 return a + b === 0;37 }));38 expect(a).toBe(false);39 expect(b.counterexample).toBeDefined();40 expect(b.counterexample).toBeInstanceOf(Array);41 expect(b.counterexample.length).toBe(0);42});43test('test6.js', () => {44 const fc = require('fast-check');45 expect(fc).toBeDefined();46 expect(fc.fail).toBeDefined();47 expect(fc.fail).toBeInstanceOf(Function);48 const [a, b] = fc.check(fc.property(fc.integer(), fc.integer(), (a, b) => {49 fc.fail();50 return a + b === 0;51 }));52 expect(a).toBe(false);53 expect(b.counterexample).toBeDefined();
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!