diff --git a/packages/cashc/package.json b/packages/cashc/package.json index a469a48e..a58a6b10 100644 --- a/packages/cashc/package.json +++ b/packages/cashc/package.json @@ -36,8 +36,8 @@ "test": "test" }, "scripts": { - "antlr": "antlr -Dlanguage=TypeScript -visitor -no-listener src/grammar/CashScript.g4", - "postantlr": "find src/grammar -type f -name 'CashScriptVisitor.ts' | xargs sed -i '' 's|\\(import .* \".*/.*\\)\";|\\1\\.js\";|g'", + "antlr": "antlr -Dlanguage=TypeScript -visitor -no-listener -o src/grammar src/grammar/CashScript.g4", + "postantlr": "node -e \"const fs=require('fs');['CashScriptVisitor.ts','CashScriptParser.ts','CashScriptLexer.ts'].forEach(f=>{const p='src/grammar/'+f;if(!fs.existsSync(p))return;const s=fs.readFileSync(p,'utf8').replace(/(from \\\"\\.[^\\\"]*?)(\\\")/g,(m,a,b)=>a.endsWith('.js')?m:a+'.js'+b);fs.writeFileSync(p,s);})\"", "build": "yarn clean && yarn compile", "clean": "rm -rf ./dist", "compile": "tsc -p tsconfig.build.json", diff --git a/packages/cashc/src/Errors.ts b/packages/cashc/src/Errors.ts index 511d7521..5790aded 100644 --- a/packages/cashc/src/Errors.ts +++ b/packages/cashc/src/Errors.ts @@ -15,6 +15,7 @@ import { ArrayNode, TupleIndexOpNode, RequireNode, + ReturnNode, InstantiationNode, StatementNode, ContractNode, @@ -115,6 +116,34 @@ export class EmptyFunctionError extends CashScriptError { } } +export class RecursiveFunctionError extends CashScriptError { + constructor( + public node: FunctionDefinitionNode, + public cycle: string[], + ) { + super(node, `Recursive function call detected involving function '${node.name}' (cycle: ${cycle.join(' -> ')})`); + } +} + +export class MissingReturnStatementError extends CashScriptError { + constructor( + public node: FunctionDefinitionNode, + ) { + super(node, `Function '${node.name}' is missing a return statement on all paths`); + } +} + +export class ReturnStatementError extends CashScriptError { + constructor( + // Also used for return-count / destructuring-arity mismatches, whose node may be the offending + // expression (e.g. the call being destructured) rather than a return statement. + public node: ReturnNode | FunctionDefinitionNode | ExpressionNode, + message: string, + ) { + super(node, message); + } +} + export class FinalRequireStatementError extends CashScriptError { constructor( public node: StatementNode, @@ -134,6 +163,19 @@ export class TypeError extends CashScriptError { } } +export class ReturnTypeError extends TypeError { + constructor( + node: ReturnNode, + actual: Type | undefined, + expected: Type | undefined, + ) { + super( + node, actual, expected, + `Found return value of type '${actual}' where type '${expected}' was expected`, + ); + } +} + export class InvalidParameterTypeError extends TypeError { constructor( node: FunctionCallNode | RequireNode | InstantiationNode, diff --git a/packages/cashc/src/artifact/Artifact.ts b/packages/cashc/src/artifact/Artifact.ts index ff09b9f3..b57fca70 100644 --- a/packages/cashc/src/artifact/Artifact.ts +++ b/packages/cashc/src/artifact/Artifact.ts @@ -17,13 +17,17 @@ export function generateArtifact( const constructorInputs = contract.parameters .map((parameter) => ({ name: parameter.name, type: parameter.type.toString() })); - const abi = contract.functions.map((func) => ({ - name: func.name, - inputs: func.parameters.map((parameter) => ({ - name: parameter.name, - type: parameter.type.toString(), - })), - })); + // User-defined (value-returning) functions are internal helpers compiled to OP_DEFINE/OP_INVOKE; + // they are not spending paths and so are excluded from the ABI. + const abi = contract.functions + .filter((func) => !func.isUserFunction) + .map((func) => ({ + name: func.name, + inputs: func.parameters.map((parameter) => ({ + name: parameter.name, + type: parameter.type.toString(), + })), + })); const bytecode = scriptToAsm(script); diff --git a/packages/cashc/src/ast/AST.ts b/packages/cashc/src/ast/AST.ts index 3b4a869a..b8f384a7 100644 --- a/packages/cashc/src/ast/AST.ts +++ b/packages/cashc/src/ast/AST.ts @@ -57,10 +57,21 @@ export class FunctionDefinitionNode extends Node implements Named { public name: string, public parameters: ParameterNode[], public body: BlockNode, + // User-defined functions (declared with `returns (...)`) return one or more values and are + // compiled to standalone OP_DEFINE/OP_INVOKE routines; contract spending functions have no + // declared return types and are compiled directly. A single-return function has one element, + // a multi-return (tuple) function has N elements in declared order. + public returnTypes?: Type[], ) { super(); } + // A user-defined (reusable) function is one with a declared return type list. These are lowered + // to OP_DEFINE/OP_INVOKE and are not emitted as standalone spending functions. + get isUserFunction(): boolean { + return this.returnTypes !== undefined; + } + accept(visitor: AstVisitor): T { return visitor.visitFunctionDefinition(this); } @@ -98,11 +109,18 @@ export class VariableDefinitionNode extends NonControlStatementNode implements N } } +export interface TupleTarget { + 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 + // A tuple assignment destructures a tuple-valued expression into N >= 2 named targets in order. + // The 2-target form is used for built-in multi-value expressions (e.g. `.split`); N-target forms + // (N >= 2) destructure the result of a multi-return user-defined function call. + public targets: TupleTarget[], public tuple: ExpressionNode, ) { super(); @@ -156,6 +174,20 @@ export class RequireNode extends NonControlStatementNode { } } +export class ReturnNode extends NonControlStatementNode { + constructor( + // A return statement yields one or more values in declared order (one for a single-return + // function, N for a multi-return/tuple function). + public expressions: ExpressionNode[], + ) { + super(); + } + + accept(visitor: AstVisitor): T { + return visitor.visitReturn(this); + } +} + export class ConsoleStatementNode extends NonControlStatementNode { constructor( public parameters: ConsoleParameterNode[], diff --git a/packages/cashc/src/ast/AstBuilder.ts b/packages/cashc/src/ast/AstBuilder.ts index fc671b03..00927baf 100644 --- a/packages/cashc/src/ast/AstBuilder.ts +++ b/packages/cashc/src/ast/AstBuilder.ts @@ -28,6 +28,7 @@ import { ArrayNode, TupleIndexOpNode, RequireNode, + ReturnNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, @@ -62,6 +63,7 @@ import type { LiteralExpressionContext, TupleIndexOpContext, RequireStatementContext, + ReturnStatementContext, PragmaDirectiveContext, InstantiationContext, NullaryOpContext, @@ -145,7 +147,13 @@ export default class AstBuilder const name = ctx.Identifier().getText(); const parameters = ctx.parameterList().parameter_list().map((p) => this.visit(p) as ParameterNode); const body = this.visit(ctx.functionBody()); - const functionDefinition = new FunctionDefinitionNode(name, parameters, body); + // The optional `returns (type, ...)` clause distinguishes user-defined functions from contract + // spending functions, which have no return types. A user function returns one or more values. + const returnTypeContexts = ctx.typeName_list(); + const returnTypes = returnTypeContexts.length > 0 + ? returnTypeContexts.map((t) => parseType(t.getText())) + : undefined; + const functionDefinition = new FunctionDefinitionNode(name, parameters, body, returnTypes); functionDefinition.location = Location.fromCtx(ctx); return functionDefinition; } @@ -199,11 +207,11 @@ export default class AstBuilder 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 = names.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; } @@ -260,6 +268,13 @@ export default class AstBuilder return require; } + visitReturnStatement(ctx: ReturnStatementContext): ReturnNode { + const expressions = ctx.expression_list().map((e) => this.visit(e) as ExpressionNode); + const returnNode = new ReturnNode(expressions); + returnNode.location = Location.fromCtx(ctx); + return returnNode; + } + visitIfStatement(ctx: IfStatementContext): BranchNode { const condition = this.visit(ctx.expression()); const ifBlock = this.visit(ctx._ifBlock) as StatementNode; diff --git a/packages/cashc/src/ast/AstTraversal.ts b/packages/cashc/src/ast/AstTraversal.ts index ba73d204..b99272a3 100644 --- a/packages/cashc/src/ast/AstTraversal.ts +++ b/packages/cashc/src/ast/AstTraversal.ts @@ -22,6 +22,7 @@ import { ArrayNode, TupleIndexOpNode, RequireNode, + ReturnNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, @@ -82,6 +83,11 @@ export default class AstTraversal extends AstVisitor { return node; } + visitReturn(node: ReturnNode): Node { + node.expressions = this.visitList(node.expressions); + return node; + } + visitConsoleStatement(node: ConsoleStatementNode): Node { node.parameters = this.visitList(node.parameters) as ConsoleParameterNode[]; return node; diff --git a/packages/cashc/src/ast/AstVisitor.ts b/packages/cashc/src/ast/AstVisitor.ts index 1c131bf3..ee0f1dce 100644 --- a/packages/cashc/src/ast/AstVisitor.ts +++ b/packages/cashc/src/ast/AstVisitor.ts @@ -21,6 +21,7 @@ import { ArrayNode, TupleIndexOpNode, RequireNode, + ReturnNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, @@ -41,6 +42,7 @@ export default abstract class AstVisitor { abstract visitAssign(node: AssignNode): T; abstract visitTimeOp(node: TimeOpNode): T; abstract visitRequire(node: RequireNode): T; + abstract visitReturn(node: ReturnNode): T; abstract visitConsoleStatement(node: ConsoleStatementNode): T; abstract visitBranch(node: BranchNode): T; abstract visitDoWhile(node: DoWhileNode): T; diff --git a/packages/cashc/src/ast/SymbolTable.ts b/packages/cashc/src/ast/SymbolTable.ts index fcfada94..afc786ea 100644 --- a/packages/cashc/src/ast/SymbolTable.ts +++ b/packages/cashc/src/ast/SymbolTable.ts @@ -14,6 +14,10 @@ export class Symbol { public symbolType: SymbolType, public definition?: Node, public parameters?: Type[], + // For user-defined functions: the full ordered list of declared return types. A single-return + // function has one element (matching `type`); a multi-return function has N elements. Used to + // type-check and bind tuple-destructuring call sites. + public returnTypes?: Type[], ) {} static variable(node: VariableDefinitionNode | ParameterNode): Symbol { @@ -24,8 +28,8 @@ export class Symbol { return new Symbol(name, type, SymbolType.VARIABLE); } - static function(name: string, type: Type, parameters: Type[]): Symbol { - return new Symbol(name, type, SymbolType.FUNCTION, undefined, parameters); + static function(name: string, type: Type, parameters: Type[], definition?: Node, returnTypes?: Type[]): Symbol { + return new Symbol(name, type, SymbolType.FUNCTION, definition, parameters, returnTypes); } static class(name: string, type: Type, parameters: Type[]): Symbol { @@ -73,6 +77,9 @@ export class SymbolTable { unusedSymbols(): Symbol[] { return Array.from(this.symbols) .map((e) => e[1]) + // Only variables are subject to the unused-variable check; user-defined function symbols + // may legitimately go uncalled (and are reported elsewhere if needed). + .filter((s) => s.symbolType === SymbolType.VARIABLE) .filter((s) => s.references.length === 0); } } diff --git a/packages/cashc/src/ast/clone.ts b/packages/cashc/src/ast/clone.ts new file mode 100644 index 00000000..d49b77bc --- /dev/null +++ b/packages/cashc/src/ast/clone.ts @@ -0,0 +1,209 @@ +import { + Node, + StatementNode, + ExpressionNode, + BlockNode, + VariableDefinitionNode, + TupleAssignmentNode, + AssignNode, + TimeOpNode, + RequireNode, + ReturnNode, + ConsoleStatementNode, + BranchNode, + DoWhileNode, + WhileNode, + ForNode, + CastNode, + FunctionCallNode, + InstantiationNode, + TupleIndexOpNode, + SliceNode, + BinaryOpNode, + UnaryOpNode, + NullaryOpNode, + ArrayNode, + IdentifierNode, + BoolLiteralNode, + IntLiteralNode, + StringLiteralNode, + HexLiteralNode, + ConsoleParameterNode, +} from './AST.js'; +import { Location } from './Location.js'; + +/** + * Deep-clones an AST subtree, optionally alpha-renaming identifiers and the names of + * variable-defining nodes (variable definitions, tuple assignments, for-loop init variables). + * + * Used by function inlining: the callee body is cloned per call site and its locals/parameters are + * renamed to unique names so multiple inlinings (and the call site's own scope) never collide. + * + * The clone keeps a reference to the original source `location` (so debug/source-map data still + * points at the user's function definition) but produces entirely fresh node objects, leaving + * symbol-table / type annotations to be recomputed by a subsequent SymbolTableTraversal pass. + */ +export function cloneNode(node: T, renames: Map = new Map()): T { + return clone(node, renames) as unknown as T; +} + +const rename = (name: string, renames: Map): string => renames.get(name) ?? name; + +const withLocation = (cloned: T, original: Node): T => { + if (original.location) cloned.location = Location.fromObject(original.location); + return cloned; +}; + +function clone(node: Node, renames: Map): Node { + if (node instanceof BlockNode) { + const statements = node.statements?.map((s) => clone(s, renames) as StatementNode); + return withLocation(new BlockNode(statements), node); + } + + if (node instanceof VariableDefinitionNode) { + return withLocation(new VariableDefinitionNode( + node.type, + [...node.modifier], + rename(node.name, renames), + clone(node.expression, renames) as ExpressionNode, + ), node); + } + + if (node instanceof TupleAssignmentNode) { + return withLocation(new TupleAssignmentNode( + node.targets.map((target) => ({ name: rename(target.name, renames), type: target.type })), + clone(node.tuple, renames) as ExpressionNode, + ), node); + } + + if (node instanceof AssignNode) { + return withLocation(new AssignNode( + clone(node.identifier, renames) as IdentifierNode, + clone(node.expression, renames) as ExpressionNode, + ), node); + } + + if (node instanceof TimeOpNode) { + const cloned = new TimeOpNode(node.timeOp, clone(node.expression, renames) as ExpressionNode, node.message); + cloned.isGuard = node.isGuard; + return withLocation(cloned, node); + } + + if (node instanceof RequireNode) { + return withLocation(new RequireNode(clone(node.expression, renames) as ExpressionNode, node.message), node); + } + + if (node instanceof ReturnNode) { + return withLocation(new ReturnNode( + node.expressions.map((expression) => clone(expression, renames) as ExpressionNode), + ), node); + } + + if (node instanceof ConsoleStatementNode) { + const parameters = node.parameters.map((p) => clone(p, renames) as ConsoleParameterNode); + return withLocation(new ConsoleStatementNode(parameters), node); + } + + if (node instanceof BranchNode) { + return withLocation(new BranchNode( + clone(node.condition, renames) as ExpressionNode, + clone(node.ifBlock, renames) as BlockNode, + node.elseBlock ? clone(node.elseBlock, renames) as BlockNode : undefined, + ), node); + } + + if (node instanceof DoWhileNode) { + return withLocation(new DoWhileNode( + clone(node.condition, renames) as ExpressionNode, + clone(node.block, renames) as BlockNode, + ), node); + } + + if (node instanceof WhileNode) { + return withLocation(new WhileNode( + clone(node.condition, renames) as ExpressionNode, + clone(node.block, renames) as BlockNode, + ), node); + } + + if (node instanceof ForNode) { + return withLocation(new ForNode( + clone(node.init, renames) as VariableDefinitionNode | AssignNode, + clone(node.condition, renames) as ExpressionNode, + clone(node.update, renames) as AssignNode, + clone(node.block, renames) as BlockNode, + ), node); + } + + if (node instanceof CastNode) { + return withLocation(new CastNode(node.type, clone(node.expression, renames) as ExpressionNode, node.isUnsafe), node); + } + + if (node instanceof FunctionCallNode) { + return withLocation(new FunctionCallNode( + clone(node.identifier, renames) as IdentifierNode, + node.parameters.map((p) => clone(p, renames) as ExpressionNode), + ), node); + } + + if (node instanceof InstantiationNode) { + return withLocation(new InstantiationNode( + clone(node.identifier, renames) as IdentifierNode, + node.parameters.map((p) => clone(p, renames) as ExpressionNode), + ), node); + } + + if (node instanceof TupleIndexOpNode) { + return withLocation(new TupleIndexOpNode(clone(node.tuple, renames) as ExpressionNode, node.index), node); + } + + if (node instanceof SliceNode) { + return withLocation(new SliceNode( + clone(node.element, renames) as ExpressionNode, + clone(node.start, renames) as ExpressionNode, + clone(node.end, renames) as ExpressionNode, + ), node); + } + + if (node instanceof BinaryOpNode) { + return withLocation(new BinaryOpNode( + clone(node.left, renames) as ExpressionNode, + node.operator, + clone(node.right, renames) as ExpressionNode, + ), node); + } + + if (node instanceof UnaryOpNode) { + return withLocation(new UnaryOpNode(node.operator, clone(node.expression, renames) as ExpressionNode), node); + } + + if (node instanceof NullaryOpNode) { + return withLocation(new NullaryOpNode(node.operator), node); + } + + if (node instanceof ArrayNode) { + return withLocation(new ArrayNode(node.elements.map((e) => clone(e, renames) as ExpressionNode)), node); + } + + if (node instanceof IdentifierNode) { + return withLocation(new IdentifierNode(rename(node.name, renames)), node); + } + + if (node instanceof BoolLiteralNode) { + return withLocation(new BoolLiteralNode(node.value), node); + } + + if (node instanceof IntLiteralNode) { + return withLocation(new IntLiteralNode(node.value), node); + } + + if (node instanceof StringLiteralNode) { + return withLocation(new StringLiteralNode(node.value, node.quote), node); + } + + if (node instanceof HexLiteralNode) { + return withLocation(new HexLiteralNode(node.value), node); + } + + throw new Error(`cloneNode: unhandled node type ${node.constructor.name}`); +} diff --git a/packages/cashc/src/compiler.ts b/packages/cashc/src/compiler.ts index 46c24927..67f206a5 100644 --- a/packages/cashc/src/compiler.ts +++ b/packages/cashc/src/compiler.ts @@ -52,6 +52,13 @@ export function compileString(code: string, compilerOptions: CompileOptions = {} // Semantic analysis ast = ast.accept(new SymbolTableTraversal()) as Ast; ast = ast.accept(new TypeCheckTraversal()) as Ast; + + // User-defined (value-returning) functions are NOT inlined. They are lowered during code + // generation to CHIP-2025-05 function opcodes: each function body is compiled once as a + // standalone stack-based routine stored in the VM function table via OP_DEFINE, and every call + // site emits OP_INVOKE. This shares the body bytecode across all call sites rather than + // duplicating it (see GenerateTargetTraversal). The front-end passes above already register the + // functions, ban recursion, and type-check return statements. ast = ast.accept(new EnsureFinalRequireTraversal()) as Ast; if (mergedCompilerOptions.enforceLocktimeGuard) { ast = ast.accept(new InjectLocktimeGuardTraversal()) as Ast; diff --git a/packages/cashc/src/generation/GenerateTargetTraversal.ts b/packages/cashc/src/generation/GenerateTargetTraversal.ts index ef0a0096..5a03adc4 100644 --- a/packages/cashc/src/generation/GenerateTargetTraversal.ts +++ b/packages/cashc/src/generation/GenerateTargetTraversal.ts @@ -9,6 +9,7 @@ import { PrimitiveType, Script, scriptToAsm, + scriptToBytecode, generateSourceMap, FullLocationData, LogEntry, @@ -42,6 +43,7 @@ import { ArrayNode, TupleIndexOpNode, RequireNode, + ReturnNode, SourceFileNode, Node, InstantiationNode, @@ -81,6 +83,14 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { private currentFunction: FunctionDefinitionNode; private constructorParameterCount: number; + // Maps each user-defined (value-returning) function name to its assigned VM function identifier + // (a sequential number 1, 2, 3, ... encoded as a 0-7 byte VM number) and parameter count. Used by + // visitFunctionCall to emit OP_INVOKE for the shared function body stored via OP_DEFINE. + private userFunctionIds: Map = new Map(); + // True while compiling a user-defined function body as a standalone routine (so that visitReturn + // knows to leave only the return value on the stack instead of emitting a require/verify). + private compilingUserFunctionBody = false; + constructor(private compilerOptions: CompilerOptions) { super(); } @@ -149,18 +159,31 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { // Keep track of constructor parameter count for instructor pointer calculation this.constructorParameterCount = node.parameters.length; - if (node.functions.length === 1) { - node.functions = this.visitList(node.functions) as FunctionDefinitionNode[]; + // Separate user-defined (value-returning) functions from contract spending functions. The user + // functions are lowered to CHIP-2025-05 function opcodes (OP_DEFINE / OP_INVOKE), the spending + // functions are compiled as before and selected via the function selector at the stack bottom. + const userFunctions = node.functions.filter((f) => f.isUserFunction); + const spendingFunctions = node.functions.filter((f) => !f.isUserFunction); + + // Define every user function up front (before any OP_INVOKE). The VM function table persists for + // the whole evaluation of this (locking/unlocking/redeem) bytecode, so a body defined here can be + // invoked from the spending function and from other already-defined function bodies. Assign each + // a sequential VM-number identifier (1, 2, 3, ...). Defining all of them before any invoke also + // lets bodies invoke each other regardless of declaration order. + this.defineUserFunctions(userFunctions); + + if (spendingFunctions.length === 1) { + this.visit(spendingFunctions[0]); } else { this.pushToStack('$$', true); - node.functions = node.functions.map((f, i) => { + spendingFunctions.forEach((f, i) => { const locationData = { location: f.location, positionHint: PositionHint.START }; const stackCopy = [...this.stack]; const selectorIndex = this.getStackIndex('$$'); this.emit(encodeInt(BigInt(selectorIndex)), locationData); - if (i === node.functions.length - 1) { + if (i === spendingFunctions.length - 1) { this.emit(Op.OP_ROLL, locationData); this.removeFromStack(selectorIndex); } else { @@ -171,23 +194,22 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { this.emit(encodeInt(BigInt(i)), locationData); this.emit(Op.OP_NUMEQUAL, locationData); - if (i < node.functions.length - 1) { + if (i < spendingFunctions.length - 1) { this.emit(Op.OP_IF, locationData); } else { this.emit(Op.OP_VERIFY, locationData); } - f = this.visit(f) as FunctionDefinitionNode; + this.visit(f); - if (i < node.functions.length - 1) { + if (i < spendingFunctions.length - 1) { this.emit(Op.OP_ELSE, { ...locationData, positionHint: PositionHint.END }); } this.stack = [...stackCopy]; - return f; }); - for (let i = 0; i < node.functions.length - 1; i += 1) { + for (let i = 0; i < spendingFunctions.length - 1; i += 1) { this.emit(Op.OP_ENDIF, { location: node.location, positionHint: PositionHint.END }); } } @@ -195,6 +217,96 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { return node; } + // Emits the OP_DEFINE prologue for every user-defined function: each body is compiled once as an + // independent stack-based routine (its parameters are the initial stack items it consumes, leaving + // its return value on top), then stored in the VM function table with a sequential identifier: + // OP_DEFINE + // The body bytecode is pushed as a single data vector, so OP_DEFINE's op-cost is base + the + // stack-pushed body bytes; each later OP_INVOKE costs only the base instruction cost. Sharing the + // body via the function table — rather than inlining it at every call site — is what keeps the + // script small for functions called multiple times. + private defineUserFunctions(userFunctions: FunctionDefinitionNode[]): void { + if (userFunctions.length === 0) return; + + // Assign identifiers first so a body may OP_INVOKE any other user function (the front-end bans + // recursion; note that OP_INVOKE technically permits bounded recursion within the 100-deep + // control-stack limit, which is deferred for now). + userFunctions.forEach((func, i) => { + this.userFunctionIds.set(func.name, { + id: i + 1, + paramCount: func.parameters.length, + returnCount: func.returnTypes!.length, + }); + }); + + userFunctions.forEach((func) => { + const { id } = this.userFunctionIds.get(func.name)!; + const bodyScript = this.compileUserFunctionBody(func); + const bodyBytecode = scriptToBytecode(bodyScript); + + const locationData = { location: func.location, positionHint: PositionHint.START }; + // + this.emit(bodyBytecode, locationData); + this.pushToStack('(function body)'); + // + this.emit(encodeInt(BigInt(id)), locationData); + this.pushToStack('(function id)'); + // OP_DEFINE consumes the identifier and body, storing the body in the function table. + this.emit(Op.OP_DEFINE, { ...locationData, positionHint: PositionHint.END }); + this.popFromStack(2); + }); + } + + // Compiles a single user-defined function body into an independent Op[] routine using a fresh + // GenerateTargetTraversal. The routine's stack model is seeded with the function's parameters (the + // calling convention: arguments are passed as the initial stack items, first parameter on top), it + // runs the body, and leaves exactly the return value on top of the shared stack. + private compileUserFunctionBody(func: FunctionDefinitionNode): Script { + const bodyTraversal = new GenerateTargetTraversalWithLocation(this.compilerOptions); + // Share the function identifier table so a body can OP_INVOKE other already-defined functions. + bodyTraversal.userFunctionIds = this.userFunctionIds; + bodyTraversal.currentFunction = func; + bodyTraversal.compilingUserFunctionBody = true; + + // Seed the stack with the parameters (visitParameter pushes them to the stack bottom in order, + // matching the OP_INVOKE calling convention where the first parameter ends up on top). + func.parameters.forEach((param) => bodyTraversal.visit(param)); + + if (this.compilerOptions.enforceFunctionParameterTypes) { + bodyTraversal.enforceFunctionParameterTypes(func); + } + + bodyTraversal.visit(func.body); + + // After the body runs, the function's N return values are on top of the stack (in declared + // order, the last-declared value on top). Remove every other stack item (parameters and locals) + // so the routine's net effect is: consume the arguments, leave the N return values on top. + bodyTraversal.cleanFunctionBodyStack(func.body, func.returnTypes!.length); + + return bodyTraversal.output; + } + + // Removes everything below the N return values left on top of the stack (see + // compileUserFunctionBody), preserving the relative order of those top N values. + cleanFunctionBodyStack(functionBodyNode: Node, resultCount: number): void { + const locationData = { location: functionBodyNode.location, positionHint: PositionHint.END }; + const dropCount = this.stack.length - resultCount; + for (let i = 0; i < dropCount; i += 1) { + if (resultCount === 1) { + // Single return value: OP_NIP drops the item directly below the top (1 byte). + this.emit(Op.OP_NIP, locationData); + this.nipFromStack(); + } else { + // Multiple return values: the next item to drop sits at stack index N (just below the N + // result values). Roll it to the top and drop it; the N results keep their relative order. + this.emit(encodeInt(BigInt(resultCount)), locationData); + this.emit(Op.OP_ROLL, locationData); + this.emit(Op.OP_DROP, locationData); + this.removeFromStack(resultCount); + } + } + } + visitFunctionDefinition(node: FunctionDefinitionNode): Node { this.currentFunction = node; @@ -314,10 +426,12 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { } visitTupleAssignment(node: TupleAssignmentNode): Node { + // The RHS leaves N values on the stack (the last value on top). Replace those N anonymous + // entries with the destructuring target names in declared order, so the last target is bound to + // the top-of-stack value — matching both the `.split` (N=2) and multi-return-call conventions. 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; } @@ -379,6 +493,18 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { return node; } + visitReturn(node: ReturnNode): Node { + // Only reachable while compiling a user-defined function body (the front-end rejects `return` + // elsewhere). Evaluating the expressions in declared order leaves the N return values on top of + // the stack (last-declared value on top); the surrounding routine (cleanFunctionBodyStack) then + // drops the consumed parameters and locals while preserving the order of the N results. + if (!this.compilingUserFunctionBody) { + throw new Error('Internal error: return statement reached code generation outside a user-defined function body'); + } + node.expressions = this.visitList(node.expressions); + return node; + } + visitRequire(node: RequireNode): Node { node.expression = this.visit(node.expression); @@ -583,6 +709,19 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { } visitFunctionCall(node: FunctionCallNode): Node { + // User-defined (value-returning) function call: invoke the shared body stored via OP_DEFINE. + const userFunction = this.userFunctionIds.get(node.identifier.name); + if (userFunction) { + return this.visitUserFunctionCall(node, userFunction); + } + + // Defensive: anything that is neither a built-in global function nor a known user function must + // not reach code generation. The only valid way a user-defined function call leaves the final + // contract bytecode is as an OP_INVOKE emitted by visitUserFunctionCall. + if (!Object.values(GlobalFunction).includes(node.identifier.name as GlobalFunction)) { + throw new Error(`Internal error: unresolved call to user-defined function '${node.identifier.name}' reached code generation`); + } + if (node.identifier.name === GlobalFunction.CHECKMULTISIG) { return this.visitMultiSig(node); } @@ -599,6 +738,36 @@ export default class GenerateTargetTraversalWithLocation extends AstTraversal { return node; } + // Emits an OP_INVOKE call to a user-defined function whose body was stored via OP_DEFINE. + // Calling convention: arguments are pushed onto the shared stack so that the FIRST parameter ends + // up on top (matching how the body's routine seeds its stack from its parameters). To achieve this + // we evaluate the argument expressions in REVERSE source order. Then ` + // OP_INVOKE` runs the body in the same stack/altstack/function-table; it consumes the arguments + // and leaves the single return value on top. + private visitUserFunctionCall( + node: FunctionCallNode, + userFunction: { id: number, paramCount: number, returnCount: number }, + ): Node { + const args = [...node.parameters]; + for (let i = args.length - 1; i >= 0; i -= 1) { + this.visit(args[i]); + } + + this.emit(encodeInt(BigInt(userFunction.id)), { location: node.location, positionHint: PositionHint.START }); + this.pushToStack('(function id)'); + this.emit(Op.OP_INVOKE, { location: node.location, positionHint: PositionHint.END }); + + // OP_INVOKE pops the identifier; the body consumes the arguments and pushes its N return values + // (the last-declared value ends up on top). For a single-return function the result is a plain + // value expression; for a multi-return function the N values are bound by visitTupleAssignment. + this.popFromStack(1 + userFunction.paramCount); + for (let i = 0; i < userFunction.returnCount; i += 1) { + this.pushToStack('(value)'); + } + + return node; + } + visitMultiSig(node: FunctionCallNode): Node { this.emit(encodeBool(false), { location: node.location, positionHint: PositionHint.START }); this.pushToStack('(value)'); diff --git a/packages/cashc/src/grammar/CashScript.g4 b/packages/cashc/src/grammar/CashScript.g4 index e4ad1d4b..f5c97426 100644 --- a/packages/cashc/src/grammar/CashScript.g4 +++ b/packages/cashc/src/grammar/CashScript.g4 @@ -29,7 +29,7 @@ contractDefinition ; functionDefinition - : 'function' Identifier parameterList functionBody + : 'function' Identifier parameterList ('returns' '(' typeName (',' typeName)* ')')? functionBody ; functionBody @@ -61,6 +61,11 @@ nonControlStatement | timeOpStatement | requireStatement | consoleStatement + | returnStatement + ; + +returnStatement + : 'return' expression (',' expression)* ; controlStatement @@ -73,7 +78,8 @@ variableDefinition ; tupleAssignment - : typeName Identifier ',' typeName Identifier '=' expression + : 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 7368b9dd..1dfdd017 100644 --- a/packages/cashc/src/grammar/CashScript.interp +++ b/packages/cashc/src/grammar/CashScript.interp @@ -14,9 +14,11 @@ null '{' '}' 'function' +'returns' '(' ',' ')' +'return' '+=' '-=' '++' @@ -145,6 +147,8 @@ null null null null +null +null VersionLiteral BooleanLiteral NumberUnit @@ -181,6 +185,7 @@ parameter block statement nonControlStatement +returnStatement controlStatement variableDefinition tupleAssignment @@ -208,4 +213,4 @@ typeCast atn: -[4, 1, 81, 433, 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, 1, 0, 5, 0, 78, 8, 0, 10, 0, 12, 0, 81, 9, 0, 1, 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, 95, 8, 3, 1, 4, 3, 4, 98, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 109, 8, 6, 10, 6, 12, 6, 112, 9, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 5, 8, 123, 8, 8, 10, 8, 12, 8, 126, 9, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 134, 8, 9, 10, 9, 12, 9, 137, 9, 9, 1, 9, 3, 9, 140, 8, 9, 3, 9, 142, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 5, 11, 151, 8, 11, 10, 11, 12, 11, 154, 9, 11, 1, 11, 1, 11, 3, 11, 158, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 164, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 172, 8, 13, 1, 14, 1, 14, 3, 14, 176, 8, 14, 1, 15, 1, 15, 5, 15, 180, 8, 15, 10, 15, 12, 15, 183, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 202, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 211, 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 220, 8, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 234, 8, 21, 1, 22, 1, 22, 1, 22, 3, 22, 239, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 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, 26, 1, 26, 3, 26, 267, 8, 26, 1, 27, 1, 27, 1, 28, 1, 28, 3, 28, 273, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 279, 8, 29, 10, 29, 12, 29, 282, 9, 29, 1, 29, 3, 29, 285, 8, 29, 3, 29, 287, 8, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 5, 31, 298, 8, 31, 10, 31, 12, 31, 301, 9, 31, 1, 31, 3, 31, 304, 8, 31, 3, 31, 306, 8, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 319, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 345, 8, 32, 10, 32, 12, 32, 348, 9, 32, 1, 32, 3, 32, 351, 8, 32, 3, 32, 353, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 359, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 411, 8, 32, 10, 32, 12, 32, 414, 9, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 423, 8, 34, 1, 35, 1, 35, 3, 35, 427, 8, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 0, 1, 64, 38, 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, 0, 14, 1, 0, 4, 10, 2, 0, 10, 10, 18, 19, 1, 0, 20, 21, 1, 0, 33, 37, 2, 0, 33, 37, 39, 42, 2, 0, 5, 5, 47, 48, 1, 0, 49, 51, 2, 0, 48, 48, 52, 52, 1, 0, 53, 54, 1, 0, 6, 9, 1, 0, 55, 56, 1, 0, 43, 44, 1, 0, 68, 70, 2, 0, 68, 69, 76, 76, 459, 0, 79, 1, 0, 0, 0, 2, 85, 1, 0, 0, 0, 4, 90, 1, 0, 0, 0, 6, 92, 1, 0, 0, 0, 8, 97, 1, 0, 0, 0, 10, 101, 1, 0, 0, 0, 12, 103, 1, 0, 0, 0, 14, 115, 1, 0, 0, 0, 16, 120, 1, 0, 0, 0, 18, 129, 1, 0, 0, 0, 20, 145, 1, 0, 0, 0, 22, 157, 1, 0, 0, 0, 24, 163, 1, 0, 0, 0, 26, 171, 1, 0, 0, 0, 28, 175, 1, 0, 0, 0, 30, 177, 1, 0, 0, 0, 32, 188, 1, 0, 0, 0, 34, 201, 1, 0, 0, 0, 36, 203, 1, 0, 0, 0, 38, 214, 1, 0, 0, 0, 40, 223, 1, 0, 0, 0, 42, 226, 1, 0, 0, 0, 44, 238, 1, 0, 0, 0, 46, 240, 1, 0, 0, 0, 48, 248, 1, 0, 0, 0, 50, 254, 1, 0, 0, 0, 52, 266, 1, 0, 0, 0, 54, 268, 1, 0, 0, 0, 56, 272, 1, 0, 0, 0, 58, 274, 1, 0, 0, 0, 60, 290, 1, 0, 0, 0, 62, 293, 1, 0, 0, 0, 64, 358, 1, 0, 0, 0, 66, 415, 1, 0, 0, 0, 68, 422, 1, 0, 0, 0, 70, 424, 1, 0, 0, 0, 72, 428, 1, 0, 0, 0, 74, 430, 1, 0, 0, 0, 76, 78, 3, 2, 1, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 82, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 83, 3, 12, 6, 0, 83, 84, 5, 0, 0, 1, 84, 1, 1, 0, 0, 0, 85, 86, 5, 1, 0, 0, 86, 87, 3, 4, 2, 0, 87, 88, 3, 6, 3, 0, 88, 89, 5, 2, 0, 0, 89, 3, 1, 0, 0, 0, 90, 91, 5, 3, 0, 0, 91, 5, 1, 0, 0, 0, 92, 94, 3, 8, 4, 0, 93, 95, 3, 8, 4, 0, 94, 93, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 7, 1, 0, 0, 0, 96, 98, 3, 10, 5, 0, 97, 96, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 5, 62, 0, 0, 100, 9, 1, 0, 0, 0, 101, 102, 7, 0, 0, 0, 102, 11, 1, 0, 0, 0, 103, 104, 5, 11, 0, 0, 104, 105, 5, 78, 0, 0, 105, 106, 3, 18, 9, 0, 106, 110, 5, 12, 0, 0, 107, 109, 3, 14, 7, 0, 108, 107, 1, 0, 0, 0, 109, 112, 1, 0, 0, 0, 110, 108, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 113, 1, 0, 0, 0, 112, 110, 1, 0, 0, 0, 113, 114, 5, 13, 0, 0, 114, 13, 1, 0, 0, 0, 115, 116, 5, 14, 0, 0, 116, 117, 5, 78, 0, 0, 117, 118, 3, 18, 9, 0, 118, 119, 3, 16, 8, 0, 119, 15, 1, 0, 0, 0, 120, 124, 5, 12, 0, 0, 121, 123, 3, 24, 12, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 127, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 128, 5, 13, 0, 0, 128, 17, 1, 0, 0, 0, 129, 141, 5, 15, 0, 0, 130, 135, 3, 20, 10, 0, 131, 132, 5, 16, 0, 0, 132, 134, 3, 20, 10, 0, 133, 131, 1, 0, 0, 0, 134, 137, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 138, 140, 5, 16, 0, 0, 139, 138, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 142, 1, 0, 0, 0, 141, 130, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 5, 17, 0, 0, 144, 19, 1, 0, 0, 0, 145, 146, 3, 72, 36, 0, 146, 147, 5, 78, 0, 0, 147, 21, 1, 0, 0, 0, 148, 152, 5, 12, 0, 0, 149, 151, 3, 24, 12, 0, 150, 149, 1, 0, 0, 0, 151, 154, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 155, 1, 0, 0, 0, 154, 152, 1, 0, 0, 0, 155, 158, 5, 13, 0, 0, 156, 158, 3, 24, 12, 0, 157, 148, 1, 0, 0, 0, 157, 156, 1, 0, 0, 0, 158, 23, 1, 0, 0, 0, 159, 164, 3, 28, 14, 0, 160, 161, 3, 26, 13, 0, 161, 162, 5, 2, 0, 0, 162, 164, 1, 0, 0, 0, 163, 159, 1, 0, 0, 0, 163, 160, 1, 0, 0, 0, 164, 25, 1, 0, 0, 0, 165, 172, 3, 30, 15, 0, 166, 172, 3, 32, 16, 0, 167, 172, 3, 34, 17, 0, 168, 172, 3, 36, 18, 0, 169, 172, 3, 38, 19, 0, 170, 172, 3, 40, 20, 0, 171, 165, 1, 0, 0, 0, 171, 166, 1, 0, 0, 0, 171, 167, 1, 0, 0, 0, 171, 168, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 171, 170, 1, 0, 0, 0, 172, 27, 1, 0, 0, 0, 173, 176, 3, 42, 21, 0, 174, 176, 3, 44, 22, 0, 175, 173, 1, 0, 0, 0, 175, 174, 1, 0, 0, 0, 176, 29, 1, 0, 0, 0, 177, 181, 3, 72, 36, 0, 178, 180, 3, 66, 33, 0, 179, 178, 1, 0, 0, 0, 180, 183, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 184, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 184, 185, 5, 78, 0, 0, 185, 186, 5, 10, 0, 0, 186, 187, 3, 64, 32, 0, 187, 31, 1, 0, 0, 0, 188, 189, 3, 72, 36, 0, 189, 190, 5, 78, 0, 0, 190, 191, 5, 16, 0, 0, 191, 192, 3, 72, 36, 0, 192, 193, 5, 78, 0, 0, 193, 194, 5, 10, 0, 0, 194, 195, 3, 64, 32, 0, 195, 33, 1, 0, 0, 0, 196, 197, 5, 78, 0, 0, 197, 198, 7, 1, 0, 0, 198, 202, 3, 64, 32, 0, 199, 200, 5, 78, 0, 0, 200, 202, 7, 2, 0, 0, 201, 196, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 202, 35, 1, 0, 0, 0, 203, 204, 5, 22, 0, 0, 204, 205, 5, 15, 0, 0, 205, 206, 5, 75, 0, 0, 206, 207, 5, 6, 0, 0, 207, 210, 3, 64, 32, 0, 208, 209, 5, 16, 0, 0, 209, 211, 3, 54, 27, 0, 210, 208, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 213, 5, 17, 0, 0, 213, 37, 1, 0, 0, 0, 214, 215, 5, 22, 0, 0, 215, 216, 5, 15, 0, 0, 216, 219, 3, 64, 32, 0, 217, 218, 5, 16, 0, 0, 218, 220, 3, 54, 27, 0, 219, 217, 1, 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 221, 1, 0, 0, 0, 221, 222, 5, 17, 0, 0, 222, 39, 1, 0, 0, 0, 223, 224, 5, 23, 0, 0, 224, 225, 3, 58, 29, 0, 225, 41, 1, 0, 0, 0, 226, 227, 5, 24, 0, 0, 227, 228, 5, 15, 0, 0, 228, 229, 3, 64, 32, 0, 229, 230, 5, 17, 0, 0, 230, 233, 3, 22, 11, 0, 231, 232, 5, 25, 0, 0, 232, 234, 3, 22, 11, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 43, 1, 0, 0, 0, 235, 239, 3, 46, 23, 0, 236, 239, 3, 48, 24, 0, 237, 239, 3, 50, 25, 0, 238, 235, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 238, 237, 1, 0, 0, 0, 239, 45, 1, 0, 0, 0, 240, 241, 5, 26, 0, 0, 241, 242, 3, 22, 11, 0, 242, 243, 5, 27, 0, 0, 243, 244, 5, 15, 0, 0, 244, 245, 3, 64, 32, 0, 245, 246, 5, 17, 0, 0, 246, 247, 5, 2, 0, 0, 247, 47, 1, 0, 0, 0, 248, 249, 5, 27, 0, 0, 249, 250, 5, 15, 0, 0, 250, 251, 3, 64, 32, 0, 251, 252, 5, 17, 0, 0, 252, 253, 3, 22, 11, 0, 253, 49, 1, 0, 0, 0, 254, 255, 5, 28, 0, 0, 255, 256, 5, 15, 0, 0, 256, 257, 3, 52, 26, 0, 257, 258, 5, 2, 0, 0, 258, 259, 3, 64, 32, 0, 259, 260, 5, 2, 0, 0, 260, 261, 3, 34, 17, 0, 261, 262, 5, 17, 0, 0, 262, 263, 3, 22, 11, 0, 263, 51, 1, 0, 0, 0, 264, 267, 3, 30, 15, 0, 265, 267, 3, 34, 17, 0, 266, 264, 1, 0, 0, 0, 266, 265, 1, 0, 0, 0, 267, 53, 1, 0, 0, 0, 268, 269, 5, 72, 0, 0, 269, 55, 1, 0, 0, 0, 270, 273, 5, 78, 0, 0, 271, 273, 3, 68, 34, 0, 272, 270, 1, 0, 0, 0, 272, 271, 1, 0, 0, 0, 273, 57, 1, 0, 0, 0, 274, 286, 5, 15, 0, 0, 275, 280, 3, 56, 28, 0, 276, 277, 5, 16, 0, 0, 277, 279, 3, 56, 28, 0, 278, 276, 1, 0, 0, 0, 279, 282, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 284, 1, 0, 0, 0, 282, 280, 1, 0, 0, 0, 283, 285, 5, 16, 0, 0, 284, 283, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 287, 1, 0, 0, 0, 286, 275, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 289, 5, 17, 0, 0, 289, 59, 1, 0, 0, 0, 290, 291, 5, 78, 0, 0, 291, 292, 3, 62, 31, 0, 292, 61, 1, 0, 0, 0, 293, 305, 5, 15, 0, 0, 294, 299, 3, 64, 32, 0, 295, 296, 5, 16, 0, 0, 296, 298, 3, 64, 32, 0, 297, 295, 1, 0, 0, 0, 298, 301, 1, 0, 0, 0, 299, 297, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 303, 1, 0, 0, 0, 301, 299, 1, 0, 0, 0, 302, 304, 5, 16, 0, 0, 303, 302, 1, 0, 0, 0, 303, 304, 1, 0, 0, 0, 304, 306, 1, 0, 0, 0, 305, 294, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 5, 17, 0, 0, 308, 63, 1, 0, 0, 0, 309, 310, 6, 32, -1, 0, 310, 311, 5, 15, 0, 0, 311, 312, 3, 64, 32, 0, 312, 313, 5, 17, 0, 0, 313, 359, 1, 0, 0, 0, 314, 315, 3, 74, 37, 0, 315, 316, 5, 15, 0, 0, 316, 318, 3, 64, 32, 0, 317, 319, 5, 16, 0, 0, 318, 317, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 321, 5, 17, 0, 0, 321, 359, 1, 0, 0, 0, 322, 359, 3, 60, 30, 0, 323, 324, 5, 29, 0, 0, 324, 325, 5, 78, 0, 0, 325, 359, 3, 62, 31, 0, 326, 327, 5, 32, 0, 0, 327, 328, 5, 30, 0, 0, 328, 329, 3, 64, 32, 0, 329, 330, 5, 31, 0, 0, 330, 331, 7, 3, 0, 0, 331, 359, 1, 0, 0, 0, 332, 333, 5, 38, 0, 0, 333, 334, 5, 30, 0, 0, 334, 335, 3, 64, 32, 0, 335, 336, 5, 31, 0, 0, 336, 337, 7, 4, 0, 0, 337, 359, 1, 0, 0, 0, 338, 339, 7, 5, 0, 0, 339, 359, 3, 64, 32, 15, 340, 352, 5, 30, 0, 0, 341, 346, 3, 64, 32, 0, 342, 343, 5, 16, 0, 0, 343, 345, 3, 64, 32, 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, 16, 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, 359, 5, 31, 0, 0, 355, 359, 5, 77, 0, 0, 356, 359, 5, 78, 0, 0, 357, 359, 3, 68, 34, 0, 358, 309, 1, 0, 0, 0, 358, 314, 1, 0, 0, 0, 358, 322, 1, 0, 0, 0, 358, 323, 1, 0, 0, 0, 358, 326, 1, 0, 0, 0, 358, 332, 1, 0, 0, 0, 358, 338, 1, 0, 0, 0, 358, 340, 1, 0, 0, 0, 358, 355, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 358, 357, 1, 0, 0, 0, 359, 412, 1, 0, 0, 0, 360, 361, 10, 14, 0, 0, 361, 362, 7, 6, 0, 0, 362, 411, 3, 64, 32, 15, 363, 364, 10, 13, 0, 0, 364, 365, 7, 7, 0, 0, 365, 411, 3, 64, 32, 14, 366, 367, 10, 12, 0, 0, 367, 368, 7, 8, 0, 0, 368, 411, 3, 64, 32, 13, 369, 370, 10, 11, 0, 0, 370, 371, 7, 9, 0, 0, 371, 411, 3, 64, 32, 12, 372, 373, 10, 10, 0, 0, 373, 374, 7, 10, 0, 0, 374, 411, 3, 64, 32, 11, 375, 376, 10, 9, 0, 0, 376, 377, 5, 57, 0, 0, 377, 411, 3, 64, 32, 10, 378, 379, 10, 8, 0, 0, 379, 380, 5, 4, 0, 0, 380, 411, 3, 64, 32, 9, 381, 382, 10, 7, 0, 0, 382, 383, 5, 58, 0, 0, 383, 411, 3, 64, 32, 8, 384, 385, 10, 6, 0, 0, 385, 386, 5, 59, 0, 0, 386, 411, 3, 64, 32, 7, 387, 388, 10, 5, 0, 0, 388, 389, 5, 60, 0, 0, 389, 411, 3, 64, 32, 6, 390, 391, 10, 21, 0, 0, 391, 392, 5, 30, 0, 0, 392, 393, 5, 65, 0, 0, 393, 411, 5, 31, 0, 0, 394, 395, 10, 18, 0, 0, 395, 411, 7, 11, 0, 0, 396, 397, 10, 17, 0, 0, 397, 398, 5, 45, 0, 0, 398, 399, 5, 15, 0, 0, 399, 400, 3, 64, 32, 0, 400, 401, 5, 17, 0, 0, 401, 411, 1, 0, 0, 0, 402, 403, 10, 16, 0, 0, 403, 404, 5, 46, 0, 0, 404, 405, 5, 15, 0, 0, 405, 406, 3, 64, 32, 0, 406, 407, 5, 16, 0, 0, 407, 408, 3, 64, 32, 0, 408, 409, 5, 17, 0, 0, 409, 411, 1, 0, 0, 0, 410, 360, 1, 0, 0, 0, 410, 363, 1, 0, 0, 0, 410, 366, 1, 0, 0, 0, 410, 369, 1, 0, 0, 0, 410, 372, 1, 0, 0, 0, 410, 375, 1, 0, 0, 0, 410, 378, 1, 0, 0, 0, 410, 381, 1, 0, 0, 0, 410, 384, 1, 0, 0, 0, 410, 387, 1, 0, 0, 0, 410, 390, 1, 0, 0, 0, 410, 394, 1, 0, 0, 0, 410, 396, 1, 0, 0, 0, 410, 402, 1, 0, 0, 0, 411, 414, 1, 0, 0, 0, 412, 410, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 65, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 415, 416, 5, 61, 0, 0, 416, 67, 1, 0, 0, 0, 417, 423, 5, 63, 0, 0, 418, 423, 3, 70, 35, 0, 419, 423, 5, 72, 0, 0, 420, 423, 5, 73, 0, 0, 421, 423, 5, 74, 0, 0, 422, 417, 1, 0, 0, 0, 422, 418, 1, 0, 0, 0, 422, 419, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 422, 421, 1, 0, 0, 0, 423, 69, 1, 0, 0, 0, 424, 426, 5, 65, 0, 0, 425, 427, 5, 64, 0, 0, 426, 425, 1, 0, 0, 0, 426, 427, 1, 0, 0, 0, 427, 71, 1, 0, 0, 0, 428, 429, 7, 12, 0, 0, 429, 73, 1, 0, 0, 0, 430, 431, 7, 13, 0, 0, 431, 75, 1, 0, 0, 0, 36, 79, 94, 97, 110, 124, 135, 139, 141, 152, 157, 163, 171, 175, 181, 201, 210, 219, 233, 238, 266, 272, 280, 284, 286, 299, 303, 305, 318, 346, 350, 352, 358, 410, 412, 422, 426] \ No newline at end of file +[4, 1, 83, 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, 1, 0, 5, 0, 80, 8, 0, 10, 0, 12, 0, 83, 9, 0, 1, 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, 97, 8, 3, 1, 4, 3, 4, 100, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 111, 8, 6, 10, 6, 12, 6, 114, 9, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 126, 8, 7, 10, 7, 12, 7, 129, 9, 7, 1, 7, 1, 7, 3, 7, 133, 8, 7, 1, 7, 1, 7, 1, 8, 1, 8, 5, 8, 139, 8, 8, 10, 8, 12, 8, 142, 9, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 150, 8, 9, 10, 9, 12, 9, 153, 9, 9, 1, 9, 3, 9, 156, 8, 9, 3, 9, 158, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 5, 11, 167, 8, 11, 10, 11, 12, 11, 170, 9, 11, 1, 11, 1, 11, 3, 11, 174, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 180, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 189, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 195, 8, 14, 10, 14, 12, 14, 198, 9, 14, 1, 15, 1, 15, 3, 15, 202, 8, 15, 1, 16, 1, 16, 5, 16, 206, 8, 16, 10, 16, 12, 16, 209, 9, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 4, 17, 221, 8, 17, 11, 17, 12, 17, 222, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 4, 17, 235, 8, 17, 11, 17, 12, 17, 236, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 243, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 250, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 259, 8, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 268, 8, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 282, 8, 22, 1, 23, 1, 23, 1, 23, 3, 23, 287, 8, 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, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 3, 27, 315, 8, 27, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 321, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 327, 8, 30, 10, 30, 12, 30, 330, 9, 30, 1, 30, 3, 30, 333, 8, 30, 3, 30, 335, 8, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 346, 8, 32, 10, 32, 12, 32, 349, 9, 32, 1, 32, 3, 32, 352, 8, 32, 3, 32, 354, 8, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 367, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 5, 33, 393, 8, 33, 10, 33, 12, 33, 396, 9, 33, 1, 33, 3, 33, 399, 8, 33, 3, 33, 401, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 407, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 5, 33, 459, 8, 33, 10, 33, 12, 33, 462, 9, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 471, 8, 35, 1, 36, 1, 36, 3, 36, 475, 8, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 0, 1, 66, 39, 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, 0, 14, 1, 0, 4, 10, 2, 0, 10, 10, 20, 21, 1, 0, 22, 23, 1, 0, 35, 39, 2, 0, 35, 39, 41, 44, 2, 0, 5, 5, 49, 50, 1, 0, 51, 53, 2, 0, 50, 50, 54, 54, 1, 0, 55, 56, 1, 0, 6, 9, 1, 0, 57, 58, 1, 0, 45, 46, 1, 0, 70, 72, 2, 0, 70, 71, 78, 78, 513, 0, 81, 1, 0, 0, 0, 2, 87, 1, 0, 0, 0, 4, 92, 1, 0, 0, 0, 6, 94, 1, 0, 0, 0, 8, 99, 1, 0, 0, 0, 10, 103, 1, 0, 0, 0, 12, 105, 1, 0, 0, 0, 14, 117, 1, 0, 0, 0, 16, 136, 1, 0, 0, 0, 18, 145, 1, 0, 0, 0, 20, 161, 1, 0, 0, 0, 22, 173, 1, 0, 0, 0, 24, 179, 1, 0, 0, 0, 26, 188, 1, 0, 0, 0, 28, 190, 1, 0, 0, 0, 30, 201, 1, 0, 0, 0, 32, 203, 1, 0, 0, 0, 34, 242, 1, 0, 0, 0, 36, 249, 1, 0, 0, 0, 38, 251, 1, 0, 0, 0, 40, 262, 1, 0, 0, 0, 42, 271, 1, 0, 0, 0, 44, 274, 1, 0, 0, 0, 46, 286, 1, 0, 0, 0, 48, 288, 1, 0, 0, 0, 50, 296, 1, 0, 0, 0, 52, 302, 1, 0, 0, 0, 54, 314, 1, 0, 0, 0, 56, 316, 1, 0, 0, 0, 58, 320, 1, 0, 0, 0, 60, 322, 1, 0, 0, 0, 62, 338, 1, 0, 0, 0, 64, 341, 1, 0, 0, 0, 66, 406, 1, 0, 0, 0, 68, 463, 1, 0, 0, 0, 70, 470, 1, 0, 0, 0, 72, 472, 1, 0, 0, 0, 74, 476, 1, 0, 0, 0, 76, 478, 1, 0, 0, 0, 78, 80, 3, 2, 1, 0, 79, 78, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 84, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 84, 85, 3, 12, 6, 0, 85, 86, 5, 0, 0, 1, 86, 1, 1, 0, 0, 0, 87, 88, 5, 1, 0, 0, 88, 89, 3, 4, 2, 0, 89, 90, 3, 6, 3, 0, 90, 91, 5, 2, 0, 0, 91, 3, 1, 0, 0, 0, 92, 93, 5, 3, 0, 0, 93, 5, 1, 0, 0, 0, 94, 96, 3, 8, 4, 0, 95, 97, 3, 8, 4, 0, 96, 95, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 7, 1, 0, 0, 0, 98, 100, 3, 10, 5, 0, 99, 98, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 102, 5, 64, 0, 0, 102, 9, 1, 0, 0, 0, 103, 104, 7, 0, 0, 0, 104, 11, 1, 0, 0, 0, 105, 106, 5, 11, 0, 0, 106, 107, 5, 80, 0, 0, 107, 108, 3, 18, 9, 0, 108, 112, 5, 12, 0, 0, 109, 111, 3, 14, 7, 0, 110, 109, 1, 0, 0, 0, 111, 114, 1, 0, 0, 0, 112, 110, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 115, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 115, 116, 5, 13, 0, 0, 116, 13, 1, 0, 0, 0, 117, 118, 5, 14, 0, 0, 118, 119, 5, 80, 0, 0, 119, 132, 3, 18, 9, 0, 120, 121, 5, 15, 0, 0, 121, 122, 5, 16, 0, 0, 122, 127, 3, 74, 37, 0, 123, 124, 5, 17, 0, 0, 124, 126, 3, 74, 37, 0, 125, 123, 1, 0, 0, 0, 126, 129, 1, 0, 0, 0, 127, 125, 1, 0, 0, 0, 127, 128, 1, 0, 0, 0, 128, 130, 1, 0, 0, 0, 129, 127, 1, 0, 0, 0, 130, 131, 5, 18, 0, 0, 131, 133, 1, 0, 0, 0, 132, 120, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 135, 3, 16, 8, 0, 135, 15, 1, 0, 0, 0, 136, 140, 5, 12, 0, 0, 137, 139, 3, 24, 12, 0, 138, 137, 1, 0, 0, 0, 139, 142, 1, 0, 0, 0, 140, 138, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 143, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 143, 144, 5, 13, 0, 0, 144, 17, 1, 0, 0, 0, 145, 157, 5, 16, 0, 0, 146, 151, 3, 20, 10, 0, 147, 148, 5, 17, 0, 0, 148, 150, 3, 20, 10, 0, 149, 147, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 155, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 156, 5, 17, 0, 0, 155, 154, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 158, 1, 0, 0, 0, 157, 146, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 160, 5, 18, 0, 0, 160, 19, 1, 0, 0, 0, 161, 162, 3, 74, 37, 0, 162, 163, 5, 80, 0, 0, 163, 21, 1, 0, 0, 0, 164, 168, 5, 12, 0, 0, 165, 167, 3, 24, 12, 0, 166, 165, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, 169, 1, 0, 0, 0, 169, 171, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 174, 5, 13, 0, 0, 172, 174, 3, 24, 12, 0, 173, 164, 1, 0, 0, 0, 173, 172, 1, 0, 0, 0, 174, 23, 1, 0, 0, 0, 175, 180, 3, 30, 15, 0, 176, 177, 3, 26, 13, 0, 177, 178, 5, 2, 0, 0, 178, 180, 1, 0, 0, 0, 179, 175, 1, 0, 0, 0, 179, 176, 1, 0, 0, 0, 180, 25, 1, 0, 0, 0, 181, 189, 3, 32, 16, 0, 182, 189, 3, 34, 17, 0, 183, 189, 3, 36, 18, 0, 184, 189, 3, 38, 19, 0, 185, 189, 3, 40, 20, 0, 186, 189, 3, 42, 21, 0, 187, 189, 3, 28, 14, 0, 188, 181, 1, 0, 0, 0, 188, 182, 1, 0, 0, 0, 188, 183, 1, 0, 0, 0, 188, 184, 1, 0, 0, 0, 188, 185, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 188, 187, 1, 0, 0, 0, 189, 27, 1, 0, 0, 0, 190, 191, 5, 19, 0, 0, 191, 196, 3, 66, 33, 0, 192, 193, 5, 17, 0, 0, 193, 195, 3, 66, 33, 0, 194, 192, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 29, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 202, 3, 44, 22, 0, 200, 202, 3, 46, 23, 0, 201, 199, 1, 0, 0, 0, 201, 200, 1, 0, 0, 0, 202, 31, 1, 0, 0, 0, 203, 207, 3, 74, 37, 0, 204, 206, 3, 68, 34, 0, 205, 204, 1, 0, 0, 0, 206, 209, 1, 0, 0, 0, 207, 205, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 210, 1, 0, 0, 0, 209, 207, 1, 0, 0, 0, 210, 211, 5, 80, 0, 0, 211, 212, 5, 10, 0, 0, 212, 213, 3, 66, 33, 0, 213, 33, 1, 0, 0, 0, 214, 215, 3, 74, 37, 0, 215, 220, 5, 80, 0, 0, 216, 217, 5, 17, 0, 0, 217, 218, 3, 74, 37, 0, 218, 219, 5, 80, 0, 0, 219, 221, 1, 0, 0, 0, 220, 216, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 225, 5, 10, 0, 0, 225, 226, 3, 66, 33, 0, 226, 243, 1, 0, 0, 0, 227, 228, 5, 16, 0, 0, 228, 229, 3, 74, 37, 0, 229, 234, 5, 80, 0, 0, 230, 231, 5, 17, 0, 0, 231, 232, 3, 74, 37, 0, 232, 233, 5, 80, 0, 0, 233, 235, 1, 0, 0, 0, 234, 230, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 239, 5, 18, 0, 0, 239, 240, 5, 10, 0, 0, 240, 241, 3, 66, 33, 0, 241, 243, 1, 0, 0, 0, 242, 214, 1, 0, 0, 0, 242, 227, 1, 0, 0, 0, 243, 35, 1, 0, 0, 0, 244, 245, 5, 80, 0, 0, 245, 246, 7, 1, 0, 0, 246, 250, 3, 66, 33, 0, 247, 248, 5, 80, 0, 0, 248, 250, 7, 2, 0, 0, 249, 244, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 250, 37, 1, 0, 0, 0, 251, 252, 5, 24, 0, 0, 252, 253, 5, 16, 0, 0, 253, 254, 5, 77, 0, 0, 254, 255, 5, 6, 0, 0, 255, 258, 3, 66, 33, 0, 256, 257, 5, 17, 0, 0, 257, 259, 3, 56, 28, 0, 258, 256, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 5, 18, 0, 0, 261, 39, 1, 0, 0, 0, 262, 263, 5, 24, 0, 0, 263, 264, 5, 16, 0, 0, 264, 267, 3, 66, 33, 0, 265, 266, 5, 17, 0, 0, 266, 268, 3, 56, 28, 0, 267, 265, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 270, 5, 18, 0, 0, 270, 41, 1, 0, 0, 0, 271, 272, 5, 25, 0, 0, 272, 273, 3, 60, 30, 0, 273, 43, 1, 0, 0, 0, 274, 275, 5, 26, 0, 0, 275, 276, 5, 16, 0, 0, 276, 277, 3, 66, 33, 0, 277, 278, 5, 18, 0, 0, 278, 281, 3, 22, 11, 0, 279, 280, 5, 27, 0, 0, 280, 282, 3, 22, 11, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 45, 1, 0, 0, 0, 283, 287, 3, 48, 24, 0, 284, 287, 3, 50, 25, 0, 285, 287, 3, 52, 26, 0, 286, 283, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 285, 1, 0, 0, 0, 287, 47, 1, 0, 0, 0, 288, 289, 5, 28, 0, 0, 289, 290, 3, 22, 11, 0, 290, 291, 5, 29, 0, 0, 291, 292, 5, 16, 0, 0, 292, 293, 3, 66, 33, 0, 293, 294, 5, 18, 0, 0, 294, 295, 5, 2, 0, 0, 295, 49, 1, 0, 0, 0, 296, 297, 5, 29, 0, 0, 297, 298, 5, 16, 0, 0, 298, 299, 3, 66, 33, 0, 299, 300, 5, 18, 0, 0, 300, 301, 3, 22, 11, 0, 301, 51, 1, 0, 0, 0, 302, 303, 5, 30, 0, 0, 303, 304, 5, 16, 0, 0, 304, 305, 3, 54, 27, 0, 305, 306, 5, 2, 0, 0, 306, 307, 3, 66, 33, 0, 307, 308, 5, 2, 0, 0, 308, 309, 3, 36, 18, 0, 309, 310, 5, 18, 0, 0, 310, 311, 3, 22, 11, 0, 311, 53, 1, 0, 0, 0, 312, 315, 3, 32, 16, 0, 313, 315, 3, 36, 18, 0, 314, 312, 1, 0, 0, 0, 314, 313, 1, 0, 0, 0, 315, 55, 1, 0, 0, 0, 316, 317, 5, 74, 0, 0, 317, 57, 1, 0, 0, 0, 318, 321, 5, 80, 0, 0, 319, 321, 3, 70, 35, 0, 320, 318, 1, 0, 0, 0, 320, 319, 1, 0, 0, 0, 321, 59, 1, 0, 0, 0, 322, 334, 5, 16, 0, 0, 323, 328, 3, 58, 29, 0, 324, 325, 5, 17, 0, 0, 325, 327, 3, 58, 29, 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, 17, 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, 18, 0, 0, 337, 61, 1, 0, 0, 0, 338, 339, 5, 80, 0, 0, 339, 340, 3, 64, 32, 0, 340, 63, 1, 0, 0, 0, 341, 353, 5, 16, 0, 0, 342, 347, 3, 66, 33, 0, 343, 344, 5, 17, 0, 0, 344, 346, 3, 66, 33, 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, 17, 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, 18, 0, 0, 356, 65, 1, 0, 0, 0, 357, 358, 6, 33, -1, 0, 358, 359, 5, 16, 0, 0, 359, 360, 3, 66, 33, 0, 360, 361, 5, 18, 0, 0, 361, 407, 1, 0, 0, 0, 362, 363, 3, 76, 38, 0, 363, 364, 5, 16, 0, 0, 364, 366, 3, 66, 33, 0, 365, 367, 5, 17, 0, 0, 366, 365, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 369, 5, 18, 0, 0, 369, 407, 1, 0, 0, 0, 370, 407, 3, 62, 31, 0, 371, 372, 5, 31, 0, 0, 372, 373, 5, 80, 0, 0, 373, 407, 3, 64, 32, 0, 374, 375, 5, 34, 0, 0, 375, 376, 5, 32, 0, 0, 376, 377, 3, 66, 33, 0, 377, 378, 5, 33, 0, 0, 378, 379, 7, 3, 0, 0, 379, 407, 1, 0, 0, 0, 380, 381, 5, 40, 0, 0, 381, 382, 5, 32, 0, 0, 382, 383, 3, 66, 33, 0, 383, 384, 5, 33, 0, 0, 384, 385, 7, 4, 0, 0, 385, 407, 1, 0, 0, 0, 386, 387, 7, 5, 0, 0, 387, 407, 3, 66, 33, 15, 388, 400, 5, 32, 0, 0, 389, 394, 3, 66, 33, 0, 390, 391, 5, 17, 0, 0, 391, 393, 3, 66, 33, 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, 17, 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, 33, 0, 0, 403, 407, 5, 79, 0, 0, 404, 407, 5, 80, 0, 0, 405, 407, 3, 70, 35, 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, 66, 33, 15, 411, 412, 10, 13, 0, 0, 412, 413, 7, 7, 0, 0, 413, 459, 3, 66, 33, 14, 414, 415, 10, 12, 0, 0, 415, 416, 7, 8, 0, 0, 416, 459, 3, 66, 33, 13, 417, 418, 10, 11, 0, 0, 418, 419, 7, 9, 0, 0, 419, 459, 3, 66, 33, 12, 420, 421, 10, 10, 0, 0, 421, 422, 7, 10, 0, 0, 422, 459, 3, 66, 33, 11, 423, 424, 10, 9, 0, 0, 424, 425, 5, 59, 0, 0, 425, 459, 3, 66, 33, 10, 426, 427, 10, 8, 0, 0, 427, 428, 5, 4, 0, 0, 428, 459, 3, 66, 33, 9, 429, 430, 10, 7, 0, 0, 430, 431, 5, 60, 0, 0, 431, 459, 3, 66, 33, 8, 432, 433, 10, 6, 0, 0, 433, 434, 5, 61, 0, 0, 434, 459, 3, 66, 33, 7, 435, 436, 10, 5, 0, 0, 436, 437, 5, 62, 0, 0, 437, 459, 3, 66, 33, 6, 438, 439, 10, 21, 0, 0, 439, 440, 5, 32, 0, 0, 440, 441, 5, 67, 0, 0, 441, 459, 5, 33, 0, 0, 442, 443, 10, 18, 0, 0, 443, 459, 7, 11, 0, 0, 444, 445, 10, 17, 0, 0, 445, 446, 5, 47, 0, 0, 446, 447, 5, 16, 0, 0, 447, 448, 3, 66, 33, 0, 448, 449, 5, 18, 0, 0, 449, 459, 1, 0, 0, 0, 450, 451, 10, 16, 0, 0, 451, 452, 5, 48, 0, 0, 452, 453, 5, 16, 0, 0, 453, 454, 3, 66, 33, 0, 454, 455, 5, 17, 0, 0, 455, 456, 3, 66, 33, 0, 456, 457, 5, 18, 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, 67, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 464, 5, 63, 0, 0, 464, 69, 1, 0, 0, 0, 465, 471, 5, 65, 0, 0, 466, 471, 3, 72, 36, 0, 467, 471, 5, 74, 0, 0, 468, 471, 5, 75, 0, 0, 469, 471, 5, 76, 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, 71, 1, 0, 0, 0, 472, 474, 5, 67, 0, 0, 473, 475, 5, 66, 0, 0, 474, 473, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 73, 1, 0, 0, 0, 476, 477, 7, 12, 0, 0, 477, 75, 1, 0, 0, 0, 478, 479, 7, 13, 0, 0, 479, 77, 1, 0, 0, 0, 42, 81, 96, 99, 112, 127, 132, 140, 151, 155, 157, 168, 173, 179, 188, 196, 201, 207, 222, 236, 242, 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 diff --git a/packages/cashc/src/grammar/CashScript.tokens b/packages/cashc/src/grammar/CashScript.tokens index b9cfb61b..0d18270e 100644 --- a/packages/cashc/src/grammar/CashScript.tokens +++ b/packages/cashc/src/grammar/CashScript.tokens @@ -59,26 +59,28 @@ T__57=58 T__58=59 T__59=60 T__60=61 -VersionLiteral=62 -BooleanLiteral=63 -NumberUnit=64 -NumberLiteral=65 -NumberPart=66 -ExponentPart=67 -PrimitiveType=68 -UnboundedBytes=69 -BoundedBytes=70 -Bound=71 -StringLiteral=72 -DateLiteral=73 -HexLiteral=74 -TxVar=75 -UnsafeCast=76 -NullaryOp=77 -Identifier=78 -WHITESPACE=79 -COMMENT=80 -LINE_COMMENT=81 +T__61=62 +T__62=63 +VersionLiteral=64 +BooleanLiteral=65 +NumberUnit=66 +NumberLiteral=67 +NumberPart=68 +ExponentPart=69 +PrimitiveType=70 +UnboundedBytes=71 +BoundedBytes=72 +Bound=73 +StringLiteral=74 +DateLiteral=75 +HexLiteral=76 +TxVar=77 +UnsafeCast=78 +NullaryOp=79 +Identifier=80 +WHITESPACE=81 +COMMENT=82 +LINE_COMMENT=83 'pragma'=1 ';'=2 'cashscript'=3 @@ -93,51 +95,53 @@ LINE_COMMENT=81 '{'=12 '}'=13 'function'=14 -'('=15 -','=16 -')'=17 -'+='=18 -'-='=19 -'++'=20 -'--'=21 -'require'=22 -'console.log'=23 -'if'=24 -'else'=25 -'do'=26 -'while'=27 -'for'=28 -'new'=29 -'['=30 -']'=31 -'tx.outputs'=32 -'.value'=33 -'.lockingBytecode'=34 -'.tokenCategory'=35 -'.nftCommitment'=36 -'.tokenAmount'=37 -'tx.inputs'=38 -'.outpointTransactionHash'=39 -'.outpointIndex'=40 -'.unlockingBytecode'=41 -'.sequenceNumber'=42 -'.reverse()'=43 -'.length'=44 -'.split'=45 -'.slice'=46 -'!'=47 -'-'=48 -'*'=49 -'/'=50 -'%'=51 -'+'=52 -'>>'=53 -'<<'=54 -'=='=55 -'!='=56 -'&'=57 -'|'=58 -'&&'=59 -'||'=60 -'constant'=61 -'bytes'=69 +'returns'=15 +'('=16 +','=17 +')'=18 +'return'=19 +'+='=20 +'-='=21 +'++'=22 +'--'=23 +'require'=24 +'console.log'=25 +'if'=26 +'else'=27 +'do'=28 +'while'=29 +'for'=30 +'new'=31 +'['=32 +']'=33 +'tx.outputs'=34 +'.value'=35 +'.lockingBytecode'=36 +'.tokenCategory'=37 +'.nftCommitment'=38 +'.tokenAmount'=39 +'tx.inputs'=40 +'.outpointTransactionHash'=41 +'.outpointIndex'=42 +'.unlockingBytecode'=43 +'.sequenceNumber'=44 +'.reverse()'=45 +'.length'=46 +'.split'=47 +'.slice'=48 +'!'=49 +'-'=50 +'*'=51 +'/'=52 +'%'=53 +'+'=54 +'>>'=55 +'<<'=56 +'=='=57 +'!='=58 +'&'=59 +'|'=60 +'&&'=61 +'||'=62 +'constant'=63 +'bytes'=71 diff --git a/packages/cashc/src/grammar/CashScriptLexer.interp b/packages/cashc/src/grammar/CashScriptLexer.interp index e2bb72fc..eacf7448 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.interp +++ b/packages/cashc/src/grammar/CashScriptLexer.interp @@ -14,9 +14,11 @@ null '{' '}' 'function' +'returns' '(' ',' ')' +'return' '+=' '-=' '++' @@ -145,6 +147,8 @@ null null null null +null +null VersionLiteral BooleanLiteral NumberUnit @@ -228,6 +232,8 @@ T__57 T__58 T__59 T__60 +T__61 +T__62 VersionLiteral BooleanLiteral NumberUnit @@ -257,4 +263,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 81, 938, 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, 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, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 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, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 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, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 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, 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, 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, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 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, 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, 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, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 4, 61, 529, 8, 61, 11, 61, 12, 61, 530, 1, 61, 1, 61, 4, 61, 535, 8, 61, 11, 61, 12, 61, 536, 1, 61, 1, 61, 4, 61, 541, 8, 61, 11, 61, 12, 61, 542, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 554, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 613, 8, 63, 1, 64, 3, 64, 616, 8, 64, 1, 64, 1, 64, 3, 64, 620, 8, 64, 1, 65, 4, 65, 623, 8, 65, 11, 65, 12, 65, 624, 1, 65, 1, 65, 4, 65, 629, 8, 65, 11, 65, 12, 65, 630, 5, 65, 633, 8, 65, 10, 65, 12, 65, 636, 9, 65, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 670, 8, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 3, 69, 689, 8, 69, 1, 70, 1, 70, 5, 70, 693, 8, 70, 10, 70, 12, 70, 696, 9, 70, 1, 71, 1, 71, 1, 71, 1, 71, 5, 71, 702, 8, 71, 10, 71, 12, 71, 705, 9, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 5, 71, 712, 8, 71, 10, 71, 12, 71, 715, 9, 71, 1, 71, 3, 71, 718, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 5, 73, 732, 8, 73, 10, 73, 12, 73, 735, 9, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 752, 8, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 3, 75, 789, 8, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 3, 75, 802, 8, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 3, 76, 898, 8, 76, 1, 77, 1, 77, 5, 77, 902, 8, 77, 10, 77, 12, 77, 905, 9, 77, 1, 78, 4, 78, 908, 8, 78, 11, 78, 12, 78, 909, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 5, 79, 918, 8, 79, 10, 79, 12, 79, 921, 9, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 5, 80, 932, 8, 80, 10, 80, 12, 80, 935, 9, 80, 1, 80, 1, 80, 3, 703, 713, 919, 0, 81, 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, 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, 982, 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, 1, 163, 1, 0, 0, 0, 3, 170, 1, 0, 0, 0, 5, 172, 1, 0, 0, 0, 7, 183, 1, 0, 0, 0, 9, 185, 1, 0, 0, 0, 11, 187, 1, 0, 0, 0, 13, 190, 1, 0, 0, 0, 15, 192, 1, 0, 0, 0, 17, 194, 1, 0, 0, 0, 19, 197, 1, 0, 0, 0, 21, 199, 1, 0, 0, 0, 23, 208, 1, 0, 0, 0, 25, 210, 1, 0, 0, 0, 27, 212, 1, 0, 0, 0, 29, 221, 1, 0, 0, 0, 31, 223, 1, 0, 0, 0, 33, 225, 1, 0, 0, 0, 35, 227, 1, 0, 0, 0, 37, 230, 1, 0, 0, 0, 39, 233, 1, 0, 0, 0, 41, 236, 1, 0, 0, 0, 43, 239, 1, 0, 0, 0, 45, 247, 1, 0, 0, 0, 47, 259, 1, 0, 0, 0, 49, 262, 1, 0, 0, 0, 51, 267, 1, 0, 0, 0, 53, 270, 1, 0, 0, 0, 55, 276, 1, 0, 0, 0, 57, 280, 1, 0, 0, 0, 59, 284, 1, 0, 0, 0, 61, 286, 1, 0, 0, 0, 63, 288, 1, 0, 0, 0, 65, 299, 1, 0, 0, 0, 67, 306, 1, 0, 0, 0, 69, 323, 1, 0, 0, 0, 71, 338, 1, 0, 0, 0, 73, 353, 1, 0, 0, 0, 75, 366, 1, 0, 0, 0, 77, 376, 1, 0, 0, 0, 79, 401, 1, 0, 0, 0, 81, 416, 1, 0, 0, 0, 83, 435, 1, 0, 0, 0, 85, 451, 1, 0, 0, 0, 87, 462, 1, 0, 0, 0, 89, 470, 1, 0, 0, 0, 91, 477, 1, 0, 0, 0, 93, 484, 1, 0, 0, 0, 95, 486, 1, 0, 0, 0, 97, 488, 1, 0, 0, 0, 99, 490, 1, 0, 0, 0, 101, 492, 1, 0, 0, 0, 103, 494, 1, 0, 0, 0, 105, 496, 1, 0, 0, 0, 107, 499, 1, 0, 0, 0, 109, 502, 1, 0, 0, 0, 111, 505, 1, 0, 0, 0, 113, 508, 1, 0, 0, 0, 115, 510, 1, 0, 0, 0, 117, 512, 1, 0, 0, 0, 119, 515, 1, 0, 0, 0, 121, 518, 1, 0, 0, 0, 123, 528, 1, 0, 0, 0, 125, 553, 1, 0, 0, 0, 127, 612, 1, 0, 0, 0, 129, 615, 1, 0, 0, 0, 131, 622, 1, 0, 0, 0, 133, 637, 1, 0, 0, 0, 135, 669, 1, 0, 0, 0, 137, 671, 1, 0, 0, 0, 139, 688, 1, 0, 0, 0, 141, 690, 1, 0, 0, 0, 143, 717, 1, 0, 0, 0, 145, 719, 1, 0, 0, 0, 147, 728, 1, 0, 0, 0, 149, 751, 1, 0, 0, 0, 151, 801, 1, 0, 0, 0, 153, 897, 1, 0, 0, 0, 155, 899, 1, 0, 0, 0, 157, 907, 1, 0, 0, 0, 159, 913, 1, 0, 0, 0, 161, 927, 1, 0, 0, 0, 163, 164, 5, 112, 0, 0, 164, 165, 5, 114, 0, 0, 165, 166, 5, 97, 0, 0, 166, 167, 5, 103, 0, 0, 167, 168, 5, 109, 0, 0, 168, 169, 5, 97, 0, 0, 169, 2, 1, 0, 0, 0, 170, 171, 5, 59, 0, 0, 171, 4, 1, 0, 0, 0, 172, 173, 5, 99, 0, 0, 173, 174, 5, 97, 0, 0, 174, 175, 5, 115, 0, 0, 175, 176, 5, 104, 0, 0, 176, 177, 5, 115, 0, 0, 177, 178, 5, 99, 0, 0, 178, 179, 5, 114, 0, 0, 179, 180, 5, 105, 0, 0, 180, 181, 5, 112, 0, 0, 181, 182, 5, 116, 0, 0, 182, 6, 1, 0, 0, 0, 183, 184, 5, 94, 0, 0, 184, 8, 1, 0, 0, 0, 185, 186, 5, 126, 0, 0, 186, 10, 1, 0, 0, 0, 187, 188, 5, 62, 0, 0, 188, 189, 5, 61, 0, 0, 189, 12, 1, 0, 0, 0, 190, 191, 5, 62, 0, 0, 191, 14, 1, 0, 0, 0, 192, 193, 5, 60, 0, 0, 193, 16, 1, 0, 0, 0, 194, 195, 5, 60, 0, 0, 195, 196, 5, 61, 0, 0, 196, 18, 1, 0, 0, 0, 197, 198, 5, 61, 0, 0, 198, 20, 1, 0, 0, 0, 199, 200, 5, 99, 0, 0, 200, 201, 5, 111, 0, 0, 201, 202, 5, 110, 0, 0, 202, 203, 5, 116, 0, 0, 203, 204, 5, 114, 0, 0, 204, 205, 5, 97, 0, 0, 205, 206, 5, 99, 0, 0, 206, 207, 5, 116, 0, 0, 207, 22, 1, 0, 0, 0, 208, 209, 5, 123, 0, 0, 209, 24, 1, 0, 0, 0, 210, 211, 5, 125, 0, 0, 211, 26, 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, 28, 1, 0, 0, 0, 221, 222, 5, 40, 0, 0, 222, 30, 1, 0, 0, 0, 223, 224, 5, 44, 0, 0, 224, 32, 1, 0, 0, 0, 225, 226, 5, 41, 0, 0, 226, 34, 1, 0, 0, 0, 227, 228, 5, 43, 0, 0, 228, 229, 5, 61, 0, 0, 229, 36, 1, 0, 0, 0, 230, 231, 5, 45, 0, 0, 231, 232, 5, 61, 0, 0, 232, 38, 1, 0, 0, 0, 233, 234, 5, 43, 0, 0, 234, 235, 5, 43, 0, 0, 235, 40, 1, 0, 0, 0, 236, 237, 5, 45, 0, 0, 237, 238, 5, 45, 0, 0, 238, 42, 1, 0, 0, 0, 239, 240, 5, 114, 0, 0, 240, 241, 5, 101, 0, 0, 241, 242, 5, 113, 0, 0, 242, 243, 5, 117, 0, 0, 243, 244, 5, 105, 0, 0, 244, 245, 5, 114, 0, 0, 245, 246, 5, 101, 0, 0, 246, 44, 1, 0, 0, 0, 247, 248, 5, 99, 0, 0, 248, 249, 5, 111, 0, 0, 249, 250, 5, 110, 0, 0, 250, 251, 5, 115, 0, 0, 251, 252, 5, 111, 0, 0, 252, 253, 5, 108, 0, 0, 253, 254, 5, 101, 0, 0, 254, 255, 5, 46, 0, 0, 255, 256, 5, 108, 0, 0, 256, 257, 5, 111, 0, 0, 257, 258, 5, 103, 0, 0, 258, 46, 1, 0, 0, 0, 259, 260, 5, 105, 0, 0, 260, 261, 5, 102, 0, 0, 261, 48, 1, 0, 0, 0, 262, 263, 5, 101, 0, 0, 263, 264, 5, 108, 0, 0, 264, 265, 5, 115, 0, 0, 265, 266, 5, 101, 0, 0, 266, 50, 1, 0, 0, 0, 267, 268, 5, 100, 0, 0, 268, 269, 5, 111, 0, 0, 269, 52, 1, 0, 0, 0, 270, 271, 5, 119, 0, 0, 271, 272, 5, 104, 0, 0, 272, 273, 5, 105, 0, 0, 273, 274, 5, 108, 0, 0, 274, 275, 5, 101, 0, 0, 275, 54, 1, 0, 0, 0, 276, 277, 5, 102, 0, 0, 277, 278, 5, 111, 0, 0, 278, 279, 5, 114, 0, 0, 279, 56, 1, 0, 0, 0, 280, 281, 5, 110, 0, 0, 281, 282, 5, 101, 0, 0, 282, 283, 5, 119, 0, 0, 283, 58, 1, 0, 0, 0, 284, 285, 5, 91, 0, 0, 285, 60, 1, 0, 0, 0, 286, 287, 5, 93, 0, 0, 287, 62, 1, 0, 0, 0, 288, 289, 5, 116, 0, 0, 289, 290, 5, 120, 0, 0, 290, 291, 5, 46, 0, 0, 291, 292, 5, 111, 0, 0, 292, 293, 5, 117, 0, 0, 293, 294, 5, 116, 0, 0, 294, 295, 5, 112, 0, 0, 295, 296, 5, 117, 0, 0, 296, 297, 5, 116, 0, 0, 297, 298, 5, 115, 0, 0, 298, 64, 1, 0, 0, 0, 299, 300, 5, 46, 0, 0, 300, 301, 5, 118, 0, 0, 301, 302, 5, 97, 0, 0, 302, 303, 5, 108, 0, 0, 303, 304, 5, 117, 0, 0, 304, 305, 5, 101, 0, 0, 305, 66, 1, 0, 0, 0, 306, 307, 5, 46, 0, 0, 307, 308, 5, 108, 0, 0, 308, 309, 5, 111, 0, 0, 309, 310, 5, 99, 0, 0, 310, 311, 5, 107, 0, 0, 311, 312, 5, 105, 0, 0, 312, 313, 5, 110, 0, 0, 313, 314, 5, 103, 0, 0, 314, 315, 5, 66, 0, 0, 315, 316, 5, 121, 0, 0, 316, 317, 5, 116, 0, 0, 317, 318, 5, 101, 0, 0, 318, 319, 5, 99, 0, 0, 319, 320, 5, 111, 0, 0, 320, 321, 5, 100, 0, 0, 321, 322, 5, 101, 0, 0, 322, 68, 1, 0, 0, 0, 323, 324, 5, 46, 0, 0, 324, 325, 5, 116, 0, 0, 325, 326, 5, 111, 0, 0, 326, 327, 5, 107, 0, 0, 327, 328, 5, 101, 0, 0, 328, 329, 5, 110, 0, 0, 329, 330, 5, 67, 0, 0, 330, 331, 5, 97, 0, 0, 331, 332, 5, 116, 0, 0, 332, 333, 5, 101, 0, 0, 333, 334, 5, 103, 0, 0, 334, 335, 5, 111, 0, 0, 335, 336, 5, 114, 0, 0, 336, 337, 5, 121, 0, 0, 337, 70, 1, 0, 0, 0, 338, 339, 5, 46, 0, 0, 339, 340, 5, 110, 0, 0, 340, 341, 5, 102, 0, 0, 341, 342, 5, 116, 0, 0, 342, 343, 5, 67, 0, 0, 343, 344, 5, 111, 0, 0, 344, 345, 5, 109, 0, 0, 345, 346, 5, 109, 0, 0, 346, 347, 5, 105, 0, 0, 347, 348, 5, 116, 0, 0, 348, 349, 5, 109, 0, 0, 349, 350, 5, 101, 0, 0, 350, 351, 5, 110, 0, 0, 351, 352, 5, 116, 0, 0, 352, 72, 1, 0, 0, 0, 353, 354, 5, 46, 0, 0, 354, 355, 5, 116, 0, 0, 355, 356, 5, 111, 0, 0, 356, 357, 5, 107, 0, 0, 357, 358, 5, 101, 0, 0, 358, 359, 5, 110, 0, 0, 359, 360, 5, 65, 0, 0, 360, 361, 5, 109, 0, 0, 361, 362, 5, 111, 0, 0, 362, 363, 5, 117, 0, 0, 363, 364, 5, 110, 0, 0, 364, 365, 5, 116, 0, 0, 365, 74, 1, 0, 0, 0, 366, 367, 5, 116, 0, 0, 367, 368, 5, 120, 0, 0, 368, 369, 5, 46, 0, 0, 369, 370, 5, 105, 0, 0, 370, 371, 5, 110, 0, 0, 371, 372, 5, 112, 0, 0, 372, 373, 5, 117, 0, 0, 373, 374, 5, 116, 0, 0, 374, 375, 5, 115, 0, 0, 375, 76, 1, 0, 0, 0, 376, 377, 5, 46, 0, 0, 377, 378, 5, 111, 0, 0, 378, 379, 5, 117, 0, 0, 379, 380, 5, 116, 0, 0, 380, 381, 5, 112, 0, 0, 381, 382, 5, 111, 0, 0, 382, 383, 5, 105, 0, 0, 383, 384, 5, 110, 0, 0, 384, 385, 5, 116, 0, 0, 385, 386, 5, 84, 0, 0, 386, 387, 5, 114, 0, 0, 387, 388, 5, 97, 0, 0, 388, 389, 5, 110, 0, 0, 389, 390, 5, 115, 0, 0, 390, 391, 5, 97, 0, 0, 391, 392, 5, 99, 0, 0, 392, 393, 5, 116, 0, 0, 393, 394, 5, 105, 0, 0, 394, 395, 5, 111, 0, 0, 395, 396, 5, 110, 0, 0, 396, 397, 5, 72, 0, 0, 397, 398, 5, 97, 0, 0, 398, 399, 5, 115, 0, 0, 399, 400, 5, 104, 0, 0, 400, 78, 1, 0, 0, 0, 401, 402, 5, 46, 0, 0, 402, 403, 5, 111, 0, 0, 403, 404, 5, 117, 0, 0, 404, 405, 5, 116, 0, 0, 405, 406, 5, 112, 0, 0, 406, 407, 5, 111, 0, 0, 407, 408, 5, 105, 0, 0, 408, 409, 5, 110, 0, 0, 409, 410, 5, 116, 0, 0, 410, 411, 5, 73, 0, 0, 411, 412, 5, 110, 0, 0, 412, 413, 5, 100, 0, 0, 413, 414, 5, 101, 0, 0, 414, 415, 5, 120, 0, 0, 415, 80, 1, 0, 0, 0, 416, 417, 5, 46, 0, 0, 417, 418, 5, 117, 0, 0, 418, 419, 5, 110, 0, 0, 419, 420, 5, 108, 0, 0, 420, 421, 5, 111, 0, 0, 421, 422, 5, 99, 0, 0, 422, 423, 5, 107, 0, 0, 423, 424, 5, 105, 0, 0, 424, 425, 5, 110, 0, 0, 425, 426, 5, 103, 0, 0, 426, 427, 5, 66, 0, 0, 427, 428, 5, 121, 0, 0, 428, 429, 5, 116, 0, 0, 429, 430, 5, 101, 0, 0, 430, 431, 5, 99, 0, 0, 431, 432, 5, 111, 0, 0, 432, 433, 5, 100, 0, 0, 433, 434, 5, 101, 0, 0, 434, 82, 1, 0, 0, 0, 435, 436, 5, 46, 0, 0, 436, 437, 5, 115, 0, 0, 437, 438, 5, 101, 0, 0, 438, 439, 5, 113, 0, 0, 439, 440, 5, 117, 0, 0, 440, 441, 5, 101, 0, 0, 441, 442, 5, 110, 0, 0, 442, 443, 5, 99, 0, 0, 443, 444, 5, 101, 0, 0, 444, 445, 5, 78, 0, 0, 445, 446, 5, 117, 0, 0, 446, 447, 5, 109, 0, 0, 447, 448, 5, 98, 0, 0, 448, 449, 5, 101, 0, 0, 449, 450, 5, 114, 0, 0, 450, 84, 1, 0, 0, 0, 451, 452, 5, 46, 0, 0, 452, 453, 5, 114, 0, 0, 453, 454, 5, 101, 0, 0, 454, 455, 5, 118, 0, 0, 455, 456, 5, 101, 0, 0, 456, 457, 5, 114, 0, 0, 457, 458, 5, 115, 0, 0, 458, 459, 5, 101, 0, 0, 459, 460, 5, 40, 0, 0, 460, 461, 5, 41, 0, 0, 461, 86, 1, 0, 0, 0, 462, 463, 5, 46, 0, 0, 463, 464, 5, 108, 0, 0, 464, 465, 5, 101, 0, 0, 465, 466, 5, 110, 0, 0, 466, 467, 5, 103, 0, 0, 467, 468, 5, 116, 0, 0, 468, 469, 5, 104, 0, 0, 469, 88, 1, 0, 0, 0, 470, 471, 5, 46, 0, 0, 471, 472, 5, 115, 0, 0, 472, 473, 5, 112, 0, 0, 473, 474, 5, 108, 0, 0, 474, 475, 5, 105, 0, 0, 475, 476, 5, 116, 0, 0, 476, 90, 1, 0, 0, 0, 477, 478, 5, 46, 0, 0, 478, 479, 5, 115, 0, 0, 479, 480, 5, 108, 0, 0, 480, 481, 5, 105, 0, 0, 481, 482, 5, 99, 0, 0, 482, 483, 5, 101, 0, 0, 483, 92, 1, 0, 0, 0, 484, 485, 5, 33, 0, 0, 485, 94, 1, 0, 0, 0, 486, 487, 5, 45, 0, 0, 487, 96, 1, 0, 0, 0, 488, 489, 5, 42, 0, 0, 489, 98, 1, 0, 0, 0, 490, 491, 5, 47, 0, 0, 491, 100, 1, 0, 0, 0, 492, 493, 5, 37, 0, 0, 493, 102, 1, 0, 0, 0, 494, 495, 5, 43, 0, 0, 495, 104, 1, 0, 0, 0, 496, 497, 5, 62, 0, 0, 497, 498, 5, 62, 0, 0, 498, 106, 1, 0, 0, 0, 499, 500, 5, 60, 0, 0, 500, 501, 5, 60, 0, 0, 501, 108, 1, 0, 0, 0, 502, 503, 5, 61, 0, 0, 503, 504, 5, 61, 0, 0, 504, 110, 1, 0, 0, 0, 505, 506, 5, 33, 0, 0, 506, 507, 5, 61, 0, 0, 507, 112, 1, 0, 0, 0, 508, 509, 5, 38, 0, 0, 509, 114, 1, 0, 0, 0, 510, 511, 5, 124, 0, 0, 511, 116, 1, 0, 0, 0, 512, 513, 5, 38, 0, 0, 513, 514, 5, 38, 0, 0, 514, 118, 1, 0, 0, 0, 515, 516, 5, 124, 0, 0, 516, 517, 5, 124, 0, 0, 517, 120, 1, 0, 0, 0, 518, 519, 5, 99, 0, 0, 519, 520, 5, 111, 0, 0, 520, 521, 5, 110, 0, 0, 521, 522, 5, 115, 0, 0, 522, 523, 5, 116, 0, 0, 523, 524, 5, 97, 0, 0, 524, 525, 5, 110, 0, 0, 525, 526, 5, 116, 0, 0, 526, 122, 1, 0, 0, 0, 527, 529, 7, 0, 0, 0, 528, 527, 1, 0, 0, 0, 529, 530, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 530, 531, 1, 0, 0, 0, 531, 532, 1, 0, 0, 0, 532, 534, 5, 46, 0, 0, 533, 535, 7, 0, 0, 0, 534, 533, 1, 0, 0, 0, 535, 536, 1, 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 540, 5, 46, 0, 0, 539, 541, 7, 0, 0, 0, 540, 539, 1, 0, 0, 0, 541, 542, 1, 0, 0, 0, 542, 540, 1, 0, 0, 0, 542, 543, 1, 0, 0, 0, 543, 124, 1, 0, 0, 0, 544, 545, 5, 116, 0, 0, 545, 546, 5, 114, 0, 0, 546, 547, 5, 117, 0, 0, 547, 554, 5, 101, 0, 0, 548, 549, 5, 102, 0, 0, 549, 550, 5, 97, 0, 0, 550, 551, 5, 108, 0, 0, 551, 552, 5, 115, 0, 0, 552, 554, 5, 101, 0, 0, 553, 544, 1, 0, 0, 0, 553, 548, 1, 0, 0, 0, 554, 126, 1, 0, 0, 0, 555, 556, 5, 115, 0, 0, 556, 557, 5, 97, 0, 0, 557, 558, 5, 116, 0, 0, 558, 559, 5, 111, 0, 0, 559, 560, 5, 115, 0, 0, 560, 561, 5, 104, 0, 0, 561, 562, 5, 105, 0, 0, 562, 613, 5, 115, 0, 0, 563, 564, 5, 115, 0, 0, 564, 565, 5, 97, 0, 0, 565, 566, 5, 116, 0, 0, 566, 613, 5, 115, 0, 0, 567, 568, 5, 102, 0, 0, 568, 569, 5, 105, 0, 0, 569, 570, 5, 110, 0, 0, 570, 571, 5, 110, 0, 0, 571, 572, 5, 101, 0, 0, 572, 613, 5, 121, 0, 0, 573, 574, 5, 98, 0, 0, 574, 575, 5, 105, 0, 0, 575, 576, 5, 116, 0, 0, 576, 613, 5, 115, 0, 0, 577, 578, 5, 98, 0, 0, 578, 579, 5, 105, 0, 0, 579, 580, 5, 116, 0, 0, 580, 581, 5, 99, 0, 0, 581, 582, 5, 111, 0, 0, 582, 583, 5, 105, 0, 0, 583, 613, 5, 110, 0, 0, 584, 585, 5, 115, 0, 0, 585, 586, 5, 101, 0, 0, 586, 587, 5, 99, 0, 0, 587, 588, 5, 111, 0, 0, 588, 589, 5, 110, 0, 0, 589, 590, 5, 100, 0, 0, 590, 613, 5, 115, 0, 0, 591, 592, 5, 109, 0, 0, 592, 593, 5, 105, 0, 0, 593, 594, 5, 110, 0, 0, 594, 595, 5, 117, 0, 0, 595, 596, 5, 116, 0, 0, 596, 597, 5, 101, 0, 0, 597, 613, 5, 115, 0, 0, 598, 599, 5, 104, 0, 0, 599, 600, 5, 111, 0, 0, 600, 601, 5, 117, 0, 0, 601, 602, 5, 114, 0, 0, 602, 613, 5, 115, 0, 0, 603, 604, 5, 100, 0, 0, 604, 605, 5, 97, 0, 0, 605, 606, 5, 121, 0, 0, 606, 613, 5, 115, 0, 0, 607, 608, 5, 119, 0, 0, 608, 609, 5, 101, 0, 0, 609, 610, 5, 101, 0, 0, 610, 611, 5, 107, 0, 0, 611, 613, 5, 115, 0, 0, 612, 555, 1, 0, 0, 0, 612, 563, 1, 0, 0, 0, 612, 567, 1, 0, 0, 0, 612, 573, 1, 0, 0, 0, 612, 577, 1, 0, 0, 0, 612, 584, 1, 0, 0, 0, 612, 591, 1, 0, 0, 0, 612, 598, 1, 0, 0, 0, 612, 603, 1, 0, 0, 0, 612, 607, 1, 0, 0, 0, 613, 128, 1, 0, 0, 0, 614, 616, 5, 45, 0, 0, 615, 614, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 619, 3, 131, 65, 0, 618, 620, 3, 133, 66, 0, 619, 618, 1, 0, 0, 0, 619, 620, 1, 0, 0, 0, 620, 130, 1, 0, 0, 0, 621, 623, 7, 0, 0, 0, 622, 621, 1, 0, 0, 0, 623, 624, 1, 0, 0, 0, 624, 622, 1, 0, 0, 0, 624, 625, 1, 0, 0, 0, 625, 634, 1, 0, 0, 0, 626, 628, 5, 95, 0, 0, 627, 629, 7, 0, 0, 0, 628, 627, 1, 0, 0, 0, 629, 630, 1, 0, 0, 0, 630, 628, 1, 0, 0, 0, 630, 631, 1, 0, 0, 0, 631, 633, 1, 0, 0, 0, 632, 626, 1, 0, 0, 0, 633, 636, 1, 0, 0, 0, 634, 632, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 132, 1, 0, 0, 0, 636, 634, 1, 0, 0, 0, 637, 638, 7, 1, 0, 0, 638, 639, 3, 131, 65, 0, 639, 134, 1, 0, 0, 0, 640, 641, 5, 105, 0, 0, 641, 642, 5, 110, 0, 0, 642, 670, 5, 116, 0, 0, 643, 644, 5, 98, 0, 0, 644, 645, 5, 111, 0, 0, 645, 646, 5, 111, 0, 0, 646, 670, 5, 108, 0, 0, 647, 648, 5, 115, 0, 0, 648, 649, 5, 116, 0, 0, 649, 650, 5, 114, 0, 0, 650, 651, 5, 105, 0, 0, 651, 652, 5, 110, 0, 0, 652, 670, 5, 103, 0, 0, 653, 654, 5, 112, 0, 0, 654, 655, 5, 117, 0, 0, 655, 656, 5, 98, 0, 0, 656, 657, 5, 107, 0, 0, 657, 658, 5, 101, 0, 0, 658, 670, 5, 121, 0, 0, 659, 660, 5, 115, 0, 0, 660, 661, 5, 105, 0, 0, 661, 670, 5, 103, 0, 0, 662, 663, 5, 100, 0, 0, 663, 664, 5, 97, 0, 0, 664, 665, 5, 116, 0, 0, 665, 666, 5, 97, 0, 0, 666, 667, 5, 115, 0, 0, 667, 668, 5, 105, 0, 0, 668, 670, 5, 103, 0, 0, 669, 640, 1, 0, 0, 0, 669, 643, 1, 0, 0, 0, 669, 647, 1, 0, 0, 0, 669, 653, 1, 0, 0, 0, 669, 659, 1, 0, 0, 0, 669, 662, 1, 0, 0, 0, 670, 136, 1, 0, 0, 0, 671, 672, 5, 98, 0, 0, 672, 673, 5, 121, 0, 0, 673, 674, 5, 116, 0, 0, 674, 675, 5, 101, 0, 0, 675, 676, 5, 115, 0, 0, 676, 138, 1, 0, 0, 0, 677, 678, 5, 98, 0, 0, 678, 679, 5, 121, 0, 0, 679, 680, 5, 116, 0, 0, 680, 681, 5, 101, 0, 0, 681, 682, 5, 115, 0, 0, 682, 683, 1, 0, 0, 0, 683, 689, 3, 141, 70, 0, 684, 685, 5, 98, 0, 0, 685, 686, 5, 121, 0, 0, 686, 687, 5, 116, 0, 0, 687, 689, 5, 101, 0, 0, 688, 677, 1, 0, 0, 0, 688, 684, 1, 0, 0, 0, 689, 140, 1, 0, 0, 0, 690, 694, 7, 2, 0, 0, 691, 693, 7, 0, 0, 0, 692, 691, 1, 0, 0, 0, 693, 696, 1, 0, 0, 0, 694, 692, 1, 0, 0, 0, 694, 695, 1, 0, 0, 0, 695, 142, 1, 0, 0, 0, 696, 694, 1, 0, 0, 0, 697, 703, 5, 34, 0, 0, 698, 699, 5, 92, 0, 0, 699, 702, 5, 34, 0, 0, 700, 702, 8, 3, 0, 0, 701, 698, 1, 0, 0, 0, 701, 700, 1, 0, 0, 0, 702, 705, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 703, 701, 1, 0, 0, 0, 704, 706, 1, 0, 0, 0, 705, 703, 1, 0, 0, 0, 706, 718, 5, 34, 0, 0, 707, 713, 5, 39, 0, 0, 708, 709, 5, 92, 0, 0, 709, 712, 5, 39, 0, 0, 710, 712, 8, 4, 0, 0, 711, 708, 1, 0, 0, 0, 711, 710, 1, 0, 0, 0, 712, 715, 1, 0, 0, 0, 713, 714, 1, 0, 0, 0, 713, 711, 1, 0, 0, 0, 714, 716, 1, 0, 0, 0, 715, 713, 1, 0, 0, 0, 716, 718, 5, 39, 0, 0, 717, 697, 1, 0, 0, 0, 717, 707, 1, 0, 0, 0, 718, 144, 1, 0, 0, 0, 719, 720, 5, 100, 0, 0, 720, 721, 5, 97, 0, 0, 721, 722, 5, 116, 0, 0, 722, 723, 5, 101, 0, 0, 723, 724, 5, 40, 0, 0, 724, 725, 1, 0, 0, 0, 725, 726, 3, 143, 71, 0, 726, 727, 5, 41, 0, 0, 727, 146, 1, 0, 0, 0, 728, 729, 5, 48, 0, 0, 729, 733, 7, 5, 0, 0, 730, 732, 7, 6, 0, 0, 731, 730, 1, 0, 0, 0, 732, 735, 1, 0, 0, 0, 733, 731, 1, 0, 0, 0, 733, 734, 1, 0, 0, 0, 734, 148, 1, 0, 0, 0, 735, 733, 1, 0, 0, 0, 736, 737, 5, 116, 0, 0, 737, 738, 5, 104, 0, 0, 738, 739, 5, 105, 0, 0, 739, 740, 5, 115, 0, 0, 740, 741, 5, 46, 0, 0, 741, 742, 5, 97, 0, 0, 742, 743, 5, 103, 0, 0, 743, 752, 5, 101, 0, 0, 744, 745, 5, 116, 0, 0, 745, 746, 5, 120, 0, 0, 746, 747, 5, 46, 0, 0, 747, 748, 5, 116, 0, 0, 748, 749, 5, 105, 0, 0, 749, 750, 5, 109, 0, 0, 750, 752, 5, 101, 0, 0, 751, 736, 1, 0, 0, 0, 751, 744, 1, 0, 0, 0, 752, 150, 1, 0, 0, 0, 753, 754, 5, 117, 0, 0, 754, 755, 5, 110, 0, 0, 755, 756, 5, 115, 0, 0, 756, 757, 5, 97, 0, 0, 757, 758, 5, 102, 0, 0, 758, 759, 5, 101, 0, 0, 759, 760, 5, 95, 0, 0, 760, 761, 5, 105, 0, 0, 761, 762, 5, 110, 0, 0, 762, 802, 5, 116, 0, 0, 763, 764, 5, 117, 0, 0, 764, 765, 5, 110, 0, 0, 765, 766, 5, 115, 0, 0, 766, 767, 5, 97, 0, 0, 767, 768, 5, 102, 0, 0, 768, 769, 5, 101, 0, 0, 769, 770, 5, 95, 0, 0, 770, 771, 5, 98, 0, 0, 771, 772, 5, 111, 0, 0, 772, 773, 5, 111, 0, 0, 773, 802, 5, 108, 0, 0, 774, 775, 5, 117, 0, 0, 775, 776, 5, 110, 0, 0, 776, 777, 5, 115, 0, 0, 777, 778, 5, 97, 0, 0, 778, 779, 5, 102, 0, 0, 779, 780, 5, 101, 0, 0, 780, 781, 5, 95, 0, 0, 781, 782, 5, 98, 0, 0, 782, 783, 5, 121, 0, 0, 783, 784, 5, 116, 0, 0, 784, 785, 5, 101, 0, 0, 785, 786, 5, 115, 0, 0, 786, 788, 1, 0, 0, 0, 787, 789, 3, 141, 70, 0, 788, 787, 1, 0, 0, 0, 788, 789, 1, 0, 0, 0, 789, 802, 1, 0, 0, 0, 790, 791, 5, 117, 0, 0, 791, 792, 5, 110, 0, 0, 792, 793, 5, 115, 0, 0, 793, 794, 5, 97, 0, 0, 794, 795, 5, 102, 0, 0, 795, 796, 5, 101, 0, 0, 796, 797, 5, 95, 0, 0, 797, 798, 5, 98, 0, 0, 798, 799, 5, 121, 0, 0, 799, 800, 5, 116, 0, 0, 800, 802, 5, 101, 0, 0, 801, 753, 1, 0, 0, 0, 801, 763, 1, 0, 0, 0, 801, 774, 1, 0, 0, 0, 801, 790, 1, 0, 0, 0, 802, 152, 1, 0, 0, 0, 803, 804, 5, 116, 0, 0, 804, 805, 5, 104, 0, 0, 805, 806, 5, 105, 0, 0, 806, 807, 5, 115, 0, 0, 807, 808, 5, 46, 0, 0, 808, 809, 5, 97, 0, 0, 809, 810, 5, 99, 0, 0, 810, 811, 5, 116, 0, 0, 811, 812, 5, 105, 0, 0, 812, 813, 5, 118, 0, 0, 813, 814, 5, 101, 0, 0, 814, 815, 5, 73, 0, 0, 815, 816, 5, 110, 0, 0, 816, 817, 5, 112, 0, 0, 817, 818, 5, 117, 0, 0, 818, 819, 5, 116, 0, 0, 819, 820, 5, 73, 0, 0, 820, 821, 5, 110, 0, 0, 821, 822, 5, 100, 0, 0, 822, 823, 5, 101, 0, 0, 823, 898, 5, 120, 0, 0, 824, 825, 5, 116, 0, 0, 825, 826, 5, 104, 0, 0, 826, 827, 5, 105, 0, 0, 827, 828, 5, 115, 0, 0, 828, 829, 5, 46, 0, 0, 829, 830, 5, 97, 0, 0, 830, 831, 5, 99, 0, 0, 831, 832, 5, 116, 0, 0, 832, 833, 5, 105, 0, 0, 833, 834, 5, 118, 0, 0, 834, 835, 5, 101, 0, 0, 835, 836, 5, 66, 0, 0, 836, 837, 5, 121, 0, 0, 837, 838, 5, 116, 0, 0, 838, 839, 5, 101, 0, 0, 839, 840, 5, 99, 0, 0, 840, 841, 5, 111, 0, 0, 841, 842, 5, 100, 0, 0, 842, 898, 5, 101, 0, 0, 843, 844, 5, 116, 0, 0, 844, 845, 5, 120, 0, 0, 845, 846, 5, 46, 0, 0, 846, 847, 5, 105, 0, 0, 847, 848, 5, 110, 0, 0, 848, 849, 5, 112, 0, 0, 849, 850, 5, 117, 0, 0, 850, 851, 5, 116, 0, 0, 851, 852, 5, 115, 0, 0, 852, 853, 5, 46, 0, 0, 853, 854, 5, 108, 0, 0, 854, 855, 5, 101, 0, 0, 855, 856, 5, 110, 0, 0, 856, 857, 5, 103, 0, 0, 857, 858, 5, 116, 0, 0, 858, 898, 5, 104, 0, 0, 859, 860, 5, 116, 0, 0, 860, 861, 5, 120, 0, 0, 861, 862, 5, 46, 0, 0, 862, 863, 5, 111, 0, 0, 863, 864, 5, 117, 0, 0, 864, 865, 5, 116, 0, 0, 865, 866, 5, 112, 0, 0, 866, 867, 5, 117, 0, 0, 867, 868, 5, 116, 0, 0, 868, 869, 5, 115, 0, 0, 869, 870, 5, 46, 0, 0, 870, 871, 5, 108, 0, 0, 871, 872, 5, 101, 0, 0, 872, 873, 5, 110, 0, 0, 873, 874, 5, 103, 0, 0, 874, 875, 5, 116, 0, 0, 875, 898, 5, 104, 0, 0, 876, 877, 5, 116, 0, 0, 877, 878, 5, 120, 0, 0, 878, 879, 5, 46, 0, 0, 879, 880, 5, 118, 0, 0, 880, 881, 5, 101, 0, 0, 881, 882, 5, 114, 0, 0, 882, 883, 5, 115, 0, 0, 883, 884, 5, 105, 0, 0, 884, 885, 5, 111, 0, 0, 885, 898, 5, 110, 0, 0, 886, 887, 5, 116, 0, 0, 887, 888, 5, 120, 0, 0, 888, 889, 5, 46, 0, 0, 889, 890, 5, 108, 0, 0, 890, 891, 5, 111, 0, 0, 891, 892, 5, 99, 0, 0, 892, 893, 5, 107, 0, 0, 893, 894, 5, 116, 0, 0, 894, 895, 5, 105, 0, 0, 895, 896, 5, 109, 0, 0, 896, 898, 5, 101, 0, 0, 897, 803, 1, 0, 0, 0, 897, 824, 1, 0, 0, 0, 897, 843, 1, 0, 0, 0, 897, 859, 1, 0, 0, 0, 897, 876, 1, 0, 0, 0, 897, 886, 1, 0, 0, 0, 898, 154, 1, 0, 0, 0, 899, 903, 7, 7, 0, 0, 900, 902, 7, 8, 0, 0, 901, 900, 1, 0, 0, 0, 902, 905, 1, 0, 0, 0, 903, 901, 1, 0, 0, 0, 903, 904, 1, 0, 0, 0, 904, 156, 1, 0, 0, 0, 905, 903, 1, 0, 0, 0, 906, 908, 7, 9, 0, 0, 907, 906, 1, 0, 0, 0, 908, 909, 1, 0, 0, 0, 909, 907, 1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 911, 1, 0, 0, 0, 911, 912, 6, 78, 0, 0, 912, 158, 1, 0, 0, 0, 913, 914, 5, 47, 0, 0, 914, 915, 5, 42, 0, 0, 915, 919, 1, 0, 0, 0, 916, 918, 9, 0, 0, 0, 917, 916, 1, 0, 0, 0, 918, 921, 1, 0, 0, 0, 919, 920, 1, 0, 0, 0, 919, 917, 1, 0, 0, 0, 920, 922, 1, 0, 0, 0, 921, 919, 1, 0, 0, 0, 922, 923, 5, 42, 0, 0, 923, 924, 5, 47, 0, 0, 924, 925, 1, 0, 0, 0, 925, 926, 6, 79, 1, 0, 926, 160, 1, 0, 0, 0, 927, 928, 5, 47, 0, 0, 928, 929, 5, 47, 0, 0, 929, 933, 1, 0, 0, 0, 930, 932, 8, 10, 0, 0, 931, 930, 1, 0, 0, 0, 932, 935, 1, 0, 0, 0, 933, 931, 1, 0, 0, 0, 933, 934, 1, 0, 0, 0, 934, 936, 1, 0, 0, 0, 935, 933, 1, 0, 0, 0, 936, 937, 6, 80, 1, 0, 937, 162, 1, 0, 0, 0, 28, 0, 530, 536, 542, 553, 612, 615, 619, 624, 630, 634, 669, 688, 694, 701, 703, 711, 713, 717, 733, 751, 788, 801, 897, 903, 909, 919, 933, 2, 6, 0, 0, 0, 1, 0] \ No newline at end of file +[4, 0, 83, 957, 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, 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, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 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, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 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, 35, 1, 35, 1, 35, 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, 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, 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, 40, 1, 40, 1, 40, 1, 40, 1, 40, 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, 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, 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, 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, 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, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 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, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 4, 63, 548, 8, 63, 11, 63, 12, 63, 549, 1, 63, 1, 63, 4, 63, 554, 8, 63, 11, 63, 12, 63, 555, 1, 63, 1, 63, 4, 63, 560, 8, 63, 11, 63, 12, 63, 561, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 573, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 632, 8, 65, 1, 66, 3, 66, 635, 8, 66, 1, 66, 1, 66, 3, 66, 639, 8, 66, 1, 67, 4, 67, 642, 8, 67, 11, 67, 12, 67, 643, 1, 67, 1, 67, 4, 67, 648, 8, 67, 11, 67, 12, 67, 649, 5, 67, 652, 8, 67, 10, 67, 12, 67, 655, 9, 67, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 3, 69, 689, 8, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 708, 8, 71, 1, 72, 1, 72, 5, 72, 712, 8, 72, 10, 72, 12, 72, 715, 9, 72, 1, 73, 1, 73, 1, 73, 1, 73, 5, 73, 721, 8, 73, 10, 73, 12, 73, 724, 9, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 5, 73, 731, 8, 73, 10, 73, 12, 73, 734, 9, 73, 1, 73, 3, 73, 737, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 5, 75, 751, 8, 75, 10, 75, 12, 75, 754, 9, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 3, 76, 771, 8, 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, 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, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 3, 77, 808, 8, 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, 821, 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, 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, 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, 917, 8, 78, 1, 79, 1, 79, 5, 79, 921, 8, 79, 10, 79, 12, 79, 924, 9, 79, 1, 80, 4, 80, 927, 8, 80, 11, 80, 12, 80, 928, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 5, 81, 937, 8, 81, 10, 81, 12, 81, 940, 9, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 5, 82, 951, 8, 82, 10, 82, 12, 82, 954, 9, 82, 1, 82, 1, 82, 3, 722, 732, 938, 0, 83, 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, 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, 1001, 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, 1, 167, 1, 0, 0, 0, 3, 174, 1, 0, 0, 0, 5, 176, 1, 0, 0, 0, 7, 187, 1, 0, 0, 0, 9, 189, 1, 0, 0, 0, 11, 191, 1, 0, 0, 0, 13, 194, 1, 0, 0, 0, 15, 196, 1, 0, 0, 0, 17, 198, 1, 0, 0, 0, 19, 201, 1, 0, 0, 0, 21, 203, 1, 0, 0, 0, 23, 212, 1, 0, 0, 0, 25, 214, 1, 0, 0, 0, 27, 216, 1, 0, 0, 0, 29, 225, 1, 0, 0, 0, 31, 233, 1, 0, 0, 0, 33, 235, 1, 0, 0, 0, 35, 237, 1, 0, 0, 0, 37, 239, 1, 0, 0, 0, 39, 246, 1, 0, 0, 0, 41, 249, 1, 0, 0, 0, 43, 252, 1, 0, 0, 0, 45, 255, 1, 0, 0, 0, 47, 258, 1, 0, 0, 0, 49, 266, 1, 0, 0, 0, 51, 278, 1, 0, 0, 0, 53, 281, 1, 0, 0, 0, 55, 286, 1, 0, 0, 0, 57, 289, 1, 0, 0, 0, 59, 295, 1, 0, 0, 0, 61, 299, 1, 0, 0, 0, 63, 303, 1, 0, 0, 0, 65, 305, 1, 0, 0, 0, 67, 307, 1, 0, 0, 0, 69, 318, 1, 0, 0, 0, 71, 325, 1, 0, 0, 0, 73, 342, 1, 0, 0, 0, 75, 357, 1, 0, 0, 0, 77, 372, 1, 0, 0, 0, 79, 385, 1, 0, 0, 0, 81, 395, 1, 0, 0, 0, 83, 420, 1, 0, 0, 0, 85, 435, 1, 0, 0, 0, 87, 454, 1, 0, 0, 0, 89, 470, 1, 0, 0, 0, 91, 481, 1, 0, 0, 0, 93, 489, 1, 0, 0, 0, 95, 496, 1, 0, 0, 0, 97, 503, 1, 0, 0, 0, 99, 505, 1, 0, 0, 0, 101, 507, 1, 0, 0, 0, 103, 509, 1, 0, 0, 0, 105, 511, 1, 0, 0, 0, 107, 513, 1, 0, 0, 0, 109, 515, 1, 0, 0, 0, 111, 518, 1, 0, 0, 0, 113, 521, 1, 0, 0, 0, 115, 524, 1, 0, 0, 0, 117, 527, 1, 0, 0, 0, 119, 529, 1, 0, 0, 0, 121, 531, 1, 0, 0, 0, 123, 534, 1, 0, 0, 0, 125, 537, 1, 0, 0, 0, 127, 547, 1, 0, 0, 0, 129, 572, 1, 0, 0, 0, 131, 631, 1, 0, 0, 0, 133, 634, 1, 0, 0, 0, 135, 641, 1, 0, 0, 0, 137, 656, 1, 0, 0, 0, 139, 688, 1, 0, 0, 0, 141, 690, 1, 0, 0, 0, 143, 707, 1, 0, 0, 0, 145, 709, 1, 0, 0, 0, 147, 736, 1, 0, 0, 0, 149, 738, 1, 0, 0, 0, 151, 747, 1, 0, 0, 0, 153, 770, 1, 0, 0, 0, 155, 820, 1, 0, 0, 0, 157, 916, 1, 0, 0, 0, 159, 918, 1, 0, 0, 0, 161, 926, 1, 0, 0, 0, 163, 932, 1, 0, 0, 0, 165, 946, 1, 0, 0, 0, 167, 168, 5, 112, 0, 0, 168, 169, 5, 114, 0, 0, 169, 170, 5, 97, 0, 0, 170, 171, 5, 103, 0, 0, 171, 172, 5, 109, 0, 0, 172, 173, 5, 97, 0, 0, 173, 2, 1, 0, 0, 0, 174, 175, 5, 59, 0, 0, 175, 4, 1, 0, 0, 0, 176, 177, 5, 99, 0, 0, 177, 178, 5, 97, 0, 0, 178, 179, 5, 115, 0, 0, 179, 180, 5, 104, 0, 0, 180, 181, 5, 115, 0, 0, 181, 182, 5, 99, 0, 0, 182, 183, 5, 114, 0, 0, 183, 184, 5, 105, 0, 0, 184, 185, 5, 112, 0, 0, 185, 186, 5, 116, 0, 0, 186, 6, 1, 0, 0, 0, 187, 188, 5, 94, 0, 0, 188, 8, 1, 0, 0, 0, 189, 190, 5, 126, 0, 0, 190, 10, 1, 0, 0, 0, 191, 192, 5, 62, 0, 0, 192, 193, 5, 61, 0, 0, 193, 12, 1, 0, 0, 0, 194, 195, 5, 62, 0, 0, 195, 14, 1, 0, 0, 0, 196, 197, 5, 60, 0, 0, 197, 16, 1, 0, 0, 0, 198, 199, 5, 60, 0, 0, 199, 200, 5, 61, 0, 0, 200, 18, 1, 0, 0, 0, 201, 202, 5, 61, 0, 0, 202, 20, 1, 0, 0, 0, 203, 204, 5, 99, 0, 0, 204, 205, 5, 111, 0, 0, 205, 206, 5, 110, 0, 0, 206, 207, 5, 116, 0, 0, 207, 208, 5, 114, 0, 0, 208, 209, 5, 97, 0, 0, 209, 210, 5, 99, 0, 0, 210, 211, 5, 116, 0, 0, 211, 22, 1, 0, 0, 0, 212, 213, 5, 123, 0, 0, 213, 24, 1, 0, 0, 0, 214, 215, 5, 125, 0, 0, 215, 26, 1, 0, 0, 0, 216, 217, 5, 102, 0, 0, 217, 218, 5, 117, 0, 0, 218, 219, 5, 110, 0, 0, 219, 220, 5, 99, 0, 0, 220, 221, 5, 116, 0, 0, 221, 222, 5, 105, 0, 0, 222, 223, 5, 111, 0, 0, 223, 224, 5, 110, 0, 0, 224, 28, 1, 0, 0, 0, 225, 226, 5, 114, 0, 0, 226, 227, 5, 101, 0, 0, 227, 228, 5, 116, 0, 0, 228, 229, 5, 117, 0, 0, 229, 230, 5, 114, 0, 0, 230, 231, 5, 110, 0, 0, 231, 232, 5, 115, 0, 0, 232, 30, 1, 0, 0, 0, 233, 234, 5, 40, 0, 0, 234, 32, 1, 0, 0, 0, 235, 236, 5, 44, 0, 0, 236, 34, 1, 0, 0, 0, 237, 238, 5, 41, 0, 0, 238, 36, 1, 0, 0, 0, 239, 240, 5, 114, 0, 0, 240, 241, 5, 101, 0, 0, 241, 242, 5, 116, 0, 0, 242, 243, 5, 117, 0, 0, 243, 244, 5, 114, 0, 0, 244, 245, 5, 110, 0, 0, 245, 38, 1, 0, 0, 0, 246, 247, 5, 43, 0, 0, 247, 248, 5, 61, 0, 0, 248, 40, 1, 0, 0, 0, 249, 250, 5, 45, 0, 0, 250, 251, 5, 61, 0, 0, 251, 42, 1, 0, 0, 0, 252, 253, 5, 43, 0, 0, 253, 254, 5, 43, 0, 0, 254, 44, 1, 0, 0, 0, 255, 256, 5, 45, 0, 0, 256, 257, 5, 45, 0, 0, 257, 46, 1, 0, 0, 0, 258, 259, 5, 114, 0, 0, 259, 260, 5, 101, 0, 0, 260, 261, 5, 113, 0, 0, 261, 262, 5, 117, 0, 0, 262, 263, 5, 105, 0, 0, 263, 264, 5, 114, 0, 0, 264, 265, 5, 101, 0, 0, 265, 48, 1, 0, 0, 0, 266, 267, 5, 99, 0, 0, 267, 268, 5, 111, 0, 0, 268, 269, 5, 110, 0, 0, 269, 270, 5, 115, 0, 0, 270, 271, 5, 111, 0, 0, 271, 272, 5, 108, 0, 0, 272, 273, 5, 101, 0, 0, 273, 274, 5, 46, 0, 0, 274, 275, 5, 108, 0, 0, 275, 276, 5, 111, 0, 0, 276, 277, 5, 103, 0, 0, 277, 50, 1, 0, 0, 0, 278, 279, 5, 105, 0, 0, 279, 280, 5, 102, 0, 0, 280, 52, 1, 0, 0, 0, 281, 282, 5, 101, 0, 0, 282, 283, 5, 108, 0, 0, 283, 284, 5, 115, 0, 0, 284, 285, 5, 101, 0, 0, 285, 54, 1, 0, 0, 0, 286, 287, 5, 100, 0, 0, 287, 288, 5, 111, 0, 0, 288, 56, 1, 0, 0, 0, 289, 290, 5, 119, 0, 0, 290, 291, 5, 104, 0, 0, 291, 292, 5, 105, 0, 0, 292, 293, 5, 108, 0, 0, 293, 294, 5, 101, 0, 0, 294, 58, 1, 0, 0, 0, 295, 296, 5, 102, 0, 0, 296, 297, 5, 111, 0, 0, 297, 298, 5, 114, 0, 0, 298, 60, 1, 0, 0, 0, 299, 300, 5, 110, 0, 0, 300, 301, 5, 101, 0, 0, 301, 302, 5, 119, 0, 0, 302, 62, 1, 0, 0, 0, 303, 304, 5, 91, 0, 0, 304, 64, 1, 0, 0, 0, 305, 306, 5, 93, 0, 0, 306, 66, 1, 0, 0, 0, 307, 308, 5, 116, 0, 0, 308, 309, 5, 120, 0, 0, 309, 310, 5, 46, 0, 0, 310, 311, 5, 111, 0, 0, 311, 312, 5, 117, 0, 0, 312, 313, 5, 116, 0, 0, 313, 314, 5, 112, 0, 0, 314, 315, 5, 117, 0, 0, 315, 316, 5, 116, 0, 0, 316, 317, 5, 115, 0, 0, 317, 68, 1, 0, 0, 0, 318, 319, 5, 46, 0, 0, 319, 320, 5, 118, 0, 0, 320, 321, 5, 97, 0, 0, 321, 322, 5, 108, 0, 0, 322, 323, 5, 117, 0, 0, 323, 324, 5, 101, 0, 0, 324, 70, 1, 0, 0, 0, 325, 326, 5, 46, 0, 0, 326, 327, 5, 108, 0, 0, 327, 328, 5, 111, 0, 0, 328, 329, 5, 99, 0, 0, 329, 330, 5, 107, 0, 0, 330, 331, 5, 105, 0, 0, 331, 332, 5, 110, 0, 0, 332, 333, 5, 103, 0, 0, 333, 334, 5, 66, 0, 0, 334, 335, 5, 121, 0, 0, 335, 336, 5, 116, 0, 0, 336, 337, 5, 101, 0, 0, 337, 338, 5, 99, 0, 0, 338, 339, 5, 111, 0, 0, 339, 340, 5, 100, 0, 0, 340, 341, 5, 101, 0, 0, 341, 72, 1, 0, 0, 0, 342, 343, 5, 46, 0, 0, 343, 344, 5, 116, 0, 0, 344, 345, 5, 111, 0, 0, 345, 346, 5, 107, 0, 0, 346, 347, 5, 101, 0, 0, 347, 348, 5, 110, 0, 0, 348, 349, 5, 67, 0, 0, 349, 350, 5, 97, 0, 0, 350, 351, 5, 116, 0, 0, 351, 352, 5, 101, 0, 0, 352, 353, 5, 103, 0, 0, 353, 354, 5, 111, 0, 0, 354, 355, 5, 114, 0, 0, 355, 356, 5, 121, 0, 0, 356, 74, 1, 0, 0, 0, 357, 358, 5, 46, 0, 0, 358, 359, 5, 110, 0, 0, 359, 360, 5, 102, 0, 0, 360, 361, 5, 116, 0, 0, 361, 362, 5, 67, 0, 0, 362, 363, 5, 111, 0, 0, 363, 364, 5, 109, 0, 0, 364, 365, 5, 109, 0, 0, 365, 366, 5, 105, 0, 0, 366, 367, 5, 116, 0, 0, 367, 368, 5, 109, 0, 0, 368, 369, 5, 101, 0, 0, 369, 370, 5, 110, 0, 0, 370, 371, 5, 116, 0, 0, 371, 76, 1, 0, 0, 0, 372, 373, 5, 46, 0, 0, 373, 374, 5, 116, 0, 0, 374, 375, 5, 111, 0, 0, 375, 376, 5, 107, 0, 0, 376, 377, 5, 101, 0, 0, 377, 378, 5, 110, 0, 0, 378, 379, 5, 65, 0, 0, 379, 380, 5, 109, 0, 0, 380, 381, 5, 111, 0, 0, 381, 382, 5, 117, 0, 0, 382, 383, 5, 110, 0, 0, 383, 384, 5, 116, 0, 0, 384, 78, 1, 0, 0, 0, 385, 386, 5, 116, 0, 0, 386, 387, 5, 120, 0, 0, 387, 388, 5, 46, 0, 0, 388, 389, 5, 105, 0, 0, 389, 390, 5, 110, 0, 0, 390, 391, 5, 112, 0, 0, 391, 392, 5, 117, 0, 0, 392, 393, 5, 116, 0, 0, 393, 394, 5, 115, 0, 0, 394, 80, 1, 0, 0, 0, 395, 396, 5, 46, 0, 0, 396, 397, 5, 111, 0, 0, 397, 398, 5, 117, 0, 0, 398, 399, 5, 116, 0, 0, 399, 400, 5, 112, 0, 0, 400, 401, 5, 111, 0, 0, 401, 402, 5, 105, 0, 0, 402, 403, 5, 110, 0, 0, 403, 404, 5, 116, 0, 0, 404, 405, 5, 84, 0, 0, 405, 406, 5, 114, 0, 0, 406, 407, 5, 97, 0, 0, 407, 408, 5, 110, 0, 0, 408, 409, 5, 115, 0, 0, 409, 410, 5, 97, 0, 0, 410, 411, 5, 99, 0, 0, 411, 412, 5, 116, 0, 0, 412, 413, 5, 105, 0, 0, 413, 414, 5, 111, 0, 0, 414, 415, 5, 110, 0, 0, 415, 416, 5, 72, 0, 0, 416, 417, 5, 97, 0, 0, 417, 418, 5, 115, 0, 0, 418, 419, 5, 104, 0, 0, 419, 82, 1, 0, 0, 0, 420, 421, 5, 46, 0, 0, 421, 422, 5, 111, 0, 0, 422, 423, 5, 117, 0, 0, 423, 424, 5, 116, 0, 0, 424, 425, 5, 112, 0, 0, 425, 426, 5, 111, 0, 0, 426, 427, 5, 105, 0, 0, 427, 428, 5, 110, 0, 0, 428, 429, 5, 116, 0, 0, 429, 430, 5, 73, 0, 0, 430, 431, 5, 110, 0, 0, 431, 432, 5, 100, 0, 0, 432, 433, 5, 101, 0, 0, 433, 434, 5, 120, 0, 0, 434, 84, 1, 0, 0, 0, 435, 436, 5, 46, 0, 0, 436, 437, 5, 117, 0, 0, 437, 438, 5, 110, 0, 0, 438, 439, 5, 108, 0, 0, 439, 440, 5, 111, 0, 0, 440, 441, 5, 99, 0, 0, 441, 442, 5, 107, 0, 0, 442, 443, 5, 105, 0, 0, 443, 444, 5, 110, 0, 0, 444, 445, 5, 103, 0, 0, 445, 446, 5, 66, 0, 0, 446, 447, 5, 121, 0, 0, 447, 448, 5, 116, 0, 0, 448, 449, 5, 101, 0, 0, 449, 450, 5, 99, 0, 0, 450, 451, 5, 111, 0, 0, 451, 452, 5, 100, 0, 0, 452, 453, 5, 101, 0, 0, 453, 86, 1, 0, 0, 0, 454, 455, 5, 46, 0, 0, 455, 456, 5, 115, 0, 0, 456, 457, 5, 101, 0, 0, 457, 458, 5, 113, 0, 0, 458, 459, 5, 117, 0, 0, 459, 460, 5, 101, 0, 0, 460, 461, 5, 110, 0, 0, 461, 462, 5, 99, 0, 0, 462, 463, 5, 101, 0, 0, 463, 464, 5, 78, 0, 0, 464, 465, 5, 117, 0, 0, 465, 466, 5, 109, 0, 0, 466, 467, 5, 98, 0, 0, 467, 468, 5, 101, 0, 0, 468, 469, 5, 114, 0, 0, 469, 88, 1, 0, 0, 0, 470, 471, 5, 46, 0, 0, 471, 472, 5, 114, 0, 0, 472, 473, 5, 101, 0, 0, 473, 474, 5, 118, 0, 0, 474, 475, 5, 101, 0, 0, 475, 476, 5, 114, 0, 0, 476, 477, 5, 115, 0, 0, 477, 478, 5, 101, 0, 0, 478, 479, 5, 40, 0, 0, 479, 480, 5, 41, 0, 0, 480, 90, 1, 0, 0, 0, 481, 482, 5, 46, 0, 0, 482, 483, 5, 108, 0, 0, 483, 484, 5, 101, 0, 0, 484, 485, 5, 110, 0, 0, 485, 486, 5, 103, 0, 0, 486, 487, 5, 116, 0, 0, 487, 488, 5, 104, 0, 0, 488, 92, 1, 0, 0, 0, 489, 490, 5, 46, 0, 0, 490, 491, 5, 115, 0, 0, 491, 492, 5, 112, 0, 0, 492, 493, 5, 108, 0, 0, 493, 494, 5, 105, 0, 0, 494, 495, 5, 116, 0, 0, 495, 94, 1, 0, 0, 0, 496, 497, 5, 46, 0, 0, 497, 498, 5, 115, 0, 0, 498, 499, 5, 108, 0, 0, 499, 500, 5, 105, 0, 0, 500, 501, 5, 99, 0, 0, 501, 502, 5, 101, 0, 0, 502, 96, 1, 0, 0, 0, 503, 504, 5, 33, 0, 0, 504, 98, 1, 0, 0, 0, 505, 506, 5, 45, 0, 0, 506, 100, 1, 0, 0, 0, 507, 508, 5, 42, 0, 0, 508, 102, 1, 0, 0, 0, 509, 510, 5, 47, 0, 0, 510, 104, 1, 0, 0, 0, 511, 512, 5, 37, 0, 0, 512, 106, 1, 0, 0, 0, 513, 514, 5, 43, 0, 0, 514, 108, 1, 0, 0, 0, 515, 516, 5, 62, 0, 0, 516, 517, 5, 62, 0, 0, 517, 110, 1, 0, 0, 0, 518, 519, 5, 60, 0, 0, 519, 520, 5, 60, 0, 0, 520, 112, 1, 0, 0, 0, 521, 522, 5, 61, 0, 0, 522, 523, 5, 61, 0, 0, 523, 114, 1, 0, 0, 0, 524, 525, 5, 33, 0, 0, 525, 526, 5, 61, 0, 0, 526, 116, 1, 0, 0, 0, 527, 528, 5, 38, 0, 0, 528, 118, 1, 0, 0, 0, 529, 530, 5, 124, 0, 0, 530, 120, 1, 0, 0, 0, 531, 532, 5, 38, 0, 0, 532, 533, 5, 38, 0, 0, 533, 122, 1, 0, 0, 0, 534, 535, 5, 124, 0, 0, 535, 536, 5, 124, 0, 0, 536, 124, 1, 0, 0, 0, 537, 538, 5, 99, 0, 0, 538, 539, 5, 111, 0, 0, 539, 540, 5, 110, 0, 0, 540, 541, 5, 115, 0, 0, 541, 542, 5, 116, 0, 0, 542, 543, 5, 97, 0, 0, 543, 544, 5, 110, 0, 0, 544, 545, 5, 116, 0, 0, 545, 126, 1, 0, 0, 0, 546, 548, 7, 0, 0, 0, 547, 546, 1, 0, 0, 0, 548, 549, 1, 0, 0, 0, 549, 547, 1, 0, 0, 0, 549, 550, 1, 0, 0, 0, 550, 551, 1, 0, 0, 0, 551, 553, 5, 46, 0, 0, 552, 554, 7, 0, 0, 0, 553, 552, 1, 0, 0, 0, 554, 555, 1, 0, 0, 0, 555, 553, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, 559, 5, 46, 0, 0, 558, 560, 7, 0, 0, 0, 559, 558, 1, 0, 0, 0, 560, 561, 1, 0, 0, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 128, 1, 0, 0, 0, 563, 564, 5, 116, 0, 0, 564, 565, 5, 114, 0, 0, 565, 566, 5, 117, 0, 0, 566, 573, 5, 101, 0, 0, 567, 568, 5, 102, 0, 0, 568, 569, 5, 97, 0, 0, 569, 570, 5, 108, 0, 0, 570, 571, 5, 115, 0, 0, 571, 573, 5, 101, 0, 0, 572, 563, 1, 0, 0, 0, 572, 567, 1, 0, 0, 0, 573, 130, 1, 0, 0, 0, 574, 575, 5, 115, 0, 0, 575, 576, 5, 97, 0, 0, 576, 577, 5, 116, 0, 0, 577, 578, 5, 111, 0, 0, 578, 579, 5, 115, 0, 0, 579, 580, 5, 104, 0, 0, 580, 581, 5, 105, 0, 0, 581, 632, 5, 115, 0, 0, 582, 583, 5, 115, 0, 0, 583, 584, 5, 97, 0, 0, 584, 585, 5, 116, 0, 0, 585, 632, 5, 115, 0, 0, 586, 587, 5, 102, 0, 0, 587, 588, 5, 105, 0, 0, 588, 589, 5, 110, 0, 0, 589, 590, 5, 110, 0, 0, 590, 591, 5, 101, 0, 0, 591, 632, 5, 121, 0, 0, 592, 593, 5, 98, 0, 0, 593, 594, 5, 105, 0, 0, 594, 595, 5, 116, 0, 0, 595, 632, 5, 115, 0, 0, 596, 597, 5, 98, 0, 0, 597, 598, 5, 105, 0, 0, 598, 599, 5, 116, 0, 0, 599, 600, 5, 99, 0, 0, 600, 601, 5, 111, 0, 0, 601, 602, 5, 105, 0, 0, 602, 632, 5, 110, 0, 0, 603, 604, 5, 115, 0, 0, 604, 605, 5, 101, 0, 0, 605, 606, 5, 99, 0, 0, 606, 607, 5, 111, 0, 0, 607, 608, 5, 110, 0, 0, 608, 609, 5, 100, 0, 0, 609, 632, 5, 115, 0, 0, 610, 611, 5, 109, 0, 0, 611, 612, 5, 105, 0, 0, 612, 613, 5, 110, 0, 0, 613, 614, 5, 117, 0, 0, 614, 615, 5, 116, 0, 0, 615, 616, 5, 101, 0, 0, 616, 632, 5, 115, 0, 0, 617, 618, 5, 104, 0, 0, 618, 619, 5, 111, 0, 0, 619, 620, 5, 117, 0, 0, 620, 621, 5, 114, 0, 0, 621, 632, 5, 115, 0, 0, 622, 623, 5, 100, 0, 0, 623, 624, 5, 97, 0, 0, 624, 625, 5, 121, 0, 0, 625, 632, 5, 115, 0, 0, 626, 627, 5, 119, 0, 0, 627, 628, 5, 101, 0, 0, 628, 629, 5, 101, 0, 0, 629, 630, 5, 107, 0, 0, 630, 632, 5, 115, 0, 0, 631, 574, 1, 0, 0, 0, 631, 582, 1, 0, 0, 0, 631, 586, 1, 0, 0, 0, 631, 592, 1, 0, 0, 0, 631, 596, 1, 0, 0, 0, 631, 603, 1, 0, 0, 0, 631, 610, 1, 0, 0, 0, 631, 617, 1, 0, 0, 0, 631, 622, 1, 0, 0, 0, 631, 626, 1, 0, 0, 0, 632, 132, 1, 0, 0, 0, 633, 635, 5, 45, 0, 0, 634, 633, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 638, 3, 135, 67, 0, 637, 639, 3, 137, 68, 0, 638, 637, 1, 0, 0, 0, 638, 639, 1, 0, 0, 0, 639, 134, 1, 0, 0, 0, 640, 642, 7, 0, 0, 0, 641, 640, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 641, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 653, 1, 0, 0, 0, 645, 647, 5, 95, 0, 0, 646, 648, 7, 0, 0, 0, 647, 646, 1, 0, 0, 0, 648, 649, 1, 0, 0, 0, 649, 647, 1, 0, 0, 0, 649, 650, 1, 0, 0, 0, 650, 652, 1, 0, 0, 0, 651, 645, 1, 0, 0, 0, 652, 655, 1, 0, 0, 0, 653, 651, 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 136, 1, 0, 0, 0, 655, 653, 1, 0, 0, 0, 656, 657, 7, 1, 0, 0, 657, 658, 3, 135, 67, 0, 658, 138, 1, 0, 0, 0, 659, 660, 5, 105, 0, 0, 660, 661, 5, 110, 0, 0, 661, 689, 5, 116, 0, 0, 662, 663, 5, 98, 0, 0, 663, 664, 5, 111, 0, 0, 664, 665, 5, 111, 0, 0, 665, 689, 5, 108, 0, 0, 666, 667, 5, 115, 0, 0, 667, 668, 5, 116, 0, 0, 668, 669, 5, 114, 0, 0, 669, 670, 5, 105, 0, 0, 670, 671, 5, 110, 0, 0, 671, 689, 5, 103, 0, 0, 672, 673, 5, 112, 0, 0, 673, 674, 5, 117, 0, 0, 674, 675, 5, 98, 0, 0, 675, 676, 5, 107, 0, 0, 676, 677, 5, 101, 0, 0, 677, 689, 5, 121, 0, 0, 678, 679, 5, 115, 0, 0, 679, 680, 5, 105, 0, 0, 680, 689, 5, 103, 0, 0, 681, 682, 5, 100, 0, 0, 682, 683, 5, 97, 0, 0, 683, 684, 5, 116, 0, 0, 684, 685, 5, 97, 0, 0, 685, 686, 5, 115, 0, 0, 686, 687, 5, 105, 0, 0, 687, 689, 5, 103, 0, 0, 688, 659, 1, 0, 0, 0, 688, 662, 1, 0, 0, 0, 688, 666, 1, 0, 0, 0, 688, 672, 1, 0, 0, 0, 688, 678, 1, 0, 0, 0, 688, 681, 1, 0, 0, 0, 689, 140, 1, 0, 0, 0, 690, 691, 5, 98, 0, 0, 691, 692, 5, 121, 0, 0, 692, 693, 5, 116, 0, 0, 693, 694, 5, 101, 0, 0, 694, 695, 5, 115, 0, 0, 695, 142, 1, 0, 0, 0, 696, 697, 5, 98, 0, 0, 697, 698, 5, 121, 0, 0, 698, 699, 5, 116, 0, 0, 699, 700, 5, 101, 0, 0, 700, 701, 5, 115, 0, 0, 701, 702, 1, 0, 0, 0, 702, 708, 3, 145, 72, 0, 703, 704, 5, 98, 0, 0, 704, 705, 5, 121, 0, 0, 705, 706, 5, 116, 0, 0, 706, 708, 5, 101, 0, 0, 707, 696, 1, 0, 0, 0, 707, 703, 1, 0, 0, 0, 708, 144, 1, 0, 0, 0, 709, 713, 7, 2, 0, 0, 710, 712, 7, 0, 0, 0, 711, 710, 1, 0, 0, 0, 712, 715, 1, 0, 0, 0, 713, 711, 1, 0, 0, 0, 713, 714, 1, 0, 0, 0, 714, 146, 1, 0, 0, 0, 715, 713, 1, 0, 0, 0, 716, 722, 5, 34, 0, 0, 717, 718, 5, 92, 0, 0, 718, 721, 5, 34, 0, 0, 719, 721, 8, 3, 0, 0, 720, 717, 1, 0, 0, 0, 720, 719, 1, 0, 0, 0, 721, 724, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 722, 720, 1, 0, 0, 0, 723, 725, 1, 0, 0, 0, 724, 722, 1, 0, 0, 0, 725, 737, 5, 34, 0, 0, 726, 732, 5, 39, 0, 0, 727, 728, 5, 92, 0, 0, 728, 731, 5, 39, 0, 0, 729, 731, 8, 4, 0, 0, 730, 727, 1, 0, 0, 0, 730, 729, 1, 0, 0, 0, 731, 734, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 732, 730, 1, 0, 0, 0, 733, 735, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 735, 737, 5, 39, 0, 0, 736, 716, 1, 0, 0, 0, 736, 726, 1, 0, 0, 0, 737, 148, 1, 0, 0, 0, 738, 739, 5, 100, 0, 0, 739, 740, 5, 97, 0, 0, 740, 741, 5, 116, 0, 0, 741, 742, 5, 101, 0, 0, 742, 743, 5, 40, 0, 0, 743, 744, 1, 0, 0, 0, 744, 745, 3, 147, 73, 0, 745, 746, 5, 41, 0, 0, 746, 150, 1, 0, 0, 0, 747, 748, 5, 48, 0, 0, 748, 752, 7, 5, 0, 0, 749, 751, 7, 6, 0, 0, 750, 749, 1, 0, 0, 0, 751, 754, 1, 0, 0, 0, 752, 750, 1, 0, 0, 0, 752, 753, 1, 0, 0, 0, 753, 152, 1, 0, 0, 0, 754, 752, 1, 0, 0, 0, 755, 756, 5, 116, 0, 0, 756, 757, 5, 104, 0, 0, 757, 758, 5, 105, 0, 0, 758, 759, 5, 115, 0, 0, 759, 760, 5, 46, 0, 0, 760, 761, 5, 97, 0, 0, 761, 762, 5, 103, 0, 0, 762, 771, 5, 101, 0, 0, 763, 764, 5, 116, 0, 0, 764, 765, 5, 120, 0, 0, 765, 766, 5, 46, 0, 0, 766, 767, 5, 116, 0, 0, 767, 768, 5, 105, 0, 0, 768, 769, 5, 109, 0, 0, 769, 771, 5, 101, 0, 0, 770, 755, 1, 0, 0, 0, 770, 763, 1, 0, 0, 0, 771, 154, 1, 0, 0, 0, 772, 773, 5, 117, 0, 0, 773, 774, 5, 110, 0, 0, 774, 775, 5, 115, 0, 0, 775, 776, 5, 97, 0, 0, 776, 777, 5, 102, 0, 0, 777, 778, 5, 101, 0, 0, 778, 779, 5, 95, 0, 0, 779, 780, 5, 105, 0, 0, 780, 781, 5, 110, 0, 0, 781, 821, 5, 116, 0, 0, 782, 783, 5, 117, 0, 0, 783, 784, 5, 110, 0, 0, 784, 785, 5, 115, 0, 0, 785, 786, 5, 97, 0, 0, 786, 787, 5, 102, 0, 0, 787, 788, 5, 101, 0, 0, 788, 789, 5, 95, 0, 0, 789, 790, 5, 98, 0, 0, 790, 791, 5, 111, 0, 0, 791, 792, 5, 111, 0, 0, 792, 821, 5, 108, 0, 0, 793, 794, 5, 117, 0, 0, 794, 795, 5, 110, 0, 0, 795, 796, 5, 115, 0, 0, 796, 797, 5, 97, 0, 0, 797, 798, 5, 102, 0, 0, 798, 799, 5, 101, 0, 0, 799, 800, 5, 95, 0, 0, 800, 801, 5, 98, 0, 0, 801, 802, 5, 121, 0, 0, 802, 803, 5, 116, 0, 0, 803, 804, 5, 101, 0, 0, 804, 805, 5, 115, 0, 0, 805, 807, 1, 0, 0, 0, 806, 808, 3, 145, 72, 0, 807, 806, 1, 0, 0, 0, 807, 808, 1, 0, 0, 0, 808, 821, 1, 0, 0, 0, 809, 810, 5, 117, 0, 0, 810, 811, 5, 110, 0, 0, 811, 812, 5, 115, 0, 0, 812, 813, 5, 97, 0, 0, 813, 814, 5, 102, 0, 0, 814, 815, 5, 101, 0, 0, 815, 816, 5, 95, 0, 0, 816, 817, 5, 98, 0, 0, 817, 818, 5, 121, 0, 0, 818, 819, 5, 116, 0, 0, 819, 821, 5, 101, 0, 0, 820, 772, 1, 0, 0, 0, 820, 782, 1, 0, 0, 0, 820, 793, 1, 0, 0, 0, 820, 809, 1, 0, 0, 0, 821, 156, 1, 0, 0, 0, 822, 823, 5, 116, 0, 0, 823, 824, 5, 104, 0, 0, 824, 825, 5, 105, 0, 0, 825, 826, 5, 115, 0, 0, 826, 827, 5, 46, 0, 0, 827, 828, 5, 97, 0, 0, 828, 829, 5, 99, 0, 0, 829, 830, 5, 116, 0, 0, 830, 831, 5, 105, 0, 0, 831, 832, 5, 118, 0, 0, 832, 833, 5, 101, 0, 0, 833, 834, 5, 73, 0, 0, 834, 835, 5, 110, 0, 0, 835, 836, 5, 112, 0, 0, 836, 837, 5, 117, 0, 0, 837, 838, 5, 116, 0, 0, 838, 839, 5, 73, 0, 0, 839, 840, 5, 110, 0, 0, 840, 841, 5, 100, 0, 0, 841, 842, 5, 101, 0, 0, 842, 917, 5, 120, 0, 0, 843, 844, 5, 116, 0, 0, 844, 845, 5, 104, 0, 0, 845, 846, 5, 105, 0, 0, 846, 847, 5, 115, 0, 0, 847, 848, 5, 46, 0, 0, 848, 849, 5, 97, 0, 0, 849, 850, 5, 99, 0, 0, 850, 851, 5, 116, 0, 0, 851, 852, 5, 105, 0, 0, 852, 853, 5, 118, 0, 0, 853, 854, 5, 101, 0, 0, 854, 855, 5, 66, 0, 0, 855, 856, 5, 121, 0, 0, 856, 857, 5, 116, 0, 0, 857, 858, 5, 101, 0, 0, 858, 859, 5, 99, 0, 0, 859, 860, 5, 111, 0, 0, 860, 861, 5, 100, 0, 0, 861, 917, 5, 101, 0, 0, 862, 863, 5, 116, 0, 0, 863, 864, 5, 120, 0, 0, 864, 865, 5, 46, 0, 0, 865, 866, 5, 105, 0, 0, 866, 867, 5, 110, 0, 0, 867, 868, 5, 112, 0, 0, 868, 869, 5, 117, 0, 0, 869, 870, 5, 116, 0, 0, 870, 871, 5, 115, 0, 0, 871, 872, 5, 46, 0, 0, 872, 873, 5, 108, 0, 0, 873, 874, 5, 101, 0, 0, 874, 875, 5, 110, 0, 0, 875, 876, 5, 103, 0, 0, 876, 877, 5, 116, 0, 0, 877, 917, 5, 104, 0, 0, 878, 879, 5, 116, 0, 0, 879, 880, 5, 120, 0, 0, 880, 881, 5, 46, 0, 0, 881, 882, 5, 111, 0, 0, 882, 883, 5, 117, 0, 0, 883, 884, 5, 116, 0, 0, 884, 885, 5, 112, 0, 0, 885, 886, 5, 117, 0, 0, 886, 887, 5, 116, 0, 0, 887, 888, 5, 115, 0, 0, 888, 889, 5, 46, 0, 0, 889, 890, 5, 108, 0, 0, 890, 891, 5, 101, 0, 0, 891, 892, 5, 110, 0, 0, 892, 893, 5, 103, 0, 0, 893, 894, 5, 116, 0, 0, 894, 917, 5, 104, 0, 0, 895, 896, 5, 116, 0, 0, 896, 897, 5, 120, 0, 0, 897, 898, 5, 46, 0, 0, 898, 899, 5, 118, 0, 0, 899, 900, 5, 101, 0, 0, 900, 901, 5, 114, 0, 0, 901, 902, 5, 115, 0, 0, 902, 903, 5, 105, 0, 0, 903, 904, 5, 111, 0, 0, 904, 917, 5, 110, 0, 0, 905, 906, 5, 116, 0, 0, 906, 907, 5, 120, 0, 0, 907, 908, 5, 46, 0, 0, 908, 909, 5, 108, 0, 0, 909, 910, 5, 111, 0, 0, 910, 911, 5, 99, 0, 0, 911, 912, 5, 107, 0, 0, 912, 913, 5, 116, 0, 0, 913, 914, 5, 105, 0, 0, 914, 915, 5, 109, 0, 0, 915, 917, 5, 101, 0, 0, 916, 822, 1, 0, 0, 0, 916, 843, 1, 0, 0, 0, 916, 862, 1, 0, 0, 0, 916, 878, 1, 0, 0, 0, 916, 895, 1, 0, 0, 0, 916, 905, 1, 0, 0, 0, 917, 158, 1, 0, 0, 0, 918, 922, 7, 7, 0, 0, 919, 921, 7, 8, 0, 0, 920, 919, 1, 0, 0, 0, 921, 924, 1, 0, 0, 0, 922, 920, 1, 0, 0, 0, 922, 923, 1, 0, 0, 0, 923, 160, 1, 0, 0, 0, 924, 922, 1, 0, 0, 0, 925, 927, 7, 9, 0, 0, 926, 925, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 926, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 930, 1, 0, 0, 0, 930, 931, 6, 80, 0, 0, 931, 162, 1, 0, 0, 0, 932, 933, 5, 47, 0, 0, 933, 934, 5, 42, 0, 0, 934, 938, 1, 0, 0, 0, 935, 937, 9, 0, 0, 0, 936, 935, 1, 0, 0, 0, 937, 940, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 938, 936, 1, 0, 0, 0, 939, 941, 1, 0, 0, 0, 940, 938, 1, 0, 0, 0, 941, 942, 5, 42, 0, 0, 942, 943, 5, 47, 0, 0, 943, 944, 1, 0, 0, 0, 944, 945, 6, 81, 1, 0, 945, 164, 1, 0, 0, 0, 946, 947, 5, 47, 0, 0, 947, 948, 5, 47, 0, 0, 948, 952, 1, 0, 0, 0, 949, 951, 8, 10, 0, 0, 950, 949, 1, 0, 0, 0, 951, 954, 1, 0, 0, 0, 952, 950, 1, 0, 0, 0, 952, 953, 1, 0, 0, 0, 953, 955, 1, 0, 0, 0, 954, 952, 1, 0, 0, 0, 955, 956, 6, 82, 1, 0, 956, 166, 1, 0, 0, 0, 28, 0, 549, 555, 561, 572, 631, 634, 638, 643, 649, 653, 688, 707, 713, 720, 722, 730, 732, 736, 752, 770, 807, 820, 916, 922, 928, 938, 952, 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 b9cfb61b..0d18270e 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.tokens +++ b/packages/cashc/src/grammar/CashScriptLexer.tokens @@ -59,26 +59,28 @@ T__57=58 T__58=59 T__59=60 T__60=61 -VersionLiteral=62 -BooleanLiteral=63 -NumberUnit=64 -NumberLiteral=65 -NumberPart=66 -ExponentPart=67 -PrimitiveType=68 -UnboundedBytes=69 -BoundedBytes=70 -Bound=71 -StringLiteral=72 -DateLiteral=73 -HexLiteral=74 -TxVar=75 -UnsafeCast=76 -NullaryOp=77 -Identifier=78 -WHITESPACE=79 -COMMENT=80 -LINE_COMMENT=81 +T__61=62 +T__62=63 +VersionLiteral=64 +BooleanLiteral=65 +NumberUnit=66 +NumberLiteral=67 +NumberPart=68 +ExponentPart=69 +PrimitiveType=70 +UnboundedBytes=71 +BoundedBytes=72 +Bound=73 +StringLiteral=74 +DateLiteral=75 +HexLiteral=76 +TxVar=77 +UnsafeCast=78 +NullaryOp=79 +Identifier=80 +WHITESPACE=81 +COMMENT=82 +LINE_COMMENT=83 'pragma'=1 ';'=2 'cashscript'=3 @@ -93,51 +95,53 @@ LINE_COMMENT=81 '{'=12 '}'=13 'function'=14 -'('=15 -','=16 -')'=17 -'+='=18 -'-='=19 -'++'=20 -'--'=21 -'require'=22 -'console.log'=23 -'if'=24 -'else'=25 -'do'=26 -'while'=27 -'for'=28 -'new'=29 -'['=30 -']'=31 -'tx.outputs'=32 -'.value'=33 -'.lockingBytecode'=34 -'.tokenCategory'=35 -'.nftCommitment'=36 -'.tokenAmount'=37 -'tx.inputs'=38 -'.outpointTransactionHash'=39 -'.outpointIndex'=40 -'.unlockingBytecode'=41 -'.sequenceNumber'=42 -'.reverse()'=43 -'.length'=44 -'.split'=45 -'.slice'=46 -'!'=47 -'-'=48 -'*'=49 -'/'=50 -'%'=51 -'+'=52 -'>>'=53 -'<<'=54 -'=='=55 -'!='=56 -'&'=57 -'|'=58 -'&&'=59 -'||'=60 -'constant'=61 -'bytes'=69 +'returns'=15 +'('=16 +','=17 +')'=18 +'return'=19 +'+='=20 +'-='=21 +'++'=22 +'--'=23 +'require'=24 +'console.log'=25 +'if'=26 +'else'=27 +'do'=28 +'while'=29 +'for'=30 +'new'=31 +'['=32 +']'=33 +'tx.outputs'=34 +'.value'=35 +'.lockingBytecode'=36 +'.tokenCategory'=37 +'.nftCommitment'=38 +'.tokenAmount'=39 +'tx.inputs'=40 +'.outpointTransactionHash'=41 +'.outpointIndex'=42 +'.unlockingBytecode'=43 +'.sequenceNumber'=44 +'.reverse()'=45 +'.length'=46 +'.split'=47 +'.slice'=48 +'!'=49 +'-'=50 +'*'=51 +'/'=52 +'%'=53 +'+'=54 +'>>'=55 +'<<'=56 +'=='=57 +'!='=58 +'&'=59 +'|'=60 +'&&'=61 +'||'=62 +'constant'=63 +'bytes'=71 diff --git a/packages/cashc/src/grammar/CashScriptLexer.ts b/packages/cashc/src/grammar/CashScriptLexer.ts index c67a03b5..42ccf855 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, @@ -73,26 +73,28 @@ export default class CashScriptLexer extends Lexer { public static readonly T__58 = 59; public static readonly T__59 = 60; public static readonly T__60 = 61; - public static readonly VersionLiteral = 62; - public static readonly BooleanLiteral = 63; - public static readonly NumberUnit = 64; - public static readonly NumberLiteral = 65; - public static readonly NumberPart = 66; - public static readonly ExponentPart = 67; - public static readonly PrimitiveType = 68; - public static readonly UnboundedBytes = 69; - public static readonly BoundedBytes = 70; - public static readonly Bound = 71; - public static readonly StringLiteral = 72; - public static readonly DateLiteral = 73; - public static readonly HexLiteral = 74; - public static readonly TxVar = 75; - public static readonly UnsafeCast = 76; - public static readonly NullaryOp = 77; - public static readonly Identifier = 78; - public static readonly WHITESPACE = 79; - public static readonly COMMENT = 80; - public static readonly LINE_COMMENT = 81; + public static readonly T__61 = 62; + public static readonly T__62 = 63; + public static readonly VersionLiteral = 64; + public static readonly BooleanLiteral = 65; + public static readonly NumberUnit = 66; + public static readonly NumberLiteral = 67; + public static readonly NumberPart = 68; + public static readonly ExponentPart = 69; + public static readonly PrimitiveType = 70; + public static readonly UnboundedBytes = 71; + public static readonly BoundedBytes = 72; + public static readonly Bound = 73; + public static readonly StringLiteral = 74; + public static readonly DateLiteral = 75; + public static readonly HexLiteral = 76; + public static readonly TxVar = 77; + public static readonly UnsafeCast = 78; + public static readonly NullaryOp = 79; + public static readonly Identifier = 80; + public static readonly WHITESPACE = 81; + public static readonly COMMENT = 82; + public static readonly LINE_COMMENT = 83; public static readonly EOF = Token.EOF; public static readonly channelNames: string[] = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ]; @@ -104,10 +106,12 @@ export default class CashScriptLexer extends Lexer { "'='", "'contract'", "'{'", "'}'", "'function'", + "'returns'", "'('", "','", - "')'", "'+='", - "'-='", "'++'", - "'--'", "'require'", + "')'", "'return'", + "'+='", "'-='", + "'++'", "'--'", + "'require'", "'console.log'", "'if'", "'else'", "'do'", "'while'", @@ -171,6 +175,7 @@ export default class CashScriptLexer extends Lexer { null, null, null, null, null, null, + null, null, "VersionLiteral", "BooleanLiteral", "NumberUnit", @@ -199,11 +204,11 @@ export default class CashScriptLexer extends Lexer { "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", "T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48", "T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56", - "T__57", "T__58", "T__59", "T__60", "VersionLiteral", "BooleanLiteral", - "NumberUnit", "NumberLiteral", "NumberPart", "ExponentPart", "PrimitiveType", - "UnboundedBytes", "BoundedBytes", "Bound", "StringLiteral", "DateLiteral", - "HexLiteral", "TxVar", "UnsafeCast", "NullaryOp", "Identifier", "WHITESPACE", - "COMMENT", "LINE_COMMENT", + "T__57", "T__58", "T__59", "T__60", "T__61", "T__62", "VersionLiteral", + "BooleanLiteral", "NumberUnit", "NumberLiteral", "NumberPart", "ExponentPart", + "PrimitiveType", "UnboundedBytes", "BoundedBytes", "Bound", "StringLiteral", + "DateLiteral", "HexLiteral", "TxVar", "UnsafeCast", "NullaryOp", "Identifier", + "WHITESPACE", "COMMENT", "LINE_COMMENT", ]; @@ -224,7 +229,7 @@ export default class CashScriptLexer extends Lexer { public get modeNames(): string[] { return CashScriptLexer.modeNames; } - public static readonly _serializedATN: number[] = [4,0,81,938,6,-1,2,0, + public static readonly _serializedATN: number[] = [4,0,83,957,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, @@ -235,304 +240,310 @@ export default class CashScriptLexer extends Lexer { 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,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,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,13, - 1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1, - 17,1,18,1,18,1,18,1,19,1,19,1,19,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,1,22,1,22,1,22,1,22,1,22,1,22,1, - 22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26, - 1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,29,1,29,1,30,1, - 30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32, - 1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1, - 33,1,33,1,33,1,33,1,33,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,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1, - 35,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,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,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,39,1,39,1,40,1,40, + 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,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,10,1,10,1,11,1,11,1,12,1, + 12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14, + 1,14,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1, + 18,1,18,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,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1, + 24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,27,1,27, + 1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1, + 30,1,31,1,31,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33, + 1,33,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,35,1,35,1,35,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,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,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,40,1,40,1,40,1,40,1,40,1,40,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,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,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,46,1,46,1,47,1,47,1,48,1,48,1, - 49,1,49,1,50,1,50,1,51,1,51,1,52,1,52,1,52,1,53,1,53,1,53,1,54,1,54,1,54, - 1,55,1,55,1,55,1,56,1,56,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,59,1,60,1, - 60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,61,4,61,529,8,61,11,61,12,61,530, - 1,61,1,61,4,61,535,8,61,11,61,12,61,536,1,61,1,61,4,61,541,8,61,11,61,12, - 61,542,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,3,62,554,8,62,1,63, - 1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1, - 63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63, - 1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1, - 63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,3,63,613, - 8,63,1,64,3,64,616,8,64,1,64,1,64,3,64,620,8,64,1,65,4,65,623,8,65,11,65, - 12,65,624,1,65,1,65,4,65,629,8,65,11,65,12,65,630,5,65,633,8,65,10,65,12, - 65,636,9,65,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67, - 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1, - 67,1,67,1,67,1,67,1,67,1,67,3,67,670,8,67,1,68,1,68,1,68,1,68,1,68,1,68, - 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,3,69,689,8,69,1, - 70,1,70,5,70,693,8,70,10,70,12,70,696,9,70,1,71,1,71,1,71,1,71,5,71,702, - 8,71,10,71,12,71,705,9,71,1,71,1,71,1,71,1,71,1,71,5,71,712,8,71,10,71, - 12,71,715,9,71,1,71,3,71,718,8,71,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1, - 72,1,72,1,73,1,73,1,73,5,73,732,8,73,10,73,12,73,735,9,73,1,74,1,74,1,74, - 1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,3,74,752,8, - 74,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75, - 1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1, - 75,1,75,1,75,1,75,1,75,1,75,1,75,3,75,789,8,75,1,75,1,75,1,75,1,75,1,75, - 1,75,1,75,1,75,1,75,1,75,1,75,3,75,802,8,75,1,76,1,76,1,76,1,76,1,76,1, - 76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76, - 1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1, - 76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76, - 1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1, - 76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76, - 1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1, - 76,1,76,3,76,898,8,76,1,77,1,77,5,77,902,8,77,10,77,12,77,905,9,77,1,78, - 4,78,908,8,78,11,78,12,78,909,1,78,1,78,1,79,1,79,1,79,1,79,5,79,918,8, - 79,10,79,12,79,921,9,79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,5, - 80,932,8,80,10,80,12,80,935,9,80,1,80,1,80,3,703,713,919,0,81,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,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,982,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,1,163,1,0,0, - 0,3,170,1,0,0,0,5,172,1,0,0,0,7,183,1,0,0,0,9,185,1,0,0,0,11,187,1,0,0, - 0,13,190,1,0,0,0,15,192,1,0,0,0,17,194,1,0,0,0,19,197,1,0,0,0,21,199,1, - 0,0,0,23,208,1,0,0,0,25,210,1,0,0,0,27,212,1,0,0,0,29,221,1,0,0,0,31,223, - 1,0,0,0,33,225,1,0,0,0,35,227,1,0,0,0,37,230,1,0,0,0,39,233,1,0,0,0,41, - 236,1,0,0,0,43,239,1,0,0,0,45,247,1,0,0,0,47,259,1,0,0,0,49,262,1,0,0,0, - 51,267,1,0,0,0,53,270,1,0,0,0,55,276,1,0,0,0,57,280,1,0,0,0,59,284,1,0, - 0,0,61,286,1,0,0,0,63,288,1,0,0,0,65,299,1,0,0,0,67,306,1,0,0,0,69,323, - 1,0,0,0,71,338,1,0,0,0,73,353,1,0,0,0,75,366,1,0,0,0,77,376,1,0,0,0,79, - 401,1,0,0,0,81,416,1,0,0,0,83,435,1,0,0,0,85,451,1,0,0,0,87,462,1,0,0,0, - 89,470,1,0,0,0,91,477,1,0,0,0,93,484,1,0,0,0,95,486,1,0,0,0,97,488,1,0, - 0,0,99,490,1,0,0,0,101,492,1,0,0,0,103,494,1,0,0,0,105,496,1,0,0,0,107, - 499,1,0,0,0,109,502,1,0,0,0,111,505,1,0,0,0,113,508,1,0,0,0,115,510,1,0, - 0,0,117,512,1,0,0,0,119,515,1,0,0,0,121,518,1,0,0,0,123,528,1,0,0,0,125, - 553,1,0,0,0,127,612,1,0,0,0,129,615,1,0,0,0,131,622,1,0,0,0,133,637,1,0, - 0,0,135,669,1,0,0,0,137,671,1,0,0,0,139,688,1,0,0,0,141,690,1,0,0,0,143, - 717,1,0,0,0,145,719,1,0,0,0,147,728,1,0,0,0,149,751,1,0,0,0,151,801,1,0, - 0,0,153,897,1,0,0,0,155,899,1,0,0,0,157,907,1,0,0,0,159,913,1,0,0,0,161, - 927,1,0,0,0,163,164,5,112,0,0,164,165,5,114,0,0,165,166,5,97,0,0,166,167, - 5,103,0,0,167,168,5,109,0,0,168,169,5,97,0,0,169,2,1,0,0,0,170,171,5,59, - 0,0,171,4,1,0,0,0,172,173,5,99,0,0,173,174,5,97,0,0,174,175,5,115,0,0,175, - 176,5,104,0,0,176,177,5,115,0,0,177,178,5,99,0,0,178,179,5,114,0,0,179, - 180,5,105,0,0,180,181,5,112,0,0,181,182,5,116,0,0,182,6,1,0,0,0,183,184, - 5,94,0,0,184,8,1,0,0,0,185,186,5,126,0,0,186,10,1,0,0,0,187,188,5,62,0, - 0,188,189,5,61,0,0,189,12,1,0,0,0,190,191,5,62,0,0,191,14,1,0,0,0,192,193, - 5,60,0,0,193,16,1,0,0,0,194,195,5,60,0,0,195,196,5,61,0,0,196,18,1,0,0, - 0,197,198,5,61,0,0,198,20,1,0,0,0,199,200,5,99,0,0,200,201,5,111,0,0,201, - 202,5,110,0,0,202,203,5,116,0,0,203,204,5,114,0,0,204,205,5,97,0,0,205, - 206,5,99,0,0,206,207,5,116,0,0,207,22,1,0,0,0,208,209,5,123,0,0,209,24, - 1,0,0,0,210,211,5,125,0,0,211,26,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,28,1,0,0,0,221,222,5,40,0,0, - 222,30,1,0,0,0,223,224,5,44,0,0,224,32,1,0,0,0,225,226,5,41,0,0,226,34, - 1,0,0,0,227,228,5,43,0,0,228,229,5,61,0,0,229,36,1,0,0,0,230,231,5,45,0, - 0,231,232,5,61,0,0,232,38,1,0,0,0,233,234,5,43,0,0,234,235,5,43,0,0,235, - 40,1,0,0,0,236,237,5,45,0,0,237,238,5,45,0,0,238,42,1,0,0,0,239,240,5,114, - 0,0,240,241,5,101,0,0,241,242,5,113,0,0,242,243,5,117,0,0,243,244,5,105, - 0,0,244,245,5,114,0,0,245,246,5,101,0,0,246,44,1,0,0,0,247,248,5,99,0,0, - 248,249,5,111,0,0,249,250,5,110,0,0,250,251,5,115,0,0,251,252,5,111,0,0, - 252,253,5,108,0,0,253,254,5,101,0,0,254,255,5,46,0,0,255,256,5,108,0,0, - 256,257,5,111,0,0,257,258,5,103,0,0,258,46,1,0,0,0,259,260,5,105,0,0,260, - 261,5,102,0,0,261,48,1,0,0,0,262,263,5,101,0,0,263,264,5,108,0,0,264,265, - 5,115,0,0,265,266,5,101,0,0,266,50,1,0,0,0,267,268,5,100,0,0,268,269,5, - 111,0,0,269,52,1,0,0,0,270,271,5,119,0,0,271,272,5,104,0,0,272,273,5,105, - 0,0,273,274,5,108,0,0,274,275,5,101,0,0,275,54,1,0,0,0,276,277,5,102,0, - 0,277,278,5,111,0,0,278,279,5,114,0,0,279,56,1,0,0,0,280,281,5,110,0,0, - 281,282,5,101,0,0,282,283,5,119,0,0,283,58,1,0,0,0,284,285,5,91,0,0,285, - 60,1,0,0,0,286,287,5,93,0,0,287,62,1,0,0,0,288,289,5,116,0,0,289,290,5, - 120,0,0,290,291,5,46,0,0,291,292,5,111,0,0,292,293,5,117,0,0,293,294,5, - 116,0,0,294,295,5,112,0,0,295,296,5,117,0,0,296,297,5,116,0,0,297,298,5, - 115,0,0,298,64,1,0,0,0,299,300,5,46,0,0,300,301,5,118,0,0,301,302,5,97, - 0,0,302,303,5,108,0,0,303,304,5,117,0,0,304,305,5,101,0,0,305,66,1,0,0, - 0,306,307,5,46,0,0,307,308,5,108,0,0,308,309,5,111,0,0,309,310,5,99,0,0, - 310,311,5,107,0,0,311,312,5,105,0,0,312,313,5,110,0,0,313,314,5,103,0,0, - 314,315,5,66,0,0,315,316,5,121,0,0,316,317,5,116,0,0,317,318,5,101,0,0, - 318,319,5,99,0,0,319,320,5,111,0,0,320,321,5,100,0,0,321,322,5,101,0,0, - 322,68,1,0,0,0,323,324,5,46,0,0,324,325,5,116,0,0,325,326,5,111,0,0,326, - 327,5,107,0,0,327,328,5,101,0,0,328,329,5,110,0,0,329,330,5,67,0,0,330, - 331,5,97,0,0,331,332,5,116,0,0,332,333,5,101,0,0,333,334,5,103,0,0,334, - 335,5,111,0,0,335,336,5,114,0,0,336,337,5,121,0,0,337,70,1,0,0,0,338,339, - 5,46,0,0,339,340,5,110,0,0,340,341,5,102,0,0,341,342,5,116,0,0,342,343, - 5,67,0,0,343,344,5,111,0,0,344,345,5,109,0,0,345,346,5,109,0,0,346,347, - 5,105,0,0,347,348,5,116,0,0,348,349,5,109,0,0,349,350,5,101,0,0,350,351, - 5,110,0,0,351,352,5,116,0,0,352,72,1,0,0,0,353,354,5,46,0,0,354,355,5,116, - 0,0,355,356,5,111,0,0,356,357,5,107,0,0,357,358,5,101,0,0,358,359,5,110, - 0,0,359,360,5,65,0,0,360,361,5,109,0,0,361,362,5,111,0,0,362,363,5,117, - 0,0,363,364,5,110,0,0,364,365,5,116,0,0,365,74,1,0,0,0,366,367,5,116,0, - 0,367,368,5,120,0,0,368,369,5,46,0,0,369,370,5,105,0,0,370,371,5,110,0, - 0,371,372,5,112,0,0,372,373,5,117,0,0,373,374,5,116,0,0,374,375,5,115,0, - 0,375,76,1,0,0,0,376,377,5,46,0,0,377,378,5,111,0,0,378,379,5,117,0,0,379, - 380,5,116,0,0,380,381,5,112,0,0,381,382,5,111,0,0,382,383,5,105,0,0,383, - 384,5,110,0,0,384,385,5,116,0,0,385,386,5,84,0,0,386,387,5,114,0,0,387, - 388,5,97,0,0,388,389,5,110,0,0,389,390,5,115,0,0,390,391,5,97,0,0,391,392, - 5,99,0,0,392,393,5,116,0,0,393,394,5,105,0,0,394,395,5,111,0,0,395,396, - 5,110,0,0,396,397,5,72,0,0,397,398,5,97,0,0,398,399,5,115,0,0,399,400,5, - 104,0,0,400,78,1,0,0,0,401,402,5,46,0,0,402,403,5,111,0,0,403,404,5,117, - 0,0,404,405,5,116,0,0,405,406,5,112,0,0,406,407,5,111,0,0,407,408,5,105, - 0,0,408,409,5,110,0,0,409,410,5,116,0,0,410,411,5,73,0,0,411,412,5,110, - 0,0,412,413,5,100,0,0,413,414,5,101,0,0,414,415,5,120,0,0,415,80,1,0,0, - 0,416,417,5,46,0,0,417,418,5,117,0,0,418,419,5,110,0,0,419,420,5,108,0, - 0,420,421,5,111,0,0,421,422,5,99,0,0,422,423,5,107,0,0,423,424,5,105,0, - 0,424,425,5,110,0,0,425,426,5,103,0,0,426,427,5,66,0,0,427,428,5,121,0, - 0,428,429,5,116,0,0,429,430,5,101,0,0,430,431,5,99,0,0,431,432,5,111,0, - 0,432,433,5,100,0,0,433,434,5,101,0,0,434,82,1,0,0,0,435,436,5,46,0,0,436, - 437,5,115,0,0,437,438,5,101,0,0,438,439,5,113,0,0,439,440,5,117,0,0,440, - 441,5,101,0,0,441,442,5,110,0,0,442,443,5,99,0,0,443,444,5,101,0,0,444, - 445,5,78,0,0,445,446,5,117,0,0,446,447,5,109,0,0,447,448,5,98,0,0,448,449, - 5,101,0,0,449,450,5,114,0,0,450,84,1,0,0,0,451,452,5,46,0,0,452,453,5,114, - 0,0,453,454,5,101,0,0,454,455,5,118,0,0,455,456,5,101,0,0,456,457,5,114, - 0,0,457,458,5,115,0,0,458,459,5,101,0,0,459,460,5,40,0,0,460,461,5,41,0, - 0,461,86,1,0,0,0,462,463,5,46,0,0,463,464,5,108,0,0,464,465,5,101,0,0,465, - 466,5,110,0,0,466,467,5,103,0,0,467,468,5,116,0,0,468,469,5,104,0,0,469, - 88,1,0,0,0,470,471,5,46,0,0,471,472,5,115,0,0,472,473,5,112,0,0,473,474, - 5,108,0,0,474,475,5,105,0,0,475,476,5,116,0,0,476,90,1,0,0,0,477,478,5, - 46,0,0,478,479,5,115,0,0,479,480,5,108,0,0,480,481,5,105,0,0,481,482,5, - 99,0,0,482,483,5,101,0,0,483,92,1,0,0,0,484,485,5,33,0,0,485,94,1,0,0,0, - 486,487,5,45,0,0,487,96,1,0,0,0,488,489,5,42,0,0,489,98,1,0,0,0,490,491, - 5,47,0,0,491,100,1,0,0,0,492,493,5,37,0,0,493,102,1,0,0,0,494,495,5,43, - 0,0,495,104,1,0,0,0,496,497,5,62,0,0,497,498,5,62,0,0,498,106,1,0,0,0,499, - 500,5,60,0,0,500,501,5,60,0,0,501,108,1,0,0,0,502,503,5,61,0,0,503,504, - 5,61,0,0,504,110,1,0,0,0,505,506,5,33,0,0,506,507,5,61,0,0,507,112,1,0, - 0,0,508,509,5,38,0,0,509,114,1,0,0,0,510,511,5,124,0,0,511,116,1,0,0,0, - 512,513,5,38,0,0,513,514,5,38,0,0,514,118,1,0,0,0,515,516,5,124,0,0,516, - 517,5,124,0,0,517,120,1,0,0,0,518,519,5,99,0,0,519,520,5,111,0,0,520,521, - 5,110,0,0,521,522,5,115,0,0,522,523,5,116,0,0,523,524,5,97,0,0,524,525, - 5,110,0,0,525,526,5,116,0,0,526,122,1,0,0,0,527,529,7,0,0,0,528,527,1,0, - 0,0,529,530,1,0,0,0,530,528,1,0,0,0,530,531,1,0,0,0,531,532,1,0,0,0,532, - 534,5,46,0,0,533,535,7,0,0,0,534,533,1,0,0,0,535,536,1,0,0,0,536,534,1, - 0,0,0,536,537,1,0,0,0,537,538,1,0,0,0,538,540,5,46,0,0,539,541,7,0,0,0, - 540,539,1,0,0,0,541,542,1,0,0,0,542,540,1,0,0,0,542,543,1,0,0,0,543,124, - 1,0,0,0,544,545,5,116,0,0,545,546,5,114,0,0,546,547,5,117,0,0,547,554,5, - 101,0,0,548,549,5,102,0,0,549,550,5,97,0,0,550,551,5,108,0,0,551,552,5, - 115,0,0,552,554,5,101,0,0,553,544,1,0,0,0,553,548,1,0,0,0,554,126,1,0,0, - 0,555,556,5,115,0,0,556,557,5,97,0,0,557,558,5,116,0,0,558,559,5,111,0, - 0,559,560,5,115,0,0,560,561,5,104,0,0,561,562,5,105,0,0,562,613,5,115,0, - 0,563,564,5,115,0,0,564,565,5,97,0,0,565,566,5,116,0,0,566,613,5,115,0, - 0,567,568,5,102,0,0,568,569,5,105,0,0,569,570,5,110,0,0,570,571,5,110,0, - 0,571,572,5,101,0,0,572,613,5,121,0,0,573,574,5,98,0,0,574,575,5,105,0, - 0,575,576,5,116,0,0,576,613,5,115,0,0,577,578,5,98,0,0,578,579,5,105,0, - 0,579,580,5,116,0,0,580,581,5,99,0,0,581,582,5,111,0,0,582,583,5,105,0, - 0,583,613,5,110,0,0,584,585,5,115,0,0,585,586,5,101,0,0,586,587,5,99,0, - 0,587,588,5,111,0,0,588,589,5,110,0,0,589,590,5,100,0,0,590,613,5,115,0, - 0,591,592,5,109,0,0,592,593,5,105,0,0,593,594,5,110,0,0,594,595,5,117,0, - 0,595,596,5,116,0,0,596,597,5,101,0,0,597,613,5,115,0,0,598,599,5,104,0, - 0,599,600,5,111,0,0,600,601,5,117,0,0,601,602,5,114,0,0,602,613,5,115,0, - 0,603,604,5,100,0,0,604,605,5,97,0,0,605,606,5,121,0,0,606,613,5,115,0, - 0,607,608,5,119,0,0,608,609,5,101,0,0,609,610,5,101,0,0,610,611,5,107,0, - 0,611,613,5,115,0,0,612,555,1,0,0,0,612,563,1,0,0,0,612,567,1,0,0,0,612, - 573,1,0,0,0,612,577,1,0,0,0,612,584,1,0,0,0,612,591,1,0,0,0,612,598,1,0, - 0,0,612,603,1,0,0,0,612,607,1,0,0,0,613,128,1,0,0,0,614,616,5,45,0,0,615, - 614,1,0,0,0,615,616,1,0,0,0,616,617,1,0,0,0,617,619,3,131,65,0,618,620, - 3,133,66,0,619,618,1,0,0,0,619,620,1,0,0,0,620,130,1,0,0,0,621,623,7,0, - 0,0,622,621,1,0,0,0,623,624,1,0,0,0,624,622,1,0,0,0,624,625,1,0,0,0,625, - 634,1,0,0,0,626,628,5,95,0,0,627,629,7,0,0,0,628,627,1,0,0,0,629,630,1, - 0,0,0,630,628,1,0,0,0,630,631,1,0,0,0,631,633,1,0,0,0,632,626,1,0,0,0,633, - 636,1,0,0,0,634,632,1,0,0,0,634,635,1,0,0,0,635,132,1,0,0,0,636,634,1,0, - 0,0,637,638,7,1,0,0,638,639,3,131,65,0,639,134,1,0,0,0,640,641,5,105,0, - 0,641,642,5,110,0,0,642,670,5,116,0,0,643,644,5,98,0,0,644,645,5,111,0, - 0,645,646,5,111,0,0,646,670,5,108,0,0,647,648,5,115,0,0,648,649,5,116,0, - 0,649,650,5,114,0,0,650,651,5,105,0,0,651,652,5,110,0,0,652,670,5,103,0, - 0,653,654,5,112,0,0,654,655,5,117,0,0,655,656,5,98,0,0,656,657,5,107,0, - 0,657,658,5,101,0,0,658,670,5,121,0,0,659,660,5,115,0,0,660,661,5,105,0, - 0,661,670,5,103,0,0,662,663,5,100,0,0,663,664,5,97,0,0,664,665,5,116,0, - 0,665,666,5,97,0,0,666,667,5,115,0,0,667,668,5,105,0,0,668,670,5,103,0, - 0,669,640,1,0,0,0,669,643,1,0,0,0,669,647,1,0,0,0,669,653,1,0,0,0,669,659, - 1,0,0,0,669,662,1,0,0,0,670,136,1,0,0,0,671,672,5,98,0,0,672,673,5,121, - 0,0,673,674,5,116,0,0,674,675,5,101,0,0,675,676,5,115,0,0,676,138,1,0,0, - 0,677,678,5,98,0,0,678,679,5,121,0,0,679,680,5,116,0,0,680,681,5,101,0, - 0,681,682,5,115,0,0,682,683,1,0,0,0,683,689,3,141,70,0,684,685,5,98,0,0, - 685,686,5,121,0,0,686,687,5,116,0,0,687,689,5,101,0,0,688,677,1,0,0,0,688, - 684,1,0,0,0,689,140,1,0,0,0,690,694,7,2,0,0,691,693,7,0,0,0,692,691,1,0, - 0,0,693,696,1,0,0,0,694,692,1,0,0,0,694,695,1,0,0,0,695,142,1,0,0,0,696, - 694,1,0,0,0,697,703,5,34,0,0,698,699,5,92,0,0,699,702,5,34,0,0,700,702, - 8,3,0,0,701,698,1,0,0,0,701,700,1,0,0,0,702,705,1,0,0,0,703,704,1,0,0,0, - 703,701,1,0,0,0,704,706,1,0,0,0,705,703,1,0,0,0,706,718,5,34,0,0,707,713, - 5,39,0,0,708,709,5,92,0,0,709,712,5,39,0,0,710,712,8,4,0,0,711,708,1,0, - 0,0,711,710,1,0,0,0,712,715,1,0,0,0,713,714,1,0,0,0,713,711,1,0,0,0,714, - 716,1,0,0,0,715,713,1,0,0,0,716,718,5,39,0,0,717,697,1,0,0,0,717,707,1, - 0,0,0,718,144,1,0,0,0,719,720,5,100,0,0,720,721,5,97,0,0,721,722,5,116, - 0,0,722,723,5,101,0,0,723,724,5,40,0,0,724,725,1,0,0,0,725,726,3,143,71, - 0,726,727,5,41,0,0,727,146,1,0,0,0,728,729,5,48,0,0,729,733,7,5,0,0,730, - 732,7,6,0,0,731,730,1,0,0,0,732,735,1,0,0,0,733,731,1,0,0,0,733,734,1,0, - 0,0,734,148,1,0,0,0,735,733,1,0,0,0,736,737,5,116,0,0,737,738,5,104,0,0, - 738,739,5,105,0,0,739,740,5,115,0,0,740,741,5,46,0,0,741,742,5,97,0,0,742, - 743,5,103,0,0,743,752,5,101,0,0,744,745,5,116,0,0,745,746,5,120,0,0,746, - 747,5,46,0,0,747,748,5,116,0,0,748,749,5,105,0,0,749,750,5,109,0,0,750, - 752,5,101,0,0,751,736,1,0,0,0,751,744,1,0,0,0,752,150,1,0,0,0,753,754,5, - 117,0,0,754,755,5,110,0,0,755,756,5,115,0,0,756,757,5,97,0,0,757,758,5, - 102,0,0,758,759,5,101,0,0,759,760,5,95,0,0,760,761,5,105,0,0,761,762,5, - 110,0,0,762,802,5,116,0,0,763,764,5,117,0,0,764,765,5,110,0,0,765,766,5, - 115,0,0,766,767,5,97,0,0,767,768,5,102,0,0,768,769,5,101,0,0,769,770,5, - 95,0,0,770,771,5,98,0,0,771,772,5,111,0,0,772,773,5,111,0,0,773,802,5,108, - 0,0,774,775,5,117,0,0,775,776,5,110,0,0,776,777,5,115,0,0,777,778,5,97, - 0,0,778,779,5,102,0,0,779,780,5,101,0,0,780,781,5,95,0,0,781,782,5,98,0, - 0,782,783,5,121,0,0,783,784,5,116,0,0,784,785,5,101,0,0,785,786,5,115,0, - 0,786,788,1,0,0,0,787,789,3,141,70,0,788,787,1,0,0,0,788,789,1,0,0,0,789, - 802,1,0,0,0,790,791,5,117,0,0,791,792,5,110,0,0,792,793,5,115,0,0,793,794, - 5,97,0,0,794,795,5,102,0,0,795,796,5,101,0,0,796,797,5,95,0,0,797,798,5, - 98,0,0,798,799,5,121,0,0,799,800,5,116,0,0,800,802,5,101,0,0,801,753,1, - 0,0,0,801,763,1,0,0,0,801,774,1,0,0,0,801,790,1,0,0,0,802,152,1,0,0,0,803, - 804,5,116,0,0,804,805,5,104,0,0,805,806,5,105,0,0,806,807,5,115,0,0,807, - 808,5,46,0,0,808,809,5,97,0,0,809,810,5,99,0,0,810,811,5,116,0,0,811,812, - 5,105,0,0,812,813,5,118,0,0,813,814,5,101,0,0,814,815,5,73,0,0,815,816, - 5,110,0,0,816,817,5,112,0,0,817,818,5,117,0,0,818,819,5,116,0,0,819,820, - 5,73,0,0,820,821,5,110,0,0,821,822,5,100,0,0,822,823,5,101,0,0,823,898, - 5,120,0,0,824,825,5,116,0,0,825,826,5,104,0,0,826,827,5,105,0,0,827,828, - 5,115,0,0,828,829,5,46,0,0,829,830,5,97,0,0,830,831,5,99,0,0,831,832,5, - 116,0,0,832,833,5,105,0,0,833,834,5,118,0,0,834,835,5,101,0,0,835,836,5, - 66,0,0,836,837,5,121,0,0,837,838,5,116,0,0,838,839,5,101,0,0,839,840,5, - 99,0,0,840,841,5,111,0,0,841,842,5,100,0,0,842,898,5,101,0,0,843,844,5, - 116,0,0,844,845,5,120,0,0,845,846,5,46,0,0,846,847,5,105,0,0,847,848,5, - 110,0,0,848,849,5,112,0,0,849,850,5,117,0,0,850,851,5,116,0,0,851,852,5, - 115,0,0,852,853,5,46,0,0,853,854,5,108,0,0,854,855,5,101,0,0,855,856,5, - 110,0,0,856,857,5,103,0,0,857,858,5,116,0,0,858,898,5,104,0,0,859,860,5, - 116,0,0,860,861,5,120,0,0,861,862,5,46,0,0,862,863,5,111,0,0,863,864,5, - 117,0,0,864,865,5,116,0,0,865,866,5,112,0,0,866,867,5,117,0,0,867,868,5, - 116,0,0,868,869,5,115,0,0,869,870,5,46,0,0,870,871,5,108,0,0,871,872,5, - 101,0,0,872,873,5,110,0,0,873,874,5,103,0,0,874,875,5,116,0,0,875,898,5, - 104,0,0,876,877,5,116,0,0,877,878,5,120,0,0,878,879,5,46,0,0,879,880,5, - 118,0,0,880,881,5,101,0,0,881,882,5,114,0,0,882,883,5,115,0,0,883,884,5, - 105,0,0,884,885,5,111,0,0,885,898,5,110,0,0,886,887,5,116,0,0,887,888,5, - 120,0,0,888,889,5,46,0,0,889,890,5,108,0,0,890,891,5,111,0,0,891,892,5, - 99,0,0,892,893,5,107,0,0,893,894,5,116,0,0,894,895,5,105,0,0,895,896,5, - 109,0,0,896,898,5,101,0,0,897,803,1,0,0,0,897,824,1,0,0,0,897,843,1,0,0, - 0,897,859,1,0,0,0,897,876,1,0,0,0,897,886,1,0,0,0,898,154,1,0,0,0,899,903, - 7,7,0,0,900,902,7,8,0,0,901,900,1,0,0,0,902,905,1,0,0,0,903,901,1,0,0,0, - 903,904,1,0,0,0,904,156,1,0,0,0,905,903,1,0,0,0,906,908,7,9,0,0,907,906, - 1,0,0,0,908,909,1,0,0,0,909,907,1,0,0,0,909,910,1,0,0,0,910,911,1,0,0,0, - 911,912,6,78,0,0,912,158,1,0,0,0,913,914,5,47,0,0,914,915,5,42,0,0,915, - 919,1,0,0,0,916,918,9,0,0,0,917,916,1,0,0,0,918,921,1,0,0,0,919,920,1,0, - 0,0,919,917,1,0,0,0,920,922,1,0,0,0,921,919,1,0,0,0,922,923,5,42,0,0,923, - 924,5,47,0,0,924,925,1,0,0,0,925,926,6,79,1,0,926,160,1,0,0,0,927,928,5, - 47,0,0,928,929,5,47,0,0,929,933,1,0,0,0,930,932,8,10,0,0,931,930,1,0,0, - 0,932,935,1,0,0,0,933,931,1,0,0,0,933,934,1,0,0,0,934,936,1,0,0,0,935,933, - 1,0,0,0,936,937,6,80,1,0,937,162,1,0,0,0,28,0,530,536,542,553,612,615,619, - 624,630,634,669,688,694,701,703,711,713,717,733,751,788,801,897,903,909, - 919,933,2,6,0,0,0,1,0]; + 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,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,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,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,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, + 49,1,49,1,50,1,50,1,51,1,51,1,52,1,52,1,53,1,53,1,54,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,59,1,59,1,60,1,60,1,60,1, + 61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,63,4,63,548, + 8,63,11,63,12,63,549,1,63,1,63,4,63,554,8,63,11,63,12,63,555,1,63,1,63, + 4,63,560,8,63,11,63,12,63,561,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1, + 64,3,64,573,8,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65, + 1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1, + 65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65, + 1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1, + 65,1,65,1,65,3,65,632,8,65,1,66,3,66,635,8,66,1,66,1,66,3,66,639,8,66,1, + 67,4,67,642,8,67,11,67,12,67,643,1,67,1,67,4,67,648,8,67,11,67,12,67,649, + 5,67,652,8,67,10,67,12,67,655,9,67,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1, + 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, + 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,3,69,689,8,69,1,70,1, + 70,1,70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 1,71,3,71,708,8,71,1,72,1,72,5,72,712,8,72,10,72,12,72,715,9,72,1,73,1, + 73,1,73,1,73,5,73,721,8,73,10,73,12,73,724,9,73,1,73,1,73,1,73,1,73,1,73, + 5,73,731,8,73,10,73,12,73,734,9,73,1,73,3,73,737,8,73,1,74,1,74,1,74,1, + 74,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,5,75,751,8,75,10,75,12,75,754, + 9,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1, + 76,1,76,3,76,771,8,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,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,1,77,1,77,1,77,1,77,1,77,3,77,808,8,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,821,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,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,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,917,8,78,1,79,1,79,5,79,921,8,79,10,79, + 12,79,924,9,79,1,80,4,80,927,8,80,11,80,12,80,928,1,80,1,80,1,81,1,81,1, + 81,1,81,5,81,937,8,81,10,81,12,81,940,9,81,1,81,1,81,1,81,1,81,1,81,1,82, + 1,82,1,82,1,82,5,82,951,8,82,10,82,12,82,954,9,82,1,82,1,82,3,722,732,938, + 0,83,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,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,1001,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,1,167,1,0,0,0,3,174,1,0, + 0,0,5,176,1,0,0,0,7,187,1,0,0,0,9,189,1,0,0,0,11,191,1,0,0,0,13,194,1,0, + 0,0,15,196,1,0,0,0,17,198,1,0,0,0,19,201,1,0,0,0,21,203,1,0,0,0,23,212, + 1,0,0,0,25,214,1,0,0,0,27,216,1,0,0,0,29,225,1,0,0,0,31,233,1,0,0,0,33, + 235,1,0,0,0,35,237,1,0,0,0,37,239,1,0,0,0,39,246,1,0,0,0,41,249,1,0,0,0, + 43,252,1,0,0,0,45,255,1,0,0,0,47,258,1,0,0,0,49,266,1,0,0,0,51,278,1,0, + 0,0,53,281,1,0,0,0,55,286,1,0,0,0,57,289,1,0,0,0,59,295,1,0,0,0,61,299, + 1,0,0,0,63,303,1,0,0,0,65,305,1,0,0,0,67,307,1,0,0,0,69,318,1,0,0,0,71, + 325,1,0,0,0,73,342,1,0,0,0,75,357,1,0,0,0,77,372,1,0,0,0,79,385,1,0,0,0, + 81,395,1,0,0,0,83,420,1,0,0,0,85,435,1,0,0,0,87,454,1,0,0,0,89,470,1,0, + 0,0,91,481,1,0,0,0,93,489,1,0,0,0,95,496,1,0,0,0,97,503,1,0,0,0,99,505, + 1,0,0,0,101,507,1,0,0,0,103,509,1,0,0,0,105,511,1,0,0,0,107,513,1,0,0,0, + 109,515,1,0,0,0,111,518,1,0,0,0,113,521,1,0,0,0,115,524,1,0,0,0,117,527, + 1,0,0,0,119,529,1,0,0,0,121,531,1,0,0,0,123,534,1,0,0,0,125,537,1,0,0,0, + 127,547,1,0,0,0,129,572,1,0,0,0,131,631,1,0,0,0,133,634,1,0,0,0,135,641, + 1,0,0,0,137,656,1,0,0,0,139,688,1,0,0,0,141,690,1,0,0,0,143,707,1,0,0,0, + 145,709,1,0,0,0,147,736,1,0,0,0,149,738,1,0,0,0,151,747,1,0,0,0,153,770, + 1,0,0,0,155,820,1,0,0,0,157,916,1,0,0,0,159,918,1,0,0,0,161,926,1,0,0,0, + 163,932,1,0,0,0,165,946,1,0,0,0,167,168,5,112,0,0,168,169,5,114,0,0,169, + 170,5,97,0,0,170,171,5,103,0,0,171,172,5,109,0,0,172,173,5,97,0,0,173,2, + 1,0,0,0,174,175,5,59,0,0,175,4,1,0,0,0,176,177,5,99,0,0,177,178,5,97,0, + 0,178,179,5,115,0,0,179,180,5,104,0,0,180,181,5,115,0,0,181,182,5,99,0, + 0,182,183,5,114,0,0,183,184,5,105,0,0,184,185,5,112,0,0,185,186,5,116,0, + 0,186,6,1,0,0,0,187,188,5,94,0,0,188,8,1,0,0,0,189,190,5,126,0,0,190,10, + 1,0,0,0,191,192,5,62,0,0,192,193,5,61,0,0,193,12,1,0,0,0,194,195,5,62,0, + 0,195,14,1,0,0,0,196,197,5,60,0,0,197,16,1,0,0,0,198,199,5,60,0,0,199,200, + 5,61,0,0,200,18,1,0,0,0,201,202,5,61,0,0,202,20,1,0,0,0,203,204,5,99,0, + 0,204,205,5,111,0,0,205,206,5,110,0,0,206,207,5,116,0,0,207,208,5,114,0, + 0,208,209,5,97,0,0,209,210,5,99,0,0,210,211,5,116,0,0,211,22,1,0,0,0,212, + 213,5,123,0,0,213,24,1,0,0,0,214,215,5,125,0,0,215,26,1,0,0,0,216,217,5, + 102,0,0,217,218,5,117,0,0,218,219,5,110,0,0,219,220,5,99,0,0,220,221,5, + 116,0,0,221,222,5,105,0,0,222,223,5,111,0,0,223,224,5,110,0,0,224,28,1, + 0,0,0,225,226,5,114,0,0,226,227,5,101,0,0,227,228,5,116,0,0,228,229,5,117, + 0,0,229,230,5,114,0,0,230,231,5,110,0,0,231,232,5,115,0,0,232,30,1,0,0, + 0,233,234,5,40,0,0,234,32,1,0,0,0,235,236,5,44,0,0,236,34,1,0,0,0,237,238, + 5,41,0,0,238,36,1,0,0,0,239,240,5,114,0,0,240,241,5,101,0,0,241,242,5,116, + 0,0,242,243,5,117,0,0,243,244,5,114,0,0,244,245,5,110,0,0,245,38,1,0,0, + 0,246,247,5,43,0,0,247,248,5,61,0,0,248,40,1,0,0,0,249,250,5,45,0,0,250, + 251,5,61,0,0,251,42,1,0,0,0,252,253,5,43,0,0,253,254,5,43,0,0,254,44,1, + 0,0,0,255,256,5,45,0,0,256,257,5,45,0,0,257,46,1,0,0,0,258,259,5,114,0, + 0,259,260,5,101,0,0,260,261,5,113,0,0,261,262,5,117,0,0,262,263,5,105,0, + 0,263,264,5,114,0,0,264,265,5,101,0,0,265,48,1,0,0,0,266,267,5,99,0,0,267, + 268,5,111,0,0,268,269,5,110,0,0,269,270,5,115,0,0,270,271,5,111,0,0,271, + 272,5,108,0,0,272,273,5,101,0,0,273,274,5,46,0,0,274,275,5,108,0,0,275, + 276,5,111,0,0,276,277,5,103,0,0,277,50,1,0,0,0,278,279,5,105,0,0,279,280, + 5,102,0,0,280,52,1,0,0,0,281,282,5,101,0,0,282,283,5,108,0,0,283,284,5, + 115,0,0,284,285,5,101,0,0,285,54,1,0,0,0,286,287,5,100,0,0,287,288,5,111, + 0,0,288,56,1,0,0,0,289,290,5,119,0,0,290,291,5,104,0,0,291,292,5,105,0, + 0,292,293,5,108,0,0,293,294,5,101,0,0,294,58,1,0,0,0,295,296,5,102,0,0, + 296,297,5,111,0,0,297,298,5,114,0,0,298,60,1,0,0,0,299,300,5,110,0,0,300, + 301,5,101,0,0,301,302,5,119,0,0,302,62,1,0,0,0,303,304,5,91,0,0,304,64, + 1,0,0,0,305,306,5,93,0,0,306,66,1,0,0,0,307,308,5,116,0,0,308,309,5,120, + 0,0,309,310,5,46,0,0,310,311,5,111,0,0,311,312,5,117,0,0,312,313,5,116, + 0,0,313,314,5,112,0,0,314,315,5,117,0,0,315,316,5,116,0,0,316,317,5,115, + 0,0,317,68,1,0,0,0,318,319,5,46,0,0,319,320,5,118,0,0,320,321,5,97,0,0, + 321,322,5,108,0,0,322,323,5,117,0,0,323,324,5,101,0,0,324,70,1,0,0,0,325, + 326,5,46,0,0,326,327,5,108,0,0,327,328,5,111,0,0,328,329,5,99,0,0,329,330, + 5,107,0,0,330,331,5,105,0,0,331,332,5,110,0,0,332,333,5,103,0,0,333,334, + 5,66,0,0,334,335,5,121,0,0,335,336,5,116,0,0,336,337,5,101,0,0,337,338, + 5,99,0,0,338,339,5,111,0,0,339,340,5,100,0,0,340,341,5,101,0,0,341,72,1, + 0,0,0,342,343,5,46,0,0,343,344,5,116,0,0,344,345,5,111,0,0,345,346,5,107, + 0,0,346,347,5,101,0,0,347,348,5,110,0,0,348,349,5,67,0,0,349,350,5,97,0, + 0,350,351,5,116,0,0,351,352,5,101,0,0,352,353,5,103,0,0,353,354,5,111,0, + 0,354,355,5,114,0,0,355,356,5,121,0,0,356,74,1,0,0,0,357,358,5,46,0,0,358, + 359,5,110,0,0,359,360,5,102,0,0,360,361,5,116,0,0,361,362,5,67,0,0,362, + 363,5,111,0,0,363,364,5,109,0,0,364,365,5,109,0,0,365,366,5,105,0,0,366, + 367,5,116,0,0,367,368,5,109,0,0,368,369,5,101,0,0,369,370,5,110,0,0,370, + 371,5,116,0,0,371,76,1,0,0,0,372,373,5,46,0,0,373,374,5,116,0,0,374,375, + 5,111,0,0,375,376,5,107,0,0,376,377,5,101,0,0,377,378,5,110,0,0,378,379, + 5,65,0,0,379,380,5,109,0,0,380,381,5,111,0,0,381,382,5,117,0,0,382,383, + 5,110,0,0,383,384,5,116,0,0,384,78,1,0,0,0,385,386,5,116,0,0,386,387,5, + 120,0,0,387,388,5,46,0,0,388,389,5,105,0,0,389,390,5,110,0,0,390,391,5, + 112,0,0,391,392,5,117,0,0,392,393,5,116,0,0,393,394,5,115,0,0,394,80,1, + 0,0,0,395,396,5,46,0,0,396,397,5,111,0,0,397,398,5,117,0,0,398,399,5,116, + 0,0,399,400,5,112,0,0,400,401,5,111,0,0,401,402,5,105,0,0,402,403,5,110, + 0,0,403,404,5,116,0,0,404,405,5,84,0,0,405,406,5,114,0,0,406,407,5,97,0, + 0,407,408,5,110,0,0,408,409,5,115,0,0,409,410,5,97,0,0,410,411,5,99,0,0, + 411,412,5,116,0,0,412,413,5,105,0,0,413,414,5,111,0,0,414,415,5,110,0,0, + 415,416,5,72,0,0,416,417,5,97,0,0,417,418,5,115,0,0,418,419,5,104,0,0,419, + 82,1,0,0,0,420,421,5,46,0,0,421,422,5,111,0,0,422,423,5,117,0,0,423,424, + 5,116,0,0,424,425,5,112,0,0,425,426,5,111,0,0,426,427,5,105,0,0,427,428, + 5,110,0,0,428,429,5,116,0,0,429,430,5,73,0,0,430,431,5,110,0,0,431,432, + 5,100,0,0,432,433,5,101,0,0,433,434,5,120,0,0,434,84,1,0,0,0,435,436,5, + 46,0,0,436,437,5,117,0,0,437,438,5,110,0,0,438,439,5,108,0,0,439,440,5, + 111,0,0,440,441,5,99,0,0,441,442,5,107,0,0,442,443,5,105,0,0,443,444,5, + 110,0,0,444,445,5,103,0,0,445,446,5,66,0,0,446,447,5,121,0,0,447,448,5, + 116,0,0,448,449,5,101,0,0,449,450,5,99,0,0,450,451,5,111,0,0,451,452,5, + 100,0,0,452,453,5,101,0,0,453,86,1,0,0,0,454,455,5,46,0,0,455,456,5,115, + 0,0,456,457,5,101,0,0,457,458,5,113,0,0,458,459,5,117,0,0,459,460,5,101, + 0,0,460,461,5,110,0,0,461,462,5,99,0,0,462,463,5,101,0,0,463,464,5,78,0, + 0,464,465,5,117,0,0,465,466,5,109,0,0,466,467,5,98,0,0,467,468,5,101,0, + 0,468,469,5,114,0,0,469,88,1,0,0,0,470,471,5,46,0,0,471,472,5,114,0,0,472, + 473,5,101,0,0,473,474,5,118,0,0,474,475,5,101,0,0,475,476,5,114,0,0,476, + 477,5,115,0,0,477,478,5,101,0,0,478,479,5,40,0,0,479,480,5,41,0,0,480,90, + 1,0,0,0,481,482,5,46,0,0,482,483,5,108,0,0,483,484,5,101,0,0,484,485,5, + 110,0,0,485,486,5,103,0,0,486,487,5,116,0,0,487,488,5,104,0,0,488,92,1, + 0,0,0,489,490,5,46,0,0,490,491,5,115,0,0,491,492,5,112,0,0,492,493,5,108, + 0,0,493,494,5,105,0,0,494,495,5,116,0,0,495,94,1,0,0,0,496,497,5,46,0,0, + 497,498,5,115,0,0,498,499,5,108,0,0,499,500,5,105,0,0,500,501,5,99,0,0, + 501,502,5,101,0,0,502,96,1,0,0,0,503,504,5,33,0,0,504,98,1,0,0,0,505,506, + 5,45,0,0,506,100,1,0,0,0,507,508,5,42,0,0,508,102,1,0,0,0,509,510,5,47, + 0,0,510,104,1,0,0,0,511,512,5,37,0,0,512,106,1,0,0,0,513,514,5,43,0,0,514, + 108,1,0,0,0,515,516,5,62,0,0,516,517,5,62,0,0,517,110,1,0,0,0,518,519,5, + 60,0,0,519,520,5,60,0,0,520,112,1,0,0,0,521,522,5,61,0,0,522,523,5,61,0, + 0,523,114,1,0,0,0,524,525,5,33,0,0,525,526,5,61,0,0,526,116,1,0,0,0,527, + 528,5,38,0,0,528,118,1,0,0,0,529,530,5,124,0,0,530,120,1,0,0,0,531,532, + 5,38,0,0,532,533,5,38,0,0,533,122,1,0,0,0,534,535,5,124,0,0,535,536,5,124, + 0,0,536,124,1,0,0,0,537,538,5,99,0,0,538,539,5,111,0,0,539,540,5,110,0, + 0,540,541,5,115,0,0,541,542,5,116,0,0,542,543,5,97,0,0,543,544,5,110,0, + 0,544,545,5,116,0,0,545,126,1,0,0,0,546,548,7,0,0,0,547,546,1,0,0,0,548, + 549,1,0,0,0,549,547,1,0,0,0,549,550,1,0,0,0,550,551,1,0,0,0,551,553,5,46, + 0,0,552,554,7,0,0,0,553,552,1,0,0,0,554,555,1,0,0,0,555,553,1,0,0,0,555, + 556,1,0,0,0,556,557,1,0,0,0,557,559,5,46,0,0,558,560,7,0,0,0,559,558,1, + 0,0,0,560,561,1,0,0,0,561,559,1,0,0,0,561,562,1,0,0,0,562,128,1,0,0,0,563, + 564,5,116,0,0,564,565,5,114,0,0,565,566,5,117,0,0,566,573,5,101,0,0,567, + 568,5,102,0,0,568,569,5,97,0,0,569,570,5,108,0,0,570,571,5,115,0,0,571, + 573,5,101,0,0,572,563,1,0,0,0,572,567,1,0,0,0,573,130,1,0,0,0,574,575,5, + 115,0,0,575,576,5,97,0,0,576,577,5,116,0,0,577,578,5,111,0,0,578,579,5, + 115,0,0,579,580,5,104,0,0,580,581,5,105,0,0,581,632,5,115,0,0,582,583,5, + 115,0,0,583,584,5,97,0,0,584,585,5,116,0,0,585,632,5,115,0,0,586,587,5, + 102,0,0,587,588,5,105,0,0,588,589,5,110,0,0,589,590,5,110,0,0,590,591,5, + 101,0,0,591,632,5,121,0,0,592,593,5,98,0,0,593,594,5,105,0,0,594,595,5, + 116,0,0,595,632,5,115,0,0,596,597,5,98,0,0,597,598,5,105,0,0,598,599,5, + 116,0,0,599,600,5,99,0,0,600,601,5,111,0,0,601,602,5,105,0,0,602,632,5, + 110,0,0,603,604,5,115,0,0,604,605,5,101,0,0,605,606,5,99,0,0,606,607,5, + 111,0,0,607,608,5,110,0,0,608,609,5,100,0,0,609,632,5,115,0,0,610,611,5, + 109,0,0,611,612,5,105,0,0,612,613,5,110,0,0,613,614,5,117,0,0,614,615,5, + 116,0,0,615,616,5,101,0,0,616,632,5,115,0,0,617,618,5,104,0,0,618,619,5, + 111,0,0,619,620,5,117,0,0,620,621,5,114,0,0,621,632,5,115,0,0,622,623,5, + 100,0,0,623,624,5,97,0,0,624,625,5,121,0,0,625,632,5,115,0,0,626,627,5, + 119,0,0,627,628,5,101,0,0,628,629,5,101,0,0,629,630,5,107,0,0,630,632,5, + 115,0,0,631,574,1,0,0,0,631,582,1,0,0,0,631,586,1,0,0,0,631,592,1,0,0,0, + 631,596,1,0,0,0,631,603,1,0,0,0,631,610,1,0,0,0,631,617,1,0,0,0,631,622, + 1,0,0,0,631,626,1,0,0,0,632,132,1,0,0,0,633,635,5,45,0,0,634,633,1,0,0, + 0,634,635,1,0,0,0,635,636,1,0,0,0,636,638,3,135,67,0,637,639,3,137,68,0, + 638,637,1,0,0,0,638,639,1,0,0,0,639,134,1,0,0,0,640,642,7,0,0,0,641,640, + 1,0,0,0,642,643,1,0,0,0,643,641,1,0,0,0,643,644,1,0,0,0,644,653,1,0,0,0, + 645,647,5,95,0,0,646,648,7,0,0,0,647,646,1,0,0,0,648,649,1,0,0,0,649,647, + 1,0,0,0,649,650,1,0,0,0,650,652,1,0,0,0,651,645,1,0,0,0,652,655,1,0,0,0, + 653,651,1,0,0,0,653,654,1,0,0,0,654,136,1,0,0,0,655,653,1,0,0,0,656,657, + 7,1,0,0,657,658,3,135,67,0,658,138,1,0,0,0,659,660,5,105,0,0,660,661,5, + 110,0,0,661,689,5,116,0,0,662,663,5,98,0,0,663,664,5,111,0,0,664,665,5, + 111,0,0,665,689,5,108,0,0,666,667,5,115,0,0,667,668,5,116,0,0,668,669,5, + 114,0,0,669,670,5,105,0,0,670,671,5,110,0,0,671,689,5,103,0,0,672,673,5, + 112,0,0,673,674,5,117,0,0,674,675,5,98,0,0,675,676,5,107,0,0,676,677,5, + 101,0,0,677,689,5,121,0,0,678,679,5,115,0,0,679,680,5,105,0,0,680,689,5, + 103,0,0,681,682,5,100,0,0,682,683,5,97,0,0,683,684,5,116,0,0,684,685,5, + 97,0,0,685,686,5,115,0,0,686,687,5,105,0,0,687,689,5,103,0,0,688,659,1, + 0,0,0,688,662,1,0,0,0,688,666,1,0,0,0,688,672,1,0,0,0,688,678,1,0,0,0,688, + 681,1,0,0,0,689,140,1,0,0,0,690,691,5,98,0,0,691,692,5,121,0,0,692,693, + 5,116,0,0,693,694,5,101,0,0,694,695,5,115,0,0,695,142,1,0,0,0,696,697,5, + 98,0,0,697,698,5,121,0,0,698,699,5,116,0,0,699,700,5,101,0,0,700,701,5, + 115,0,0,701,702,1,0,0,0,702,708,3,145,72,0,703,704,5,98,0,0,704,705,5,121, + 0,0,705,706,5,116,0,0,706,708,5,101,0,0,707,696,1,0,0,0,707,703,1,0,0,0, + 708,144,1,0,0,0,709,713,7,2,0,0,710,712,7,0,0,0,711,710,1,0,0,0,712,715, + 1,0,0,0,713,711,1,0,0,0,713,714,1,0,0,0,714,146,1,0,0,0,715,713,1,0,0,0, + 716,722,5,34,0,0,717,718,5,92,0,0,718,721,5,34,0,0,719,721,8,3,0,0,720, + 717,1,0,0,0,720,719,1,0,0,0,721,724,1,0,0,0,722,723,1,0,0,0,722,720,1,0, + 0,0,723,725,1,0,0,0,724,722,1,0,0,0,725,737,5,34,0,0,726,732,5,39,0,0,727, + 728,5,92,0,0,728,731,5,39,0,0,729,731,8,4,0,0,730,727,1,0,0,0,730,729,1, + 0,0,0,731,734,1,0,0,0,732,733,1,0,0,0,732,730,1,0,0,0,733,735,1,0,0,0,734, + 732,1,0,0,0,735,737,5,39,0,0,736,716,1,0,0,0,736,726,1,0,0,0,737,148,1, + 0,0,0,738,739,5,100,0,0,739,740,5,97,0,0,740,741,5,116,0,0,741,742,5,101, + 0,0,742,743,5,40,0,0,743,744,1,0,0,0,744,745,3,147,73,0,745,746,5,41,0, + 0,746,150,1,0,0,0,747,748,5,48,0,0,748,752,7,5,0,0,749,751,7,6,0,0,750, + 749,1,0,0,0,751,754,1,0,0,0,752,750,1,0,0,0,752,753,1,0,0,0,753,152,1,0, + 0,0,754,752,1,0,0,0,755,756,5,116,0,0,756,757,5,104,0,0,757,758,5,105,0, + 0,758,759,5,115,0,0,759,760,5,46,0,0,760,761,5,97,0,0,761,762,5,103,0,0, + 762,771,5,101,0,0,763,764,5,116,0,0,764,765,5,120,0,0,765,766,5,46,0,0, + 766,767,5,116,0,0,767,768,5,105,0,0,768,769,5,109,0,0,769,771,5,101,0,0, + 770,755,1,0,0,0,770,763,1,0,0,0,771,154,1,0,0,0,772,773,5,117,0,0,773,774, + 5,110,0,0,774,775,5,115,0,0,775,776,5,97,0,0,776,777,5,102,0,0,777,778, + 5,101,0,0,778,779,5,95,0,0,779,780,5,105,0,0,780,781,5,110,0,0,781,821, + 5,116,0,0,782,783,5,117,0,0,783,784,5,110,0,0,784,785,5,115,0,0,785,786, + 5,97,0,0,786,787,5,102,0,0,787,788,5,101,0,0,788,789,5,95,0,0,789,790,5, + 98,0,0,790,791,5,111,0,0,791,792,5,111,0,0,792,821,5,108,0,0,793,794,5, + 117,0,0,794,795,5,110,0,0,795,796,5,115,0,0,796,797,5,97,0,0,797,798,5, + 102,0,0,798,799,5,101,0,0,799,800,5,95,0,0,800,801,5,98,0,0,801,802,5,121, + 0,0,802,803,5,116,0,0,803,804,5,101,0,0,804,805,5,115,0,0,805,807,1,0,0, + 0,806,808,3,145,72,0,807,806,1,0,0,0,807,808,1,0,0,0,808,821,1,0,0,0,809, + 810,5,117,0,0,810,811,5,110,0,0,811,812,5,115,0,0,812,813,5,97,0,0,813, + 814,5,102,0,0,814,815,5,101,0,0,815,816,5,95,0,0,816,817,5,98,0,0,817,818, + 5,121,0,0,818,819,5,116,0,0,819,821,5,101,0,0,820,772,1,0,0,0,820,782,1, + 0,0,0,820,793,1,0,0,0,820,809,1,0,0,0,821,156,1,0,0,0,822,823,5,116,0,0, + 823,824,5,104,0,0,824,825,5,105,0,0,825,826,5,115,0,0,826,827,5,46,0,0, + 827,828,5,97,0,0,828,829,5,99,0,0,829,830,5,116,0,0,830,831,5,105,0,0,831, + 832,5,118,0,0,832,833,5,101,0,0,833,834,5,73,0,0,834,835,5,110,0,0,835, + 836,5,112,0,0,836,837,5,117,0,0,837,838,5,116,0,0,838,839,5,73,0,0,839, + 840,5,110,0,0,840,841,5,100,0,0,841,842,5,101,0,0,842,917,5,120,0,0,843, + 844,5,116,0,0,844,845,5,104,0,0,845,846,5,105,0,0,846,847,5,115,0,0,847, + 848,5,46,0,0,848,849,5,97,0,0,849,850,5,99,0,0,850,851,5,116,0,0,851,852, + 5,105,0,0,852,853,5,118,0,0,853,854,5,101,0,0,854,855,5,66,0,0,855,856, + 5,121,0,0,856,857,5,116,0,0,857,858,5,101,0,0,858,859,5,99,0,0,859,860, + 5,111,0,0,860,861,5,100,0,0,861,917,5,101,0,0,862,863,5,116,0,0,863,864, + 5,120,0,0,864,865,5,46,0,0,865,866,5,105,0,0,866,867,5,110,0,0,867,868, + 5,112,0,0,868,869,5,117,0,0,869,870,5,116,0,0,870,871,5,115,0,0,871,872, + 5,46,0,0,872,873,5,108,0,0,873,874,5,101,0,0,874,875,5,110,0,0,875,876, + 5,103,0,0,876,877,5,116,0,0,877,917,5,104,0,0,878,879,5,116,0,0,879,880, + 5,120,0,0,880,881,5,46,0,0,881,882,5,111,0,0,882,883,5,117,0,0,883,884, + 5,116,0,0,884,885,5,112,0,0,885,886,5,117,0,0,886,887,5,116,0,0,887,888, + 5,115,0,0,888,889,5,46,0,0,889,890,5,108,0,0,890,891,5,101,0,0,891,892, + 5,110,0,0,892,893,5,103,0,0,893,894,5,116,0,0,894,917,5,104,0,0,895,896, + 5,116,0,0,896,897,5,120,0,0,897,898,5,46,0,0,898,899,5,118,0,0,899,900, + 5,101,0,0,900,901,5,114,0,0,901,902,5,115,0,0,902,903,5,105,0,0,903,904, + 5,111,0,0,904,917,5,110,0,0,905,906,5,116,0,0,906,907,5,120,0,0,907,908, + 5,46,0,0,908,909,5,108,0,0,909,910,5,111,0,0,910,911,5,99,0,0,911,912,5, + 107,0,0,912,913,5,116,0,0,913,914,5,105,0,0,914,915,5,109,0,0,915,917,5, + 101,0,0,916,822,1,0,0,0,916,843,1,0,0,0,916,862,1,0,0,0,916,878,1,0,0,0, + 916,895,1,0,0,0,916,905,1,0,0,0,917,158,1,0,0,0,918,922,7,7,0,0,919,921, + 7,8,0,0,920,919,1,0,0,0,921,924,1,0,0,0,922,920,1,0,0,0,922,923,1,0,0,0, + 923,160,1,0,0,0,924,922,1,0,0,0,925,927,7,9,0,0,926,925,1,0,0,0,927,928, + 1,0,0,0,928,926,1,0,0,0,928,929,1,0,0,0,929,930,1,0,0,0,930,931,6,80,0, + 0,931,162,1,0,0,0,932,933,5,47,0,0,933,934,5,42,0,0,934,938,1,0,0,0,935, + 937,9,0,0,0,936,935,1,0,0,0,937,940,1,0,0,0,938,939,1,0,0,0,938,936,1,0, + 0,0,939,941,1,0,0,0,940,938,1,0,0,0,941,942,5,42,0,0,942,943,5,47,0,0,943, + 944,1,0,0,0,944,945,6,81,1,0,945,164,1,0,0,0,946,947,5,47,0,0,947,948,5, + 47,0,0,948,952,1,0,0,0,949,951,8,10,0,0,950,949,1,0,0,0,951,954,1,0,0,0, + 952,950,1,0,0,0,952,953,1,0,0,0,953,955,1,0,0,0,954,952,1,0,0,0,955,956, + 6,82,1,0,956,166,1,0,0,0,28,0,549,555,561,572,631,634,638,643,649,653,688, + 707,713,720,722,730,732,736,752,770,807,820,916,922,928,938,952,2,6,0,0, + 0,1,0]; private static __ATN: ATN; public static get _ATN(): ATN { diff --git a/packages/cashc/src/grammar/CashScriptParser.ts b/packages/cashc/src/grammar/CashScriptParser.ts index 8d8c718d..4661d989 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 { @@ -79,27 +79,29 @@ export default class CashScriptParser extends Parser { public static readonly T__58 = 59; public static readonly T__59 = 60; public static readonly T__60 = 61; - public static readonly VersionLiteral = 62; - public static readonly BooleanLiteral = 63; - public static readonly NumberUnit = 64; - public static readonly NumberLiteral = 65; - public static readonly NumberPart = 66; - public static readonly ExponentPart = 67; - public static readonly PrimitiveType = 68; - public static readonly UnboundedBytes = 69; - public static readonly BoundedBytes = 70; - public static readonly Bound = 71; - public static readonly StringLiteral = 72; - public static readonly DateLiteral = 73; - public static readonly HexLiteral = 74; - public static readonly TxVar = 75; - public static readonly UnsafeCast = 76; - public static readonly NullaryOp = 77; - public static readonly Identifier = 78; - public static readonly WHITESPACE = 79; - public static readonly COMMENT = 80; - public static readonly LINE_COMMENT = 81; - public static readonly EOF = Token.EOF; + public static readonly T__61 = 62; + public static readonly T__62 = 63; + public static readonly VersionLiteral = 64; + public static readonly BooleanLiteral = 65; + public static readonly NumberUnit = 66; + public static readonly NumberLiteral = 67; + public static readonly NumberPart = 68; + public static readonly ExponentPart = 69; + public static readonly PrimitiveType = 70; + public static readonly UnboundedBytes = 71; + public static readonly BoundedBytes = 72; + public static readonly Bound = 73; + public static readonly StringLiteral = 74; + public static readonly DateLiteral = 75; + public static readonly HexLiteral = 76; + public static readonly TxVar = 77; + public static readonly UnsafeCast = 78; + public static readonly NullaryOp = 79; + public static readonly Identifier = 80; + public static readonly WHITESPACE = 81; + public static readonly COMMENT = 82; + public static readonly LINE_COMMENT = 83; + 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; @@ -114,30 +116,31 @@ export default class CashScriptParser extends Parser { public static readonly RULE_block = 11; public static readonly RULE_statement = 12; public static readonly RULE_nonControlStatement = 13; - public static readonly RULE_controlStatement = 14; - public static readonly RULE_variableDefinition = 15; - public static readonly RULE_tupleAssignment = 16; - public static readonly RULE_assignStatement = 17; - public static readonly RULE_timeOpStatement = 18; - public static readonly RULE_requireStatement = 19; - public static readonly RULE_consoleStatement = 20; - public static readonly RULE_ifStatement = 21; - public static readonly RULE_loopStatement = 22; - public static readonly RULE_doWhileStatement = 23; - public static readonly RULE_whileStatement = 24; - public static readonly RULE_forStatement = 25; - public static readonly RULE_forInit = 26; - public static readonly RULE_requireMessage = 27; - public static readonly RULE_consoleParameter = 28; - public static readonly RULE_consoleParameterList = 29; - public static readonly RULE_functionCall = 30; - public static readonly RULE_expressionList = 31; - public static readonly RULE_expression = 32; - public static readonly RULE_modifier = 33; - public static readonly RULE_literal = 34; - public static readonly RULE_numberLiteral = 35; - public static readonly RULE_typeName = 36; - public static readonly RULE_typeCast = 37; + public static readonly RULE_returnStatement = 14; + public static readonly RULE_controlStatement = 15; + public static readonly RULE_variableDefinition = 16; + public static readonly RULE_tupleAssignment = 17; + public static readonly RULE_assignStatement = 18; + public static readonly RULE_timeOpStatement = 19; + public static readonly RULE_requireStatement = 20; + public static readonly RULE_consoleStatement = 21; + public static readonly RULE_ifStatement = 22; + public static readonly RULE_loopStatement = 23; + public static readonly RULE_doWhileStatement = 24; + public static readonly RULE_whileStatement = 25; + public static readonly RULE_forStatement = 26; + public static readonly RULE_forInit = 27; + public static readonly RULE_requireMessage = 28; + public static readonly RULE_consoleParameter = 29; + public static readonly RULE_consoleParameterList = 30; + public static readonly RULE_functionCall = 31; + public static readonly RULE_expressionList = 32; + public static readonly RULE_expression = 33; + public static readonly RULE_modifier = 34; + public static readonly RULE_literal = 35; + public static readonly RULE_numberLiteral = 36; + public static readonly RULE_typeName = 37; + public static readonly RULE_typeCast = 38; public static readonly literalNames: (string | null)[] = [ null, "'pragma'", "';'", "'cashscript'", "'^'", "'~'", @@ -146,10 +149,12 @@ export default class CashScriptParser extends Parser { "'='", "'contract'", "'{'", "'}'", "'function'", + "'returns'", "'('", "','", - "')'", "'+='", - "'-='", "'++'", - "'--'", "'require'", + "')'", "'return'", + "'+='", "'-='", + "'++'", "'--'", + "'require'", "'console.log'", "'if'", "'else'", "'do'", "'while'", @@ -213,6 +218,7 @@ export default class CashScriptParser extends Parser { null, null, null, null, null, null, + null, null, "VersionLiteral", "BooleanLiteral", "NumberUnit", @@ -236,10 +242,10 @@ export default class CashScriptParser extends Parser { "sourceFile", "pragmaDirective", "pragmaName", "pragmaValue", "versionConstraint", "versionOperator", "contractDefinition", "functionDefinition", "functionBody", "parameterList", "parameter", "block", "statement", "nonControlStatement", - "controlStatement", "variableDefinition", "tupleAssignment", "assignStatement", - "timeOpStatement", "requireStatement", "consoleStatement", "ifStatement", - "loopStatement", "doWhileStatement", "whileStatement", "forStatement", - "forInit", "requireMessage", "consoleParameter", "consoleParameterList", + "returnStatement", "controlStatement", "variableDefinition", "tupleAssignment", + "assignStatement", "timeOpStatement", "requireStatement", "consoleStatement", + "ifStatement", "loopStatement", "doWhileStatement", "whileStatement", + "forStatement", "forInit", "requireMessage", "consoleParameter", "consoleParameterList", "functionCall", "expressionList", "expression", "modifier", "literal", "numberLiteral", "typeName", "typeCast", ]; @@ -265,23 +271,23 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 79; + this.state = 81; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===1) { { { - this.state = 76; + this.state = 78; this.pragmaDirective(); } } - this.state = 81; + this.state = 83; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 82; + this.state = 84; this.contractDefinition(); - this.state = 83; + this.state = 85; this.match(CashScriptParser.EOF); } } @@ -306,13 +312,13 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 85; + this.state = 87; this.match(CashScriptParser.T__0); - this.state = 86; + this.state = 88; this.pragmaName(); - this.state = 87; + this.state = 89; this.pragmaValue(); - this.state = 88; + this.state = 90; this.match(CashScriptParser.T__1); } } @@ -337,7 +343,7 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 90; + this.state = 92; this.match(CashScriptParser.T__2); } } @@ -363,14 +369,14 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 92; - this.versionConstraint(); this.state = 94; + this.versionConstraint(); + this.state = 96; this._errHandler.sync(this); _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 2032) !== 0) || _la===62) { + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 2032) !== 0) || _la===64) { { - this.state = 93; + this.state = 95; this.versionConstraint(); } } @@ -399,17 +405,17 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 97; + this.state = 99; this._errHandler.sync(this); _la = this._input.LA(1); if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 2032) !== 0)) { { - this.state = 96; + this.state = 98; this.versionOperator(); } } - this.state = 99; + this.state = 101; this.match(CashScriptParser.VersionLiteral); } } @@ -435,7 +441,7 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 101; + this.state = 103; _la = this._input.LA(1); if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 2032) !== 0))) { this._errHandler.recoverInline(this); @@ -468,29 +474,29 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 103; + this.state = 105; this.match(CashScriptParser.T__10); - this.state = 104; + this.state = 106; this.match(CashScriptParser.Identifier); - this.state = 105; + this.state = 107; this.parameterList(); - this.state = 106; + this.state = 108; this.match(CashScriptParser.T__11); - this.state = 110; + this.state = 112; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===14) { { { - this.state = 107; + this.state = 109; this.functionDefinition(); } } - this.state = 112; + this.state = 114; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 113; + this.state = 115; this.match(CashScriptParser.T__12); } } @@ -512,16 +518,49 @@ export default class CashScriptParser extends Parser { public functionDefinition(): FunctionDefinitionContext { let localctx: FunctionDefinitionContext = new FunctionDefinitionContext(this, this._ctx, this.state); this.enterRule(localctx, 14, CashScriptParser.RULE_functionDefinition); + let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 115; + this.state = 117; this.match(CashScriptParser.T__13); - this.state = 116; + this.state = 118; this.match(CashScriptParser.Identifier); - this.state = 117; + this.state = 119; this.parameterList(); - this.state = 118; + this.state = 132; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la===15) { + { + this.state = 120; + this.match(CashScriptParser.T__14); + this.state = 121; + this.match(CashScriptParser.T__15); + this.state = 122; + this.typeName(); + this.state = 127; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la===17) { + { + { + this.state = 123; + this.match(CashScriptParser.T__16); + this.state = 124; + this.typeName(); + } + } + this.state = 129; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 130; + this.match(CashScriptParser.T__17); + } + } + + this.state = 134; this.functionBody(); } } @@ -547,23 +586,23 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 120; + this.state = 136; this.match(CashScriptParser.T__11); - this.state = 124; + this.state = 140; this._errHandler.sync(this); _la = this._input.LA(1); - while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 499122176) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 1031) !== 0)) { + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1997078528) !== 0) || ((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 1031) !== 0)) { { { - this.state = 121; + this.state = 137; this.statement(); } } - this.state = 126; + this.state = 142; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 127; + this.state = 143; this.match(CashScriptParser.T__12); } } @@ -590,48 +629,48 @@ export default class CashScriptParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 129; - this.match(CashScriptParser.T__14); - this.state = 141; + this.state = 145; + this.match(CashScriptParser.T__15); + this.state = 157; this._errHandler.sync(this); _la = this._input.LA(1); - if (((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 7) !== 0)) { + if (((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 7) !== 0)) { { - this.state = 130; + this.state = 146; this.parameter(); - this.state = 135; + this.state = 151; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 5, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 7, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 131; - this.match(CashScriptParser.T__15); - this.state = 132; + this.state = 147; + this.match(CashScriptParser.T__16); + this.state = 148; this.parameter(); } } } - this.state = 137; + this.state = 153; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 5, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 7, this._ctx); } - this.state = 139; + this.state = 155; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===16) { + if (_la===17) { { - this.state = 138; - this.match(CashScriptParser.T__15); + this.state = 154; + this.match(CashScriptParser.T__16); } } } } - this.state = 143; - this.match(CashScriptParser.T__16); + this.state = 159; + this.match(CashScriptParser.T__17); } } catch (re) { @@ -655,9 +694,9 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 145; + this.state = 161; this.typeName(); - this.state = 146; + this.state = 162; this.match(CashScriptParser.Identifier); } } @@ -681,45 +720,47 @@ export default class CashScriptParser extends Parser { this.enterRule(localctx, 22, CashScriptParser.RULE_block); let _la: number; try { - this.state = 157; + this.state = 173; this._errHandler.sync(this); switch (this._input.LA(1)) { case 12: this.enterOuterAlt(localctx, 1); { - this.state = 148; + this.state = 164; this.match(CashScriptParser.T__11); - this.state = 152; + this.state = 168; this._errHandler.sync(this); _la = this._input.LA(1); - while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 499122176) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 1031) !== 0)) { + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1997078528) !== 0) || ((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 1031) !== 0)) { { { - this.state = 149; + this.state = 165; this.statement(); } } - this.state = 154; + this.state = 170; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 155; + this.state = 171; this.match(CashScriptParser.T__12); } break; - case 22: - case 23: + case 16: + case 19: case 24: + case 25: case 26: - case 27: case 28: - case 68: - case 69: + case 29: + case 30: case 70: - case 78: + case 71: + case 72: + case 80: this.enterOuterAlt(localctx, 2); { - this.state = 156; + this.state = 172; this.statement(); } break; @@ -746,30 +787,32 @@ export default class CashScriptParser extends Parser { let localctx: StatementContext = new StatementContext(this, this._ctx, this.state); this.enterRule(localctx, 24, CashScriptParser.RULE_statement); try { - this.state = 163; + this.state = 179; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 24: case 26: - case 27: case 28: + case 29: + case 30: this.enterOuterAlt(localctx, 1); { - this.state = 159; + this.state = 175; this.controlStatement(); } break; - case 22: - case 23: - case 68: - case 69: + case 16: + case 19: + case 24: + case 25: case 70: - case 78: + case 71: + case 72: + case 80: this.enterOuterAlt(localctx, 2); { - this.state = 160; + this.state = 176; this.nonControlStatement(); - this.state = 161; + this.state = 177; this.match(CashScriptParser.T__1); } break; @@ -796,51 +839,102 @@ export default class CashScriptParser extends Parser { let localctx: NonControlStatementContext = new NonControlStatementContext(this, this._ctx, this.state); this.enterRule(localctx, 26, CashScriptParser.RULE_nonControlStatement); try { - this.state = 171; + this.state = 188; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 11, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 13, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 165; + this.state = 181; this.variableDefinition(); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 166; + this.state = 182; this.tupleAssignment(); } break; case 3: this.enterOuterAlt(localctx, 3); { - this.state = 167; + this.state = 183; this.assignStatement(); } break; case 4: this.enterOuterAlt(localctx, 4); { - this.state = 168; + this.state = 184; this.timeOpStatement(); } break; case 5: this.enterOuterAlt(localctx, 5); { - this.state = 169; + this.state = 185; this.requireStatement(); } break; case 6: this.enterOuterAlt(localctx, 6); { - this.state = 170; + this.state = 186; this.consoleStatement(); } break; + case 7: + this.enterOuterAlt(localctx, 7); + { + this.state = 187; + this.returnStatement(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localctx; + } + // @RuleVersion(0) + public returnStatement(): ReturnStatementContext { + let localctx: ReturnStatementContext = new ReturnStatementContext(this, this._ctx, this.state); + this.enterRule(localctx, 28, CashScriptParser.RULE_returnStatement); + let _la: number; + try { + this.enterOuterAlt(localctx, 1); + { + this.state = 190; + this.match(CashScriptParser.T__18); + this.state = 191; + this.expression(0); + this.state = 196; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la===17) { + { + { + this.state = 192; + this.match(CashScriptParser.T__16); + this.state = 193; + this.expression(0); + } + } + this.state = 198; + this._errHandler.sync(this); + _la = this._input.LA(1); + } } } catch (re) { @@ -860,24 +954,24 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public controlStatement(): ControlStatementContext { let localctx: ControlStatementContext = new ControlStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 28, CashScriptParser.RULE_controlStatement); + this.enterRule(localctx, 30, CashScriptParser.RULE_controlStatement); try { - this.state = 175; + this.state = 201; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 24: + case 26: this.enterOuterAlt(localctx, 1); { - this.state = 173; + this.state = 199; this.ifStatement(); } break; - case 26: - case 27: case 28: + case 29: + case 30: this.enterOuterAlt(localctx, 2); { - this.state = 174; + this.state = 200; this.loopStatement(); } break; @@ -902,32 +996,32 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public variableDefinition(): VariableDefinitionContext { let localctx: VariableDefinitionContext = new VariableDefinitionContext(this, this._ctx, this.state); - this.enterRule(localctx, 30, CashScriptParser.RULE_variableDefinition); + this.enterRule(localctx, 32, CashScriptParser.RULE_variableDefinition); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 177; + this.state = 203; this.typeName(); - this.state = 181; + this.state = 207; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===61) { + while (_la===63) { { { - this.state = 178; + this.state = 204; this.modifier(); } } - this.state = 183; + this.state = 209; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 184; + this.state = 210; this.match(CashScriptParser.Identifier); - this.state = 185; + this.state = 211; this.match(CashScriptParser.T__9); - this.state = 186; + this.state = 212; this.expression(0); } } @@ -948,24 +1042,82 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public tupleAssignment(): TupleAssignmentContext { let localctx: TupleAssignmentContext = new TupleAssignmentContext(this, this._ctx, this.state); - this.enterRule(localctx, 32, CashScriptParser.RULE_tupleAssignment); + this.enterRule(localctx, 34, CashScriptParser.RULE_tupleAssignment); + let _la: number; try { - this.enterOuterAlt(localctx, 1); - { - this.state = 188; - this.typeName(); - this.state = 189; - this.match(CashScriptParser.Identifier); - this.state = 190; - this.match(CashScriptParser.T__15); - this.state = 191; - this.typeName(); - this.state = 192; - this.match(CashScriptParser.Identifier); - this.state = 193; - this.match(CashScriptParser.T__9); - this.state = 194; - this.expression(0); + this.state = 242; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case 70: + case 71: + case 72: + this.enterOuterAlt(localctx, 1); + { + this.state = 214; + this.typeName(); + this.state = 215; + this.match(CashScriptParser.Identifier); + this.state = 220; + this._errHandler.sync(this); + _la = this._input.LA(1); + do { + { + { + this.state = 216; + this.match(CashScriptParser.T__16); + this.state = 217; + this.typeName(); + this.state = 218; + this.match(CashScriptParser.Identifier); + } + } + this.state = 222; + this._errHandler.sync(this); + _la = this._input.LA(1); + } while (_la===17); + this.state = 224; + this.match(CashScriptParser.T__9); + this.state = 225; + this.expression(0); + } + break; + case 16: + this.enterOuterAlt(localctx, 2); + { + this.state = 227; + this.match(CashScriptParser.T__15); + this.state = 228; + this.typeName(); + this.state = 229; + this.match(CashScriptParser.Identifier); + this.state = 234; + this._errHandler.sync(this); + _la = this._input.LA(1); + do { + { + { + this.state = 230; + this.match(CashScriptParser.T__16); + this.state = 231; + this.typeName(); + this.state = 232; + this.match(CashScriptParser.Identifier); + } + } + this.state = 236; + this._errHandler.sync(this); + _la = this._input.LA(1); + } while (_la===17); + this.state = 238; + this.match(CashScriptParser.T__17); + this.state = 239; + this.match(CashScriptParser.T__9); + this.state = 240; + this.expression(0); + } + break; + default: + throw new NoViableAltException(this); } } catch (re) { @@ -985,40 +1137,40 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public assignStatement(): AssignStatementContext { let localctx: AssignStatementContext = new AssignStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 34, CashScriptParser.RULE_assignStatement); + this.enterRule(localctx, 36, CashScriptParser.RULE_assignStatement); let _la: number; try { - this.state = 201; + this.state = 249; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 14, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 20, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 196; + this.state = 244; this.match(CashScriptParser.Identifier); - this.state = 197; + this.state = 245; localctx._op = this._input.LT(1); _la = this._input.LA(1); - if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 787456) !== 0))) { + if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 3146752) !== 0))) { localctx._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 198; + this.state = 246; this.expression(0); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 199; + this.state = 247; this.match(CashScriptParser.Identifier); - this.state = 200; + this.state = 248; localctx._op = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===20 || _la===21)) { + if(!(_la===22 || _la===23)) { localctx._op = this._errHandler.recoverInline(this); } else { @@ -1046,35 +1198,35 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public timeOpStatement(): TimeOpStatementContext { let localctx: TimeOpStatementContext = new TimeOpStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 36, CashScriptParser.RULE_timeOpStatement); + this.enterRule(localctx, 38, CashScriptParser.RULE_timeOpStatement); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 203; - this.match(CashScriptParser.T__21); - this.state = 204; - this.match(CashScriptParser.T__14); - this.state = 205; + this.state = 251; + this.match(CashScriptParser.T__23); + this.state = 252; + this.match(CashScriptParser.T__15); + this.state = 253; this.match(CashScriptParser.TxVar); - this.state = 206; + this.state = 254; this.match(CashScriptParser.T__5); - this.state = 207; + this.state = 255; this.expression(0); - this.state = 210; + this.state = 258; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===16) { + if (_la===17) { { - this.state = 208; - this.match(CashScriptParser.T__15); - this.state = 209; + this.state = 256; + this.match(CashScriptParser.T__16); + this.state = 257; this.requireMessage(); } } - this.state = 212; - this.match(CashScriptParser.T__16); + this.state = 260; + this.match(CashScriptParser.T__17); } } catch (re) { @@ -1094,31 +1246,31 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public requireStatement(): RequireStatementContext { let localctx: RequireStatementContext = new RequireStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 38, CashScriptParser.RULE_requireStatement); + this.enterRule(localctx, 40, CashScriptParser.RULE_requireStatement); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 214; - this.match(CashScriptParser.T__21); - this.state = 215; - this.match(CashScriptParser.T__14); - this.state = 216; + this.state = 262; + this.match(CashScriptParser.T__23); + this.state = 263; + this.match(CashScriptParser.T__15); + this.state = 264; this.expression(0); - this.state = 219; + this.state = 267; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===16) { + if (_la===17) { { - this.state = 217; - this.match(CashScriptParser.T__15); - this.state = 218; + this.state = 265; + this.match(CashScriptParser.T__16); + this.state = 266; this.requireMessage(); } } - this.state = 221; - this.match(CashScriptParser.T__16); + this.state = 269; + this.match(CashScriptParser.T__17); } } catch (re) { @@ -1138,13 +1290,13 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public consoleStatement(): ConsoleStatementContext { let localctx: ConsoleStatementContext = new ConsoleStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 40, CashScriptParser.RULE_consoleStatement); + this.enterRule(localctx, 42, CashScriptParser.RULE_consoleStatement); try { this.enterOuterAlt(localctx, 1); { - this.state = 223; - this.match(CashScriptParser.T__22); - this.state = 224; + this.state = 271; + this.match(CashScriptParser.T__24); + this.state = 272; this.consoleParameterList(); } } @@ -1165,28 +1317,28 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public ifStatement(): IfStatementContext { let localctx: IfStatementContext = new IfStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 42, CashScriptParser.RULE_ifStatement); + this.enterRule(localctx, 44, CashScriptParser.RULE_ifStatement); try { this.enterOuterAlt(localctx, 1); { - this.state = 226; - this.match(CashScriptParser.T__23); - this.state = 227; - this.match(CashScriptParser.T__14); - this.state = 228; + this.state = 274; + this.match(CashScriptParser.T__25); + this.state = 275; + this.match(CashScriptParser.T__15); + this.state = 276; this.expression(0); - this.state = 229; - this.match(CashScriptParser.T__16); - this.state = 230; + this.state = 277; + this.match(CashScriptParser.T__17); + this.state = 278; localctx._ifBlock = this.block(); - this.state = 233; + this.state = 281; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 17, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 23, this._ctx) ) { case 1: { - this.state = 231; - this.match(CashScriptParser.T__24); - this.state = 232; + this.state = 279; + this.match(CashScriptParser.T__26); + this.state = 280; localctx._elseBlock = this.block(); } break; @@ -1210,29 +1362,29 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public loopStatement(): LoopStatementContext { let localctx: LoopStatementContext = new LoopStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 44, CashScriptParser.RULE_loopStatement); + this.enterRule(localctx, 46, CashScriptParser.RULE_loopStatement); try { - this.state = 238; + this.state = 286; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 26: + case 28: this.enterOuterAlt(localctx, 1); { - this.state = 235; + this.state = 283; this.doWhileStatement(); } break; - case 27: + case 29: this.enterOuterAlt(localctx, 2); { - this.state = 236; + this.state = 284; this.whileStatement(); } break; - case 28: + case 30: this.enterOuterAlt(localctx, 3); { - this.state = 237; + this.state = 285; this.forStatement(); } break; @@ -1257,23 +1409,23 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public doWhileStatement(): DoWhileStatementContext { let localctx: DoWhileStatementContext = new DoWhileStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 46, CashScriptParser.RULE_doWhileStatement); + this.enterRule(localctx, 48, CashScriptParser.RULE_doWhileStatement); try { this.enterOuterAlt(localctx, 1); { - this.state = 240; - this.match(CashScriptParser.T__25); - this.state = 241; + this.state = 288; + this.match(CashScriptParser.T__27); + this.state = 289; this.block(); - this.state = 242; - this.match(CashScriptParser.T__26); - this.state = 243; - this.match(CashScriptParser.T__14); - this.state = 244; + this.state = 290; + this.match(CashScriptParser.T__28); + this.state = 291; + this.match(CashScriptParser.T__15); + this.state = 292; this.expression(0); - this.state = 245; - this.match(CashScriptParser.T__16); - this.state = 246; + this.state = 293; + this.match(CashScriptParser.T__17); + this.state = 294; this.match(CashScriptParser.T__1); } } @@ -1294,19 +1446,19 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public whileStatement(): WhileStatementContext { let localctx: WhileStatementContext = new WhileStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 48, CashScriptParser.RULE_whileStatement); + this.enterRule(localctx, 50, CashScriptParser.RULE_whileStatement); try { this.enterOuterAlt(localctx, 1); { - this.state = 248; - this.match(CashScriptParser.T__26); - this.state = 249; - this.match(CashScriptParser.T__14); - this.state = 250; + this.state = 296; + this.match(CashScriptParser.T__28); + this.state = 297; + this.match(CashScriptParser.T__15); + this.state = 298; this.expression(0); - this.state = 251; - this.match(CashScriptParser.T__16); - this.state = 252; + this.state = 299; + this.match(CashScriptParser.T__17); + this.state = 300; this.block(); } } @@ -1327,27 +1479,27 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public forStatement(): ForStatementContext { let localctx: ForStatementContext = new ForStatementContext(this, this._ctx, this.state); - this.enterRule(localctx, 50, CashScriptParser.RULE_forStatement); + this.enterRule(localctx, 52, CashScriptParser.RULE_forStatement); try { this.enterOuterAlt(localctx, 1); { - this.state = 254; - this.match(CashScriptParser.T__27); - this.state = 255; - this.match(CashScriptParser.T__14); - this.state = 256; + this.state = 302; + this.match(CashScriptParser.T__29); + this.state = 303; + this.match(CashScriptParser.T__15); + this.state = 304; this.forInit(); - this.state = 257; + this.state = 305; this.match(CashScriptParser.T__1); - this.state = 258; + this.state = 306; this.expression(0); - this.state = 259; + this.state = 307; this.match(CashScriptParser.T__1); - this.state = 260; + this.state = 308; this.assignStatement(); - this.state = 261; - this.match(CashScriptParser.T__16); - this.state = 262; + this.state = 309; + this.match(CashScriptParser.T__17); + this.state = 310; this.block(); } } @@ -1368,24 +1520,24 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public forInit(): ForInitContext { let localctx: ForInitContext = new ForInitContext(this, this._ctx, this.state); - this.enterRule(localctx, 52, CashScriptParser.RULE_forInit); + this.enterRule(localctx, 54, CashScriptParser.RULE_forInit); try { - this.state = 266; + this.state = 314; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 68: - case 69: case 70: + case 71: + case 72: this.enterOuterAlt(localctx, 1); { - this.state = 264; + this.state = 312; this.variableDefinition(); } break; - case 78: + case 80: this.enterOuterAlt(localctx, 2); { - this.state = 265; + this.state = 313; this.assignStatement(); } break; @@ -1410,11 +1562,11 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public requireMessage(): RequireMessageContext { let localctx: RequireMessageContext = new RequireMessageContext(this, this._ctx, this.state); - this.enterRule(localctx, 54, CashScriptParser.RULE_requireMessage); + this.enterRule(localctx, 56, CashScriptParser.RULE_requireMessage); try { this.enterOuterAlt(localctx, 1); { - this.state = 268; + this.state = 316; this.match(CashScriptParser.StringLiteral); } } @@ -1435,26 +1587,26 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public consoleParameter(): ConsoleParameterContext { let localctx: ConsoleParameterContext = new ConsoleParameterContext(this, this._ctx, this.state); - this.enterRule(localctx, 56, CashScriptParser.RULE_consoleParameter); + this.enterRule(localctx, 58, CashScriptParser.RULE_consoleParameter); try { - this.state = 272; + this.state = 320; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 78: + case 80: this.enterOuterAlt(localctx, 1); { - this.state = 270; + this.state = 318; this.match(CashScriptParser.Identifier); } break; - case 63: case 65: - case 72: - case 73: + case 67: case 74: + case 75: + case 76: this.enterOuterAlt(localctx, 2); { - this.state = 271; + this.state = 319; this.literal(); } break; @@ -1479,54 +1631,54 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public consoleParameterList(): ConsoleParameterListContext { let localctx: ConsoleParameterListContext = new ConsoleParameterListContext(this, this._ctx, this.state); - this.enterRule(localctx, 58, CashScriptParser.RULE_consoleParameterList); + this.enterRule(localctx, 60, CashScriptParser.RULE_consoleParameterList); let _la: number; try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 274; - this.match(CashScriptParser.T__14); - this.state = 286; + this.state = 322; + this.match(CashScriptParser.T__15); + this.state = 334; this._errHandler.sync(this); _la = this._input.LA(1); - if (((((_la - 63)) & ~0x1F) === 0 && ((1 << (_la - 63)) & 36357) !== 0)) { + if (((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 36357) !== 0)) { { - this.state = 275; + this.state = 323; this.consoleParameter(); - this.state = 280; + this.state = 328; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 21, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 27, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 276; - this.match(CashScriptParser.T__15); - this.state = 277; + this.state = 324; + this.match(CashScriptParser.T__16); + this.state = 325; this.consoleParameter(); } } } - this.state = 282; + this.state = 330; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 21, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 27, this._ctx); } - this.state = 284; + this.state = 332; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===16) { + if (_la===17) { { - this.state = 283; - this.match(CashScriptParser.T__15); + this.state = 331; + this.match(CashScriptParser.T__16); } } } } - this.state = 288; - this.match(CashScriptParser.T__16); + this.state = 336; + this.match(CashScriptParser.T__17); } } catch (re) { @@ -1546,13 +1698,13 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public functionCall(): FunctionCallContext { let localctx: FunctionCallContext = new FunctionCallContext(this, this._ctx, this.state); - this.enterRule(localctx, 60, CashScriptParser.RULE_functionCall); + this.enterRule(localctx, 62, CashScriptParser.RULE_functionCall); try { this.enterOuterAlt(localctx, 1); { - this.state = 290; + this.state = 338; this.match(CashScriptParser.Identifier); - this.state = 291; + this.state = 339; this.expressionList(); } } @@ -1573,54 +1725,54 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public expressionList(): ExpressionListContext { let localctx: ExpressionListContext = new ExpressionListContext(this, this._ctx, this.state); - this.enterRule(localctx, 62, CashScriptParser.RULE_expressionList); + this.enterRule(localctx, 64, CashScriptParser.RULE_expressionList); let _la: number; try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 293; - this.match(CashScriptParser.T__14); - this.state = 305; + this.state = 341; + this.match(CashScriptParser.T__15); + this.state = 353; this._errHandler.sync(this); _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1610645536) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 2147582017) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 15257) !== 0)) { + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 2147549216) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 393477) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 61029) !== 0)) { { - this.state = 294; + this.state = 342; this.expression(0); - this.state = 299; + this.state = 347; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 24, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 30, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 295; - this.match(CashScriptParser.T__15); - this.state = 296; + this.state = 343; + this.match(CashScriptParser.T__16); + this.state = 344; this.expression(0); } } } - this.state = 301; + this.state = 349; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 24, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 30, this._ctx); } - this.state = 303; + this.state = 351; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===16) { + if (_la===17) { { - this.state = 302; - this.match(CashScriptParser.T__15); + this.state = 350; + this.match(CashScriptParser.T__16); } } } } - this.state = 307; - this.match(CashScriptParser.T__16); + this.state = 355; + this.match(CashScriptParser.T__17); } } catch (re) { @@ -1650,28 +1802,28 @@ export default class CashScriptParser extends Parser { let _parentState: number = this.state; let localctx: ExpressionContext = new ExpressionContext(this, this._ctx, _parentState); let _prevctx: ExpressionContext = localctx; - let _startState: number = 64; - this.enterRecursionRule(localctx, 64, CashScriptParser.RULE_expression, _p); + let _startState: number = 66; + this.enterRecursionRule(localctx, 66, CashScriptParser.RULE_expression, _p); let _la: number; try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 358; + this.state = 406; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 31, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 37, this._ctx) ) { case 1: { localctx = new ParenthesisedContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 310; - this.match(CashScriptParser.T__14); - this.state = 311; + this.state = 358; + this.match(CashScriptParser.T__15); + this.state = 359; this.expression(0); - this.state = 312; - this.match(CashScriptParser.T__16); + this.state = 360; + this.match(CashScriptParser.T__17); } break; case 2: @@ -1679,24 +1831,24 @@ export default class CashScriptParser extends Parser { localctx = new CastContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 314; + this.state = 362; this.typeCast(); - this.state = 315; - this.match(CashScriptParser.T__14); - this.state = 316; + this.state = 363; + this.match(CashScriptParser.T__15); + this.state = 364; (localctx as CastContext)._castable = this.expression(0); - this.state = 318; + this.state = 366; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===16) { + if (_la===17) { { - this.state = 317; - this.match(CashScriptParser.T__15); + this.state = 365; + this.match(CashScriptParser.T__16); } } - this.state = 320; - this.match(CashScriptParser.T__16); + this.state = 368; + this.match(CashScriptParser.T__17); } break; case 3: @@ -1704,7 +1856,7 @@ export default class CashScriptParser extends Parser { localctx = new FunctionCallExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 322; + this.state = 370; this.functionCall(); } break; @@ -1713,11 +1865,11 @@ export default class CashScriptParser extends Parser { localctx = new InstantiationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 323; - this.match(CashScriptParser.T__28); - this.state = 324; + this.state = 371; + this.match(CashScriptParser.T__30); + this.state = 372; this.match(CashScriptParser.Identifier); - this.state = 325; + this.state = 373; this.expressionList(); } break; @@ -1726,18 +1878,18 @@ export default class CashScriptParser extends Parser { localctx = new UnaryIntrospectionOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 326; - (localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__31); - this.state = 327; - this.match(CashScriptParser.T__29); - this.state = 328; + this.state = 374; + (localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__33); + this.state = 375; + this.match(CashScriptParser.T__31); + this.state = 376; this.expression(0); - this.state = 329; - this.match(CashScriptParser.T__30); - this.state = 330; + this.state = 377; + this.match(CashScriptParser.T__32); + this.state = 378; (localctx as UnaryIntrospectionOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & 31) !== 0))) { + if(!(((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & 31) !== 0))) { (localctx as UnaryIntrospectionOpContext)._op = this._errHandler.recoverInline(this); } else { @@ -1751,18 +1903,18 @@ export default class CashScriptParser extends Parser { localctx = new UnaryIntrospectionOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 332; - (localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__37); - this.state = 333; - this.match(CashScriptParser.T__29); - this.state = 334; + this.state = 380; + (localctx as UnaryIntrospectionOpContext)._scope = this.match(CashScriptParser.T__39); + this.state = 381; + this.match(CashScriptParser.T__31); + this.state = 382; this.expression(0); - this.state = 335; - this.match(CashScriptParser.T__30); - this.state = 336; + this.state = 383; + this.match(CashScriptParser.T__32); + this.state = 384; (localctx as UnaryIntrospectionOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & 991) !== 0))) { + if(!(((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & 991) !== 0))) { (localctx as UnaryIntrospectionOpContext)._op = this._errHandler.recoverInline(this); } else { @@ -1776,17 +1928,17 @@ export default class CashScriptParser extends Parser { localctx = new UnaryOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 338; + this.state = 386; (localctx as UnaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===5 || _la===47 || _la===48)) { + if(!(_la===5 || _la===49 || _la===50)) { (localctx as UnaryOpContext)._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 339; + this.state = 387; this.expression(15); } break; @@ -1795,48 +1947,48 @@ export default class CashScriptParser extends Parser { localctx = new ArrayContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 340; - this.match(CashScriptParser.T__29); - this.state = 352; + this.state = 388; + this.match(CashScriptParser.T__31); + this.state = 400; this._errHandler.sync(this); _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1610645536) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 2147582017) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 15257) !== 0)) { + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 2147549216) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 393477) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 61029) !== 0)) { { - this.state = 341; + this.state = 389; this.expression(0); - this.state = 346; + this.state = 394; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 28, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 34, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 342; - this.match(CashScriptParser.T__15); - this.state = 343; + this.state = 390; + this.match(CashScriptParser.T__16); + this.state = 391; this.expression(0); } } } - this.state = 348; + this.state = 396; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 28, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 34, this._ctx); } - this.state = 350; + this.state = 398; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===16) { + if (_la===17) { { - this.state = 349; - this.match(CashScriptParser.T__15); + this.state = 397; + this.match(CashScriptParser.T__16); } } } } - this.state = 354; - this.match(CashScriptParser.T__30); + this.state = 402; + this.match(CashScriptParser.T__32); } break; case 9: @@ -1844,7 +1996,7 @@ export default class CashScriptParser extends Parser { localctx = new NullaryOpContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 355; + this.state = 403; this.match(CashScriptParser.NullaryOp); } break; @@ -1853,7 +2005,7 @@ export default class CashScriptParser extends Parser { localctx = new IdentifierContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 356; + this.state = 404; this.match(CashScriptParser.Identifier); } break; @@ -1862,15 +2014,15 @@ export default class CashScriptParser extends Parser { localctx = new LiteralExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 357; + this.state = 405; this.literal(); } break; } this._ctx.stop = this._input.LT(-1); - this.state = 412; + this.state = 460; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 39, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { if (this._parseListeners != null) { @@ -1878,29 +2030,29 @@ export default class CashScriptParser extends Parser { } _prevctx = localctx; { - this.state = 410; + this.state = 458; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 32, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 38, 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 = 360; + this.state = 408; if (!(this.precpred(this._ctx, 14))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); } - this.state = 361; + this.state = 409; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 49)) & ~0x1F) === 0 && ((1 << (_la - 49)) & 7) !== 0))) { + if(!(((((_la - 51)) & ~0x1F) === 0 && ((1 << (_la - 51)) & 7) !== 0))) { (localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 362; + this.state = 410; (localctx as BinaryOpContext)._right = this.expression(15); } break; @@ -1909,21 +2061,21 @@ 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 = 363; + this.state = 411; if (!(this.precpred(this._ctx, 13))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); } - this.state = 364; + this.state = 412; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===48 || _la===52)) { + if(!(_la===50 || _la===54)) { (localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 365; + this.state = 413; (localctx as BinaryOpContext)._right = this.expression(14); } break; @@ -1932,21 +2084,21 @@ 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 = 366; + this.state = 414; if (!(this.precpred(this._ctx, 12))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); } - this.state = 367; + this.state = 415; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===53 || _la===54)) { + if(!(_la===55 || _la===56)) { (localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 368; + this.state = 416; (localctx as BinaryOpContext)._right = this.expression(13); } break; @@ -1955,11 +2107,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 = 369; + this.state = 417; if (!(this.precpred(this._ctx, 11))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); } - this.state = 370; + this.state = 418; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 960) !== 0))) { @@ -1969,7 +2121,7 @@ export default class CashScriptParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 371; + this.state = 419; (localctx as BinaryOpContext)._right = this.expression(12); } break; @@ -1978,21 +2130,21 @@ 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 = 372; + this.state = 420; if (!(this.precpred(this._ctx, 10))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); } - this.state = 373; + this.state = 421; (localctx as BinaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===55 || _la===56)) { + if(!(_la===57 || _la===58)) { (localctx as BinaryOpContext)._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 374; + this.state = 422; (localctx as BinaryOpContext)._right = this.expression(11); } break; @@ -2001,13 +2153,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 = 375; + this.state = 423; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 376; - (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__56); - this.state = 377; + this.state = 424; + (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__58); + this.state = 425; (localctx as BinaryOpContext)._right = this.expression(10); } break; @@ -2016,13 +2168,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 = 378; + this.state = 426; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 379; + this.state = 427; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__3); - this.state = 380; + this.state = 428; (localctx as BinaryOpContext)._right = this.expression(9); } break; @@ -2031,13 +2183,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 = 381; + this.state = 429; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 382; - (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__57); - this.state = 383; + this.state = 430; + (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__59); + this.state = 431; (localctx as BinaryOpContext)._right = this.expression(8); } break; @@ -2046,13 +2198,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 = 384; + this.state = 432; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 385; - (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__58); - this.state = 386; + this.state = 433; + (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__60); + this.state = 434; (localctx as BinaryOpContext)._right = this.expression(7); } break; @@ -2061,13 +2213,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 = 387; + this.state = 435; if (!(this.precpred(this._ctx, 5))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } - this.state = 388; - (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__59); - this.state = 389; + this.state = 436; + (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__61); + this.state = 437; (localctx as BinaryOpContext)._right = this.expression(6); } break; @@ -2075,30 +2227,30 @@ export default class CashScriptParser extends Parser { { localctx = new TupleIndexOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 390; + this.state = 438; if (!(this.precpred(this._ctx, 21))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 21)"); } - this.state = 391; - this.match(CashScriptParser.T__29); - this.state = 392; + this.state = 439; + this.match(CashScriptParser.T__31); + this.state = 440; (localctx as TupleIndexOpContext)._index = this.match(CashScriptParser.NumberLiteral); - this.state = 393; - this.match(CashScriptParser.T__30); + this.state = 441; + this.match(CashScriptParser.T__32); } break; case 12: { localctx = new UnaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 394; + this.state = 442; if (!(this.precpred(this._ctx, 18))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 18)"); } - this.state = 395; + this.state = 443; (localctx as UnaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===43 || _la===44)) { + if(!(_la===45 || _la===46)) { (localctx as UnaryOpContext)._op = this._errHandler.recoverInline(this); } else { @@ -2112,18 +2264,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 = 396; + this.state = 444; if (!(this.precpred(this._ctx, 17))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); } - this.state = 397; - (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__44); - this.state = 398; - this.match(CashScriptParser.T__14); - this.state = 399; + this.state = 445; + (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__46); + this.state = 446; + this.match(CashScriptParser.T__15); + this.state = 447; (localctx as BinaryOpContext)._right = this.expression(0); - this.state = 400; - this.match(CashScriptParser.T__16); + this.state = 448; + this.match(CashScriptParser.T__17); } break; case 14: @@ -2131,30 +2283,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 = 402; + this.state = 450; if (!(this.precpred(this._ctx, 16))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); } - this.state = 403; - this.match(CashScriptParser.T__45); - this.state = 404; - this.match(CashScriptParser.T__14); - this.state = 405; - (localctx as SliceContext)._start = this.expression(0); - this.state = 406; + this.state = 451; + this.match(CashScriptParser.T__47); + this.state = 452; this.match(CashScriptParser.T__15); - this.state = 407; - (localctx as SliceContext)._end = this.expression(0); - this.state = 408; + this.state = 453; + (localctx as SliceContext)._start = this.expression(0); + this.state = 454; this.match(CashScriptParser.T__16); + this.state = 455; + (localctx as SliceContext)._end = this.expression(0); + this.state = 456; + this.match(CashScriptParser.T__17); } break; } } } - this.state = 414; + this.state = 462; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 39, this._ctx); } } } @@ -2175,12 +2327,12 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public modifier(): ModifierContext { let localctx: ModifierContext = new ModifierContext(this, this._ctx, this.state); - this.enterRule(localctx, 66, CashScriptParser.RULE_modifier); + this.enterRule(localctx, 68, CashScriptParser.RULE_modifier); try { this.enterOuterAlt(localctx, 1); { - this.state = 415; - this.match(CashScriptParser.T__60); + this.state = 463; + this.match(CashScriptParser.T__62); } } catch (re) { @@ -2200,43 +2352,43 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public literal(): LiteralContext { let localctx: LiteralContext = new LiteralContext(this, this._ctx, this.state); - this.enterRule(localctx, 68, CashScriptParser.RULE_literal); + this.enterRule(localctx, 70, CashScriptParser.RULE_literal); try { - this.state = 422; + this.state = 470; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 63: + case 65: this.enterOuterAlt(localctx, 1); { - this.state = 417; + this.state = 465; this.match(CashScriptParser.BooleanLiteral); } break; - case 65: + case 67: this.enterOuterAlt(localctx, 2); { - this.state = 418; + this.state = 466; this.numberLiteral(); } break; - case 72: + case 74: this.enterOuterAlt(localctx, 3); { - this.state = 419; + this.state = 467; this.match(CashScriptParser.StringLiteral); } break; - case 73: + case 75: this.enterOuterAlt(localctx, 4); { - this.state = 420; + this.state = 468; this.match(CashScriptParser.DateLiteral); } break; - case 74: + case 76: this.enterOuterAlt(localctx, 5); { - this.state = 421; + this.state = 469; this.match(CashScriptParser.HexLiteral); } break; @@ -2261,18 +2413,18 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public numberLiteral(): NumberLiteralContext { let localctx: NumberLiteralContext = new NumberLiteralContext(this, this._ctx, this.state); - this.enterRule(localctx, 70, CashScriptParser.RULE_numberLiteral); + this.enterRule(localctx, 72, CashScriptParser.RULE_numberLiteral); try { this.enterOuterAlt(localctx, 1); { - this.state = 424; + this.state = 472; this.match(CashScriptParser.NumberLiteral); - this.state = 426; + this.state = 474; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 35, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 41, this._ctx) ) { case 1: { - this.state = 425; + this.state = 473; this.match(CashScriptParser.NumberUnit); } break; @@ -2296,14 +2448,14 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public typeName(): TypeNameContext { let localctx: TypeNameContext = new TypeNameContext(this, this._ctx, this.state); - this.enterRule(localctx, 72, CashScriptParser.RULE_typeName); + this.enterRule(localctx, 74, CashScriptParser.RULE_typeName); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 428; + this.state = 476; _la = this._input.LA(1); - if(!(((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 7) !== 0))) { + if(!(((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 7) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -2329,14 +2481,14 @@ export default class CashScriptParser extends Parser { // @RuleVersion(0) public typeCast(): TypeCastContext { let localctx: TypeCastContext = new TypeCastContext(this, this._ctx, this.state); - this.enterRule(localctx, 74, CashScriptParser.RULE_typeCast); + this.enterRule(localctx, 76, CashScriptParser.RULE_typeCast); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 430; + this.state = 478; _la = this._input.LA(1); - if(!(((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 259) !== 0))) { + if(!(((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 259) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -2362,7 +2514,7 @@ export default class CashScriptParser extends Parser { public sempred(localctx: RuleContext, ruleIndex: number, predIndex: number): boolean { switch (ruleIndex) { - case 32: + case 33: return this.expression_sempred(localctx as ExpressionContext, predIndex); } return true; @@ -2401,149 +2553,166 @@ export default class CashScriptParser extends Parser { return true; } - public static readonly _serializedATN: number[] = [4,1,81,433,2,0,7,0,2, + public static readonly _serializedATN: number[] = [4,1,83,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,1,0,5,0,78, - 8,0,10,0,12,0,81,9,0,1,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,95,8,3,1,4,3,4,98,8,4,1,4,1,4,1,5,1,5,1,6,1,6,1,6,1,6,1,6,5,6,109,8,6, - 10,6,12,6,112,9,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,8,1,8,5,8,123,8,8,10,8, - 12,8,126,9,8,1,8,1,8,1,9,1,9,1,9,1,9,5,9,134,8,9,10,9,12,9,137,9,9,1,9, - 3,9,140,8,9,3,9,142,8,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,5,11,151,8,11, - 10,11,12,11,154,9,11,1,11,1,11,3,11,158,8,11,1,12,1,12,1,12,1,12,3,12,164, - 8,12,1,13,1,13,1,13,1,13,1,13,1,13,3,13,172,8,13,1,14,1,14,3,14,176,8,14, - 1,15,1,15,5,15,180,8,15,10,15,12,15,183,9,15,1,15,1,15,1,15,1,15,1,16,1, - 16,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,3,17,202,8,17, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,211,8,18,1,18,1,18,1,19,1,19,1, - 19,1,19,1,19,3,19,220,8,19,1,19,1,19,1,20,1,20,1,20,1,21,1,21,1,21,1,21, - 1,21,1,21,1,21,3,21,234,8,21,1,22,1,22,1,22,3,22,239,8,22,1,23,1,23,1,23, - 1,23,1,23,1,23,1,23,1,23,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,26,1,26,3,26,267,8,26,1,27,1,27,1,28, - 1,28,3,28,273,8,28,1,29,1,29,1,29,1,29,5,29,279,8,29,10,29,12,29,282,9, - 29,1,29,3,29,285,8,29,3,29,287,8,29,1,29,1,29,1,30,1,30,1,30,1,31,1,31, - 1,31,1,31,5,31,298,8,31,10,31,12,31,301,9,31,1,31,3,31,304,8,31,3,31,306, - 8,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,3,32,319,8, - 32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32, - 1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,5,32,345,8,32,10,32,12, - 32,348,9,32,1,32,3,32,351,8,32,3,32,353,8,32,1,32,1,32,1,32,1,32,3,32,359, - 8,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1, - 32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32, - 1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1, - 32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,5,32,411,8,32,10,32,12,32,414,9,32, - 1,33,1,33,1,34,1,34,1,34,1,34,1,34,3,34,423,8,34,1,35,1,35,3,35,427,8,35, - 1,36,1,36,1,37,1,37,1,37,0,1,64,38,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, - 0,14,1,0,4,10,2,0,10,10,18,19,1,0,20,21,1,0,33,37,2,0,33,37,39,42,2,0,5, - 5,47,48,1,0,49,51,2,0,48,48,52,52,1,0,53,54,1,0,6,9,1,0,55,56,1,0,43,44, - 1,0,68,70,2,0,68,69,76,76,459,0,79,1,0,0,0,2,85,1,0,0,0,4,90,1,0,0,0,6, - 92,1,0,0,0,8,97,1,0,0,0,10,101,1,0,0,0,12,103,1,0,0,0,14,115,1,0,0,0,16, - 120,1,0,0,0,18,129,1,0,0,0,20,145,1,0,0,0,22,157,1,0,0,0,24,163,1,0,0,0, - 26,171,1,0,0,0,28,175,1,0,0,0,30,177,1,0,0,0,32,188,1,0,0,0,34,201,1,0, - 0,0,36,203,1,0,0,0,38,214,1,0,0,0,40,223,1,0,0,0,42,226,1,0,0,0,44,238, - 1,0,0,0,46,240,1,0,0,0,48,248,1,0,0,0,50,254,1,0,0,0,52,266,1,0,0,0,54, - 268,1,0,0,0,56,272,1,0,0,0,58,274,1,0,0,0,60,290,1,0,0,0,62,293,1,0,0,0, - 64,358,1,0,0,0,66,415,1,0,0,0,68,422,1,0,0,0,70,424,1,0,0,0,72,428,1,0, - 0,0,74,430,1,0,0,0,76,78,3,2,1,0,77,76,1,0,0,0,78,81,1,0,0,0,79,77,1,0, - 0,0,79,80,1,0,0,0,80,82,1,0,0,0,81,79,1,0,0,0,82,83,3,12,6,0,83,84,5,0, - 0,1,84,1,1,0,0,0,85,86,5,1,0,0,86,87,3,4,2,0,87,88,3,6,3,0,88,89,5,2,0, - 0,89,3,1,0,0,0,90,91,5,3,0,0,91,5,1,0,0,0,92,94,3,8,4,0,93,95,3,8,4,0,94, - 93,1,0,0,0,94,95,1,0,0,0,95,7,1,0,0,0,96,98,3,10,5,0,97,96,1,0,0,0,97,98, - 1,0,0,0,98,99,1,0,0,0,99,100,5,62,0,0,100,9,1,0,0,0,101,102,7,0,0,0,102, - 11,1,0,0,0,103,104,5,11,0,0,104,105,5,78,0,0,105,106,3,18,9,0,106,110,5, - 12,0,0,107,109,3,14,7,0,108,107,1,0,0,0,109,112,1,0,0,0,110,108,1,0,0,0, - 110,111,1,0,0,0,111,113,1,0,0,0,112,110,1,0,0,0,113,114,5,13,0,0,114,13, - 1,0,0,0,115,116,5,14,0,0,116,117,5,78,0,0,117,118,3,18,9,0,118,119,3,16, - 8,0,119,15,1,0,0,0,120,124,5,12,0,0,121,123,3,24,12,0,122,121,1,0,0,0,123, - 126,1,0,0,0,124,122,1,0,0,0,124,125,1,0,0,0,125,127,1,0,0,0,126,124,1,0, - 0,0,127,128,5,13,0,0,128,17,1,0,0,0,129,141,5,15,0,0,130,135,3,20,10,0, - 131,132,5,16,0,0,132,134,3,20,10,0,133,131,1,0,0,0,134,137,1,0,0,0,135, - 133,1,0,0,0,135,136,1,0,0,0,136,139,1,0,0,0,137,135,1,0,0,0,138,140,5,16, - 0,0,139,138,1,0,0,0,139,140,1,0,0,0,140,142,1,0,0,0,141,130,1,0,0,0,141, - 142,1,0,0,0,142,143,1,0,0,0,143,144,5,17,0,0,144,19,1,0,0,0,145,146,3,72, - 36,0,146,147,5,78,0,0,147,21,1,0,0,0,148,152,5,12,0,0,149,151,3,24,12,0, - 150,149,1,0,0,0,151,154,1,0,0,0,152,150,1,0,0,0,152,153,1,0,0,0,153,155, - 1,0,0,0,154,152,1,0,0,0,155,158,5,13,0,0,156,158,3,24,12,0,157,148,1,0, - 0,0,157,156,1,0,0,0,158,23,1,0,0,0,159,164,3,28,14,0,160,161,3,26,13,0, - 161,162,5,2,0,0,162,164,1,0,0,0,163,159,1,0,0,0,163,160,1,0,0,0,164,25, - 1,0,0,0,165,172,3,30,15,0,166,172,3,32,16,0,167,172,3,34,17,0,168,172,3, - 36,18,0,169,172,3,38,19,0,170,172,3,40,20,0,171,165,1,0,0,0,171,166,1,0, - 0,0,171,167,1,0,0,0,171,168,1,0,0,0,171,169,1,0,0,0,171,170,1,0,0,0,172, - 27,1,0,0,0,173,176,3,42,21,0,174,176,3,44,22,0,175,173,1,0,0,0,175,174, - 1,0,0,0,176,29,1,0,0,0,177,181,3,72,36,0,178,180,3,66,33,0,179,178,1,0, - 0,0,180,183,1,0,0,0,181,179,1,0,0,0,181,182,1,0,0,0,182,184,1,0,0,0,183, - 181,1,0,0,0,184,185,5,78,0,0,185,186,5,10,0,0,186,187,3,64,32,0,187,31, - 1,0,0,0,188,189,3,72,36,0,189,190,5,78,0,0,190,191,5,16,0,0,191,192,3,72, - 36,0,192,193,5,78,0,0,193,194,5,10,0,0,194,195,3,64,32,0,195,33,1,0,0,0, - 196,197,5,78,0,0,197,198,7,1,0,0,198,202,3,64,32,0,199,200,5,78,0,0,200, - 202,7,2,0,0,201,196,1,0,0,0,201,199,1,0,0,0,202,35,1,0,0,0,203,204,5,22, - 0,0,204,205,5,15,0,0,205,206,5,75,0,0,206,207,5,6,0,0,207,210,3,64,32,0, - 208,209,5,16,0,0,209,211,3,54,27,0,210,208,1,0,0,0,210,211,1,0,0,0,211, - 212,1,0,0,0,212,213,5,17,0,0,213,37,1,0,0,0,214,215,5,22,0,0,215,216,5, - 15,0,0,216,219,3,64,32,0,217,218,5,16,0,0,218,220,3,54,27,0,219,217,1,0, - 0,0,219,220,1,0,0,0,220,221,1,0,0,0,221,222,5,17,0,0,222,39,1,0,0,0,223, - 224,5,23,0,0,224,225,3,58,29,0,225,41,1,0,0,0,226,227,5,24,0,0,227,228, - 5,15,0,0,228,229,3,64,32,0,229,230,5,17,0,0,230,233,3,22,11,0,231,232,5, - 25,0,0,232,234,3,22,11,0,233,231,1,0,0,0,233,234,1,0,0,0,234,43,1,0,0,0, - 235,239,3,46,23,0,236,239,3,48,24,0,237,239,3,50,25,0,238,235,1,0,0,0,238, - 236,1,0,0,0,238,237,1,0,0,0,239,45,1,0,0,0,240,241,5,26,0,0,241,242,3,22, - 11,0,242,243,5,27,0,0,243,244,5,15,0,0,244,245,3,64,32,0,245,246,5,17,0, - 0,246,247,5,2,0,0,247,47,1,0,0,0,248,249,5,27,0,0,249,250,5,15,0,0,250, - 251,3,64,32,0,251,252,5,17,0,0,252,253,3,22,11,0,253,49,1,0,0,0,254,255, - 5,28,0,0,255,256,5,15,0,0,256,257,3,52,26,0,257,258,5,2,0,0,258,259,3,64, - 32,0,259,260,5,2,0,0,260,261,3,34,17,0,261,262,5,17,0,0,262,263,3,22,11, - 0,263,51,1,0,0,0,264,267,3,30,15,0,265,267,3,34,17,0,266,264,1,0,0,0,266, - 265,1,0,0,0,267,53,1,0,0,0,268,269,5,72,0,0,269,55,1,0,0,0,270,273,5,78, - 0,0,271,273,3,68,34,0,272,270,1,0,0,0,272,271,1,0,0,0,273,57,1,0,0,0,274, - 286,5,15,0,0,275,280,3,56,28,0,276,277,5,16,0,0,277,279,3,56,28,0,278,276, - 1,0,0,0,279,282,1,0,0,0,280,278,1,0,0,0,280,281,1,0,0,0,281,284,1,0,0,0, - 282,280,1,0,0,0,283,285,5,16,0,0,284,283,1,0,0,0,284,285,1,0,0,0,285,287, - 1,0,0,0,286,275,1,0,0,0,286,287,1,0,0,0,287,288,1,0,0,0,288,289,5,17,0, - 0,289,59,1,0,0,0,290,291,5,78,0,0,291,292,3,62,31,0,292,61,1,0,0,0,293, - 305,5,15,0,0,294,299,3,64,32,0,295,296,5,16,0,0,296,298,3,64,32,0,297,295, - 1,0,0,0,298,301,1,0,0,0,299,297,1,0,0,0,299,300,1,0,0,0,300,303,1,0,0,0, - 301,299,1,0,0,0,302,304,5,16,0,0,303,302,1,0,0,0,303,304,1,0,0,0,304,306, - 1,0,0,0,305,294,1,0,0,0,305,306,1,0,0,0,306,307,1,0,0,0,307,308,5,17,0, - 0,308,63,1,0,0,0,309,310,6,32,-1,0,310,311,5,15,0,0,311,312,3,64,32,0,312, - 313,5,17,0,0,313,359,1,0,0,0,314,315,3,74,37,0,315,316,5,15,0,0,316,318, - 3,64,32,0,317,319,5,16,0,0,318,317,1,0,0,0,318,319,1,0,0,0,319,320,1,0, - 0,0,320,321,5,17,0,0,321,359,1,0,0,0,322,359,3,60,30,0,323,324,5,29,0,0, - 324,325,5,78,0,0,325,359,3,62,31,0,326,327,5,32,0,0,327,328,5,30,0,0,328, - 329,3,64,32,0,329,330,5,31,0,0,330,331,7,3,0,0,331,359,1,0,0,0,332,333, - 5,38,0,0,333,334,5,30,0,0,334,335,3,64,32,0,335,336,5,31,0,0,336,337,7, - 4,0,0,337,359,1,0,0,0,338,339,7,5,0,0,339,359,3,64,32,15,340,352,5,30,0, - 0,341,346,3,64,32,0,342,343,5,16,0,0,343,345,3,64,32,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,16,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,359,5,31,0,0,355, - 359,5,77,0,0,356,359,5,78,0,0,357,359,3,68,34,0,358,309,1,0,0,0,358,314, - 1,0,0,0,358,322,1,0,0,0,358,323,1,0,0,0,358,326,1,0,0,0,358,332,1,0,0,0, - 358,338,1,0,0,0,358,340,1,0,0,0,358,355,1,0,0,0,358,356,1,0,0,0,358,357, - 1,0,0,0,359,412,1,0,0,0,360,361,10,14,0,0,361,362,7,6,0,0,362,411,3,64, - 32,15,363,364,10,13,0,0,364,365,7,7,0,0,365,411,3,64,32,14,366,367,10,12, - 0,0,367,368,7,8,0,0,368,411,3,64,32,13,369,370,10,11,0,0,370,371,7,9,0, - 0,371,411,3,64,32,12,372,373,10,10,0,0,373,374,7,10,0,0,374,411,3,64,32, - 11,375,376,10,9,0,0,376,377,5,57,0,0,377,411,3,64,32,10,378,379,10,8,0, - 0,379,380,5,4,0,0,380,411,3,64,32,9,381,382,10,7,0,0,382,383,5,58,0,0,383, - 411,3,64,32,8,384,385,10,6,0,0,385,386,5,59,0,0,386,411,3,64,32,7,387,388, - 10,5,0,0,388,389,5,60,0,0,389,411,3,64,32,6,390,391,10,21,0,0,391,392,5, - 30,0,0,392,393,5,65,0,0,393,411,5,31,0,0,394,395,10,18,0,0,395,411,7,11, - 0,0,396,397,10,17,0,0,397,398,5,45,0,0,398,399,5,15,0,0,399,400,3,64,32, - 0,400,401,5,17,0,0,401,411,1,0,0,0,402,403,10,16,0,0,403,404,5,46,0,0,404, - 405,5,15,0,0,405,406,3,64,32,0,406,407,5,16,0,0,407,408,3,64,32,0,408,409, - 5,17,0,0,409,411,1,0,0,0,410,360,1,0,0,0,410,363,1,0,0,0,410,366,1,0,0, - 0,410,369,1,0,0,0,410,372,1,0,0,0,410,375,1,0,0,0,410,378,1,0,0,0,410,381, - 1,0,0,0,410,384,1,0,0,0,410,387,1,0,0,0,410,390,1,0,0,0,410,394,1,0,0,0, - 410,396,1,0,0,0,410,402,1,0,0,0,411,414,1,0,0,0,412,410,1,0,0,0,412,413, - 1,0,0,0,413,65,1,0,0,0,414,412,1,0,0,0,415,416,5,61,0,0,416,67,1,0,0,0, - 417,423,5,63,0,0,418,423,3,70,35,0,419,423,5,72,0,0,420,423,5,73,0,0,421, - 423,5,74,0,0,422,417,1,0,0,0,422,418,1,0,0,0,422,419,1,0,0,0,422,420,1, - 0,0,0,422,421,1,0,0,0,423,69,1,0,0,0,424,426,5,65,0,0,425,427,5,64,0,0, - 426,425,1,0,0,0,426,427,1,0,0,0,427,71,1,0,0,0,428,429,7,12,0,0,429,73, - 1,0,0,0,430,431,7,13,0,0,431,75,1,0,0,0,36,79,94,97,110,124,135,139,141, - 152,157,163,171,175,181,201,210,219,233,238,266,272,280,284,286,299,303, - 305,318,346,350,352,358,410,412,422,426]; + 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,1, + 0,5,0,80,8,0,10,0,12,0,83,9,0,1,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,97,8,3,1,4,3,4,100,8,4,1,4,1,4,1,5,1,5,1,6,1,6,1,6,1,6,1,6,5, + 6,111,8,6,10,6,12,6,114,9,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,5,7, + 126,8,7,10,7,12,7,129,9,7,1,7,1,7,3,7,133,8,7,1,7,1,7,1,8,1,8,5,8,139,8, + 8,10,8,12,8,142,9,8,1,8,1,8,1,9,1,9,1,9,1,9,5,9,150,8,9,10,9,12,9,153,9, + 9,1,9,3,9,156,8,9,3,9,158,8,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,5,11,167, + 8,11,10,11,12,11,170,9,11,1,11,1,11,3,11,174,8,11,1,12,1,12,1,12,1,12,3, + 12,180,8,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,3,13,189,8,13,1,14,1,14, + 1,14,1,14,5,14,195,8,14,10,14,12,14,198,9,14,1,15,1,15,3,15,202,8,15,1, + 16,1,16,5,16,206,8,16,10,16,12,16,209,9,16,1,16,1,16,1,16,1,16,1,17,1,17, + 1,17,1,17,1,17,1,17,4,17,221,8,17,11,17,12,17,222,1,17,1,17,1,17,1,17,1, + 17,1,17,1,17,1,17,1,17,1,17,4,17,235,8,17,11,17,12,17,236,1,17,1,17,1,17, + 1,17,3,17,243,8,17,1,18,1,18,1,18,1,18,1,18,3,18,250,8,18,1,19,1,19,1,19, + 1,19,1,19,1,19,1,19,3,19,259,8,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,3, + 20,268,8,20,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22, + 3,22,282,8,22,1,23,1,23,1,23,3,23,287,8,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,26,1,26,1,26,1,26,1,26,1,26,1, + 26,1,26,1,26,1,26,1,27,1,27,3,27,315,8,27,1,28,1,28,1,29,1,29,3,29,321, + 8,29,1,30,1,30,1,30,1,30,5,30,327,8,30,10,30,12,30,330,9,30,1,30,3,30,333, + 8,30,3,30,335,8,30,1,30,1,30,1,31,1,31,1,31,1,32,1,32,1,32,1,32,5,32,346, + 8,32,10,32,12,32,349,9,32,1,32,3,32,352,8,32,3,32,354,8,32,1,32,1,32,1, + 33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,3,33,367,8,33,1,33,1,33,1,33, + 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1, + 33,1,33,1,33,1,33,1,33,1,33,1,33,5,33,393,8,33,10,33,12,33,396,9,33,1,33, + 3,33,399,8,33,3,33,401,8,33,1,33,1,33,1,33,1,33,3,33,407,8,33,1,33,1,33, + 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1, + 33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33, + 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1, + 33,1,33,1,33,1,33,1,33,5,33,459,8,33,10,33,12,33,462,9,33,1,34,1,34,1,35, + 1,35,1,35,1,35,1,35,3,35,471,8,35,1,36,1,36,3,36,475,8,36,1,37,1,37,1,38, + 1,38,1,38,0,1,66,39,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,0,14,1,0,4, + 10,2,0,10,10,20,21,1,0,22,23,1,0,35,39,2,0,35,39,41,44,2,0,5,5,49,50,1, + 0,51,53,2,0,50,50,54,54,1,0,55,56,1,0,6,9,1,0,57,58,1,0,45,46,1,0,70,72, + 2,0,70,71,78,78,513,0,81,1,0,0,0,2,87,1,0,0,0,4,92,1,0,0,0,6,94,1,0,0,0, + 8,99,1,0,0,0,10,103,1,0,0,0,12,105,1,0,0,0,14,117,1,0,0,0,16,136,1,0,0, + 0,18,145,1,0,0,0,20,161,1,0,0,0,22,173,1,0,0,0,24,179,1,0,0,0,26,188,1, + 0,0,0,28,190,1,0,0,0,30,201,1,0,0,0,32,203,1,0,0,0,34,242,1,0,0,0,36,249, + 1,0,0,0,38,251,1,0,0,0,40,262,1,0,0,0,42,271,1,0,0,0,44,274,1,0,0,0,46, + 286,1,0,0,0,48,288,1,0,0,0,50,296,1,0,0,0,52,302,1,0,0,0,54,314,1,0,0,0, + 56,316,1,0,0,0,58,320,1,0,0,0,60,322,1,0,0,0,62,338,1,0,0,0,64,341,1,0, + 0,0,66,406,1,0,0,0,68,463,1,0,0,0,70,470,1,0,0,0,72,472,1,0,0,0,74,476, + 1,0,0,0,76,478,1,0,0,0,78,80,3,2,1,0,79,78,1,0,0,0,80,83,1,0,0,0,81,79, + 1,0,0,0,81,82,1,0,0,0,82,84,1,0,0,0,83,81,1,0,0,0,84,85,3,12,6,0,85,86, + 5,0,0,1,86,1,1,0,0,0,87,88,5,1,0,0,88,89,3,4,2,0,89,90,3,6,3,0,90,91,5, + 2,0,0,91,3,1,0,0,0,92,93,5,3,0,0,93,5,1,0,0,0,94,96,3,8,4,0,95,97,3,8,4, + 0,96,95,1,0,0,0,96,97,1,0,0,0,97,7,1,0,0,0,98,100,3,10,5,0,99,98,1,0,0, + 0,99,100,1,0,0,0,100,101,1,0,0,0,101,102,5,64,0,0,102,9,1,0,0,0,103,104, + 7,0,0,0,104,11,1,0,0,0,105,106,5,11,0,0,106,107,5,80,0,0,107,108,3,18,9, + 0,108,112,5,12,0,0,109,111,3,14,7,0,110,109,1,0,0,0,111,114,1,0,0,0,112, + 110,1,0,0,0,112,113,1,0,0,0,113,115,1,0,0,0,114,112,1,0,0,0,115,116,5,13, + 0,0,116,13,1,0,0,0,117,118,5,14,0,0,118,119,5,80,0,0,119,132,3,18,9,0,120, + 121,5,15,0,0,121,122,5,16,0,0,122,127,3,74,37,0,123,124,5,17,0,0,124,126, + 3,74,37,0,125,123,1,0,0,0,126,129,1,0,0,0,127,125,1,0,0,0,127,128,1,0,0, + 0,128,130,1,0,0,0,129,127,1,0,0,0,130,131,5,18,0,0,131,133,1,0,0,0,132, + 120,1,0,0,0,132,133,1,0,0,0,133,134,1,0,0,0,134,135,3,16,8,0,135,15,1,0, + 0,0,136,140,5,12,0,0,137,139,3,24,12,0,138,137,1,0,0,0,139,142,1,0,0,0, + 140,138,1,0,0,0,140,141,1,0,0,0,141,143,1,0,0,0,142,140,1,0,0,0,143,144, + 5,13,0,0,144,17,1,0,0,0,145,157,5,16,0,0,146,151,3,20,10,0,147,148,5,17, + 0,0,148,150,3,20,10,0,149,147,1,0,0,0,150,153,1,0,0,0,151,149,1,0,0,0,151, + 152,1,0,0,0,152,155,1,0,0,0,153,151,1,0,0,0,154,156,5,17,0,0,155,154,1, + 0,0,0,155,156,1,0,0,0,156,158,1,0,0,0,157,146,1,0,0,0,157,158,1,0,0,0,158, + 159,1,0,0,0,159,160,5,18,0,0,160,19,1,0,0,0,161,162,3,74,37,0,162,163,5, + 80,0,0,163,21,1,0,0,0,164,168,5,12,0,0,165,167,3,24,12,0,166,165,1,0,0, + 0,167,170,1,0,0,0,168,166,1,0,0,0,168,169,1,0,0,0,169,171,1,0,0,0,170,168, + 1,0,0,0,171,174,5,13,0,0,172,174,3,24,12,0,173,164,1,0,0,0,173,172,1,0, + 0,0,174,23,1,0,0,0,175,180,3,30,15,0,176,177,3,26,13,0,177,178,5,2,0,0, + 178,180,1,0,0,0,179,175,1,0,0,0,179,176,1,0,0,0,180,25,1,0,0,0,181,189, + 3,32,16,0,182,189,3,34,17,0,183,189,3,36,18,0,184,189,3,38,19,0,185,189, + 3,40,20,0,186,189,3,42,21,0,187,189,3,28,14,0,188,181,1,0,0,0,188,182,1, + 0,0,0,188,183,1,0,0,0,188,184,1,0,0,0,188,185,1,0,0,0,188,186,1,0,0,0,188, + 187,1,0,0,0,189,27,1,0,0,0,190,191,5,19,0,0,191,196,3,66,33,0,192,193,5, + 17,0,0,193,195,3,66,33,0,194,192,1,0,0,0,195,198,1,0,0,0,196,194,1,0,0, + 0,196,197,1,0,0,0,197,29,1,0,0,0,198,196,1,0,0,0,199,202,3,44,22,0,200, + 202,3,46,23,0,201,199,1,0,0,0,201,200,1,0,0,0,202,31,1,0,0,0,203,207,3, + 74,37,0,204,206,3,68,34,0,205,204,1,0,0,0,206,209,1,0,0,0,207,205,1,0,0, + 0,207,208,1,0,0,0,208,210,1,0,0,0,209,207,1,0,0,0,210,211,5,80,0,0,211, + 212,5,10,0,0,212,213,3,66,33,0,213,33,1,0,0,0,214,215,3,74,37,0,215,220, + 5,80,0,0,216,217,5,17,0,0,217,218,3,74,37,0,218,219,5,80,0,0,219,221,1, + 0,0,0,220,216,1,0,0,0,221,222,1,0,0,0,222,220,1,0,0,0,222,223,1,0,0,0,223, + 224,1,0,0,0,224,225,5,10,0,0,225,226,3,66,33,0,226,243,1,0,0,0,227,228, + 5,16,0,0,228,229,3,74,37,0,229,234,5,80,0,0,230,231,5,17,0,0,231,232,3, + 74,37,0,232,233,5,80,0,0,233,235,1,0,0,0,234,230,1,0,0,0,235,236,1,0,0, + 0,236,234,1,0,0,0,236,237,1,0,0,0,237,238,1,0,0,0,238,239,5,18,0,0,239, + 240,5,10,0,0,240,241,3,66,33,0,241,243,1,0,0,0,242,214,1,0,0,0,242,227, + 1,0,0,0,243,35,1,0,0,0,244,245,5,80,0,0,245,246,7,1,0,0,246,250,3,66,33, + 0,247,248,5,80,0,0,248,250,7,2,0,0,249,244,1,0,0,0,249,247,1,0,0,0,250, + 37,1,0,0,0,251,252,5,24,0,0,252,253,5,16,0,0,253,254,5,77,0,0,254,255,5, + 6,0,0,255,258,3,66,33,0,256,257,5,17,0,0,257,259,3,56,28,0,258,256,1,0, + 0,0,258,259,1,0,0,0,259,260,1,0,0,0,260,261,5,18,0,0,261,39,1,0,0,0,262, + 263,5,24,0,0,263,264,5,16,0,0,264,267,3,66,33,0,265,266,5,17,0,0,266,268, + 3,56,28,0,267,265,1,0,0,0,267,268,1,0,0,0,268,269,1,0,0,0,269,270,5,18, + 0,0,270,41,1,0,0,0,271,272,5,25,0,0,272,273,3,60,30,0,273,43,1,0,0,0,274, + 275,5,26,0,0,275,276,5,16,0,0,276,277,3,66,33,0,277,278,5,18,0,0,278,281, + 3,22,11,0,279,280,5,27,0,0,280,282,3,22,11,0,281,279,1,0,0,0,281,282,1, + 0,0,0,282,45,1,0,0,0,283,287,3,48,24,0,284,287,3,50,25,0,285,287,3,52,26, + 0,286,283,1,0,0,0,286,284,1,0,0,0,286,285,1,0,0,0,287,47,1,0,0,0,288,289, + 5,28,0,0,289,290,3,22,11,0,290,291,5,29,0,0,291,292,5,16,0,0,292,293,3, + 66,33,0,293,294,5,18,0,0,294,295,5,2,0,0,295,49,1,0,0,0,296,297,5,29,0, + 0,297,298,5,16,0,0,298,299,3,66,33,0,299,300,5,18,0,0,300,301,3,22,11,0, + 301,51,1,0,0,0,302,303,5,30,0,0,303,304,5,16,0,0,304,305,3,54,27,0,305, + 306,5,2,0,0,306,307,3,66,33,0,307,308,5,2,0,0,308,309,3,36,18,0,309,310, + 5,18,0,0,310,311,3,22,11,0,311,53,1,0,0,0,312,315,3,32,16,0,313,315,3,36, + 18,0,314,312,1,0,0,0,314,313,1,0,0,0,315,55,1,0,0,0,316,317,5,74,0,0,317, + 57,1,0,0,0,318,321,5,80,0,0,319,321,3,70,35,0,320,318,1,0,0,0,320,319,1, + 0,0,0,321,59,1,0,0,0,322,334,5,16,0,0,323,328,3,58,29,0,324,325,5,17,0, + 0,325,327,3,58,29,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,17,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,18,0,0,337,61,1,0,0,0,338,339,5,80,0,0,339,340,3, + 64,32,0,340,63,1,0,0,0,341,353,5,16,0,0,342,347,3,66,33,0,343,344,5,17, + 0,0,344,346,3,66,33,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,17,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,18,0,0,356,65,1,0,0,0,357,358,6,33,-1,0,358,359,5, + 16,0,0,359,360,3,66,33,0,360,361,5,18,0,0,361,407,1,0,0,0,362,363,3,76, + 38,0,363,364,5,16,0,0,364,366,3,66,33,0,365,367,5,17,0,0,366,365,1,0,0, + 0,366,367,1,0,0,0,367,368,1,0,0,0,368,369,5,18,0,0,369,407,1,0,0,0,370, + 407,3,62,31,0,371,372,5,31,0,0,372,373,5,80,0,0,373,407,3,64,32,0,374,375, + 5,34,0,0,375,376,5,32,0,0,376,377,3,66,33,0,377,378,5,33,0,0,378,379,7, + 3,0,0,379,407,1,0,0,0,380,381,5,40,0,0,381,382,5,32,0,0,382,383,3,66,33, + 0,383,384,5,33,0,0,384,385,7,4,0,0,385,407,1,0,0,0,386,387,7,5,0,0,387, + 407,3,66,33,15,388,400,5,32,0,0,389,394,3,66,33,0,390,391,5,17,0,0,391, + 393,3,66,33,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,17,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,33,0,0,403,407,5,79,0,0,404,407,5,80,0,0,405,407,3,70, + 35,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,66,33,15,411,412,10,13,0,0,412,413,7,7,0,0,413,459, + 3,66,33,14,414,415,10,12,0,0,415,416,7,8,0,0,416,459,3,66,33,13,417,418, + 10,11,0,0,418,419,7,9,0,0,419,459,3,66,33,12,420,421,10,10,0,0,421,422, + 7,10,0,0,422,459,3,66,33,11,423,424,10,9,0,0,424,425,5,59,0,0,425,459,3, + 66,33,10,426,427,10,8,0,0,427,428,5,4,0,0,428,459,3,66,33,9,429,430,10, + 7,0,0,430,431,5,60,0,0,431,459,3,66,33,8,432,433,10,6,0,0,433,434,5,61, + 0,0,434,459,3,66,33,7,435,436,10,5,0,0,436,437,5,62,0,0,437,459,3,66,33, + 6,438,439,10,21,0,0,439,440,5,32,0,0,440,441,5,67,0,0,441,459,5,33,0,0, + 442,443,10,18,0,0,443,459,7,11,0,0,444,445,10,17,0,0,445,446,5,47,0,0,446, + 447,5,16,0,0,447,448,3,66,33,0,448,449,5,18,0,0,449,459,1,0,0,0,450,451, + 10,16,0,0,451,452,5,48,0,0,452,453,5,16,0,0,453,454,3,66,33,0,454,455,5, + 17,0,0,455,456,3,66,33,0,456,457,5,18,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,67,1,0,0,0,462,460,1,0,0,0, + 463,464,5,63,0,0,464,69,1,0,0,0,465,471,5,65,0,0,466,471,3,72,36,0,467, + 471,5,74,0,0,468,471,5,75,0,0,469,471,5,76,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,71,1,0,0,0, + 472,474,5,67,0,0,473,475,5,66,0,0,474,473,1,0,0,0,474,475,1,0,0,0,475,73, + 1,0,0,0,476,477,7,12,0,0,477,75,1,0,0,0,478,479,7,13,0,0,479,77,1,0,0,0, + 42,81,96,99,112,127,132,140,151,155,157,168,173,179,188,196,201,207,222, + 236,242,249,258,267,281,286,314,320,328,332,334,347,351,353,366,394,398, + 400,406,458,460,470,474]; private static __ATN: ATN; public static get _ATN(): ATN { @@ -2748,6 +2917,12 @@ export class FunctionDefinitionContext extends ParserRuleContext { public functionBody(): FunctionBodyContext { return this.getTypedRuleContext(FunctionBodyContext, 0) as FunctionBodyContext; } + 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_functionDefinition; } @@ -2910,6 +3085,9 @@ export class NonControlStatementContext extends ParserRuleContext { public consoleStatement(): ConsoleStatementContext { return this.getTypedRuleContext(ConsoleStatementContext, 0) as ConsoleStatementContext; } + public returnStatement(): ReturnStatementContext { + return this.getTypedRuleContext(ReturnStatementContext, 0) as ReturnStatementContext; + } public get ruleIndex(): number { return CashScriptParser.RULE_nonControlStatement; } @@ -2924,6 +3102,31 @@ export class NonControlStatementContext extends ParserRuleContext { } +export class ReturnStatementContext extends ParserRuleContext { + constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number) { + super(parent, invokingState); + this.parser = parser; + } + 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; + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitReturnStatement) { + return visitor.visitReturnStatement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + export class ControlStatementContext extends ParserRuleContext { constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number) { super(parent, invokingState); @@ -3412,7 +3615,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 ffb8f081..a2f0e832 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'; @@ -17,6 +17,7 @@ import { ParameterContext } from "./CashScriptParser.js"; import { BlockContext } from "./CashScriptParser.js"; import { StatementContext } from "./CashScriptParser.js"; import { NonControlStatementContext } from "./CashScriptParser.js"; +import { ReturnStatementContext } from "./CashScriptParser.js"; import { ControlStatementContext } from "./CashScriptParser.js"; import { VariableDefinitionContext } from "./CashScriptParser.js"; import { TupleAssignmentContext } from "./CashScriptParser.js"; @@ -147,6 +148,12 @@ export default class CashScriptVisitor extends ParseTreeVisitor * @return the visitor result */ visitNonControlStatement?: (ctx: NonControlStatementContext) => Result; + /** + * Visit a parse tree produced by `CashScriptParser.returnStatement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitReturnStatement?: (ctx: ReturnStatementContext) => Result; /** * Visit a parse tree produced by `CashScriptParser.controlStatement`. * @param ctx the parse tree diff --git a/packages/cashc/src/print/OutputSourceCodeTraversal.ts b/packages/cashc/src/print/OutputSourceCodeTraversal.ts index 70f62db2..d56f2772 100644 --- a/packages/cashc/src/print/OutputSourceCodeTraversal.ts +++ b/packages/cashc/src/print/OutputSourceCodeTraversal.ts @@ -22,6 +22,7 @@ import { ArrayNode, TupleIndexOpNode, RequireNode, + ReturnNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, @@ -80,6 +81,9 @@ export default class OutputSourceCodeTraversal extends AstTraversal { this.addOutput(`function ${node.name}(`, true); node.parameters = this.visitCommaList(node.parameters) as ParameterNode[]; this.addOutput(')'); + if (node.returnTypes !== undefined) { + this.addOutput(` returns (${node.returnTypes.join(', ')})`); + } this.outputSymbolTable(node.symbolTable); this.addOutput(' '); @@ -112,7 +116,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; @@ -147,6 +152,12 @@ export default class OutputSourceCodeTraversal extends AstTraversal { return node; } + visitReturn(node: ReturnNode): Node { + this.addOutput('return ', true); + node.expressions = this.visitCommaList(node.expressions); + return node; + } + visitConsoleStatement(node: ConsoleStatementNode): Node { this.addOutput('console.log(', true); node.parameters = this.visitCommaList(node.parameters) as ConsoleParameterNode[]; diff --git a/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts b/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts index 2974f16c..f0b33156 100644 --- a/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts +++ b/packages/cashc/src/semantic/EnsureFinalRequireTraversal.ts @@ -34,6 +34,12 @@ export default class EnsureFinalRequireTraversal extends AstTraversal { throw new EmptyFunctionError(node); } + // User-defined (value-returning) functions end in a `return` statement rather than a `require`, + // and are compiled to standalone OP_DEFINE routines, so the final-require rule does not apply. + if (node.isUserFunction) { + return node; + } + ensureFinalStatementIsRequire(node.body); return node; diff --git a/packages/cashc/src/semantic/InjectLocktimeGuardTraversal.ts b/packages/cashc/src/semantic/InjectLocktimeGuardTraversal.ts index 1aa0983f..86fea2b3 100644 --- a/packages/cashc/src/semantic/InjectLocktimeGuardTraversal.ts +++ b/packages/cashc/src/semantic/InjectLocktimeGuardTraversal.ts @@ -21,6 +21,12 @@ export default class InjectLocktimeGuardTraversal extends AstTraversal { private functionNeedsGuard = false; visitFunctionDefinition(node: FunctionDefinitionNode): Node { + // User-defined (value-returning) functions are compiled to standalone OP_DEFINE routines and + // never form a top-level spending path on their own, so they do not get a locktime guard. + if (node.isUserFunction) { + return node; + } + this.hasTimeCheckOnPath = false; this.functionNeedsGuard = false; diff --git a/packages/cashc/src/semantic/SymbolTableTraversal.ts b/packages/cashc/src/semantic/SymbolTableTraversal.ts index 8b980b49..8cdd719f 100644 --- a/packages/cashc/src/semantic/SymbolTableTraversal.ts +++ b/packages/cashc/src/semantic/SymbolTableTraversal.ts @@ -25,7 +25,9 @@ import { UnusedVariableError, InvalidSymbolTypeError, ConstantModificationError, + RecursiveFunctionError, } from '../Errors.js'; +import { PrimitiveType } from '@cashscript/utils'; export default class SymbolTableTraversal extends AstTraversal { private symbolTables: SymbolTable[] = [GLOBAL_SYMBOL_TABLE]; @@ -39,6 +41,26 @@ export default class SymbolTableTraversal extends AstTraversal { this.symbolTables.unshift(node.symbolTable); node.parameters = this.visitList(node.parameters) as ParameterNode[]; + + // Register user-defined (value-returning) functions in the contract scope *before* visiting any + // function body, so that calls can resolve regardless of declaration order and mutual calls work. + node.functions.forEach((func) => { + if (!func.isUserFunction) return; + if (this.symbolTables[0].getFromThis(func.name)) { + throw new FunctionRedefinitionError(func); + } + this.symbolTables[0].set(Symbol.function( + func.name, + func.returnTypes?.[0] ?? PrimitiveType.BOOL, + func.parameters.map((p) => p.type), + func, + func.returnTypes, + )); + }); + + // Detect recursion (direct or mutual) among user-defined functions before inlining. + detectRecursion(node.functions); + node.functions = this.visitList(node.functions) as FunctionDefinitionNode[]; const unusedSymbols = node.symbolTable.unusedSymbols(); @@ -62,8 +84,8 @@ export default class SymbolTableTraversal extends AstTraversal { visitFunctionDefinition(node: FunctionDefinitionNode): Node { this.currentFunction = node; - // Checked for function redefinition, but they are not included in the - // symbol table, as internal function calls are not supported. + // Check for function redefinition. User-defined functions are additionally registered in the + // contract symbol table (see visitContract) so that internal calls can resolve to them. if (this.functionNames.get(node.name)) { throw new FunctionRedefinitionError(node); } @@ -143,7 +165,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; @@ -208,9 +230,66 @@ export default class SymbolTableTraversal extends AstTraversal { function createTupleVariableDefinition( node: TupleAssignmentNode, - variable: TupleAssignmentNode['left'], + variable: TupleAssignmentNode['targets'][number], ): VariableDefinitionNode { const definition = new VariableDefinitionNode(variable.type, [], variable.name, node.tuple); definition.location = node.location; return definition; } + +// Builds the call graph among user-defined functions and throws RecursiveFunctionError if any +// cycle (direct or mutual recursion) is found. Inlining cannot terminate on recursive functions. +function detectRecursion(functions: FunctionDefinitionNode[]): void { + const userFunctions = functions.filter((f) => f.isUserFunction); + const userFunctionNames = new Set(userFunctions.map((f) => f.name)); + const functionByName = new Map(userFunctions.map((f) => [f.name, f])); + + // Map each user function to the set of user functions it calls. + const callGraph = new Map(); + userFunctions.forEach((func) => { + const calls = collectFunctionCallNames(func.body).filter((name) => userFunctionNames.has(name)); + callGraph.set(func.name, calls); + }); + + const visited = new Set(); + const stack: string[] = []; + const onStack = new Set(); + + const dfs = (name: string): void => { + stack.push(name); + onStack.add(name); + + for (const callee of callGraph.get(name) ?? []) { + if (onStack.has(callee)) { + const cycleStart = stack.indexOf(callee); + const cycle = [...stack.slice(cycleStart), callee]; + throw new RecursiveFunctionError(functionByName.get(callee)!, cycle); + } + if (!visited.has(callee)) dfs(callee); + } + + onStack.delete(name); + stack.pop(); + visited.add(name); + }; + + userFunctions.forEach((func) => { + if (!visited.has(func.name)) dfs(func.name); + }); +} + +// Recursively collects the names of all FunctionCall identifiers reachable from a node. +function collectFunctionCallNames(node: Node | undefined): string[] { + if (!node) return []; + + const names: string[] = []; + const collector = new (class extends AstTraversal { + visitFunctionCall(callNode: FunctionCallNode): Node { + names.push(callNode.identifier.name); + return super.visitFunctionCall(callNode); + } + })(); + + node.accept(collector); + return names; +} diff --git a/packages/cashc/src/semantic/TypeCheckTraversal.ts b/packages/cashc/src/semantic/TypeCheckTraversal.ts index 5e6742c9..767befb4 100644 --- a/packages/cashc/src/semantic/TypeCheckTraversal.ts +++ b/packages/cashc/src/semantic/TypeCheckTraversal.ts @@ -22,6 +22,7 @@ import { ArrayNode, TupleIndexOpNode, RequireNode, + ReturnNode, Node, InstantiationNode, TupleAssignmentNode, @@ -34,6 +35,8 @@ import { BlockNode, StatementNode, ExpressionNode, + FunctionDefinitionNode, + ParameterNode, } from '../ast/AST.js'; import AstTraversal from '../ast/AstTraversal.js'; import { @@ -47,6 +50,9 @@ import { IndexOutOfBoundsError, TupleAssignmentError, BitshiftBitcountNegativeError, + ReturnTypeError, + MissingReturnStatementError, + ReturnStatementError, } from '../Errors.js'; import { BinaryOperator, NullaryOperator, UnaryOperator } from '../ast/Operator.js'; import { GlobalFunction } from '../ast/Globals.js'; @@ -54,6 +60,67 @@ import { Symbol } from '../ast/SymbolTable.js'; import { resultingTypeForBinaryOp } from '../utils.js'; export default class TypeCheckTraversal extends AstTraversal { + // Declared return types of the user-defined function currently being type-checked (if any). + private currentReturnTypes?: Type[]; + // True while visiting the right-hand side of a tuple-destructuring assignment, where a + // multi-return function call is permitted (and validated against the destructuring targets). + private insideTupleAssignmentRhs = false; + + visitFunctionDefinition(node: FunctionDefinitionNode): Node { + this.currentReturnTypes = node.returnTypes; + node.parameters = this.visitList(node.parameters) as ParameterNode[]; + node.body = this.visit(node.body) as BlockNode; + this.currentReturnTypes = undefined; + + if (node.isUserFunction) { + // The OP_DEFINE/OP_INVOKE lowering requires a single `return` as the final statement of the + // body. Disallow missing, early, or nested returns so each call site lowers to a clean result + // assignment. + const statements = node.body.statements ?? []; + const finalStatement = statements[statements.length - 1]; + if (!(finalStatement instanceof ReturnNode)) { + throw new MissingReturnStatementError(node); + } + + const nestedReturns = countReturns(node.body) - 1; + if (nestedReturns > 0) { + throw new ReturnStatementError( + node, + `Function '${node.name}' may only contain a single return statement as its final statement`, + ); + } + } + + return node; + } + + visitReturn(node: ReturnNode): Node { + node.expressions = this.visitList(node.expressions); + + // `return` is only valid inside a user-defined (value-returning) function. + if (this.currentReturnTypes === undefined) { + throw new ReturnStatementError(node, 'return statement is only allowed in functions with a declared return type'); + } + + // The number of returned values must match the declared return type count. + if (node.expressions.length !== this.currentReturnTypes.length) { + throw new ReturnStatementError( + node, + `Function returns ${node.expressions.length} value(s) but ${this.currentReturnTypes.length} were declared`, + ); + } + + // Each returned expression must be assignable to the corresponding declared return type. + node.expressions.forEach((expression, i) => { + const expectedType = this.currentReturnTypes![i]; + if (!implicitlyCastable(expression.type, expectedType)) { + throw new ReturnTypeError(node, expression.type, expectedType); + } + }); + + return node; + } + visitVariableDefinition(node: VariableDefinitionNode): Node { node.expression = this.visit(node.expression); expectAssignable(node, node.expression.type, node.type); @@ -61,15 +128,50 @@ export default class TypeCheckTraversal extends AstTraversal { } visitTupleAssignment(node: TupleAssignmentNode): Node { + this.insideTupleAssignmentRhs = true; node.tuple = this.visit(node.tuple); + this.insideTupleAssignmentRhs = false; + + // A multi-return user-defined function call is the only N-ary tuple source. Its declared return + // types must match the destructuring targets one-to-one (count + types). + const callReturnTypes = userFunctionReturnTypes(node.tuple); + if (callReturnTypes !== undefined) { + if (callReturnTypes.length !== node.targets.length) { + throw new ReturnStatementError( + node.tuple, + `Function returns ${callReturnTypes.length} value(s) but ${node.targets.length} were destructured`, + ); + } + + node.targets.forEach((target, i) => { + if (!implicitlyCastable(callReturnTypes[i], target.type)) { + const syntheticAssignment = new VariableDefinitionNode(target.type, [], target.name, node.tuple); + syntheticAssignment.location = node.location; + throw new AssignTypeError(syntheticAssignment); + } + }); + + return node; + } + + // Otherwise the tuple must come from a built-in multi-value expression (e.g. `.split`), which + // always produces exactly two values. 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 (node.targets.length !== 2) { + throw new ReturnStatementError( + node.tuple, + `Expression returns 2 values but ${node.targets.length} were destructured`, + ); + } + + const [left, right] = node.targets; + const assignmentType = new TupleType(left.type, right.type); if (!implicitlyCastable(node.tuple.type, assignmentType)) { - const syntheticAssignment = new VariableDefinitionNode(assignmentType, [], node.left.name, node.tuple); + const syntheticAssignment = new VariableDefinitionNode(assignmentType, [], left.name, node.tuple); syntheticAssignment.location = node.location; throw new AssignTypeError(syntheticAssignment); } @@ -179,6 +281,11 @@ export default class TypeCheckTraversal extends AstTraversal { } visitFunctionCall(node: FunctionCallNode): Node { + // Whether this call is the direct RHS of a tuple destructuring. Consume the flag immediately so + // that nested argument calls are type-checked as ordinary (single-value) expressions. + const isTupleAssignmentRhs = this.insideTupleAssignmentRhs; + this.insideTupleAssignmentRhs = false; + node.identifier = this.visit(node.identifier) as IdentifierNode; node.parameters = this.visitList(node.parameters); @@ -199,6 +306,16 @@ export default class TypeCheckTraversal extends AstTraversal { node.type = type; + // A multi-return user-defined function does not produce a single value, so it is only valid as + // the right-hand side of a tuple destructuring assignment (handled in visitTupleAssignment). + // Using it anywhere a single value is expected is an error. + if (definition.returnTypes !== undefined && definition.returnTypes.length > 1 && !isTupleAssignmentRhs) { + throw new ReturnStatementError( + node, + `Function '${node.identifier.name}' returns ${definition.returnTypes.length} values and must be destructured into ${definition.returnTypes.length} variables`, + ); + } + // Infer the type of the toPaddedBytes function (depends on the second parameter) if (node.identifier.name === GlobalFunction.TO_PADDED_BYTES) { node.type = inferPaddedBytesType(node); @@ -624,3 +741,26 @@ function matchSizeLiteral(expr: BinaryOpNode): { sizeNode: UnaryOpNode, literalN const isSizeOp = (node: ExpressionNode): node is UnaryOpNode => ( node instanceof UnaryOpNode && node.operator === UnaryOperator.SIZE ); + +// If the expression is a call to a user-defined function (one with declared return types), returns +// that function's full ordered list of return types; otherwise returns undefined. This is the only +// source of an N-ary (N >= 2) tuple to destructure. +function userFunctionReturnTypes(node: ExpressionNode): Type[] | undefined { + if (!(node instanceof FunctionCallNode)) return undefined; + const { definition } = node.identifier; + return definition?.returnTypes; +} + +// Counts the number of `return` statements anywhere within a node (used to reject early/nested +// returns, which the lowering does not support). +function countReturns(node: Node): number { + let count = 0; + const counter = new (class extends AstTraversal { + visitReturn(returnNode: ReturnNode): Node { + count += 1; + return super.visitReturn(returnNode); + } + })(); + node.accept(counter); + return count; +} diff --git a/packages/cashc/test/ast/fixtures.ts b/packages/cashc/test/ast/fixtures.ts index 12cc323c..bff82def 100644 --- a/packages/cashc/test/ast/fixtures.ts +++ b/packages/cashc/test/ast/fixtures.ts @@ -359,8 +359,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/RecursiveFunctionError/direct_recursion.cash b/packages/cashc/test/compiler/RecursiveFunctionError/direct_recursion.cash new file mode 100644 index 00000000..2d5ad001 --- /dev/null +++ b/packages/cashc/test/compiler/RecursiveFunctionError/direct_recursion.cash @@ -0,0 +1,10 @@ +contract Test() { + function factorial(int n) returns (int) { + int result = factorial(n); + return result; + } + + function spend(int x) { + require(factorial(x) == 1); + } +} diff --git a/packages/cashc/test/compiler/RecursiveFunctionError/mutual_recursion.cash b/packages/cashc/test/compiler/RecursiveFunctionError/mutual_recursion.cash new file mode 100644 index 00000000..fce28510 --- /dev/null +++ b/packages/cashc/test/compiler/RecursiveFunctionError/mutual_recursion.cash @@ -0,0 +1,13 @@ +contract Test() { + function ping(int a) returns (int) { + return pong(a); + } + + function pong(int a) returns (int) { + return ping(a); + } + + function spend(int x) { + require(ping(x) == 1); + } +} diff --git a/packages/cashc/test/compiler/ReturnTypeError/wrong_return_type.cash b/packages/cashc/test/compiler/ReturnTypeError/wrong_return_type.cash new file mode 100644 index 00000000..f71142cb --- /dev/null +++ b/packages/cashc/test/compiler/ReturnTypeError/wrong_return_type.cash @@ -0,0 +1,9 @@ +contract Test() { + function toBytes(int a) returns (bytes) { + return a; + } + + function spend(int x) { + require(toBytes(x) == 0x00); + } +} diff --git a/packages/cashc/test/compiler/user-functions.test.ts b/packages/cashc/test/compiler/user-functions.test.ts new file mode 100644 index 00000000..205e7c87 --- /dev/null +++ b/packages/cashc/test/compiler/user-functions.test.ts @@ -0,0 +1,462 @@ +/* user-functions.test.ts + * + * Tests user-defined (value-returning) functions, which are lowered to the CHIP-2025-05 function + * opcodes OP_DEFINE (0x89) / OP_INVOKE (0x8a) rather than inlined. Each function body is compiled + * ONCE as a standalone stack-based routine, stored in the VM function table via OP_DEFINE, and + * every call site emits OP_INVOKE. This shares the body bytecode across all call sites (a size win + * over inlining) and is verified to execute correctly on libauth's real BCH 2026 VM. + */ + +import { + createTestAuthenticationProgramBch, + createVirtualMachineBch2026, +} from '@bitauth/libauth'; +import { asmToScript, encodeInt, scriptToBytecode } from '@cashscript/utils'; +import { compileString } from '../../src/index.js'; +import { + RecursiveFunctionError, + ReturnTypeError, + MissingReturnStatementError, + ReturnStatementError, +} from '../../src/Errors.js'; + +const vm = createVirtualMachineBch2026(false); + +// Compile a contract and execute its (single-spending-function) artifact on the real BCH 2026 VM +// against the provided unlocking-script items. Returns whether the spend is strictly accepted. +function evaluateSpend(source: string, unlockingItems: Uint8Array[]): { accepted: boolean, error?: string } { + const artifact = compileString(source); + const lockingBytecode = scriptToBytecode(asmToScript(artifact.bytecode)); + const unlockingBytecode = scriptToBytecode(unlockingItems); + const program = createTestAuthenticationProgramBch({ lockingBytecode, unlockingBytecode, valueSatoshis: 1000n }); + const state = vm.evaluate(program); + const top = state.stack[state.stack.length - 1]; + const accepted = state.error === undefined + && state.stack.length === 1 + && top !== undefined + && top.length === 1 + && top[0] === 1; + return { accepted, error: state.error }; +} + +const byteSize = (asm: string): number => scriptToBytecode(asmToScript(asm)).byteLength; + +describe('User-defined functions (OP_DEFINE / OP_INVOKE)', () => { + describe('Code generation emits the function opcodes', () => { + it('emits OP_DEFINE once and OP_INVOKE per call site', () => { + const artifact = compileString(` + contract Test() { + function square(int a) returns (int) { return a * a; } + function spend(int x) { + int y = square(x) + square(x); + require(y == 18); + } + }`); + + const opcodes = artifact.bytecode.split(' '); + expect(opcodes.filter((op) => op === 'OP_DEFINE')).toHaveLength(1); + expect(opcodes.filter((op) => op === 'OP_INVOKE')).toHaveLength(2); + }); + + it('emits one OP_DEFINE per declared user function', () => { + const artifact = compileString(` + contract Test() { + function increment(int a) returns (int) { return a + 1; } + function quadruple(int a) returns (int) { return a * 4; } + function spend(int x) { + int y = quadruple(increment(x)); + require(y == 8); + } + }`); + + const opcodes = artifact.bytecode.split(' '); + expect(opcodes.filter((op) => op === 'OP_DEFINE')).toHaveLength(2); + expect(opcodes.filter((op) => op === 'OP_INVOKE')).toHaveLength(2); + }); + }); + + describe('Size win over inlining', () => { + // For a function called N >= 3 times, sharing the body via OP_DEFINE/OP_INVOKE produces smaller + // bytecode than the equivalent fully-inlined contract (the previous inlining behaviour). + it('is smaller than the hand-inlined equivalent for a function called 4 times', () => { + const withFunction = ` + contract Test() { + function poly(int a) returns (int) { + int t = a * a + a; + return t * 2 + 7; + } + function spend(int x) { + int y = poly(x) + poly(x) + poly(x) + poly(x); + require(y == 76); + } + }`; + + // Mirrors the previous inlining lowering: bind each argument, inline the body, assign the + // result, for every call site. + const handInlined = ` + contract Test() { + function spend(int x) { + int a1 = x; int t1 = a1 * a1 + a1; int r1 = t1 * 2 + 7; + int a2 = x; int t2 = a2 * a2 + a2; int r2 = t2 * 2 + 7; + int a3 = x; int t3 = a3 * a3 + a3; int r3 = t3 * 2 + 7; + int a4 = x; int t4 = a4 * a4 + a4; int r4 = t4 * 2 + 7; + int y = r1 + r2 + r3 + r4; + require(y == 76); + } + }`; + + const functionSize = byteSize(compileString(withFunction).bytecode); + const inlinedSize = byteSize(compileString(handInlined).bytecode); + + expect(functionSize).toBeLessThan(inlinedSize); + }); + }); + + describe('Execution on the real BCH 2026 VM', () => { + it('a function called twice evaluates correctly', () => { + const source = ` + contract Test() { + function square(int a) returns (int) { return a * a; } + function spend(int x) { + int y = square(x) + square(x); + require(y == 18); + } + }`; + // 2 * x^2 == 18 -> x == 3 + expect(evaluateSpend(source, [encodeInt(3n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(4n)]).accepted).toBe(false); + }); + + it('a function called four times evaluates correctly (size-win contract)', () => { + const source = ` + contract Test() { + function poly(int a) returns (int) { int t = a * a + a; return t * 2 + 7; } + function spend(int x) { + int y = poly(x) + poly(x) + poly(x) + poly(x); + require(y == 76); + } + }`; + // poly(2) = 2*(4+2)+7 = 19, 4 * 19 = 76 + expect(evaluateSpend(source, [encodeInt(2n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(5n)]).accepted).toBe(false); + }); + + it('nested calls evaluate correctly', () => { + const source = ` + contract Test() { + function increment(int a) returns (int) { return a + 1; } + function quadruple(int a) returns (int) { return a * 4; } + function spend(int x) { + int y = quadruple(increment(x)); + require(y == 8); + } + }`; + // (x + 1) * 4 == 8 -> x == 1 + expect(evaluateSpend(source, [encodeInt(1n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(2n)]).accepted).toBe(false); + }); + + it('a two-argument function preserves argument order', () => { + const source = ` + contract Test() { + function addThem(int a, int b) returns (int) { return a + b * 2; } + function spend(int x) { require(addThem(x, 3) == 10); } + }`; + // x + 3 * 2 == 10 -> x == 4 + expect(evaluateSpend(source, [encodeInt(4n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(5n)]).accepted).toBe(false); + }); + + it('a call inside an if-statement evaluates correctly', () => { + const source = ` + contract Test() { + function increment(int a) returns (int) { return a + 1; } + function spend(int x) { + if (x > 0) { int y = increment(x); require(y == 6); } + require(x >= 0); + } + }`; + // x > 0 and x + 1 == 6 -> x == 5 + expect(evaluateSpend(source, [encodeInt(5n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(4n)]).accepted).toBe(false); + }); + + it('a call inside a loop body evaluates correctly', () => { + const source = ` + contract Test() { + function increment(int a) returns (int) { return a + 1; } + function spend(int x) { + int sum = x; + for (int i = 0; i < 3; i = i + 1) { sum = sum + increment(i); } + require(sum == x + 6); + } + }`; + // increment(0)+increment(1)+increment(2) = 1+2+3 = 6, so sum == x + 6 always + expect(evaluateSpend(source, [encodeInt(10n)]).accepted).toBe(true); + }); + + it('OP_DEFINE/OP_INVOKE coexist with the multi-spending-function selector', () => { + const source = ` + contract Test() { + function dbl(int a) returns (int) { return a * 2; } + function first(int x) { require(dbl(x) == 4); } + function second(int x) { require(dbl(x) == 6); } + }`; + // selector 1 -> second: dbl(3) == 6. Unlocking items: + expect(evaluateSpend(source, [encodeInt(3n), encodeInt(1n)]).accepted).toBe(true); + // selector 0 -> first: dbl(2) == 4 + expect(evaluateSpend(source, [encodeInt(2n), encodeInt(0n)]).accepted).toBe(true); + // selector 1 -> second with wrong arg + expect(evaluateSpend(source, [encodeInt(2n), encodeInt(1n)]).accepted).toBe(false); + }); + }); + + describe('ABI excludes user-defined functions', () => { + it('only exposes contract spending functions in the ABI', () => { + const artifact = compileString(` + contract Test() { + function double(int a) returns (int) { return a * 2; } + function spend(int x) { + require(double(x) == 4); + } + }`); + + expect(artifact.abi).toHaveLength(1); + expect(artifact.abi[0].name).toEqual('spend'); + }); + }); + + describe('Multi-value (tuple) returns', () => { + it('emits OP_DEFINE/OP_INVOKE for a multi-return function', () => { + const artifact = compileString(` + contract Test() { + function tri(int x, int y, int z) returns (int, int, int) { + int nx = x * 2; int ny = y * 3; int nz = z + 1; + return nx, ny, nz; + } + function spend(int a) { + (int ax, int ay, int az) = tri(a, a, a); + require(ax == a * 2); + require(ay == a * 3); + require(az == a + 1); + } + }`); + const opcodes = artifact.bytecode.split(' '); + expect(opcodes.filter((op) => op === 'OP_DEFINE')).toHaveLength(1); + expect(opcodes.filter((op) => op === 'OP_INVOKE')).toHaveLength(1); + }); + + it('a 3-return (Jacobian-double-like) function evaluates correctly on the BCH 2026 VM', () => { + // nx = x*2, ny = y*3, nz = z+1 — exercises a 3-coordinate (curve-point-like) return. + const source = ` + contract Test() { + function jacDouble(int x, int y, int z) returns (int, int, int) { + int nx = x * 2; int ny = y * 3; int nz = z + 1; + return nx, ny, nz; + } + function spend(int a) { + (int ax, int ay, int az) = jacDouble(a, a, a); + require(ax == a * 2); + require(ay == a * 3); + require(az == a + 1); + } + }`; + expect(evaluateSpend(source, [encodeInt(5n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(0n)]).accepted).toBe(true); + // Tamper: a contract that asserts wrong results must fail. + const wrong = ` + contract Test() { + function jacDouble(int x, int y, int z) returns (int, int, int) { + int nx = x * 2; int ny = y * 3; int nz = z + 1; + return nx, ny, nz; + } + function spend(int a) { + (int ax, int ay, int az) = jacDouble(a, a, a); + require(ax == a); + require(ay == a * 3); + require(az == a + 1); + } + }`; + expect(evaluateSpend(wrong, [encodeInt(5n)]).accepted).toBe(false); + }); + + it('the bare (no-parentheses) destructuring form also works', () => { + const source = ` + contract Test() { + function tri(int x) returns (int, int, int) { return x, x + 1, x + 2; } + function spend(int a) { + int p, int q, int r = tri(a); + require(p == a); + require(q == a + 1); + require(r == a + 2); + } + }`; + expect(evaluateSpend(source, [encodeInt(9n)]).accepted).toBe(true); + }); + + it('a 2-return function evaluates correctly', () => { + // Concrete assertions on the destructured values so a wrong unlocking arg is rejected. + const source = ` + contract Test() { + function pair(int x, int y) returns (int, int) { return x + y, x - y; } + function spend(int a, int b) { + (int s, int d) = pair(a, b); + require(s == 10); + require(d == 4); + } + }`; + // a + b == 10 and a - b == 4 -> a == 7, b == 3. Unlocking items map to parameters in reverse + // (the last parameter's argument is pushed first), so [b, a] == [3, 7]. + expect(evaluateSpend(source, [encodeInt(3n), encodeInt(7n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(4n), encodeInt(7n)]).accepted).toBe(false); + }); + + it('a destructured result can feed another call', () => { + const source = ` + contract Test() { + function tri(int x) returns (int, int, int) { return x, x + 1, x + 2; } + function add(int a, int b) returns (int) { return a + b; } + function spend(int a) { + (int p, int q, int r) = tri(a); + require(add(p, q) == 2 * a + 1); + require(r == a + 2); + } + }`; + expect(evaluateSpend(source, [encodeInt(4n)]).accepted).toBe(true); + expect(evaluateSpend(source, [encodeInt(5n)]).accepted).toBe(true); + }); + + it('a multi-return function called twice (single OP_DEFINE) evaluates correctly', () => { + const source = ` + contract Test() { + function pair(int x) returns (int, int) { return x * 2, x * 3; } + function spend(int a) { + (int p1, int q1) = pair(a); + (int p2, int q2) = pair(a + 1); + require(p1 == a * 2); + require(q1 == a * 3); + require(p2 == (a + 1) * 2); + require(q2 == (a + 1) * 3); + } + }`; + const artifact = compileString(source); + const opcodes = artifact.bytecode.split(' '); + expect(opcodes.filter((op) => op === 'OP_DEFINE')).toHaveLength(1); + expect(opcodes.filter((op) => op === 'OP_INVOKE')).toHaveLength(2); + expect(evaluateSpend(source, [encodeInt(6n)]).accepted).toBe(true); + }); + + it('a 3-return function defined once + invoked is far smaller than the inlined equivalent', () => { + const withFunction = ` + contract Test() { + function tri(int x) returns (int, int, int) { + int nx = x * 2; int ny = x * 3 + 1; int nz = x + 7; + return nx, ny, nz; + } + function spend(int x) { + (int a1, int b1, int c1) = tri(x); + (int a2, int b2, int c2) = tri(a1); + (int a3, int b3, int c3) = tri(a2); + (int a4, int b4, int c4) = tri(a3); + require(a4 + b4 + c4 + b1 + b2 + b3 + c1 + c2 + c3 > 0); + } + }`; + const handInlined = ` + contract Test() { + function spend(int x) { + int a1 = x * 2; int b1 = x * 3 + 1; int c1 = x + 7; + int a2 = a1 * 2; int b2 = a1 * 3 + 1; int c2 = a1 + 7; + int a3 = a2 * 2; int b3 = a2 * 3 + 1; int c3 = a2 + 7; + int a4 = a3 * 2; int b4 = a3 * 3 + 1; int c4 = a3 + 7; + require(a4 + b4 + c4 + b1 + b2 + b3 + c1 + c2 + c3 > 0); + } + }`; + expect(byteSize(compileString(withFunction).bytecode)) + .toBeLessThan(byteSize(compileString(handInlined).bytecode)); + }); + + it('throws when the number of returned values is fewer than declared', () => { + expect(() => compileString(` + contract Test() { + function f(int x) returns (int, int, int) { return x, x; } + function spend(int a) { (int p, int q, int r) = f(a); require(p == 1); require(q == 1); require(r == 1); } + }`)).toThrow(ReturnStatementError); + }); + + it('throws when the number of returned values is more than declared', () => { + expect(() => compileString(` + contract Test() { + function f(int x) returns (int, int) { return x, x, x; } + function spend(int a) { (int p, int q) = f(a); require(p == 1); require(q == 1); } + }`)).toThrow(ReturnStatementError); + }); + + it('throws on destructuring-arity mismatch (too few targets)', () => { + expect(() => compileString(` + contract Test() { + function f(int x) returns (int, int, int) { return x, x, x; } + function spend(int a) { (int p, int q) = f(a); require(p == 1); require(q == 1); } + }`)).toThrow(ReturnStatementError); + }); + + it('throws when a multi-return function is used as a single value', () => { + expect(() => compileString(` + contract Test() { + function f(int x) returns (int, int) { return x, x; } + function spend(int a) { require(f(a) == 1); } + }`)).toThrow(ReturnStatementError); + }); + + it('throws ReturnTypeError when a returned value type mismatches its declared type', () => { + expect(() => compileString(` + contract Test() { + function f(int x) returns (int, bytes) { return x, x; } + function spend(int a) { (int p, bytes q) = f(a); require(p == 1); require(q == 0x00); } + }`)).toThrow(ReturnTypeError); + }); + }); + + describe('Errors', () => { + it('throws RecursiveFunctionError on direct recursion', () => { + // Recursion stays banned for now. OP_INVOKE technically permits bounded recursion within the + // 100-deep control-stack limit; supporting it is deferred. + expect(() => compileString(` + contract Test() { + function f(int a) returns (int) { int b = f(a); return b; } + function spend(int x) { require(f(x) == 1); } + }`)).toThrow(RecursiveFunctionError); + }); + + it('throws RecursiveFunctionError on mutual recursion', () => { + expect(() => compileString(` + contract Test() { + function f(int a) returns (int) { return g(a); } + function g(int a) returns (int) { return f(a); } + function spend(int x) { require(f(x) == 1); } + }`)).toThrow(RecursiveFunctionError); + }); + + it('throws ReturnTypeError when the return expression type mismatches', () => { + expect(() => compileString(` + contract Test() { + function f(int a) returns (bytes) { return a; } + function spend(int x) { require(f(x) == 0x00); } + }`)).toThrow(ReturnTypeError); + }); + + it('throws MissingReturnStatementError when a value-returning function does not return', () => { + expect(() => compileString(` + contract Test() { + function f(int a) returns (int) { int b = a + 1; require(b > 0); } + function spend(int x) { require(f(x) == 2); } + }`)).toThrow(MissingReturnStatementError); + }); + + it('throws ReturnStatementError when return is used outside a value-returning function', () => { + expect(() => compileString(` + contract Test() { + function spend(int x) { return x; } + }`)).toThrow(ReturnStatementError); + }); + }); +}); diff --git a/packages/cashc/test/valid-contract-files/user_function_called_twice.cash b/packages/cashc/test/valid-contract-files/user_function_called_twice.cash new file mode 100644 index 00000000..78ab5361 --- /dev/null +++ b/packages/cashc/test/valid-contract-files/user_function_called_twice.cash @@ -0,0 +1,10 @@ +contract Test() { + function square(int a) returns (int) { + return a * a; + } + + function spend(int x) { + int y = square(x) + square(x); + require(y == 18); + } +} diff --git a/packages/cashc/test/valid-contract-files/user_function_in_if.cash b/packages/cashc/test/valid-contract-files/user_function_in_if.cash new file mode 100644 index 00000000..a94a1986 --- /dev/null +++ b/packages/cashc/test/valid-contract-files/user_function_in_if.cash @@ -0,0 +1,14 @@ +contract Test() { + function increment(int a) returns (int) { + return a + 1; + } + + function spend(int x) { + if (x > 0) { + int y = increment(x); + require(y == 6); + } + + require(x >= 0); + } +} diff --git a/packages/cashc/test/valid-contract-files/user_function_in_loop.cash b/packages/cashc/test/valid-contract-files/user_function_in_loop.cash new file mode 100644 index 00000000..73004ffe --- /dev/null +++ b/packages/cashc/test/valid-contract-files/user_function_in_loop.cash @@ -0,0 +1,15 @@ +contract Test() { + function increment(int a) returns (int) { + return a + 1; + } + + function spend(int x) { + int sum = x; + + for (int i = 0; i < 3; i = i + 1) { + sum = sum + increment(i); + } + + require(sum == x + 6); + } +} diff --git a/packages/cashc/test/valid-contract-files/user_function_nested_calls.cash b/packages/cashc/test/valid-contract-files/user_function_nested_calls.cash new file mode 100644 index 00000000..6f7bcc3d --- /dev/null +++ b/packages/cashc/test/valid-contract-files/user_function_nested_calls.cash @@ -0,0 +1,14 @@ +contract Test() { + function increment(int a) returns (int) { + return a + 1; + } + + function quadruple(int a) returns (int) { + return a * 4; + } + + function spend(int x) { + int y = quadruple(increment(x)); + require(y == 8); + } +} diff --git a/packages/cashc/test/valid-contract-files/user_function_simple.cash b/packages/cashc/test/valid-contract-files/user_function_simple.cash new file mode 100644 index 00000000..58f09c1f --- /dev/null +++ b/packages/cashc/test/valid-contract-files/user_function_simple.cash @@ -0,0 +1,11 @@ +contract Test() { + function double(int a) returns (int) { + int doubled = a * 2; + return doubled + 1; + } + + function spend(int x) { + int y = double(x); + require(y == 7); + } +} diff --git a/vkx_jacadd.json b/vkx_jacadd.json new file mode 100644 index 00000000..23fb73af --- /dev/null +++ b/vkx_jacadd.json @@ -0,0 +1,36 @@ +{ + "contractName": "VkXJacAdd", + "constructorInputs": [ + { "name": "probe", "type": "int" } + ], + "abi": [ + { + "name": "spend", + "inputs": [ + { "name": "input1", "type": "int" } + ] + } + ], + "bytecode": "007a517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_1 OP_DEFINE 0079517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_2 OP_DEFINE 007a517a932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_3 OP_DEFINE 007a517a942047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_4 OP_DEFINE 2047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e64300079529451537a5379970065007902fe009f766b63537951798e5297519c635279527995557997537a757c6b7c6c685179527995557997527a757c00795193517a75686c916675517a777777 OP_5 OP_DEFINE ef493dfc801fb7a82cc12ae97f478224b8cdee518680a89d1809b0375570142a 38ec67ea197e17b67d71d49f778c617a8758920214df1d8eb3a83e247feef72d d1ce2f3d42034e4286ab34609f5761b955fde25a94d678832907768f3ac7b80e 11e2d7604a9a4454f43cc6a704de5b2579641ea2353f3a86a999442e09387505 b681394a13af2e941278d71d2ce51ee3317e799f23549bb11aa73c6ee35d8401 OP_0 OP_1 OP_0 OP_7 OP_ROLL OP_7 OP_ROLL OP_1 OP_0 OP_BEGIN OP_DUP fe00 OP_LESSTHAN OP_DUP OP_TOALTSTACK OP_IF OP_11 OP_PICK OP_OVER OP_RSHIFTNUM OP_2 OP_MOD OP_1 OP_NUMEQUAL OP_IF OP_4 OP_PICK OP_0 OP_NUMEQUAL OP_IF OP_3 OP_PICK OP_7 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2 OP_PICK OP_6 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER OP_5 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_ELSE OP_4 OP_PICK OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_INVOKE OP_DUP OP_9 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_7 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_6 OP_PICK OP_11 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_4 OP_PICK OP_10 OP_PICK OP_9 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_2OVER OP_NUMEQUAL OP_2 OP_PICK OP_2 OP_PICK OP_NUMEQUAL OP_BOOLAND OP_IF OP_12 OP_PICK OP_2 OP_INVOKE OP_12 OP_PICK OP_2 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_DUP OP_2OVER 12 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_3 OP_PICK OP_3 OP_1 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_1 OP_INVOKE OP_OVER OP_4 OP_INVOKE OP_4 OP_PICK OP_8 OP_1 OP_INVOKE OP_OVER OP_5 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE 12 OP_PICK 14 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK 16 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 15 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 14 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_DROP OP_ELSE OP_2OVER OP_4 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2 OP_INVOKE OP_2DUP OP_SWAP OP_1 OP_INVOKE OP_4 OP_PICK OP_4 OP_PICK OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2OVER OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_3 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_OVER OP_3 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE OP_6 OP_PICK OP_12 OP_PICK OP_14 OP_PICK 11 OP_PICK 15 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_1 OP_INVOKE OP_2 OP_PICK 15 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 14 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 13 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_ENDIF OP_OVER OP_0 OP_NUMNOTEQUAL OP_3 OP_PICK OP_0 OP_NUMNOTEQUAL OP_BOOLAND OP_IF OP_3 OP_PICK OP_2 OP_INVOKE OP_3 OP_PICK OP_2 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_DUP OP_2OVER OP_9 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_3 OP_PICK OP_3 OP_1 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_1 OP_INVOKE OP_OVER OP_4 OP_INVOKE OP_4 OP_PICK OP_8 OP_1 OP_INVOKE OP_OVER OP_5 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE OP_9 OP_PICK OP_11 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK OP_13 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER OP_12 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP OP_11 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_DROP OP_ENDIF OP_DUP OP_1ADD OP_NIP OP_ENDIF OP_FROMALTSTACK OP_NOT OP_UNTIL OP_DROP OP_3 OP_PICK OP_0 OP_NUMNOTEQUAL OP_IF OP_6 OP_PICK OP_2 OP_INVOKE OP_4 OP_PICK OP_2 OP_INVOKE OP_DUP OP_11 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_9 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_8 OP_PICK OP_13 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_4 OP_PICK OP_12 OP_PICK OP_11 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_2OVER OP_NUMEQUAL OP_2 OP_PICK OP_2 OP_PICK OP_NUMEQUAL OP_BOOLAND OP_IF OP_14 OP_PICK OP_2 OP_INVOKE OP_14 OP_PICK OP_2 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_DUP OP_2OVER 14 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_3 OP_PICK OP_3 OP_1 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_1 OP_INVOKE OP_OVER OP_4 OP_INVOKE OP_4 OP_PICK OP_8 OP_1 OP_INVOKE OP_OVER OP_5 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE 14 OP_PICK 16 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK 18 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 17 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 16 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_DROP OP_ELSE OP_2OVER OP_4 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2 OP_INVOKE OP_2DUP OP_SWAP OP_1 OP_INVOKE OP_4 OP_PICK OP_4 OP_PICK OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2OVER OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_3 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_OVER OP_3 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE OP_6 OP_PICK OP_12 OP_PICK OP_14 OP_PICK 13 OP_PICK 17 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_1 OP_INVOKE OP_2 OP_PICK 17 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 16 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 15 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_6 OP_ROLL OP_5 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_SWAP OP_OVER OP_1 OP_INVOKE OP_DUP OP_9 OP_PICK OP_1 OP_INVOKE OP_SWAP OP_9 OP_ROLL OP_1 OP_INVOKE OP_NUMEQUALVERIFY OP_7 OP_ROLL OP_1 OP_INVOKE OP_7 OP_ROLL OP_NUMEQUALVERIFY OP_2DROP OP_2DROP OP_2DROP OP_DROP OP_1", + "source": "pragma cashscript ^0.13.0;\ncontract VkXJacAdd(int probe) {\n function mulFp(int x, int y) returns (int) { return (x * y) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\n function sqrFp(int x) returns (int) { return (x * x) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\n function addFp(int x, int y) returns (int) { return (x + y) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\n function subFp(int x, int y) returns (int) { return (x - y + 21888242871839275222246405745257275088696311157297823662689037894645226208583) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\n function inverseFp(int x) returns (int) {\n int p = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\n int e = p - 2; int result = 1; int current = x % p;\n for (int i = 0; i < 254; i++) {\n if (((e >> i) % 2) == 1) { result = (result * current) % p; }\n current = (current * current) % p;\n }\n return result;\n }\n function spend(int input1) {\n int ic2X = 19033251874843656108471242320417533909414939332036131356573128480367742634479;\n int ic2Y = 20792135454608030201903199625673964159744755218442260092768620403349374102584;\n // hardcoded term-1 acc (Jacobian, Z != 1)\n int accX = 6658854766393081772996491483672685084577556313489922771895150113991592758993;\n int accY = 2468672094802929104226026488986983711667664315007804078500783463370694582801;\n int accZ = 686184655061461263619834153307432782664270110630155350259885499745283178934;\n int rX = 0; int rY = 1; int rZ = 0;\n int bX = ic2X; int bY = ic2Y; int bZ = 1;\n for (int i = 0; i < 254; i++) {\n if (((input1 >> i) % 2) == 1) {\n if (rZ == 0) { rX = bX; rY = bY; rZ = bZ; }\n else {\n int z1z1 = sqrFp(rZ); int z2z2 = sqrFp(bZ);\n int u1 = mulFp(rX, z2z2); int u2 = mulFp(bX, z1z1);\n int s1 = mulFp(mulFp(rY, bZ), z2z2); int s2 = mulFp(mulFp(bY, rZ), z1z1);\n if (u1 == u2 && s1 == s2) {\n int a = sqrFp(rX); int b = sqrFp(rY); int c = sqrFp(b);\n int d = mulFp(2, subFp(subFp(sqrFp(addFp(rX, b)), a), c));\n int e = mulFp(3, a); int f = sqrFp(e);\n int nx = subFp(f, mulFp(2, d));\n int ny = subFp(mulFp(e, subFp(d, nx)), mulFp(8, c));\n int nz = mulFp(2, mulFp(rY, rZ));\n rX = nx; rY = ny; rZ = nz;\n } else {\n int h = subFp(u2, u1); int i2 = sqrFp(mulFp(2, h)); int j = mulFp(h, i2);\n int rr = mulFp(2, subFp(s2, s1)); int v = mulFp(u1, i2);\n int nx = subFp(subFp(sqrFp(rr), j), mulFp(2, v));\n int ny = subFp(mulFp(rr, subFp(v, nx)), mulFp(2, mulFp(s1, j)));\n int nz = mulFp(subFp(subFp(sqrFp(addFp(rZ, bZ)), z1z1), z2z2), h);\n rX = nx; rY = ny; rZ = nz;\n }\n }\n }\n if (bZ != 0 && bY != 0) {\n int a = sqrFp(bX); int b = sqrFp(bY); int c = sqrFp(b);\n int d = mulFp(2, subFp(subFp(sqrFp(addFp(bX, b)), a), c));\n int e = mulFp(3, a); int f = sqrFp(e);\n int nx = subFp(f, mulFp(2, d));\n int ny = subFp(mulFp(e, subFp(d, nx)), mulFp(8, c));\n int nz = mulFp(2, mulFp(bY, bZ));\n bX = nx; bY = ny; bZ = nz;\n }\n }\n if (rZ != 0) {\n int z1z1 = sqrFp(accZ); int z2z2 = sqrFp(rZ);\n int u1 = mulFp(accX, z2z2); int u2 = mulFp(rX, z1z1);\n int s1 = mulFp(mulFp(accY, rZ), z2z2); int s2 = mulFp(mulFp(rY, accZ), z1z1);\n if (u1 == u2 && s1 == s2) {\n int a = sqrFp(accX); int b = sqrFp(accY); int c = sqrFp(b);\n int d = mulFp(2, subFp(subFp(sqrFp(addFp(accX, b)), a), c));\n int e = mulFp(3, a); int f = sqrFp(e);\n int nx = subFp(f, mulFp(2, d));\n int ny = subFp(mulFp(e, subFp(d, nx)), mulFp(8, c));\n int nz = mulFp(2, mulFp(accY, accZ));\n accX = nx; accY = ny; accZ = nz;\n } else {\n int h = subFp(u2, u1); int i2 = sqrFp(mulFp(2, h)); int j = mulFp(h, i2);\n int rr = mulFp(2, subFp(s2, s1)); int v = mulFp(u1, i2);\n int nx = subFp(subFp(sqrFp(rr), j), mulFp(2, v));\n int ny = subFp(mulFp(rr, subFp(v, nx)), mulFp(2, mulFp(s1, j)));\n int nz = mulFp(subFp(subFp(sqrFp(addFp(accZ, rZ)), z1z1), z2z2), h);\n accX = nx; accY = ny; accZ = nz;\n }\n }\n int zInv = inverseFp(accZ);\n int zInv2 = sqrFp(zInv); int zInv3 = mulFp(zInv2, zInv);\n require(mulFp(accY, zInv3) == mulFp(accY, zInv3));\n require(mulFp(accX, zInv2) == probe);\n }\n}\n", + "fingerprint": "4b426bf55b0b2eeae59a45bbf3501e800d75f503dd49f23dc79b00df3e14ace3", + "debug": { + "bytecode": "27007a517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430975189270079517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097528927007a517a932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097538949007a517a942047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e64309754894c6d2047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e64300079529451537a5379970065007902fe009f766b63537951798e5297519c635279527995557997537a757c6b7c6c685179527995557997527a757c00795193517a75686c916675517a777777558920ef493dfc801fb7a82cc12ae97f478224b8cdee518680a89d1809b0375570142a2038ec67ea197e17b67d71d49f778c617a8758920214df1d8eb3a83e247feef72d20d1ce2f3d42034e4286ab34609f5761b955fde25a94d678832907768f3ac7b80e2011e2d7604a9a4454f43cc6a704de5b2579641ea2353f3a86a999442e0938750520b681394a13af2e941278d71d2ce51ee3317e799f23549bb11aa73c6ee35d8401005100577a577a5100657602fe009f766b635b79788e5297519c635479009c635379577a757c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c5279567a757c6b7c6b7c6b7c6b7c6c6c6c6c78557a757c6b7c6b7c6b7c6c6c6c675479528a5279528a765979518a52795779518a527956795b79518a518a54795a795979518a518a709c527952799c9a635c79528a5c79528a76528a7670011279538a528a548a548a52518a537953518a76528a527952518a78548a547958518a785579548a5479518a548a011279011479518a52518a527901167a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801157a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601147a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d756770548a7652518a528a6e7c518a54795479548a52518a52795879518a7652518a70528a548a548a53795879518a52518a785379548a5479518a548a56795c795e79011179011579538a528a548a548a518a527901157a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801147a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601137a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d686d6d6d686878009e5379009e9a635379528a5379528a76528a76705979538a528a548a548a52518a537953518a76528a527952518a78548a547958518a785579548a5479518a548a59795b79518a52518a52795d7a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c785c7a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c765b7a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6d6d6d6d7568768b77686c9166755379009e635679528a5479528a765b79518a52795979518a527958795d79518a518a54795c795b79518a518a709c527952799c9a635e79528a5e79528a76528a7670011479538a528a548a548a52518a537953518a76528a527952518a78548a547958518a785579548a5479518a548a011479011679518a52518a527901187a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801177a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601167a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d756770548a7652518a528a6e7c518a54795479548a52518a52795879518a7652518a70528a548a548a53795879518a52518a785379548a5479518a548a56795c795e79011379011779538a528a548a548a518a527901177a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801167a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601157a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d686d6d6d68567a558a76528a7c78518a765979518a7c597a518a9d577a518a577a9d6d6d6d7551", + "sourceMap": "3:4:3:146;;::::1;4::4:139:0;;::::1;5::5:146:0;;::::1;6::6:226:0;;::::1;7::15:5:0;;::::1;17:19:17:96:0;18::18;20::20:95;21::21;22::22:94;23:17:23:18;:29::30;:41::42;24:17:24:21;;:32::36;;:47::48;25:21:25:22;:8:59:9;:24:25:25;:28::31;:24:::1;;;:38:59:9:0;26:18:26:24;;:28::29;:18:::1;:33::34:0;:17:::1;:39::40:0;:16:::1;:42:49:13:0;27:20:27:22;;:26::27;:20:::1;:29::59:0;:36::38;;:31::39:1;;;;;;;;;;;;;;;;;;;:45::47:0;;:40::48:1;;;;;;;;;;;;;;;;:54::56:0;:49::57:1;;;;;;;;;;;;;28:21:48:17:0;29:37:29:39;;:31::40;::::1;:59::61:0;;:53::62;::::1;30:39:30:43:0;:35::37;;:29::44;::::1;:65::69:0;;:61::63;;:55::70;::::1;31:50:31:54:0;;:45::47;;:41::43;;:35::48;::::1;:29::55:0;::::1;:87::91:0;;:82::84;;:78::80;;:72::85;::::1;:66::92:0;::::1;32:24:32:32:0;::::1;:36::38:0;;:42::44;;:36:::1;:24;:46:40:21:0;33:38:33:40;;:32::41;::::1;:57::59:0;;:51::60;::::1;:76::77:0;:70::78;::::1;34:78:34:79:0;:69::75;:65::67;;:59::71;::::1;:53::72:0;::::1;:47::76:0;::::1;:41::80:0;::::1;:38::39:0;:32::81;::::1;35:41:35:42:0;;:38::39;:32::43;::::1;:59::60:0;:53::61;::::1;36:51:36:52:0;;:48::49;:42::53;::::1;:39::40:0;:33::54;::::1;37:72:37:73:0;;:69::70;:63::74;::::1;:57::59:0;:54::55;;:48::60;::::1;:45::46:0;;:39::61;::::1;:33::75:0;::::1;38:52:38:54:0;;:48::50;;:42::55;::::1;:39::40:0;:33::56;::::1;39:29:39:31:0;;:24::32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:38::40:0;:33::41:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:47::49:0;:42::50:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32:46:40:21;;;;;40:27:47::0;41:38:41:44;:32::45;::::1;:71::72:0;:68::69;:62::73;::::1;:56::74:0;::::1;:90::95:0;;:84::96;::::1;42:52:42:54:0;;:48::50;;:42::55;::::1;:39::40:0;:33::56;::::1;:76::78:0;;:72::74;;:66::79;::::1;43:69:43:70:0;:66::67;:60::71;::::1;:51::57:0;:45::54;::::1;:39::58:0;::::1;:33::72:0;::::1;44:83:44:84:0;;:79::81;;:73::85;::::1;:70::71:0;:64::86;::::1;:58::60:0;:55::56;;:49::61;::::1;:45::47:0;;:39::62;::::1;:33::87:0;::::1;45:87:45:88:0;;:80::84;;:73::77;;:67::69;;:63::65;;:57::70;::::1;:51::71:0;::::1;:45::78:0;::::1;:39::85:0;::::1;:33::89:0;::::1;46:29:46:31:0;;:24::32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:38::40:0;:33::41:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:47::49:0;:42::50:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40:27:47:21;;;;;28:21:48:17;;;;26:42:49:13;50:16:50:18:0;:22::23;:16:::1;:27::29:0;;:33::34;:27:::1;:16;:36:58:13:0;51:30:51:32;;:24::33;::::1;:49::51:0;;:43::52;::::1;:68::69:0;:62::70;::::1;52:70:52:71:0;:61::67;:57::59;;:51::63;::::1;:45::64:0;::::1;:39::68:0;::::1;:33::72:0;::::1;:30::31:0;:24::73;::::1;53:33:53:34:0;;:30::31;:24::35;::::1;:51::52:0;:45::53;::::1;54:43:54:44:0;;:40::41;:34::45;::::1;:31::32:0;:25::46;::::1;55:64:55:65:0;;:61::62;:55::66;::::1;:49::51:0;:46::47;;:40::52;::::1;:37::38:0;;:31::53;::::1;:25::67:0;::::1;56:44:56:46:0;;:40::42;;:34::47;::::1;:31::32:0;:25::48;::::1;57:21:57:23:0;;:16::24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:30::32:0;:25::33:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:39::41:0;:34::42:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:36:58:13;;;;;;25:33:25:34:0;:::36:1;;:38:59:9;;:8;;;60:12:60:14:0;;:18::19;:12:::1;:21:80:9:0;61:29:61:33;;:23::34;::::1;:53::55:0;;:47::56;::::1;62:33:62:37:0;:27::31;;:21::38;::::1;:59::63:0;;:55::57;;:49::64;::::1;63:44:63:48:0;;:39::41;;:33::37;;:27::42;::::1;:21::49:0;::::1;:83::87:0;;:76::80;;:72::74;;:66::81;::::1;:60::88:0;::::1;64:16:64:24:0;::::1;:28::30:0;;:34::36;;:28:::1;:16;:38:72:13:0;65:30:65:34;;:24::35;::::1;:51::55:0;;:45::56;::::1;:72::73:0;:66::74;::::1;66:72:66:73:0;:63::69;:57::61;;:51::65;::::1;:45::66:0;::::1;:39::70:0;::::1;:33::74:0;::::1;:30::31:0;:24::75;::::1;67:33:67:34:0;;:30::31;:24::35;::::1;:51::52:0;:45::53;::::1;68:43:68:44:0;;:40::41;:34::45;::::1;:31::32:0;:25::46;::::1;69:64:69:65:0;;:61::62;:55::66;::::1;:49::51:0;:46::47;;:40::52;::::1;:37::38:0;;:31::53;::::1;:25::67:0;::::1;70:46:70:50:0;;:40::44;;:34::51;::::1;:31::32:0;:25::52;::::1;71:23:71:25:0;;:16::26:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:34::36:0;:27::37:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:45::47:0;:38::48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;64::72:13;;;;;72:19:79::0;73:30:73:36;:24::37;::::1;:63::64:0;:60::61;:54::65;::::1;:48::66:0;::::1;:82::87:0;;:76::88;::::1;74:44:74:46:0;;:40::42;;:34::47;::::1;:31::32:0;:25::48;::::1;:68::70:0;;:64::66;;:58::71;::::1;75:61:75:62:0;:58::59;:52::63;::::1;:43::49:0;:37::46;::::1;:31::50:0;::::1;:25::64:0;::::1;76:75:76:76:0;;:71::73;;:65::77;::::1;:62::63:0;:56::78;::::1;:50::52:0;:47::48;;:41::53;::::1;:37::39:0;;:31::54;::::1;:25::79:0;::::1;77:81:77:82:0;;:74::78;;:67::71;;:61::63;;:55::59;;:49::64;::::1;:43::65:0;::::1;:37::72:0;::::1;:31::79:0;::::1;:25::83:0;::::1;78:23:78:25:0;;:16::26:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:34::36:0;:27::37:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:45::47:0;:38::48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;72:19:79:13;;;;;60:21:80:9;;;;81:29:81:33:0;;:19::34;::::1;82:26:82:30:0;:20::31;::::1;:58::62:0;:51::56;:45::63;::::1;83:28:83:33:0;:22::26;;:16::34;::::1;:50::55:0;:44::48;;:38::56;::::1;:8::58;84:22:84:26:0;;:16::34;::::1;:38::43:0;;:8::45:1;16:31:85:5;;;;", + "logs": [], + "requires": [ + { "ip": 1512, "line": 83 }, + { "ip": 1519, "line": 84 } + ], + "sourceTags": "406:410:sc;669:672:sc;674:676:sc;861:865:sc;867:869:fu;870:873:lc;874:874:sc;1200:1204:sc;1481:1484:sc;1486:1488:sc" + }, + "compiler": { + "name": "cashc", + "version": "0.13.1", + "options": { + "enforceFunctionParameterTypes": true, + "enforceLocktimeGuard": true + } + }, + "updatedAt": "2026-06-18T21:03:26.872Z" +} \ No newline at end of file diff --git a/vkx_jacprior.json b/vkx_jacprior.json new file mode 100644 index 00000000..c2bd9249 --- /dev/null +++ b/vkx_jacprior.json @@ -0,0 +1,36 @@ +{ + "contractName": "VkXJacPrior", + "constructorInputs": [ + { "name": "probe", "type": "int" } + ], + "abi": [ + { + "name": "spend", + "inputs": [ + { "name": "input1", "type": "int" } + ] + } + ], + "bytecode": "007a517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_1 OP_DEFINE 0079517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_2 OP_DEFINE 007a517a932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_3 OP_DEFINE 007a517a942047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097 OP_4 OP_DEFINE 2047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e64300079529451537a5379970065007902fe009f766b63537951798e5297519c635279527995557997537a757c6b7c6c685179527995557997527a757c00795193517a75686c916675517a777777 OP_5 OP_DEFINE OP_0 OP_0 OP_BEGIN OP_DUP fe00 OP_LESSTHAN OP_DUP OP_TOALTSTACK OP_IF OP_2DUP OP_ADD OP_2 OP_INVOKE OP_2 OP_OVER OP_1 OP_INVOKE OP_2DUP OP_4 OP_INVOKE OP_4 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_2 OP_PICK OP_1ADD OP_3 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_2DROP OP_ENDIF OP_FROMALTSTACK OP_NOT OP_UNTIL OP_DROP ef493dfc801fb7a82cc12ae97f478224b8cdee518680a89d1809b0375570142a 38ec67ea197e17b67d71d49f778c617a8758920214df1d8eb3a83e247feef72d d1ce2f3d42034e4286ab34609f5761b955fde25a94d678832907768f3ac7b80e 11e2d7604a9a4454f43cc6a704de5b2579641ea2353f3a86a999442e09387505 b681394a13af2e941278d71d2ce51ee3317e799f23549bb11aa73c6ee35d8401 OP_0 OP_1 OP_0 OP_7 OP_ROLL OP_7 OP_ROLL OP_1 OP_0 OP_BEGIN OP_DUP fe00 OP_LESSTHAN OP_DUP OP_TOALTSTACK OP_IF OP_12 OP_PICK OP_OVER OP_RSHIFTNUM OP_2 OP_MOD OP_1 OP_NUMEQUAL OP_IF OP_4 OP_PICK OP_0 OP_NUMEQUAL OP_IF OP_3 OP_PICK OP_7 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2 OP_PICK OP_6 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER OP_5 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_ELSE OP_4 OP_PICK OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_INVOKE OP_DUP OP_9 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_7 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_6 OP_PICK OP_11 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_4 OP_PICK OP_10 OP_PICK OP_9 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_2OVER OP_NUMEQUAL OP_2 OP_PICK OP_2 OP_PICK OP_NUMEQUAL OP_BOOLAND OP_IF OP_12 OP_PICK OP_2 OP_INVOKE OP_12 OP_PICK OP_2 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_DUP OP_2OVER 12 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_3 OP_PICK OP_3 OP_1 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_1 OP_INVOKE OP_OVER OP_4 OP_INVOKE OP_4 OP_PICK OP_8 OP_1 OP_INVOKE OP_OVER OP_5 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE 12 OP_PICK 14 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK 16 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 15 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 14 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_DROP OP_ELSE OP_2OVER OP_4 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2 OP_INVOKE OP_2DUP OP_SWAP OP_1 OP_INVOKE OP_4 OP_PICK OP_4 OP_PICK OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2OVER OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_3 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_OVER OP_3 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE OP_6 OP_PICK OP_12 OP_PICK OP_14 OP_PICK 11 OP_PICK 15 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_1 OP_INVOKE OP_2 OP_PICK 15 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 14 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 13 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_ENDIF OP_OVER OP_0 OP_NUMNOTEQUAL OP_3 OP_PICK OP_0 OP_NUMNOTEQUAL OP_BOOLAND OP_IF OP_3 OP_PICK OP_2 OP_INVOKE OP_3 OP_PICK OP_2 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_DUP OP_2OVER OP_9 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_3 OP_PICK OP_3 OP_1 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_1 OP_INVOKE OP_OVER OP_4 OP_INVOKE OP_4 OP_PICK OP_8 OP_1 OP_INVOKE OP_OVER OP_5 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE OP_9 OP_PICK OP_11 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK OP_13 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER OP_12 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP OP_11 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_DROP OP_ENDIF OP_DUP OP_1ADD OP_NIP OP_ENDIF OP_FROMALTSTACK OP_NOT OP_UNTIL OP_DROP OP_3 OP_PICK OP_0 OP_NUMNOTEQUAL OP_IF OP_6 OP_PICK OP_2 OP_INVOKE OP_4 OP_PICK OP_2 OP_INVOKE OP_DUP OP_11 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_9 OP_PICK OP_1 OP_INVOKE OP_2 OP_PICK OP_8 OP_PICK OP_13 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_4 OP_PICK OP_12 OP_PICK OP_11 OP_PICK OP_1 OP_INVOKE OP_1 OP_INVOKE OP_2OVER OP_NUMEQUAL OP_2 OP_PICK OP_2 OP_PICK OP_NUMEQUAL OP_BOOLAND OP_IF OP_14 OP_PICK OP_2 OP_INVOKE OP_14 OP_PICK OP_2 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_DUP OP_2OVER 14 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_3 OP_PICK OP_3 OP_1 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_2 OP_PICK OP_2 OP_1 OP_INVOKE OP_OVER OP_4 OP_INVOKE OP_4 OP_PICK OP_8 OP_1 OP_INVOKE OP_OVER OP_5 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE 14 OP_PICK 16 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK 18 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 17 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 16 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_DROP OP_ELSE OP_2OVER OP_4 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2 OP_INVOKE OP_2DUP OP_SWAP OP_1 OP_INVOKE OP_4 OP_PICK OP_4 OP_PICK OP_4 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_2 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_DUP OP_2 OP_1 OP_INVOKE OP_2OVER OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_3 OP_PICK OP_8 OP_PICK OP_1 OP_INVOKE OP_2 OP_1 OP_INVOKE OP_OVER OP_3 OP_PICK OP_4 OP_INVOKE OP_4 OP_PICK OP_1 OP_INVOKE OP_4 OP_INVOKE OP_6 OP_PICK OP_12 OP_PICK OP_14 OP_PICK 13 OP_PICK 17 OP_PICK OP_3 OP_INVOKE OP_2 OP_INVOKE OP_4 OP_INVOKE OP_4 OP_INVOKE OP_1 OP_INVOKE OP_2 OP_PICK 17 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_OVER 16 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_DUP 15 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_2DROP OP_2DROP OP_2DROP OP_ENDIF OP_6 OP_ROLL OP_5 OP_INVOKE OP_DUP OP_2 OP_INVOKE OP_SWAP OP_OVER OP_1 OP_INVOKE OP_DUP OP_9 OP_PICK OP_1 OP_INVOKE OP_SWAP OP_9 OP_ROLL OP_1 OP_INVOKE OP_NUMEQUALVERIFY OP_7 OP_ROLL OP_1 OP_INVOKE OP_8 OP_ROLL OP_NUMEQUALVERIFY OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_1", + "source": "pragma cashscript ^0.13.0;\r\ncontract VkXJacPrior(int probe) {\r\n function mulFp(int x, int y) returns (int) { return (x * y) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\r\n function sqrFp(int x) returns (int) { return (x * x) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\r\n function addFp(int x, int y) returns (int) { return (x + y) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\r\n function subFp(int x, int y) returns (int) { return (x - y + 21888242871839275222246405745257275088696311157297823662689037894645226208583) % 21888242871839275222246405745257275088696311157297823662689037894645226208583; }\r\n function inverseFp(int x) returns (int) {\r\n int p = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\r\n int e = p - 2; int result = 1; int current = x % p;\r\n for (int i = 0; i < 254; i++) {\r\n if (((e >> i) % 2) == 1) { result = (result * current) % p; }\r\n current = (current * current) % p;\r\n }\r\n return result;\r\n }\r\n function spend(int input1) {\r\n // dummy prior loop with its own locals (mimics term-1 presence)\r\n int dummy = 0;\r\n for (int z = 0; z < 254; z++) {\r\n int da = sqrFp(dummy + z);\r\n int db = mulFp(da, 2);\r\n dummy = subFp(db, da);\r\n }\r\n int ic2X = 19033251874843656108471242320417533909414939332036131356573128480367742634479;\r\n int ic2Y = 20792135454608030201903199625673964159744755218442260092768620403349374102584;\r\n // hardcoded term-1 acc (Jacobian, Z != 1)\r\n int accX = 6658854766393081772996491483672685084577556313489922771895150113991592758993;\r\n int accY = 2468672094802929104226026488986983711667664315007804078500783463370694582801;\r\n int accZ = 686184655061461263619834153307432782664270110630155350259885499745283178934;\r\n int rX = 0; int rY = 1; int rZ = 0;\r\n int bX = ic2X; int bY = ic2Y; int bZ = 1;\r\n for (int i = 0; i < 254; i++) {\r\n if (((input1 >> i) % 2) == 1) {\r\n if (rZ == 0) { rX = bX; rY = bY; rZ = bZ; }\r\n else {\r\n int z1z1 = sqrFp(rZ); int z2z2 = sqrFp(bZ);\r\n int u1 = mulFp(rX, z2z2); int u2 = mulFp(bX, z1z1);\r\n int s1 = mulFp(mulFp(rY, bZ), z2z2); int s2 = mulFp(mulFp(bY, rZ), z1z1);\r\n if (u1 == u2 && s1 == s2) {\r\n int a = sqrFp(rX); int b = sqrFp(rY); int c = sqrFp(b);\r\n int d = mulFp(2, subFp(subFp(sqrFp(addFp(rX, b)), a), c));\r\n int e = mulFp(3, a); int f = sqrFp(e);\r\n int nx = subFp(f, mulFp(2, d));\r\n int ny = subFp(mulFp(e, subFp(d, nx)), mulFp(8, c));\r\n int nz = mulFp(2, mulFp(rY, rZ));\r\n rX = nx; rY = ny; rZ = nz;\r\n } else {\r\n int h = subFp(u2, u1); int i2 = sqrFp(mulFp(2, h)); int j = mulFp(h, i2);\r\n int rr = mulFp(2, subFp(s2, s1)); int v = mulFp(u1, i2);\r\n int nx = subFp(subFp(sqrFp(rr), j), mulFp(2, v));\r\n int ny = subFp(mulFp(rr, subFp(v, nx)), mulFp(2, mulFp(s1, j)));\r\n int nz = mulFp(subFp(subFp(sqrFp(addFp(rZ, bZ)), z1z1), z2z2), h);\r\n rX = nx; rY = ny; rZ = nz;\r\n }\r\n }\r\n }\r\n if (bZ != 0 && bY != 0) {\r\n int a = sqrFp(bX); int b = sqrFp(bY); int c = sqrFp(b);\r\n int d = mulFp(2, subFp(subFp(sqrFp(addFp(bX, b)), a), c));\r\n int e = mulFp(3, a); int f = sqrFp(e);\r\n int nx = subFp(f, mulFp(2, d));\r\n int ny = subFp(mulFp(e, subFp(d, nx)), mulFp(8, c));\r\n int nz = mulFp(2, mulFp(bY, bZ));\r\n bX = nx; bY = ny; bZ = nz;\r\n }\r\n }\r\n if (rZ != 0) {\r\n int z1z1 = sqrFp(accZ); int z2z2 = sqrFp(rZ);\r\n int u1 = mulFp(accX, z2z2); int u2 = mulFp(rX, z1z1);\r\n int s1 = mulFp(mulFp(accY, rZ), z2z2); int s2 = mulFp(mulFp(rY, accZ), z1z1);\r\n if (u1 == u2 && s1 == s2) {\r\n int a = sqrFp(accX); int b = sqrFp(accY); int c = sqrFp(b);\r\n int d = mulFp(2, subFp(subFp(sqrFp(addFp(accX, b)), a), c));\r\n int e = mulFp(3, a); int f = sqrFp(e);\r\n int nx = subFp(f, mulFp(2, d));\r\n int ny = subFp(mulFp(e, subFp(d, nx)), mulFp(8, c));\r\n int nz = mulFp(2, mulFp(accY, accZ));\r\n accX = nx; accY = ny; accZ = nz;\r\n } else {\r\n int h = subFp(u2, u1); int i2 = sqrFp(mulFp(2, h)); int j = mulFp(h, i2);\r\n int rr = mulFp(2, subFp(s2, s1)); int v = mulFp(u1, i2);\r\n int nx = subFp(subFp(sqrFp(rr), j), mulFp(2, v));\r\n int ny = subFp(mulFp(rr, subFp(v, nx)), mulFp(2, mulFp(s1, j)));\r\n int nz = mulFp(subFp(subFp(sqrFp(addFp(accZ, rZ)), z1z1), z2z2), h);\r\n accX = nx; accY = ny; accZ = nz;\r\n }\r\n }\r\n int zInv = inverseFp(accZ);\r\n int zInv2 = sqrFp(zInv); int zInv3 = mulFp(zInv2, zInv);\r\n require(mulFp(accY, zInv3) == mulFp(accY, zInv3));\r\n require(mulFp(accX, zInv2) == probe);\r\n }\r\n}\r\n", + "fingerprint": "bae0ca454d6cc474e6f77fb2ee8bee50e4bdfb0a307a29dfb437c7b1e6ffbac2", + "debug": { + "bytecode": "27007a517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430975189270079517a952047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097528927007a517a932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e643097538949007a517a942047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430932047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e64309754894c6d2047fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e64300079529451537a5379970065007902fe009f766b63537951798e5297519c635279527995557997537a757c6b7c6c685179527995557997527a757c00795193517a75686c916675517a77777755890000657602fe009f766b636e93528a5278518a6e548a547a757c6b7c6b7c6c6c52798b537a757c6b7c6c6d686c91667520ef493dfc801fb7a82cc12ae97f478224b8cdee518680a89d1809b0375570142a2038ec67ea197e17b67d71d49f778c617a8758920214df1d8eb3a83e247feef72d20d1ce2f3d42034e4286ab34609f5761b955fde25a94d678832907768f3ac7b80e2011e2d7604a9a4454f43cc6a704de5b2579641ea2353f3a86a999442e0938750520b681394a13af2e941278d71d2ce51ee3317e799f23549bb11aa73c6ee35d8401005100577a577a5100657602fe009f766b635c79788e5297519c635479009c635379577a757c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c5279567a757c6b7c6b7c6b7c6b7c6c6c6c6c78557a757c6b7c6b7c6b7c6c6c6c675479528a5279528a765979518a52795779518a527956795b79518a518a54795a795979518a518a709c527952799c9a635c79528a5c79528a76528a7670011279538a528a548a548a52518a537953518a76528a527952518a78548a547958518a785579548a5479518a548a011279011479518a52518a527901167a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801157a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601147a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d756770548a7652518a528a6e7c518a54795479548a52518a52795879518a7652518a70528a548a548a53795879518a52518a785379548a5479518a548a56795c795e79011179011579538a528a548a548a518a527901157a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801147a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601137a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d686d6d6d686878009e5379009e9a635379528a5379528a76528a76705979538a528a548a548a52518a537953518a76528a527952518a78548a547958518a785579548a5479518a548a59795b79518a52518a52795d7a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c785c7a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c765b7a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6d6d6d6d7568768b77686c9166755379009e635679528a5479528a765b79518a52795979518a527958795d79518a518a54795c795b79518a518a709c527952799c9a635e79528a5e79528a76528a7670011479538a528a548a548a52518a537953518a76528a527952518a78548a547958518a785579548a5479518a548a011479011679518a52518a527901187a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801177a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601167a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d756770548a7652518a528a6e7c518a54795479548a52518a52795879518a7652518a70528a548a548a53795879518a52518a785379548a5479518a548a56795c795e79011379011779538a528a548a548a518a527901177a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7801167a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c7601157a757c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6d6d6d6d686d6d6d68567a558a76528a7c78518a765979518a7c597a518a9d577a518a587a9d6d6d6d6d51", + "sourceMap": "3:4:3:146;;::::1;4::4:139:0;;::::1;5::5:146:0;;::::1;6::6:226:0;;::::1;7::15:5:0;;::::1;18:20:18:21:0;19:21:19:22;:8:23:9;:24:19:25;:28::31;:24:::1;;;:38:23:9:0;20:27:20:36;::::1;:21::37:0;::::1;21:31:21:32:0;:27::29;:21::33;::::1;22:26:22:32:0;:20::33;::::1;:12::34;;;;;;;;;;19:33:19::0;;:::36:1;;;;;;;;:38:23:9;;;:8;;;24:19:24:96:0;25::25;27::27:95;28::28;29::29:94;30:17:30:18;:29::30;:41::42;31:17:31:21;;:32::36;;:47::48;32:21:32:22;:8:66:9;:24:32:25;:28::31;:24:::1;;;:38:66:9:0;33:18:33:24;;:28::29;:18:::1;:33::34:0;:17:::1;:39::40:0;:16:::1;:42:56:13:0;34:20:34:22;;:26::27;:20:::1;:29::59:0;:36::38;;:31::39:1;;;;;;;;;;;;;;;;;;;:45::47:0;;:40::48:1;;;;;;;;;;;;;;;;:54::56:0;:49::57:1;;;;;;;;;;;;;35:21:55:17:0;36:37:36:39;;:31::40;::::1;:59::61:0;;:53::62;::::1;37:39:37:43:0;:35::37;;:29::44;::::1;:65::69:0;;:61::63;;:55::70;::::1;38:50:38:54:0;;:45::47;;:41::43;;:35::48;::::1;:29::55:0;::::1;:87::91:0;;:82::84;;:78::80;;:72::85;::::1;:66::92:0;::::1;39:24:39:32:0;::::1;:36::38:0;;:42::44;;:36:::1;:24;:46:47:21:0;40:38:40:40;;:32::41;::::1;:57::59:0;;:51::60;::::1;:76::77:0;:70::78;::::1;41:78:41:79:0;:69::75;:65::67;;:59::71;::::1;:53::72:0;::::1;:47::76:0;::::1;:41::80:0;::::1;:38::39:0;:32::81;::::1;42:41:42:42:0;;:38::39;:32::43;::::1;:59::60:0;:53::61;::::1;43:51:43:52:0;;:48::49;:42::53;::::1;:39::40:0;:33::54;::::1;44:72:44:73:0;;:69::70;:63::74;::::1;:57::59:0;:54::55;;:48::60;::::1;:45::46:0;;:39::61;::::1;:33::75:0;::::1;45:52:45:54:0;;:48::50;;:42::55;::::1;:39::40:0;:33::56;::::1;46:29:46:31:0;;:24::32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:38::40:0;:33::41:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:47::49:0;:42::50:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39:46:47:21;;;;;47:27:54::0;48:38:48:44;:32::45;::::1;:71::72:0;:68::69;:62::73;::::1;:56::74:0;::::1;:90::95:0;;:84::96;::::1;49:52:49:54:0;;:48::50;;:42::55;::::1;:39::40:0;:33::56;::::1;:76::78:0;;:72::74;;:66::79;::::1;50:69:50:70:0;:66::67;:60::71;::::1;:51::57:0;:45::54;::::1;:39::58:0;::::1;:33::72:0;::::1;51:83:51:84:0;;:79::81;;:73::85;::::1;:70::71:0;:64::86;::::1;:58::60:0;:55::56;;:49::61;::::1;:45::47:0;;:39::62;::::1;:33::87:0;::::1;52:87:52:88:0;;:80::84;;:73::77;;:67::69;;:63::65;;:57::70;::::1;:51::71:0;::::1;:45::78:0;::::1;:39::85:0;::::1;:33::89:0;::::1;53:29:53:31:0;;:24::32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:38::40:0;:33::41:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:47::49:0;:42::50:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47:27:54:21;;;;;35:21:55:17;;;;33:42:56:13;57:16:57:18:0;:22::23;:16:::1;:27::29:0;;:33::34;:27:::1;:16;:36:65:13:0;58:30:58:32;;:24::33;::::1;:49::51:0;;:43::52;::::1;:68::69:0;:62::70;::::1;59:70:59:71:0;:61::67;:57::59;;:51::63;::::1;:45::64:0;::::1;:39::68:0;::::1;:33::72:0;::::1;:30::31:0;:24::73;::::1;60:33:60:34:0;;:30::31;:24::35;::::1;:51::52:0;:45::53;::::1;61:43:61:44:0;;:40::41;:34::45;::::1;:31::32:0;:25::46;::::1;62:64:62:65:0;;:61::62;:55::66;::::1;:49::51:0;:46::47;;:40::52;::::1;:37::38:0;;:31::53;::::1;:25::67:0;::::1;63:44:63:46:0;;:40::42;;:34::47;::::1;:31::32:0;:25::48;::::1;64:21:64:23:0;;:16::24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:30::32:0;:25::33:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:39::41:0;:34::42:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57:36:65:13;;;;;;32:33:32:34:0;:::36:1;;:38:66:9;;:8;;;67:12:67:14:0;;:18::19;:12:::1;:21:87:9:0;68:29:68:33;;:23::34;::::1;:53::55:0;;:47::56;::::1;69:33:69:37:0;:27::31;;:21::38;::::1;:59::63:0;;:55::57;;:49::64;::::1;70:44:70:48:0;;:39::41;;:33::37;;:27::42;::::1;:21::49:0;::::1;:83::87:0;;:76::80;;:72::74;;:66::81;::::1;:60::88:0;::::1;71:16:71:24:0;::::1;:28::30:0;;:34::36;;:28:::1;:16;:38:79:13:0;72:30:72:34;;:24::35;::::1;:51::55:0;;:45::56;::::1;:72::73:0;:66::74;::::1;73:72:73:73:0;:63::69;:57::61;;:51::65;::::1;:45::66:0;::::1;:39::70:0;::::1;:33::74:0;::::1;:30::31:0;:24::75;::::1;74:33:74:34:0;;:30::31;:24::35;::::1;:51::52:0;:45::53;::::1;75:43:75:44:0;;:40::41;:34::45;::::1;:31::32:0;:25::46;::::1;76:64:76:65:0;;:61::62;:55::66;::::1;:49::51:0;:46::47;;:40::52;::::1;:37::38:0;;:31::53;::::1;:25::67:0;::::1;77:46:77:50:0;;:40::44;;:34::51;::::1;:31::32:0;:25::52;::::1;78:23:78:25:0;;:16::26:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:34::36:0;:27::37:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:45::47:0;:38::48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;71::79:13;;;;;79:19:86::0;80:30:80:36;:24::37;::::1;:63::64:0;:60::61;:54::65;::::1;:48::66:0;::::1;:82::87:0;;:76::88;::::1;81:44:81:46:0;;:40::42;;:34::47;::::1;:31::32:0;:25::48;::::1;:68::70:0;;:64::66;;:58::71;::::1;82:61:82:62:0;:58::59;:52::63;::::1;:43::49:0;:37::46;::::1;:31::50:0;::::1;:25::64:0;::::1;83:75:83:76:0;;:71::73;;:65::77;::::1;:62::63:0;:56::78;::::1;:50::52:0;:47::48;;:41::53;::::1;:37::39:0;;:31::54;::::1;:25::79:0;::::1;84:81:84:82:0;;:74::78;;:67::71;;:61::63;;:55::59;;:49::64;::::1;:43::65:0;::::1;:37::72:0;::::1;:31::79:0;::::1;:25::83:0;::::1;85:23:85:25:0;;:16::26:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:34::36:0;:27::37:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:45::47:0;:38::48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;79:19:86:13;;;;;67:21:87:9;;;;88:29:88:33:0;;:19::34;::::1;89:26:89:30:0;:20::31;::::1;:58::62:0;:51::56;:45::63;::::1;90:28:90:33:0;:22::26;;:16::34;::::1;:50::55:0;:44::48;;:38::56;::::1;:8::58;91:22:91:26:0;;:16::34;::::1;:38::43:0;;:8::45:1;16:31:92:5;;;;", + "logs": [], + "requires": [ + { "ip": 1558, "line": 90 }, + { "ip": 1565, "line": 91 } + ], + "sourceTags": "45:54:fu;55:55:sc;56:59:lc;60:60:sc;452:456:sc;715:718:sc;720:722:sc;907:911:sc;913:915:fu;916:919:lc;920:920:sc;1246:1250:sc;1527:1530:sc;1532:1534:sc" + }, + "compiler": { + "name": "cashc", + "version": "0.13.1", + "options": { + "enforceFunctionParameterTypes": true, + "enforceLocktimeGuard": true + } + }, + "updatedAt": "2026-06-18T20:59:48.859Z" +} \ No newline at end of file