diff --git a/.cspell.json b/.cspell.json index b38edf2f..9165d42a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -56,6 +56,8 @@ "datasig", "defi", "deserialisation", + "destructures", + "divmod", "docblock", "electroncash", "electrum", diff --git a/AGENTS.md b/AGENTS.md index 489da0c1..9d0c302a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,7 @@ # CLAUDE.md +NEVER stage changes, just leave them in the working directory. + This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview diff --git a/packages/cashc/src/Errors.ts b/packages/cashc/src/Errors.ts index af1f2814..072cb95a 100644 --- a/packages/cashc/src/Errors.ts +++ b/packages/cashc/src/Errors.ts @@ -19,7 +19,6 @@ import { InstantiationNode, StatementNode, ContractNode, - ExpressionNode, SliceNode, IntLiteralNode, } from './ast/AST.js'; @@ -272,14 +271,6 @@ export class AssignTypeError extends TypeError { } } -export class TupleAssignmentError extends CashScriptError { - constructor( - node: ExpressionNode, - ) { - super(node, 'Expression must return a tuple to use destructuring'); - } -} - export class ConstantConditionError extends CashScriptError { constructor( node: BranchNode | RequireNode, diff --git a/packages/cashc/src/ast/AST.ts b/packages/cashc/src/ast/AST.ts index 645b319c..4c898d0a 100644 --- a/packages/cashc/src/ast/AST.ts +++ b/packages/cashc/src/ast/AST.ts @@ -85,7 +85,7 @@ export class FunctionDefinitionNode extends Node implements Named { public name: string, public parameters: ParameterNode[], public body: BlockNode, - public returnType?: Type, + public returnTypes?: Type[], ) { super(); } @@ -127,11 +127,15 @@ export class VariableDefinitionNode extends NonControlStatementNode implements N } } +export interface TupleAssignmentTarget { + name: string; + type: Type; +} + export class TupleAssignmentNode extends NonControlStatementNode { constructor( - // TODO: Use an IdentifierNode instead of a custom type - public left: { name: string, type: Type }, - public right: { name: string, type: Type }, + // TODO: Use IdentifierNodes instead of a custom type + public targets: TupleAssignmentTarget[], public tuple: ExpressionNode, ) { super(); @@ -211,7 +215,7 @@ export class FunctionCallStatementNode extends NonControlStatementNode { export class ReturnNode extends NonControlStatementNode { constructor( - public expression: ExpressionNode, + public expressions: ExpressionNode[], ) { super(); } diff --git a/packages/cashc/src/ast/AstBuilder.ts b/packages/cashc/src/ast/AstBuilder.ts index a88c186b..077ece6d 100644 --- a/packages/cashc/src/ast/AstBuilder.ts +++ b/packages/cashc/src/ast/AstBuilder.ts @@ -167,19 +167,21 @@ export default class AstBuilder } visitGlobalFunctionDefinition(ctx: GlobalFunctionDefinitionContext): FunctionDefinitionNode { - const returnType = ctx.typeName() ? parseType(ctx.typeName().getText()) : undefined; - return this.buildFunctionDefinition(ctx, FunctionKind.GLOBAL, returnType); + const returnTypes = ctx.typeName_list().length > 0 + ? ctx.typeName_list().map((typeName) => parseType(typeName.getText())) + : undefined; + return this.buildFunctionDefinition(ctx, FunctionKind.GLOBAL, returnTypes); } private buildFunctionDefinition( ctx: ContractFunctionDefinitionContext | GlobalFunctionDefinitionContext, kind: FunctionKind, - returnType?: Type, + returnTypes?: Type[], ): FunctionDefinitionNode { const name = ctx.Identifier().getText(); const parameters = ctx.parameterList().parameter_list().map((p) => this.visit(p) as ParameterNode); const body = this.visit(ctx.functionBody()) as BlockNode; - const functionDefinition = new FunctionDefinitionNode(kind, name, parameters, body, returnType); + const functionDefinition = new FunctionDefinitionNode(kind, name, parameters, body, returnTypes); functionDefinition.location = Location.fromCtx(ctx); return functionDefinition; } @@ -231,13 +233,12 @@ export default class AstBuilder visitTupleAssignment(ctx: TupleAssignmentContext): TupleAssignmentNode { const expression = this.visit(ctx.expression()); - const names = ctx.Identifier_list(); const types = ctx.typeName_list(); - const [var1, var2] = names.map((name, i) => ({ + const targets = ctx.Identifier_list().map((name, i) => ({ name: name.getText(), type: parseType(types[i].getText()), })); - const tupleAssignment = new TupleAssignmentNode(var1, var2, expression); + const tupleAssignment = new TupleAssignmentNode(targets, expression); tupleAssignment.location = Location.fromCtx(ctx); return tupleAssignment; } @@ -295,8 +296,8 @@ export default class AstBuilder } visitReturnStatement(ctx: ReturnStatementContext): ReturnNode { - const expression = this.visit(ctx.expression()); - const returnNode = new ReturnNode(expression); + const expressions = ctx.expression_list().map((expression) => this.visit(expression) as ExpressionNode); + const returnNode = new ReturnNode(expressions); returnNode.location = Location.fromCtx(ctx); return returnNode; } diff --git a/packages/cashc/src/ast/AstTraversal.ts b/packages/cashc/src/ast/AstTraversal.ts index bd428132..65a4c3b7 100644 --- a/packages/cashc/src/ast/AstTraversal.ts +++ b/packages/cashc/src/ast/AstTraversal.ts @@ -91,7 +91,7 @@ export default class AstTraversal extends AstVisitor { } visitReturn(node: ReturnNode): Node { - node.expression = this.visit(node.expression); + node.expressions = this.visitList(node.expressions); return node; } diff --git a/packages/cashc/src/ast/SymbolTable.ts b/packages/cashc/src/ast/SymbolTable.ts index 36a25525..f06dce04 100644 --- a/packages/cashc/src/ast/SymbolTable.ts +++ b/packages/cashc/src/ast/SymbolTable.ts @@ -1,4 +1,4 @@ -import { Type, PrimitiveType, Script, Op, encodeInt } from '@cashscript/utils'; +import { Type, Script, Op, encodeInt } from '@cashscript/utils'; import { VariableDefinitionNode, ParameterNode, @@ -6,6 +6,7 @@ import { IdentifierNode, Node, } from './AST.js'; +import { functionReturnType } from '../utils.js'; export class Symbol { references: IdentifierNode[] = []; @@ -34,8 +35,7 @@ export class Symbol { static userFunction(node: FunctionDefinitionNode, functionId: number): Symbol { const parameterTypes = node.parameters.map((parameter) => parameter.type); - const returnType = node.returnType ?? PrimitiveType.VOID; - const symbol = new Symbol(node.name, returnType, SymbolType.FUNCTION, node, parameterTypes); + const symbol = new Symbol(node.name, functionReturnType(node.returnTypes), SymbolType.FUNCTION, node, parameterTypes); symbol.setFunctionId(functionId); return symbol; } diff --git a/packages/cashc/src/generation/GenerateTargetTraversal.ts b/packages/cashc/src/generation/GenerateTargetTraversal.ts index 07654a0c..778ad80f 100644 --- a/packages/cashc/src/generation/GenerateTargetTraversal.ts +++ b/packages/cashc/src/generation/GenerateTargetTraversal.ts @@ -21,6 +21,7 @@ import { SingleLocationData, StackItem, BytesType, + TupleType, CompilerOptions, SourceTagEntry, SourceTagKind, @@ -206,11 +207,8 @@ export default class GenerateTargetTraversal extends AstTraversal { } cleanGlobalFunctionStack(node: FunctionDefinitionNode): void { - if (node.returnType === undefined) { - this.removeScopedVariables(0, node.body); // void: drop the entire frame - } else { - this.cleanStack(node.body); // value: OP_NIP everything below the return value on top - } + // Drop everything below the return values on top (or the entire frame for a void function) + this.cleanStack(node.body, node.returnTypes?.length ?? 0); } visitContract(node: ContractNode): Node { @@ -319,14 +317,24 @@ export default class GenerateTargetTraversal extends AstTraversal { } } - cleanStack(functionBodyNode: Node): void { - // Keep final verification value, OP_NIP the other stack values + // Keep only the top `keepCount` values (a contract function's verification value, or a global + // function's return values), dropping everything below them while preserving their order. + cleanStack(functionBodyNode: Node, keepCount: number = 1): void { + this.dropFromStack(functionBodyNode, keepCount, this.stack.length - keepCount); + } + + private dropFromStack(node: Node, keepCount: number, dropCount: number): void { const tagStartIndex = this.output.length; - const stackSize = this.stack.length; - for (let i = 0; i < stackSize - 1; i += 1) { - this.emit(Op.OP_NIP, { location: functionBodyNode.location, positionHint: PositionHint.END }); - this.nipFromStack(); + const locationData = { location: node.location, positionHint: PositionHint.END }; + + // Note that in case of keepCount = 1, this gets optimised to just OP_NIP, or for keepCount = 0 to OP_DROP + for (let i = 0; i < dropCount; i += 1) { + this.emit(encodeInt(BigInt(keepCount)), locationData); + this.emit(Op.OP_ROLL, locationData); + this.emit(Op.OP_DROP, locationData); + this.removeFromStack(keepCount); } + this.tagScopeCleanup(tagStartIndex); } @@ -389,9 +397,8 @@ export default class GenerateTargetTraversal extends AstTraversal { visitTupleAssignment(node: TupleAssignmentNode): Node { node.tuple = this.visit(node.tuple); - this.popFromStack(2); - this.pushToStack(node.left.name); - this.pushToStack(node.right.name); + this.popFromStack(node.targets.length); + node.targets.forEach((target) => this.pushToStack(target.name)); return node; } @@ -625,14 +632,9 @@ export default class GenerateTargetTraversal extends AstTraversal { }); } + // Drop the values that a scope (a branch or loop body) added on top of the pre-scope stack. removeScopedVariables(depthBeforeScope: number, node: Node): void { - const tagStartIndex = this.output.length; - const dropCount = this.stack.length - depthBeforeScope; - for (let i = 0; i < dropCount; i += 1) { - this.emit(Op.OP_DROP, { location: node.location, positionHint: PositionHint.END }); - this.popFromStack(); - } - this.tagScopeCleanup(tagStartIndex); + this.dropFromStack(node, 0, this.stack.length - depthBeforeScope); } private tagScopeCleanup(tagStartIndex: number): void { @@ -665,7 +667,12 @@ export default class GenerateTargetTraversal extends AstTraversal { node.parameters = this.visitList(node.parameters); this.emit(symbol.bytecode!, { location: node.location, positionHint: PositionHint.END }); this.popFromStack(node.parameters.length); - if (symbol.type !== PrimitiveType.VOID) this.pushToStack('(value)'); + + // The call leaves one value per declared return type (none for a void function); a multi-return + // function's values (a TupleType) are subsequently bound by visitTupleAssignment. + const returnValueCount = symbol.type === PrimitiveType.VOID ? 0 + : symbol.type instanceof TupleType ? symbol.type.elementTypes.length : 1; + for (let i = 0; i < returnValueCount; i += 1) this.pushToStack('(value)'); return node; } diff --git a/packages/cashc/src/grammar/CashScript.g4 b/packages/cashc/src/grammar/CashScript.g4 index c221b077..c980df8f 100644 --- a/packages/cashc/src/grammar/CashScript.g4 +++ b/packages/cashc/src/grammar/CashScript.g4 @@ -34,7 +34,7 @@ topLevelDefinition ; globalFunctionDefinition - : 'function' Identifier parameterList ('returns' '(' typeName ')')? functionBody + : 'function' Identifier parameterList ('returns' '(' typeName (',' typeName)* ')')? functionBody ; contractDefinition @@ -83,7 +83,7 @@ functionCallStatement ; returnStatement - : 'return' expression + : 'return' expression (',' expression)* ; controlStatement @@ -96,7 +96,7 @@ variableDefinition ; tupleAssignment - : typeName Identifier ',' typeName Identifier '=' expression + : typeName Identifier (',' typeName Identifier)+ '=' expression ; assignStatement diff --git a/packages/cashc/src/grammar/CashScript.interp b/packages/cashc/src/grammar/CashScript.interp index 30fbbbcd..5a9ef9b5 100644 --- a/packages/cashc/src/grammar/CashScript.interp +++ b/packages/cashc/src/grammar/CashScript.interp @@ -14,11 +14,11 @@ null 'function' 'returns' '(' +',' ')' 'contract' '{' '}' -',' 'return' '+=' '-=' @@ -219,4 +219,4 @@ typeCast atn: -[4, 1, 84, 481, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 1, 0, 5, 0, 88, 8, 0, 10, 0, 12, 0, 91, 9, 0, 1, 0, 5, 0, 94, 8, 0, 10, 0, 12, 0, 97, 9, 0, 1, 0, 5, 0, 100, 8, 0, 10, 0, 12, 0, 103, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 3, 3, 116, 8, 3, 1, 4, 3, 4, 119, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 3, 7, 131, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 141, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 150, 8, 9, 10, 9, 12, 9, 153, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 5, 11, 164, 8, 11, 10, 11, 12, 11, 167, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 175, 8, 12, 10, 12, 12, 12, 178, 9, 12, 1, 12, 3, 12, 181, 8, 12, 3, 12, 183, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 5, 14, 192, 8, 14, 10, 14, 12, 14, 195, 9, 14, 1, 14, 1, 14, 3, 14, 199, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 205, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 215, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 224, 8, 19, 1, 20, 1, 20, 5, 20, 228, 8, 20, 10, 20, 12, 20, 231, 9, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 250, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 259, 8, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 268, 8, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 282, 8, 26, 1, 27, 1, 27, 1, 27, 3, 27, 287, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 315, 8, 31, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 321, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 327, 8, 34, 10, 34, 12, 34, 330, 9, 34, 1, 34, 3, 34, 333, 8, 34, 3, 34, 335, 8, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 346, 8, 36, 10, 36, 12, 36, 349, 9, 36, 1, 36, 3, 36, 352, 8, 36, 3, 36, 354, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 367, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 393, 8, 37, 10, 37, 12, 37, 396, 9, 37, 1, 37, 3, 37, 399, 8, 37, 3, 37, 401, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 407, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 459, 8, 37, 10, 37, 12, 37, 462, 9, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 471, 8, 39, 1, 40, 1, 40, 3, 40, 475, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 0, 1, 74, 43, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 0, 14, 1, 0, 4, 10, 2, 0, 10, 10, 21, 22, 1, 0, 23, 24, 1, 0, 36, 40, 2, 0, 36, 40, 42, 45, 2, 0, 5, 5, 50, 51, 1, 0, 52, 54, 2, 0, 51, 51, 55, 55, 1, 0, 56, 57, 1, 0, 6, 9, 1, 0, 58, 59, 1, 0, 46, 47, 1, 0, 71, 73, 2, 0, 71, 72, 79, 79, 508, 0, 89, 1, 0, 0, 0, 2, 106, 1, 0, 0, 0, 4, 111, 1, 0, 0, 0, 6, 113, 1, 0, 0, 0, 8, 118, 1, 0, 0, 0, 10, 122, 1, 0, 0, 0, 12, 124, 1, 0, 0, 0, 14, 130, 1, 0, 0, 0, 16, 132, 1, 0, 0, 0, 18, 144, 1, 0, 0, 0, 20, 156, 1, 0, 0, 0, 22, 161, 1, 0, 0, 0, 24, 170, 1, 0, 0, 0, 26, 186, 1, 0, 0, 0, 28, 198, 1, 0, 0, 0, 30, 204, 1, 0, 0, 0, 32, 214, 1, 0, 0, 0, 34, 216, 1, 0, 0, 0, 36, 218, 1, 0, 0, 0, 38, 223, 1, 0, 0, 0, 40, 225, 1, 0, 0, 0, 42, 236, 1, 0, 0, 0, 44, 249, 1, 0, 0, 0, 46, 251, 1, 0, 0, 0, 48, 262, 1, 0, 0, 0, 50, 271, 1, 0, 0, 0, 52, 274, 1, 0, 0, 0, 54, 286, 1, 0, 0, 0, 56, 288, 1, 0, 0, 0, 58, 296, 1, 0, 0, 0, 60, 302, 1, 0, 0, 0, 62, 314, 1, 0, 0, 0, 64, 316, 1, 0, 0, 0, 66, 320, 1, 0, 0, 0, 68, 322, 1, 0, 0, 0, 70, 338, 1, 0, 0, 0, 72, 341, 1, 0, 0, 0, 74, 406, 1, 0, 0, 0, 76, 463, 1, 0, 0, 0, 78, 470, 1, 0, 0, 0, 80, 472, 1, 0, 0, 0, 82, 476, 1, 0, 0, 0, 84, 478, 1, 0, 0, 0, 86, 88, 3, 2, 1, 0, 87, 86, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 95, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 92, 94, 3, 12, 6, 0, 93, 92, 1, 0, 0, 0, 94, 97, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 101, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 98, 100, 3, 14, 7, 0, 99, 98, 1, 0, 0, 0, 100, 103, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 104, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 104, 105, 5, 0, 0, 1, 105, 1, 1, 0, 0, 0, 106, 107, 5, 1, 0, 0, 107, 108, 3, 4, 2, 0, 108, 109, 3, 6, 3, 0, 109, 110, 5, 2, 0, 0, 110, 3, 1, 0, 0, 0, 111, 112, 5, 3, 0, 0, 112, 5, 1, 0, 0, 0, 113, 115, 3, 8, 4, 0, 114, 116, 3, 8, 4, 0, 115, 114, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 7, 1, 0, 0, 0, 117, 119, 3, 10, 5, 0, 118, 117, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 5, 65, 0, 0, 121, 9, 1, 0, 0, 0, 122, 123, 7, 0, 0, 0, 123, 11, 1, 0, 0, 0, 124, 125, 5, 11, 0, 0, 125, 126, 5, 75, 0, 0, 126, 127, 5, 2, 0, 0, 127, 13, 1, 0, 0, 0, 128, 131, 3, 16, 8, 0, 129, 131, 3, 18, 9, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0, 131, 15, 1, 0, 0, 0, 132, 133, 5, 12, 0, 0, 133, 134, 5, 81, 0, 0, 134, 140, 3, 24, 12, 0, 135, 136, 5, 13, 0, 0, 136, 137, 5, 14, 0, 0, 137, 138, 3, 82, 41, 0, 138, 139, 5, 15, 0, 0, 139, 141, 1, 0, 0, 0, 140, 135, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 3, 22, 11, 0, 143, 17, 1, 0, 0, 0, 144, 145, 5, 16, 0, 0, 145, 146, 5, 81, 0, 0, 146, 147, 3, 24, 12, 0, 147, 151, 5, 17, 0, 0, 148, 150, 3, 20, 10, 0, 149, 148, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 18, 0, 0, 155, 19, 1, 0, 0, 0, 156, 157, 5, 12, 0, 0, 157, 158, 5, 81, 0, 0, 158, 159, 3, 24, 12, 0, 159, 160, 3, 22, 11, 0, 160, 21, 1, 0, 0, 0, 161, 165, 5, 17, 0, 0, 162, 164, 3, 30, 15, 0, 163, 162, 1, 0, 0, 0, 164, 167, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 168, 1, 0, 0, 0, 167, 165, 1, 0, 0, 0, 168, 169, 5, 18, 0, 0, 169, 23, 1, 0, 0, 0, 170, 182, 5, 14, 0, 0, 171, 176, 3, 26, 13, 0, 172, 173, 5, 19, 0, 0, 173, 175, 3, 26, 13, 0, 174, 172, 1, 0, 0, 0, 175, 178, 1, 0, 0, 0, 176, 174, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 180, 1, 0, 0, 0, 178, 176, 1, 0, 0, 0, 179, 181, 5, 19, 0, 0, 180, 179, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 183, 1, 0, 0, 0, 182, 171, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 5, 15, 0, 0, 185, 25, 1, 0, 0, 0, 186, 187, 3, 82, 41, 0, 187, 188, 5, 81, 0, 0, 188, 27, 1, 0, 0, 0, 189, 193, 5, 17, 0, 0, 190, 192, 3, 30, 15, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 199, 5, 18, 0, 0, 197, 199, 3, 30, 15, 0, 198, 189, 1, 0, 0, 0, 198, 197, 1, 0, 0, 0, 199, 29, 1, 0, 0, 0, 200, 205, 3, 38, 19, 0, 201, 202, 3, 32, 16, 0, 202, 203, 5, 2, 0, 0, 203, 205, 1, 0, 0, 0, 204, 200, 1, 0, 0, 0, 204, 201, 1, 0, 0, 0, 205, 31, 1, 0, 0, 0, 206, 215, 3, 40, 20, 0, 207, 215, 3, 42, 21, 0, 208, 215, 3, 44, 22, 0, 209, 215, 3, 46, 23, 0, 210, 215, 3, 48, 24, 0, 211, 215, 3, 34, 17, 0, 212, 215, 3, 50, 25, 0, 213, 215, 3, 36, 18, 0, 214, 206, 1, 0, 0, 0, 214, 207, 1, 0, 0, 0, 214, 208, 1, 0, 0, 0, 214, 209, 1, 0, 0, 0, 214, 210, 1, 0, 0, 0, 214, 211, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 213, 1, 0, 0, 0, 215, 33, 1, 0, 0, 0, 216, 217, 3, 70, 35, 0, 217, 35, 1, 0, 0, 0, 218, 219, 5, 20, 0, 0, 219, 220, 3, 74, 37, 0, 220, 37, 1, 0, 0, 0, 221, 224, 3, 52, 26, 0, 222, 224, 3, 54, 27, 0, 223, 221, 1, 0, 0, 0, 223, 222, 1, 0, 0, 0, 224, 39, 1, 0, 0, 0, 225, 229, 3, 82, 41, 0, 226, 228, 3, 76, 38, 0, 227, 226, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 232, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 232, 233, 5, 81, 0, 0, 233, 234, 5, 10, 0, 0, 234, 235, 3, 74, 37, 0, 235, 41, 1, 0, 0, 0, 236, 237, 3, 82, 41, 0, 237, 238, 5, 81, 0, 0, 238, 239, 5, 19, 0, 0, 239, 240, 3, 82, 41, 0, 240, 241, 5, 81, 0, 0, 241, 242, 5, 10, 0, 0, 242, 243, 3, 74, 37, 0, 243, 43, 1, 0, 0, 0, 244, 245, 5, 81, 0, 0, 245, 246, 7, 1, 0, 0, 246, 250, 3, 74, 37, 0, 247, 248, 5, 81, 0, 0, 248, 250, 7, 2, 0, 0, 249, 244, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 250, 45, 1, 0, 0, 0, 251, 252, 5, 25, 0, 0, 252, 253, 5, 14, 0, 0, 253, 254, 5, 78, 0, 0, 254, 255, 5, 6, 0, 0, 255, 258, 3, 74, 37, 0, 256, 257, 5, 19, 0, 0, 257, 259, 3, 64, 32, 0, 258, 256, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 5, 15, 0, 0, 261, 47, 1, 0, 0, 0, 262, 263, 5, 25, 0, 0, 263, 264, 5, 14, 0, 0, 264, 267, 3, 74, 37, 0, 265, 266, 5, 19, 0, 0, 266, 268, 3, 64, 32, 0, 267, 265, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 270, 5, 15, 0, 0, 270, 49, 1, 0, 0, 0, 271, 272, 5, 26, 0, 0, 272, 273, 3, 68, 34, 0, 273, 51, 1, 0, 0, 0, 274, 275, 5, 27, 0, 0, 275, 276, 5, 14, 0, 0, 276, 277, 3, 74, 37, 0, 277, 278, 5, 15, 0, 0, 278, 281, 3, 28, 14, 0, 279, 280, 5, 28, 0, 0, 280, 282, 3, 28, 14, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 53, 1, 0, 0, 0, 283, 287, 3, 56, 28, 0, 284, 287, 3, 58, 29, 0, 285, 287, 3, 60, 30, 0, 286, 283, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 285, 1, 0, 0, 0, 287, 55, 1, 0, 0, 0, 288, 289, 5, 29, 0, 0, 289, 290, 3, 28, 14, 0, 290, 291, 5, 30, 0, 0, 291, 292, 5, 14, 0, 0, 292, 293, 3, 74, 37, 0, 293, 294, 5, 15, 0, 0, 294, 295, 5, 2, 0, 0, 295, 57, 1, 0, 0, 0, 296, 297, 5, 30, 0, 0, 297, 298, 5, 14, 0, 0, 298, 299, 3, 74, 37, 0, 299, 300, 5, 15, 0, 0, 300, 301, 3, 28, 14, 0, 301, 59, 1, 0, 0, 0, 302, 303, 5, 31, 0, 0, 303, 304, 5, 14, 0, 0, 304, 305, 3, 62, 31, 0, 305, 306, 5, 2, 0, 0, 306, 307, 3, 74, 37, 0, 307, 308, 5, 2, 0, 0, 308, 309, 3, 44, 22, 0, 309, 310, 5, 15, 0, 0, 310, 311, 3, 28, 14, 0, 311, 61, 1, 0, 0, 0, 312, 315, 3, 40, 20, 0, 313, 315, 3, 44, 22, 0, 314, 312, 1, 0, 0, 0, 314, 313, 1, 0, 0, 0, 315, 63, 1, 0, 0, 0, 316, 317, 5, 75, 0, 0, 317, 65, 1, 0, 0, 0, 318, 321, 5, 81, 0, 0, 319, 321, 3, 78, 39, 0, 320, 318, 1, 0, 0, 0, 320, 319, 1, 0, 0, 0, 321, 67, 1, 0, 0, 0, 322, 334, 5, 14, 0, 0, 323, 328, 3, 66, 33, 0, 324, 325, 5, 19, 0, 0, 325, 327, 3, 66, 33, 0, 326, 324, 1, 0, 0, 0, 327, 330, 1, 0, 0, 0, 328, 326, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 332, 1, 0, 0, 0, 330, 328, 1, 0, 0, 0, 331, 333, 5, 19, 0, 0, 332, 331, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 335, 1, 0, 0, 0, 334, 323, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 337, 5, 15, 0, 0, 337, 69, 1, 0, 0, 0, 338, 339, 5, 81, 0, 0, 339, 340, 3, 72, 36, 0, 340, 71, 1, 0, 0, 0, 341, 353, 5, 14, 0, 0, 342, 347, 3, 74, 37, 0, 343, 344, 5, 19, 0, 0, 344, 346, 3, 74, 37, 0, 345, 343, 1, 0, 0, 0, 346, 349, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 351, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 350, 352, 5, 19, 0, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353, 342, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 356, 5, 15, 0, 0, 356, 73, 1, 0, 0, 0, 357, 358, 6, 37, -1, 0, 358, 359, 5, 14, 0, 0, 359, 360, 3, 74, 37, 0, 360, 361, 5, 15, 0, 0, 361, 407, 1, 0, 0, 0, 362, 363, 3, 84, 42, 0, 363, 364, 5, 14, 0, 0, 364, 366, 3, 74, 37, 0, 365, 367, 5, 19, 0, 0, 366, 365, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 369, 5, 15, 0, 0, 369, 407, 1, 0, 0, 0, 370, 407, 3, 70, 35, 0, 371, 372, 5, 32, 0, 0, 372, 373, 5, 81, 0, 0, 373, 407, 3, 72, 36, 0, 374, 375, 5, 35, 0, 0, 375, 376, 5, 33, 0, 0, 376, 377, 3, 74, 37, 0, 377, 378, 5, 34, 0, 0, 378, 379, 7, 3, 0, 0, 379, 407, 1, 0, 0, 0, 380, 381, 5, 41, 0, 0, 381, 382, 5, 33, 0, 0, 382, 383, 3, 74, 37, 0, 383, 384, 5, 34, 0, 0, 384, 385, 7, 4, 0, 0, 385, 407, 1, 0, 0, 0, 386, 387, 7, 5, 0, 0, 387, 407, 3, 74, 37, 15, 388, 400, 5, 33, 0, 0, 389, 394, 3, 74, 37, 0, 390, 391, 5, 19, 0, 0, 391, 393, 3, 74, 37, 0, 392, 390, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 5, 19, 0, 0, 398, 397, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 401, 1, 0, 0, 0, 400, 389, 1, 0, 0, 0, 400, 401, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 407, 5, 34, 0, 0, 403, 407, 5, 80, 0, 0, 404, 407, 5, 81, 0, 0, 405, 407, 3, 78, 39, 0, 406, 357, 1, 0, 0, 0, 406, 362, 1, 0, 0, 0, 406, 370, 1, 0, 0, 0, 406, 371, 1, 0, 0, 0, 406, 374, 1, 0, 0, 0, 406, 380, 1, 0, 0, 0, 406, 386, 1, 0, 0, 0, 406, 388, 1, 0, 0, 0, 406, 403, 1, 0, 0, 0, 406, 404, 1, 0, 0, 0, 406, 405, 1, 0, 0, 0, 407, 460, 1, 0, 0, 0, 408, 409, 10, 14, 0, 0, 409, 410, 7, 6, 0, 0, 410, 459, 3, 74, 37, 15, 411, 412, 10, 13, 0, 0, 412, 413, 7, 7, 0, 0, 413, 459, 3, 74, 37, 14, 414, 415, 10, 12, 0, 0, 415, 416, 7, 8, 0, 0, 416, 459, 3, 74, 37, 13, 417, 418, 10, 11, 0, 0, 418, 419, 7, 9, 0, 0, 419, 459, 3, 74, 37, 12, 420, 421, 10, 10, 0, 0, 421, 422, 7, 10, 0, 0, 422, 459, 3, 74, 37, 11, 423, 424, 10, 9, 0, 0, 424, 425, 5, 60, 0, 0, 425, 459, 3, 74, 37, 10, 426, 427, 10, 8, 0, 0, 427, 428, 5, 4, 0, 0, 428, 459, 3, 74, 37, 9, 429, 430, 10, 7, 0, 0, 430, 431, 5, 61, 0, 0, 431, 459, 3, 74, 37, 8, 432, 433, 10, 6, 0, 0, 433, 434, 5, 62, 0, 0, 434, 459, 3, 74, 37, 7, 435, 436, 10, 5, 0, 0, 436, 437, 5, 63, 0, 0, 437, 459, 3, 74, 37, 6, 438, 439, 10, 21, 0, 0, 439, 440, 5, 33, 0, 0, 440, 441, 5, 68, 0, 0, 441, 459, 5, 34, 0, 0, 442, 443, 10, 18, 0, 0, 443, 459, 7, 11, 0, 0, 444, 445, 10, 17, 0, 0, 445, 446, 5, 48, 0, 0, 446, 447, 5, 14, 0, 0, 447, 448, 3, 74, 37, 0, 448, 449, 5, 15, 0, 0, 449, 459, 1, 0, 0, 0, 450, 451, 10, 16, 0, 0, 451, 452, 5, 49, 0, 0, 452, 453, 5, 14, 0, 0, 453, 454, 3, 74, 37, 0, 454, 455, 5, 19, 0, 0, 455, 456, 3, 74, 37, 0, 456, 457, 5, 15, 0, 0, 457, 459, 1, 0, 0, 0, 458, 408, 1, 0, 0, 0, 458, 411, 1, 0, 0, 0, 458, 414, 1, 0, 0, 0, 458, 417, 1, 0, 0, 0, 458, 420, 1, 0, 0, 0, 458, 423, 1, 0, 0, 0, 458, 426, 1, 0, 0, 0, 458, 429, 1, 0, 0, 0, 458, 432, 1, 0, 0, 0, 458, 435, 1, 0, 0, 0, 458, 438, 1, 0, 0, 0, 458, 442, 1, 0, 0, 0, 458, 444, 1, 0, 0, 0, 458, 450, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 75, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 464, 5, 64, 0, 0, 464, 77, 1, 0, 0, 0, 465, 471, 5, 66, 0, 0, 466, 471, 3, 80, 40, 0, 467, 471, 5, 75, 0, 0, 468, 471, 5, 76, 0, 0, 469, 471, 5, 77, 0, 0, 470, 465, 1, 0, 0, 0, 470, 466, 1, 0, 0, 0, 470, 467, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 470, 469, 1, 0, 0, 0, 471, 79, 1, 0, 0, 0, 472, 474, 5, 68, 0, 0, 473, 475, 5, 67, 0, 0, 474, 473, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 81, 1, 0, 0, 0, 476, 477, 7, 12, 0, 0, 477, 83, 1, 0, 0, 0, 478, 479, 7, 13, 0, 0, 479, 85, 1, 0, 0, 0, 40, 89, 95, 101, 115, 118, 130, 140, 151, 165, 176, 180, 182, 193, 198, 204, 214, 223, 229, 249, 258, 267, 281, 286, 314, 320, 328, 332, 334, 347, 351, 353, 366, 394, 398, 400, 406, 458, 460, 470, 474] \ No newline at end of file +[4, 1, 84, 499, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 1, 0, 5, 0, 88, 8, 0, 10, 0, 12, 0, 91, 9, 0, 1, 0, 5, 0, 94, 8, 0, 10, 0, 12, 0, 97, 9, 0, 1, 0, 5, 0, 100, 8, 0, 10, 0, 12, 0, 103, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 3, 3, 116, 8, 3, 1, 4, 3, 4, 119, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 3, 7, 131, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 141, 8, 8, 10, 8, 12, 8, 144, 9, 8, 1, 8, 1, 8, 3, 8, 148, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 157, 8, 9, 10, 9, 12, 9, 160, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 5, 11, 171, 8, 11, 10, 11, 12, 11, 174, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 182, 8, 12, 10, 12, 12, 12, 185, 9, 12, 1, 12, 3, 12, 188, 8, 12, 3, 12, 190, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 5, 14, 199, 8, 14, 10, 14, 12, 14, 202, 9, 14, 1, 14, 1, 14, 3, 14, 206, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 212, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 222, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 230, 8, 18, 10, 18, 12, 18, 233, 9, 18, 1, 19, 1, 19, 3, 19, 237, 8, 19, 1, 20, 1, 20, 5, 20, 241, 8, 20, 10, 20, 12, 20, 244, 9, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 4, 21, 256, 8, 21, 11, 21, 12, 21, 257, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 268, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 277, 8, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 286, 8, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 300, 8, 26, 1, 27, 1, 27, 1, 27, 3, 27, 305, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 333, 8, 31, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 339, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 345, 8, 34, 10, 34, 12, 34, 348, 9, 34, 1, 34, 3, 34, 351, 8, 34, 3, 34, 353, 8, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 364, 8, 36, 10, 36, 12, 36, 367, 9, 36, 1, 36, 3, 36, 370, 8, 36, 3, 36, 372, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 385, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 411, 8, 37, 10, 37, 12, 37, 414, 9, 37, 1, 37, 3, 37, 417, 8, 37, 3, 37, 419, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 425, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 477, 8, 37, 10, 37, 12, 37, 480, 9, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 489, 8, 39, 1, 40, 1, 40, 3, 40, 493, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 0, 1, 74, 43, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 0, 14, 1, 0, 4, 10, 2, 0, 10, 10, 21, 22, 1, 0, 23, 24, 1, 0, 36, 40, 2, 0, 36, 40, 42, 45, 2, 0, 5, 5, 50, 51, 1, 0, 52, 54, 2, 0, 51, 51, 55, 55, 1, 0, 56, 57, 1, 0, 6, 9, 1, 0, 58, 59, 1, 0, 46, 47, 1, 0, 71, 73, 2, 0, 71, 72, 79, 79, 529, 0, 89, 1, 0, 0, 0, 2, 106, 1, 0, 0, 0, 4, 111, 1, 0, 0, 0, 6, 113, 1, 0, 0, 0, 8, 118, 1, 0, 0, 0, 10, 122, 1, 0, 0, 0, 12, 124, 1, 0, 0, 0, 14, 130, 1, 0, 0, 0, 16, 132, 1, 0, 0, 0, 18, 151, 1, 0, 0, 0, 20, 163, 1, 0, 0, 0, 22, 168, 1, 0, 0, 0, 24, 177, 1, 0, 0, 0, 26, 193, 1, 0, 0, 0, 28, 205, 1, 0, 0, 0, 30, 211, 1, 0, 0, 0, 32, 221, 1, 0, 0, 0, 34, 223, 1, 0, 0, 0, 36, 225, 1, 0, 0, 0, 38, 236, 1, 0, 0, 0, 40, 238, 1, 0, 0, 0, 42, 249, 1, 0, 0, 0, 44, 267, 1, 0, 0, 0, 46, 269, 1, 0, 0, 0, 48, 280, 1, 0, 0, 0, 50, 289, 1, 0, 0, 0, 52, 292, 1, 0, 0, 0, 54, 304, 1, 0, 0, 0, 56, 306, 1, 0, 0, 0, 58, 314, 1, 0, 0, 0, 60, 320, 1, 0, 0, 0, 62, 332, 1, 0, 0, 0, 64, 334, 1, 0, 0, 0, 66, 338, 1, 0, 0, 0, 68, 340, 1, 0, 0, 0, 70, 356, 1, 0, 0, 0, 72, 359, 1, 0, 0, 0, 74, 424, 1, 0, 0, 0, 76, 481, 1, 0, 0, 0, 78, 488, 1, 0, 0, 0, 80, 490, 1, 0, 0, 0, 82, 494, 1, 0, 0, 0, 84, 496, 1, 0, 0, 0, 86, 88, 3, 2, 1, 0, 87, 86, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 95, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 92, 94, 3, 12, 6, 0, 93, 92, 1, 0, 0, 0, 94, 97, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 101, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 98, 100, 3, 14, 7, 0, 99, 98, 1, 0, 0, 0, 100, 103, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 104, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 104, 105, 5, 0, 0, 1, 105, 1, 1, 0, 0, 0, 106, 107, 5, 1, 0, 0, 107, 108, 3, 4, 2, 0, 108, 109, 3, 6, 3, 0, 109, 110, 5, 2, 0, 0, 110, 3, 1, 0, 0, 0, 111, 112, 5, 3, 0, 0, 112, 5, 1, 0, 0, 0, 113, 115, 3, 8, 4, 0, 114, 116, 3, 8, 4, 0, 115, 114, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 7, 1, 0, 0, 0, 117, 119, 3, 10, 5, 0, 118, 117, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 5, 65, 0, 0, 121, 9, 1, 0, 0, 0, 122, 123, 7, 0, 0, 0, 123, 11, 1, 0, 0, 0, 124, 125, 5, 11, 0, 0, 125, 126, 5, 75, 0, 0, 126, 127, 5, 2, 0, 0, 127, 13, 1, 0, 0, 0, 128, 131, 3, 16, 8, 0, 129, 131, 3, 18, 9, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0, 131, 15, 1, 0, 0, 0, 132, 133, 5, 12, 0, 0, 133, 134, 5, 81, 0, 0, 134, 147, 3, 24, 12, 0, 135, 136, 5, 13, 0, 0, 136, 137, 5, 14, 0, 0, 137, 142, 3, 82, 41, 0, 138, 139, 5, 15, 0, 0, 139, 141, 3, 82, 41, 0, 140, 138, 1, 0, 0, 0, 141, 144, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 145, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 145, 146, 5, 16, 0, 0, 146, 148, 1, 0, 0, 0, 147, 135, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 150, 3, 22, 11, 0, 150, 17, 1, 0, 0, 0, 151, 152, 5, 17, 0, 0, 152, 153, 5, 81, 0, 0, 153, 154, 3, 24, 12, 0, 154, 158, 5, 18, 0, 0, 155, 157, 3, 20, 10, 0, 156, 155, 1, 0, 0, 0, 157, 160, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 161, 1, 0, 0, 0, 160, 158, 1, 0, 0, 0, 161, 162, 5, 19, 0, 0, 162, 19, 1, 0, 0, 0, 163, 164, 5, 12, 0, 0, 164, 165, 5, 81, 0, 0, 165, 166, 3, 24, 12, 0, 166, 167, 3, 22, 11, 0, 167, 21, 1, 0, 0, 0, 168, 172, 5, 18, 0, 0, 169, 171, 3, 30, 15, 0, 170, 169, 1, 0, 0, 0, 171, 174, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 173, 175, 1, 0, 0, 0, 174, 172, 1, 0, 0, 0, 175, 176, 5, 19, 0, 0, 176, 23, 1, 0, 0, 0, 177, 189, 5, 14, 0, 0, 178, 183, 3, 26, 13, 0, 179, 180, 5, 15, 0, 0, 180, 182, 3, 26, 13, 0, 181, 179, 1, 0, 0, 0, 182, 185, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 187, 1, 0, 0, 0, 185, 183, 1, 0, 0, 0, 186, 188, 5, 15, 0, 0, 187, 186, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 190, 1, 0, 0, 0, 189, 178, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 5, 16, 0, 0, 192, 25, 1, 0, 0, 0, 193, 194, 3, 82, 41, 0, 194, 195, 5, 81, 0, 0, 195, 27, 1, 0, 0, 0, 196, 200, 5, 18, 0, 0, 197, 199, 3, 30, 15, 0, 198, 197, 1, 0, 0, 0, 199, 202, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 203, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 203, 206, 5, 19, 0, 0, 204, 206, 3, 30, 15, 0, 205, 196, 1, 0, 0, 0, 205, 204, 1, 0, 0, 0, 206, 29, 1, 0, 0, 0, 207, 212, 3, 38, 19, 0, 208, 209, 3, 32, 16, 0, 209, 210, 5, 2, 0, 0, 210, 212, 1, 0, 0, 0, 211, 207, 1, 0, 0, 0, 211, 208, 1, 0, 0, 0, 212, 31, 1, 0, 0, 0, 213, 222, 3, 40, 20, 0, 214, 222, 3, 42, 21, 0, 215, 222, 3, 44, 22, 0, 216, 222, 3, 46, 23, 0, 217, 222, 3, 48, 24, 0, 218, 222, 3, 34, 17, 0, 219, 222, 3, 50, 25, 0, 220, 222, 3, 36, 18, 0, 221, 213, 1, 0, 0, 0, 221, 214, 1, 0, 0, 0, 221, 215, 1, 0, 0, 0, 221, 216, 1, 0, 0, 0, 221, 217, 1, 0, 0, 0, 221, 218, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 220, 1, 0, 0, 0, 222, 33, 1, 0, 0, 0, 223, 224, 3, 70, 35, 0, 224, 35, 1, 0, 0, 0, 225, 226, 5, 20, 0, 0, 226, 231, 3, 74, 37, 0, 227, 228, 5, 15, 0, 0, 228, 230, 3, 74, 37, 0, 229, 227, 1, 0, 0, 0, 230, 233, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 37, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 234, 237, 3, 52, 26, 0, 235, 237, 3, 54, 27, 0, 236, 234, 1, 0, 0, 0, 236, 235, 1, 0, 0, 0, 237, 39, 1, 0, 0, 0, 238, 242, 3, 82, 41, 0, 239, 241, 3, 76, 38, 0, 240, 239, 1, 0, 0, 0, 241, 244, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 245, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 245, 246, 5, 81, 0, 0, 246, 247, 5, 10, 0, 0, 247, 248, 3, 74, 37, 0, 248, 41, 1, 0, 0, 0, 249, 250, 3, 82, 41, 0, 250, 255, 5, 81, 0, 0, 251, 252, 5, 15, 0, 0, 252, 253, 3, 82, 41, 0, 253, 254, 5, 81, 0, 0, 254, 256, 1, 0, 0, 0, 255, 251, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 260, 5, 10, 0, 0, 260, 261, 3, 74, 37, 0, 261, 43, 1, 0, 0, 0, 262, 263, 5, 81, 0, 0, 263, 264, 7, 1, 0, 0, 264, 268, 3, 74, 37, 0, 265, 266, 5, 81, 0, 0, 266, 268, 7, 2, 0, 0, 267, 262, 1, 0, 0, 0, 267, 265, 1, 0, 0, 0, 268, 45, 1, 0, 0, 0, 269, 270, 5, 25, 0, 0, 270, 271, 5, 14, 0, 0, 271, 272, 5, 78, 0, 0, 272, 273, 5, 6, 0, 0, 273, 276, 3, 74, 37, 0, 274, 275, 5, 15, 0, 0, 275, 277, 3, 64, 32, 0, 276, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 279, 5, 16, 0, 0, 279, 47, 1, 0, 0, 0, 280, 281, 5, 25, 0, 0, 281, 282, 5, 14, 0, 0, 282, 285, 3, 74, 37, 0, 283, 284, 5, 15, 0, 0, 284, 286, 3, 64, 32, 0, 285, 283, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 288, 5, 16, 0, 0, 288, 49, 1, 0, 0, 0, 289, 290, 5, 26, 0, 0, 290, 291, 3, 68, 34, 0, 291, 51, 1, 0, 0, 0, 292, 293, 5, 27, 0, 0, 293, 294, 5, 14, 0, 0, 294, 295, 3, 74, 37, 0, 295, 296, 5, 16, 0, 0, 296, 299, 3, 28, 14, 0, 297, 298, 5, 28, 0, 0, 298, 300, 3, 28, 14, 0, 299, 297, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 53, 1, 0, 0, 0, 301, 305, 3, 56, 28, 0, 302, 305, 3, 58, 29, 0, 303, 305, 3, 60, 30, 0, 304, 301, 1, 0, 0, 0, 304, 302, 1, 0, 0, 0, 304, 303, 1, 0, 0, 0, 305, 55, 1, 0, 0, 0, 306, 307, 5, 29, 0, 0, 307, 308, 3, 28, 14, 0, 308, 309, 5, 30, 0, 0, 309, 310, 5, 14, 0, 0, 310, 311, 3, 74, 37, 0, 311, 312, 5, 16, 0, 0, 312, 313, 5, 2, 0, 0, 313, 57, 1, 0, 0, 0, 314, 315, 5, 30, 0, 0, 315, 316, 5, 14, 0, 0, 316, 317, 3, 74, 37, 0, 317, 318, 5, 16, 0, 0, 318, 319, 3, 28, 14, 0, 319, 59, 1, 0, 0, 0, 320, 321, 5, 31, 0, 0, 321, 322, 5, 14, 0, 0, 322, 323, 3, 62, 31, 0, 323, 324, 5, 2, 0, 0, 324, 325, 3, 74, 37, 0, 325, 326, 5, 2, 0, 0, 326, 327, 3, 44, 22, 0, 327, 328, 5, 16, 0, 0, 328, 329, 3, 28, 14, 0, 329, 61, 1, 0, 0, 0, 330, 333, 3, 40, 20, 0, 331, 333, 3, 44, 22, 0, 332, 330, 1, 0, 0, 0, 332, 331, 1, 0, 0, 0, 333, 63, 1, 0, 0, 0, 334, 335, 5, 75, 0, 0, 335, 65, 1, 0, 0, 0, 336, 339, 5, 81, 0, 0, 337, 339, 3, 78, 39, 0, 338, 336, 1, 0, 0, 0, 338, 337, 1, 0, 0, 0, 339, 67, 1, 0, 0, 0, 340, 352, 5, 14, 0, 0, 341, 346, 3, 66, 33, 0, 342, 343, 5, 15, 0, 0, 343, 345, 3, 66, 33, 0, 344, 342, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 351, 5, 15, 0, 0, 350, 349, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 353, 1, 0, 0, 0, 352, 341, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 355, 5, 16, 0, 0, 355, 69, 1, 0, 0, 0, 356, 357, 5, 81, 0, 0, 357, 358, 3, 72, 36, 0, 358, 71, 1, 0, 0, 0, 359, 371, 5, 14, 0, 0, 360, 365, 3, 74, 37, 0, 361, 362, 5, 15, 0, 0, 362, 364, 3, 74, 37, 0, 363, 361, 1, 0, 0, 0, 364, 367, 1, 0, 0, 0, 365, 363, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 368, 370, 5, 15, 0, 0, 369, 368, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 372, 1, 0, 0, 0, 371, 360, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 374, 5, 16, 0, 0, 374, 73, 1, 0, 0, 0, 375, 376, 6, 37, -1, 0, 376, 377, 5, 14, 0, 0, 377, 378, 3, 74, 37, 0, 378, 379, 5, 16, 0, 0, 379, 425, 1, 0, 0, 0, 380, 381, 3, 84, 42, 0, 381, 382, 5, 14, 0, 0, 382, 384, 3, 74, 37, 0, 383, 385, 5, 15, 0, 0, 384, 383, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 387, 5, 16, 0, 0, 387, 425, 1, 0, 0, 0, 388, 425, 3, 70, 35, 0, 389, 390, 5, 32, 0, 0, 390, 391, 5, 81, 0, 0, 391, 425, 3, 72, 36, 0, 392, 393, 5, 35, 0, 0, 393, 394, 5, 33, 0, 0, 394, 395, 3, 74, 37, 0, 395, 396, 5, 34, 0, 0, 396, 397, 7, 3, 0, 0, 397, 425, 1, 0, 0, 0, 398, 399, 5, 41, 0, 0, 399, 400, 5, 33, 0, 0, 400, 401, 3, 74, 37, 0, 401, 402, 5, 34, 0, 0, 402, 403, 7, 4, 0, 0, 403, 425, 1, 0, 0, 0, 404, 405, 7, 5, 0, 0, 405, 425, 3, 74, 37, 15, 406, 418, 5, 33, 0, 0, 407, 412, 3, 74, 37, 0, 408, 409, 5, 15, 0, 0, 409, 411, 3, 74, 37, 0, 410, 408, 1, 0, 0, 0, 411, 414, 1, 0, 0, 0, 412, 410, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 416, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 415, 417, 5, 15, 0, 0, 416, 415, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 419, 1, 0, 0, 0, 418, 407, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 420, 1, 0, 0, 0, 420, 425, 5, 34, 0, 0, 421, 425, 5, 80, 0, 0, 422, 425, 5, 81, 0, 0, 423, 425, 3, 78, 39, 0, 424, 375, 1, 0, 0, 0, 424, 380, 1, 0, 0, 0, 424, 388, 1, 0, 0, 0, 424, 389, 1, 0, 0, 0, 424, 392, 1, 0, 0, 0, 424, 398, 1, 0, 0, 0, 424, 404, 1, 0, 0, 0, 424, 406, 1, 0, 0, 0, 424, 421, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 424, 423, 1, 0, 0, 0, 425, 478, 1, 0, 0, 0, 426, 427, 10, 14, 0, 0, 427, 428, 7, 6, 0, 0, 428, 477, 3, 74, 37, 15, 429, 430, 10, 13, 0, 0, 430, 431, 7, 7, 0, 0, 431, 477, 3, 74, 37, 14, 432, 433, 10, 12, 0, 0, 433, 434, 7, 8, 0, 0, 434, 477, 3, 74, 37, 13, 435, 436, 10, 11, 0, 0, 436, 437, 7, 9, 0, 0, 437, 477, 3, 74, 37, 12, 438, 439, 10, 10, 0, 0, 439, 440, 7, 10, 0, 0, 440, 477, 3, 74, 37, 11, 441, 442, 10, 9, 0, 0, 442, 443, 5, 60, 0, 0, 443, 477, 3, 74, 37, 10, 444, 445, 10, 8, 0, 0, 445, 446, 5, 4, 0, 0, 446, 477, 3, 74, 37, 9, 447, 448, 10, 7, 0, 0, 448, 449, 5, 61, 0, 0, 449, 477, 3, 74, 37, 8, 450, 451, 10, 6, 0, 0, 451, 452, 5, 62, 0, 0, 452, 477, 3, 74, 37, 7, 453, 454, 10, 5, 0, 0, 454, 455, 5, 63, 0, 0, 455, 477, 3, 74, 37, 6, 456, 457, 10, 21, 0, 0, 457, 458, 5, 33, 0, 0, 458, 459, 5, 68, 0, 0, 459, 477, 5, 34, 0, 0, 460, 461, 10, 18, 0, 0, 461, 477, 7, 11, 0, 0, 462, 463, 10, 17, 0, 0, 463, 464, 5, 48, 0, 0, 464, 465, 5, 14, 0, 0, 465, 466, 3, 74, 37, 0, 466, 467, 5, 16, 0, 0, 467, 477, 1, 0, 0, 0, 468, 469, 10, 16, 0, 0, 469, 470, 5, 49, 0, 0, 470, 471, 5, 14, 0, 0, 471, 472, 3, 74, 37, 0, 472, 473, 5, 15, 0, 0, 473, 474, 3, 74, 37, 0, 474, 475, 5, 16, 0, 0, 475, 477, 1, 0, 0, 0, 476, 426, 1, 0, 0, 0, 476, 429, 1, 0, 0, 0, 476, 432, 1, 0, 0, 0, 476, 435, 1, 0, 0, 0, 476, 438, 1, 0, 0, 0, 476, 441, 1, 0, 0, 0, 476, 444, 1, 0, 0, 0, 476, 447, 1, 0, 0, 0, 476, 450, 1, 0, 0, 0, 476, 453, 1, 0, 0, 0, 476, 456, 1, 0, 0, 0, 476, 460, 1, 0, 0, 0, 476, 462, 1, 0, 0, 0, 476, 468, 1, 0, 0, 0, 477, 480, 1, 0, 0, 0, 478, 476, 1, 0, 0, 0, 478, 479, 1, 0, 0, 0, 479, 75, 1, 0, 0, 0, 480, 478, 1, 0, 0, 0, 481, 482, 5, 64, 0, 0, 482, 77, 1, 0, 0, 0, 483, 489, 5, 66, 0, 0, 484, 489, 3, 80, 40, 0, 485, 489, 5, 75, 0, 0, 486, 489, 5, 76, 0, 0, 487, 489, 5, 77, 0, 0, 488, 483, 1, 0, 0, 0, 488, 484, 1, 0, 0, 0, 488, 485, 1, 0, 0, 0, 488, 486, 1, 0, 0, 0, 488, 487, 1, 0, 0, 0, 489, 79, 1, 0, 0, 0, 490, 492, 5, 68, 0, 0, 491, 493, 5, 67, 0, 0, 492, 491, 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 81, 1, 0, 0, 0, 494, 495, 7, 12, 0, 0, 495, 83, 1, 0, 0, 0, 496, 497, 7, 13, 0, 0, 497, 85, 1, 0, 0, 0, 43, 89, 95, 101, 115, 118, 130, 142, 147, 158, 172, 183, 187, 189, 200, 205, 211, 221, 231, 236, 242, 257, 267, 276, 285, 299, 304, 332, 338, 346, 350, 352, 365, 369, 371, 384, 412, 416, 418, 424, 476, 478, 488, 492] \ No newline at end of file diff --git a/packages/cashc/src/grammar/CashScript.tokens b/packages/cashc/src/grammar/CashScript.tokens index 16dc361d..14524e52 100644 --- a/packages/cashc/src/grammar/CashScript.tokens +++ b/packages/cashc/src/grammar/CashScript.tokens @@ -96,11 +96,11 @@ LINE_COMMENT=84 'function'=12 'returns'=13 '('=14 -')'=15 -'contract'=16 -'{'=17 -'}'=18 -','=19 +','=15 +')'=16 +'contract'=17 +'{'=18 +'}'=19 'return'=20 '+='=21 '-='=22 diff --git a/packages/cashc/src/grammar/CashScriptLexer.interp b/packages/cashc/src/grammar/CashScriptLexer.interp index d394bd0e..24b54e13 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.interp +++ b/packages/cashc/src/grammar/CashScriptLexer.interp @@ -14,11 +14,11 @@ null 'function' 'returns' '(' +',' ')' 'contract' '{' '}' -',' 'return' '+=' '-=' @@ -266,4 +266,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 84, 966, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 4, 64, 557, 8, 64, 11, 64, 12, 64, 558, 1, 64, 1, 64, 4, 64, 563, 8, 64, 11, 64, 12, 64, 564, 1, 64, 1, 64, 4, 64, 569, 8, 64, 11, 64, 12, 64, 570, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 582, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 641, 8, 66, 1, 67, 3, 67, 644, 8, 67, 1, 67, 1, 67, 3, 67, 648, 8, 67, 1, 68, 4, 68, 651, 8, 68, 11, 68, 12, 68, 652, 1, 68, 1, 68, 4, 68, 657, 8, 68, 11, 68, 12, 68, 658, 5, 68, 661, 8, 68, 10, 68, 12, 68, 664, 9, 68, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 698, 8, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 717, 8, 72, 1, 73, 1, 73, 5, 73, 721, 8, 73, 10, 73, 12, 73, 724, 9, 73, 1, 74, 1, 74, 1, 74, 1, 74, 5, 74, 730, 8, 74, 10, 74, 12, 74, 733, 9, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 5, 74, 740, 8, 74, 10, 74, 12, 74, 743, 9, 74, 1, 74, 3, 74, 746, 8, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 5, 76, 760, 8, 76, 10, 76, 12, 76, 763, 9, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 3, 77, 780, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 3, 78, 817, 8, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 3, 78, 830, 8, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 3, 79, 926, 8, 79, 1, 80, 1, 80, 5, 80, 930, 8, 80, 10, 80, 12, 80, 933, 9, 80, 1, 81, 4, 81, 936, 8, 81, 11, 81, 12, 81, 937, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 5, 82, 946, 8, 82, 10, 82, 12, 82, 949, 9, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 5, 83, 960, 8, 83, 10, 83, 12, 83, 963, 9, 83, 1, 83, 1, 83, 3, 731, 741, 947, 0, 84, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 1, 0, 11, 1, 0, 48, 57, 2, 0, 69, 69, 101, 101, 1, 0, 49, 57, 3, 0, 10, 10, 13, 13, 34, 34, 3, 0, 10, 10, 13, 13, 39, 39, 2, 0, 88, 88, 120, 120, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 65, 90, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 12, 13, 32, 32, 2, 0, 10, 10, 13, 13, 1010, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 1, 169, 1, 0, 0, 0, 3, 176, 1, 0, 0, 0, 5, 178, 1, 0, 0, 0, 7, 189, 1, 0, 0, 0, 9, 191, 1, 0, 0, 0, 11, 193, 1, 0, 0, 0, 13, 196, 1, 0, 0, 0, 15, 198, 1, 0, 0, 0, 17, 200, 1, 0, 0, 0, 19, 203, 1, 0, 0, 0, 21, 205, 1, 0, 0, 0, 23, 212, 1, 0, 0, 0, 25, 221, 1, 0, 0, 0, 27, 229, 1, 0, 0, 0, 29, 231, 1, 0, 0, 0, 31, 233, 1, 0, 0, 0, 33, 242, 1, 0, 0, 0, 35, 244, 1, 0, 0, 0, 37, 246, 1, 0, 0, 0, 39, 248, 1, 0, 0, 0, 41, 255, 1, 0, 0, 0, 43, 258, 1, 0, 0, 0, 45, 261, 1, 0, 0, 0, 47, 264, 1, 0, 0, 0, 49, 267, 1, 0, 0, 0, 51, 275, 1, 0, 0, 0, 53, 287, 1, 0, 0, 0, 55, 290, 1, 0, 0, 0, 57, 295, 1, 0, 0, 0, 59, 298, 1, 0, 0, 0, 61, 304, 1, 0, 0, 0, 63, 308, 1, 0, 0, 0, 65, 312, 1, 0, 0, 0, 67, 314, 1, 0, 0, 0, 69, 316, 1, 0, 0, 0, 71, 327, 1, 0, 0, 0, 73, 334, 1, 0, 0, 0, 75, 351, 1, 0, 0, 0, 77, 366, 1, 0, 0, 0, 79, 381, 1, 0, 0, 0, 81, 394, 1, 0, 0, 0, 83, 404, 1, 0, 0, 0, 85, 429, 1, 0, 0, 0, 87, 444, 1, 0, 0, 0, 89, 463, 1, 0, 0, 0, 91, 479, 1, 0, 0, 0, 93, 490, 1, 0, 0, 0, 95, 498, 1, 0, 0, 0, 97, 505, 1, 0, 0, 0, 99, 512, 1, 0, 0, 0, 101, 514, 1, 0, 0, 0, 103, 516, 1, 0, 0, 0, 105, 518, 1, 0, 0, 0, 107, 520, 1, 0, 0, 0, 109, 522, 1, 0, 0, 0, 111, 524, 1, 0, 0, 0, 113, 527, 1, 0, 0, 0, 115, 530, 1, 0, 0, 0, 117, 533, 1, 0, 0, 0, 119, 536, 1, 0, 0, 0, 121, 538, 1, 0, 0, 0, 123, 540, 1, 0, 0, 0, 125, 543, 1, 0, 0, 0, 127, 546, 1, 0, 0, 0, 129, 556, 1, 0, 0, 0, 131, 581, 1, 0, 0, 0, 133, 640, 1, 0, 0, 0, 135, 643, 1, 0, 0, 0, 137, 650, 1, 0, 0, 0, 139, 665, 1, 0, 0, 0, 141, 697, 1, 0, 0, 0, 143, 699, 1, 0, 0, 0, 145, 716, 1, 0, 0, 0, 147, 718, 1, 0, 0, 0, 149, 745, 1, 0, 0, 0, 151, 747, 1, 0, 0, 0, 153, 756, 1, 0, 0, 0, 155, 779, 1, 0, 0, 0, 157, 829, 1, 0, 0, 0, 159, 925, 1, 0, 0, 0, 161, 927, 1, 0, 0, 0, 163, 935, 1, 0, 0, 0, 165, 941, 1, 0, 0, 0, 167, 955, 1, 0, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 114, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 103, 0, 0, 173, 174, 5, 109, 0, 0, 174, 175, 5, 97, 0, 0, 175, 2, 1, 0, 0, 0, 176, 177, 5, 59, 0, 0, 177, 4, 1, 0, 0, 0, 178, 179, 5, 99, 0, 0, 179, 180, 5, 97, 0, 0, 180, 181, 5, 115, 0, 0, 181, 182, 5, 104, 0, 0, 182, 183, 5, 115, 0, 0, 183, 184, 5, 99, 0, 0, 184, 185, 5, 114, 0, 0, 185, 186, 5, 105, 0, 0, 186, 187, 5, 112, 0, 0, 187, 188, 5, 116, 0, 0, 188, 6, 1, 0, 0, 0, 189, 190, 5, 94, 0, 0, 190, 8, 1, 0, 0, 0, 191, 192, 5, 126, 0, 0, 192, 10, 1, 0, 0, 0, 193, 194, 5, 62, 0, 0, 194, 195, 5, 61, 0, 0, 195, 12, 1, 0, 0, 0, 196, 197, 5, 62, 0, 0, 197, 14, 1, 0, 0, 0, 198, 199, 5, 60, 0, 0, 199, 16, 1, 0, 0, 0, 200, 201, 5, 60, 0, 0, 201, 202, 5, 61, 0, 0, 202, 18, 1, 0, 0, 0, 203, 204, 5, 61, 0, 0, 204, 20, 1, 0, 0, 0, 205, 206, 5, 105, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, 112, 0, 0, 208, 209, 5, 111, 0, 0, 209, 210, 5, 114, 0, 0, 210, 211, 5, 116, 0, 0, 211, 22, 1, 0, 0, 0, 212, 213, 5, 102, 0, 0, 213, 214, 5, 117, 0, 0, 214, 215, 5, 110, 0, 0, 215, 216, 5, 99, 0, 0, 216, 217, 5, 116, 0, 0, 217, 218, 5, 105, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 110, 0, 0, 220, 24, 1, 0, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 101, 0, 0, 223, 224, 5, 116, 0, 0, 224, 225, 5, 117, 0, 0, 225, 226, 5, 114, 0, 0, 226, 227, 5, 110, 0, 0, 227, 228, 5, 115, 0, 0, 228, 26, 1, 0, 0, 0, 229, 230, 5, 40, 0, 0, 230, 28, 1, 0, 0, 0, 231, 232, 5, 41, 0, 0, 232, 30, 1, 0, 0, 0, 233, 234, 5, 99, 0, 0, 234, 235, 5, 111, 0, 0, 235, 236, 5, 110, 0, 0, 236, 237, 5, 116, 0, 0, 237, 238, 5, 114, 0, 0, 238, 239, 5, 97, 0, 0, 239, 240, 5, 99, 0, 0, 240, 241, 5, 116, 0, 0, 241, 32, 1, 0, 0, 0, 242, 243, 5, 123, 0, 0, 243, 34, 1, 0, 0, 0, 244, 245, 5, 125, 0, 0, 245, 36, 1, 0, 0, 0, 246, 247, 5, 44, 0, 0, 247, 38, 1, 0, 0, 0, 248, 249, 5, 114, 0, 0, 249, 250, 5, 101, 0, 0, 250, 251, 5, 116, 0, 0, 251, 252, 5, 117, 0, 0, 252, 253, 5, 114, 0, 0, 253, 254, 5, 110, 0, 0, 254, 40, 1, 0, 0, 0, 255, 256, 5, 43, 0, 0, 256, 257, 5, 61, 0, 0, 257, 42, 1, 0, 0, 0, 258, 259, 5, 45, 0, 0, 259, 260, 5, 61, 0, 0, 260, 44, 1, 0, 0, 0, 261, 262, 5, 43, 0, 0, 262, 263, 5, 43, 0, 0, 263, 46, 1, 0, 0, 0, 264, 265, 5, 45, 0, 0, 265, 266, 5, 45, 0, 0, 266, 48, 1, 0, 0, 0, 267, 268, 5, 114, 0, 0, 268, 269, 5, 101, 0, 0, 269, 270, 5, 113, 0, 0, 270, 271, 5, 117, 0, 0, 271, 272, 5, 105, 0, 0, 272, 273, 5, 114, 0, 0, 273, 274, 5, 101, 0, 0, 274, 50, 1, 0, 0, 0, 275, 276, 5, 99, 0, 0, 276, 277, 5, 111, 0, 0, 277, 278, 5, 110, 0, 0, 278, 279, 5, 115, 0, 0, 279, 280, 5, 111, 0, 0, 280, 281, 5, 108, 0, 0, 281, 282, 5, 101, 0, 0, 282, 283, 5, 46, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 111, 0, 0, 285, 286, 5, 103, 0, 0, 286, 52, 1, 0, 0, 0, 287, 288, 5, 105, 0, 0, 288, 289, 5, 102, 0, 0, 289, 54, 1, 0, 0, 0, 290, 291, 5, 101, 0, 0, 291, 292, 5, 108, 0, 0, 292, 293, 5, 115, 0, 0, 293, 294, 5, 101, 0, 0, 294, 56, 1, 0, 0, 0, 295, 296, 5, 100, 0, 0, 296, 297, 5, 111, 0, 0, 297, 58, 1, 0, 0, 0, 298, 299, 5, 119, 0, 0, 299, 300, 5, 104, 0, 0, 300, 301, 5, 105, 0, 0, 301, 302, 5, 108, 0, 0, 302, 303, 5, 101, 0, 0, 303, 60, 1, 0, 0, 0, 304, 305, 5, 102, 0, 0, 305, 306, 5, 111, 0, 0, 306, 307, 5, 114, 0, 0, 307, 62, 1, 0, 0, 0, 308, 309, 5, 110, 0, 0, 309, 310, 5, 101, 0, 0, 310, 311, 5, 119, 0, 0, 311, 64, 1, 0, 0, 0, 312, 313, 5, 91, 0, 0, 313, 66, 1, 0, 0, 0, 314, 315, 5, 93, 0, 0, 315, 68, 1, 0, 0, 0, 316, 317, 5, 116, 0, 0, 317, 318, 5, 120, 0, 0, 318, 319, 5, 46, 0, 0, 319, 320, 5, 111, 0, 0, 320, 321, 5, 117, 0, 0, 321, 322, 5, 116, 0, 0, 322, 323, 5, 112, 0, 0, 323, 324, 5, 117, 0, 0, 324, 325, 5, 116, 0, 0, 325, 326, 5, 115, 0, 0, 326, 70, 1, 0, 0, 0, 327, 328, 5, 46, 0, 0, 328, 329, 5, 118, 0, 0, 329, 330, 5, 97, 0, 0, 330, 331, 5, 108, 0, 0, 331, 332, 5, 117, 0, 0, 332, 333, 5, 101, 0, 0, 333, 72, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 108, 0, 0, 336, 337, 5, 111, 0, 0, 337, 338, 5, 99, 0, 0, 338, 339, 5, 107, 0, 0, 339, 340, 5, 105, 0, 0, 340, 341, 5, 110, 0, 0, 341, 342, 5, 103, 0, 0, 342, 343, 5, 66, 0, 0, 343, 344, 5, 121, 0, 0, 344, 345, 5, 116, 0, 0, 345, 346, 5, 101, 0, 0, 346, 347, 5, 99, 0, 0, 347, 348, 5, 111, 0, 0, 348, 349, 5, 100, 0, 0, 349, 350, 5, 101, 0, 0, 350, 74, 1, 0, 0, 0, 351, 352, 5, 46, 0, 0, 352, 353, 5, 116, 0, 0, 353, 354, 5, 111, 0, 0, 354, 355, 5, 107, 0, 0, 355, 356, 5, 101, 0, 0, 356, 357, 5, 110, 0, 0, 357, 358, 5, 67, 0, 0, 358, 359, 5, 97, 0, 0, 359, 360, 5, 116, 0, 0, 360, 361, 5, 101, 0, 0, 361, 362, 5, 103, 0, 0, 362, 363, 5, 111, 0, 0, 363, 364, 5, 114, 0, 0, 364, 365, 5, 121, 0, 0, 365, 76, 1, 0, 0, 0, 366, 367, 5, 46, 0, 0, 367, 368, 5, 110, 0, 0, 368, 369, 5, 102, 0, 0, 369, 370, 5, 116, 0, 0, 370, 371, 5, 67, 0, 0, 371, 372, 5, 111, 0, 0, 372, 373, 5, 109, 0, 0, 373, 374, 5, 109, 0, 0, 374, 375, 5, 105, 0, 0, 375, 376, 5, 116, 0, 0, 376, 377, 5, 109, 0, 0, 377, 378, 5, 101, 0, 0, 378, 379, 5, 110, 0, 0, 379, 380, 5, 116, 0, 0, 380, 78, 1, 0, 0, 0, 381, 382, 5, 46, 0, 0, 382, 383, 5, 116, 0, 0, 383, 384, 5, 111, 0, 0, 384, 385, 5, 107, 0, 0, 385, 386, 5, 101, 0, 0, 386, 387, 5, 110, 0, 0, 387, 388, 5, 65, 0, 0, 388, 389, 5, 109, 0, 0, 389, 390, 5, 111, 0, 0, 390, 391, 5, 117, 0, 0, 391, 392, 5, 110, 0, 0, 392, 393, 5, 116, 0, 0, 393, 80, 1, 0, 0, 0, 394, 395, 5, 116, 0, 0, 395, 396, 5, 120, 0, 0, 396, 397, 5, 46, 0, 0, 397, 398, 5, 105, 0, 0, 398, 399, 5, 110, 0, 0, 399, 400, 5, 112, 0, 0, 400, 401, 5, 117, 0, 0, 401, 402, 5, 116, 0, 0, 402, 403, 5, 115, 0, 0, 403, 82, 1, 0, 0, 0, 404, 405, 5, 46, 0, 0, 405, 406, 5, 111, 0, 0, 406, 407, 5, 117, 0, 0, 407, 408, 5, 116, 0, 0, 408, 409, 5, 112, 0, 0, 409, 410, 5, 111, 0, 0, 410, 411, 5, 105, 0, 0, 411, 412, 5, 110, 0, 0, 412, 413, 5, 116, 0, 0, 413, 414, 5, 84, 0, 0, 414, 415, 5, 114, 0, 0, 415, 416, 5, 97, 0, 0, 416, 417, 5, 110, 0, 0, 417, 418, 5, 115, 0, 0, 418, 419, 5, 97, 0, 0, 419, 420, 5, 99, 0, 0, 420, 421, 5, 116, 0, 0, 421, 422, 5, 105, 0, 0, 422, 423, 5, 111, 0, 0, 423, 424, 5, 110, 0, 0, 424, 425, 5, 72, 0, 0, 425, 426, 5, 97, 0, 0, 426, 427, 5, 115, 0, 0, 427, 428, 5, 104, 0, 0, 428, 84, 1, 0, 0, 0, 429, 430, 5, 46, 0, 0, 430, 431, 5, 111, 0, 0, 431, 432, 5, 117, 0, 0, 432, 433, 5, 116, 0, 0, 433, 434, 5, 112, 0, 0, 434, 435, 5, 111, 0, 0, 435, 436, 5, 105, 0, 0, 436, 437, 5, 110, 0, 0, 437, 438, 5, 116, 0, 0, 438, 439, 5, 73, 0, 0, 439, 440, 5, 110, 0, 0, 440, 441, 5, 100, 0, 0, 441, 442, 5, 101, 0, 0, 442, 443, 5, 120, 0, 0, 443, 86, 1, 0, 0, 0, 444, 445, 5, 46, 0, 0, 445, 446, 5, 117, 0, 0, 446, 447, 5, 110, 0, 0, 447, 448, 5, 108, 0, 0, 448, 449, 5, 111, 0, 0, 449, 450, 5, 99, 0, 0, 450, 451, 5, 107, 0, 0, 451, 452, 5, 105, 0, 0, 452, 453, 5, 110, 0, 0, 453, 454, 5, 103, 0, 0, 454, 455, 5, 66, 0, 0, 455, 456, 5, 121, 0, 0, 456, 457, 5, 116, 0, 0, 457, 458, 5, 101, 0, 0, 458, 459, 5, 99, 0, 0, 459, 460, 5, 111, 0, 0, 460, 461, 5, 100, 0, 0, 461, 462, 5, 101, 0, 0, 462, 88, 1, 0, 0, 0, 463, 464, 5, 46, 0, 0, 464, 465, 5, 115, 0, 0, 465, 466, 5, 101, 0, 0, 466, 467, 5, 113, 0, 0, 467, 468, 5, 117, 0, 0, 468, 469, 5, 101, 0, 0, 469, 470, 5, 110, 0, 0, 470, 471, 5, 99, 0, 0, 471, 472, 5, 101, 0, 0, 472, 473, 5, 78, 0, 0, 473, 474, 5, 117, 0, 0, 474, 475, 5, 109, 0, 0, 475, 476, 5, 98, 0, 0, 476, 477, 5, 101, 0, 0, 477, 478, 5, 114, 0, 0, 478, 90, 1, 0, 0, 0, 479, 480, 5, 46, 0, 0, 480, 481, 5, 114, 0, 0, 481, 482, 5, 101, 0, 0, 482, 483, 5, 118, 0, 0, 483, 484, 5, 101, 0, 0, 484, 485, 5, 114, 0, 0, 485, 486, 5, 115, 0, 0, 486, 487, 5, 101, 0, 0, 487, 488, 5, 40, 0, 0, 488, 489, 5, 41, 0, 0, 489, 92, 1, 0, 0, 0, 490, 491, 5, 46, 0, 0, 491, 492, 5, 108, 0, 0, 492, 493, 5, 101, 0, 0, 493, 494, 5, 110, 0, 0, 494, 495, 5, 103, 0, 0, 495, 496, 5, 116, 0, 0, 496, 497, 5, 104, 0, 0, 497, 94, 1, 0, 0, 0, 498, 499, 5, 46, 0, 0, 499, 500, 5, 115, 0, 0, 500, 501, 5, 112, 0, 0, 501, 502, 5, 108, 0, 0, 502, 503, 5, 105, 0, 0, 503, 504, 5, 116, 0, 0, 504, 96, 1, 0, 0, 0, 505, 506, 5, 46, 0, 0, 506, 507, 5, 115, 0, 0, 507, 508, 5, 108, 0, 0, 508, 509, 5, 105, 0, 0, 509, 510, 5, 99, 0, 0, 510, 511, 5, 101, 0, 0, 511, 98, 1, 0, 0, 0, 512, 513, 5, 33, 0, 0, 513, 100, 1, 0, 0, 0, 514, 515, 5, 45, 0, 0, 515, 102, 1, 0, 0, 0, 516, 517, 5, 42, 0, 0, 517, 104, 1, 0, 0, 0, 518, 519, 5, 47, 0, 0, 519, 106, 1, 0, 0, 0, 520, 521, 5, 37, 0, 0, 521, 108, 1, 0, 0, 0, 522, 523, 5, 43, 0, 0, 523, 110, 1, 0, 0, 0, 524, 525, 5, 62, 0, 0, 525, 526, 5, 62, 0, 0, 526, 112, 1, 0, 0, 0, 527, 528, 5, 60, 0, 0, 528, 529, 5, 60, 0, 0, 529, 114, 1, 0, 0, 0, 530, 531, 5, 61, 0, 0, 531, 532, 5, 61, 0, 0, 532, 116, 1, 0, 0, 0, 533, 534, 5, 33, 0, 0, 534, 535, 5, 61, 0, 0, 535, 118, 1, 0, 0, 0, 536, 537, 5, 38, 0, 0, 537, 120, 1, 0, 0, 0, 538, 539, 5, 124, 0, 0, 539, 122, 1, 0, 0, 0, 540, 541, 5, 38, 0, 0, 541, 542, 5, 38, 0, 0, 542, 124, 1, 0, 0, 0, 543, 544, 5, 124, 0, 0, 544, 545, 5, 124, 0, 0, 545, 126, 1, 0, 0, 0, 546, 547, 5, 99, 0, 0, 547, 548, 5, 111, 0, 0, 548, 549, 5, 110, 0, 0, 549, 550, 5, 115, 0, 0, 550, 551, 5, 116, 0, 0, 551, 552, 5, 97, 0, 0, 552, 553, 5, 110, 0, 0, 553, 554, 5, 116, 0, 0, 554, 128, 1, 0, 0, 0, 555, 557, 7, 0, 0, 0, 556, 555, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 556, 1, 0, 0, 0, 558, 559, 1, 0, 0, 0, 559, 560, 1, 0, 0, 0, 560, 562, 5, 46, 0, 0, 561, 563, 7, 0, 0, 0, 562, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, 565, 566, 1, 0, 0, 0, 566, 568, 5, 46, 0, 0, 567, 569, 7, 0, 0, 0, 568, 567, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 568, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 130, 1, 0, 0, 0, 572, 573, 5, 116, 0, 0, 573, 574, 5, 114, 0, 0, 574, 575, 5, 117, 0, 0, 575, 582, 5, 101, 0, 0, 576, 577, 5, 102, 0, 0, 577, 578, 5, 97, 0, 0, 578, 579, 5, 108, 0, 0, 579, 580, 5, 115, 0, 0, 580, 582, 5, 101, 0, 0, 581, 572, 1, 0, 0, 0, 581, 576, 1, 0, 0, 0, 582, 132, 1, 0, 0, 0, 583, 584, 5, 115, 0, 0, 584, 585, 5, 97, 0, 0, 585, 586, 5, 116, 0, 0, 586, 587, 5, 111, 0, 0, 587, 588, 5, 115, 0, 0, 588, 589, 5, 104, 0, 0, 589, 590, 5, 105, 0, 0, 590, 641, 5, 115, 0, 0, 591, 592, 5, 115, 0, 0, 592, 593, 5, 97, 0, 0, 593, 594, 5, 116, 0, 0, 594, 641, 5, 115, 0, 0, 595, 596, 5, 102, 0, 0, 596, 597, 5, 105, 0, 0, 597, 598, 5, 110, 0, 0, 598, 599, 5, 110, 0, 0, 599, 600, 5, 101, 0, 0, 600, 641, 5, 121, 0, 0, 601, 602, 5, 98, 0, 0, 602, 603, 5, 105, 0, 0, 603, 604, 5, 116, 0, 0, 604, 641, 5, 115, 0, 0, 605, 606, 5, 98, 0, 0, 606, 607, 5, 105, 0, 0, 607, 608, 5, 116, 0, 0, 608, 609, 5, 99, 0, 0, 609, 610, 5, 111, 0, 0, 610, 611, 5, 105, 0, 0, 611, 641, 5, 110, 0, 0, 612, 613, 5, 115, 0, 0, 613, 614, 5, 101, 0, 0, 614, 615, 5, 99, 0, 0, 615, 616, 5, 111, 0, 0, 616, 617, 5, 110, 0, 0, 617, 618, 5, 100, 0, 0, 618, 641, 5, 115, 0, 0, 619, 620, 5, 109, 0, 0, 620, 621, 5, 105, 0, 0, 621, 622, 5, 110, 0, 0, 622, 623, 5, 117, 0, 0, 623, 624, 5, 116, 0, 0, 624, 625, 5, 101, 0, 0, 625, 641, 5, 115, 0, 0, 626, 627, 5, 104, 0, 0, 627, 628, 5, 111, 0, 0, 628, 629, 5, 117, 0, 0, 629, 630, 5, 114, 0, 0, 630, 641, 5, 115, 0, 0, 631, 632, 5, 100, 0, 0, 632, 633, 5, 97, 0, 0, 633, 634, 5, 121, 0, 0, 634, 641, 5, 115, 0, 0, 635, 636, 5, 119, 0, 0, 636, 637, 5, 101, 0, 0, 637, 638, 5, 101, 0, 0, 638, 639, 5, 107, 0, 0, 639, 641, 5, 115, 0, 0, 640, 583, 1, 0, 0, 0, 640, 591, 1, 0, 0, 0, 640, 595, 1, 0, 0, 0, 640, 601, 1, 0, 0, 0, 640, 605, 1, 0, 0, 0, 640, 612, 1, 0, 0, 0, 640, 619, 1, 0, 0, 0, 640, 626, 1, 0, 0, 0, 640, 631, 1, 0, 0, 0, 640, 635, 1, 0, 0, 0, 641, 134, 1, 0, 0, 0, 642, 644, 5, 45, 0, 0, 643, 642, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 645, 1, 0, 0, 0, 645, 647, 3, 137, 68, 0, 646, 648, 3, 139, 69, 0, 647, 646, 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 136, 1, 0, 0, 0, 649, 651, 7, 0, 0, 0, 650, 649, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 662, 1, 0, 0, 0, 654, 656, 5, 95, 0, 0, 655, 657, 7, 0, 0, 0, 656, 655, 1, 0, 0, 0, 657, 658, 1, 0, 0, 0, 658, 656, 1, 0, 0, 0, 658, 659, 1, 0, 0, 0, 659, 661, 1, 0, 0, 0, 660, 654, 1, 0, 0, 0, 661, 664, 1, 0, 0, 0, 662, 660, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 138, 1, 0, 0, 0, 664, 662, 1, 0, 0, 0, 665, 666, 7, 1, 0, 0, 666, 667, 3, 137, 68, 0, 667, 140, 1, 0, 0, 0, 668, 669, 5, 105, 0, 0, 669, 670, 5, 110, 0, 0, 670, 698, 5, 116, 0, 0, 671, 672, 5, 98, 0, 0, 672, 673, 5, 111, 0, 0, 673, 674, 5, 111, 0, 0, 674, 698, 5, 108, 0, 0, 675, 676, 5, 115, 0, 0, 676, 677, 5, 116, 0, 0, 677, 678, 5, 114, 0, 0, 678, 679, 5, 105, 0, 0, 679, 680, 5, 110, 0, 0, 680, 698, 5, 103, 0, 0, 681, 682, 5, 112, 0, 0, 682, 683, 5, 117, 0, 0, 683, 684, 5, 98, 0, 0, 684, 685, 5, 107, 0, 0, 685, 686, 5, 101, 0, 0, 686, 698, 5, 121, 0, 0, 687, 688, 5, 115, 0, 0, 688, 689, 5, 105, 0, 0, 689, 698, 5, 103, 0, 0, 690, 691, 5, 100, 0, 0, 691, 692, 5, 97, 0, 0, 692, 693, 5, 116, 0, 0, 693, 694, 5, 97, 0, 0, 694, 695, 5, 115, 0, 0, 695, 696, 5, 105, 0, 0, 696, 698, 5, 103, 0, 0, 697, 668, 1, 0, 0, 0, 697, 671, 1, 0, 0, 0, 697, 675, 1, 0, 0, 0, 697, 681, 1, 0, 0, 0, 697, 687, 1, 0, 0, 0, 697, 690, 1, 0, 0, 0, 698, 142, 1, 0, 0, 0, 699, 700, 5, 98, 0, 0, 700, 701, 5, 121, 0, 0, 701, 702, 5, 116, 0, 0, 702, 703, 5, 101, 0, 0, 703, 704, 5, 115, 0, 0, 704, 144, 1, 0, 0, 0, 705, 706, 5, 98, 0, 0, 706, 707, 5, 121, 0, 0, 707, 708, 5, 116, 0, 0, 708, 709, 5, 101, 0, 0, 709, 710, 5, 115, 0, 0, 710, 711, 1, 0, 0, 0, 711, 717, 3, 147, 73, 0, 712, 713, 5, 98, 0, 0, 713, 714, 5, 121, 0, 0, 714, 715, 5, 116, 0, 0, 715, 717, 5, 101, 0, 0, 716, 705, 1, 0, 0, 0, 716, 712, 1, 0, 0, 0, 717, 146, 1, 0, 0, 0, 718, 722, 7, 2, 0, 0, 719, 721, 7, 0, 0, 0, 720, 719, 1, 0, 0, 0, 721, 724, 1, 0, 0, 0, 722, 720, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 148, 1, 0, 0, 0, 724, 722, 1, 0, 0, 0, 725, 731, 5, 34, 0, 0, 726, 727, 5, 92, 0, 0, 727, 730, 5, 34, 0, 0, 728, 730, 8, 3, 0, 0, 729, 726, 1, 0, 0, 0, 729, 728, 1, 0, 0, 0, 730, 733, 1, 0, 0, 0, 731, 732, 1, 0, 0, 0, 731, 729, 1, 0, 0, 0, 732, 734, 1, 0, 0, 0, 733, 731, 1, 0, 0, 0, 734, 746, 5, 34, 0, 0, 735, 741, 5, 39, 0, 0, 736, 737, 5, 92, 0, 0, 737, 740, 5, 39, 0, 0, 738, 740, 8, 4, 0, 0, 739, 736, 1, 0, 0, 0, 739, 738, 1, 0, 0, 0, 740, 743, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 741, 739, 1, 0, 0, 0, 742, 744, 1, 0, 0, 0, 743, 741, 1, 0, 0, 0, 744, 746, 5, 39, 0, 0, 745, 725, 1, 0, 0, 0, 745, 735, 1, 0, 0, 0, 746, 150, 1, 0, 0, 0, 747, 748, 5, 100, 0, 0, 748, 749, 5, 97, 0, 0, 749, 750, 5, 116, 0, 0, 750, 751, 5, 101, 0, 0, 751, 752, 5, 40, 0, 0, 752, 753, 1, 0, 0, 0, 753, 754, 3, 149, 74, 0, 754, 755, 5, 41, 0, 0, 755, 152, 1, 0, 0, 0, 756, 757, 5, 48, 0, 0, 757, 761, 7, 5, 0, 0, 758, 760, 7, 6, 0, 0, 759, 758, 1, 0, 0, 0, 760, 763, 1, 0, 0, 0, 761, 759, 1, 0, 0, 0, 761, 762, 1, 0, 0, 0, 762, 154, 1, 0, 0, 0, 763, 761, 1, 0, 0, 0, 764, 765, 5, 116, 0, 0, 765, 766, 5, 104, 0, 0, 766, 767, 5, 105, 0, 0, 767, 768, 5, 115, 0, 0, 768, 769, 5, 46, 0, 0, 769, 770, 5, 97, 0, 0, 770, 771, 5, 103, 0, 0, 771, 780, 5, 101, 0, 0, 772, 773, 5, 116, 0, 0, 773, 774, 5, 120, 0, 0, 774, 775, 5, 46, 0, 0, 775, 776, 5, 116, 0, 0, 776, 777, 5, 105, 0, 0, 777, 778, 5, 109, 0, 0, 778, 780, 5, 101, 0, 0, 779, 764, 1, 0, 0, 0, 779, 772, 1, 0, 0, 0, 780, 156, 1, 0, 0, 0, 781, 782, 5, 117, 0, 0, 782, 783, 5, 110, 0, 0, 783, 784, 5, 115, 0, 0, 784, 785, 5, 97, 0, 0, 785, 786, 5, 102, 0, 0, 786, 787, 5, 101, 0, 0, 787, 788, 5, 95, 0, 0, 788, 789, 5, 105, 0, 0, 789, 790, 5, 110, 0, 0, 790, 830, 5, 116, 0, 0, 791, 792, 5, 117, 0, 0, 792, 793, 5, 110, 0, 0, 793, 794, 5, 115, 0, 0, 794, 795, 5, 97, 0, 0, 795, 796, 5, 102, 0, 0, 796, 797, 5, 101, 0, 0, 797, 798, 5, 95, 0, 0, 798, 799, 5, 98, 0, 0, 799, 800, 5, 111, 0, 0, 800, 801, 5, 111, 0, 0, 801, 830, 5, 108, 0, 0, 802, 803, 5, 117, 0, 0, 803, 804, 5, 110, 0, 0, 804, 805, 5, 115, 0, 0, 805, 806, 5, 97, 0, 0, 806, 807, 5, 102, 0, 0, 807, 808, 5, 101, 0, 0, 808, 809, 5, 95, 0, 0, 809, 810, 5, 98, 0, 0, 810, 811, 5, 121, 0, 0, 811, 812, 5, 116, 0, 0, 812, 813, 5, 101, 0, 0, 813, 814, 5, 115, 0, 0, 814, 816, 1, 0, 0, 0, 815, 817, 3, 147, 73, 0, 816, 815, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 830, 1, 0, 0, 0, 818, 819, 5, 117, 0, 0, 819, 820, 5, 110, 0, 0, 820, 821, 5, 115, 0, 0, 821, 822, 5, 97, 0, 0, 822, 823, 5, 102, 0, 0, 823, 824, 5, 101, 0, 0, 824, 825, 5, 95, 0, 0, 825, 826, 5, 98, 0, 0, 826, 827, 5, 121, 0, 0, 827, 828, 5, 116, 0, 0, 828, 830, 5, 101, 0, 0, 829, 781, 1, 0, 0, 0, 829, 791, 1, 0, 0, 0, 829, 802, 1, 0, 0, 0, 829, 818, 1, 0, 0, 0, 830, 158, 1, 0, 0, 0, 831, 832, 5, 116, 0, 0, 832, 833, 5, 104, 0, 0, 833, 834, 5, 105, 0, 0, 834, 835, 5, 115, 0, 0, 835, 836, 5, 46, 0, 0, 836, 837, 5, 97, 0, 0, 837, 838, 5, 99, 0, 0, 838, 839, 5, 116, 0, 0, 839, 840, 5, 105, 0, 0, 840, 841, 5, 118, 0, 0, 841, 842, 5, 101, 0, 0, 842, 843, 5, 73, 0, 0, 843, 844, 5, 110, 0, 0, 844, 845, 5, 112, 0, 0, 845, 846, 5, 117, 0, 0, 846, 847, 5, 116, 0, 0, 847, 848, 5, 73, 0, 0, 848, 849, 5, 110, 0, 0, 849, 850, 5, 100, 0, 0, 850, 851, 5, 101, 0, 0, 851, 926, 5, 120, 0, 0, 852, 853, 5, 116, 0, 0, 853, 854, 5, 104, 0, 0, 854, 855, 5, 105, 0, 0, 855, 856, 5, 115, 0, 0, 856, 857, 5, 46, 0, 0, 857, 858, 5, 97, 0, 0, 858, 859, 5, 99, 0, 0, 859, 860, 5, 116, 0, 0, 860, 861, 5, 105, 0, 0, 861, 862, 5, 118, 0, 0, 862, 863, 5, 101, 0, 0, 863, 864, 5, 66, 0, 0, 864, 865, 5, 121, 0, 0, 865, 866, 5, 116, 0, 0, 866, 867, 5, 101, 0, 0, 867, 868, 5, 99, 0, 0, 868, 869, 5, 111, 0, 0, 869, 870, 5, 100, 0, 0, 870, 926, 5, 101, 0, 0, 871, 872, 5, 116, 0, 0, 872, 873, 5, 120, 0, 0, 873, 874, 5, 46, 0, 0, 874, 875, 5, 105, 0, 0, 875, 876, 5, 110, 0, 0, 876, 877, 5, 112, 0, 0, 877, 878, 5, 117, 0, 0, 878, 879, 5, 116, 0, 0, 879, 880, 5, 115, 0, 0, 880, 881, 5, 46, 0, 0, 881, 882, 5, 108, 0, 0, 882, 883, 5, 101, 0, 0, 883, 884, 5, 110, 0, 0, 884, 885, 5, 103, 0, 0, 885, 886, 5, 116, 0, 0, 886, 926, 5, 104, 0, 0, 887, 888, 5, 116, 0, 0, 888, 889, 5, 120, 0, 0, 889, 890, 5, 46, 0, 0, 890, 891, 5, 111, 0, 0, 891, 892, 5, 117, 0, 0, 892, 893, 5, 116, 0, 0, 893, 894, 5, 112, 0, 0, 894, 895, 5, 117, 0, 0, 895, 896, 5, 116, 0, 0, 896, 897, 5, 115, 0, 0, 897, 898, 5, 46, 0, 0, 898, 899, 5, 108, 0, 0, 899, 900, 5, 101, 0, 0, 900, 901, 5, 110, 0, 0, 901, 902, 5, 103, 0, 0, 902, 903, 5, 116, 0, 0, 903, 926, 5, 104, 0, 0, 904, 905, 5, 116, 0, 0, 905, 906, 5, 120, 0, 0, 906, 907, 5, 46, 0, 0, 907, 908, 5, 118, 0, 0, 908, 909, 5, 101, 0, 0, 909, 910, 5, 114, 0, 0, 910, 911, 5, 115, 0, 0, 911, 912, 5, 105, 0, 0, 912, 913, 5, 111, 0, 0, 913, 926, 5, 110, 0, 0, 914, 915, 5, 116, 0, 0, 915, 916, 5, 120, 0, 0, 916, 917, 5, 46, 0, 0, 917, 918, 5, 108, 0, 0, 918, 919, 5, 111, 0, 0, 919, 920, 5, 99, 0, 0, 920, 921, 5, 107, 0, 0, 921, 922, 5, 116, 0, 0, 922, 923, 5, 105, 0, 0, 923, 924, 5, 109, 0, 0, 924, 926, 5, 101, 0, 0, 925, 831, 1, 0, 0, 0, 925, 852, 1, 0, 0, 0, 925, 871, 1, 0, 0, 0, 925, 887, 1, 0, 0, 0, 925, 904, 1, 0, 0, 0, 925, 914, 1, 0, 0, 0, 926, 160, 1, 0, 0, 0, 927, 931, 7, 7, 0, 0, 928, 930, 7, 8, 0, 0, 929, 928, 1, 0, 0, 0, 930, 933, 1, 0, 0, 0, 931, 929, 1, 0, 0, 0, 931, 932, 1, 0, 0, 0, 932, 162, 1, 0, 0, 0, 933, 931, 1, 0, 0, 0, 934, 936, 7, 9, 0, 0, 935, 934, 1, 0, 0, 0, 936, 937, 1, 0, 0, 0, 937, 935, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 940, 6, 81, 0, 0, 940, 164, 1, 0, 0, 0, 941, 942, 5, 47, 0, 0, 942, 943, 5, 42, 0, 0, 943, 947, 1, 0, 0, 0, 944, 946, 9, 0, 0, 0, 945, 944, 1, 0, 0, 0, 946, 949, 1, 0, 0, 0, 947, 948, 1, 0, 0, 0, 947, 945, 1, 0, 0, 0, 948, 950, 1, 0, 0, 0, 949, 947, 1, 0, 0, 0, 950, 951, 5, 42, 0, 0, 951, 952, 5, 47, 0, 0, 952, 953, 1, 0, 0, 0, 953, 954, 6, 82, 1, 0, 954, 166, 1, 0, 0, 0, 955, 956, 5, 47, 0, 0, 956, 957, 5, 47, 0, 0, 957, 961, 1, 0, 0, 0, 958, 960, 8, 10, 0, 0, 959, 958, 1, 0, 0, 0, 960, 963, 1, 0, 0, 0, 961, 959, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 964, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 964, 965, 6, 83, 1, 0, 965, 168, 1, 0, 0, 0, 28, 0, 558, 564, 570, 581, 640, 643, 647, 652, 658, 662, 697, 716, 722, 729, 731, 739, 741, 745, 761, 779, 816, 829, 925, 931, 937, 947, 961, 2, 6, 0, 0, 0, 1, 0] \ No newline at end of file +[4, 0, 84, 966, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 4, 64, 557, 8, 64, 11, 64, 12, 64, 558, 1, 64, 1, 64, 4, 64, 563, 8, 64, 11, 64, 12, 64, 564, 1, 64, 1, 64, 4, 64, 569, 8, 64, 11, 64, 12, 64, 570, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 582, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 641, 8, 66, 1, 67, 3, 67, 644, 8, 67, 1, 67, 1, 67, 3, 67, 648, 8, 67, 1, 68, 4, 68, 651, 8, 68, 11, 68, 12, 68, 652, 1, 68, 1, 68, 4, 68, 657, 8, 68, 11, 68, 12, 68, 658, 5, 68, 661, 8, 68, 10, 68, 12, 68, 664, 9, 68, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 698, 8, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 717, 8, 72, 1, 73, 1, 73, 5, 73, 721, 8, 73, 10, 73, 12, 73, 724, 9, 73, 1, 74, 1, 74, 1, 74, 1, 74, 5, 74, 730, 8, 74, 10, 74, 12, 74, 733, 9, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 5, 74, 740, 8, 74, 10, 74, 12, 74, 743, 9, 74, 1, 74, 3, 74, 746, 8, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 5, 76, 760, 8, 76, 10, 76, 12, 76, 763, 9, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 3, 77, 780, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 3, 78, 817, 8, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 3, 78, 830, 8, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 3, 79, 926, 8, 79, 1, 80, 1, 80, 5, 80, 930, 8, 80, 10, 80, 12, 80, 933, 9, 80, 1, 81, 4, 81, 936, 8, 81, 11, 81, 12, 81, 937, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 5, 82, 946, 8, 82, 10, 82, 12, 82, 949, 9, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 5, 83, 960, 8, 83, 10, 83, 12, 83, 963, 9, 83, 1, 83, 1, 83, 3, 731, 741, 947, 0, 84, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 1, 0, 11, 1, 0, 48, 57, 2, 0, 69, 69, 101, 101, 1, 0, 49, 57, 3, 0, 10, 10, 13, 13, 34, 34, 3, 0, 10, 10, 13, 13, 39, 39, 2, 0, 88, 88, 120, 120, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 65, 90, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 12, 13, 32, 32, 2, 0, 10, 10, 13, 13, 1010, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 1, 169, 1, 0, 0, 0, 3, 176, 1, 0, 0, 0, 5, 178, 1, 0, 0, 0, 7, 189, 1, 0, 0, 0, 9, 191, 1, 0, 0, 0, 11, 193, 1, 0, 0, 0, 13, 196, 1, 0, 0, 0, 15, 198, 1, 0, 0, 0, 17, 200, 1, 0, 0, 0, 19, 203, 1, 0, 0, 0, 21, 205, 1, 0, 0, 0, 23, 212, 1, 0, 0, 0, 25, 221, 1, 0, 0, 0, 27, 229, 1, 0, 0, 0, 29, 231, 1, 0, 0, 0, 31, 233, 1, 0, 0, 0, 33, 235, 1, 0, 0, 0, 35, 244, 1, 0, 0, 0, 37, 246, 1, 0, 0, 0, 39, 248, 1, 0, 0, 0, 41, 255, 1, 0, 0, 0, 43, 258, 1, 0, 0, 0, 45, 261, 1, 0, 0, 0, 47, 264, 1, 0, 0, 0, 49, 267, 1, 0, 0, 0, 51, 275, 1, 0, 0, 0, 53, 287, 1, 0, 0, 0, 55, 290, 1, 0, 0, 0, 57, 295, 1, 0, 0, 0, 59, 298, 1, 0, 0, 0, 61, 304, 1, 0, 0, 0, 63, 308, 1, 0, 0, 0, 65, 312, 1, 0, 0, 0, 67, 314, 1, 0, 0, 0, 69, 316, 1, 0, 0, 0, 71, 327, 1, 0, 0, 0, 73, 334, 1, 0, 0, 0, 75, 351, 1, 0, 0, 0, 77, 366, 1, 0, 0, 0, 79, 381, 1, 0, 0, 0, 81, 394, 1, 0, 0, 0, 83, 404, 1, 0, 0, 0, 85, 429, 1, 0, 0, 0, 87, 444, 1, 0, 0, 0, 89, 463, 1, 0, 0, 0, 91, 479, 1, 0, 0, 0, 93, 490, 1, 0, 0, 0, 95, 498, 1, 0, 0, 0, 97, 505, 1, 0, 0, 0, 99, 512, 1, 0, 0, 0, 101, 514, 1, 0, 0, 0, 103, 516, 1, 0, 0, 0, 105, 518, 1, 0, 0, 0, 107, 520, 1, 0, 0, 0, 109, 522, 1, 0, 0, 0, 111, 524, 1, 0, 0, 0, 113, 527, 1, 0, 0, 0, 115, 530, 1, 0, 0, 0, 117, 533, 1, 0, 0, 0, 119, 536, 1, 0, 0, 0, 121, 538, 1, 0, 0, 0, 123, 540, 1, 0, 0, 0, 125, 543, 1, 0, 0, 0, 127, 546, 1, 0, 0, 0, 129, 556, 1, 0, 0, 0, 131, 581, 1, 0, 0, 0, 133, 640, 1, 0, 0, 0, 135, 643, 1, 0, 0, 0, 137, 650, 1, 0, 0, 0, 139, 665, 1, 0, 0, 0, 141, 697, 1, 0, 0, 0, 143, 699, 1, 0, 0, 0, 145, 716, 1, 0, 0, 0, 147, 718, 1, 0, 0, 0, 149, 745, 1, 0, 0, 0, 151, 747, 1, 0, 0, 0, 153, 756, 1, 0, 0, 0, 155, 779, 1, 0, 0, 0, 157, 829, 1, 0, 0, 0, 159, 925, 1, 0, 0, 0, 161, 927, 1, 0, 0, 0, 163, 935, 1, 0, 0, 0, 165, 941, 1, 0, 0, 0, 167, 955, 1, 0, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 114, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 103, 0, 0, 173, 174, 5, 109, 0, 0, 174, 175, 5, 97, 0, 0, 175, 2, 1, 0, 0, 0, 176, 177, 5, 59, 0, 0, 177, 4, 1, 0, 0, 0, 178, 179, 5, 99, 0, 0, 179, 180, 5, 97, 0, 0, 180, 181, 5, 115, 0, 0, 181, 182, 5, 104, 0, 0, 182, 183, 5, 115, 0, 0, 183, 184, 5, 99, 0, 0, 184, 185, 5, 114, 0, 0, 185, 186, 5, 105, 0, 0, 186, 187, 5, 112, 0, 0, 187, 188, 5, 116, 0, 0, 188, 6, 1, 0, 0, 0, 189, 190, 5, 94, 0, 0, 190, 8, 1, 0, 0, 0, 191, 192, 5, 126, 0, 0, 192, 10, 1, 0, 0, 0, 193, 194, 5, 62, 0, 0, 194, 195, 5, 61, 0, 0, 195, 12, 1, 0, 0, 0, 196, 197, 5, 62, 0, 0, 197, 14, 1, 0, 0, 0, 198, 199, 5, 60, 0, 0, 199, 16, 1, 0, 0, 0, 200, 201, 5, 60, 0, 0, 201, 202, 5, 61, 0, 0, 202, 18, 1, 0, 0, 0, 203, 204, 5, 61, 0, 0, 204, 20, 1, 0, 0, 0, 205, 206, 5, 105, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, 112, 0, 0, 208, 209, 5, 111, 0, 0, 209, 210, 5, 114, 0, 0, 210, 211, 5, 116, 0, 0, 211, 22, 1, 0, 0, 0, 212, 213, 5, 102, 0, 0, 213, 214, 5, 117, 0, 0, 214, 215, 5, 110, 0, 0, 215, 216, 5, 99, 0, 0, 216, 217, 5, 116, 0, 0, 217, 218, 5, 105, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 110, 0, 0, 220, 24, 1, 0, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 101, 0, 0, 223, 224, 5, 116, 0, 0, 224, 225, 5, 117, 0, 0, 225, 226, 5, 114, 0, 0, 226, 227, 5, 110, 0, 0, 227, 228, 5, 115, 0, 0, 228, 26, 1, 0, 0, 0, 229, 230, 5, 40, 0, 0, 230, 28, 1, 0, 0, 0, 231, 232, 5, 44, 0, 0, 232, 30, 1, 0, 0, 0, 233, 234, 5, 41, 0, 0, 234, 32, 1, 0, 0, 0, 235, 236, 5, 99, 0, 0, 236, 237, 5, 111, 0, 0, 237, 238, 5, 110, 0, 0, 238, 239, 5, 116, 0, 0, 239, 240, 5, 114, 0, 0, 240, 241, 5, 97, 0, 0, 241, 242, 5, 99, 0, 0, 242, 243, 5, 116, 0, 0, 243, 34, 1, 0, 0, 0, 244, 245, 5, 123, 0, 0, 245, 36, 1, 0, 0, 0, 246, 247, 5, 125, 0, 0, 247, 38, 1, 0, 0, 0, 248, 249, 5, 114, 0, 0, 249, 250, 5, 101, 0, 0, 250, 251, 5, 116, 0, 0, 251, 252, 5, 117, 0, 0, 252, 253, 5, 114, 0, 0, 253, 254, 5, 110, 0, 0, 254, 40, 1, 0, 0, 0, 255, 256, 5, 43, 0, 0, 256, 257, 5, 61, 0, 0, 257, 42, 1, 0, 0, 0, 258, 259, 5, 45, 0, 0, 259, 260, 5, 61, 0, 0, 260, 44, 1, 0, 0, 0, 261, 262, 5, 43, 0, 0, 262, 263, 5, 43, 0, 0, 263, 46, 1, 0, 0, 0, 264, 265, 5, 45, 0, 0, 265, 266, 5, 45, 0, 0, 266, 48, 1, 0, 0, 0, 267, 268, 5, 114, 0, 0, 268, 269, 5, 101, 0, 0, 269, 270, 5, 113, 0, 0, 270, 271, 5, 117, 0, 0, 271, 272, 5, 105, 0, 0, 272, 273, 5, 114, 0, 0, 273, 274, 5, 101, 0, 0, 274, 50, 1, 0, 0, 0, 275, 276, 5, 99, 0, 0, 276, 277, 5, 111, 0, 0, 277, 278, 5, 110, 0, 0, 278, 279, 5, 115, 0, 0, 279, 280, 5, 111, 0, 0, 280, 281, 5, 108, 0, 0, 281, 282, 5, 101, 0, 0, 282, 283, 5, 46, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 111, 0, 0, 285, 286, 5, 103, 0, 0, 286, 52, 1, 0, 0, 0, 287, 288, 5, 105, 0, 0, 288, 289, 5, 102, 0, 0, 289, 54, 1, 0, 0, 0, 290, 291, 5, 101, 0, 0, 291, 292, 5, 108, 0, 0, 292, 293, 5, 115, 0, 0, 293, 294, 5, 101, 0, 0, 294, 56, 1, 0, 0, 0, 295, 296, 5, 100, 0, 0, 296, 297, 5, 111, 0, 0, 297, 58, 1, 0, 0, 0, 298, 299, 5, 119, 0, 0, 299, 300, 5, 104, 0, 0, 300, 301, 5, 105, 0, 0, 301, 302, 5, 108, 0, 0, 302, 303, 5, 101, 0, 0, 303, 60, 1, 0, 0, 0, 304, 305, 5, 102, 0, 0, 305, 306, 5, 111, 0, 0, 306, 307, 5, 114, 0, 0, 307, 62, 1, 0, 0, 0, 308, 309, 5, 110, 0, 0, 309, 310, 5, 101, 0, 0, 310, 311, 5, 119, 0, 0, 311, 64, 1, 0, 0, 0, 312, 313, 5, 91, 0, 0, 313, 66, 1, 0, 0, 0, 314, 315, 5, 93, 0, 0, 315, 68, 1, 0, 0, 0, 316, 317, 5, 116, 0, 0, 317, 318, 5, 120, 0, 0, 318, 319, 5, 46, 0, 0, 319, 320, 5, 111, 0, 0, 320, 321, 5, 117, 0, 0, 321, 322, 5, 116, 0, 0, 322, 323, 5, 112, 0, 0, 323, 324, 5, 117, 0, 0, 324, 325, 5, 116, 0, 0, 325, 326, 5, 115, 0, 0, 326, 70, 1, 0, 0, 0, 327, 328, 5, 46, 0, 0, 328, 329, 5, 118, 0, 0, 329, 330, 5, 97, 0, 0, 330, 331, 5, 108, 0, 0, 331, 332, 5, 117, 0, 0, 332, 333, 5, 101, 0, 0, 333, 72, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 108, 0, 0, 336, 337, 5, 111, 0, 0, 337, 338, 5, 99, 0, 0, 338, 339, 5, 107, 0, 0, 339, 340, 5, 105, 0, 0, 340, 341, 5, 110, 0, 0, 341, 342, 5, 103, 0, 0, 342, 343, 5, 66, 0, 0, 343, 344, 5, 121, 0, 0, 344, 345, 5, 116, 0, 0, 345, 346, 5, 101, 0, 0, 346, 347, 5, 99, 0, 0, 347, 348, 5, 111, 0, 0, 348, 349, 5, 100, 0, 0, 349, 350, 5, 101, 0, 0, 350, 74, 1, 0, 0, 0, 351, 352, 5, 46, 0, 0, 352, 353, 5, 116, 0, 0, 353, 354, 5, 111, 0, 0, 354, 355, 5, 107, 0, 0, 355, 356, 5, 101, 0, 0, 356, 357, 5, 110, 0, 0, 357, 358, 5, 67, 0, 0, 358, 359, 5, 97, 0, 0, 359, 360, 5, 116, 0, 0, 360, 361, 5, 101, 0, 0, 361, 362, 5, 103, 0, 0, 362, 363, 5, 111, 0, 0, 363, 364, 5, 114, 0, 0, 364, 365, 5, 121, 0, 0, 365, 76, 1, 0, 0, 0, 366, 367, 5, 46, 0, 0, 367, 368, 5, 110, 0, 0, 368, 369, 5, 102, 0, 0, 369, 370, 5, 116, 0, 0, 370, 371, 5, 67, 0, 0, 371, 372, 5, 111, 0, 0, 372, 373, 5, 109, 0, 0, 373, 374, 5, 109, 0, 0, 374, 375, 5, 105, 0, 0, 375, 376, 5, 116, 0, 0, 376, 377, 5, 109, 0, 0, 377, 378, 5, 101, 0, 0, 378, 379, 5, 110, 0, 0, 379, 380, 5, 116, 0, 0, 380, 78, 1, 0, 0, 0, 381, 382, 5, 46, 0, 0, 382, 383, 5, 116, 0, 0, 383, 384, 5, 111, 0, 0, 384, 385, 5, 107, 0, 0, 385, 386, 5, 101, 0, 0, 386, 387, 5, 110, 0, 0, 387, 388, 5, 65, 0, 0, 388, 389, 5, 109, 0, 0, 389, 390, 5, 111, 0, 0, 390, 391, 5, 117, 0, 0, 391, 392, 5, 110, 0, 0, 392, 393, 5, 116, 0, 0, 393, 80, 1, 0, 0, 0, 394, 395, 5, 116, 0, 0, 395, 396, 5, 120, 0, 0, 396, 397, 5, 46, 0, 0, 397, 398, 5, 105, 0, 0, 398, 399, 5, 110, 0, 0, 399, 400, 5, 112, 0, 0, 400, 401, 5, 117, 0, 0, 401, 402, 5, 116, 0, 0, 402, 403, 5, 115, 0, 0, 403, 82, 1, 0, 0, 0, 404, 405, 5, 46, 0, 0, 405, 406, 5, 111, 0, 0, 406, 407, 5, 117, 0, 0, 407, 408, 5, 116, 0, 0, 408, 409, 5, 112, 0, 0, 409, 410, 5, 111, 0, 0, 410, 411, 5, 105, 0, 0, 411, 412, 5, 110, 0, 0, 412, 413, 5, 116, 0, 0, 413, 414, 5, 84, 0, 0, 414, 415, 5, 114, 0, 0, 415, 416, 5, 97, 0, 0, 416, 417, 5, 110, 0, 0, 417, 418, 5, 115, 0, 0, 418, 419, 5, 97, 0, 0, 419, 420, 5, 99, 0, 0, 420, 421, 5, 116, 0, 0, 421, 422, 5, 105, 0, 0, 422, 423, 5, 111, 0, 0, 423, 424, 5, 110, 0, 0, 424, 425, 5, 72, 0, 0, 425, 426, 5, 97, 0, 0, 426, 427, 5, 115, 0, 0, 427, 428, 5, 104, 0, 0, 428, 84, 1, 0, 0, 0, 429, 430, 5, 46, 0, 0, 430, 431, 5, 111, 0, 0, 431, 432, 5, 117, 0, 0, 432, 433, 5, 116, 0, 0, 433, 434, 5, 112, 0, 0, 434, 435, 5, 111, 0, 0, 435, 436, 5, 105, 0, 0, 436, 437, 5, 110, 0, 0, 437, 438, 5, 116, 0, 0, 438, 439, 5, 73, 0, 0, 439, 440, 5, 110, 0, 0, 440, 441, 5, 100, 0, 0, 441, 442, 5, 101, 0, 0, 442, 443, 5, 120, 0, 0, 443, 86, 1, 0, 0, 0, 444, 445, 5, 46, 0, 0, 445, 446, 5, 117, 0, 0, 446, 447, 5, 110, 0, 0, 447, 448, 5, 108, 0, 0, 448, 449, 5, 111, 0, 0, 449, 450, 5, 99, 0, 0, 450, 451, 5, 107, 0, 0, 451, 452, 5, 105, 0, 0, 452, 453, 5, 110, 0, 0, 453, 454, 5, 103, 0, 0, 454, 455, 5, 66, 0, 0, 455, 456, 5, 121, 0, 0, 456, 457, 5, 116, 0, 0, 457, 458, 5, 101, 0, 0, 458, 459, 5, 99, 0, 0, 459, 460, 5, 111, 0, 0, 460, 461, 5, 100, 0, 0, 461, 462, 5, 101, 0, 0, 462, 88, 1, 0, 0, 0, 463, 464, 5, 46, 0, 0, 464, 465, 5, 115, 0, 0, 465, 466, 5, 101, 0, 0, 466, 467, 5, 113, 0, 0, 467, 468, 5, 117, 0, 0, 468, 469, 5, 101, 0, 0, 469, 470, 5, 110, 0, 0, 470, 471, 5, 99, 0, 0, 471, 472, 5, 101, 0, 0, 472, 473, 5, 78, 0, 0, 473, 474, 5, 117, 0, 0, 474, 475, 5, 109, 0, 0, 475, 476, 5, 98, 0, 0, 476, 477, 5, 101, 0, 0, 477, 478, 5, 114, 0, 0, 478, 90, 1, 0, 0, 0, 479, 480, 5, 46, 0, 0, 480, 481, 5, 114, 0, 0, 481, 482, 5, 101, 0, 0, 482, 483, 5, 118, 0, 0, 483, 484, 5, 101, 0, 0, 484, 485, 5, 114, 0, 0, 485, 486, 5, 115, 0, 0, 486, 487, 5, 101, 0, 0, 487, 488, 5, 40, 0, 0, 488, 489, 5, 41, 0, 0, 489, 92, 1, 0, 0, 0, 490, 491, 5, 46, 0, 0, 491, 492, 5, 108, 0, 0, 492, 493, 5, 101, 0, 0, 493, 494, 5, 110, 0, 0, 494, 495, 5, 103, 0, 0, 495, 496, 5, 116, 0, 0, 496, 497, 5, 104, 0, 0, 497, 94, 1, 0, 0, 0, 498, 499, 5, 46, 0, 0, 499, 500, 5, 115, 0, 0, 500, 501, 5, 112, 0, 0, 501, 502, 5, 108, 0, 0, 502, 503, 5, 105, 0, 0, 503, 504, 5, 116, 0, 0, 504, 96, 1, 0, 0, 0, 505, 506, 5, 46, 0, 0, 506, 507, 5, 115, 0, 0, 507, 508, 5, 108, 0, 0, 508, 509, 5, 105, 0, 0, 509, 510, 5, 99, 0, 0, 510, 511, 5, 101, 0, 0, 511, 98, 1, 0, 0, 0, 512, 513, 5, 33, 0, 0, 513, 100, 1, 0, 0, 0, 514, 515, 5, 45, 0, 0, 515, 102, 1, 0, 0, 0, 516, 517, 5, 42, 0, 0, 517, 104, 1, 0, 0, 0, 518, 519, 5, 47, 0, 0, 519, 106, 1, 0, 0, 0, 520, 521, 5, 37, 0, 0, 521, 108, 1, 0, 0, 0, 522, 523, 5, 43, 0, 0, 523, 110, 1, 0, 0, 0, 524, 525, 5, 62, 0, 0, 525, 526, 5, 62, 0, 0, 526, 112, 1, 0, 0, 0, 527, 528, 5, 60, 0, 0, 528, 529, 5, 60, 0, 0, 529, 114, 1, 0, 0, 0, 530, 531, 5, 61, 0, 0, 531, 532, 5, 61, 0, 0, 532, 116, 1, 0, 0, 0, 533, 534, 5, 33, 0, 0, 534, 535, 5, 61, 0, 0, 535, 118, 1, 0, 0, 0, 536, 537, 5, 38, 0, 0, 537, 120, 1, 0, 0, 0, 538, 539, 5, 124, 0, 0, 539, 122, 1, 0, 0, 0, 540, 541, 5, 38, 0, 0, 541, 542, 5, 38, 0, 0, 542, 124, 1, 0, 0, 0, 543, 544, 5, 124, 0, 0, 544, 545, 5, 124, 0, 0, 545, 126, 1, 0, 0, 0, 546, 547, 5, 99, 0, 0, 547, 548, 5, 111, 0, 0, 548, 549, 5, 110, 0, 0, 549, 550, 5, 115, 0, 0, 550, 551, 5, 116, 0, 0, 551, 552, 5, 97, 0, 0, 552, 553, 5, 110, 0, 0, 553, 554, 5, 116, 0, 0, 554, 128, 1, 0, 0, 0, 555, 557, 7, 0, 0, 0, 556, 555, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 556, 1, 0, 0, 0, 558, 559, 1, 0, 0, 0, 559, 560, 1, 0, 0, 0, 560, 562, 5, 46, 0, 0, 561, 563, 7, 0, 0, 0, 562, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, 565, 566, 1, 0, 0, 0, 566, 568, 5, 46, 0, 0, 567, 569, 7, 0, 0, 0, 568, 567, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 568, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 130, 1, 0, 0, 0, 572, 573, 5, 116, 0, 0, 573, 574, 5, 114, 0, 0, 574, 575, 5, 117, 0, 0, 575, 582, 5, 101, 0, 0, 576, 577, 5, 102, 0, 0, 577, 578, 5, 97, 0, 0, 578, 579, 5, 108, 0, 0, 579, 580, 5, 115, 0, 0, 580, 582, 5, 101, 0, 0, 581, 572, 1, 0, 0, 0, 581, 576, 1, 0, 0, 0, 582, 132, 1, 0, 0, 0, 583, 584, 5, 115, 0, 0, 584, 585, 5, 97, 0, 0, 585, 586, 5, 116, 0, 0, 586, 587, 5, 111, 0, 0, 587, 588, 5, 115, 0, 0, 588, 589, 5, 104, 0, 0, 589, 590, 5, 105, 0, 0, 590, 641, 5, 115, 0, 0, 591, 592, 5, 115, 0, 0, 592, 593, 5, 97, 0, 0, 593, 594, 5, 116, 0, 0, 594, 641, 5, 115, 0, 0, 595, 596, 5, 102, 0, 0, 596, 597, 5, 105, 0, 0, 597, 598, 5, 110, 0, 0, 598, 599, 5, 110, 0, 0, 599, 600, 5, 101, 0, 0, 600, 641, 5, 121, 0, 0, 601, 602, 5, 98, 0, 0, 602, 603, 5, 105, 0, 0, 603, 604, 5, 116, 0, 0, 604, 641, 5, 115, 0, 0, 605, 606, 5, 98, 0, 0, 606, 607, 5, 105, 0, 0, 607, 608, 5, 116, 0, 0, 608, 609, 5, 99, 0, 0, 609, 610, 5, 111, 0, 0, 610, 611, 5, 105, 0, 0, 611, 641, 5, 110, 0, 0, 612, 613, 5, 115, 0, 0, 613, 614, 5, 101, 0, 0, 614, 615, 5, 99, 0, 0, 615, 616, 5, 111, 0, 0, 616, 617, 5, 110, 0, 0, 617, 618, 5, 100, 0, 0, 618, 641, 5, 115, 0, 0, 619, 620, 5, 109, 0, 0, 620, 621, 5, 105, 0, 0, 621, 622, 5, 110, 0, 0, 622, 623, 5, 117, 0, 0, 623, 624, 5, 116, 0, 0, 624, 625, 5, 101, 0, 0, 625, 641, 5, 115, 0, 0, 626, 627, 5, 104, 0, 0, 627, 628, 5, 111, 0, 0, 628, 629, 5, 117, 0, 0, 629, 630, 5, 114, 0, 0, 630, 641, 5, 115, 0, 0, 631, 632, 5, 100, 0, 0, 632, 633, 5, 97, 0, 0, 633, 634, 5, 121, 0, 0, 634, 641, 5, 115, 0, 0, 635, 636, 5, 119, 0, 0, 636, 637, 5, 101, 0, 0, 637, 638, 5, 101, 0, 0, 638, 639, 5, 107, 0, 0, 639, 641, 5, 115, 0, 0, 640, 583, 1, 0, 0, 0, 640, 591, 1, 0, 0, 0, 640, 595, 1, 0, 0, 0, 640, 601, 1, 0, 0, 0, 640, 605, 1, 0, 0, 0, 640, 612, 1, 0, 0, 0, 640, 619, 1, 0, 0, 0, 640, 626, 1, 0, 0, 0, 640, 631, 1, 0, 0, 0, 640, 635, 1, 0, 0, 0, 641, 134, 1, 0, 0, 0, 642, 644, 5, 45, 0, 0, 643, 642, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 645, 1, 0, 0, 0, 645, 647, 3, 137, 68, 0, 646, 648, 3, 139, 69, 0, 647, 646, 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 136, 1, 0, 0, 0, 649, 651, 7, 0, 0, 0, 650, 649, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 662, 1, 0, 0, 0, 654, 656, 5, 95, 0, 0, 655, 657, 7, 0, 0, 0, 656, 655, 1, 0, 0, 0, 657, 658, 1, 0, 0, 0, 658, 656, 1, 0, 0, 0, 658, 659, 1, 0, 0, 0, 659, 661, 1, 0, 0, 0, 660, 654, 1, 0, 0, 0, 661, 664, 1, 0, 0, 0, 662, 660, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 138, 1, 0, 0, 0, 664, 662, 1, 0, 0, 0, 665, 666, 7, 1, 0, 0, 666, 667, 3, 137, 68, 0, 667, 140, 1, 0, 0, 0, 668, 669, 5, 105, 0, 0, 669, 670, 5, 110, 0, 0, 670, 698, 5, 116, 0, 0, 671, 672, 5, 98, 0, 0, 672, 673, 5, 111, 0, 0, 673, 674, 5, 111, 0, 0, 674, 698, 5, 108, 0, 0, 675, 676, 5, 115, 0, 0, 676, 677, 5, 116, 0, 0, 677, 678, 5, 114, 0, 0, 678, 679, 5, 105, 0, 0, 679, 680, 5, 110, 0, 0, 680, 698, 5, 103, 0, 0, 681, 682, 5, 112, 0, 0, 682, 683, 5, 117, 0, 0, 683, 684, 5, 98, 0, 0, 684, 685, 5, 107, 0, 0, 685, 686, 5, 101, 0, 0, 686, 698, 5, 121, 0, 0, 687, 688, 5, 115, 0, 0, 688, 689, 5, 105, 0, 0, 689, 698, 5, 103, 0, 0, 690, 691, 5, 100, 0, 0, 691, 692, 5, 97, 0, 0, 692, 693, 5, 116, 0, 0, 693, 694, 5, 97, 0, 0, 694, 695, 5, 115, 0, 0, 695, 696, 5, 105, 0, 0, 696, 698, 5, 103, 0, 0, 697, 668, 1, 0, 0, 0, 697, 671, 1, 0, 0, 0, 697, 675, 1, 0, 0, 0, 697, 681, 1, 0, 0, 0, 697, 687, 1, 0, 0, 0, 697, 690, 1, 0, 0, 0, 698, 142, 1, 0, 0, 0, 699, 700, 5, 98, 0, 0, 700, 701, 5, 121, 0, 0, 701, 702, 5, 116, 0, 0, 702, 703, 5, 101, 0, 0, 703, 704, 5, 115, 0, 0, 704, 144, 1, 0, 0, 0, 705, 706, 5, 98, 0, 0, 706, 707, 5, 121, 0, 0, 707, 708, 5, 116, 0, 0, 708, 709, 5, 101, 0, 0, 709, 710, 5, 115, 0, 0, 710, 711, 1, 0, 0, 0, 711, 717, 3, 147, 73, 0, 712, 713, 5, 98, 0, 0, 713, 714, 5, 121, 0, 0, 714, 715, 5, 116, 0, 0, 715, 717, 5, 101, 0, 0, 716, 705, 1, 0, 0, 0, 716, 712, 1, 0, 0, 0, 717, 146, 1, 0, 0, 0, 718, 722, 7, 2, 0, 0, 719, 721, 7, 0, 0, 0, 720, 719, 1, 0, 0, 0, 721, 724, 1, 0, 0, 0, 722, 720, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 148, 1, 0, 0, 0, 724, 722, 1, 0, 0, 0, 725, 731, 5, 34, 0, 0, 726, 727, 5, 92, 0, 0, 727, 730, 5, 34, 0, 0, 728, 730, 8, 3, 0, 0, 729, 726, 1, 0, 0, 0, 729, 728, 1, 0, 0, 0, 730, 733, 1, 0, 0, 0, 731, 732, 1, 0, 0, 0, 731, 729, 1, 0, 0, 0, 732, 734, 1, 0, 0, 0, 733, 731, 1, 0, 0, 0, 734, 746, 5, 34, 0, 0, 735, 741, 5, 39, 0, 0, 736, 737, 5, 92, 0, 0, 737, 740, 5, 39, 0, 0, 738, 740, 8, 4, 0, 0, 739, 736, 1, 0, 0, 0, 739, 738, 1, 0, 0, 0, 740, 743, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 741, 739, 1, 0, 0, 0, 742, 744, 1, 0, 0, 0, 743, 741, 1, 0, 0, 0, 744, 746, 5, 39, 0, 0, 745, 725, 1, 0, 0, 0, 745, 735, 1, 0, 0, 0, 746, 150, 1, 0, 0, 0, 747, 748, 5, 100, 0, 0, 748, 749, 5, 97, 0, 0, 749, 750, 5, 116, 0, 0, 750, 751, 5, 101, 0, 0, 751, 752, 5, 40, 0, 0, 752, 753, 1, 0, 0, 0, 753, 754, 3, 149, 74, 0, 754, 755, 5, 41, 0, 0, 755, 152, 1, 0, 0, 0, 756, 757, 5, 48, 0, 0, 757, 761, 7, 5, 0, 0, 758, 760, 7, 6, 0, 0, 759, 758, 1, 0, 0, 0, 760, 763, 1, 0, 0, 0, 761, 759, 1, 0, 0, 0, 761, 762, 1, 0, 0, 0, 762, 154, 1, 0, 0, 0, 763, 761, 1, 0, 0, 0, 764, 765, 5, 116, 0, 0, 765, 766, 5, 104, 0, 0, 766, 767, 5, 105, 0, 0, 767, 768, 5, 115, 0, 0, 768, 769, 5, 46, 0, 0, 769, 770, 5, 97, 0, 0, 770, 771, 5, 103, 0, 0, 771, 780, 5, 101, 0, 0, 772, 773, 5, 116, 0, 0, 773, 774, 5, 120, 0, 0, 774, 775, 5, 46, 0, 0, 775, 776, 5, 116, 0, 0, 776, 777, 5, 105, 0, 0, 777, 778, 5, 109, 0, 0, 778, 780, 5, 101, 0, 0, 779, 764, 1, 0, 0, 0, 779, 772, 1, 0, 0, 0, 780, 156, 1, 0, 0, 0, 781, 782, 5, 117, 0, 0, 782, 783, 5, 110, 0, 0, 783, 784, 5, 115, 0, 0, 784, 785, 5, 97, 0, 0, 785, 786, 5, 102, 0, 0, 786, 787, 5, 101, 0, 0, 787, 788, 5, 95, 0, 0, 788, 789, 5, 105, 0, 0, 789, 790, 5, 110, 0, 0, 790, 830, 5, 116, 0, 0, 791, 792, 5, 117, 0, 0, 792, 793, 5, 110, 0, 0, 793, 794, 5, 115, 0, 0, 794, 795, 5, 97, 0, 0, 795, 796, 5, 102, 0, 0, 796, 797, 5, 101, 0, 0, 797, 798, 5, 95, 0, 0, 798, 799, 5, 98, 0, 0, 799, 800, 5, 111, 0, 0, 800, 801, 5, 111, 0, 0, 801, 830, 5, 108, 0, 0, 802, 803, 5, 117, 0, 0, 803, 804, 5, 110, 0, 0, 804, 805, 5, 115, 0, 0, 805, 806, 5, 97, 0, 0, 806, 807, 5, 102, 0, 0, 807, 808, 5, 101, 0, 0, 808, 809, 5, 95, 0, 0, 809, 810, 5, 98, 0, 0, 810, 811, 5, 121, 0, 0, 811, 812, 5, 116, 0, 0, 812, 813, 5, 101, 0, 0, 813, 814, 5, 115, 0, 0, 814, 816, 1, 0, 0, 0, 815, 817, 3, 147, 73, 0, 816, 815, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 830, 1, 0, 0, 0, 818, 819, 5, 117, 0, 0, 819, 820, 5, 110, 0, 0, 820, 821, 5, 115, 0, 0, 821, 822, 5, 97, 0, 0, 822, 823, 5, 102, 0, 0, 823, 824, 5, 101, 0, 0, 824, 825, 5, 95, 0, 0, 825, 826, 5, 98, 0, 0, 826, 827, 5, 121, 0, 0, 827, 828, 5, 116, 0, 0, 828, 830, 5, 101, 0, 0, 829, 781, 1, 0, 0, 0, 829, 791, 1, 0, 0, 0, 829, 802, 1, 0, 0, 0, 829, 818, 1, 0, 0, 0, 830, 158, 1, 0, 0, 0, 831, 832, 5, 116, 0, 0, 832, 833, 5, 104, 0, 0, 833, 834, 5, 105, 0, 0, 834, 835, 5, 115, 0, 0, 835, 836, 5, 46, 0, 0, 836, 837, 5, 97, 0, 0, 837, 838, 5, 99, 0, 0, 838, 839, 5, 116, 0, 0, 839, 840, 5, 105, 0, 0, 840, 841, 5, 118, 0, 0, 841, 842, 5, 101, 0, 0, 842, 843, 5, 73, 0, 0, 843, 844, 5, 110, 0, 0, 844, 845, 5, 112, 0, 0, 845, 846, 5, 117, 0, 0, 846, 847, 5, 116, 0, 0, 847, 848, 5, 73, 0, 0, 848, 849, 5, 110, 0, 0, 849, 850, 5, 100, 0, 0, 850, 851, 5, 101, 0, 0, 851, 926, 5, 120, 0, 0, 852, 853, 5, 116, 0, 0, 853, 854, 5, 104, 0, 0, 854, 855, 5, 105, 0, 0, 855, 856, 5, 115, 0, 0, 856, 857, 5, 46, 0, 0, 857, 858, 5, 97, 0, 0, 858, 859, 5, 99, 0, 0, 859, 860, 5, 116, 0, 0, 860, 861, 5, 105, 0, 0, 861, 862, 5, 118, 0, 0, 862, 863, 5, 101, 0, 0, 863, 864, 5, 66, 0, 0, 864, 865, 5, 121, 0, 0, 865, 866, 5, 116, 0, 0, 866, 867, 5, 101, 0, 0, 867, 868, 5, 99, 0, 0, 868, 869, 5, 111, 0, 0, 869, 870, 5, 100, 0, 0, 870, 926, 5, 101, 0, 0, 871, 872, 5, 116, 0, 0, 872, 873, 5, 120, 0, 0, 873, 874, 5, 46, 0, 0, 874, 875, 5, 105, 0, 0, 875, 876, 5, 110, 0, 0, 876, 877, 5, 112, 0, 0, 877, 878, 5, 117, 0, 0, 878, 879, 5, 116, 0, 0, 879, 880, 5, 115, 0, 0, 880, 881, 5, 46, 0, 0, 881, 882, 5, 108, 0, 0, 882, 883, 5, 101, 0, 0, 883, 884, 5, 110, 0, 0, 884, 885, 5, 103, 0, 0, 885, 886, 5, 116, 0, 0, 886, 926, 5, 104, 0, 0, 887, 888, 5, 116, 0, 0, 888, 889, 5, 120, 0, 0, 889, 890, 5, 46, 0, 0, 890, 891, 5, 111, 0, 0, 891, 892, 5, 117, 0, 0, 892, 893, 5, 116, 0, 0, 893, 894, 5, 112, 0, 0, 894, 895, 5, 117, 0, 0, 895, 896, 5, 116, 0, 0, 896, 897, 5, 115, 0, 0, 897, 898, 5, 46, 0, 0, 898, 899, 5, 108, 0, 0, 899, 900, 5, 101, 0, 0, 900, 901, 5, 110, 0, 0, 901, 902, 5, 103, 0, 0, 902, 903, 5, 116, 0, 0, 903, 926, 5, 104, 0, 0, 904, 905, 5, 116, 0, 0, 905, 906, 5, 120, 0, 0, 906, 907, 5, 46, 0, 0, 907, 908, 5, 118, 0, 0, 908, 909, 5, 101, 0, 0, 909, 910, 5, 114, 0, 0, 910, 911, 5, 115, 0, 0, 911, 912, 5, 105, 0, 0, 912, 913, 5, 111, 0, 0, 913, 926, 5, 110, 0, 0, 914, 915, 5, 116, 0, 0, 915, 916, 5, 120, 0, 0, 916, 917, 5, 46, 0, 0, 917, 918, 5, 108, 0, 0, 918, 919, 5, 111, 0, 0, 919, 920, 5, 99, 0, 0, 920, 921, 5, 107, 0, 0, 921, 922, 5, 116, 0, 0, 922, 923, 5, 105, 0, 0, 923, 924, 5, 109, 0, 0, 924, 926, 5, 101, 0, 0, 925, 831, 1, 0, 0, 0, 925, 852, 1, 0, 0, 0, 925, 871, 1, 0, 0, 0, 925, 887, 1, 0, 0, 0, 925, 904, 1, 0, 0, 0, 925, 914, 1, 0, 0, 0, 926, 160, 1, 0, 0, 0, 927, 931, 7, 7, 0, 0, 928, 930, 7, 8, 0, 0, 929, 928, 1, 0, 0, 0, 930, 933, 1, 0, 0, 0, 931, 929, 1, 0, 0, 0, 931, 932, 1, 0, 0, 0, 932, 162, 1, 0, 0, 0, 933, 931, 1, 0, 0, 0, 934, 936, 7, 9, 0, 0, 935, 934, 1, 0, 0, 0, 936, 937, 1, 0, 0, 0, 937, 935, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 940, 6, 81, 0, 0, 940, 164, 1, 0, 0, 0, 941, 942, 5, 47, 0, 0, 942, 943, 5, 42, 0, 0, 943, 947, 1, 0, 0, 0, 944, 946, 9, 0, 0, 0, 945, 944, 1, 0, 0, 0, 946, 949, 1, 0, 0, 0, 947, 948, 1, 0, 0, 0, 947, 945, 1, 0, 0, 0, 948, 950, 1, 0, 0, 0, 949, 947, 1, 0, 0, 0, 950, 951, 5, 42, 0, 0, 951, 952, 5, 47, 0, 0, 952, 953, 1, 0, 0, 0, 953, 954, 6, 82, 1, 0, 954, 166, 1, 0, 0, 0, 955, 956, 5, 47, 0, 0, 956, 957, 5, 47, 0, 0, 957, 961, 1, 0, 0, 0, 958, 960, 8, 10, 0, 0, 959, 958, 1, 0, 0, 0, 960, 963, 1, 0, 0, 0, 961, 959, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 964, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 964, 965, 6, 83, 1, 0, 965, 168, 1, 0, 0, 0, 28, 0, 558, 564, 570, 581, 640, 643, 647, 652, 658, 662, 697, 716, 722, 729, 731, 739, 741, 745, 761, 779, 816, 829, 925, 931, 937, 947, 961, 2, 6, 0, 0, 0, 1, 0] \ No newline at end of file diff --git a/packages/cashc/src/grammar/CashScriptLexer.tokens b/packages/cashc/src/grammar/CashScriptLexer.tokens index 16dc361d..14524e52 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.tokens +++ b/packages/cashc/src/grammar/CashScriptLexer.tokens @@ -96,11 +96,11 @@ LINE_COMMENT=84 'function'=12 'returns'=13 '('=14 -')'=15 -'contract'=16 -'{'=17 -'}'=18 -','=19 +','=15 +')'=16 +'contract'=17 +'{'=18 +'}'=19 'return'=20 '+='=21 '-='=22 diff --git a/packages/cashc/src/grammar/CashScriptLexer.ts b/packages/cashc/src/grammar/CashScriptLexer.ts index 0300faed..52ab2953 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.ts +++ b/packages/cashc/src/grammar/CashScriptLexer.ts @@ -1,4 +1,4 @@ -// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.1 +// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.2 // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols import { ATN, @@ -107,10 +107,10 @@ export default class CashScriptLexer extends Lexer { "'='", "'import'", "'function'", "'returns'", - "'('", "')'", - "'contract'", + "'('", "','", + "')'", "'contract'", "'{'", "'}'", - "','", "'return'", + "'return'", "'+='", "'-='", "'++'", "'--'", "'require'", @@ -247,7 +247,7 @@ export default class CashScriptLexer extends Lexer { 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,7,1,7, 1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1, 11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13, - 1,13,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1, + 1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1, 17,1,17,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,21, 1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1, 24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26, @@ -329,7 +329,7 @@ export default class CashScriptLexer extends Lexer { 0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,1,169,1,0,0,0,3,176,1,0,0,0, 5,178,1,0,0,0,7,189,1,0,0,0,9,191,1,0,0,0,11,193,1,0,0,0,13,196,1,0,0,0, 15,198,1,0,0,0,17,200,1,0,0,0,19,203,1,0,0,0,21,205,1,0,0,0,23,212,1,0, - 0,0,25,221,1,0,0,0,27,229,1,0,0,0,29,231,1,0,0,0,31,233,1,0,0,0,33,242, + 0,0,25,221,1,0,0,0,27,229,1,0,0,0,29,231,1,0,0,0,31,233,1,0,0,0,33,235, 1,0,0,0,35,244,1,0,0,0,37,246,1,0,0,0,39,248,1,0,0,0,41,255,1,0,0,0,43, 258,1,0,0,0,45,261,1,0,0,0,47,264,1,0,0,0,49,267,1,0,0,0,51,275,1,0,0,0, 53,287,1,0,0,0,55,290,1,0,0,0,57,295,1,0,0,0,59,298,1,0,0,0,61,304,1,0, @@ -359,15 +359,15 @@ export default class CashScriptLexer extends Lexer { 5,105,0,0,218,219,5,111,0,0,219,220,5,110,0,0,220,24,1,0,0,0,221,222,5, 114,0,0,222,223,5,101,0,0,223,224,5,116,0,0,224,225,5,117,0,0,225,226,5, 114,0,0,226,227,5,110,0,0,227,228,5,115,0,0,228,26,1,0,0,0,229,230,5,40, - 0,0,230,28,1,0,0,0,231,232,5,41,0,0,232,30,1,0,0,0,233,234,5,99,0,0,234, - 235,5,111,0,0,235,236,5,110,0,0,236,237,5,116,0,0,237,238,5,114,0,0,238, - 239,5,97,0,0,239,240,5,99,0,0,240,241,5,116,0,0,241,32,1,0,0,0,242,243, - 5,123,0,0,243,34,1,0,0,0,244,245,5,125,0,0,245,36,1,0,0,0,246,247,5,44, - 0,0,247,38,1,0,0,0,248,249,5,114,0,0,249,250,5,101,0,0,250,251,5,116,0, - 0,251,252,5,117,0,0,252,253,5,114,0,0,253,254,5,110,0,0,254,40,1,0,0,0, - 255,256,5,43,0,0,256,257,5,61,0,0,257,42,1,0,0,0,258,259,5,45,0,0,259,260, - 5,61,0,0,260,44,1,0,0,0,261,262,5,43,0,0,262,263,5,43,0,0,263,46,1,0,0, - 0,264,265,5,45,0,0,265,266,5,45,0,0,266,48,1,0,0,0,267,268,5,114,0,0,268, + 0,0,230,28,1,0,0,0,231,232,5,44,0,0,232,30,1,0,0,0,233,234,5,41,0,0,234, + 32,1,0,0,0,235,236,5,99,0,0,236,237,5,111,0,0,237,238,5,110,0,0,238,239, + 5,116,0,0,239,240,5,114,0,0,240,241,5,97,0,0,241,242,5,99,0,0,242,243,5, + 116,0,0,243,34,1,0,0,0,244,245,5,123,0,0,245,36,1,0,0,0,246,247,5,125,0, + 0,247,38,1,0,0,0,248,249,5,114,0,0,249,250,5,101,0,0,250,251,5,116,0,0, + 251,252,5,117,0,0,252,253,5,114,0,0,253,254,5,110,0,0,254,40,1,0,0,0,255, + 256,5,43,0,0,256,257,5,61,0,0,257,42,1,0,0,0,258,259,5,45,0,0,259,260,5, + 61,0,0,260,44,1,0,0,0,261,262,5,43,0,0,262,263,5,43,0,0,263,46,1,0,0,0, + 264,265,5,45,0,0,265,266,5,45,0,0,266,48,1,0,0,0,267,268,5,114,0,0,268, 269,5,101,0,0,269,270,5,113,0,0,270,271,5,117,0,0,271,272,5,105,0,0,272, 273,5,114,0,0,273,274,5,101,0,0,274,50,1,0,0,0,275,276,5,99,0,0,276,277, 5,111,0,0,277,278,5,110,0,0,278,279,5,115,0,0,279,280,5,111,0,0,280,281, diff --git a/packages/cashc/src/grammar/CashScriptParser.ts b/packages/cashc/src/grammar/CashScriptParser.ts index 0833d80e..ae797cf8 100644 --- a/packages/cashc/src/grammar/CashScriptParser.ts +++ b/packages/cashc/src/grammar/CashScriptParser.ts @@ -1,4 +1,4 @@ -// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.1 +// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.2 // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols import { @@ -102,7 +102,7 @@ export default class CashScriptParser extends Parser { public static readonly WHITESPACE = 82; public static readonly COMMENT = 83; public static readonly LINE_COMMENT = 84; - public static readonly EOF = Token.EOF; + public static override readonly EOF = Token.EOF; public static readonly RULE_sourceFile = 0; public static readonly RULE_pragmaDirective = 1; public static readonly RULE_pragmaName = 2; @@ -154,10 +154,10 @@ export default class CashScriptParser extends Parser { "'='", "'import'", "'function'", "'returns'", - "'('", "')'", - "'contract'", + "'('", "','", + "')'", "'contract'", "'{'", "'}'", - "','", "'return'", + "'return'", "'+='", "'-='", "'++'", "'--'", "'require'", @@ -309,7 +309,7 @@ export default class CashScriptParser extends Parser { this.state = 101; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===12 || _la===16) { + while (_la===12 || _la===17) { { { this.state = 98; @@ -543,7 +543,7 @@ export default class CashScriptParser extends Parser { this.globalFunctionDefinition(); } break; - case 16: + case 17: this.enterOuterAlt(localctx, 2); { this.state = 129; @@ -582,7 +582,7 @@ export default class CashScriptParser extends Parser { this.match(CashScriptParser.Identifier); this.state = 134; this.parameterList(); - this.state = 140; + this.state = 147; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===13) { @@ -593,12 +593,28 @@ export default class CashScriptParser extends Parser { this.match(CashScriptParser.T__13); this.state = 137; this.typeName(); - this.state = 138; - this.match(CashScriptParser.T__14); + this.state = 142; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la===15) { + { + { + this.state = 138; + this.match(CashScriptParser.T__14); + this.state = 139; + this.typeName(); + } + } + this.state = 144; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 145; + this.match(CashScriptParser.T__15); } } - this.state = 142; + this.state = 149; this.functionBody(); } } @@ -624,30 +640,30 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 144; - this.match(CashScriptParser.T__15); - this.state = 145; + this.state = 151; + this.match(CashScriptParser.T__16); + this.state = 152; this.match(CashScriptParser.Identifier); - this.state = 146; + this.state = 153; this.parameterList(); - this.state = 147; - this.match(CashScriptParser.T__16); - this.state = 151; + this.state = 154; + this.match(CashScriptParser.T__17); + this.state = 158; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===12) { { { - this.state = 148; + this.state = 155; this.contractFunctionDefinition(); } } - this.state = 153; + this.state = 160; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 154; - this.match(CashScriptParser.T__17); + this.state = 161; + this.match(CashScriptParser.T__18); } } catch (re) { @@ -671,13 +687,13 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 156; + this.state = 163; this.match(CashScriptParser.T__11); - this.state = 157; + this.state = 164; this.match(CashScriptParser.Identifier); - this.state = 158; + this.state = 165; this.parameterList(); - this.state = 159; + this.state = 166; this.functionBody(); } } @@ -703,24 +719,24 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 161; - this.match(CashScriptParser.T__16); - this.state = 165; + this.state = 168; + this.match(CashScriptParser.T__17); + this.state = 172; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3994025984) !== 0) || ((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 1031) !== 0)) { { { - this.state = 162; + this.state = 169; this.statement(); } } - this.state = 167; + this.state = 174; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 168; - this.match(CashScriptParser.T__17); + this.state = 175; + this.match(CashScriptParser.T__18); } } catch (re) { @@ -746,48 +762,48 @@ export default class CashScriptParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 170; + this.state = 177; this.match(CashScriptParser.T__13); - this.state = 182; + this.state = 189; this._errHandler.sync(this); _la = this._input.LA(1); if (((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 7) !== 0)) { { - this.state = 171; + this.state = 178; this.parameter(); - this.state = 176; + this.state = 183; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 9, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 10, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 172; - this.match(CashScriptParser.T__18); - this.state = 173; + this.state = 179; + this.match(CashScriptParser.T__14); + this.state = 180; this.parameter(); } } } - this.state = 178; + this.state = 185; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 9, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 10, this._ctx); } - this.state = 180; + this.state = 187; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===19) { + if (_la===15) { { - this.state = 179; - this.match(CashScriptParser.T__18); + this.state = 186; + this.match(CashScriptParser.T__14); } } } } - this.state = 184; - this.match(CashScriptParser.T__14); + this.state = 191; + this.match(CashScriptParser.T__15); } } catch (re) { @@ -811,9 +827,9 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 186; + this.state = 193; this.typeName(); - this.state = 187; + this.state = 194; this.match(CashScriptParser.Identifier); } } @@ -837,30 +853,30 @@ export default class CashScriptParser extends Parser { this.enterRule(localctx, 28, CashScriptParser.RULE_block); let _la: number; try { - this.state = 198; + this.state = 205; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 18: this.enterOuterAlt(localctx, 1); { - this.state = 189; - this.match(CashScriptParser.T__16); - this.state = 193; + this.state = 196; + this.match(CashScriptParser.T__17); + this.state = 200; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3994025984) !== 0) || ((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 1031) !== 0)) { { { - this.state = 190; + this.state = 197; this.statement(); } } - this.state = 195; + this.state = 202; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 196; - this.match(CashScriptParser.T__17); + this.state = 203; + this.match(CashScriptParser.T__18); } break; case 20: @@ -876,7 +892,7 @@ export default class CashScriptParser extends Parser { case 81: this.enterOuterAlt(localctx, 2); { - this.state = 197; + this.state = 204; this.statement(); } break; @@ -903,7 +919,7 @@ export default class CashScriptParser extends Parser { let localctx: StatementContext = new StatementContext(this, this._ctx, this.state); this.enterRule(localctx, 30, CashScriptParser.RULE_statement); try { - this.state = 204; + this.state = 211; this._errHandler.sync(this); switch (this._input.LA(1)) { case 27: @@ -912,7 +928,7 @@ export default class CashScriptParser extends Parser { case 31: this.enterOuterAlt(localctx, 1); { - this.state = 200; + this.state = 207; this.controlStatement(); } break; @@ -925,9 +941,9 @@ export default class CashScriptParser extends Parser { case 81: this.enterOuterAlt(localctx, 2); { - this.state = 201; + this.state = 208; this.nonControlStatement(); - this.state = 202; + this.state = 209; this.match(CashScriptParser.T__1); } break; @@ -954,62 +970,62 @@ export default class CashScriptParser extends Parser { let localctx: NonControlStatementContext = new NonControlStatementContext(this, this._ctx, this.state); this.enterRule(localctx, 32, CashScriptParser.RULE_nonControlStatement); try { - this.state = 214; + this.state = 221; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 15, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 16, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 206; + this.state = 213; this.variableDefinition(); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 207; + this.state = 214; this.tupleAssignment(); } break; case 3: this.enterOuterAlt(localctx, 3); { - this.state = 208; + this.state = 215; this.assignStatement(); } break; case 4: this.enterOuterAlt(localctx, 4); { - this.state = 209; + this.state = 216; this.timeOpStatement(); } break; case 5: this.enterOuterAlt(localctx, 5); { - this.state = 210; + this.state = 217; this.requireStatement(); } break; case 6: this.enterOuterAlt(localctx, 6); { - this.state = 211; + this.state = 218; this.functionCallStatement(); } break; case 7: this.enterOuterAlt(localctx, 7); { - this.state = 212; + this.state = 219; this.consoleStatement(); } break; case 8: this.enterOuterAlt(localctx, 8); { - this.state = 213; + this.state = 220; this.returnStatement(); } break; @@ -1036,7 +1052,7 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 216; + this.state = 223; this.functionCall(); } } @@ -1058,13 +1074,30 @@ export default class CashScriptParser extends Parser { public returnStatement(): ReturnStatementContext { let localctx: ReturnStatementContext = new ReturnStatementContext(this, this._ctx, this.state); this.enterRule(localctx, 36, CashScriptParser.RULE_returnStatement); + let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 218; + this.state = 225; this.match(CashScriptParser.T__19); - this.state = 219; + this.state = 226; this.expression(0); + this.state = 231; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la===15) { + { + { + this.state = 227; + this.match(CashScriptParser.T__14); + this.state = 228; + this.expression(0); + } + } + this.state = 233; + this._errHandler.sync(this); + _la = this._input.LA(1); + } } } catch (re) { @@ -1086,13 +1119,13 @@ export default class CashScriptParser extends Parser { let localctx: ControlStatementContext = new ControlStatementContext(this, this._ctx, this.state); this.enterRule(localctx, 38, CashScriptParser.RULE_controlStatement); try { - this.state = 223; + this.state = 236; this._errHandler.sync(this); switch (this._input.LA(1)) { case 27: this.enterOuterAlt(localctx, 1); { - this.state = 221; + this.state = 234; this.ifStatement(); } break; @@ -1101,7 +1134,7 @@ export default class CashScriptParser extends Parser { case 31: this.enterOuterAlt(localctx, 2); { - this.state = 222; + this.state = 235; this.loopStatement(); } break; @@ -1131,27 +1164,27 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 225; + this.state = 238; this.typeName(); - this.state = 229; + this.state = 242; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===64) { { { - this.state = 226; + this.state = 239; this.modifier(); } } - this.state = 231; + this.state = 244; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 232; + this.state = 245; this.match(CashScriptParser.Identifier); - this.state = 233; + this.state = 246; this.match(CashScriptParser.T__9); - this.state = 234; + this.state = 247; this.expression(0); } } @@ -1173,22 +1206,35 @@ export default class CashScriptParser extends Parser { public tupleAssignment(): TupleAssignmentContext { let localctx: TupleAssignmentContext = new TupleAssignmentContext(this, this._ctx, this.state); this.enterRule(localctx, 42, CashScriptParser.RULE_tupleAssignment); + let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 236; - this.typeName(); - this.state = 237; - this.match(CashScriptParser.Identifier); - this.state = 238; - this.match(CashScriptParser.T__18); - this.state = 239; + this.state = 249; this.typeName(); - this.state = 240; + this.state = 250; this.match(CashScriptParser.Identifier); - this.state = 241; + this.state = 255; + this._errHandler.sync(this); + _la = this._input.LA(1); + do { + { + { + this.state = 251; + this.match(CashScriptParser.T__14); + this.state = 252; + this.typeName(); + this.state = 253; + this.match(CashScriptParser.Identifier); + } + } + this.state = 257; + this._errHandler.sync(this); + _la = this._input.LA(1); + } while (_la===15); + this.state = 259; this.match(CashScriptParser.T__9); - this.state = 242; + this.state = 260; this.expression(0); } } @@ -1212,15 +1258,15 @@ export default class CashScriptParser extends Parser { this.enterRule(localctx, 44, CashScriptParser.RULE_assignStatement); let _la: number; try { - this.state = 249; + this.state = 267; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 18, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 21, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 244; + this.state = 262; this.match(CashScriptParser.Identifier); - this.state = 245; + this.state = 263; localctx._op = this._input.LT(1); _la = this._input.LA(1); if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 6292480) !== 0))) { @@ -1230,16 +1276,16 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 246; + this.state = 264; this.expression(0); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 247; + this.state = 265; this.match(CashScriptParser.Identifier); - this.state = 248; + this.state = 266; localctx._op = this._input.LT(1); _la = this._input.LA(1); if(!(_la===23 || _la===24)) { @@ -1275,30 +1321,30 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 251; + this.state = 269; this.match(CashScriptParser.T__24); - this.state = 252; + this.state = 270; this.match(CashScriptParser.T__13); - this.state = 253; + this.state = 271; this.match(CashScriptParser.TxVar); - this.state = 254; + this.state = 272; this.match(CashScriptParser.T__5); - this.state = 255; + this.state = 273; this.expression(0); - this.state = 258; + this.state = 276; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===19) { + if (_la===15) { { - this.state = 256; - this.match(CashScriptParser.T__18); - this.state = 257; + this.state = 274; + this.match(CashScriptParser.T__14); + this.state = 275; this.requireMessage(); } } - this.state = 260; - this.match(CashScriptParser.T__14); + this.state = 278; + this.match(CashScriptParser.T__15); } } catch (re) { @@ -1323,26 +1369,26 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 262; + this.state = 280; this.match(CashScriptParser.T__24); - this.state = 263; + this.state = 281; this.match(CashScriptParser.T__13); - this.state = 264; + this.state = 282; this.expression(0); - this.state = 267; + this.state = 285; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===19) { + if (_la===15) { { - this.state = 265; - this.match(CashScriptParser.T__18); - this.state = 266; + this.state = 283; + this.match(CashScriptParser.T__14); + this.state = 284; this.requireMessage(); } } - this.state = 269; - this.match(CashScriptParser.T__14); + this.state = 287; + this.match(CashScriptParser.T__15); } } catch (re) { @@ -1366,9 +1412,9 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 271; + this.state = 289; this.match(CashScriptParser.T__25); - this.state = 272; + this.state = 290; this.consoleParameterList(); } } @@ -1393,24 +1439,24 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 274; + this.state = 292; this.match(CashScriptParser.T__26); - this.state = 275; + this.state = 293; this.match(CashScriptParser.T__13); - this.state = 276; + this.state = 294; this.expression(0); - this.state = 277; - this.match(CashScriptParser.T__14); - this.state = 278; + this.state = 295; + this.match(CashScriptParser.T__15); + this.state = 296; localctx._ifBlock = this.block(); - this.state = 281; + this.state = 299; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 21, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 24, this._ctx) ) { case 1: { - this.state = 279; + this.state = 297; this.match(CashScriptParser.T__27); - this.state = 280; + this.state = 298; localctx._elseBlock = this.block(); } break; @@ -1436,27 +1482,27 @@ export default class CashScriptParser extends Parser { let localctx: LoopStatementContext = new LoopStatementContext(this, this._ctx, this.state); this.enterRule(localctx, 54, CashScriptParser.RULE_loopStatement); try { - this.state = 286; + this.state = 304; this._errHandler.sync(this); switch (this._input.LA(1)) { case 29: this.enterOuterAlt(localctx, 1); { - this.state = 283; + this.state = 301; this.doWhileStatement(); } break; case 30: this.enterOuterAlt(localctx, 2); { - this.state = 284; + this.state = 302; this.whileStatement(); } break; case 31: this.enterOuterAlt(localctx, 3); { - this.state = 285; + this.state = 303; this.forStatement(); } break; @@ -1485,19 +1531,19 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 288; + this.state = 306; this.match(CashScriptParser.T__28); - this.state = 289; + this.state = 307; this.block(); - this.state = 290; + this.state = 308; this.match(CashScriptParser.T__29); - this.state = 291; + this.state = 309; this.match(CashScriptParser.T__13); - this.state = 292; + this.state = 310; this.expression(0); - this.state = 293; - this.match(CashScriptParser.T__14); - this.state = 294; + this.state = 311; + this.match(CashScriptParser.T__15); + this.state = 312; this.match(CashScriptParser.T__1); } } @@ -1522,15 +1568,15 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 296; + this.state = 314; this.match(CashScriptParser.T__29); - this.state = 297; + this.state = 315; this.match(CashScriptParser.T__13); - this.state = 298; + this.state = 316; this.expression(0); - this.state = 299; - this.match(CashScriptParser.T__14); - this.state = 300; + this.state = 317; + this.match(CashScriptParser.T__15); + this.state = 318; this.block(); } } @@ -1555,23 +1601,23 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 302; + this.state = 320; this.match(CashScriptParser.T__30); - this.state = 303; + this.state = 321; this.match(CashScriptParser.T__13); - this.state = 304; + this.state = 322; this.forInit(); - this.state = 305; + this.state = 323; this.match(CashScriptParser.T__1); - this.state = 306; + this.state = 324; this.expression(0); - this.state = 307; + this.state = 325; this.match(CashScriptParser.T__1); - this.state = 308; + this.state = 326; this.assignStatement(); - this.state = 309; - this.match(CashScriptParser.T__14); - this.state = 310; + this.state = 327; + this.match(CashScriptParser.T__15); + this.state = 328; this.block(); } } @@ -1594,7 +1640,7 @@ export default class CashScriptParser extends Parser { let localctx: ForInitContext = new ForInitContext(this, this._ctx, this.state); this.enterRule(localctx, 62, CashScriptParser.RULE_forInit); try { - this.state = 314; + this.state = 332; this._errHandler.sync(this); switch (this._input.LA(1)) { case 71: @@ -1602,14 +1648,14 @@ export default class CashScriptParser extends Parser { case 73: this.enterOuterAlt(localctx, 1); { - this.state = 312; + this.state = 330; this.variableDefinition(); } break; case 81: this.enterOuterAlt(localctx, 2); { - this.state = 313; + this.state = 331; this.assignStatement(); } break; @@ -1638,7 +1684,7 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 316; + this.state = 334; this.match(CashScriptParser.StringLiteral); } } @@ -1661,13 +1707,13 @@ export default class CashScriptParser extends Parser { let localctx: ConsoleParameterContext = new ConsoleParameterContext(this, this._ctx, this.state); this.enterRule(localctx, 66, CashScriptParser.RULE_consoleParameter); try { - this.state = 320; + this.state = 338; this._errHandler.sync(this); switch (this._input.LA(1)) { case 81: this.enterOuterAlt(localctx, 1); { - this.state = 318; + this.state = 336; this.match(CashScriptParser.Identifier); } break; @@ -1678,7 +1724,7 @@ export default class CashScriptParser extends Parser { case 77: this.enterOuterAlt(localctx, 2); { - this.state = 319; + this.state = 337; this.literal(); } break; @@ -1709,48 +1755,48 @@ export default class CashScriptParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 322; + this.state = 340; this.match(CashScriptParser.T__13); - this.state = 334; + this.state = 352; this._errHandler.sync(this); _la = this._input.LA(1); if (((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & 36357) !== 0)) { { - this.state = 323; + this.state = 341; this.consoleParameter(); - this.state = 328; + this.state = 346; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 25, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 28, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 324; - this.match(CashScriptParser.T__18); - this.state = 325; + this.state = 342; + this.match(CashScriptParser.T__14); + this.state = 343; this.consoleParameter(); } } } - this.state = 330; + this.state = 348; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 25, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 28, this._ctx); } - this.state = 332; + this.state = 350; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===19) { + if (_la===15) { { - this.state = 331; - this.match(CashScriptParser.T__18); + this.state = 349; + this.match(CashScriptParser.T__14); } } } } - this.state = 336; - this.match(CashScriptParser.T__14); + this.state = 354; + this.match(CashScriptParser.T__15); } } catch (re) { @@ -1774,9 +1820,9 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 338; + this.state = 356; this.match(CashScriptParser.Identifier); - this.state = 339; + this.state = 357; this.expressionList(); } } @@ -1803,48 +1849,48 @@ export default class CashScriptParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 341; + this.state = 359; this.match(CashScriptParser.T__13); - this.state = 353; + this.state = 371; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===5 || _la===14 || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 786955) !== 0) || ((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & 61029) !== 0)) { { - this.state = 342; + this.state = 360; this.expression(0); - this.state = 347; + this.state = 365; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 28, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 31, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 343; - this.match(CashScriptParser.T__18); - this.state = 344; + this.state = 361; + this.match(CashScriptParser.T__14); + this.state = 362; this.expression(0); } } } - this.state = 349; + this.state = 367; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 28, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 31, this._ctx); } - this.state = 351; + this.state = 369; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===19) { + if (_la===15) { { - this.state = 350; - this.match(CashScriptParser.T__18); + this.state = 368; + this.match(CashScriptParser.T__14); } } } } - this.state = 355; - this.match(CashScriptParser.T__14); + this.state = 373; + this.match(CashScriptParser.T__15); } } catch (re) { @@ -1881,21 +1927,21 @@ export default class CashScriptParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 406; + this.state = 424; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 35, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 38, this._ctx) ) { case 1: { localctx = new ParenthesisedContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 358; + this.state = 376; this.match(CashScriptParser.T__13); - this.state = 359; + this.state = 377; this.expression(0); - this.state = 360; - this.match(CashScriptParser.T__14); + this.state = 378; + this.match(CashScriptParser.T__15); } break; case 2: @@ -1903,24 +1949,24 @@ export default class CashScriptParser extends Parser { localctx = new CastContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 362; + this.state = 380; this.typeCast(); - this.state = 363; + this.state = 381; this.match(CashScriptParser.T__13); - this.state = 364; + this.state = 382; (localctx as CastContext)._castable = this.expression(0); - this.state = 366; + this.state = 384; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===19) { + if (_la===15) { { - this.state = 365; - this.match(CashScriptParser.T__18); + this.state = 383; + this.match(CashScriptParser.T__14); } } - this.state = 368; - this.match(CashScriptParser.T__14); + this.state = 386; + this.match(CashScriptParser.T__15); } break; case 3: @@ -1928,7 +1974,7 @@ export default class CashScriptParser extends Parser { localctx = new FunctionCallExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 370; + this.state = 388; this.functionCall(); } break; @@ -1937,11 +1983,11 @@ export default class CashScriptParser extends Parser { localctx = new InstantiationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 371; + this.state = 389; this.match(CashScriptParser.T__31); - this.state = 372; + this.state = 390; this.match(CashScriptParser.Identifier); - this.state = 373; + this.state = 391; this.expressionList(); } break; @@ -1950,15 +1996,15 @@ export default class CashScriptParser extends Parser { localctx = new UnaryIntrospectionOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 374; + this.state = 392; (localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__34); - this.state = 375; + this.state = 393; this.match(CashScriptParser.T__32); - this.state = 376; + this.state = 394; this.expression(0); - this.state = 377; + this.state = 395; this.match(CashScriptParser.T__33); - this.state = 378; + this.state = 396; (localctx as UnaryIntrospectionOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & 31) !== 0))) { @@ -1975,15 +2021,15 @@ export default class CashScriptParser extends Parser { localctx = new UnaryIntrospectionOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 380; + this.state = 398; (localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__40); - this.state = 381; + this.state = 399; this.match(CashScriptParser.T__32); - this.state = 382; + this.state = 400; this.expression(0); - this.state = 383; + this.state = 401; this.match(CashScriptParser.T__33); - this.state = 384; + this.state = 402; (localctx as UnaryIntrospectionOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & 991) !== 0))) { @@ -2000,7 +2046,7 @@ export default class CashScriptParser extends Parser { localctx = new UnaryOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 386; + this.state = 404; (localctx as UnaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(_la===5 || _la===50 || _la===51)) { @@ -2010,7 +2056,7 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 387; + this.state = 405; this.expression(15); } break; @@ -2019,47 +2065,47 @@ export default class CashScriptParser extends Parser { localctx = new ArrayContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 388; + this.state = 406; this.match(CashScriptParser.T__32); - this.state = 400; + this.state = 418; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===5 || _la===14 || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 786955) !== 0) || ((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & 61029) !== 0)) { { - this.state = 389; + this.state = 407; this.expression(0); - this.state = 394; + this.state = 412; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 32, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 35, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 390; - this.match(CashScriptParser.T__18); - this.state = 391; + this.state = 408; + this.match(CashScriptParser.T__14); + this.state = 409; this.expression(0); } } } - this.state = 396; + this.state = 414; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 32, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 35, this._ctx); } - this.state = 398; + this.state = 416; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===19) { + if (_la===15) { { - this.state = 397; - this.match(CashScriptParser.T__18); + this.state = 415; + this.match(CashScriptParser.T__14); } } } } - this.state = 402; + this.state = 420; this.match(CashScriptParser.T__33); } break; @@ -2068,7 +2114,7 @@ export default class CashScriptParser extends Parser { localctx = new NullaryOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 403; + this.state = 421; this.match(CashScriptParser.NullaryOp); } break; @@ -2077,7 +2123,7 @@ export default class CashScriptParser extends Parser { localctx = new IdentifierContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 404; + this.state = 422; this.match(CashScriptParser.Identifier); } break; @@ -2086,15 +2132,15 @@ export default class CashScriptParser extends Parser { localctx = new LiteralExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 405; + this.state = 423; this.literal(); } break; } this._ctx.stop = this._input.LT(-1); - this.state = 460; + this.state = 478; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 37, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 40, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { if (this._parseListeners != null) { @@ -2102,19 +2148,19 @@ export default class CashScriptParser extends Parser { } _prevctx = localctx; { - this.state = 458; + this.state = 476; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 36, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 39, this._ctx) ) { case 1: { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 408; + this.state = 426; if (!(this.precpred(this._ctx, 14))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); } - this.state = 409; + this.state = 427; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(((((_la - 52)) & ~0x1F) === 0 && ((1 << (_la - 52)) & 7) !== 0))) { @@ -2124,7 +2170,7 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 410; + this.state = 428; (localctx as BinaryOpContext)._right = this.expression(15); } break; @@ -2133,11 +2179,11 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 411; + this.state = 429; if (!(this.precpred(this._ctx, 13))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); } - this.state = 412; + this.state = 430; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(_la===51 || _la===55)) { @@ -2147,7 +2193,7 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 413; + this.state = 431; (localctx as BinaryOpContext)._right = this.expression(14); } break; @@ -2156,11 +2202,11 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 414; + this.state = 432; if (!(this.precpred(this._ctx, 12))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); } - this.state = 415; + this.state = 433; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(_la===56 || _la===57)) { @@ -2170,7 +2216,7 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 416; + this.state = 434; (localctx as BinaryOpContext)._right = this.expression(13); } break; @@ -2179,11 +2225,11 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 417; + this.state = 435; if (!(this.precpred(this._ctx, 11))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); } - this.state = 418; + this.state = 436; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 960) !== 0))) { @@ -2193,7 +2239,7 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 419; + this.state = 437; (localctx as BinaryOpContext)._right = this.expression(12); } break; @@ -2202,11 +2248,11 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 420; + this.state = 438; if (!(this.precpred(this._ctx, 10))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); } - this.state = 421; + this.state = 439; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(_la===58 || _la===59)) { @@ -2216,7 +2262,7 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 422; + this.state = 440; (localctx as BinaryOpContext)._right = this.expression(11); } break; @@ -2225,13 +2271,13 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 423; + this.state = 441; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 424; + this.state = 442; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__59); - this.state = 425; + this.state = 443; (localctx as BinaryOpContext)._right = this.expression(10); } break; @@ -2240,13 +2286,13 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 426; + this.state = 444; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 427; + this.state = 445; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__3); - this.state = 428; + this.state = 446; (localctx as BinaryOpContext)._right = this.expression(9); } break; @@ -2255,13 +2301,13 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 429; + this.state = 447; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 430; + this.state = 448; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__60); - this.state = 431; + this.state = 449; (localctx as BinaryOpContext)._right = this.expression(8); } break; @@ -2270,13 +2316,13 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 432; + this.state = 450; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 433; + this.state = 451; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__61); - this.state = 434; + this.state = 452; (localctx as BinaryOpContext)._right = this.expression(7); } break; @@ -2285,13 +2331,13 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 435; + this.state = 453; if (!(this.precpred(this._ctx, 5))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } - this.state = 436; + this.state = 454; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__62); - this.state = 437; + this.state = 455; (localctx as BinaryOpContext)._right = this.expression(6); } break; @@ -2299,15 +2345,15 @@ export default class CashScriptParser extends Parser { { localctx = new TupleIndexOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 438; + this.state = 456; if (!(this.precpred(this._ctx, 21))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 21)"); } - this.state = 439; + this.state = 457; this.match(CashScriptParser.T__32); - this.state = 440; + this.state = 458; (localctx as TupleIndexOpContext)._index = this.match(CashScriptParser.NumberLiteral); - this.state = 441; + this.state = 459; this.match(CashScriptParser.T__33); } break; @@ -2315,11 +2361,11 @@ export default class CashScriptParser extends Parser { { localctx = new UnaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 442; + this.state = 460; if (!(this.precpred(this._ctx, 18))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 18)"); } - this.state = 443; + this.state = 461; (localctx as UnaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(_la===46 || _la===47)) { @@ -2336,18 +2382,18 @@ export default class CashScriptParser extends Parser { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 444; + this.state = 462; if (!(this.precpred(this._ctx, 17))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); } - this.state = 445; + this.state = 463; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__47); - this.state = 446; + this.state = 464; this.match(CashScriptParser.T__13); - this.state = 447; + this.state = 465; (localctx as BinaryOpContext)._right = this.expression(0); - this.state = 448; - this.match(CashScriptParser.T__14); + this.state = 466; + this.match(CashScriptParser.T__15); } break; case 14: @@ -2355,30 +2401,30 @@ export default class CashScriptParser extends Parser { localctx = new SliceContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as SliceContext)._element = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 450; + this.state = 468; if (!(this.precpred(this._ctx, 16))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); } - this.state = 451; + this.state = 469; this.match(CashScriptParser.T__48); - this.state = 452; + this.state = 470; this.match(CashScriptParser.T__13); - this.state = 453; + this.state = 471; (localctx as SliceContext)._start = this.expression(0); - this.state = 454; - this.match(CashScriptParser.T__18); - this.state = 455; - (localctx as SliceContext)._end = this.expression(0); - this.state = 456; + this.state = 472; this.match(CashScriptParser.T__14); + this.state = 473; + (localctx as SliceContext)._end = this.expression(0); + this.state = 474; + this.match(CashScriptParser.T__15); } break; } } } - this.state = 462; + this.state = 480; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 37, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 40, this._ctx); } } } @@ -2403,7 +2449,7 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 463; + this.state = 481; this.match(CashScriptParser.T__63); } } @@ -2426,41 +2472,41 @@ export default class CashScriptParser extends Parser { let localctx: LiteralContext = new LiteralContext(this, this._ctx, this.state); this.enterRule(localctx, 78, CashScriptParser.RULE_literal); try { - this.state = 470; + this.state = 488; this._errHandler.sync(this); switch (this._input.LA(1)) { case 66: this.enterOuterAlt(localctx, 1); { - this.state = 465; + this.state = 483; this.match(CashScriptParser.BooleanLiteral); } break; case 68: this.enterOuterAlt(localctx, 2); { - this.state = 466; + this.state = 484; this.numberLiteral(); } break; case 75: this.enterOuterAlt(localctx, 3); { - this.state = 467; + this.state = 485; this.match(CashScriptParser.StringLiteral); } break; case 76: this.enterOuterAlt(localctx, 4); { - this.state = 468; + this.state = 486; this.match(CashScriptParser.DateLiteral); } break; case 77: this.enterOuterAlt(localctx, 5); { - this.state = 469; + this.state = 487; this.match(CashScriptParser.HexLiteral); } break; @@ -2489,14 +2535,14 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 472; + this.state = 490; this.match(CashScriptParser.NumberLiteral); - this.state = 474; + this.state = 492; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 39, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 42, this._ctx) ) { case 1: { - this.state = 473; + this.state = 491; this.match(CashScriptParser.NumberUnit); } break; @@ -2525,7 +2571,7 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 476; + this.state = 494; _la = this._input.LA(1); if(!(((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 7) !== 0))) { this._errHandler.recoverInline(this); @@ -2558,7 +2604,7 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 478; + this.state = 496; _la = this._input.LA(1); if(!(((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 259) !== 0))) { this._errHandler.recoverInline(this); @@ -2625,7 +2671,7 @@ export default class CashScriptParser extends Parser { return true; } - public static readonly _serializedATN: number[] = [4,1,84,481,2,0,7,0,2, + public static readonly _serializedATN: number[] = [4,1,84,499,2,0,7,0,2, 1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2, 10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17, 7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7, @@ -2635,155 +2681,161 @@ export default class CashScriptParser extends Parser { 0,5,0,94,8,0,10,0,12,0,97,9,0,1,0,5,0,100,8,0,10,0,12,0,103,9,0,1,0,1,0, 1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,3,1,3,3,3,116,8,3,1,4,3,4,119,8,4,1,4,1,4, 1,5,1,5,1,6,1,6,1,6,1,6,1,7,1,7,3,7,131,8,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,3,8,141,8,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,5,9,150,8,9,10,9,12,9,153,9, - 9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,11,1,11,5,11,164,8,11,10,11,12,11, - 167,9,11,1,11,1,11,1,12,1,12,1,12,1,12,5,12,175,8,12,10,12,12,12,178,9, - 12,1,12,3,12,181,8,12,3,12,183,8,12,1,12,1,12,1,13,1,13,1,13,1,14,1,14, - 5,14,192,8,14,10,14,12,14,195,9,14,1,14,1,14,3,14,199,8,14,1,15,1,15,1, - 15,1,15,3,15,205,8,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,215, - 8,16,1,17,1,17,1,18,1,18,1,18,1,19,1,19,3,19,224,8,19,1,20,1,20,5,20,228, - 8,20,10,20,12,20,231,9,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21, - 1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,3,22,250,8,22,1,23,1,23,1,23,1, - 23,1,23,1,23,1,23,3,23,259,8,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,3,24, - 268,8,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,3, - 26,282,8,26,1,27,1,27,1,27,3,27,287,8,27,1,28,1,28,1,28,1,28,1,28,1,28, - 1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1, - 30,1,30,1,30,1,30,1,31,1,31,3,31,315,8,31,1,32,1,32,1,33,1,33,3,33,321, - 8,33,1,34,1,34,1,34,1,34,5,34,327,8,34,10,34,12,34,330,9,34,1,34,3,34,333, - 8,34,3,34,335,8,34,1,34,1,34,1,35,1,35,1,35,1,36,1,36,1,36,1,36,5,36,346, - 8,36,10,36,12,36,349,9,36,1,36,3,36,352,8,36,3,36,354,8,36,1,36,1,36,1, - 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,3,37,367,8,37,1,37,1,37,1,37, - 1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, - 37,1,37,1,37,1,37,1,37,1,37,1,37,5,37,393,8,37,10,37,12,37,396,9,37,1,37, - 3,37,399,8,37,3,37,401,8,37,1,37,1,37,1,37,1,37,3,37,407,8,37,1,37,1,37, - 1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, + 1,8,5,8,141,8,8,10,8,12,8,144,9,8,1,8,1,8,3,8,148,8,8,1,8,1,8,1,9,1,9,1, + 9,1,9,1,9,5,9,157,8,9,10,9,12,9,160,9,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10, + 1,11,1,11,5,11,171,8,11,10,11,12,11,174,9,11,1,11,1,11,1,12,1,12,1,12,1, + 12,5,12,182,8,12,10,12,12,12,185,9,12,1,12,3,12,188,8,12,3,12,190,8,12, + 1,12,1,12,1,13,1,13,1,13,1,14,1,14,5,14,199,8,14,10,14,12,14,202,9,14,1, + 14,1,14,3,14,206,8,14,1,15,1,15,1,15,1,15,3,15,212,8,15,1,16,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,3,16,222,8,16,1,17,1,17,1,18,1,18,1,18,1,18,5, + 18,230,8,18,10,18,12,18,233,9,18,1,19,1,19,3,19,237,8,19,1,20,1,20,5,20, + 241,8,20,10,20,12,20,244,9,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1, + 21,1,21,4,21,256,8,21,11,21,12,21,257,1,21,1,21,1,21,1,22,1,22,1,22,1,22, + 1,22,3,22,268,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,3,23,277,8,23,1,23, + 1,23,1,24,1,24,1,24,1,24,1,24,3,24,286,8,24,1,24,1,24,1,25,1,25,1,25,1, + 26,1,26,1,26,1,26,1,26,1,26,1,26,3,26,300,8,26,1,27,1,27,1,27,3,27,305, + 8,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1, + 29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,31,1,31,3,31,333, + 8,31,1,32,1,32,1,33,1,33,3,33,339,8,33,1,34,1,34,1,34,1,34,5,34,345,8,34, + 10,34,12,34,348,9,34,1,34,3,34,351,8,34,3,34,353,8,34,1,34,1,34,1,35,1, + 35,1,35,1,36,1,36,1,36,1,36,5,36,364,8,36,10,36,12,36,367,9,36,1,36,3,36, + 370,8,36,3,36,372,8,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37, + 1,37,3,37,385,8,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, + 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,5,37, + 411,8,37,10,37,12,37,414,9,37,1,37,3,37,417,8,37,3,37,419,8,37,1,37,1,37, + 1,37,1,37,3,37,425,8,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37, 1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, - 37,1,37,1,37,1,37,1,37,5,37,459,8,37,10,37,12,37,462,9,37,1,38,1,38,1,39, - 1,39,1,39,1,39,1,39,3,39,471,8,39,1,40,1,40,3,40,475,8,40,1,41,1,41,1,42, - 1,42,1,42,0,1,74,43,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36, - 38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84, - 0,14,1,0,4,10,2,0,10,10,21,22,1,0,23,24,1,0,36,40,2,0,36,40,42,45,2,0,5, - 5,50,51,1,0,52,54,2,0,51,51,55,55,1,0,56,57,1,0,6,9,1,0,58,59,1,0,46,47, - 1,0,71,73,2,0,71,72,79,79,508,0,89,1,0,0,0,2,106,1,0,0,0,4,111,1,0,0,0, - 6,113,1,0,0,0,8,118,1,0,0,0,10,122,1,0,0,0,12,124,1,0,0,0,14,130,1,0,0, - 0,16,132,1,0,0,0,18,144,1,0,0,0,20,156,1,0,0,0,22,161,1,0,0,0,24,170,1, - 0,0,0,26,186,1,0,0,0,28,198,1,0,0,0,30,204,1,0,0,0,32,214,1,0,0,0,34,216, - 1,0,0,0,36,218,1,0,0,0,38,223,1,0,0,0,40,225,1,0,0,0,42,236,1,0,0,0,44, - 249,1,0,0,0,46,251,1,0,0,0,48,262,1,0,0,0,50,271,1,0,0,0,52,274,1,0,0,0, - 54,286,1,0,0,0,56,288,1,0,0,0,58,296,1,0,0,0,60,302,1,0,0,0,62,314,1,0, - 0,0,64,316,1,0,0,0,66,320,1,0,0,0,68,322,1,0,0,0,70,338,1,0,0,0,72,341, - 1,0,0,0,74,406,1,0,0,0,76,463,1,0,0,0,78,470,1,0,0,0,80,472,1,0,0,0,82, - 476,1,0,0,0,84,478,1,0,0,0,86,88,3,2,1,0,87,86,1,0,0,0,88,91,1,0,0,0,89, - 87,1,0,0,0,89,90,1,0,0,0,90,95,1,0,0,0,91,89,1,0,0,0,92,94,3,12,6,0,93, - 92,1,0,0,0,94,97,1,0,0,0,95,93,1,0,0,0,95,96,1,0,0,0,96,101,1,0,0,0,97, - 95,1,0,0,0,98,100,3,14,7,0,99,98,1,0,0,0,100,103,1,0,0,0,101,99,1,0,0,0, - 101,102,1,0,0,0,102,104,1,0,0,0,103,101,1,0,0,0,104,105,5,0,0,1,105,1,1, - 0,0,0,106,107,5,1,0,0,107,108,3,4,2,0,108,109,3,6,3,0,109,110,5,2,0,0,110, - 3,1,0,0,0,111,112,5,3,0,0,112,5,1,0,0,0,113,115,3,8,4,0,114,116,3,8,4,0, - 115,114,1,0,0,0,115,116,1,0,0,0,116,7,1,0,0,0,117,119,3,10,5,0,118,117, - 1,0,0,0,118,119,1,0,0,0,119,120,1,0,0,0,120,121,5,65,0,0,121,9,1,0,0,0, - 122,123,7,0,0,0,123,11,1,0,0,0,124,125,5,11,0,0,125,126,5,75,0,0,126,127, - 5,2,0,0,127,13,1,0,0,0,128,131,3,16,8,0,129,131,3,18,9,0,130,128,1,0,0, - 0,130,129,1,0,0,0,131,15,1,0,0,0,132,133,5,12,0,0,133,134,5,81,0,0,134, - 140,3,24,12,0,135,136,5,13,0,0,136,137,5,14,0,0,137,138,3,82,41,0,138,139, - 5,15,0,0,139,141,1,0,0,0,140,135,1,0,0,0,140,141,1,0,0,0,141,142,1,0,0, - 0,142,143,3,22,11,0,143,17,1,0,0,0,144,145,5,16,0,0,145,146,5,81,0,0,146, - 147,3,24,12,0,147,151,5,17,0,0,148,150,3,20,10,0,149,148,1,0,0,0,150,153, - 1,0,0,0,151,149,1,0,0,0,151,152,1,0,0,0,152,154,1,0,0,0,153,151,1,0,0,0, - 154,155,5,18,0,0,155,19,1,0,0,0,156,157,5,12,0,0,157,158,5,81,0,0,158,159, - 3,24,12,0,159,160,3,22,11,0,160,21,1,0,0,0,161,165,5,17,0,0,162,164,3,30, - 15,0,163,162,1,0,0,0,164,167,1,0,0,0,165,163,1,0,0,0,165,166,1,0,0,0,166, - 168,1,0,0,0,167,165,1,0,0,0,168,169,5,18,0,0,169,23,1,0,0,0,170,182,5,14, - 0,0,171,176,3,26,13,0,172,173,5,19,0,0,173,175,3,26,13,0,174,172,1,0,0, - 0,175,178,1,0,0,0,176,174,1,0,0,0,176,177,1,0,0,0,177,180,1,0,0,0,178,176, - 1,0,0,0,179,181,5,19,0,0,180,179,1,0,0,0,180,181,1,0,0,0,181,183,1,0,0, - 0,182,171,1,0,0,0,182,183,1,0,0,0,183,184,1,0,0,0,184,185,5,15,0,0,185, - 25,1,0,0,0,186,187,3,82,41,0,187,188,5,81,0,0,188,27,1,0,0,0,189,193,5, - 17,0,0,190,192,3,30,15,0,191,190,1,0,0,0,192,195,1,0,0,0,193,191,1,0,0, - 0,193,194,1,0,0,0,194,196,1,0,0,0,195,193,1,0,0,0,196,199,5,18,0,0,197, - 199,3,30,15,0,198,189,1,0,0,0,198,197,1,0,0,0,199,29,1,0,0,0,200,205,3, - 38,19,0,201,202,3,32,16,0,202,203,5,2,0,0,203,205,1,0,0,0,204,200,1,0,0, - 0,204,201,1,0,0,0,205,31,1,0,0,0,206,215,3,40,20,0,207,215,3,42,21,0,208, - 215,3,44,22,0,209,215,3,46,23,0,210,215,3,48,24,0,211,215,3,34,17,0,212, - 215,3,50,25,0,213,215,3,36,18,0,214,206,1,0,0,0,214,207,1,0,0,0,214,208, - 1,0,0,0,214,209,1,0,0,0,214,210,1,0,0,0,214,211,1,0,0,0,214,212,1,0,0,0, - 214,213,1,0,0,0,215,33,1,0,0,0,216,217,3,70,35,0,217,35,1,0,0,0,218,219, - 5,20,0,0,219,220,3,74,37,0,220,37,1,0,0,0,221,224,3,52,26,0,222,224,3,54, - 27,0,223,221,1,0,0,0,223,222,1,0,0,0,224,39,1,0,0,0,225,229,3,82,41,0,226, - 228,3,76,38,0,227,226,1,0,0,0,228,231,1,0,0,0,229,227,1,0,0,0,229,230,1, - 0,0,0,230,232,1,0,0,0,231,229,1,0,0,0,232,233,5,81,0,0,233,234,5,10,0,0, - 234,235,3,74,37,0,235,41,1,0,0,0,236,237,3,82,41,0,237,238,5,81,0,0,238, - 239,5,19,0,0,239,240,3,82,41,0,240,241,5,81,0,0,241,242,5,10,0,0,242,243, - 3,74,37,0,243,43,1,0,0,0,244,245,5,81,0,0,245,246,7,1,0,0,246,250,3,74, - 37,0,247,248,5,81,0,0,248,250,7,2,0,0,249,244,1,0,0,0,249,247,1,0,0,0,250, - 45,1,0,0,0,251,252,5,25,0,0,252,253,5,14,0,0,253,254,5,78,0,0,254,255,5, - 6,0,0,255,258,3,74,37,0,256,257,5,19,0,0,257,259,3,64,32,0,258,256,1,0, - 0,0,258,259,1,0,0,0,259,260,1,0,0,0,260,261,5,15,0,0,261,47,1,0,0,0,262, - 263,5,25,0,0,263,264,5,14,0,0,264,267,3,74,37,0,265,266,5,19,0,0,266,268, - 3,64,32,0,267,265,1,0,0,0,267,268,1,0,0,0,268,269,1,0,0,0,269,270,5,15, - 0,0,270,49,1,0,0,0,271,272,5,26,0,0,272,273,3,68,34,0,273,51,1,0,0,0,274, - 275,5,27,0,0,275,276,5,14,0,0,276,277,3,74,37,0,277,278,5,15,0,0,278,281, - 3,28,14,0,279,280,5,28,0,0,280,282,3,28,14,0,281,279,1,0,0,0,281,282,1, - 0,0,0,282,53,1,0,0,0,283,287,3,56,28,0,284,287,3,58,29,0,285,287,3,60,30, - 0,286,283,1,0,0,0,286,284,1,0,0,0,286,285,1,0,0,0,287,55,1,0,0,0,288,289, - 5,29,0,0,289,290,3,28,14,0,290,291,5,30,0,0,291,292,5,14,0,0,292,293,3, - 74,37,0,293,294,5,15,0,0,294,295,5,2,0,0,295,57,1,0,0,0,296,297,5,30,0, - 0,297,298,5,14,0,0,298,299,3,74,37,0,299,300,5,15,0,0,300,301,3,28,14,0, - 301,59,1,0,0,0,302,303,5,31,0,0,303,304,5,14,0,0,304,305,3,62,31,0,305, - 306,5,2,0,0,306,307,3,74,37,0,307,308,5,2,0,0,308,309,3,44,22,0,309,310, - 5,15,0,0,310,311,3,28,14,0,311,61,1,0,0,0,312,315,3,40,20,0,313,315,3,44, - 22,0,314,312,1,0,0,0,314,313,1,0,0,0,315,63,1,0,0,0,316,317,5,75,0,0,317, - 65,1,0,0,0,318,321,5,81,0,0,319,321,3,78,39,0,320,318,1,0,0,0,320,319,1, - 0,0,0,321,67,1,0,0,0,322,334,5,14,0,0,323,328,3,66,33,0,324,325,5,19,0, - 0,325,327,3,66,33,0,326,324,1,0,0,0,327,330,1,0,0,0,328,326,1,0,0,0,328, - 329,1,0,0,0,329,332,1,0,0,0,330,328,1,0,0,0,331,333,5,19,0,0,332,331,1, - 0,0,0,332,333,1,0,0,0,333,335,1,0,0,0,334,323,1,0,0,0,334,335,1,0,0,0,335, - 336,1,0,0,0,336,337,5,15,0,0,337,69,1,0,0,0,338,339,5,81,0,0,339,340,3, - 72,36,0,340,71,1,0,0,0,341,353,5,14,0,0,342,347,3,74,37,0,343,344,5,19, - 0,0,344,346,3,74,37,0,345,343,1,0,0,0,346,349,1,0,0,0,347,345,1,0,0,0,347, - 348,1,0,0,0,348,351,1,0,0,0,349,347,1,0,0,0,350,352,5,19,0,0,351,350,1, - 0,0,0,351,352,1,0,0,0,352,354,1,0,0,0,353,342,1,0,0,0,353,354,1,0,0,0,354, - 355,1,0,0,0,355,356,5,15,0,0,356,73,1,0,0,0,357,358,6,37,-1,0,358,359,5, - 14,0,0,359,360,3,74,37,0,360,361,5,15,0,0,361,407,1,0,0,0,362,363,3,84, - 42,0,363,364,5,14,0,0,364,366,3,74,37,0,365,367,5,19,0,0,366,365,1,0,0, - 0,366,367,1,0,0,0,367,368,1,0,0,0,368,369,5,15,0,0,369,407,1,0,0,0,370, - 407,3,70,35,0,371,372,5,32,0,0,372,373,5,81,0,0,373,407,3,72,36,0,374,375, - 5,35,0,0,375,376,5,33,0,0,376,377,3,74,37,0,377,378,5,34,0,0,378,379,7, - 3,0,0,379,407,1,0,0,0,380,381,5,41,0,0,381,382,5,33,0,0,382,383,3,74,37, - 0,383,384,5,34,0,0,384,385,7,4,0,0,385,407,1,0,0,0,386,387,7,5,0,0,387, - 407,3,74,37,15,388,400,5,33,0,0,389,394,3,74,37,0,390,391,5,19,0,0,391, - 393,3,74,37,0,392,390,1,0,0,0,393,396,1,0,0,0,394,392,1,0,0,0,394,395,1, - 0,0,0,395,398,1,0,0,0,396,394,1,0,0,0,397,399,5,19,0,0,398,397,1,0,0,0, - 398,399,1,0,0,0,399,401,1,0,0,0,400,389,1,0,0,0,400,401,1,0,0,0,401,402, - 1,0,0,0,402,407,5,34,0,0,403,407,5,80,0,0,404,407,5,81,0,0,405,407,3,78, - 39,0,406,357,1,0,0,0,406,362,1,0,0,0,406,370,1,0,0,0,406,371,1,0,0,0,406, - 374,1,0,0,0,406,380,1,0,0,0,406,386,1,0,0,0,406,388,1,0,0,0,406,403,1,0, - 0,0,406,404,1,0,0,0,406,405,1,0,0,0,407,460,1,0,0,0,408,409,10,14,0,0,409, - 410,7,6,0,0,410,459,3,74,37,15,411,412,10,13,0,0,412,413,7,7,0,0,413,459, - 3,74,37,14,414,415,10,12,0,0,415,416,7,8,0,0,416,459,3,74,37,13,417,418, - 10,11,0,0,418,419,7,9,0,0,419,459,3,74,37,12,420,421,10,10,0,0,421,422, - 7,10,0,0,422,459,3,74,37,11,423,424,10,9,0,0,424,425,5,60,0,0,425,459,3, - 74,37,10,426,427,10,8,0,0,427,428,5,4,0,0,428,459,3,74,37,9,429,430,10, - 7,0,0,430,431,5,61,0,0,431,459,3,74,37,8,432,433,10,6,0,0,433,434,5,62, - 0,0,434,459,3,74,37,7,435,436,10,5,0,0,436,437,5,63,0,0,437,459,3,74,37, - 6,438,439,10,21,0,0,439,440,5,33,0,0,440,441,5,68,0,0,441,459,5,34,0,0, - 442,443,10,18,0,0,443,459,7,11,0,0,444,445,10,17,0,0,445,446,5,48,0,0,446, - 447,5,14,0,0,447,448,3,74,37,0,448,449,5,15,0,0,449,459,1,0,0,0,450,451, - 10,16,0,0,451,452,5,49,0,0,452,453,5,14,0,0,453,454,3,74,37,0,454,455,5, - 19,0,0,455,456,3,74,37,0,456,457,5,15,0,0,457,459,1,0,0,0,458,408,1,0,0, - 0,458,411,1,0,0,0,458,414,1,0,0,0,458,417,1,0,0,0,458,420,1,0,0,0,458,423, - 1,0,0,0,458,426,1,0,0,0,458,429,1,0,0,0,458,432,1,0,0,0,458,435,1,0,0,0, - 458,438,1,0,0,0,458,442,1,0,0,0,458,444,1,0,0,0,458,450,1,0,0,0,459,462, - 1,0,0,0,460,458,1,0,0,0,460,461,1,0,0,0,461,75,1,0,0,0,462,460,1,0,0,0, - 463,464,5,64,0,0,464,77,1,0,0,0,465,471,5,66,0,0,466,471,3,80,40,0,467, - 471,5,75,0,0,468,471,5,76,0,0,469,471,5,77,0,0,470,465,1,0,0,0,470,466, - 1,0,0,0,470,467,1,0,0,0,470,468,1,0,0,0,470,469,1,0,0,0,471,79,1,0,0,0, - 472,474,5,68,0,0,473,475,5,67,0,0,474,473,1,0,0,0,474,475,1,0,0,0,475,81, - 1,0,0,0,476,477,7,12,0,0,477,83,1,0,0,0,478,479,7,13,0,0,479,85,1,0,0,0, - 40,89,95,101,115,118,130,140,151,165,176,180,182,193,198,204,214,223,229, - 249,258,267,281,286,314,320,328,332,334,347,351,353,366,394,398,400,406, - 458,460,470,474]; + 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,5,37,477,8,37, + 10,37,12,37,480,9,37,1,38,1,38,1,39,1,39,1,39,1,39,1,39,3,39,489,8,39,1, + 40,1,40,3,40,493,8,40,1,41,1,41,1,42,1,42,1,42,0,1,74,43,0,2,4,6,8,10,12, + 14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60, + 62,64,66,68,70,72,74,76,78,80,82,84,0,14,1,0,4,10,2,0,10,10,21,22,1,0,23, + 24,1,0,36,40,2,0,36,40,42,45,2,0,5,5,50,51,1,0,52,54,2,0,51,51,55,55,1, + 0,56,57,1,0,6,9,1,0,58,59,1,0,46,47,1,0,71,73,2,0,71,72,79,79,529,0,89, + 1,0,0,0,2,106,1,0,0,0,4,111,1,0,0,0,6,113,1,0,0,0,8,118,1,0,0,0,10,122, + 1,0,0,0,12,124,1,0,0,0,14,130,1,0,0,0,16,132,1,0,0,0,18,151,1,0,0,0,20, + 163,1,0,0,0,22,168,1,0,0,0,24,177,1,0,0,0,26,193,1,0,0,0,28,205,1,0,0,0, + 30,211,1,0,0,0,32,221,1,0,0,0,34,223,1,0,0,0,36,225,1,0,0,0,38,236,1,0, + 0,0,40,238,1,0,0,0,42,249,1,0,0,0,44,267,1,0,0,0,46,269,1,0,0,0,48,280, + 1,0,0,0,50,289,1,0,0,0,52,292,1,0,0,0,54,304,1,0,0,0,56,306,1,0,0,0,58, + 314,1,0,0,0,60,320,1,0,0,0,62,332,1,0,0,0,64,334,1,0,0,0,66,338,1,0,0,0, + 68,340,1,0,0,0,70,356,1,0,0,0,72,359,1,0,0,0,74,424,1,0,0,0,76,481,1,0, + 0,0,78,488,1,0,0,0,80,490,1,0,0,0,82,494,1,0,0,0,84,496,1,0,0,0,86,88,3, + 2,1,0,87,86,1,0,0,0,88,91,1,0,0,0,89,87,1,0,0,0,89,90,1,0,0,0,90,95,1,0, + 0,0,91,89,1,0,0,0,92,94,3,12,6,0,93,92,1,0,0,0,94,97,1,0,0,0,95,93,1,0, + 0,0,95,96,1,0,0,0,96,101,1,0,0,0,97,95,1,0,0,0,98,100,3,14,7,0,99,98,1, + 0,0,0,100,103,1,0,0,0,101,99,1,0,0,0,101,102,1,0,0,0,102,104,1,0,0,0,103, + 101,1,0,0,0,104,105,5,0,0,1,105,1,1,0,0,0,106,107,5,1,0,0,107,108,3,4,2, + 0,108,109,3,6,3,0,109,110,5,2,0,0,110,3,1,0,0,0,111,112,5,3,0,0,112,5,1, + 0,0,0,113,115,3,8,4,0,114,116,3,8,4,0,115,114,1,0,0,0,115,116,1,0,0,0,116, + 7,1,0,0,0,117,119,3,10,5,0,118,117,1,0,0,0,118,119,1,0,0,0,119,120,1,0, + 0,0,120,121,5,65,0,0,121,9,1,0,0,0,122,123,7,0,0,0,123,11,1,0,0,0,124,125, + 5,11,0,0,125,126,5,75,0,0,126,127,5,2,0,0,127,13,1,0,0,0,128,131,3,16,8, + 0,129,131,3,18,9,0,130,128,1,0,0,0,130,129,1,0,0,0,131,15,1,0,0,0,132,133, + 5,12,0,0,133,134,5,81,0,0,134,147,3,24,12,0,135,136,5,13,0,0,136,137,5, + 14,0,0,137,142,3,82,41,0,138,139,5,15,0,0,139,141,3,82,41,0,140,138,1,0, + 0,0,141,144,1,0,0,0,142,140,1,0,0,0,142,143,1,0,0,0,143,145,1,0,0,0,144, + 142,1,0,0,0,145,146,5,16,0,0,146,148,1,0,0,0,147,135,1,0,0,0,147,148,1, + 0,0,0,148,149,1,0,0,0,149,150,3,22,11,0,150,17,1,0,0,0,151,152,5,17,0,0, + 152,153,5,81,0,0,153,154,3,24,12,0,154,158,5,18,0,0,155,157,3,20,10,0,156, + 155,1,0,0,0,157,160,1,0,0,0,158,156,1,0,0,0,158,159,1,0,0,0,159,161,1,0, + 0,0,160,158,1,0,0,0,161,162,5,19,0,0,162,19,1,0,0,0,163,164,5,12,0,0,164, + 165,5,81,0,0,165,166,3,24,12,0,166,167,3,22,11,0,167,21,1,0,0,0,168,172, + 5,18,0,0,169,171,3,30,15,0,170,169,1,0,0,0,171,174,1,0,0,0,172,170,1,0, + 0,0,172,173,1,0,0,0,173,175,1,0,0,0,174,172,1,0,0,0,175,176,5,19,0,0,176, + 23,1,0,0,0,177,189,5,14,0,0,178,183,3,26,13,0,179,180,5,15,0,0,180,182, + 3,26,13,0,181,179,1,0,0,0,182,185,1,0,0,0,183,181,1,0,0,0,183,184,1,0,0, + 0,184,187,1,0,0,0,185,183,1,0,0,0,186,188,5,15,0,0,187,186,1,0,0,0,187, + 188,1,0,0,0,188,190,1,0,0,0,189,178,1,0,0,0,189,190,1,0,0,0,190,191,1,0, + 0,0,191,192,5,16,0,0,192,25,1,0,0,0,193,194,3,82,41,0,194,195,5,81,0,0, + 195,27,1,0,0,0,196,200,5,18,0,0,197,199,3,30,15,0,198,197,1,0,0,0,199,202, + 1,0,0,0,200,198,1,0,0,0,200,201,1,0,0,0,201,203,1,0,0,0,202,200,1,0,0,0, + 203,206,5,19,0,0,204,206,3,30,15,0,205,196,1,0,0,0,205,204,1,0,0,0,206, + 29,1,0,0,0,207,212,3,38,19,0,208,209,3,32,16,0,209,210,5,2,0,0,210,212, + 1,0,0,0,211,207,1,0,0,0,211,208,1,0,0,0,212,31,1,0,0,0,213,222,3,40,20, + 0,214,222,3,42,21,0,215,222,3,44,22,0,216,222,3,46,23,0,217,222,3,48,24, + 0,218,222,3,34,17,0,219,222,3,50,25,0,220,222,3,36,18,0,221,213,1,0,0,0, + 221,214,1,0,0,0,221,215,1,0,0,0,221,216,1,0,0,0,221,217,1,0,0,0,221,218, + 1,0,0,0,221,219,1,0,0,0,221,220,1,0,0,0,222,33,1,0,0,0,223,224,3,70,35, + 0,224,35,1,0,0,0,225,226,5,20,0,0,226,231,3,74,37,0,227,228,5,15,0,0,228, + 230,3,74,37,0,229,227,1,0,0,0,230,233,1,0,0,0,231,229,1,0,0,0,231,232,1, + 0,0,0,232,37,1,0,0,0,233,231,1,0,0,0,234,237,3,52,26,0,235,237,3,54,27, + 0,236,234,1,0,0,0,236,235,1,0,0,0,237,39,1,0,0,0,238,242,3,82,41,0,239, + 241,3,76,38,0,240,239,1,0,0,0,241,244,1,0,0,0,242,240,1,0,0,0,242,243,1, + 0,0,0,243,245,1,0,0,0,244,242,1,0,0,0,245,246,5,81,0,0,246,247,5,10,0,0, + 247,248,3,74,37,0,248,41,1,0,0,0,249,250,3,82,41,0,250,255,5,81,0,0,251, + 252,5,15,0,0,252,253,3,82,41,0,253,254,5,81,0,0,254,256,1,0,0,0,255,251, + 1,0,0,0,256,257,1,0,0,0,257,255,1,0,0,0,257,258,1,0,0,0,258,259,1,0,0,0, + 259,260,5,10,0,0,260,261,3,74,37,0,261,43,1,0,0,0,262,263,5,81,0,0,263, + 264,7,1,0,0,264,268,3,74,37,0,265,266,5,81,0,0,266,268,7,2,0,0,267,262, + 1,0,0,0,267,265,1,0,0,0,268,45,1,0,0,0,269,270,5,25,0,0,270,271,5,14,0, + 0,271,272,5,78,0,0,272,273,5,6,0,0,273,276,3,74,37,0,274,275,5,15,0,0,275, + 277,3,64,32,0,276,274,1,0,0,0,276,277,1,0,0,0,277,278,1,0,0,0,278,279,5, + 16,0,0,279,47,1,0,0,0,280,281,5,25,0,0,281,282,5,14,0,0,282,285,3,74,37, + 0,283,284,5,15,0,0,284,286,3,64,32,0,285,283,1,0,0,0,285,286,1,0,0,0,286, + 287,1,0,0,0,287,288,5,16,0,0,288,49,1,0,0,0,289,290,5,26,0,0,290,291,3, + 68,34,0,291,51,1,0,0,0,292,293,5,27,0,0,293,294,5,14,0,0,294,295,3,74,37, + 0,295,296,5,16,0,0,296,299,3,28,14,0,297,298,5,28,0,0,298,300,3,28,14,0, + 299,297,1,0,0,0,299,300,1,0,0,0,300,53,1,0,0,0,301,305,3,56,28,0,302,305, + 3,58,29,0,303,305,3,60,30,0,304,301,1,0,0,0,304,302,1,0,0,0,304,303,1,0, + 0,0,305,55,1,0,0,0,306,307,5,29,0,0,307,308,3,28,14,0,308,309,5,30,0,0, + 309,310,5,14,0,0,310,311,3,74,37,0,311,312,5,16,0,0,312,313,5,2,0,0,313, + 57,1,0,0,0,314,315,5,30,0,0,315,316,5,14,0,0,316,317,3,74,37,0,317,318, + 5,16,0,0,318,319,3,28,14,0,319,59,1,0,0,0,320,321,5,31,0,0,321,322,5,14, + 0,0,322,323,3,62,31,0,323,324,5,2,0,0,324,325,3,74,37,0,325,326,5,2,0,0, + 326,327,3,44,22,0,327,328,5,16,0,0,328,329,3,28,14,0,329,61,1,0,0,0,330, + 333,3,40,20,0,331,333,3,44,22,0,332,330,1,0,0,0,332,331,1,0,0,0,333,63, + 1,0,0,0,334,335,5,75,0,0,335,65,1,0,0,0,336,339,5,81,0,0,337,339,3,78,39, + 0,338,336,1,0,0,0,338,337,1,0,0,0,339,67,1,0,0,0,340,352,5,14,0,0,341,346, + 3,66,33,0,342,343,5,15,0,0,343,345,3,66,33,0,344,342,1,0,0,0,345,348,1, + 0,0,0,346,344,1,0,0,0,346,347,1,0,0,0,347,350,1,0,0,0,348,346,1,0,0,0,349, + 351,5,15,0,0,350,349,1,0,0,0,350,351,1,0,0,0,351,353,1,0,0,0,352,341,1, + 0,0,0,352,353,1,0,0,0,353,354,1,0,0,0,354,355,5,16,0,0,355,69,1,0,0,0,356, + 357,5,81,0,0,357,358,3,72,36,0,358,71,1,0,0,0,359,371,5,14,0,0,360,365, + 3,74,37,0,361,362,5,15,0,0,362,364,3,74,37,0,363,361,1,0,0,0,364,367,1, + 0,0,0,365,363,1,0,0,0,365,366,1,0,0,0,366,369,1,0,0,0,367,365,1,0,0,0,368, + 370,5,15,0,0,369,368,1,0,0,0,369,370,1,0,0,0,370,372,1,0,0,0,371,360,1, + 0,0,0,371,372,1,0,0,0,372,373,1,0,0,0,373,374,5,16,0,0,374,73,1,0,0,0,375, + 376,6,37,-1,0,376,377,5,14,0,0,377,378,3,74,37,0,378,379,5,16,0,0,379,425, + 1,0,0,0,380,381,3,84,42,0,381,382,5,14,0,0,382,384,3,74,37,0,383,385,5, + 15,0,0,384,383,1,0,0,0,384,385,1,0,0,0,385,386,1,0,0,0,386,387,5,16,0,0, + 387,425,1,0,0,0,388,425,3,70,35,0,389,390,5,32,0,0,390,391,5,81,0,0,391, + 425,3,72,36,0,392,393,5,35,0,0,393,394,5,33,0,0,394,395,3,74,37,0,395,396, + 5,34,0,0,396,397,7,3,0,0,397,425,1,0,0,0,398,399,5,41,0,0,399,400,5,33, + 0,0,400,401,3,74,37,0,401,402,5,34,0,0,402,403,7,4,0,0,403,425,1,0,0,0, + 404,405,7,5,0,0,405,425,3,74,37,15,406,418,5,33,0,0,407,412,3,74,37,0,408, + 409,5,15,0,0,409,411,3,74,37,0,410,408,1,0,0,0,411,414,1,0,0,0,412,410, + 1,0,0,0,412,413,1,0,0,0,413,416,1,0,0,0,414,412,1,0,0,0,415,417,5,15,0, + 0,416,415,1,0,0,0,416,417,1,0,0,0,417,419,1,0,0,0,418,407,1,0,0,0,418,419, + 1,0,0,0,419,420,1,0,0,0,420,425,5,34,0,0,421,425,5,80,0,0,422,425,5,81, + 0,0,423,425,3,78,39,0,424,375,1,0,0,0,424,380,1,0,0,0,424,388,1,0,0,0,424, + 389,1,0,0,0,424,392,1,0,0,0,424,398,1,0,0,0,424,404,1,0,0,0,424,406,1,0, + 0,0,424,421,1,0,0,0,424,422,1,0,0,0,424,423,1,0,0,0,425,478,1,0,0,0,426, + 427,10,14,0,0,427,428,7,6,0,0,428,477,3,74,37,15,429,430,10,13,0,0,430, + 431,7,7,0,0,431,477,3,74,37,14,432,433,10,12,0,0,433,434,7,8,0,0,434,477, + 3,74,37,13,435,436,10,11,0,0,436,437,7,9,0,0,437,477,3,74,37,12,438,439, + 10,10,0,0,439,440,7,10,0,0,440,477,3,74,37,11,441,442,10,9,0,0,442,443, + 5,60,0,0,443,477,3,74,37,10,444,445,10,8,0,0,445,446,5,4,0,0,446,477,3, + 74,37,9,447,448,10,7,0,0,448,449,5,61,0,0,449,477,3,74,37,8,450,451,10, + 6,0,0,451,452,5,62,0,0,452,477,3,74,37,7,453,454,10,5,0,0,454,455,5,63, + 0,0,455,477,3,74,37,6,456,457,10,21,0,0,457,458,5,33,0,0,458,459,5,68,0, + 0,459,477,5,34,0,0,460,461,10,18,0,0,461,477,7,11,0,0,462,463,10,17,0,0, + 463,464,5,48,0,0,464,465,5,14,0,0,465,466,3,74,37,0,466,467,5,16,0,0,467, + 477,1,0,0,0,468,469,10,16,0,0,469,470,5,49,0,0,470,471,5,14,0,0,471,472, + 3,74,37,0,472,473,5,15,0,0,473,474,3,74,37,0,474,475,5,16,0,0,475,477,1, + 0,0,0,476,426,1,0,0,0,476,429,1,0,0,0,476,432,1,0,0,0,476,435,1,0,0,0,476, + 438,1,0,0,0,476,441,1,0,0,0,476,444,1,0,0,0,476,447,1,0,0,0,476,450,1,0, + 0,0,476,453,1,0,0,0,476,456,1,0,0,0,476,460,1,0,0,0,476,462,1,0,0,0,476, + 468,1,0,0,0,477,480,1,0,0,0,478,476,1,0,0,0,478,479,1,0,0,0,479,75,1,0, + 0,0,480,478,1,0,0,0,481,482,5,64,0,0,482,77,1,0,0,0,483,489,5,66,0,0,484, + 489,3,80,40,0,485,489,5,75,0,0,486,489,5,76,0,0,487,489,5,77,0,0,488,483, + 1,0,0,0,488,484,1,0,0,0,488,485,1,0,0,0,488,486,1,0,0,0,488,487,1,0,0,0, + 489,79,1,0,0,0,490,492,5,68,0,0,491,493,5,67,0,0,492,491,1,0,0,0,492,493, + 1,0,0,0,493,81,1,0,0,0,494,495,7,12,0,0,495,83,1,0,0,0,496,497,7,13,0,0, + 497,85,1,0,0,0,43,89,95,101,115,118,130,142,147,158,172,183,187,189,200, + 205,211,221,231,236,242,257,267,276,285,299,304,332,338,346,350,352,365, + 369,371,384,412,416,418,424,476,478,488,492]; private static __ATN: ATN; public static get _ATN(): ATN { @@ -3013,8 +3065,11 @@ export class GlobalFunctionDefinitionContext extends ParserRuleContext { public functionBody(): FunctionBodyContext { return this.getTypedRuleContext(FunctionBodyContext, 0) as FunctionBodyContext; } - public typeName(): TypeNameContext { - return this.getTypedRuleContext(TypeNameContext, 0) as TypeNameContext; + public typeName_list(): TypeNameContext[] { + return this.getTypedRuleContexts(TypeNameContext) as TypeNameContext[]; + } + public typeName(i: number): TypeNameContext { + return this.getTypedRuleContext(TypeNameContext, i) as TypeNameContext; } public get ruleIndex(): number { return CashScriptParser.RULE_globalFunctionDefinition; @@ -3284,8 +3339,11 @@ export class ReturnStatementContext extends ParserRuleContext { super(parent, invokingState); this.parser = parser; } - public expression(): ExpressionContext { - return this.getTypedRuleContext(ExpressionContext, 0) as ExpressionContext; + public expression_list(): ExpressionContext[] { + return this.getTypedRuleContexts(ExpressionContext) as ExpressionContext[]; + } + public expression(i: number): ExpressionContext { + return this.getTypedRuleContext(ExpressionContext, i) as ExpressionContext; } public get ruleIndex(): number { return CashScriptParser.RULE_returnStatement; @@ -3789,7 +3847,7 @@ export class ExpressionContext extends ParserRuleContext { public get ruleIndex(): number { return CashScriptParser.RULE_expression; } - public copyFrom(ctx: ExpressionContext): void { + public override copyFrom(ctx: ExpressionContext): void { super.copyFrom(ctx); } } diff --git a/packages/cashc/src/grammar/CashScriptVisitor.ts b/packages/cashc/src/grammar/CashScriptVisitor.ts index 6b47aa00..9070d84f 100644 --- a/packages/cashc/src/grammar/CashScriptVisitor.ts +++ b/packages/cashc/src/grammar/CashScriptVisitor.ts @@ -1,4 +1,4 @@ -// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.1 +// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.2 import {ParseTreeVisitor} from 'antlr4'; diff --git a/packages/cashc/src/print/OutputSourceCodeTraversal.ts b/packages/cashc/src/print/OutputSourceCodeTraversal.ts index 7f703f8a..715fb32b 100644 --- a/packages/cashc/src/print/OutputSourceCodeTraversal.ts +++ b/packages/cashc/src/print/OutputSourceCodeTraversal.ts @@ -36,6 +36,7 @@ import { WhileNode, ForNode, NonControlStatementNode, + ExpressionNode, } from '../ast/AST.js'; import AstTraversal from '../ast/AstTraversal.js'; @@ -96,7 +97,7 @@ export default class OutputSourceCodeTraversal extends AstTraversal { this.addOutput(`function ${node.name}(`, true); node.parameters = this.visitCommaList(node.parameters) as ParameterNode[]; this.addOutput(')'); - if (node.returnType) this.addOutput(` returns (${node.returnType})`); + if (node.returnTypes) this.addOutput(` returns (${node.returnTypes.join(', ')})`); this.outputSymbolTable(node.symbolTable); this.addOutput(' '); @@ -129,7 +130,8 @@ export default class OutputSourceCodeTraversal extends AstTraversal { } visitTupleAssignment(node: TupleAssignmentNode): Node { - this.addOutput(`${node.left.type} ${node.left.name}, ${node.right.type} ${node.right.name} = `, true); + const targets = node.targets.map((target) => `${target.type} ${target.name}`).join(', '); + this.addOutput(`${targets} = `, true); this.visit(node.tuple); return node; @@ -166,7 +168,7 @@ export default class OutputSourceCodeTraversal extends AstTraversal { visitReturn(node: ReturnNode): Node { this.addOutput('return ', true); - node.expression = this.visit(node.expression); + node.expressions = this.visitCommaList(node.expressions) as ExpressionNode[]; return node; } diff --git a/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts b/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts index e5d9115f..50ef9dcf 100644 --- a/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts +++ b/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts @@ -46,7 +46,7 @@ export default class EnsureFinalRequireTraversal extends AstTraversal { if (node.kind === FunctionKind.CONTRACT) { ensureFinalStatementIsRequire(node.body); - } else if (node.returnType !== undefined) { + } else if (node.returnTypes !== undefined) { ensureSingleTailReturn(node.body); } diff --git a/packages/cashc/src/semantic/SymbolTableTraversal.ts b/packages/cashc/src/semantic/SymbolTableTraversal.ts index 41b49cd4..fbbc662c 100644 --- a/packages/cashc/src/semantic/SymbolTableTraversal.ts +++ b/packages/cashc/src/semantic/SymbolTableTraversal.ts @@ -17,6 +17,7 @@ import { ConsoleStatementNode, ConsoleParameterNode, ForNode, + TupleAssignmentTarget, } from '../ast/AST.js'; import AstTraversal from '../ast/AstTraversal.js'; import { SymbolTable, Symbol, SymbolType } from '../ast/SymbolTable.js'; @@ -166,7 +167,7 @@ export default class SymbolTableTraversal extends AstTraversal { } visitTupleAssignment(node: TupleAssignmentNode): Node { - [node.left, node.right].forEach((variable) => { + node.targets.forEach((variable) => { const definition = createTupleVariableDefinition(node, variable); const { name } = variable; @@ -231,7 +232,7 @@ export default class SymbolTableTraversal extends AstTraversal { function createTupleVariableDefinition( node: TupleAssignmentNode, - variable: TupleAssignmentNode['left'], + variable: TupleAssignmentTarget, ): VariableDefinitionNode { const definition = new VariableDefinitionNode(variable.type, [], variable.name, node.tuple); definition.location = node.location; diff --git a/packages/cashc/src/semantic/TypeCheckTraversal.ts b/packages/cashc/src/semantic/TypeCheckTraversal.ts index 4c5d120c..37155ab7 100644 --- a/packages/cashc/src/semantic/TypeCheckTraversal.ts +++ b/packages/cashc/src/semantic/TypeCheckTraversal.ts @@ -49,7 +49,6 @@ import { AssignTypeError, ArrayElementError, IndexOutOfBoundsError, - TupleAssignmentError, BitshiftBitcountNegativeError, UnusedFunctionReturnError, ReturnTypeError, @@ -57,10 +56,10 @@ import { import { BinaryOperator, NullaryOperator, UnaryOperator } from '../ast/Operator.js'; import { GlobalFunction } from '../ast/Globals.js'; import { Symbol } from '../ast/SymbolTable.js'; -import { resultingTypeForBinaryOp } from '../utils.js'; +import { functionReturnType, resultingTypeForBinaryOp } from '../utils.js'; export default class TypeCheckTraversal extends AstTraversal { - private currentFunctionReturnType: Type = PrimitiveType.VOID; + private currentFunctionReturnTypes: Type[] = []; visitVariableDefinition(node: VariableDefinitionNode): Node { node.expression = this.visit(node.expression); @@ -70,17 +69,15 @@ export default class TypeCheckTraversal extends AstTraversal { visitTupleAssignment(node: TupleAssignmentNode): Node { node.tuple = this.visit(node.tuple); - if (!(node.tuple instanceof BinaryOpNode) || node.tuple.operator !== BinaryOperator.SPLIT) { - throw new TupleAssignmentError(node.tuple); - } - const assignmentType = new TupleType(node.left.type, node.right.type); - - if (!implicitlyCastable(node.tuple.type, assignmentType)) { - const syntheticAssignment = new VariableDefinitionNode(assignmentType, [], node.left.name, node.tuple); + const targetsType = new TupleType(node.targets.map((target) => target.type)); + if (!implicitlyCastable(node.tuple.type, targetsType)) { + const targetNames = node.targets.map((target) => target.name).join(', '); + const syntheticAssignment = new VariableDefinitionNode(targetsType, [], targetNames, node.tuple); syntheticAssignment.location = node.location; throw new AssignTypeError(syntheticAssignment); } + return node; } @@ -195,17 +192,26 @@ export default class TypeCheckTraversal extends AstTraversal { } visitFunctionDefinition(node: FunctionDefinitionNode): Node { - this.currentFunctionReturnType = node.returnType ?? PrimitiveType.VOID; + this.currentFunctionReturnTypes = node.returnTypes ?? []; node.parameters = this.visitList(node.parameters) as ParameterNode[]; node.body = this.visit(node.body) as BlockNode; return node; } visitReturn(node: ReturnNode): Node { - node.expression = this.visit(node.expression); - if (!implicitlyCastable(node.expression.type, this.currentFunctionReturnType)) { - throw new ReturnTypeError(node.expression, node.expression.type, this.currentFunctionReturnType); + node.expressions = this.visitList(node.expressions); + + // Every returned expression must be a single value: forwarding a tuple (e.g. `return pair()` + // from another multi-return function) would otherwise slip through the wrapped comparison below. + node.expressions.forEach((expression) => expectSingleValue(expression, expression.type)); + + const actualType = functionReturnType(node.expressions.map((expression) => expression.type!)); + const expectedType = functionReturnType(this.currentFunctionReturnTypes); + + if (!implicitlyCastable(actualType, expectedType)) { + throw new ReturnTypeError(node, actualType, expectedType); } + return node; } @@ -257,11 +263,18 @@ export default class TypeCheckTraversal extends AstTraversal { expectTuple(node, node.tuple.type); - if (node.index !== 0 && node.index !== 1) { + // Tuple indexing is only supported on .split() results. A multi-return function call leaves all + // of its values on the stack, so it must be destructured instead (codegen has no partial binding). + if (!(node.tuple instanceof BinaryOpNode) || node.tuple.operator !== BinaryOperator.SPLIT) { + expectSingleValue(node.tuple, node.tuple.type); + } + + const { elementTypes } = node.tuple.type as TupleType; + if (node.index < 0 || node.index >= elementTypes.length) { throw new IndexOutOfBoundsError(node); } - node.type = node.index === 0 ? (node.tuple.type as TupleType).leftType : (node.tuple.type as TupleType).rightType; + node.type = elementTypes[node.index]; return node; } @@ -314,6 +327,7 @@ export default class TypeCheckTraversal extends AstTraversal { return node; case BinaryOperator.EQ: case BinaryOperator.NE: + expectSingleValue(node.left, node.left.type); expectCompatibleBytesBounds(node, node.left.type, node.right.type); node.type = PrimitiveType.BOOL; return node; @@ -483,7 +497,7 @@ function expectCompatibleBytesBounds(node: BinaryOpNode, left?: Type, right?: Ty function expectTuple(node: ExpectedNode, actual?: Type): void { if (!(actual instanceof TupleType)) { // We use a placeholder tuple to indicate that we're expecting *any* tuple at all - const placeholderTuple = new TupleType(new BytesType(), new BytesType()); + const placeholderTuple = new TupleType([new BytesType(), new BytesType()]); throw new UnsupportedTypeError(node, actual, placeholderTuple); } } @@ -510,7 +524,7 @@ function inferTupleType(node: BinaryOpNode): Type { // string.split() -> string, string if (node.left.type === PrimitiveType.STRING) { - return new TupleType(PrimitiveType.STRING, PrimitiveType.STRING); + return new TupleType([PrimitiveType.STRING, PrimitiveType.STRING]); } // If the expression is not a bytes type, then it must be a different compatible type (e.g. sig/pubkey) @@ -519,14 +533,14 @@ function inferTupleType(node: BinaryOpNode): Type { // bytes.split(variable) -> bytes, bytes if (!(node.right instanceof IntLiteralNode)) { - return new TupleType(new BytesType(), new BytesType()); + return new TupleType([new BytesType(), new BytesType()]); } const splitIndex = Number(node.right.value); // bytes.split(NumberLiteral) -> bytes(NumberLiteral), bytes if (expressionType.bound === undefined) { - return new TupleType(new BytesType(splitIndex), new BytesType()); + return new TupleType([new BytesType(splitIndex), new BytesType()]); } if (splitIndex > expressionType.bound) { @@ -534,10 +548,10 @@ function inferTupleType(node: BinaryOpNode): Type { } // bytesX.split(NumberLiteral) -> bytes(NumberLiteral), bytes(X - NumberLiteral) - return new TupleType( + return new TupleType([ new BytesType(splitIndex), new BytesType(expressionType.bound! - splitIndex), - ); + ]); } function inferSliceType(node: SliceNode): Type { @@ -655,3 +669,9 @@ function matchSizeLiteral(expr: BinaryOpNode): { sizeNode: UnaryOpNode, literalN const isSizeOp = (node: ExpressionNode): node is UnaryOpNode => ( node instanceof UnaryOpNode && node.operator === UnaryOperator.SIZE ); + +function expectSingleValue(node: Node, type?: Type): void { + if (type instanceof TupleType) { + throw new TypeError(node, type, undefined, `Found tuple '${type}' where a single value was expected`); + } +} diff --git a/packages/cashc/src/utils.ts b/packages/cashc/src/utils.ts index c24a140d..6c46e1c8 100644 --- a/packages/cashc/src/utils.ts +++ b/packages/cashc/src/utils.ts @@ -1,6 +1,12 @@ -import { BytesType, implicitlyCastable, PrimitiveType, Type } from '@cashscript/utils'; +import { BytesType, implicitlyCastable, PrimitiveType, TupleType, Type } from '@cashscript/utils'; import { BinaryOperator } from './ast/Operator.js'; +export function functionReturnType(returnTypes?: Type[]): Type { + if (returnTypes === undefined || returnTypes.length === 0) return PrimitiveType.VOID; + if (returnTypes.length === 1) return returnTypes[0]; + return new TupleType(returnTypes); +} + export function resultingTypeForBinaryOp( operator: BinaryOperator, left: Type, diff --git a/packages/cashc/test/ast/fixtures.ts b/packages/cashc/test/ast/fixtures.ts index 55f856a5..da3e9d90 100644 --- a/packages/cashc/test/ast/fixtures.ts +++ b/packages/cashc/test/ast/fixtures.ts @@ -366,8 +366,10 @@ export const fixtures: Fixture[] = [ ], new BlockNode([ new TupleAssignmentNode( - { name: 'blockHeightBin', type: new BytesType(4) }, - { name: 'priceBin', type: new BytesType(4) }, + [ + { name: 'blockHeightBin', type: new BytesType(4) }, + { name: 'priceBin', type: new BytesType(4) }, + ], new BinaryOpNode( new IdentifierNode('oracleMessage'), BinaryOperator.SPLIT, diff --git a/packages/cashc/test/compiler/AssignTypeError/destructure_count_mismatch.cash b/packages/cashc/test/compiler/AssignTypeError/destructure_count_mismatch.cash new file mode 100644 index 00000000..6f56ddb3 --- /dev/null +++ b/packages/cashc/test/compiler/AssignTypeError/destructure_count_mismatch.cash @@ -0,0 +1,11 @@ +function pair(int a) returns (int, int) { + return a, a + 1; +} + +contract Test() { + function spend(int x) { + int p, int q, int r = pair(x); + require(p == q); + require(q == r); + } +} diff --git a/packages/cashc/test/compiler/TupleAssignmentError/unpack_not_tuple.cash b/packages/cashc/test/compiler/AssignTypeError/unpack_not_tuple.cash similarity index 100% rename from packages/cashc/test/compiler/TupleAssignmentError/unpack_not_tuple.cash rename to packages/cashc/test/compiler/AssignTypeError/unpack_not_tuple.cash diff --git a/packages/cashc/test/compiler/ReturnTypeError/too_many_return_values.cash b/packages/cashc/test/compiler/ReturnTypeError/too_many_return_values.cash new file mode 100644 index 00000000..d4df23cf --- /dev/null +++ b/packages/cashc/test/compiler/ReturnTypeError/too_many_return_values.cash @@ -0,0 +1,10 @@ +function bad(int a) returns (int, int) { + return a; +} + +contract Test() { + function spend(int x) { + int p, int q = bad(x); + require(p == q); + } +} diff --git a/packages/cashc/test/compiler/TypeError/multi_return_tuple_comparison.cash b/packages/cashc/test/compiler/TypeError/multi_return_tuple_comparison.cash new file mode 100644 index 00000000..dad470b1 --- /dev/null +++ b/packages/cashc/test/compiler/TypeError/multi_return_tuple_comparison.cash @@ -0,0 +1,11 @@ +function pair(int a) returns (int, int) { + return a, a + 1; +} + +contract Test() { + function spend(int x) { + // Both sides have equal tuple types, so this would pass a pure type-equality check, + // but no operator works on tuples + require(pair(x) == pair(x)); + } +} diff --git a/packages/cashc/test/compiler/TypeError/multi_return_tuple_forwarding.cash b/packages/cashc/test/compiler/TypeError/multi_return_tuple_forwarding.cash new file mode 100644 index 00000000..f9230953 --- /dev/null +++ b/packages/cashc/test/compiler/TypeError/multi_return_tuple_forwarding.cash @@ -0,0 +1,15 @@ +function pair(int a) returns (int, int) { + return a, a + 1; +} + +function forward(int a) returns (int, int) { + // The tuple types match, but a returned expression must be a single value + return pair(a); +} + +contract Test() { + function spend(int x) { + int p, int q = forward(x); + require(p == q); + } +} diff --git a/packages/cashc/test/compiler/TypeError/multi_return_tuple_index.cash b/packages/cashc/test/compiler/TypeError/multi_return_tuple_index.cash new file mode 100644 index 00000000..bdacc05d --- /dev/null +++ b/packages/cashc/test/compiler/TypeError/multi_return_tuple_index.cash @@ -0,0 +1,11 @@ +function pair(int a) returns (int, int) { + return a, a + 1; +} + +contract Test() { + function spend(int x) { + // Tuple indexing is only supported on .split() results; a multi-return call + // must be destructured + require(pair(x)[0] == 1); + } +} diff --git a/packages/cashc/test/compiler/UnequalTypeError/multi_return_used_as_single_value.cash b/packages/cashc/test/compiler/UnequalTypeError/multi_return_used_as_single_value.cash new file mode 100644 index 00000000..27e7c92e --- /dev/null +++ b/packages/cashc/test/compiler/UnequalTypeError/multi_return_used_as_single_value.cash @@ -0,0 +1,9 @@ +function pair(int a) returns (int, int) { + return a, a + 1; +} + +contract Test() { + function spend(int x) { + require(pair(x) == 3); + } +} diff --git a/packages/cashc/test/compiler/UnsupportedTypeError/multi_return_nested_in_split_rhs.cash b/packages/cashc/test/compiler/UnsupportedTypeError/multi_return_nested_in_split_rhs.cash new file mode 100644 index 00000000..dd4d4610 --- /dev/null +++ b/packages/cashc/test/compiler/UnsupportedTypeError/multi_return_nested_in_split_rhs.cash @@ -0,0 +1,12 @@ +function pair() returns (bytes, bytes) { + return 0x0102, 0x030405; +} + +contract Test() { + function spend() { + // pair() is nested inside the RHS, not the RHS itself: its first return value + // would be silently discarded + bytes a, bytes b = pair().split(1); + require(a != b); + } +} diff --git a/packages/cashc/test/generation/fixtures.ts b/packages/cashc/test/generation/fixtures.ts index a22d7743..9ae7289d 100644 --- a/packages/cashc/test/generation/fixtures.ts +++ b/packages/cashc/test/generation/fixtures.ts @@ -1615,4 +1615,50 @@ export const fixtures: Fixture[] = [ fingerprint: '316a3305152ec0695bf80303736c79dd1f9cc2f1dbccf57d9965094401363307', }, }, + { + // A multi-return function — locks in the calling convention: return values are left on the stack + // in declared order (last value on top) and bound by an N-ary tuple destructuring at the call site. + fn: 'global_function_multi_return.cash', + artifact: { + contractName: 'GlobalFunctionMultiReturn', + constructorInputs: [], + abi: [{ name: 'spend', inputs: [{ name: 'x', type: 'int' }] }], + bytecode: + // OP_DEFINE divmod (id 0): return a / b, a % b — leaves [quotient, remainder], remainder on top + '6e967b7b97 OP_0 OP_DEFINE ' + // int q, int r = divmod(x, 3); require(q == 4); require(r == 1) + + 'OP_3 OP_0 OP_INVOKE OP_SWAP OP_4 OP_NUMEQUALVERIFY OP_1 OP_NUMEQUAL', + debug: { + bytecode: '056e967b7b97008953008a7c549d519c', + logs: [], + requires: [ + { ip: 8, line: 8 }, + { ip: 11, line: 9 }, + ], + sourceMap: '1::3:1;;::::1;7:33:7:34:0;:23::35:1;;8:16:8:17:0;:21::22;:8::24:1;9:21:9:22:0;:8::24:1', + functions: [ + { + id: 0, + name: 'divmod', + inputs: [{ name: 'a', type: 'int' }, { name: 'b', type: 'int' }], + bytecode: '6e967b7b97', + sourceMap: '2:11:2:16;::::1;:18::19:0;:22::23;:18:::1', + logs: [], + requires: [], + }, + ], + }, + source: fs.readFileSync(new URL('../valid-contract-files/global_function_multi_return.cash', import.meta.url), { encoding: 'utf-8' }), + compiler: { + name: 'cashc', + version, + options: { + enforceFunctionParameterTypes: true, + enforceLocktimeGuard: true, + }, + }, + updatedAt: '', + fingerprint: 'f747468c9408ec52949a22dc2f271a944ee5793eabaa913c9c2b1b4c3fbd0a56', + }, + }, ]; diff --git a/packages/cashc/test/import-fixtures/multi_return_lib.cash b/packages/cashc/test/import-fixtures/multi_return_lib.cash new file mode 100644 index 00000000..f243ae4b --- /dev/null +++ b/packages/cashc/test/import-fixtures/multi_return_lib.cash @@ -0,0 +1,3 @@ +function divmod(int a, int b) returns (int, int) { + return a / b, a % b; +} diff --git a/packages/cashc/test/import-fixtures/multi_return_main.cash b/packages/cashc/test/import-fixtures/multi_return_main.cash new file mode 100644 index 00000000..2298ab64 --- /dev/null +++ b/packages/cashc/test/import-fixtures/multi_return_main.cash @@ -0,0 +1,9 @@ +import "./multi_return_lib.cash"; + +contract MultiReturnMain() { + function spend(int x) { + int q, int r = divmod(x, 3); + require(q == 4); + require(r == 1); + } +} diff --git a/packages/cashc/test/imports.test.ts b/packages/cashc/test/imports.test.ts index f797016e..1b8eb521 100644 --- a/packages/cashc/test/imports.test.ts +++ b/packages/cashc/test/imports.test.ts @@ -26,6 +26,15 @@ describe('Imports from the filesystem (compileFile)', () => { expect(countOpDefines(artifact.bytecode)).toEqual(3); }); + it('destructures a multi-return function imported from another file', () => { + // The multi-return function is defined in an imported file and destructured in the contract, + // proving multi-return composes with the import/module system. + const artifact = compileFile(fixture('multi_return_main.cash')); + expect(artifact.contractName).toEqual('MultiReturnMain'); + expect(artifact.bytecode).toContain('OP_INVOKE'); + expect(countOpDefines(artifact.bytecode)).toEqual(1); + }); + it('throws when an imported file cannot be found', () => { expect(() => compileFile(fixture('missing_import_main.cash'))).toThrow(ImportResolutionError); }); diff --git a/packages/cashc/test/valid-contract-files/global_function_altstack_cleanup.cash b/packages/cashc/test/valid-contract-files/global_function_altstack_cleanup.cash new file mode 100644 index 00000000..4f539ad7 --- /dev/null +++ b/packages/cashc/test/valid-contract-files/global_function_altstack_cleanup.cash @@ -0,0 +1,20 @@ +function orderedPair(int a, int b, int c) returns (int, int) { + int lo = 0; + int hi = 0; + if (c > 0) { + lo = a; + hi = b; + } else { + lo = b; + hi = a; + } + return lo, hi; +} + +contract GlobalFunctionAltStackCleanup() { + function spend(int x) { + int lo, int hi = orderedPair(1, 2, x); + require(lo == 1, "lo should be 1"); + require(hi == 2, "hi should be 2"); + } +} diff --git a/packages/cashc/test/valid-contract-files/global_function_multi_return.cash b/packages/cashc/test/valid-contract-files/global_function_multi_return.cash new file mode 100644 index 00000000..384ab960 --- /dev/null +++ b/packages/cashc/test/valid-contract-files/global_function_multi_return.cash @@ -0,0 +1,11 @@ +function divmod(int a, int b) returns (int, int) { + return a / b, a % b; +} + +contract GlobalFunctionMultiReturn() { + function spend(int x) { + int q, int r = divmod(x, 3); + require(q == 4); + require(r == 1); + } +} diff --git a/packages/cashc/test/valid-contract-files/global_function_multi_return_three.cash b/packages/cashc/test/valid-contract-files/global_function_multi_return_three.cash new file mode 100644 index 00000000..15e1ffcf --- /dev/null +++ b/packages/cashc/test/valid-contract-files/global_function_multi_return_three.cash @@ -0,0 +1,12 @@ +function spread(int a) returns (int, int, int) { + return a, a + 1, a + 2; +} + +contract GlobalFunctionMultiReturnThree() { + function spend(int x) { + int p, int q, int r = spread(x); + require(p == 5); + require(q == 6); + require(r == 7); + } +} diff --git a/packages/cashscript/test/debugging.test.ts b/packages/cashscript/test/debugging.test.ts index 40810929..7d882ab4 100644 --- a/packages/cashscript/test/debugging.test.ts +++ b/packages/cashscript/test/debugging.test.ts @@ -17,6 +17,7 @@ import { artifactTestFunctionDebugging, artifactTestFunctionIntermediateResults, artifactTestImportedFunctionDebugging, + artifactTestMultiReturn, } from './fixture/debugging/debugging_contracts.js'; import { sha256 } from '@cashscript/utils'; @@ -862,6 +863,25 @@ describe('Debugging tests - user-defined function frames', () => { expect(transaction).toFailRequireWith('Failing statement: require(value > 0, "value must be positive")'); }); + it('binds multi-return values to destructuring targets in declared order', () => { + const multiReturnContract = new Contract(artifactTestMultiReturn, [], { provider }); + const multiReturnUtxo = provider.addUtxo(multiReturnContract.address, randomUtxo()); + + // 13 / 3 = 4 remainder 1: both requires only pass if q binds the first return value and r the last + const transaction = new TransactionBuilder({ provider }) + .addInput(multiReturnUtxo, multiReturnContract.unlock.spend(13n)) + .addOutput({ to: multiReturnContract.address, amount: 10000n }); + + expect(transaction).not.toFailRequire(); + + // 14 / 3 = 4 remainder 2: the remainder require fails and attributes to its own line + const failingTransaction = new TransactionBuilder({ provider }) + .addInput(multiReturnUtxo, multiReturnContract.unlock.spend(14n)) + .addOutput({ to: multiReturnContract.address, amount: 10000n }); + + expect(failingTransaction).toFailRequireWith('Test.cash:10 Require statement failed at input 0 in contract Test.cash at line 10 with the following message: remainder should be 1.'); + }); + it('logs intermediate results that get optimised out inside a function', () => { const intermediateContract = new Contract(artifactTestFunctionIntermediateResults, [alicePub], { provider }); const intermediateUtxo = provider.addUtxo(intermediateContract.address, randomUtxo()); diff --git a/packages/cashscript/test/fixture/debugging/debugging_contracts.ts b/packages/cashscript/test/fixture/debugging/debugging_contracts.ts index a54f7604..58a1f7df 100644 --- a/packages/cashscript/test/fixture/debugging/debugging_contracts.ts +++ b/packages/cashscript/test/fixture/debugging/debugging_contracts.ts @@ -29,6 +29,23 @@ contract Test(pubkey owner) { } `; +// Multi-value return destructuring: the requires only pass when the first declared return value +// binds to the first target (quotient) and the last to the last (remainder), pinning the runtime +// value ordering of the calling convention. +const CONTRACT_TEST_MULTI_RETURN = ` +function divmod(int a, int b) returns (int, int) { + return a / b, a % b; +} + +contract Test() { + function spend(int x) { + int q, int r = divmod(x, 3); + require(q == 4, "quotient should be 4"); + require(r == 1, "remainder should be 1"); + } +} +`; + const CONTRACT_TEST_REQUIRES = ` contract Test() { function test_logs() { @@ -468,6 +485,7 @@ export const artifactTestRequireInsideLoop = compileString(CONTRACT_TEST_REQUIRE export const artifactTestLogInsideLoop = compileString(CONTRACT_TEST_LOG_INSIDE_LOOP); export const artifactTestFunctionDebugging = compileString(CONTRACT_TEST_FUNCTION_DEBUGGING); export const artifactTestFunctionIntermediateResults = compileString(CONTRACT_TEST_FUNCTION_INTERMEDIATE_RESULTS); +export const artifactTestMultiReturn = compileString(CONTRACT_TEST_MULTI_RETURN); // Compiled from a file so the imported function (function_helpers.cash) keeps its own source provenance. export const artifactTestImportedFunctionDebugging = compileFile(new URL('./function_importer.cash', import.meta.url)); diff --git a/packages/utils/src/types.ts b/packages/utils/src/types.ts index 63c51937..a36821c7 100644 --- a/packages/utils/src/types.ts +++ b/packages/utils/src/types.ts @@ -28,12 +28,11 @@ export class BytesType { export class TupleType { constructor( - public leftType: Type, - public rightType: Type, + public elementTypes: Type[], ) { } toString(): string { - return `(${this.leftType}, ${this.rightType})`; + return `(${this.elementTypes.join(', ')})`; } } @@ -120,9 +119,8 @@ export function implicitlyCastable(actual?: Type, expected?: Type): boolean { if (actual === PrimitiveType.VOID || expected === PrimitiveType.VOID) return false; if (actual instanceof TupleType && expected instanceof TupleType) { - const leftIsCompatible = implicitlyCastable(actual.leftType, expected.leftType); - const rightIsCompatible = implicitlyCastable(actual.rightType, expected.rightType); - return leftIsCompatible && rightIsCompatible; + return actual.elementTypes.length === expected.elementTypes.length + && actual.elementTypes.every((elementType, i) => implicitlyCastable(elementType, expected.elementTypes[i])); } // Can't cast between Tuple and non-Tuple diff --git a/website/docs/language/contracts.md b/website/docs/language/contracts.md index aa3f8039..79cfa3d2 100644 --- a/website/docs/language/contracts.md +++ b/website/docs/language/contracts.md @@ -117,6 +117,22 @@ contract Example() { } ``` +A function can also return **multiple values** by declaring `returns (T1, T2, ...)` and returning a comma-separated list. A call to such a function must be destructured into exactly one variable per return value: + +```solidity +function divmod(int a, int b) returns (int, int) { + return a / b, a % b; +} + +contract Example() { + function spend(int x) { + int quotient, int remainder = divmod(x, 3); + require(quotient == 4); + require(remainder == 1); + } +} +``` + ### Importing functions from other files Top-level functions can be split across files and pulled in with an `import` directive, which makes the imported file's functions available as if they were declared locally. All `import` directives must appear at the **top of the file** after any `pragma` directives and before any function or contract definitions. @@ -152,7 +168,7 @@ Imported files can declare their own [`pragma` directives](#pragma), and every p ### Limitations This first version of user-defined functions is intentionally limited in scope: -- Functions return **at most one value** (no multiple/tuple returns), and a value-returning function must end with a single `return` statement (no early or conditional returns — compute into a variable and return it at the end). +- A value-returning function must end with a single `return` statement (no early or conditional returns — compute into a variable and return it at the end). - No advanced optimisations are performed yet on user-defined functions. :::note diff --git a/website/docs/releases/release-notes.md b/website/docs/releases/release-notes.md index 6b01601c..beb92819 100644 --- a/website/docs/releases/release-notes.md +++ b/website/docs/releases/release-notes.md @@ -8,6 +8,7 @@ title: Release Notes #### cashc compiler - :sparkles: Add support for user-defined reusable functions. +- :sparkles: Add support for multiple return values in user-defined functions, destructured at the call site. - :sparkles: Add support for `import` directives to share user-defined functions across files. - :hammer_and_wrench: Update `compileString` to take an optional `files` object for filesystem-free import resolution. - :racehorse: Add new `OP_SWAP OP_MUL` optimisation.