From ca7d65e5cbc135eb06c4c28bf31bb123c8d0ad01 Mon Sep 17 00:00:00 2001 From: Rosco Kalis Date: Tue, 30 Jun 2026 09:59:48 +0200 Subject: [PATCH] WIP: ternary operator --- .cspell.json | 1 + packages/cashc/src/Errors.ts | 14 + packages/cashc/src/ast/AST.ts | 14 + packages/cashc/src/ast/AstBuilder.ts | 11 + packages/cashc/src/ast/AstTraversal.ts | 8 + packages/cashc/src/ast/AstVisitor.ts | 2 + .../src/generation/GenerateTargetTraversal.ts | 26 + packages/cashc/src/grammar/CashScript.g4 | 1 + packages/cashc/src/grammar/CashScript.interp | 6 +- packages/cashc/src/grammar/CashScript.tokens | 48 +- .../cashc/src/grammar/CashScriptLexer.interp | 8 +- .../cashc/src/grammar/CashScriptLexer.tokens | 48 +- packages/cashc/src/grammar/CashScriptLexer.ts | 670 +++++++++--------- .../cashc/src/grammar/CashScriptParser.ts | 576 ++++++++------- .../cashc/src/grammar/CashScriptVisitor.ts | 8 + .../src/print/OutputSourceCodeTraversal.ts | 12 + .../cashc/src/semantic/TypeCheckTraversal.ts | 27 +- packages/cashc/src/utils.ts | 10 +- packages/cashc/test/ast/fixtures.ts | 46 ++ .../ternary_branch_mismatch.cash | 6 + .../ternary_tuple_rejection.cash | 6 + .../TypeError/ternary_condition_not_bool.cash | 6 + packages/cashc/test/generation/fixtures.ts | 34 + .../test/valid-contract-files/ternary.cash | 6 + .../valid-contract-files/ternary_sig.cash | 6 + packages/cashscript/test/debugging.test.ts | 34 + packages/cashscript/test/e2e/Ternary.test.ts | 208 ++++++ packages/utils/src/bitauth-script.ts | 23 +- packages/utils/test/bitauth-script.test.ts | 36 +- website/docs/compiler/grammar.md | 1 + website/docs/language/types.md | 26 +- website/docs/releases/release-notes.md | 4 + 32 files changed, 1286 insertions(+), 646 deletions(-) create mode 100644 packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_branch_mismatch.cash create mode 100644 packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_tuple_rejection.cash create mode 100644 packages/cashc/test/compiler/TypeError/ternary_condition_not_bool.cash create mode 100644 packages/cashc/test/valid-contract-files/ternary.cash create mode 100644 packages/cashc/test/valid-contract-files/ternary_sig.cash create mode 100644 packages/cashscript/test/e2e/Ternary.test.ts diff --git a/.cspell.json b/.cspell.json index 56f78ca2..63afa157 100644 --- a/.cspell.json +++ b/.cspell.json @@ -8,6 +8,7 @@ "algolia", "altstack", "antlr", + "assoc", "authchain", "anyhedge", "anyonecanpay", diff --git a/packages/cashc/src/Errors.ts b/packages/cashc/src/Errors.ts index 7ff6b409..20f5f372 100644 --- a/packages/cashc/src/Errors.ts +++ b/packages/cashc/src/Errors.ts @@ -9,6 +9,7 @@ import { FunctionCallNode, BinaryOpNode, UnaryOpNode, + TernaryNode, TimeOpNode, CastNode, AssignNode, @@ -222,6 +223,19 @@ export class UnequalTypeError extends TypeError { } } +export class TernaryBranchMismatchError extends TypeError { + constructor( + node: TernaryNode, + ) { + const consequent = node.consequent.type; + const alternative = node.alternative.type; + super( + node, consequent, alternative, + `Ternary branches have incompatible types '${consequent}' and '${alternative}'`, + ); + } +} + export class UnsupportedTypeError extends TypeError { constructor( node: BinaryOpNode | UnaryOpNode | TimeOpNode | TupleIndexOpNode | SliceNode, diff --git a/packages/cashc/src/ast/AST.ts b/packages/cashc/src/ast/AST.ts index 8d097023..66104ad7 100644 --- a/packages/cashc/src/ast/AST.ts +++ b/packages/cashc/src/ast/AST.ts @@ -385,6 +385,20 @@ export class UnaryOpNode extends ExpressionNode { } } +export class TernaryNode extends ExpressionNode { + constructor( + public condition: ExpressionNode, + public consequent: ExpressionNode, + public alternative: ExpressionNode, + ) { + super(); + } + + accept(visitor: AstVisitor): T { + return visitor.visitTernary(this); + } +} + export class NullaryOpNode extends ExpressionNode { constructor( public operator: NullaryOperator, diff --git a/packages/cashc/src/ast/AstBuilder.ts b/packages/cashc/src/ast/AstBuilder.ts index c2bdd0e3..abe7c322 100644 --- a/packages/cashc/src/ast/AstBuilder.ts +++ b/packages/cashc/src/ast/AstBuilder.ts @@ -18,6 +18,7 @@ import { FunctionCallNode, UnaryOpNode, BinaryOpNode, + TernaryNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, @@ -74,6 +75,7 @@ import type { InstantiationContext, NullaryOpContext, UnaryIntrospectionOpContext, + TernaryContext, ConsoleStatementContext, ConsoleParameterContext, StatementContext, @@ -464,6 +466,15 @@ export default class AstBuilder return binaryOp; } + visitTernary(ctx: TernaryContext): TernaryNode { + const condition = this.visit(ctx._condition); + const consequent = this.visit(ctx._consequent); + const alternative = this.visit(ctx._alternative); + const ternary = new TernaryNode(condition, consequent, alternative); + ternary.location = Location.fromCtx(ctx); + return ternary; + } + visitArray(ctx: ArrayContext): ArrayNode { const elements = ctx.expression_list().map((e) => this.visit(e)); const array = new ArrayNode(elements); diff --git a/packages/cashc/src/ast/AstTraversal.ts b/packages/cashc/src/ast/AstTraversal.ts index bd428132..19f54d67 100644 --- a/packages/cashc/src/ast/AstTraversal.ts +++ b/packages/cashc/src/ast/AstTraversal.ts @@ -13,6 +13,7 @@ import { FunctionCallNode, UnaryOpNode, BinaryOpNode, + TernaryNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, @@ -172,6 +173,13 @@ export default class AstTraversal extends AstVisitor { return node; } + visitTernary(node: TernaryNode): Node { + node.condition = this.visit(node.condition); + node.consequent = this.visit(node.consequent); + node.alternative = this.visit(node.alternative); + return node; + } + visitUnaryOp(node: UnaryOpNode): Node { node.expression = this.visit(node.expression); return node; diff --git a/packages/cashc/src/ast/AstVisitor.ts b/packages/cashc/src/ast/AstVisitor.ts index 3b72d57f..330d2c97 100644 --- a/packages/cashc/src/ast/AstVisitor.ts +++ b/packages/cashc/src/ast/AstVisitor.ts @@ -13,6 +13,7 @@ import { FunctionCallNode, UnaryOpNode, BinaryOpNode, + TernaryNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, @@ -59,6 +60,7 @@ export default abstract class AstVisitor { abstract visitSlice(node: SliceNode): T; abstract visitTupleIndexOp(node: TupleIndexOpNode): T; abstract visitBinaryOp(node: BinaryOpNode): T; + abstract visitTernary(node: TernaryNode): T; abstract visitUnaryOp(node: UnaryOpNode): T; abstract visitNullaryOp(node: NullaryOpNode): T; abstract visitArray(node: ArrayNode): T; diff --git a/packages/cashc/src/generation/GenerateTargetTraversal.ts b/packages/cashc/src/generation/GenerateTargetTraversal.ts index 73e7e5e2..ade69a99 100644 --- a/packages/cashc/src/generation/GenerateTargetTraversal.ts +++ b/packages/cashc/src/generation/GenerateTargetTraversal.ts @@ -36,6 +36,7 @@ import { FunctionCallNode, UnaryOpNode, BinaryOpNode, + TernaryNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, @@ -806,6 +807,31 @@ export default class GenerateTargetTraversal extends AstTraversal { return node; } + // A ternary `condition ? consequent : alternative` compiles to OP_IF OP_ELSE OP_ENDIF. + // The condition is consumed by OP_IF; each branch leaves exactly one value, so the net effect mirrors any other + // expression: one operand consumed, one result produced. We bump scopeDepth (so variable reads inside the branches + // use OP_PICK rather than OP_ROLL, keeping the stack depth identical on both paths) and reset the symbolic stack + // before the alternative so both branches are tracked from the same starting point. + visitTernary(node: TernaryNode): Node { + node.condition = this.visit(node.condition); + this.popFromStack(); + + this.scopeDepth += 1; + + this.emit(Op.OP_IF, { location: node.consequent.location, positionHint: PositionHint.START }); + const stackCopy = [...this.stack]; + node.consequent = this.visit(node.consequent); + + this.emit(Op.OP_ELSE, { location: node.alternative.location, positionHint: PositionHint.START }); + this.stack = [...stackCopy]; + node.alternative = this.visit(node.alternative); + + this.emit(Op.OP_ENDIF, { location: node.location, positionHint: PositionHint.END }); + this.scopeDepth -= 1; + + return node; + } + visitNullaryOp(node: NullaryOpNode): Node { this.emit(compileNullaryOp(node.operator), { 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 c221b077..1afdc3ae 100644 --- a/packages/cashc/src/grammar/CashScript.g4 +++ b/packages/cashc/src/grammar/CashScript.g4 @@ -186,6 +186,7 @@ expression | left=expression op='|' right=expression # BinaryOp | left=expression op='&&' right=expression # BinaryOp | left=expression op='||' right=expression # BinaryOp + | condition=expression '?' consequent=expression ':' alternative=expression # Ternary | '[' (expression (',' expression)* ','?)? ']' # Array | NullaryOp # NullaryOp | Identifier # Identifier diff --git a/packages/cashc/src/grammar/CashScript.interp b/packages/cashc/src/grammar/CashScript.interp index 30fbbbcd..a8ac215b 100644 --- a/packages/cashc/src/grammar/CashScript.interp +++ b/packages/cashc/src/grammar/CashScript.interp @@ -63,6 +63,8 @@ null '|' '&&' '||' +'?' +':' 'constant' null null @@ -151,6 +153,8 @@ null null null null +null +null VersionLiteral BooleanLiteral NumberUnit @@ -219,4 +223,4 @@ typeCast atn: -[4, 1, 84, 481, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 1, 0, 5, 0, 88, 8, 0, 10, 0, 12, 0, 91, 9, 0, 1, 0, 5, 0, 94, 8, 0, 10, 0, 12, 0, 97, 9, 0, 1, 0, 5, 0, 100, 8, 0, 10, 0, 12, 0, 103, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 3, 3, 116, 8, 3, 1, 4, 3, 4, 119, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 3, 7, 131, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 141, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 150, 8, 9, 10, 9, 12, 9, 153, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 5, 11, 164, 8, 11, 10, 11, 12, 11, 167, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 175, 8, 12, 10, 12, 12, 12, 178, 9, 12, 1, 12, 3, 12, 181, 8, 12, 3, 12, 183, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 5, 14, 192, 8, 14, 10, 14, 12, 14, 195, 9, 14, 1, 14, 1, 14, 3, 14, 199, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 205, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 215, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 224, 8, 19, 1, 20, 1, 20, 5, 20, 228, 8, 20, 10, 20, 12, 20, 231, 9, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 250, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 259, 8, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 268, 8, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 282, 8, 26, 1, 27, 1, 27, 1, 27, 3, 27, 287, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 315, 8, 31, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 321, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 327, 8, 34, 10, 34, 12, 34, 330, 9, 34, 1, 34, 3, 34, 333, 8, 34, 3, 34, 335, 8, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 346, 8, 36, 10, 36, 12, 36, 349, 9, 36, 1, 36, 3, 36, 352, 8, 36, 3, 36, 354, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 367, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 393, 8, 37, 10, 37, 12, 37, 396, 9, 37, 1, 37, 3, 37, 399, 8, 37, 3, 37, 401, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 407, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 459, 8, 37, 10, 37, 12, 37, 462, 9, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 471, 8, 39, 1, 40, 1, 40, 3, 40, 475, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 0, 1, 74, 43, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 0, 14, 1, 0, 4, 10, 2, 0, 10, 10, 21, 22, 1, 0, 23, 24, 1, 0, 36, 40, 2, 0, 36, 40, 42, 45, 2, 0, 5, 5, 50, 51, 1, 0, 52, 54, 2, 0, 51, 51, 55, 55, 1, 0, 56, 57, 1, 0, 6, 9, 1, 0, 58, 59, 1, 0, 46, 47, 1, 0, 71, 73, 2, 0, 71, 72, 79, 79, 508, 0, 89, 1, 0, 0, 0, 2, 106, 1, 0, 0, 0, 4, 111, 1, 0, 0, 0, 6, 113, 1, 0, 0, 0, 8, 118, 1, 0, 0, 0, 10, 122, 1, 0, 0, 0, 12, 124, 1, 0, 0, 0, 14, 130, 1, 0, 0, 0, 16, 132, 1, 0, 0, 0, 18, 144, 1, 0, 0, 0, 20, 156, 1, 0, 0, 0, 22, 161, 1, 0, 0, 0, 24, 170, 1, 0, 0, 0, 26, 186, 1, 0, 0, 0, 28, 198, 1, 0, 0, 0, 30, 204, 1, 0, 0, 0, 32, 214, 1, 0, 0, 0, 34, 216, 1, 0, 0, 0, 36, 218, 1, 0, 0, 0, 38, 223, 1, 0, 0, 0, 40, 225, 1, 0, 0, 0, 42, 236, 1, 0, 0, 0, 44, 249, 1, 0, 0, 0, 46, 251, 1, 0, 0, 0, 48, 262, 1, 0, 0, 0, 50, 271, 1, 0, 0, 0, 52, 274, 1, 0, 0, 0, 54, 286, 1, 0, 0, 0, 56, 288, 1, 0, 0, 0, 58, 296, 1, 0, 0, 0, 60, 302, 1, 0, 0, 0, 62, 314, 1, 0, 0, 0, 64, 316, 1, 0, 0, 0, 66, 320, 1, 0, 0, 0, 68, 322, 1, 0, 0, 0, 70, 338, 1, 0, 0, 0, 72, 341, 1, 0, 0, 0, 74, 406, 1, 0, 0, 0, 76, 463, 1, 0, 0, 0, 78, 470, 1, 0, 0, 0, 80, 472, 1, 0, 0, 0, 82, 476, 1, 0, 0, 0, 84, 478, 1, 0, 0, 0, 86, 88, 3, 2, 1, 0, 87, 86, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 95, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 92, 94, 3, 12, 6, 0, 93, 92, 1, 0, 0, 0, 94, 97, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 101, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 98, 100, 3, 14, 7, 0, 99, 98, 1, 0, 0, 0, 100, 103, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 104, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 104, 105, 5, 0, 0, 1, 105, 1, 1, 0, 0, 0, 106, 107, 5, 1, 0, 0, 107, 108, 3, 4, 2, 0, 108, 109, 3, 6, 3, 0, 109, 110, 5, 2, 0, 0, 110, 3, 1, 0, 0, 0, 111, 112, 5, 3, 0, 0, 112, 5, 1, 0, 0, 0, 113, 115, 3, 8, 4, 0, 114, 116, 3, 8, 4, 0, 115, 114, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 7, 1, 0, 0, 0, 117, 119, 3, 10, 5, 0, 118, 117, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 5, 65, 0, 0, 121, 9, 1, 0, 0, 0, 122, 123, 7, 0, 0, 0, 123, 11, 1, 0, 0, 0, 124, 125, 5, 11, 0, 0, 125, 126, 5, 75, 0, 0, 126, 127, 5, 2, 0, 0, 127, 13, 1, 0, 0, 0, 128, 131, 3, 16, 8, 0, 129, 131, 3, 18, 9, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0, 131, 15, 1, 0, 0, 0, 132, 133, 5, 12, 0, 0, 133, 134, 5, 81, 0, 0, 134, 140, 3, 24, 12, 0, 135, 136, 5, 13, 0, 0, 136, 137, 5, 14, 0, 0, 137, 138, 3, 82, 41, 0, 138, 139, 5, 15, 0, 0, 139, 141, 1, 0, 0, 0, 140, 135, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 3, 22, 11, 0, 143, 17, 1, 0, 0, 0, 144, 145, 5, 16, 0, 0, 145, 146, 5, 81, 0, 0, 146, 147, 3, 24, 12, 0, 147, 151, 5, 17, 0, 0, 148, 150, 3, 20, 10, 0, 149, 148, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 18, 0, 0, 155, 19, 1, 0, 0, 0, 156, 157, 5, 12, 0, 0, 157, 158, 5, 81, 0, 0, 158, 159, 3, 24, 12, 0, 159, 160, 3, 22, 11, 0, 160, 21, 1, 0, 0, 0, 161, 165, 5, 17, 0, 0, 162, 164, 3, 30, 15, 0, 163, 162, 1, 0, 0, 0, 164, 167, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 168, 1, 0, 0, 0, 167, 165, 1, 0, 0, 0, 168, 169, 5, 18, 0, 0, 169, 23, 1, 0, 0, 0, 170, 182, 5, 14, 0, 0, 171, 176, 3, 26, 13, 0, 172, 173, 5, 19, 0, 0, 173, 175, 3, 26, 13, 0, 174, 172, 1, 0, 0, 0, 175, 178, 1, 0, 0, 0, 176, 174, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 180, 1, 0, 0, 0, 178, 176, 1, 0, 0, 0, 179, 181, 5, 19, 0, 0, 180, 179, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 183, 1, 0, 0, 0, 182, 171, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 5, 15, 0, 0, 185, 25, 1, 0, 0, 0, 186, 187, 3, 82, 41, 0, 187, 188, 5, 81, 0, 0, 188, 27, 1, 0, 0, 0, 189, 193, 5, 17, 0, 0, 190, 192, 3, 30, 15, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 199, 5, 18, 0, 0, 197, 199, 3, 30, 15, 0, 198, 189, 1, 0, 0, 0, 198, 197, 1, 0, 0, 0, 199, 29, 1, 0, 0, 0, 200, 205, 3, 38, 19, 0, 201, 202, 3, 32, 16, 0, 202, 203, 5, 2, 0, 0, 203, 205, 1, 0, 0, 0, 204, 200, 1, 0, 0, 0, 204, 201, 1, 0, 0, 0, 205, 31, 1, 0, 0, 0, 206, 215, 3, 40, 20, 0, 207, 215, 3, 42, 21, 0, 208, 215, 3, 44, 22, 0, 209, 215, 3, 46, 23, 0, 210, 215, 3, 48, 24, 0, 211, 215, 3, 34, 17, 0, 212, 215, 3, 50, 25, 0, 213, 215, 3, 36, 18, 0, 214, 206, 1, 0, 0, 0, 214, 207, 1, 0, 0, 0, 214, 208, 1, 0, 0, 0, 214, 209, 1, 0, 0, 0, 214, 210, 1, 0, 0, 0, 214, 211, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 213, 1, 0, 0, 0, 215, 33, 1, 0, 0, 0, 216, 217, 3, 70, 35, 0, 217, 35, 1, 0, 0, 0, 218, 219, 5, 20, 0, 0, 219, 220, 3, 74, 37, 0, 220, 37, 1, 0, 0, 0, 221, 224, 3, 52, 26, 0, 222, 224, 3, 54, 27, 0, 223, 221, 1, 0, 0, 0, 223, 222, 1, 0, 0, 0, 224, 39, 1, 0, 0, 0, 225, 229, 3, 82, 41, 0, 226, 228, 3, 76, 38, 0, 227, 226, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 232, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 232, 233, 5, 81, 0, 0, 233, 234, 5, 10, 0, 0, 234, 235, 3, 74, 37, 0, 235, 41, 1, 0, 0, 0, 236, 237, 3, 82, 41, 0, 237, 238, 5, 81, 0, 0, 238, 239, 5, 19, 0, 0, 239, 240, 3, 82, 41, 0, 240, 241, 5, 81, 0, 0, 241, 242, 5, 10, 0, 0, 242, 243, 3, 74, 37, 0, 243, 43, 1, 0, 0, 0, 244, 245, 5, 81, 0, 0, 245, 246, 7, 1, 0, 0, 246, 250, 3, 74, 37, 0, 247, 248, 5, 81, 0, 0, 248, 250, 7, 2, 0, 0, 249, 244, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 250, 45, 1, 0, 0, 0, 251, 252, 5, 25, 0, 0, 252, 253, 5, 14, 0, 0, 253, 254, 5, 78, 0, 0, 254, 255, 5, 6, 0, 0, 255, 258, 3, 74, 37, 0, 256, 257, 5, 19, 0, 0, 257, 259, 3, 64, 32, 0, 258, 256, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 5, 15, 0, 0, 261, 47, 1, 0, 0, 0, 262, 263, 5, 25, 0, 0, 263, 264, 5, 14, 0, 0, 264, 267, 3, 74, 37, 0, 265, 266, 5, 19, 0, 0, 266, 268, 3, 64, 32, 0, 267, 265, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 270, 5, 15, 0, 0, 270, 49, 1, 0, 0, 0, 271, 272, 5, 26, 0, 0, 272, 273, 3, 68, 34, 0, 273, 51, 1, 0, 0, 0, 274, 275, 5, 27, 0, 0, 275, 276, 5, 14, 0, 0, 276, 277, 3, 74, 37, 0, 277, 278, 5, 15, 0, 0, 278, 281, 3, 28, 14, 0, 279, 280, 5, 28, 0, 0, 280, 282, 3, 28, 14, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 53, 1, 0, 0, 0, 283, 287, 3, 56, 28, 0, 284, 287, 3, 58, 29, 0, 285, 287, 3, 60, 30, 0, 286, 283, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 285, 1, 0, 0, 0, 287, 55, 1, 0, 0, 0, 288, 289, 5, 29, 0, 0, 289, 290, 3, 28, 14, 0, 290, 291, 5, 30, 0, 0, 291, 292, 5, 14, 0, 0, 292, 293, 3, 74, 37, 0, 293, 294, 5, 15, 0, 0, 294, 295, 5, 2, 0, 0, 295, 57, 1, 0, 0, 0, 296, 297, 5, 30, 0, 0, 297, 298, 5, 14, 0, 0, 298, 299, 3, 74, 37, 0, 299, 300, 5, 15, 0, 0, 300, 301, 3, 28, 14, 0, 301, 59, 1, 0, 0, 0, 302, 303, 5, 31, 0, 0, 303, 304, 5, 14, 0, 0, 304, 305, 3, 62, 31, 0, 305, 306, 5, 2, 0, 0, 306, 307, 3, 74, 37, 0, 307, 308, 5, 2, 0, 0, 308, 309, 3, 44, 22, 0, 309, 310, 5, 15, 0, 0, 310, 311, 3, 28, 14, 0, 311, 61, 1, 0, 0, 0, 312, 315, 3, 40, 20, 0, 313, 315, 3, 44, 22, 0, 314, 312, 1, 0, 0, 0, 314, 313, 1, 0, 0, 0, 315, 63, 1, 0, 0, 0, 316, 317, 5, 75, 0, 0, 317, 65, 1, 0, 0, 0, 318, 321, 5, 81, 0, 0, 319, 321, 3, 78, 39, 0, 320, 318, 1, 0, 0, 0, 320, 319, 1, 0, 0, 0, 321, 67, 1, 0, 0, 0, 322, 334, 5, 14, 0, 0, 323, 328, 3, 66, 33, 0, 324, 325, 5, 19, 0, 0, 325, 327, 3, 66, 33, 0, 326, 324, 1, 0, 0, 0, 327, 330, 1, 0, 0, 0, 328, 326, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 332, 1, 0, 0, 0, 330, 328, 1, 0, 0, 0, 331, 333, 5, 19, 0, 0, 332, 331, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 335, 1, 0, 0, 0, 334, 323, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 337, 5, 15, 0, 0, 337, 69, 1, 0, 0, 0, 338, 339, 5, 81, 0, 0, 339, 340, 3, 72, 36, 0, 340, 71, 1, 0, 0, 0, 341, 353, 5, 14, 0, 0, 342, 347, 3, 74, 37, 0, 343, 344, 5, 19, 0, 0, 344, 346, 3, 74, 37, 0, 345, 343, 1, 0, 0, 0, 346, 349, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 351, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 350, 352, 5, 19, 0, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353, 342, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 356, 5, 15, 0, 0, 356, 73, 1, 0, 0, 0, 357, 358, 6, 37, -1, 0, 358, 359, 5, 14, 0, 0, 359, 360, 3, 74, 37, 0, 360, 361, 5, 15, 0, 0, 361, 407, 1, 0, 0, 0, 362, 363, 3, 84, 42, 0, 363, 364, 5, 14, 0, 0, 364, 366, 3, 74, 37, 0, 365, 367, 5, 19, 0, 0, 366, 365, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 369, 5, 15, 0, 0, 369, 407, 1, 0, 0, 0, 370, 407, 3, 70, 35, 0, 371, 372, 5, 32, 0, 0, 372, 373, 5, 81, 0, 0, 373, 407, 3, 72, 36, 0, 374, 375, 5, 35, 0, 0, 375, 376, 5, 33, 0, 0, 376, 377, 3, 74, 37, 0, 377, 378, 5, 34, 0, 0, 378, 379, 7, 3, 0, 0, 379, 407, 1, 0, 0, 0, 380, 381, 5, 41, 0, 0, 381, 382, 5, 33, 0, 0, 382, 383, 3, 74, 37, 0, 383, 384, 5, 34, 0, 0, 384, 385, 7, 4, 0, 0, 385, 407, 1, 0, 0, 0, 386, 387, 7, 5, 0, 0, 387, 407, 3, 74, 37, 15, 388, 400, 5, 33, 0, 0, 389, 394, 3, 74, 37, 0, 390, 391, 5, 19, 0, 0, 391, 393, 3, 74, 37, 0, 392, 390, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 5, 19, 0, 0, 398, 397, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 401, 1, 0, 0, 0, 400, 389, 1, 0, 0, 0, 400, 401, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 407, 5, 34, 0, 0, 403, 407, 5, 80, 0, 0, 404, 407, 5, 81, 0, 0, 405, 407, 3, 78, 39, 0, 406, 357, 1, 0, 0, 0, 406, 362, 1, 0, 0, 0, 406, 370, 1, 0, 0, 0, 406, 371, 1, 0, 0, 0, 406, 374, 1, 0, 0, 0, 406, 380, 1, 0, 0, 0, 406, 386, 1, 0, 0, 0, 406, 388, 1, 0, 0, 0, 406, 403, 1, 0, 0, 0, 406, 404, 1, 0, 0, 0, 406, 405, 1, 0, 0, 0, 407, 460, 1, 0, 0, 0, 408, 409, 10, 14, 0, 0, 409, 410, 7, 6, 0, 0, 410, 459, 3, 74, 37, 15, 411, 412, 10, 13, 0, 0, 412, 413, 7, 7, 0, 0, 413, 459, 3, 74, 37, 14, 414, 415, 10, 12, 0, 0, 415, 416, 7, 8, 0, 0, 416, 459, 3, 74, 37, 13, 417, 418, 10, 11, 0, 0, 418, 419, 7, 9, 0, 0, 419, 459, 3, 74, 37, 12, 420, 421, 10, 10, 0, 0, 421, 422, 7, 10, 0, 0, 422, 459, 3, 74, 37, 11, 423, 424, 10, 9, 0, 0, 424, 425, 5, 60, 0, 0, 425, 459, 3, 74, 37, 10, 426, 427, 10, 8, 0, 0, 427, 428, 5, 4, 0, 0, 428, 459, 3, 74, 37, 9, 429, 430, 10, 7, 0, 0, 430, 431, 5, 61, 0, 0, 431, 459, 3, 74, 37, 8, 432, 433, 10, 6, 0, 0, 433, 434, 5, 62, 0, 0, 434, 459, 3, 74, 37, 7, 435, 436, 10, 5, 0, 0, 436, 437, 5, 63, 0, 0, 437, 459, 3, 74, 37, 6, 438, 439, 10, 21, 0, 0, 439, 440, 5, 33, 0, 0, 440, 441, 5, 68, 0, 0, 441, 459, 5, 34, 0, 0, 442, 443, 10, 18, 0, 0, 443, 459, 7, 11, 0, 0, 444, 445, 10, 17, 0, 0, 445, 446, 5, 48, 0, 0, 446, 447, 5, 14, 0, 0, 447, 448, 3, 74, 37, 0, 448, 449, 5, 15, 0, 0, 449, 459, 1, 0, 0, 0, 450, 451, 10, 16, 0, 0, 451, 452, 5, 49, 0, 0, 452, 453, 5, 14, 0, 0, 453, 454, 3, 74, 37, 0, 454, 455, 5, 19, 0, 0, 455, 456, 3, 74, 37, 0, 456, 457, 5, 15, 0, 0, 457, 459, 1, 0, 0, 0, 458, 408, 1, 0, 0, 0, 458, 411, 1, 0, 0, 0, 458, 414, 1, 0, 0, 0, 458, 417, 1, 0, 0, 0, 458, 420, 1, 0, 0, 0, 458, 423, 1, 0, 0, 0, 458, 426, 1, 0, 0, 0, 458, 429, 1, 0, 0, 0, 458, 432, 1, 0, 0, 0, 458, 435, 1, 0, 0, 0, 458, 438, 1, 0, 0, 0, 458, 442, 1, 0, 0, 0, 458, 444, 1, 0, 0, 0, 458, 450, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 75, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 464, 5, 64, 0, 0, 464, 77, 1, 0, 0, 0, 465, 471, 5, 66, 0, 0, 466, 471, 3, 80, 40, 0, 467, 471, 5, 75, 0, 0, 468, 471, 5, 76, 0, 0, 469, 471, 5, 77, 0, 0, 470, 465, 1, 0, 0, 0, 470, 466, 1, 0, 0, 0, 470, 467, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 470, 469, 1, 0, 0, 0, 471, 79, 1, 0, 0, 0, 472, 474, 5, 68, 0, 0, 473, 475, 5, 67, 0, 0, 474, 473, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 81, 1, 0, 0, 0, 476, 477, 7, 12, 0, 0, 477, 83, 1, 0, 0, 0, 478, 479, 7, 13, 0, 0, 479, 85, 1, 0, 0, 0, 40, 89, 95, 101, 115, 118, 130, 140, 151, 165, 176, 180, 182, 193, 198, 204, 214, 223, 229, 249, 258, 267, 281, 286, 314, 320, 328, 332, 334, 347, 351, 353, 366, 394, 398, 400, 406, 458, 460, 470, 474] \ No newline at end of file +[4, 1, 86, 487, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 1, 0, 5, 0, 88, 8, 0, 10, 0, 12, 0, 91, 9, 0, 1, 0, 5, 0, 94, 8, 0, 10, 0, 12, 0, 97, 9, 0, 1, 0, 5, 0, 100, 8, 0, 10, 0, 12, 0, 103, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 3, 3, 116, 8, 3, 1, 4, 3, 4, 119, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 3, 7, 131, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 141, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 150, 8, 9, 10, 9, 12, 9, 153, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 5, 11, 164, 8, 11, 10, 11, 12, 11, 167, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 175, 8, 12, 10, 12, 12, 12, 178, 9, 12, 1, 12, 3, 12, 181, 8, 12, 3, 12, 183, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 5, 14, 192, 8, 14, 10, 14, 12, 14, 195, 9, 14, 1, 14, 1, 14, 3, 14, 199, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 205, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 215, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 224, 8, 19, 1, 20, 1, 20, 5, 20, 228, 8, 20, 10, 20, 12, 20, 231, 9, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 250, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 259, 8, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 268, 8, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 282, 8, 26, 1, 27, 1, 27, 1, 27, 3, 27, 287, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 315, 8, 31, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 321, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 327, 8, 34, 10, 34, 12, 34, 330, 9, 34, 1, 34, 3, 34, 333, 8, 34, 3, 34, 335, 8, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 346, 8, 36, 10, 36, 12, 36, 349, 9, 36, 1, 36, 3, 36, 352, 8, 36, 3, 36, 354, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 367, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 393, 8, 37, 10, 37, 12, 37, 396, 9, 37, 1, 37, 3, 37, 399, 8, 37, 3, 37, 401, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 407, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 465, 8, 37, 10, 37, 12, 37, 468, 9, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 477, 8, 39, 1, 40, 1, 40, 3, 40, 481, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 0, 1, 74, 43, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 0, 14, 1, 0, 4, 10, 2, 0, 10, 10, 21, 22, 1, 0, 23, 24, 1, 0, 36, 40, 2, 0, 36, 40, 42, 45, 2, 0, 5, 5, 50, 51, 1, 0, 52, 54, 2, 0, 51, 51, 55, 55, 1, 0, 56, 57, 1, 0, 6, 9, 1, 0, 58, 59, 1, 0, 46, 47, 1, 0, 73, 75, 2, 0, 73, 74, 81, 81, 515, 0, 89, 1, 0, 0, 0, 2, 106, 1, 0, 0, 0, 4, 111, 1, 0, 0, 0, 6, 113, 1, 0, 0, 0, 8, 118, 1, 0, 0, 0, 10, 122, 1, 0, 0, 0, 12, 124, 1, 0, 0, 0, 14, 130, 1, 0, 0, 0, 16, 132, 1, 0, 0, 0, 18, 144, 1, 0, 0, 0, 20, 156, 1, 0, 0, 0, 22, 161, 1, 0, 0, 0, 24, 170, 1, 0, 0, 0, 26, 186, 1, 0, 0, 0, 28, 198, 1, 0, 0, 0, 30, 204, 1, 0, 0, 0, 32, 214, 1, 0, 0, 0, 34, 216, 1, 0, 0, 0, 36, 218, 1, 0, 0, 0, 38, 223, 1, 0, 0, 0, 40, 225, 1, 0, 0, 0, 42, 236, 1, 0, 0, 0, 44, 249, 1, 0, 0, 0, 46, 251, 1, 0, 0, 0, 48, 262, 1, 0, 0, 0, 50, 271, 1, 0, 0, 0, 52, 274, 1, 0, 0, 0, 54, 286, 1, 0, 0, 0, 56, 288, 1, 0, 0, 0, 58, 296, 1, 0, 0, 0, 60, 302, 1, 0, 0, 0, 62, 314, 1, 0, 0, 0, 64, 316, 1, 0, 0, 0, 66, 320, 1, 0, 0, 0, 68, 322, 1, 0, 0, 0, 70, 338, 1, 0, 0, 0, 72, 341, 1, 0, 0, 0, 74, 406, 1, 0, 0, 0, 76, 469, 1, 0, 0, 0, 78, 476, 1, 0, 0, 0, 80, 478, 1, 0, 0, 0, 82, 482, 1, 0, 0, 0, 84, 484, 1, 0, 0, 0, 86, 88, 3, 2, 1, 0, 87, 86, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 95, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 92, 94, 3, 12, 6, 0, 93, 92, 1, 0, 0, 0, 94, 97, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 101, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 98, 100, 3, 14, 7, 0, 99, 98, 1, 0, 0, 0, 100, 103, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 104, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 104, 105, 5, 0, 0, 1, 105, 1, 1, 0, 0, 0, 106, 107, 5, 1, 0, 0, 107, 108, 3, 4, 2, 0, 108, 109, 3, 6, 3, 0, 109, 110, 5, 2, 0, 0, 110, 3, 1, 0, 0, 0, 111, 112, 5, 3, 0, 0, 112, 5, 1, 0, 0, 0, 113, 115, 3, 8, 4, 0, 114, 116, 3, 8, 4, 0, 115, 114, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 7, 1, 0, 0, 0, 117, 119, 3, 10, 5, 0, 118, 117, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 5, 67, 0, 0, 121, 9, 1, 0, 0, 0, 122, 123, 7, 0, 0, 0, 123, 11, 1, 0, 0, 0, 124, 125, 5, 11, 0, 0, 125, 126, 5, 77, 0, 0, 126, 127, 5, 2, 0, 0, 127, 13, 1, 0, 0, 0, 128, 131, 3, 16, 8, 0, 129, 131, 3, 18, 9, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0, 131, 15, 1, 0, 0, 0, 132, 133, 5, 12, 0, 0, 133, 134, 5, 83, 0, 0, 134, 140, 3, 24, 12, 0, 135, 136, 5, 13, 0, 0, 136, 137, 5, 14, 0, 0, 137, 138, 3, 82, 41, 0, 138, 139, 5, 15, 0, 0, 139, 141, 1, 0, 0, 0, 140, 135, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 3, 22, 11, 0, 143, 17, 1, 0, 0, 0, 144, 145, 5, 16, 0, 0, 145, 146, 5, 83, 0, 0, 146, 147, 3, 24, 12, 0, 147, 151, 5, 17, 0, 0, 148, 150, 3, 20, 10, 0, 149, 148, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 18, 0, 0, 155, 19, 1, 0, 0, 0, 156, 157, 5, 12, 0, 0, 157, 158, 5, 83, 0, 0, 158, 159, 3, 24, 12, 0, 159, 160, 3, 22, 11, 0, 160, 21, 1, 0, 0, 0, 161, 165, 5, 17, 0, 0, 162, 164, 3, 30, 15, 0, 163, 162, 1, 0, 0, 0, 164, 167, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 168, 1, 0, 0, 0, 167, 165, 1, 0, 0, 0, 168, 169, 5, 18, 0, 0, 169, 23, 1, 0, 0, 0, 170, 182, 5, 14, 0, 0, 171, 176, 3, 26, 13, 0, 172, 173, 5, 19, 0, 0, 173, 175, 3, 26, 13, 0, 174, 172, 1, 0, 0, 0, 175, 178, 1, 0, 0, 0, 176, 174, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 180, 1, 0, 0, 0, 178, 176, 1, 0, 0, 0, 179, 181, 5, 19, 0, 0, 180, 179, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 183, 1, 0, 0, 0, 182, 171, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 5, 15, 0, 0, 185, 25, 1, 0, 0, 0, 186, 187, 3, 82, 41, 0, 187, 188, 5, 83, 0, 0, 188, 27, 1, 0, 0, 0, 189, 193, 5, 17, 0, 0, 190, 192, 3, 30, 15, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 199, 5, 18, 0, 0, 197, 199, 3, 30, 15, 0, 198, 189, 1, 0, 0, 0, 198, 197, 1, 0, 0, 0, 199, 29, 1, 0, 0, 0, 200, 205, 3, 38, 19, 0, 201, 202, 3, 32, 16, 0, 202, 203, 5, 2, 0, 0, 203, 205, 1, 0, 0, 0, 204, 200, 1, 0, 0, 0, 204, 201, 1, 0, 0, 0, 205, 31, 1, 0, 0, 0, 206, 215, 3, 40, 20, 0, 207, 215, 3, 42, 21, 0, 208, 215, 3, 44, 22, 0, 209, 215, 3, 46, 23, 0, 210, 215, 3, 48, 24, 0, 211, 215, 3, 34, 17, 0, 212, 215, 3, 50, 25, 0, 213, 215, 3, 36, 18, 0, 214, 206, 1, 0, 0, 0, 214, 207, 1, 0, 0, 0, 214, 208, 1, 0, 0, 0, 214, 209, 1, 0, 0, 0, 214, 210, 1, 0, 0, 0, 214, 211, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 213, 1, 0, 0, 0, 215, 33, 1, 0, 0, 0, 216, 217, 3, 70, 35, 0, 217, 35, 1, 0, 0, 0, 218, 219, 5, 20, 0, 0, 219, 220, 3, 74, 37, 0, 220, 37, 1, 0, 0, 0, 221, 224, 3, 52, 26, 0, 222, 224, 3, 54, 27, 0, 223, 221, 1, 0, 0, 0, 223, 222, 1, 0, 0, 0, 224, 39, 1, 0, 0, 0, 225, 229, 3, 82, 41, 0, 226, 228, 3, 76, 38, 0, 227, 226, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 232, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 232, 233, 5, 83, 0, 0, 233, 234, 5, 10, 0, 0, 234, 235, 3, 74, 37, 0, 235, 41, 1, 0, 0, 0, 236, 237, 3, 82, 41, 0, 237, 238, 5, 83, 0, 0, 238, 239, 5, 19, 0, 0, 239, 240, 3, 82, 41, 0, 240, 241, 5, 83, 0, 0, 241, 242, 5, 10, 0, 0, 242, 243, 3, 74, 37, 0, 243, 43, 1, 0, 0, 0, 244, 245, 5, 83, 0, 0, 245, 246, 7, 1, 0, 0, 246, 250, 3, 74, 37, 0, 247, 248, 5, 83, 0, 0, 248, 250, 7, 2, 0, 0, 249, 244, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 250, 45, 1, 0, 0, 0, 251, 252, 5, 25, 0, 0, 252, 253, 5, 14, 0, 0, 253, 254, 5, 80, 0, 0, 254, 255, 5, 6, 0, 0, 255, 258, 3, 74, 37, 0, 256, 257, 5, 19, 0, 0, 257, 259, 3, 64, 32, 0, 258, 256, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 5, 15, 0, 0, 261, 47, 1, 0, 0, 0, 262, 263, 5, 25, 0, 0, 263, 264, 5, 14, 0, 0, 264, 267, 3, 74, 37, 0, 265, 266, 5, 19, 0, 0, 266, 268, 3, 64, 32, 0, 267, 265, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 270, 5, 15, 0, 0, 270, 49, 1, 0, 0, 0, 271, 272, 5, 26, 0, 0, 272, 273, 3, 68, 34, 0, 273, 51, 1, 0, 0, 0, 274, 275, 5, 27, 0, 0, 275, 276, 5, 14, 0, 0, 276, 277, 3, 74, 37, 0, 277, 278, 5, 15, 0, 0, 278, 281, 3, 28, 14, 0, 279, 280, 5, 28, 0, 0, 280, 282, 3, 28, 14, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 53, 1, 0, 0, 0, 283, 287, 3, 56, 28, 0, 284, 287, 3, 58, 29, 0, 285, 287, 3, 60, 30, 0, 286, 283, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 285, 1, 0, 0, 0, 287, 55, 1, 0, 0, 0, 288, 289, 5, 29, 0, 0, 289, 290, 3, 28, 14, 0, 290, 291, 5, 30, 0, 0, 291, 292, 5, 14, 0, 0, 292, 293, 3, 74, 37, 0, 293, 294, 5, 15, 0, 0, 294, 295, 5, 2, 0, 0, 295, 57, 1, 0, 0, 0, 296, 297, 5, 30, 0, 0, 297, 298, 5, 14, 0, 0, 298, 299, 3, 74, 37, 0, 299, 300, 5, 15, 0, 0, 300, 301, 3, 28, 14, 0, 301, 59, 1, 0, 0, 0, 302, 303, 5, 31, 0, 0, 303, 304, 5, 14, 0, 0, 304, 305, 3, 62, 31, 0, 305, 306, 5, 2, 0, 0, 306, 307, 3, 74, 37, 0, 307, 308, 5, 2, 0, 0, 308, 309, 3, 44, 22, 0, 309, 310, 5, 15, 0, 0, 310, 311, 3, 28, 14, 0, 311, 61, 1, 0, 0, 0, 312, 315, 3, 40, 20, 0, 313, 315, 3, 44, 22, 0, 314, 312, 1, 0, 0, 0, 314, 313, 1, 0, 0, 0, 315, 63, 1, 0, 0, 0, 316, 317, 5, 77, 0, 0, 317, 65, 1, 0, 0, 0, 318, 321, 5, 83, 0, 0, 319, 321, 3, 78, 39, 0, 320, 318, 1, 0, 0, 0, 320, 319, 1, 0, 0, 0, 321, 67, 1, 0, 0, 0, 322, 334, 5, 14, 0, 0, 323, 328, 3, 66, 33, 0, 324, 325, 5, 19, 0, 0, 325, 327, 3, 66, 33, 0, 326, 324, 1, 0, 0, 0, 327, 330, 1, 0, 0, 0, 328, 326, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 332, 1, 0, 0, 0, 330, 328, 1, 0, 0, 0, 331, 333, 5, 19, 0, 0, 332, 331, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 335, 1, 0, 0, 0, 334, 323, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 337, 5, 15, 0, 0, 337, 69, 1, 0, 0, 0, 338, 339, 5, 83, 0, 0, 339, 340, 3, 72, 36, 0, 340, 71, 1, 0, 0, 0, 341, 353, 5, 14, 0, 0, 342, 347, 3, 74, 37, 0, 343, 344, 5, 19, 0, 0, 344, 346, 3, 74, 37, 0, 345, 343, 1, 0, 0, 0, 346, 349, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 351, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 350, 352, 5, 19, 0, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353, 342, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 356, 5, 15, 0, 0, 356, 73, 1, 0, 0, 0, 357, 358, 6, 37, -1, 0, 358, 359, 5, 14, 0, 0, 359, 360, 3, 74, 37, 0, 360, 361, 5, 15, 0, 0, 361, 407, 1, 0, 0, 0, 362, 363, 3, 84, 42, 0, 363, 364, 5, 14, 0, 0, 364, 366, 3, 74, 37, 0, 365, 367, 5, 19, 0, 0, 366, 365, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 369, 5, 15, 0, 0, 369, 407, 1, 0, 0, 0, 370, 407, 3, 70, 35, 0, 371, 372, 5, 32, 0, 0, 372, 373, 5, 83, 0, 0, 373, 407, 3, 72, 36, 0, 374, 375, 5, 35, 0, 0, 375, 376, 5, 33, 0, 0, 376, 377, 3, 74, 37, 0, 377, 378, 5, 34, 0, 0, 378, 379, 7, 3, 0, 0, 379, 407, 1, 0, 0, 0, 380, 381, 5, 41, 0, 0, 381, 382, 5, 33, 0, 0, 382, 383, 3, 74, 37, 0, 383, 384, 5, 34, 0, 0, 384, 385, 7, 4, 0, 0, 385, 407, 1, 0, 0, 0, 386, 387, 7, 5, 0, 0, 387, 407, 3, 74, 37, 16, 388, 400, 5, 33, 0, 0, 389, 394, 3, 74, 37, 0, 390, 391, 5, 19, 0, 0, 391, 393, 3, 74, 37, 0, 392, 390, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 5, 19, 0, 0, 398, 397, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 401, 1, 0, 0, 0, 400, 389, 1, 0, 0, 0, 400, 401, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 407, 5, 34, 0, 0, 403, 407, 5, 82, 0, 0, 404, 407, 5, 83, 0, 0, 405, 407, 3, 78, 39, 0, 406, 357, 1, 0, 0, 0, 406, 362, 1, 0, 0, 0, 406, 370, 1, 0, 0, 0, 406, 371, 1, 0, 0, 0, 406, 374, 1, 0, 0, 0, 406, 380, 1, 0, 0, 0, 406, 386, 1, 0, 0, 0, 406, 388, 1, 0, 0, 0, 406, 403, 1, 0, 0, 0, 406, 404, 1, 0, 0, 0, 406, 405, 1, 0, 0, 0, 407, 466, 1, 0, 0, 0, 408, 409, 10, 15, 0, 0, 409, 410, 7, 6, 0, 0, 410, 465, 3, 74, 37, 16, 411, 412, 10, 14, 0, 0, 412, 413, 7, 7, 0, 0, 413, 465, 3, 74, 37, 15, 414, 415, 10, 13, 0, 0, 415, 416, 7, 8, 0, 0, 416, 465, 3, 74, 37, 14, 417, 418, 10, 12, 0, 0, 418, 419, 7, 9, 0, 0, 419, 465, 3, 74, 37, 13, 420, 421, 10, 11, 0, 0, 421, 422, 7, 10, 0, 0, 422, 465, 3, 74, 37, 12, 423, 424, 10, 10, 0, 0, 424, 425, 5, 60, 0, 0, 425, 465, 3, 74, 37, 11, 426, 427, 10, 9, 0, 0, 427, 428, 5, 4, 0, 0, 428, 465, 3, 74, 37, 10, 429, 430, 10, 8, 0, 0, 430, 431, 5, 61, 0, 0, 431, 465, 3, 74, 37, 9, 432, 433, 10, 7, 0, 0, 433, 434, 5, 62, 0, 0, 434, 465, 3, 74, 37, 8, 435, 436, 10, 6, 0, 0, 436, 437, 5, 63, 0, 0, 437, 465, 3, 74, 37, 7, 438, 439, 10, 5, 0, 0, 439, 440, 5, 64, 0, 0, 440, 441, 3, 74, 37, 0, 441, 442, 5, 65, 0, 0, 442, 443, 3, 74, 37, 5, 443, 465, 1, 0, 0, 0, 444, 445, 10, 22, 0, 0, 445, 446, 5, 33, 0, 0, 446, 447, 5, 70, 0, 0, 447, 465, 5, 34, 0, 0, 448, 449, 10, 19, 0, 0, 449, 465, 7, 11, 0, 0, 450, 451, 10, 18, 0, 0, 451, 452, 5, 48, 0, 0, 452, 453, 5, 14, 0, 0, 453, 454, 3, 74, 37, 0, 454, 455, 5, 15, 0, 0, 455, 465, 1, 0, 0, 0, 456, 457, 10, 17, 0, 0, 457, 458, 5, 49, 0, 0, 458, 459, 5, 14, 0, 0, 459, 460, 3, 74, 37, 0, 460, 461, 5, 19, 0, 0, 461, 462, 3, 74, 37, 0, 462, 463, 5, 15, 0, 0, 463, 465, 1, 0, 0, 0, 464, 408, 1, 0, 0, 0, 464, 411, 1, 0, 0, 0, 464, 414, 1, 0, 0, 0, 464, 417, 1, 0, 0, 0, 464, 420, 1, 0, 0, 0, 464, 423, 1, 0, 0, 0, 464, 426, 1, 0, 0, 0, 464, 429, 1, 0, 0, 0, 464, 432, 1, 0, 0, 0, 464, 435, 1, 0, 0, 0, 464, 438, 1, 0, 0, 0, 464, 444, 1, 0, 0, 0, 464, 448, 1, 0, 0, 0, 464, 450, 1, 0, 0, 0, 464, 456, 1, 0, 0, 0, 465, 468, 1, 0, 0, 0, 466, 464, 1, 0, 0, 0, 466, 467, 1, 0, 0, 0, 467, 75, 1, 0, 0, 0, 468, 466, 1, 0, 0, 0, 469, 470, 5, 66, 0, 0, 470, 77, 1, 0, 0, 0, 471, 477, 5, 68, 0, 0, 472, 477, 3, 80, 40, 0, 473, 477, 5, 77, 0, 0, 474, 477, 5, 78, 0, 0, 475, 477, 5, 79, 0, 0, 476, 471, 1, 0, 0, 0, 476, 472, 1, 0, 0, 0, 476, 473, 1, 0, 0, 0, 476, 474, 1, 0, 0, 0, 476, 475, 1, 0, 0, 0, 477, 79, 1, 0, 0, 0, 478, 480, 5, 70, 0, 0, 479, 481, 5, 69, 0, 0, 480, 479, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 81, 1, 0, 0, 0, 482, 483, 7, 12, 0, 0, 483, 83, 1, 0, 0, 0, 484, 485, 7, 13, 0, 0, 485, 85, 1, 0, 0, 0, 40, 89, 95, 101, 115, 118, 130, 140, 151, 165, 176, 180, 182, 193, 198, 204, 214, 223, 229, 249, 258, 267, 281, 286, 314, 320, 328, 332, 334, 347, 351, 353, 366, 394, 398, 400, 406, 464, 466, 476, 480] \ No newline at end of file diff --git a/packages/cashc/src/grammar/CashScript.tokens b/packages/cashc/src/grammar/CashScript.tokens index 16dc361d..a422fe39 100644 --- a/packages/cashc/src/grammar/CashScript.tokens +++ b/packages/cashc/src/grammar/CashScript.tokens @@ -62,26 +62,28 @@ T__60=61 T__61=62 T__62=63 T__63=64 -VersionLiteral=65 -BooleanLiteral=66 -NumberUnit=67 -NumberLiteral=68 -NumberPart=69 -ExponentPart=70 -PrimitiveType=71 -UnboundedBytes=72 -BoundedBytes=73 -Bound=74 -StringLiteral=75 -DateLiteral=76 -HexLiteral=77 -TxVar=78 -UnsafeCast=79 -NullaryOp=80 -Identifier=81 -WHITESPACE=82 -COMMENT=83 -LINE_COMMENT=84 +T__64=65 +T__65=66 +VersionLiteral=67 +BooleanLiteral=68 +NumberUnit=69 +NumberLiteral=70 +NumberPart=71 +ExponentPart=72 +PrimitiveType=73 +UnboundedBytes=74 +BoundedBytes=75 +Bound=76 +StringLiteral=77 +DateLiteral=78 +HexLiteral=79 +TxVar=80 +UnsafeCast=81 +NullaryOp=82 +Identifier=83 +WHITESPACE=84 +COMMENT=85 +LINE_COMMENT=86 'pragma'=1 ';'=2 'cashscript'=3 @@ -145,5 +147,7 @@ LINE_COMMENT=84 '|'=61 '&&'=62 '||'=63 -'constant'=64 -'bytes'=72 +'?'=64 +':'=65 +'constant'=66 +'bytes'=74 diff --git a/packages/cashc/src/grammar/CashScriptLexer.interp b/packages/cashc/src/grammar/CashScriptLexer.interp index d394bd0e..e4901b1e 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.interp +++ b/packages/cashc/src/grammar/CashScriptLexer.interp @@ -63,6 +63,8 @@ null '|' '&&' '||' +'?' +':' 'constant' null null @@ -151,6 +153,8 @@ null null null null +null +null VersionLiteral BooleanLiteral NumberUnit @@ -237,6 +241,8 @@ T__60 T__61 T__62 T__63 +T__64 +T__65 VersionLiteral BooleanLiteral NumberUnit @@ -266,4 +272,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 84, 966, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 4, 64, 557, 8, 64, 11, 64, 12, 64, 558, 1, 64, 1, 64, 4, 64, 563, 8, 64, 11, 64, 12, 64, 564, 1, 64, 1, 64, 4, 64, 569, 8, 64, 11, 64, 12, 64, 570, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 582, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 641, 8, 66, 1, 67, 3, 67, 644, 8, 67, 1, 67, 1, 67, 3, 67, 648, 8, 67, 1, 68, 4, 68, 651, 8, 68, 11, 68, 12, 68, 652, 1, 68, 1, 68, 4, 68, 657, 8, 68, 11, 68, 12, 68, 658, 5, 68, 661, 8, 68, 10, 68, 12, 68, 664, 9, 68, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 698, 8, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 717, 8, 72, 1, 73, 1, 73, 5, 73, 721, 8, 73, 10, 73, 12, 73, 724, 9, 73, 1, 74, 1, 74, 1, 74, 1, 74, 5, 74, 730, 8, 74, 10, 74, 12, 74, 733, 9, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 5, 74, 740, 8, 74, 10, 74, 12, 74, 743, 9, 74, 1, 74, 3, 74, 746, 8, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 5, 76, 760, 8, 76, 10, 76, 12, 76, 763, 9, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 3, 77, 780, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 3, 78, 817, 8, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 3, 78, 830, 8, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 3, 79, 926, 8, 79, 1, 80, 1, 80, 5, 80, 930, 8, 80, 10, 80, 12, 80, 933, 9, 80, 1, 81, 4, 81, 936, 8, 81, 11, 81, 12, 81, 937, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 5, 82, 946, 8, 82, 10, 82, 12, 82, 949, 9, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 5, 83, 960, 8, 83, 10, 83, 12, 83, 963, 9, 83, 1, 83, 1, 83, 3, 731, 741, 947, 0, 84, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 1, 0, 11, 1, 0, 48, 57, 2, 0, 69, 69, 101, 101, 1, 0, 49, 57, 3, 0, 10, 10, 13, 13, 34, 34, 3, 0, 10, 10, 13, 13, 39, 39, 2, 0, 88, 88, 120, 120, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 65, 90, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 12, 13, 32, 32, 2, 0, 10, 10, 13, 13, 1010, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 1, 169, 1, 0, 0, 0, 3, 176, 1, 0, 0, 0, 5, 178, 1, 0, 0, 0, 7, 189, 1, 0, 0, 0, 9, 191, 1, 0, 0, 0, 11, 193, 1, 0, 0, 0, 13, 196, 1, 0, 0, 0, 15, 198, 1, 0, 0, 0, 17, 200, 1, 0, 0, 0, 19, 203, 1, 0, 0, 0, 21, 205, 1, 0, 0, 0, 23, 212, 1, 0, 0, 0, 25, 221, 1, 0, 0, 0, 27, 229, 1, 0, 0, 0, 29, 231, 1, 0, 0, 0, 31, 233, 1, 0, 0, 0, 33, 242, 1, 0, 0, 0, 35, 244, 1, 0, 0, 0, 37, 246, 1, 0, 0, 0, 39, 248, 1, 0, 0, 0, 41, 255, 1, 0, 0, 0, 43, 258, 1, 0, 0, 0, 45, 261, 1, 0, 0, 0, 47, 264, 1, 0, 0, 0, 49, 267, 1, 0, 0, 0, 51, 275, 1, 0, 0, 0, 53, 287, 1, 0, 0, 0, 55, 290, 1, 0, 0, 0, 57, 295, 1, 0, 0, 0, 59, 298, 1, 0, 0, 0, 61, 304, 1, 0, 0, 0, 63, 308, 1, 0, 0, 0, 65, 312, 1, 0, 0, 0, 67, 314, 1, 0, 0, 0, 69, 316, 1, 0, 0, 0, 71, 327, 1, 0, 0, 0, 73, 334, 1, 0, 0, 0, 75, 351, 1, 0, 0, 0, 77, 366, 1, 0, 0, 0, 79, 381, 1, 0, 0, 0, 81, 394, 1, 0, 0, 0, 83, 404, 1, 0, 0, 0, 85, 429, 1, 0, 0, 0, 87, 444, 1, 0, 0, 0, 89, 463, 1, 0, 0, 0, 91, 479, 1, 0, 0, 0, 93, 490, 1, 0, 0, 0, 95, 498, 1, 0, 0, 0, 97, 505, 1, 0, 0, 0, 99, 512, 1, 0, 0, 0, 101, 514, 1, 0, 0, 0, 103, 516, 1, 0, 0, 0, 105, 518, 1, 0, 0, 0, 107, 520, 1, 0, 0, 0, 109, 522, 1, 0, 0, 0, 111, 524, 1, 0, 0, 0, 113, 527, 1, 0, 0, 0, 115, 530, 1, 0, 0, 0, 117, 533, 1, 0, 0, 0, 119, 536, 1, 0, 0, 0, 121, 538, 1, 0, 0, 0, 123, 540, 1, 0, 0, 0, 125, 543, 1, 0, 0, 0, 127, 546, 1, 0, 0, 0, 129, 556, 1, 0, 0, 0, 131, 581, 1, 0, 0, 0, 133, 640, 1, 0, 0, 0, 135, 643, 1, 0, 0, 0, 137, 650, 1, 0, 0, 0, 139, 665, 1, 0, 0, 0, 141, 697, 1, 0, 0, 0, 143, 699, 1, 0, 0, 0, 145, 716, 1, 0, 0, 0, 147, 718, 1, 0, 0, 0, 149, 745, 1, 0, 0, 0, 151, 747, 1, 0, 0, 0, 153, 756, 1, 0, 0, 0, 155, 779, 1, 0, 0, 0, 157, 829, 1, 0, 0, 0, 159, 925, 1, 0, 0, 0, 161, 927, 1, 0, 0, 0, 163, 935, 1, 0, 0, 0, 165, 941, 1, 0, 0, 0, 167, 955, 1, 0, 0, 0, 169, 170, 5, 112, 0, 0, 170, 171, 5, 114, 0, 0, 171, 172, 5, 97, 0, 0, 172, 173, 5, 103, 0, 0, 173, 174, 5, 109, 0, 0, 174, 175, 5, 97, 0, 0, 175, 2, 1, 0, 0, 0, 176, 177, 5, 59, 0, 0, 177, 4, 1, 0, 0, 0, 178, 179, 5, 99, 0, 0, 179, 180, 5, 97, 0, 0, 180, 181, 5, 115, 0, 0, 181, 182, 5, 104, 0, 0, 182, 183, 5, 115, 0, 0, 183, 184, 5, 99, 0, 0, 184, 185, 5, 114, 0, 0, 185, 186, 5, 105, 0, 0, 186, 187, 5, 112, 0, 0, 187, 188, 5, 116, 0, 0, 188, 6, 1, 0, 0, 0, 189, 190, 5, 94, 0, 0, 190, 8, 1, 0, 0, 0, 191, 192, 5, 126, 0, 0, 192, 10, 1, 0, 0, 0, 193, 194, 5, 62, 0, 0, 194, 195, 5, 61, 0, 0, 195, 12, 1, 0, 0, 0, 196, 197, 5, 62, 0, 0, 197, 14, 1, 0, 0, 0, 198, 199, 5, 60, 0, 0, 199, 16, 1, 0, 0, 0, 200, 201, 5, 60, 0, 0, 201, 202, 5, 61, 0, 0, 202, 18, 1, 0, 0, 0, 203, 204, 5, 61, 0, 0, 204, 20, 1, 0, 0, 0, 205, 206, 5, 105, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, 112, 0, 0, 208, 209, 5, 111, 0, 0, 209, 210, 5, 114, 0, 0, 210, 211, 5, 116, 0, 0, 211, 22, 1, 0, 0, 0, 212, 213, 5, 102, 0, 0, 213, 214, 5, 117, 0, 0, 214, 215, 5, 110, 0, 0, 215, 216, 5, 99, 0, 0, 216, 217, 5, 116, 0, 0, 217, 218, 5, 105, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 110, 0, 0, 220, 24, 1, 0, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 101, 0, 0, 223, 224, 5, 116, 0, 0, 224, 225, 5, 117, 0, 0, 225, 226, 5, 114, 0, 0, 226, 227, 5, 110, 0, 0, 227, 228, 5, 115, 0, 0, 228, 26, 1, 0, 0, 0, 229, 230, 5, 40, 0, 0, 230, 28, 1, 0, 0, 0, 231, 232, 5, 41, 0, 0, 232, 30, 1, 0, 0, 0, 233, 234, 5, 99, 0, 0, 234, 235, 5, 111, 0, 0, 235, 236, 5, 110, 0, 0, 236, 237, 5, 116, 0, 0, 237, 238, 5, 114, 0, 0, 238, 239, 5, 97, 0, 0, 239, 240, 5, 99, 0, 0, 240, 241, 5, 116, 0, 0, 241, 32, 1, 0, 0, 0, 242, 243, 5, 123, 0, 0, 243, 34, 1, 0, 0, 0, 244, 245, 5, 125, 0, 0, 245, 36, 1, 0, 0, 0, 246, 247, 5, 44, 0, 0, 247, 38, 1, 0, 0, 0, 248, 249, 5, 114, 0, 0, 249, 250, 5, 101, 0, 0, 250, 251, 5, 116, 0, 0, 251, 252, 5, 117, 0, 0, 252, 253, 5, 114, 0, 0, 253, 254, 5, 110, 0, 0, 254, 40, 1, 0, 0, 0, 255, 256, 5, 43, 0, 0, 256, 257, 5, 61, 0, 0, 257, 42, 1, 0, 0, 0, 258, 259, 5, 45, 0, 0, 259, 260, 5, 61, 0, 0, 260, 44, 1, 0, 0, 0, 261, 262, 5, 43, 0, 0, 262, 263, 5, 43, 0, 0, 263, 46, 1, 0, 0, 0, 264, 265, 5, 45, 0, 0, 265, 266, 5, 45, 0, 0, 266, 48, 1, 0, 0, 0, 267, 268, 5, 114, 0, 0, 268, 269, 5, 101, 0, 0, 269, 270, 5, 113, 0, 0, 270, 271, 5, 117, 0, 0, 271, 272, 5, 105, 0, 0, 272, 273, 5, 114, 0, 0, 273, 274, 5, 101, 0, 0, 274, 50, 1, 0, 0, 0, 275, 276, 5, 99, 0, 0, 276, 277, 5, 111, 0, 0, 277, 278, 5, 110, 0, 0, 278, 279, 5, 115, 0, 0, 279, 280, 5, 111, 0, 0, 280, 281, 5, 108, 0, 0, 281, 282, 5, 101, 0, 0, 282, 283, 5, 46, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 111, 0, 0, 285, 286, 5, 103, 0, 0, 286, 52, 1, 0, 0, 0, 287, 288, 5, 105, 0, 0, 288, 289, 5, 102, 0, 0, 289, 54, 1, 0, 0, 0, 290, 291, 5, 101, 0, 0, 291, 292, 5, 108, 0, 0, 292, 293, 5, 115, 0, 0, 293, 294, 5, 101, 0, 0, 294, 56, 1, 0, 0, 0, 295, 296, 5, 100, 0, 0, 296, 297, 5, 111, 0, 0, 297, 58, 1, 0, 0, 0, 298, 299, 5, 119, 0, 0, 299, 300, 5, 104, 0, 0, 300, 301, 5, 105, 0, 0, 301, 302, 5, 108, 0, 0, 302, 303, 5, 101, 0, 0, 303, 60, 1, 0, 0, 0, 304, 305, 5, 102, 0, 0, 305, 306, 5, 111, 0, 0, 306, 307, 5, 114, 0, 0, 307, 62, 1, 0, 0, 0, 308, 309, 5, 110, 0, 0, 309, 310, 5, 101, 0, 0, 310, 311, 5, 119, 0, 0, 311, 64, 1, 0, 0, 0, 312, 313, 5, 91, 0, 0, 313, 66, 1, 0, 0, 0, 314, 315, 5, 93, 0, 0, 315, 68, 1, 0, 0, 0, 316, 317, 5, 116, 0, 0, 317, 318, 5, 120, 0, 0, 318, 319, 5, 46, 0, 0, 319, 320, 5, 111, 0, 0, 320, 321, 5, 117, 0, 0, 321, 322, 5, 116, 0, 0, 322, 323, 5, 112, 0, 0, 323, 324, 5, 117, 0, 0, 324, 325, 5, 116, 0, 0, 325, 326, 5, 115, 0, 0, 326, 70, 1, 0, 0, 0, 327, 328, 5, 46, 0, 0, 328, 329, 5, 118, 0, 0, 329, 330, 5, 97, 0, 0, 330, 331, 5, 108, 0, 0, 331, 332, 5, 117, 0, 0, 332, 333, 5, 101, 0, 0, 333, 72, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 108, 0, 0, 336, 337, 5, 111, 0, 0, 337, 338, 5, 99, 0, 0, 338, 339, 5, 107, 0, 0, 339, 340, 5, 105, 0, 0, 340, 341, 5, 110, 0, 0, 341, 342, 5, 103, 0, 0, 342, 343, 5, 66, 0, 0, 343, 344, 5, 121, 0, 0, 344, 345, 5, 116, 0, 0, 345, 346, 5, 101, 0, 0, 346, 347, 5, 99, 0, 0, 347, 348, 5, 111, 0, 0, 348, 349, 5, 100, 0, 0, 349, 350, 5, 101, 0, 0, 350, 74, 1, 0, 0, 0, 351, 352, 5, 46, 0, 0, 352, 353, 5, 116, 0, 0, 353, 354, 5, 111, 0, 0, 354, 355, 5, 107, 0, 0, 355, 356, 5, 101, 0, 0, 356, 357, 5, 110, 0, 0, 357, 358, 5, 67, 0, 0, 358, 359, 5, 97, 0, 0, 359, 360, 5, 116, 0, 0, 360, 361, 5, 101, 0, 0, 361, 362, 5, 103, 0, 0, 362, 363, 5, 111, 0, 0, 363, 364, 5, 114, 0, 0, 364, 365, 5, 121, 0, 0, 365, 76, 1, 0, 0, 0, 366, 367, 5, 46, 0, 0, 367, 368, 5, 110, 0, 0, 368, 369, 5, 102, 0, 0, 369, 370, 5, 116, 0, 0, 370, 371, 5, 67, 0, 0, 371, 372, 5, 111, 0, 0, 372, 373, 5, 109, 0, 0, 373, 374, 5, 109, 0, 0, 374, 375, 5, 105, 0, 0, 375, 376, 5, 116, 0, 0, 376, 377, 5, 109, 0, 0, 377, 378, 5, 101, 0, 0, 378, 379, 5, 110, 0, 0, 379, 380, 5, 116, 0, 0, 380, 78, 1, 0, 0, 0, 381, 382, 5, 46, 0, 0, 382, 383, 5, 116, 0, 0, 383, 384, 5, 111, 0, 0, 384, 385, 5, 107, 0, 0, 385, 386, 5, 101, 0, 0, 386, 387, 5, 110, 0, 0, 387, 388, 5, 65, 0, 0, 388, 389, 5, 109, 0, 0, 389, 390, 5, 111, 0, 0, 390, 391, 5, 117, 0, 0, 391, 392, 5, 110, 0, 0, 392, 393, 5, 116, 0, 0, 393, 80, 1, 0, 0, 0, 394, 395, 5, 116, 0, 0, 395, 396, 5, 120, 0, 0, 396, 397, 5, 46, 0, 0, 397, 398, 5, 105, 0, 0, 398, 399, 5, 110, 0, 0, 399, 400, 5, 112, 0, 0, 400, 401, 5, 117, 0, 0, 401, 402, 5, 116, 0, 0, 402, 403, 5, 115, 0, 0, 403, 82, 1, 0, 0, 0, 404, 405, 5, 46, 0, 0, 405, 406, 5, 111, 0, 0, 406, 407, 5, 117, 0, 0, 407, 408, 5, 116, 0, 0, 408, 409, 5, 112, 0, 0, 409, 410, 5, 111, 0, 0, 410, 411, 5, 105, 0, 0, 411, 412, 5, 110, 0, 0, 412, 413, 5, 116, 0, 0, 413, 414, 5, 84, 0, 0, 414, 415, 5, 114, 0, 0, 415, 416, 5, 97, 0, 0, 416, 417, 5, 110, 0, 0, 417, 418, 5, 115, 0, 0, 418, 419, 5, 97, 0, 0, 419, 420, 5, 99, 0, 0, 420, 421, 5, 116, 0, 0, 421, 422, 5, 105, 0, 0, 422, 423, 5, 111, 0, 0, 423, 424, 5, 110, 0, 0, 424, 425, 5, 72, 0, 0, 425, 426, 5, 97, 0, 0, 426, 427, 5, 115, 0, 0, 427, 428, 5, 104, 0, 0, 428, 84, 1, 0, 0, 0, 429, 430, 5, 46, 0, 0, 430, 431, 5, 111, 0, 0, 431, 432, 5, 117, 0, 0, 432, 433, 5, 116, 0, 0, 433, 434, 5, 112, 0, 0, 434, 435, 5, 111, 0, 0, 435, 436, 5, 105, 0, 0, 436, 437, 5, 110, 0, 0, 437, 438, 5, 116, 0, 0, 438, 439, 5, 73, 0, 0, 439, 440, 5, 110, 0, 0, 440, 441, 5, 100, 0, 0, 441, 442, 5, 101, 0, 0, 442, 443, 5, 120, 0, 0, 443, 86, 1, 0, 0, 0, 444, 445, 5, 46, 0, 0, 445, 446, 5, 117, 0, 0, 446, 447, 5, 110, 0, 0, 447, 448, 5, 108, 0, 0, 448, 449, 5, 111, 0, 0, 449, 450, 5, 99, 0, 0, 450, 451, 5, 107, 0, 0, 451, 452, 5, 105, 0, 0, 452, 453, 5, 110, 0, 0, 453, 454, 5, 103, 0, 0, 454, 455, 5, 66, 0, 0, 455, 456, 5, 121, 0, 0, 456, 457, 5, 116, 0, 0, 457, 458, 5, 101, 0, 0, 458, 459, 5, 99, 0, 0, 459, 460, 5, 111, 0, 0, 460, 461, 5, 100, 0, 0, 461, 462, 5, 101, 0, 0, 462, 88, 1, 0, 0, 0, 463, 464, 5, 46, 0, 0, 464, 465, 5, 115, 0, 0, 465, 466, 5, 101, 0, 0, 466, 467, 5, 113, 0, 0, 467, 468, 5, 117, 0, 0, 468, 469, 5, 101, 0, 0, 469, 470, 5, 110, 0, 0, 470, 471, 5, 99, 0, 0, 471, 472, 5, 101, 0, 0, 472, 473, 5, 78, 0, 0, 473, 474, 5, 117, 0, 0, 474, 475, 5, 109, 0, 0, 475, 476, 5, 98, 0, 0, 476, 477, 5, 101, 0, 0, 477, 478, 5, 114, 0, 0, 478, 90, 1, 0, 0, 0, 479, 480, 5, 46, 0, 0, 480, 481, 5, 114, 0, 0, 481, 482, 5, 101, 0, 0, 482, 483, 5, 118, 0, 0, 483, 484, 5, 101, 0, 0, 484, 485, 5, 114, 0, 0, 485, 486, 5, 115, 0, 0, 486, 487, 5, 101, 0, 0, 487, 488, 5, 40, 0, 0, 488, 489, 5, 41, 0, 0, 489, 92, 1, 0, 0, 0, 490, 491, 5, 46, 0, 0, 491, 492, 5, 108, 0, 0, 492, 493, 5, 101, 0, 0, 493, 494, 5, 110, 0, 0, 494, 495, 5, 103, 0, 0, 495, 496, 5, 116, 0, 0, 496, 497, 5, 104, 0, 0, 497, 94, 1, 0, 0, 0, 498, 499, 5, 46, 0, 0, 499, 500, 5, 115, 0, 0, 500, 501, 5, 112, 0, 0, 501, 502, 5, 108, 0, 0, 502, 503, 5, 105, 0, 0, 503, 504, 5, 116, 0, 0, 504, 96, 1, 0, 0, 0, 505, 506, 5, 46, 0, 0, 506, 507, 5, 115, 0, 0, 507, 508, 5, 108, 0, 0, 508, 509, 5, 105, 0, 0, 509, 510, 5, 99, 0, 0, 510, 511, 5, 101, 0, 0, 511, 98, 1, 0, 0, 0, 512, 513, 5, 33, 0, 0, 513, 100, 1, 0, 0, 0, 514, 515, 5, 45, 0, 0, 515, 102, 1, 0, 0, 0, 516, 517, 5, 42, 0, 0, 517, 104, 1, 0, 0, 0, 518, 519, 5, 47, 0, 0, 519, 106, 1, 0, 0, 0, 520, 521, 5, 37, 0, 0, 521, 108, 1, 0, 0, 0, 522, 523, 5, 43, 0, 0, 523, 110, 1, 0, 0, 0, 524, 525, 5, 62, 0, 0, 525, 526, 5, 62, 0, 0, 526, 112, 1, 0, 0, 0, 527, 528, 5, 60, 0, 0, 528, 529, 5, 60, 0, 0, 529, 114, 1, 0, 0, 0, 530, 531, 5, 61, 0, 0, 531, 532, 5, 61, 0, 0, 532, 116, 1, 0, 0, 0, 533, 534, 5, 33, 0, 0, 534, 535, 5, 61, 0, 0, 535, 118, 1, 0, 0, 0, 536, 537, 5, 38, 0, 0, 537, 120, 1, 0, 0, 0, 538, 539, 5, 124, 0, 0, 539, 122, 1, 0, 0, 0, 540, 541, 5, 38, 0, 0, 541, 542, 5, 38, 0, 0, 542, 124, 1, 0, 0, 0, 543, 544, 5, 124, 0, 0, 544, 545, 5, 124, 0, 0, 545, 126, 1, 0, 0, 0, 546, 547, 5, 99, 0, 0, 547, 548, 5, 111, 0, 0, 548, 549, 5, 110, 0, 0, 549, 550, 5, 115, 0, 0, 550, 551, 5, 116, 0, 0, 551, 552, 5, 97, 0, 0, 552, 553, 5, 110, 0, 0, 553, 554, 5, 116, 0, 0, 554, 128, 1, 0, 0, 0, 555, 557, 7, 0, 0, 0, 556, 555, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 556, 1, 0, 0, 0, 558, 559, 1, 0, 0, 0, 559, 560, 1, 0, 0, 0, 560, 562, 5, 46, 0, 0, 561, 563, 7, 0, 0, 0, 562, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, 565, 566, 1, 0, 0, 0, 566, 568, 5, 46, 0, 0, 567, 569, 7, 0, 0, 0, 568, 567, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 568, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 130, 1, 0, 0, 0, 572, 573, 5, 116, 0, 0, 573, 574, 5, 114, 0, 0, 574, 575, 5, 117, 0, 0, 575, 582, 5, 101, 0, 0, 576, 577, 5, 102, 0, 0, 577, 578, 5, 97, 0, 0, 578, 579, 5, 108, 0, 0, 579, 580, 5, 115, 0, 0, 580, 582, 5, 101, 0, 0, 581, 572, 1, 0, 0, 0, 581, 576, 1, 0, 0, 0, 582, 132, 1, 0, 0, 0, 583, 584, 5, 115, 0, 0, 584, 585, 5, 97, 0, 0, 585, 586, 5, 116, 0, 0, 586, 587, 5, 111, 0, 0, 587, 588, 5, 115, 0, 0, 588, 589, 5, 104, 0, 0, 589, 590, 5, 105, 0, 0, 590, 641, 5, 115, 0, 0, 591, 592, 5, 115, 0, 0, 592, 593, 5, 97, 0, 0, 593, 594, 5, 116, 0, 0, 594, 641, 5, 115, 0, 0, 595, 596, 5, 102, 0, 0, 596, 597, 5, 105, 0, 0, 597, 598, 5, 110, 0, 0, 598, 599, 5, 110, 0, 0, 599, 600, 5, 101, 0, 0, 600, 641, 5, 121, 0, 0, 601, 602, 5, 98, 0, 0, 602, 603, 5, 105, 0, 0, 603, 604, 5, 116, 0, 0, 604, 641, 5, 115, 0, 0, 605, 606, 5, 98, 0, 0, 606, 607, 5, 105, 0, 0, 607, 608, 5, 116, 0, 0, 608, 609, 5, 99, 0, 0, 609, 610, 5, 111, 0, 0, 610, 611, 5, 105, 0, 0, 611, 641, 5, 110, 0, 0, 612, 613, 5, 115, 0, 0, 613, 614, 5, 101, 0, 0, 614, 615, 5, 99, 0, 0, 615, 616, 5, 111, 0, 0, 616, 617, 5, 110, 0, 0, 617, 618, 5, 100, 0, 0, 618, 641, 5, 115, 0, 0, 619, 620, 5, 109, 0, 0, 620, 621, 5, 105, 0, 0, 621, 622, 5, 110, 0, 0, 622, 623, 5, 117, 0, 0, 623, 624, 5, 116, 0, 0, 624, 625, 5, 101, 0, 0, 625, 641, 5, 115, 0, 0, 626, 627, 5, 104, 0, 0, 627, 628, 5, 111, 0, 0, 628, 629, 5, 117, 0, 0, 629, 630, 5, 114, 0, 0, 630, 641, 5, 115, 0, 0, 631, 632, 5, 100, 0, 0, 632, 633, 5, 97, 0, 0, 633, 634, 5, 121, 0, 0, 634, 641, 5, 115, 0, 0, 635, 636, 5, 119, 0, 0, 636, 637, 5, 101, 0, 0, 637, 638, 5, 101, 0, 0, 638, 639, 5, 107, 0, 0, 639, 641, 5, 115, 0, 0, 640, 583, 1, 0, 0, 0, 640, 591, 1, 0, 0, 0, 640, 595, 1, 0, 0, 0, 640, 601, 1, 0, 0, 0, 640, 605, 1, 0, 0, 0, 640, 612, 1, 0, 0, 0, 640, 619, 1, 0, 0, 0, 640, 626, 1, 0, 0, 0, 640, 631, 1, 0, 0, 0, 640, 635, 1, 0, 0, 0, 641, 134, 1, 0, 0, 0, 642, 644, 5, 45, 0, 0, 643, 642, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 645, 1, 0, 0, 0, 645, 647, 3, 137, 68, 0, 646, 648, 3, 139, 69, 0, 647, 646, 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 136, 1, 0, 0, 0, 649, 651, 7, 0, 0, 0, 650, 649, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 662, 1, 0, 0, 0, 654, 656, 5, 95, 0, 0, 655, 657, 7, 0, 0, 0, 656, 655, 1, 0, 0, 0, 657, 658, 1, 0, 0, 0, 658, 656, 1, 0, 0, 0, 658, 659, 1, 0, 0, 0, 659, 661, 1, 0, 0, 0, 660, 654, 1, 0, 0, 0, 661, 664, 1, 0, 0, 0, 662, 660, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 138, 1, 0, 0, 0, 664, 662, 1, 0, 0, 0, 665, 666, 7, 1, 0, 0, 666, 667, 3, 137, 68, 0, 667, 140, 1, 0, 0, 0, 668, 669, 5, 105, 0, 0, 669, 670, 5, 110, 0, 0, 670, 698, 5, 116, 0, 0, 671, 672, 5, 98, 0, 0, 672, 673, 5, 111, 0, 0, 673, 674, 5, 111, 0, 0, 674, 698, 5, 108, 0, 0, 675, 676, 5, 115, 0, 0, 676, 677, 5, 116, 0, 0, 677, 678, 5, 114, 0, 0, 678, 679, 5, 105, 0, 0, 679, 680, 5, 110, 0, 0, 680, 698, 5, 103, 0, 0, 681, 682, 5, 112, 0, 0, 682, 683, 5, 117, 0, 0, 683, 684, 5, 98, 0, 0, 684, 685, 5, 107, 0, 0, 685, 686, 5, 101, 0, 0, 686, 698, 5, 121, 0, 0, 687, 688, 5, 115, 0, 0, 688, 689, 5, 105, 0, 0, 689, 698, 5, 103, 0, 0, 690, 691, 5, 100, 0, 0, 691, 692, 5, 97, 0, 0, 692, 693, 5, 116, 0, 0, 693, 694, 5, 97, 0, 0, 694, 695, 5, 115, 0, 0, 695, 696, 5, 105, 0, 0, 696, 698, 5, 103, 0, 0, 697, 668, 1, 0, 0, 0, 697, 671, 1, 0, 0, 0, 697, 675, 1, 0, 0, 0, 697, 681, 1, 0, 0, 0, 697, 687, 1, 0, 0, 0, 697, 690, 1, 0, 0, 0, 698, 142, 1, 0, 0, 0, 699, 700, 5, 98, 0, 0, 700, 701, 5, 121, 0, 0, 701, 702, 5, 116, 0, 0, 702, 703, 5, 101, 0, 0, 703, 704, 5, 115, 0, 0, 704, 144, 1, 0, 0, 0, 705, 706, 5, 98, 0, 0, 706, 707, 5, 121, 0, 0, 707, 708, 5, 116, 0, 0, 708, 709, 5, 101, 0, 0, 709, 710, 5, 115, 0, 0, 710, 711, 1, 0, 0, 0, 711, 717, 3, 147, 73, 0, 712, 713, 5, 98, 0, 0, 713, 714, 5, 121, 0, 0, 714, 715, 5, 116, 0, 0, 715, 717, 5, 101, 0, 0, 716, 705, 1, 0, 0, 0, 716, 712, 1, 0, 0, 0, 717, 146, 1, 0, 0, 0, 718, 722, 7, 2, 0, 0, 719, 721, 7, 0, 0, 0, 720, 719, 1, 0, 0, 0, 721, 724, 1, 0, 0, 0, 722, 720, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 148, 1, 0, 0, 0, 724, 722, 1, 0, 0, 0, 725, 731, 5, 34, 0, 0, 726, 727, 5, 92, 0, 0, 727, 730, 5, 34, 0, 0, 728, 730, 8, 3, 0, 0, 729, 726, 1, 0, 0, 0, 729, 728, 1, 0, 0, 0, 730, 733, 1, 0, 0, 0, 731, 732, 1, 0, 0, 0, 731, 729, 1, 0, 0, 0, 732, 734, 1, 0, 0, 0, 733, 731, 1, 0, 0, 0, 734, 746, 5, 34, 0, 0, 735, 741, 5, 39, 0, 0, 736, 737, 5, 92, 0, 0, 737, 740, 5, 39, 0, 0, 738, 740, 8, 4, 0, 0, 739, 736, 1, 0, 0, 0, 739, 738, 1, 0, 0, 0, 740, 743, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 741, 739, 1, 0, 0, 0, 742, 744, 1, 0, 0, 0, 743, 741, 1, 0, 0, 0, 744, 746, 5, 39, 0, 0, 745, 725, 1, 0, 0, 0, 745, 735, 1, 0, 0, 0, 746, 150, 1, 0, 0, 0, 747, 748, 5, 100, 0, 0, 748, 749, 5, 97, 0, 0, 749, 750, 5, 116, 0, 0, 750, 751, 5, 101, 0, 0, 751, 752, 5, 40, 0, 0, 752, 753, 1, 0, 0, 0, 753, 754, 3, 149, 74, 0, 754, 755, 5, 41, 0, 0, 755, 152, 1, 0, 0, 0, 756, 757, 5, 48, 0, 0, 757, 761, 7, 5, 0, 0, 758, 760, 7, 6, 0, 0, 759, 758, 1, 0, 0, 0, 760, 763, 1, 0, 0, 0, 761, 759, 1, 0, 0, 0, 761, 762, 1, 0, 0, 0, 762, 154, 1, 0, 0, 0, 763, 761, 1, 0, 0, 0, 764, 765, 5, 116, 0, 0, 765, 766, 5, 104, 0, 0, 766, 767, 5, 105, 0, 0, 767, 768, 5, 115, 0, 0, 768, 769, 5, 46, 0, 0, 769, 770, 5, 97, 0, 0, 770, 771, 5, 103, 0, 0, 771, 780, 5, 101, 0, 0, 772, 773, 5, 116, 0, 0, 773, 774, 5, 120, 0, 0, 774, 775, 5, 46, 0, 0, 775, 776, 5, 116, 0, 0, 776, 777, 5, 105, 0, 0, 777, 778, 5, 109, 0, 0, 778, 780, 5, 101, 0, 0, 779, 764, 1, 0, 0, 0, 779, 772, 1, 0, 0, 0, 780, 156, 1, 0, 0, 0, 781, 782, 5, 117, 0, 0, 782, 783, 5, 110, 0, 0, 783, 784, 5, 115, 0, 0, 784, 785, 5, 97, 0, 0, 785, 786, 5, 102, 0, 0, 786, 787, 5, 101, 0, 0, 787, 788, 5, 95, 0, 0, 788, 789, 5, 105, 0, 0, 789, 790, 5, 110, 0, 0, 790, 830, 5, 116, 0, 0, 791, 792, 5, 117, 0, 0, 792, 793, 5, 110, 0, 0, 793, 794, 5, 115, 0, 0, 794, 795, 5, 97, 0, 0, 795, 796, 5, 102, 0, 0, 796, 797, 5, 101, 0, 0, 797, 798, 5, 95, 0, 0, 798, 799, 5, 98, 0, 0, 799, 800, 5, 111, 0, 0, 800, 801, 5, 111, 0, 0, 801, 830, 5, 108, 0, 0, 802, 803, 5, 117, 0, 0, 803, 804, 5, 110, 0, 0, 804, 805, 5, 115, 0, 0, 805, 806, 5, 97, 0, 0, 806, 807, 5, 102, 0, 0, 807, 808, 5, 101, 0, 0, 808, 809, 5, 95, 0, 0, 809, 810, 5, 98, 0, 0, 810, 811, 5, 121, 0, 0, 811, 812, 5, 116, 0, 0, 812, 813, 5, 101, 0, 0, 813, 814, 5, 115, 0, 0, 814, 816, 1, 0, 0, 0, 815, 817, 3, 147, 73, 0, 816, 815, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 830, 1, 0, 0, 0, 818, 819, 5, 117, 0, 0, 819, 820, 5, 110, 0, 0, 820, 821, 5, 115, 0, 0, 821, 822, 5, 97, 0, 0, 822, 823, 5, 102, 0, 0, 823, 824, 5, 101, 0, 0, 824, 825, 5, 95, 0, 0, 825, 826, 5, 98, 0, 0, 826, 827, 5, 121, 0, 0, 827, 828, 5, 116, 0, 0, 828, 830, 5, 101, 0, 0, 829, 781, 1, 0, 0, 0, 829, 791, 1, 0, 0, 0, 829, 802, 1, 0, 0, 0, 829, 818, 1, 0, 0, 0, 830, 158, 1, 0, 0, 0, 831, 832, 5, 116, 0, 0, 832, 833, 5, 104, 0, 0, 833, 834, 5, 105, 0, 0, 834, 835, 5, 115, 0, 0, 835, 836, 5, 46, 0, 0, 836, 837, 5, 97, 0, 0, 837, 838, 5, 99, 0, 0, 838, 839, 5, 116, 0, 0, 839, 840, 5, 105, 0, 0, 840, 841, 5, 118, 0, 0, 841, 842, 5, 101, 0, 0, 842, 843, 5, 73, 0, 0, 843, 844, 5, 110, 0, 0, 844, 845, 5, 112, 0, 0, 845, 846, 5, 117, 0, 0, 846, 847, 5, 116, 0, 0, 847, 848, 5, 73, 0, 0, 848, 849, 5, 110, 0, 0, 849, 850, 5, 100, 0, 0, 850, 851, 5, 101, 0, 0, 851, 926, 5, 120, 0, 0, 852, 853, 5, 116, 0, 0, 853, 854, 5, 104, 0, 0, 854, 855, 5, 105, 0, 0, 855, 856, 5, 115, 0, 0, 856, 857, 5, 46, 0, 0, 857, 858, 5, 97, 0, 0, 858, 859, 5, 99, 0, 0, 859, 860, 5, 116, 0, 0, 860, 861, 5, 105, 0, 0, 861, 862, 5, 118, 0, 0, 862, 863, 5, 101, 0, 0, 863, 864, 5, 66, 0, 0, 864, 865, 5, 121, 0, 0, 865, 866, 5, 116, 0, 0, 866, 867, 5, 101, 0, 0, 867, 868, 5, 99, 0, 0, 868, 869, 5, 111, 0, 0, 869, 870, 5, 100, 0, 0, 870, 926, 5, 101, 0, 0, 871, 872, 5, 116, 0, 0, 872, 873, 5, 120, 0, 0, 873, 874, 5, 46, 0, 0, 874, 875, 5, 105, 0, 0, 875, 876, 5, 110, 0, 0, 876, 877, 5, 112, 0, 0, 877, 878, 5, 117, 0, 0, 878, 879, 5, 116, 0, 0, 879, 880, 5, 115, 0, 0, 880, 881, 5, 46, 0, 0, 881, 882, 5, 108, 0, 0, 882, 883, 5, 101, 0, 0, 883, 884, 5, 110, 0, 0, 884, 885, 5, 103, 0, 0, 885, 886, 5, 116, 0, 0, 886, 926, 5, 104, 0, 0, 887, 888, 5, 116, 0, 0, 888, 889, 5, 120, 0, 0, 889, 890, 5, 46, 0, 0, 890, 891, 5, 111, 0, 0, 891, 892, 5, 117, 0, 0, 892, 893, 5, 116, 0, 0, 893, 894, 5, 112, 0, 0, 894, 895, 5, 117, 0, 0, 895, 896, 5, 116, 0, 0, 896, 897, 5, 115, 0, 0, 897, 898, 5, 46, 0, 0, 898, 899, 5, 108, 0, 0, 899, 900, 5, 101, 0, 0, 900, 901, 5, 110, 0, 0, 901, 902, 5, 103, 0, 0, 902, 903, 5, 116, 0, 0, 903, 926, 5, 104, 0, 0, 904, 905, 5, 116, 0, 0, 905, 906, 5, 120, 0, 0, 906, 907, 5, 46, 0, 0, 907, 908, 5, 118, 0, 0, 908, 909, 5, 101, 0, 0, 909, 910, 5, 114, 0, 0, 910, 911, 5, 115, 0, 0, 911, 912, 5, 105, 0, 0, 912, 913, 5, 111, 0, 0, 913, 926, 5, 110, 0, 0, 914, 915, 5, 116, 0, 0, 915, 916, 5, 120, 0, 0, 916, 917, 5, 46, 0, 0, 917, 918, 5, 108, 0, 0, 918, 919, 5, 111, 0, 0, 919, 920, 5, 99, 0, 0, 920, 921, 5, 107, 0, 0, 921, 922, 5, 116, 0, 0, 922, 923, 5, 105, 0, 0, 923, 924, 5, 109, 0, 0, 924, 926, 5, 101, 0, 0, 925, 831, 1, 0, 0, 0, 925, 852, 1, 0, 0, 0, 925, 871, 1, 0, 0, 0, 925, 887, 1, 0, 0, 0, 925, 904, 1, 0, 0, 0, 925, 914, 1, 0, 0, 0, 926, 160, 1, 0, 0, 0, 927, 931, 7, 7, 0, 0, 928, 930, 7, 8, 0, 0, 929, 928, 1, 0, 0, 0, 930, 933, 1, 0, 0, 0, 931, 929, 1, 0, 0, 0, 931, 932, 1, 0, 0, 0, 932, 162, 1, 0, 0, 0, 933, 931, 1, 0, 0, 0, 934, 936, 7, 9, 0, 0, 935, 934, 1, 0, 0, 0, 936, 937, 1, 0, 0, 0, 937, 935, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 940, 6, 81, 0, 0, 940, 164, 1, 0, 0, 0, 941, 942, 5, 47, 0, 0, 942, 943, 5, 42, 0, 0, 943, 947, 1, 0, 0, 0, 944, 946, 9, 0, 0, 0, 945, 944, 1, 0, 0, 0, 946, 949, 1, 0, 0, 0, 947, 948, 1, 0, 0, 0, 947, 945, 1, 0, 0, 0, 948, 950, 1, 0, 0, 0, 949, 947, 1, 0, 0, 0, 950, 951, 5, 42, 0, 0, 951, 952, 5, 47, 0, 0, 952, 953, 1, 0, 0, 0, 953, 954, 6, 82, 1, 0, 954, 166, 1, 0, 0, 0, 955, 956, 5, 47, 0, 0, 956, 957, 5, 47, 0, 0, 957, 961, 1, 0, 0, 0, 958, 960, 8, 10, 0, 0, 959, 958, 1, 0, 0, 0, 960, 963, 1, 0, 0, 0, 961, 959, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 964, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 964, 965, 6, 83, 1, 0, 965, 168, 1, 0, 0, 0, 28, 0, 558, 564, 570, 581, 640, 643, 647, 652, 658, 662, 697, 716, 722, 729, 731, 739, 741, 745, 761, 779, 816, 829, 925, 931, 937, 947, 961, 2, 6, 0, 0, 0, 1, 0] \ No newline at end of file +[4, 0, 86, 974, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 4, 66, 565, 8, 66, 11, 66, 12, 66, 566, 1, 66, 1, 66, 4, 66, 571, 8, 66, 11, 66, 12, 66, 572, 1, 66, 1, 66, 4, 66, 577, 8, 66, 11, 66, 12, 66, 578, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 590, 8, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 649, 8, 68, 1, 69, 3, 69, 652, 8, 69, 1, 69, 1, 69, 3, 69, 656, 8, 69, 1, 70, 4, 70, 659, 8, 70, 11, 70, 12, 70, 660, 1, 70, 1, 70, 4, 70, 665, 8, 70, 11, 70, 12, 70, 666, 5, 70, 669, 8, 70, 10, 70, 12, 70, 672, 9, 70, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 706, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 725, 8, 74, 1, 75, 1, 75, 5, 75, 729, 8, 75, 10, 75, 12, 75, 732, 9, 75, 1, 76, 1, 76, 1, 76, 1, 76, 5, 76, 738, 8, 76, 10, 76, 12, 76, 741, 9, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 5, 76, 748, 8, 76, 10, 76, 12, 76, 751, 9, 76, 1, 76, 3, 76, 754, 8, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 5, 78, 768, 8, 78, 10, 78, 12, 78, 771, 9, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 3, 79, 788, 8, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 825, 8, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 3, 80, 838, 8, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 3, 81, 934, 8, 81, 1, 82, 1, 82, 5, 82, 938, 8, 82, 10, 82, 12, 82, 941, 9, 82, 1, 83, 4, 83, 944, 8, 83, 11, 83, 12, 83, 945, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 5, 84, 954, 8, 84, 10, 84, 12, 84, 957, 9, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 5, 85, 968, 8, 85, 10, 85, 12, 85, 971, 9, 85, 1, 85, 1, 85, 3, 739, 749, 955, 0, 86, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 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, 1018, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 1, 173, 1, 0, 0, 0, 3, 180, 1, 0, 0, 0, 5, 182, 1, 0, 0, 0, 7, 193, 1, 0, 0, 0, 9, 195, 1, 0, 0, 0, 11, 197, 1, 0, 0, 0, 13, 200, 1, 0, 0, 0, 15, 202, 1, 0, 0, 0, 17, 204, 1, 0, 0, 0, 19, 207, 1, 0, 0, 0, 21, 209, 1, 0, 0, 0, 23, 216, 1, 0, 0, 0, 25, 225, 1, 0, 0, 0, 27, 233, 1, 0, 0, 0, 29, 235, 1, 0, 0, 0, 31, 237, 1, 0, 0, 0, 33, 246, 1, 0, 0, 0, 35, 248, 1, 0, 0, 0, 37, 250, 1, 0, 0, 0, 39, 252, 1, 0, 0, 0, 41, 259, 1, 0, 0, 0, 43, 262, 1, 0, 0, 0, 45, 265, 1, 0, 0, 0, 47, 268, 1, 0, 0, 0, 49, 271, 1, 0, 0, 0, 51, 279, 1, 0, 0, 0, 53, 291, 1, 0, 0, 0, 55, 294, 1, 0, 0, 0, 57, 299, 1, 0, 0, 0, 59, 302, 1, 0, 0, 0, 61, 308, 1, 0, 0, 0, 63, 312, 1, 0, 0, 0, 65, 316, 1, 0, 0, 0, 67, 318, 1, 0, 0, 0, 69, 320, 1, 0, 0, 0, 71, 331, 1, 0, 0, 0, 73, 338, 1, 0, 0, 0, 75, 355, 1, 0, 0, 0, 77, 370, 1, 0, 0, 0, 79, 385, 1, 0, 0, 0, 81, 398, 1, 0, 0, 0, 83, 408, 1, 0, 0, 0, 85, 433, 1, 0, 0, 0, 87, 448, 1, 0, 0, 0, 89, 467, 1, 0, 0, 0, 91, 483, 1, 0, 0, 0, 93, 494, 1, 0, 0, 0, 95, 502, 1, 0, 0, 0, 97, 509, 1, 0, 0, 0, 99, 516, 1, 0, 0, 0, 101, 518, 1, 0, 0, 0, 103, 520, 1, 0, 0, 0, 105, 522, 1, 0, 0, 0, 107, 524, 1, 0, 0, 0, 109, 526, 1, 0, 0, 0, 111, 528, 1, 0, 0, 0, 113, 531, 1, 0, 0, 0, 115, 534, 1, 0, 0, 0, 117, 537, 1, 0, 0, 0, 119, 540, 1, 0, 0, 0, 121, 542, 1, 0, 0, 0, 123, 544, 1, 0, 0, 0, 125, 547, 1, 0, 0, 0, 127, 550, 1, 0, 0, 0, 129, 552, 1, 0, 0, 0, 131, 554, 1, 0, 0, 0, 133, 564, 1, 0, 0, 0, 135, 589, 1, 0, 0, 0, 137, 648, 1, 0, 0, 0, 139, 651, 1, 0, 0, 0, 141, 658, 1, 0, 0, 0, 143, 673, 1, 0, 0, 0, 145, 705, 1, 0, 0, 0, 147, 707, 1, 0, 0, 0, 149, 724, 1, 0, 0, 0, 151, 726, 1, 0, 0, 0, 153, 753, 1, 0, 0, 0, 155, 755, 1, 0, 0, 0, 157, 764, 1, 0, 0, 0, 159, 787, 1, 0, 0, 0, 161, 837, 1, 0, 0, 0, 163, 933, 1, 0, 0, 0, 165, 935, 1, 0, 0, 0, 167, 943, 1, 0, 0, 0, 169, 949, 1, 0, 0, 0, 171, 963, 1, 0, 0, 0, 173, 174, 5, 112, 0, 0, 174, 175, 5, 114, 0, 0, 175, 176, 5, 97, 0, 0, 176, 177, 5, 103, 0, 0, 177, 178, 5, 109, 0, 0, 178, 179, 5, 97, 0, 0, 179, 2, 1, 0, 0, 0, 180, 181, 5, 59, 0, 0, 181, 4, 1, 0, 0, 0, 182, 183, 5, 99, 0, 0, 183, 184, 5, 97, 0, 0, 184, 185, 5, 115, 0, 0, 185, 186, 5, 104, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 99, 0, 0, 188, 189, 5, 114, 0, 0, 189, 190, 5, 105, 0, 0, 190, 191, 5, 112, 0, 0, 191, 192, 5, 116, 0, 0, 192, 6, 1, 0, 0, 0, 193, 194, 5, 94, 0, 0, 194, 8, 1, 0, 0, 0, 195, 196, 5, 126, 0, 0, 196, 10, 1, 0, 0, 0, 197, 198, 5, 62, 0, 0, 198, 199, 5, 61, 0, 0, 199, 12, 1, 0, 0, 0, 200, 201, 5, 62, 0, 0, 201, 14, 1, 0, 0, 0, 202, 203, 5, 60, 0, 0, 203, 16, 1, 0, 0, 0, 204, 205, 5, 60, 0, 0, 205, 206, 5, 61, 0, 0, 206, 18, 1, 0, 0, 0, 207, 208, 5, 61, 0, 0, 208, 20, 1, 0, 0, 0, 209, 210, 5, 105, 0, 0, 210, 211, 5, 109, 0, 0, 211, 212, 5, 112, 0, 0, 212, 213, 5, 111, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 116, 0, 0, 215, 22, 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, 24, 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, 26, 1, 0, 0, 0, 233, 234, 5, 40, 0, 0, 234, 28, 1, 0, 0, 0, 235, 236, 5, 41, 0, 0, 236, 30, 1, 0, 0, 0, 237, 238, 5, 99, 0, 0, 238, 239, 5, 111, 0, 0, 239, 240, 5, 110, 0, 0, 240, 241, 5, 116, 0, 0, 241, 242, 5, 114, 0, 0, 242, 243, 5, 97, 0, 0, 243, 244, 5, 99, 0, 0, 244, 245, 5, 116, 0, 0, 245, 32, 1, 0, 0, 0, 246, 247, 5, 123, 0, 0, 247, 34, 1, 0, 0, 0, 248, 249, 5, 125, 0, 0, 249, 36, 1, 0, 0, 0, 250, 251, 5, 44, 0, 0, 251, 38, 1, 0, 0, 0, 252, 253, 5, 114, 0, 0, 253, 254, 5, 101, 0, 0, 254, 255, 5, 116, 0, 0, 255, 256, 5, 117, 0, 0, 256, 257, 5, 114, 0, 0, 257, 258, 5, 110, 0, 0, 258, 40, 1, 0, 0, 0, 259, 260, 5, 43, 0, 0, 260, 261, 5, 61, 0, 0, 261, 42, 1, 0, 0, 0, 262, 263, 5, 45, 0, 0, 263, 264, 5, 61, 0, 0, 264, 44, 1, 0, 0, 0, 265, 266, 5, 43, 0, 0, 266, 267, 5, 43, 0, 0, 267, 46, 1, 0, 0, 0, 268, 269, 5, 45, 0, 0, 269, 270, 5, 45, 0, 0, 270, 48, 1, 0, 0, 0, 271, 272, 5, 114, 0, 0, 272, 273, 5, 101, 0, 0, 273, 274, 5, 113, 0, 0, 274, 275, 5, 117, 0, 0, 275, 276, 5, 105, 0, 0, 276, 277, 5, 114, 0, 0, 277, 278, 5, 101, 0, 0, 278, 50, 1, 0, 0, 0, 279, 280, 5, 99, 0, 0, 280, 281, 5, 111, 0, 0, 281, 282, 5, 110, 0, 0, 282, 283, 5, 115, 0, 0, 283, 284, 5, 111, 0, 0, 284, 285, 5, 108, 0, 0, 285, 286, 5, 101, 0, 0, 286, 287, 5, 46, 0, 0, 287, 288, 5, 108, 0, 0, 288, 289, 5, 111, 0, 0, 289, 290, 5, 103, 0, 0, 290, 52, 1, 0, 0, 0, 291, 292, 5, 105, 0, 0, 292, 293, 5, 102, 0, 0, 293, 54, 1, 0, 0, 0, 294, 295, 5, 101, 0, 0, 295, 296, 5, 108, 0, 0, 296, 297, 5, 115, 0, 0, 297, 298, 5, 101, 0, 0, 298, 56, 1, 0, 0, 0, 299, 300, 5, 100, 0, 0, 300, 301, 5, 111, 0, 0, 301, 58, 1, 0, 0, 0, 302, 303, 5, 119, 0, 0, 303, 304, 5, 104, 0, 0, 304, 305, 5, 105, 0, 0, 305, 306, 5, 108, 0, 0, 306, 307, 5, 101, 0, 0, 307, 60, 1, 0, 0, 0, 308, 309, 5, 102, 0, 0, 309, 310, 5, 111, 0, 0, 310, 311, 5, 114, 0, 0, 311, 62, 1, 0, 0, 0, 312, 313, 5, 110, 0, 0, 313, 314, 5, 101, 0, 0, 314, 315, 5, 119, 0, 0, 315, 64, 1, 0, 0, 0, 316, 317, 5, 91, 0, 0, 317, 66, 1, 0, 0, 0, 318, 319, 5, 93, 0, 0, 319, 68, 1, 0, 0, 0, 320, 321, 5, 116, 0, 0, 321, 322, 5, 120, 0, 0, 322, 323, 5, 46, 0, 0, 323, 324, 5, 111, 0, 0, 324, 325, 5, 117, 0, 0, 325, 326, 5, 116, 0, 0, 326, 327, 5, 112, 0, 0, 327, 328, 5, 117, 0, 0, 328, 329, 5, 116, 0, 0, 329, 330, 5, 115, 0, 0, 330, 70, 1, 0, 0, 0, 331, 332, 5, 46, 0, 0, 332, 333, 5, 118, 0, 0, 333, 334, 5, 97, 0, 0, 334, 335, 5, 108, 0, 0, 335, 336, 5, 117, 0, 0, 336, 337, 5, 101, 0, 0, 337, 72, 1, 0, 0, 0, 338, 339, 5, 46, 0, 0, 339, 340, 5, 108, 0, 0, 340, 341, 5, 111, 0, 0, 341, 342, 5, 99, 0, 0, 342, 343, 5, 107, 0, 0, 343, 344, 5, 105, 0, 0, 344, 345, 5, 110, 0, 0, 345, 346, 5, 103, 0, 0, 346, 347, 5, 66, 0, 0, 347, 348, 5, 121, 0, 0, 348, 349, 5, 116, 0, 0, 349, 350, 5, 101, 0, 0, 350, 351, 5, 99, 0, 0, 351, 352, 5, 111, 0, 0, 352, 353, 5, 100, 0, 0, 353, 354, 5, 101, 0, 0, 354, 74, 1, 0, 0, 0, 355, 356, 5, 46, 0, 0, 356, 357, 5, 116, 0, 0, 357, 358, 5, 111, 0, 0, 358, 359, 5, 107, 0, 0, 359, 360, 5, 101, 0, 0, 360, 361, 5, 110, 0, 0, 361, 362, 5, 67, 0, 0, 362, 363, 5, 97, 0, 0, 363, 364, 5, 116, 0, 0, 364, 365, 5, 101, 0, 0, 365, 366, 5, 103, 0, 0, 366, 367, 5, 111, 0, 0, 367, 368, 5, 114, 0, 0, 368, 369, 5, 121, 0, 0, 369, 76, 1, 0, 0, 0, 370, 371, 5, 46, 0, 0, 371, 372, 5, 110, 0, 0, 372, 373, 5, 102, 0, 0, 373, 374, 5, 116, 0, 0, 374, 375, 5, 67, 0, 0, 375, 376, 5, 111, 0, 0, 376, 377, 5, 109, 0, 0, 377, 378, 5, 109, 0, 0, 378, 379, 5, 105, 0, 0, 379, 380, 5, 116, 0, 0, 380, 381, 5, 109, 0, 0, 381, 382, 5, 101, 0, 0, 382, 383, 5, 110, 0, 0, 383, 384, 5, 116, 0, 0, 384, 78, 1, 0, 0, 0, 385, 386, 5, 46, 0, 0, 386, 387, 5, 116, 0, 0, 387, 388, 5, 111, 0, 0, 388, 389, 5, 107, 0, 0, 389, 390, 5, 101, 0, 0, 390, 391, 5, 110, 0, 0, 391, 392, 5, 65, 0, 0, 392, 393, 5, 109, 0, 0, 393, 394, 5, 111, 0, 0, 394, 395, 5, 117, 0, 0, 395, 396, 5, 110, 0, 0, 396, 397, 5, 116, 0, 0, 397, 80, 1, 0, 0, 0, 398, 399, 5, 116, 0, 0, 399, 400, 5, 120, 0, 0, 400, 401, 5, 46, 0, 0, 401, 402, 5, 105, 0, 0, 402, 403, 5, 110, 0, 0, 403, 404, 5, 112, 0, 0, 404, 405, 5, 117, 0, 0, 405, 406, 5, 116, 0, 0, 406, 407, 5, 115, 0, 0, 407, 82, 1, 0, 0, 0, 408, 409, 5, 46, 0, 0, 409, 410, 5, 111, 0, 0, 410, 411, 5, 117, 0, 0, 411, 412, 5, 116, 0, 0, 412, 413, 5, 112, 0, 0, 413, 414, 5, 111, 0, 0, 414, 415, 5, 105, 0, 0, 415, 416, 5, 110, 0, 0, 416, 417, 5, 116, 0, 0, 417, 418, 5, 84, 0, 0, 418, 419, 5, 114, 0, 0, 419, 420, 5, 97, 0, 0, 420, 421, 5, 110, 0, 0, 421, 422, 5, 115, 0, 0, 422, 423, 5, 97, 0, 0, 423, 424, 5, 99, 0, 0, 424, 425, 5, 116, 0, 0, 425, 426, 5, 105, 0, 0, 426, 427, 5, 111, 0, 0, 427, 428, 5, 110, 0, 0, 428, 429, 5, 72, 0, 0, 429, 430, 5, 97, 0, 0, 430, 431, 5, 115, 0, 0, 431, 432, 5, 104, 0, 0, 432, 84, 1, 0, 0, 0, 433, 434, 5, 46, 0, 0, 434, 435, 5, 111, 0, 0, 435, 436, 5, 117, 0, 0, 436, 437, 5, 116, 0, 0, 437, 438, 5, 112, 0, 0, 438, 439, 5, 111, 0, 0, 439, 440, 5, 105, 0, 0, 440, 441, 5, 110, 0, 0, 441, 442, 5, 116, 0, 0, 442, 443, 5, 73, 0, 0, 443, 444, 5, 110, 0, 0, 444, 445, 5, 100, 0, 0, 445, 446, 5, 101, 0, 0, 446, 447, 5, 120, 0, 0, 447, 86, 1, 0, 0, 0, 448, 449, 5, 46, 0, 0, 449, 450, 5, 117, 0, 0, 450, 451, 5, 110, 0, 0, 451, 452, 5, 108, 0, 0, 452, 453, 5, 111, 0, 0, 453, 454, 5, 99, 0, 0, 454, 455, 5, 107, 0, 0, 455, 456, 5, 105, 0, 0, 456, 457, 5, 110, 0, 0, 457, 458, 5, 103, 0, 0, 458, 459, 5, 66, 0, 0, 459, 460, 5, 121, 0, 0, 460, 461, 5, 116, 0, 0, 461, 462, 5, 101, 0, 0, 462, 463, 5, 99, 0, 0, 463, 464, 5, 111, 0, 0, 464, 465, 5, 100, 0, 0, 465, 466, 5, 101, 0, 0, 466, 88, 1, 0, 0, 0, 467, 468, 5, 46, 0, 0, 468, 469, 5, 115, 0, 0, 469, 470, 5, 101, 0, 0, 470, 471, 5, 113, 0, 0, 471, 472, 5, 117, 0, 0, 472, 473, 5, 101, 0, 0, 473, 474, 5, 110, 0, 0, 474, 475, 5, 99, 0, 0, 475, 476, 5, 101, 0, 0, 476, 477, 5, 78, 0, 0, 477, 478, 5, 117, 0, 0, 478, 479, 5, 109, 0, 0, 479, 480, 5, 98, 0, 0, 480, 481, 5, 101, 0, 0, 481, 482, 5, 114, 0, 0, 482, 90, 1, 0, 0, 0, 483, 484, 5, 46, 0, 0, 484, 485, 5, 114, 0, 0, 485, 486, 5, 101, 0, 0, 486, 487, 5, 118, 0, 0, 487, 488, 5, 101, 0, 0, 488, 489, 5, 114, 0, 0, 489, 490, 5, 115, 0, 0, 490, 491, 5, 101, 0, 0, 491, 492, 5, 40, 0, 0, 492, 493, 5, 41, 0, 0, 493, 92, 1, 0, 0, 0, 494, 495, 5, 46, 0, 0, 495, 496, 5, 108, 0, 0, 496, 497, 5, 101, 0, 0, 497, 498, 5, 110, 0, 0, 498, 499, 5, 103, 0, 0, 499, 500, 5, 116, 0, 0, 500, 501, 5, 104, 0, 0, 501, 94, 1, 0, 0, 0, 502, 503, 5, 46, 0, 0, 503, 504, 5, 115, 0, 0, 504, 505, 5, 112, 0, 0, 505, 506, 5, 108, 0, 0, 506, 507, 5, 105, 0, 0, 507, 508, 5, 116, 0, 0, 508, 96, 1, 0, 0, 0, 509, 510, 5, 46, 0, 0, 510, 511, 5, 115, 0, 0, 511, 512, 5, 108, 0, 0, 512, 513, 5, 105, 0, 0, 513, 514, 5, 99, 0, 0, 514, 515, 5, 101, 0, 0, 515, 98, 1, 0, 0, 0, 516, 517, 5, 33, 0, 0, 517, 100, 1, 0, 0, 0, 518, 519, 5, 45, 0, 0, 519, 102, 1, 0, 0, 0, 520, 521, 5, 42, 0, 0, 521, 104, 1, 0, 0, 0, 522, 523, 5, 47, 0, 0, 523, 106, 1, 0, 0, 0, 524, 525, 5, 37, 0, 0, 525, 108, 1, 0, 0, 0, 526, 527, 5, 43, 0, 0, 527, 110, 1, 0, 0, 0, 528, 529, 5, 62, 0, 0, 529, 530, 5, 62, 0, 0, 530, 112, 1, 0, 0, 0, 531, 532, 5, 60, 0, 0, 532, 533, 5, 60, 0, 0, 533, 114, 1, 0, 0, 0, 534, 535, 5, 61, 0, 0, 535, 536, 5, 61, 0, 0, 536, 116, 1, 0, 0, 0, 537, 538, 5, 33, 0, 0, 538, 539, 5, 61, 0, 0, 539, 118, 1, 0, 0, 0, 540, 541, 5, 38, 0, 0, 541, 120, 1, 0, 0, 0, 542, 543, 5, 124, 0, 0, 543, 122, 1, 0, 0, 0, 544, 545, 5, 38, 0, 0, 545, 546, 5, 38, 0, 0, 546, 124, 1, 0, 0, 0, 547, 548, 5, 124, 0, 0, 548, 549, 5, 124, 0, 0, 549, 126, 1, 0, 0, 0, 550, 551, 5, 63, 0, 0, 551, 128, 1, 0, 0, 0, 552, 553, 5, 58, 0, 0, 553, 130, 1, 0, 0, 0, 554, 555, 5, 99, 0, 0, 555, 556, 5, 111, 0, 0, 556, 557, 5, 110, 0, 0, 557, 558, 5, 115, 0, 0, 558, 559, 5, 116, 0, 0, 559, 560, 5, 97, 0, 0, 560, 561, 5, 110, 0, 0, 561, 562, 5, 116, 0, 0, 562, 132, 1, 0, 0, 0, 563, 565, 7, 0, 0, 0, 564, 563, 1, 0, 0, 0, 565, 566, 1, 0, 0, 0, 566, 564, 1, 0, 0, 0, 566, 567, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 570, 5, 46, 0, 0, 569, 571, 7, 0, 0, 0, 570, 569, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 570, 1, 0, 0, 0, 572, 573, 1, 0, 0, 0, 573, 574, 1, 0, 0, 0, 574, 576, 5, 46, 0, 0, 575, 577, 7, 0, 0, 0, 576, 575, 1, 0, 0, 0, 577, 578, 1, 0, 0, 0, 578, 576, 1, 0, 0, 0, 578, 579, 1, 0, 0, 0, 579, 134, 1, 0, 0, 0, 580, 581, 5, 116, 0, 0, 581, 582, 5, 114, 0, 0, 582, 583, 5, 117, 0, 0, 583, 590, 5, 101, 0, 0, 584, 585, 5, 102, 0, 0, 585, 586, 5, 97, 0, 0, 586, 587, 5, 108, 0, 0, 587, 588, 5, 115, 0, 0, 588, 590, 5, 101, 0, 0, 589, 580, 1, 0, 0, 0, 589, 584, 1, 0, 0, 0, 590, 136, 1, 0, 0, 0, 591, 592, 5, 115, 0, 0, 592, 593, 5, 97, 0, 0, 593, 594, 5, 116, 0, 0, 594, 595, 5, 111, 0, 0, 595, 596, 5, 115, 0, 0, 596, 597, 5, 104, 0, 0, 597, 598, 5, 105, 0, 0, 598, 649, 5, 115, 0, 0, 599, 600, 5, 115, 0, 0, 600, 601, 5, 97, 0, 0, 601, 602, 5, 116, 0, 0, 602, 649, 5, 115, 0, 0, 603, 604, 5, 102, 0, 0, 604, 605, 5, 105, 0, 0, 605, 606, 5, 110, 0, 0, 606, 607, 5, 110, 0, 0, 607, 608, 5, 101, 0, 0, 608, 649, 5, 121, 0, 0, 609, 610, 5, 98, 0, 0, 610, 611, 5, 105, 0, 0, 611, 612, 5, 116, 0, 0, 612, 649, 5, 115, 0, 0, 613, 614, 5, 98, 0, 0, 614, 615, 5, 105, 0, 0, 615, 616, 5, 116, 0, 0, 616, 617, 5, 99, 0, 0, 617, 618, 5, 111, 0, 0, 618, 619, 5, 105, 0, 0, 619, 649, 5, 110, 0, 0, 620, 621, 5, 115, 0, 0, 621, 622, 5, 101, 0, 0, 622, 623, 5, 99, 0, 0, 623, 624, 5, 111, 0, 0, 624, 625, 5, 110, 0, 0, 625, 626, 5, 100, 0, 0, 626, 649, 5, 115, 0, 0, 627, 628, 5, 109, 0, 0, 628, 629, 5, 105, 0, 0, 629, 630, 5, 110, 0, 0, 630, 631, 5, 117, 0, 0, 631, 632, 5, 116, 0, 0, 632, 633, 5, 101, 0, 0, 633, 649, 5, 115, 0, 0, 634, 635, 5, 104, 0, 0, 635, 636, 5, 111, 0, 0, 636, 637, 5, 117, 0, 0, 637, 638, 5, 114, 0, 0, 638, 649, 5, 115, 0, 0, 639, 640, 5, 100, 0, 0, 640, 641, 5, 97, 0, 0, 641, 642, 5, 121, 0, 0, 642, 649, 5, 115, 0, 0, 643, 644, 5, 119, 0, 0, 644, 645, 5, 101, 0, 0, 645, 646, 5, 101, 0, 0, 646, 647, 5, 107, 0, 0, 647, 649, 5, 115, 0, 0, 648, 591, 1, 0, 0, 0, 648, 599, 1, 0, 0, 0, 648, 603, 1, 0, 0, 0, 648, 609, 1, 0, 0, 0, 648, 613, 1, 0, 0, 0, 648, 620, 1, 0, 0, 0, 648, 627, 1, 0, 0, 0, 648, 634, 1, 0, 0, 0, 648, 639, 1, 0, 0, 0, 648, 643, 1, 0, 0, 0, 649, 138, 1, 0, 0, 0, 650, 652, 5, 45, 0, 0, 651, 650, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 655, 3, 141, 70, 0, 654, 656, 3, 143, 71, 0, 655, 654, 1, 0, 0, 0, 655, 656, 1, 0, 0, 0, 656, 140, 1, 0, 0, 0, 657, 659, 7, 0, 0, 0, 658, 657, 1, 0, 0, 0, 659, 660, 1, 0, 0, 0, 660, 658, 1, 0, 0, 0, 660, 661, 1, 0, 0, 0, 661, 670, 1, 0, 0, 0, 662, 664, 5, 95, 0, 0, 663, 665, 7, 0, 0, 0, 664, 663, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 664, 1, 0, 0, 0, 666, 667, 1, 0, 0, 0, 667, 669, 1, 0, 0, 0, 668, 662, 1, 0, 0, 0, 669, 672, 1, 0, 0, 0, 670, 668, 1, 0, 0, 0, 670, 671, 1, 0, 0, 0, 671, 142, 1, 0, 0, 0, 672, 670, 1, 0, 0, 0, 673, 674, 7, 1, 0, 0, 674, 675, 3, 141, 70, 0, 675, 144, 1, 0, 0, 0, 676, 677, 5, 105, 0, 0, 677, 678, 5, 110, 0, 0, 678, 706, 5, 116, 0, 0, 679, 680, 5, 98, 0, 0, 680, 681, 5, 111, 0, 0, 681, 682, 5, 111, 0, 0, 682, 706, 5, 108, 0, 0, 683, 684, 5, 115, 0, 0, 684, 685, 5, 116, 0, 0, 685, 686, 5, 114, 0, 0, 686, 687, 5, 105, 0, 0, 687, 688, 5, 110, 0, 0, 688, 706, 5, 103, 0, 0, 689, 690, 5, 112, 0, 0, 690, 691, 5, 117, 0, 0, 691, 692, 5, 98, 0, 0, 692, 693, 5, 107, 0, 0, 693, 694, 5, 101, 0, 0, 694, 706, 5, 121, 0, 0, 695, 696, 5, 115, 0, 0, 696, 697, 5, 105, 0, 0, 697, 706, 5, 103, 0, 0, 698, 699, 5, 100, 0, 0, 699, 700, 5, 97, 0, 0, 700, 701, 5, 116, 0, 0, 701, 702, 5, 97, 0, 0, 702, 703, 5, 115, 0, 0, 703, 704, 5, 105, 0, 0, 704, 706, 5, 103, 0, 0, 705, 676, 1, 0, 0, 0, 705, 679, 1, 0, 0, 0, 705, 683, 1, 0, 0, 0, 705, 689, 1, 0, 0, 0, 705, 695, 1, 0, 0, 0, 705, 698, 1, 0, 0, 0, 706, 146, 1, 0, 0, 0, 707, 708, 5, 98, 0, 0, 708, 709, 5, 121, 0, 0, 709, 710, 5, 116, 0, 0, 710, 711, 5, 101, 0, 0, 711, 712, 5, 115, 0, 0, 712, 148, 1, 0, 0, 0, 713, 714, 5, 98, 0, 0, 714, 715, 5, 121, 0, 0, 715, 716, 5, 116, 0, 0, 716, 717, 5, 101, 0, 0, 717, 718, 5, 115, 0, 0, 718, 719, 1, 0, 0, 0, 719, 725, 3, 151, 75, 0, 720, 721, 5, 98, 0, 0, 721, 722, 5, 121, 0, 0, 722, 723, 5, 116, 0, 0, 723, 725, 5, 101, 0, 0, 724, 713, 1, 0, 0, 0, 724, 720, 1, 0, 0, 0, 725, 150, 1, 0, 0, 0, 726, 730, 7, 2, 0, 0, 727, 729, 7, 0, 0, 0, 728, 727, 1, 0, 0, 0, 729, 732, 1, 0, 0, 0, 730, 728, 1, 0, 0, 0, 730, 731, 1, 0, 0, 0, 731, 152, 1, 0, 0, 0, 732, 730, 1, 0, 0, 0, 733, 739, 5, 34, 0, 0, 734, 735, 5, 92, 0, 0, 735, 738, 5, 34, 0, 0, 736, 738, 8, 3, 0, 0, 737, 734, 1, 0, 0, 0, 737, 736, 1, 0, 0, 0, 738, 741, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, 739, 737, 1, 0, 0, 0, 740, 742, 1, 0, 0, 0, 741, 739, 1, 0, 0, 0, 742, 754, 5, 34, 0, 0, 743, 749, 5, 39, 0, 0, 744, 745, 5, 92, 0, 0, 745, 748, 5, 39, 0, 0, 746, 748, 8, 4, 0, 0, 747, 744, 1, 0, 0, 0, 747, 746, 1, 0, 0, 0, 748, 751, 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 749, 747, 1, 0, 0, 0, 750, 752, 1, 0, 0, 0, 751, 749, 1, 0, 0, 0, 752, 754, 5, 39, 0, 0, 753, 733, 1, 0, 0, 0, 753, 743, 1, 0, 0, 0, 754, 154, 1, 0, 0, 0, 755, 756, 5, 100, 0, 0, 756, 757, 5, 97, 0, 0, 757, 758, 5, 116, 0, 0, 758, 759, 5, 101, 0, 0, 759, 760, 5, 40, 0, 0, 760, 761, 1, 0, 0, 0, 761, 762, 3, 153, 76, 0, 762, 763, 5, 41, 0, 0, 763, 156, 1, 0, 0, 0, 764, 765, 5, 48, 0, 0, 765, 769, 7, 5, 0, 0, 766, 768, 7, 6, 0, 0, 767, 766, 1, 0, 0, 0, 768, 771, 1, 0, 0, 0, 769, 767, 1, 0, 0, 0, 769, 770, 1, 0, 0, 0, 770, 158, 1, 0, 0, 0, 771, 769, 1, 0, 0, 0, 772, 773, 5, 116, 0, 0, 773, 774, 5, 104, 0, 0, 774, 775, 5, 105, 0, 0, 775, 776, 5, 115, 0, 0, 776, 777, 5, 46, 0, 0, 777, 778, 5, 97, 0, 0, 778, 779, 5, 103, 0, 0, 779, 788, 5, 101, 0, 0, 780, 781, 5, 116, 0, 0, 781, 782, 5, 120, 0, 0, 782, 783, 5, 46, 0, 0, 783, 784, 5, 116, 0, 0, 784, 785, 5, 105, 0, 0, 785, 786, 5, 109, 0, 0, 786, 788, 5, 101, 0, 0, 787, 772, 1, 0, 0, 0, 787, 780, 1, 0, 0, 0, 788, 160, 1, 0, 0, 0, 789, 790, 5, 117, 0, 0, 790, 791, 5, 110, 0, 0, 791, 792, 5, 115, 0, 0, 792, 793, 5, 97, 0, 0, 793, 794, 5, 102, 0, 0, 794, 795, 5, 101, 0, 0, 795, 796, 5, 95, 0, 0, 796, 797, 5, 105, 0, 0, 797, 798, 5, 110, 0, 0, 798, 838, 5, 116, 0, 0, 799, 800, 5, 117, 0, 0, 800, 801, 5, 110, 0, 0, 801, 802, 5, 115, 0, 0, 802, 803, 5, 97, 0, 0, 803, 804, 5, 102, 0, 0, 804, 805, 5, 101, 0, 0, 805, 806, 5, 95, 0, 0, 806, 807, 5, 98, 0, 0, 807, 808, 5, 111, 0, 0, 808, 809, 5, 111, 0, 0, 809, 838, 5, 108, 0, 0, 810, 811, 5, 117, 0, 0, 811, 812, 5, 110, 0, 0, 812, 813, 5, 115, 0, 0, 813, 814, 5, 97, 0, 0, 814, 815, 5, 102, 0, 0, 815, 816, 5, 101, 0, 0, 816, 817, 5, 95, 0, 0, 817, 818, 5, 98, 0, 0, 818, 819, 5, 121, 0, 0, 819, 820, 5, 116, 0, 0, 820, 821, 5, 101, 0, 0, 821, 822, 5, 115, 0, 0, 822, 824, 1, 0, 0, 0, 823, 825, 3, 151, 75, 0, 824, 823, 1, 0, 0, 0, 824, 825, 1, 0, 0, 0, 825, 838, 1, 0, 0, 0, 826, 827, 5, 117, 0, 0, 827, 828, 5, 110, 0, 0, 828, 829, 5, 115, 0, 0, 829, 830, 5, 97, 0, 0, 830, 831, 5, 102, 0, 0, 831, 832, 5, 101, 0, 0, 832, 833, 5, 95, 0, 0, 833, 834, 5, 98, 0, 0, 834, 835, 5, 121, 0, 0, 835, 836, 5, 116, 0, 0, 836, 838, 5, 101, 0, 0, 837, 789, 1, 0, 0, 0, 837, 799, 1, 0, 0, 0, 837, 810, 1, 0, 0, 0, 837, 826, 1, 0, 0, 0, 838, 162, 1, 0, 0, 0, 839, 840, 5, 116, 0, 0, 840, 841, 5, 104, 0, 0, 841, 842, 5, 105, 0, 0, 842, 843, 5, 115, 0, 0, 843, 844, 5, 46, 0, 0, 844, 845, 5, 97, 0, 0, 845, 846, 5, 99, 0, 0, 846, 847, 5, 116, 0, 0, 847, 848, 5, 105, 0, 0, 848, 849, 5, 118, 0, 0, 849, 850, 5, 101, 0, 0, 850, 851, 5, 73, 0, 0, 851, 852, 5, 110, 0, 0, 852, 853, 5, 112, 0, 0, 853, 854, 5, 117, 0, 0, 854, 855, 5, 116, 0, 0, 855, 856, 5, 73, 0, 0, 856, 857, 5, 110, 0, 0, 857, 858, 5, 100, 0, 0, 858, 859, 5, 101, 0, 0, 859, 934, 5, 120, 0, 0, 860, 861, 5, 116, 0, 0, 861, 862, 5, 104, 0, 0, 862, 863, 5, 105, 0, 0, 863, 864, 5, 115, 0, 0, 864, 865, 5, 46, 0, 0, 865, 866, 5, 97, 0, 0, 866, 867, 5, 99, 0, 0, 867, 868, 5, 116, 0, 0, 868, 869, 5, 105, 0, 0, 869, 870, 5, 118, 0, 0, 870, 871, 5, 101, 0, 0, 871, 872, 5, 66, 0, 0, 872, 873, 5, 121, 0, 0, 873, 874, 5, 116, 0, 0, 874, 875, 5, 101, 0, 0, 875, 876, 5, 99, 0, 0, 876, 877, 5, 111, 0, 0, 877, 878, 5, 100, 0, 0, 878, 934, 5, 101, 0, 0, 879, 880, 5, 116, 0, 0, 880, 881, 5, 120, 0, 0, 881, 882, 5, 46, 0, 0, 882, 883, 5, 105, 0, 0, 883, 884, 5, 110, 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, 934, 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, 111, 0, 0, 899, 900, 5, 117, 0, 0, 900, 901, 5, 116, 0, 0, 901, 902, 5, 112, 0, 0, 902, 903, 5, 117, 0, 0, 903, 904, 5, 116, 0, 0, 904, 905, 5, 115, 0, 0, 905, 906, 5, 46, 0, 0, 906, 907, 5, 108, 0, 0, 907, 908, 5, 101, 0, 0, 908, 909, 5, 110, 0, 0, 909, 910, 5, 103, 0, 0, 910, 911, 5, 116, 0, 0, 911, 934, 5, 104, 0, 0, 912, 913, 5, 116, 0, 0, 913, 914, 5, 120, 0, 0, 914, 915, 5, 46, 0, 0, 915, 916, 5, 118, 0, 0, 916, 917, 5, 101, 0, 0, 917, 918, 5, 114, 0, 0, 918, 919, 5, 115, 0, 0, 919, 920, 5, 105, 0, 0, 920, 921, 5, 111, 0, 0, 921, 934, 5, 110, 0, 0, 922, 923, 5, 116, 0, 0, 923, 924, 5, 120, 0, 0, 924, 925, 5, 46, 0, 0, 925, 926, 5, 108, 0, 0, 926, 927, 5, 111, 0, 0, 927, 928, 5, 99, 0, 0, 928, 929, 5, 107, 0, 0, 929, 930, 5, 116, 0, 0, 930, 931, 5, 105, 0, 0, 931, 932, 5, 109, 0, 0, 932, 934, 5, 101, 0, 0, 933, 839, 1, 0, 0, 0, 933, 860, 1, 0, 0, 0, 933, 879, 1, 0, 0, 0, 933, 895, 1, 0, 0, 0, 933, 912, 1, 0, 0, 0, 933, 922, 1, 0, 0, 0, 934, 164, 1, 0, 0, 0, 935, 939, 7, 7, 0, 0, 936, 938, 7, 8, 0, 0, 937, 936, 1, 0, 0, 0, 938, 941, 1, 0, 0, 0, 939, 937, 1, 0, 0, 0, 939, 940, 1, 0, 0, 0, 940, 166, 1, 0, 0, 0, 941, 939, 1, 0, 0, 0, 942, 944, 7, 9, 0, 0, 943, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 943, 1, 0, 0, 0, 945, 946, 1, 0, 0, 0, 946, 947, 1, 0, 0, 0, 947, 948, 6, 83, 0, 0, 948, 168, 1, 0, 0, 0, 949, 950, 5, 47, 0, 0, 950, 951, 5, 42, 0, 0, 951, 955, 1, 0, 0, 0, 952, 954, 9, 0, 0, 0, 953, 952, 1, 0, 0, 0, 954, 957, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 955, 953, 1, 0, 0, 0, 956, 958, 1, 0, 0, 0, 957, 955, 1, 0, 0, 0, 958, 959, 5, 42, 0, 0, 959, 960, 5, 47, 0, 0, 960, 961, 1, 0, 0, 0, 961, 962, 6, 84, 1, 0, 962, 170, 1, 0, 0, 0, 963, 964, 5, 47, 0, 0, 964, 965, 5, 47, 0, 0, 965, 969, 1, 0, 0, 0, 966, 968, 8, 10, 0, 0, 967, 966, 1, 0, 0, 0, 968, 971, 1, 0, 0, 0, 969, 967, 1, 0, 0, 0, 969, 970, 1, 0, 0, 0, 970, 972, 1, 0, 0, 0, 971, 969, 1, 0, 0, 0, 972, 973, 6, 85, 1, 0, 973, 172, 1, 0, 0, 0, 28, 0, 566, 572, 578, 589, 648, 651, 655, 660, 666, 670, 705, 724, 730, 737, 739, 747, 749, 753, 769, 787, 824, 837, 933, 939, 945, 955, 969, 2, 6, 0, 0, 0, 1, 0] \ No newline at end of file diff --git a/packages/cashc/src/grammar/CashScriptLexer.tokens b/packages/cashc/src/grammar/CashScriptLexer.tokens index 16dc361d..a422fe39 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.tokens +++ b/packages/cashc/src/grammar/CashScriptLexer.tokens @@ -62,26 +62,28 @@ T__60=61 T__61=62 T__62=63 T__63=64 -VersionLiteral=65 -BooleanLiteral=66 -NumberUnit=67 -NumberLiteral=68 -NumberPart=69 -ExponentPart=70 -PrimitiveType=71 -UnboundedBytes=72 -BoundedBytes=73 -Bound=74 -StringLiteral=75 -DateLiteral=76 -HexLiteral=77 -TxVar=78 -UnsafeCast=79 -NullaryOp=80 -Identifier=81 -WHITESPACE=82 -COMMENT=83 -LINE_COMMENT=84 +T__64=65 +T__65=66 +VersionLiteral=67 +BooleanLiteral=68 +NumberUnit=69 +NumberLiteral=70 +NumberPart=71 +ExponentPart=72 +PrimitiveType=73 +UnboundedBytes=74 +BoundedBytes=75 +Bound=76 +StringLiteral=77 +DateLiteral=78 +HexLiteral=79 +TxVar=80 +UnsafeCast=81 +NullaryOp=82 +Identifier=83 +WHITESPACE=84 +COMMENT=85 +LINE_COMMENT=86 'pragma'=1 ';'=2 'cashscript'=3 @@ -145,5 +147,7 @@ LINE_COMMENT=84 '|'=61 '&&'=62 '||'=63 -'constant'=64 -'bytes'=72 +'?'=64 +':'=65 +'constant'=66 +'bytes'=74 diff --git a/packages/cashc/src/grammar/CashScriptLexer.ts b/packages/cashc/src/grammar/CashScriptLexer.ts index 0300faed..fdd0bba4 100644 --- a/packages/cashc/src/grammar/CashScriptLexer.ts +++ b/packages/cashc/src/grammar/CashScriptLexer.ts @@ -76,26 +76,28 @@ export default class CashScriptLexer extends Lexer { public static readonly T__61 = 62; public static readonly T__62 = 63; public static readonly T__63 = 64; - public static readonly VersionLiteral = 65; - public static readonly BooleanLiteral = 66; - public static readonly NumberUnit = 67; - public static readonly NumberLiteral = 68; - public static readonly NumberPart = 69; - public static readonly ExponentPart = 70; - public static readonly PrimitiveType = 71; - public static readonly UnboundedBytes = 72; - public static readonly BoundedBytes = 73; - public static readonly Bound = 74; - public static readonly StringLiteral = 75; - public static readonly DateLiteral = 76; - public static readonly HexLiteral = 77; - public static readonly TxVar = 78; - public static readonly UnsafeCast = 79; - public static readonly NullaryOp = 80; - public static readonly Identifier = 81; - public static readonly WHITESPACE = 82; - public static readonly COMMENT = 83; - public static readonly LINE_COMMENT = 84; + public static readonly T__64 = 65; + public static readonly T__65 = 66; + public static readonly VersionLiteral = 67; + public static readonly BooleanLiteral = 68; + public static readonly NumberUnit = 69; + public static readonly NumberLiteral = 70; + public static readonly NumberPart = 71; + public static readonly ExponentPart = 72; + public static readonly PrimitiveType = 73; + public static readonly UnboundedBytes = 74; + public static readonly BoundedBytes = 75; + public static readonly Bound = 76; + public static readonly StringLiteral = 77; + public static readonly DateLiteral = 78; + public static readonly HexLiteral = 79; + public static readonly TxVar = 80; + public static readonly UnsafeCast = 81; + public static readonly NullaryOp = 82; + public static readonly Identifier = 83; + public static readonly WHITESPACE = 84; + public static readonly COMMENT = 85; + public static readonly LINE_COMMENT = 86; public static readonly EOF = Token.EOF; public static readonly channelNames: string[] = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ]; @@ -141,6 +143,7 @@ export default class CashScriptLexer extends Lexer { "'=='", "'!='", "'&'", "'|'", "'&&'", "'||'", + "'?'", "':'", "'constant'", null, null, null, null, @@ -178,6 +181,7 @@ export default class CashScriptLexer extends Lexer { null, null, null, null, null, null, + null, null, null, "VersionLiteral", "BooleanLiteral", "NumberUnit", @@ -206,11 +210,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", "T__61", "T__62", "T__63", "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", "T__63", "T__64", + "T__65", "VersionLiteral", "BooleanLiteral", "NumberUnit", "NumberLiteral", + "NumberPart", "ExponentPart", "PrimitiveType", "UnboundedBytes", "BoundedBytes", + "Bound", "StringLiteral", "DateLiteral", "HexLiteral", "TxVar", "UnsafeCast", + "NullaryOp", "Identifier", "WHITESPACE", "COMMENT", "LINE_COMMENT", ]; @@ -231,7 +235,7 @@ export default class CashScriptLexer extends Lexer { public get modeNames(): string[] { return CashScriptLexer.modeNames; } - public static readonly _serializedATN: number[] = [4,0,84,966,6,-1,2,0, + public static readonly _serializedATN: number[] = [4,0,86,974,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, @@ -243,312 +247,314 @@ export default class CashScriptLexer extends Lexer { 60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67, 7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7, 74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81, - 2,82,7,82,2,83,7,83,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2, - 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,7,1,7, - 1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1, - 11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13, - 1,13,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1, - 17,1,17,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,21, - 1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1, - 24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26, - 1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1, - 29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,32,1,32,1,33,1,33,1,34, - 1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1, - 35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36, - 1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, - 37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38, - 1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1, - 39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40, - 1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1, - 41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,42, - 1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1, - 43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43, - 1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1, - 44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,46, - 1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1, - 48,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,50,1,50,1,51,1,51,1,52,1,52, - 1,53,1,53,1,54,1,54,1,55,1,55,1,55,1,56,1,56,1,56,1,57,1,57,1,57,1,58,1, - 58,1,58,1,59,1,59,1,60,1,60,1,61,1,61,1,61,1,62,1,62,1,62,1,63,1,63,1,63, - 1,63,1,63,1,63,1,63,1,63,1,63,1,64,4,64,557,8,64,11,64,12,64,558,1,64,1, - 64,4,64,563,8,64,11,64,12,64,564,1,64,1,64,4,64,569,8,64,11,64,12,64,570, - 1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,3,65,582,8,65,1,66,1,66,1, - 66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66, - 1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1, - 66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66, - 1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,3,66,641,8,66,1, - 67,3,67,644,8,67,1,67,1,67,3,67,648,8,67,1,68,4,68,651,8,68,11,68,12,68, - 652,1,68,1,68,4,68,657,8,68,11,68,12,68,658,5,68,661,8,68,10,68,12,68,664, - 9,68,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, - 1,70,1,70,1,70,1,70,3,70,698,8,70,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1, - 72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,3,72,717,8,72,1,73,1,73, - 5,73,721,8,73,10,73,12,73,724,9,73,1,74,1,74,1,74,1,74,5,74,730,8,74,10, - 74,12,74,733,9,74,1,74,1,74,1,74,1,74,1,74,5,74,740,8,74,10,74,12,74,743, - 9,74,1,74,3,74,746,8,74,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1, - 76,1,76,1,76,5,76,760,8,76,10,76,12,76,763,9,76,1,77,1,77,1,77,1,77,1,77, - 1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,3,77,780,8,77,1,78,1, - 78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78, - 1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1, - 78,1,78,1,78,1,78,1,78,3,78,817,8,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78, - 1,78,1,78,1,78,1,78,3,78,830,8,78,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1, - 79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79, - 1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1, - 79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79, - 1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1, - 79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79, - 1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,3, - 79,926,8,79,1,80,1,80,5,80,930,8,80,10,80,12,80,933,9,80,1,81,4,81,936, - 8,81,11,81,12,81,937,1,81,1,81,1,82,1,82,1,82,1,82,5,82,946,8,82,10,82, - 12,82,949,9,82,1,82,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,5,83,960,8, - 83,10,83,12,83,963,9,83,1,83,1,83,3,731,741,947,0,84,1,1,3,2,5,3,7,4,9, - 5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35, - 18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59, - 30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83, - 42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101,51,103,52,105,53, - 107,54,109,55,111,56,113,57,115,58,117,59,119,60,121,61,123,62,125,63,127, - 64,129,65,131,66,133,67,135,68,137,69,139,70,141,71,143,72,145,73,147,74, - 149,75,151,76,153,77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,1, - 0,11,1,0,48,57,2,0,69,69,101,101,1,0,49,57,3,0,10,10,13,13,34,34,3,0,10, - 10,13,13,39,39,2,0,88,88,120,120,3,0,48,57,65,70,97,102,2,0,65,90,97,122, - 4,0,48,57,65,90,95,95,97,122,3,0,9,10,12,13,32,32,2,0,10,10,13,13,1010, - 0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0, - 0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23, - 1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0, - 0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45, - 1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0, - 0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67, - 1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0, - 0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89, - 1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0, - 0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0, - 0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0, - 121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131, - 1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1, - 0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0, - 0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0, - 0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,1,169,1,0,0,0,3,176,1,0,0,0, - 5,178,1,0,0,0,7,189,1,0,0,0,9,191,1,0,0,0,11,193,1,0,0,0,13,196,1,0,0,0, - 15,198,1,0,0,0,17,200,1,0,0,0,19,203,1,0,0,0,21,205,1,0,0,0,23,212,1,0, - 0,0,25,221,1,0,0,0,27,229,1,0,0,0,29,231,1,0,0,0,31,233,1,0,0,0,33,242, - 1,0,0,0,35,244,1,0,0,0,37,246,1,0,0,0,39,248,1,0,0,0,41,255,1,0,0,0,43, - 258,1,0,0,0,45,261,1,0,0,0,47,264,1,0,0,0,49,267,1,0,0,0,51,275,1,0,0,0, - 53,287,1,0,0,0,55,290,1,0,0,0,57,295,1,0,0,0,59,298,1,0,0,0,61,304,1,0, - 0,0,63,308,1,0,0,0,65,312,1,0,0,0,67,314,1,0,0,0,69,316,1,0,0,0,71,327, - 1,0,0,0,73,334,1,0,0,0,75,351,1,0,0,0,77,366,1,0,0,0,79,381,1,0,0,0,81, - 394,1,0,0,0,83,404,1,0,0,0,85,429,1,0,0,0,87,444,1,0,0,0,89,463,1,0,0,0, - 91,479,1,0,0,0,93,490,1,0,0,0,95,498,1,0,0,0,97,505,1,0,0,0,99,512,1,0, - 0,0,101,514,1,0,0,0,103,516,1,0,0,0,105,518,1,0,0,0,107,520,1,0,0,0,109, - 522,1,0,0,0,111,524,1,0,0,0,113,527,1,0,0,0,115,530,1,0,0,0,117,533,1,0, - 0,0,119,536,1,0,0,0,121,538,1,0,0,0,123,540,1,0,0,0,125,543,1,0,0,0,127, - 546,1,0,0,0,129,556,1,0,0,0,131,581,1,0,0,0,133,640,1,0,0,0,135,643,1,0, - 0,0,137,650,1,0,0,0,139,665,1,0,0,0,141,697,1,0,0,0,143,699,1,0,0,0,145, - 716,1,0,0,0,147,718,1,0,0,0,149,745,1,0,0,0,151,747,1,0,0,0,153,756,1,0, - 0,0,155,779,1,0,0,0,157,829,1,0,0,0,159,925,1,0,0,0,161,927,1,0,0,0,163, - 935,1,0,0,0,165,941,1,0,0,0,167,955,1,0,0,0,169,170,5,112,0,0,170,171,5, - 114,0,0,171,172,5,97,0,0,172,173,5,103,0,0,173,174,5,109,0,0,174,175,5, - 97,0,0,175,2,1,0,0,0,176,177,5,59,0,0,177,4,1,0,0,0,178,179,5,99,0,0,179, - 180,5,97,0,0,180,181,5,115,0,0,181,182,5,104,0,0,182,183,5,115,0,0,183, - 184,5,99,0,0,184,185,5,114,0,0,185,186,5,105,0,0,186,187,5,112,0,0,187, - 188,5,116,0,0,188,6,1,0,0,0,189,190,5,94,0,0,190,8,1,0,0,0,191,192,5,126, - 0,0,192,10,1,0,0,0,193,194,5,62,0,0,194,195,5,61,0,0,195,12,1,0,0,0,196, - 197,5,62,0,0,197,14,1,0,0,0,198,199,5,60,0,0,199,16,1,0,0,0,200,201,5,60, - 0,0,201,202,5,61,0,0,202,18,1,0,0,0,203,204,5,61,0,0,204,20,1,0,0,0,205, - 206,5,105,0,0,206,207,5,109,0,0,207,208,5,112,0,0,208,209,5,111,0,0,209, - 210,5,114,0,0,210,211,5,116,0,0,211,22,1,0,0,0,212,213,5,102,0,0,213,214, - 5,117,0,0,214,215,5,110,0,0,215,216,5,99,0,0,216,217,5,116,0,0,217,218, - 5,105,0,0,218,219,5,111,0,0,219,220,5,110,0,0,220,24,1,0,0,0,221,222,5, - 114,0,0,222,223,5,101,0,0,223,224,5,116,0,0,224,225,5,117,0,0,225,226,5, - 114,0,0,226,227,5,110,0,0,227,228,5,115,0,0,228,26,1,0,0,0,229,230,5,40, - 0,0,230,28,1,0,0,0,231,232,5,41,0,0,232,30,1,0,0,0,233,234,5,99,0,0,234, - 235,5,111,0,0,235,236,5,110,0,0,236,237,5,116,0,0,237,238,5,114,0,0,238, - 239,5,97,0,0,239,240,5,99,0,0,240,241,5,116,0,0,241,32,1,0,0,0,242,243, - 5,123,0,0,243,34,1,0,0,0,244,245,5,125,0,0,245,36,1,0,0,0,246,247,5,44, - 0,0,247,38,1,0,0,0,248,249,5,114,0,0,249,250,5,101,0,0,250,251,5,116,0, - 0,251,252,5,117,0,0,252,253,5,114,0,0,253,254,5,110,0,0,254,40,1,0,0,0, - 255,256,5,43,0,0,256,257,5,61,0,0,257,42,1,0,0,0,258,259,5,45,0,0,259,260, - 5,61,0,0,260,44,1,0,0,0,261,262,5,43,0,0,262,263,5,43,0,0,263,46,1,0,0, - 0,264,265,5,45,0,0,265,266,5,45,0,0,266,48,1,0,0,0,267,268,5,114,0,0,268, - 269,5,101,0,0,269,270,5,113,0,0,270,271,5,117,0,0,271,272,5,105,0,0,272, - 273,5,114,0,0,273,274,5,101,0,0,274,50,1,0,0,0,275,276,5,99,0,0,276,277, - 5,111,0,0,277,278,5,110,0,0,278,279,5,115,0,0,279,280,5,111,0,0,280,281, - 5,108,0,0,281,282,5,101,0,0,282,283,5,46,0,0,283,284,5,108,0,0,284,285, - 5,111,0,0,285,286,5,103,0,0,286,52,1,0,0,0,287,288,5,105,0,0,288,289,5, - 102,0,0,289,54,1,0,0,0,290,291,5,101,0,0,291,292,5,108,0,0,292,293,5,115, - 0,0,293,294,5,101,0,0,294,56,1,0,0,0,295,296,5,100,0,0,296,297,5,111,0, - 0,297,58,1,0,0,0,298,299,5,119,0,0,299,300,5,104,0,0,300,301,5,105,0,0, - 301,302,5,108,0,0,302,303,5,101,0,0,303,60,1,0,0,0,304,305,5,102,0,0,305, - 306,5,111,0,0,306,307,5,114,0,0,307,62,1,0,0,0,308,309,5,110,0,0,309,310, - 5,101,0,0,310,311,5,119,0,0,311,64,1,0,0,0,312,313,5,91,0,0,313,66,1,0, - 0,0,314,315,5,93,0,0,315,68,1,0,0,0,316,317,5,116,0,0,317,318,5,120,0,0, - 318,319,5,46,0,0,319,320,5,111,0,0,320,321,5,117,0,0,321,322,5,116,0,0, - 322,323,5,112,0,0,323,324,5,117,0,0,324,325,5,116,0,0,325,326,5,115,0,0, - 326,70,1,0,0,0,327,328,5,46,0,0,328,329,5,118,0,0,329,330,5,97,0,0,330, - 331,5,108,0,0,331,332,5,117,0,0,332,333,5,101,0,0,333,72,1,0,0,0,334,335, - 5,46,0,0,335,336,5,108,0,0,336,337,5,111,0,0,337,338,5,99,0,0,338,339,5, - 107,0,0,339,340,5,105,0,0,340,341,5,110,0,0,341,342,5,103,0,0,342,343,5, - 66,0,0,343,344,5,121,0,0,344,345,5,116,0,0,345,346,5,101,0,0,346,347,5, - 99,0,0,347,348,5,111,0,0,348,349,5,100,0,0,349,350,5,101,0,0,350,74,1,0, - 0,0,351,352,5,46,0,0,352,353,5,116,0,0,353,354,5,111,0,0,354,355,5,107, - 0,0,355,356,5,101,0,0,356,357,5,110,0,0,357,358,5,67,0,0,358,359,5,97,0, - 0,359,360,5,116,0,0,360,361,5,101,0,0,361,362,5,103,0,0,362,363,5,111,0, - 0,363,364,5,114,0,0,364,365,5,121,0,0,365,76,1,0,0,0,366,367,5,46,0,0,367, - 368,5,110,0,0,368,369,5,102,0,0,369,370,5,116,0,0,370,371,5,67,0,0,371, - 372,5,111,0,0,372,373,5,109,0,0,373,374,5,109,0,0,374,375,5,105,0,0,375, - 376,5,116,0,0,376,377,5,109,0,0,377,378,5,101,0,0,378,379,5,110,0,0,379, - 380,5,116,0,0,380,78,1,0,0,0,381,382,5,46,0,0,382,383,5,116,0,0,383,384, - 5,111,0,0,384,385,5,107,0,0,385,386,5,101,0,0,386,387,5,110,0,0,387,388, - 5,65,0,0,388,389,5,109,0,0,389,390,5,111,0,0,390,391,5,117,0,0,391,392, - 5,110,0,0,392,393,5,116,0,0,393,80,1,0,0,0,394,395,5,116,0,0,395,396,5, - 120,0,0,396,397,5,46,0,0,397,398,5,105,0,0,398,399,5,110,0,0,399,400,5, - 112,0,0,400,401,5,117,0,0,401,402,5,116,0,0,402,403,5,115,0,0,403,82,1, - 0,0,0,404,405,5,46,0,0,405,406,5,111,0,0,406,407,5,117,0,0,407,408,5,116, - 0,0,408,409,5,112,0,0,409,410,5,111,0,0,410,411,5,105,0,0,411,412,5,110, - 0,0,412,413,5,116,0,0,413,414,5,84,0,0,414,415,5,114,0,0,415,416,5,97,0, - 0,416,417,5,110,0,0,417,418,5,115,0,0,418,419,5,97,0,0,419,420,5,99,0,0, - 420,421,5,116,0,0,421,422,5,105,0,0,422,423,5,111,0,0,423,424,5,110,0,0, - 424,425,5,72,0,0,425,426,5,97,0,0,426,427,5,115,0,0,427,428,5,104,0,0,428, - 84,1,0,0,0,429,430,5,46,0,0,430,431,5,111,0,0,431,432,5,117,0,0,432,433, - 5,116,0,0,433,434,5,112,0,0,434,435,5,111,0,0,435,436,5,105,0,0,436,437, - 5,110,0,0,437,438,5,116,0,0,438,439,5,73,0,0,439,440,5,110,0,0,440,441, - 5,100,0,0,441,442,5,101,0,0,442,443,5,120,0,0,443,86,1,0,0,0,444,445,5, - 46,0,0,445,446,5,117,0,0,446,447,5,110,0,0,447,448,5,108,0,0,448,449,5, - 111,0,0,449,450,5,99,0,0,450,451,5,107,0,0,451,452,5,105,0,0,452,453,5, - 110,0,0,453,454,5,103,0,0,454,455,5,66,0,0,455,456,5,121,0,0,456,457,5, - 116,0,0,457,458,5,101,0,0,458,459,5,99,0,0,459,460,5,111,0,0,460,461,5, - 100,0,0,461,462,5,101,0,0,462,88,1,0,0,0,463,464,5,46,0,0,464,465,5,115, - 0,0,465,466,5,101,0,0,466,467,5,113,0,0,467,468,5,117,0,0,468,469,5,101, - 0,0,469,470,5,110,0,0,470,471,5,99,0,0,471,472,5,101,0,0,472,473,5,78,0, - 0,473,474,5,117,0,0,474,475,5,109,0,0,475,476,5,98,0,0,476,477,5,101,0, - 0,477,478,5,114,0,0,478,90,1,0,0,0,479,480,5,46,0,0,480,481,5,114,0,0,481, - 482,5,101,0,0,482,483,5,118,0,0,483,484,5,101,0,0,484,485,5,114,0,0,485, - 486,5,115,0,0,486,487,5,101,0,0,487,488,5,40,0,0,488,489,5,41,0,0,489,92, - 1,0,0,0,490,491,5,46,0,0,491,492,5,108,0,0,492,493,5,101,0,0,493,494,5, - 110,0,0,494,495,5,103,0,0,495,496,5,116,0,0,496,497,5,104,0,0,497,94,1, - 0,0,0,498,499,5,46,0,0,499,500,5,115,0,0,500,501,5,112,0,0,501,502,5,108, - 0,0,502,503,5,105,0,0,503,504,5,116,0,0,504,96,1,0,0,0,505,506,5,46,0,0, - 506,507,5,115,0,0,507,508,5,108,0,0,508,509,5,105,0,0,509,510,5,99,0,0, - 510,511,5,101,0,0,511,98,1,0,0,0,512,513,5,33,0,0,513,100,1,0,0,0,514,515, - 5,45,0,0,515,102,1,0,0,0,516,517,5,42,0,0,517,104,1,0,0,0,518,519,5,47, - 0,0,519,106,1,0,0,0,520,521,5,37,0,0,521,108,1,0,0,0,522,523,5,43,0,0,523, - 110,1,0,0,0,524,525,5,62,0,0,525,526,5,62,0,0,526,112,1,0,0,0,527,528,5, - 60,0,0,528,529,5,60,0,0,529,114,1,0,0,0,530,531,5,61,0,0,531,532,5,61,0, - 0,532,116,1,0,0,0,533,534,5,33,0,0,534,535,5,61,0,0,535,118,1,0,0,0,536, - 537,5,38,0,0,537,120,1,0,0,0,538,539,5,124,0,0,539,122,1,0,0,0,540,541, - 5,38,0,0,541,542,5,38,0,0,542,124,1,0,0,0,543,544,5,124,0,0,544,545,5,124, - 0,0,545,126,1,0,0,0,546,547,5,99,0,0,547,548,5,111,0,0,548,549,5,110,0, - 0,549,550,5,115,0,0,550,551,5,116,0,0,551,552,5,97,0,0,552,553,5,110,0, - 0,553,554,5,116,0,0,554,128,1,0,0,0,555,557,7,0,0,0,556,555,1,0,0,0,557, - 558,1,0,0,0,558,556,1,0,0,0,558,559,1,0,0,0,559,560,1,0,0,0,560,562,5,46, - 0,0,561,563,7,0,0,0,562,561,1,0,0,0,563,564,1,0,0,0,564,562,1,0,0,0,564, - 565,1,0,0,0,565,566,1,0,0,0,566,568,5,46,0,0,567,569,7,0,0,0,568,567,1, - 0,0,0,569,570,1,0,0,0,570,568,1,0,0,0,570,571,1,0,0,0,571,130,1,0,0,0,572, - 573,5,116,0,0,573,574,5,114,0,0,574,575,5,117,0,0,575,582,5,101,0,0,576, - 577,5,102,0,0,577,578,5,97,0,0,578,579,5,108,0,0,579,580,5,115,0,0,580, - 582,5,101,0,0,581,572,1,0,0,0,581,576,1,0,0,0,582,132,1,0,0,0,583,584,5, - 115,0,0,584,585,5,97,0,0,585,586,5,116,0,0,586,587,5,111,0,0,587,588,5, - 115,0,0,588,589,5,104,0,0,589,590,5,105,0,0,590,641,5,115,0,0,591,592,5, - 115,0,0,592,593,5,97,0,0,593,594,5,116,0,0,594,641,5,115,0,0,595,596,5, - 102,0,0,596,597,5,105,0,0,597,598,5,110,0,0,598,599,5,110,0,0,599,600,5, - 101,0,0,600,641,5,121,0,0,601,602,5,98,0,0,602,603,5,105,0,0,603,604,5, - 116,0,0,604,641,5,115,0,0,605,606,5,98,0,0,606,607,5,105,0,0,607,608,5, - 116,0,0,608,609,5,99,0,0,609,610,5,111,0,0,610,611,5,105,0,0,611,641,5, - 110,0,0,612,613,5,115,0,0,613,614,5,101,0,0,614,615,5,99,0,0,615,616,5, - 111,0,0,616,617,5,110,0,0,617,618,5,100,0,0,618,641,5,115,0,0,619,620,5, - 109,0,0,620,621,5,105,0,0,621,622,5,110,0,0,622,623,5,117,0,0,623,624,5, - 116,0,0,624,625,5,101,0,0,625,641,5,115,0,0,626,627,5,104,0,0,627,628,5, - 111,0,0,628,629,5,117,0,0,629,630,5,114,0,0,630,641,5,115,0,0,631,632,5, - 100,0,0,632,633,5,97,0,0,633,634,5,121,0,0,634,641,5,115,0,0,635,636,5, - 119,0,0,636,637,5,101,0,0,637,638,5,101,0,0,638,639,5,107,0,0,639,641,5, - 115,0,0,640,583,1,0,0,0,640,591,1,0,0,0,640,595,1,0,0,0,640,601,1,0,0,0, - 640,605,1,0,0,0,640,612,1,0,0,0,640,619,1,0,0,0,640,626,1,0,0,0,640,631, - 1,0,0,0,640,635,1,0,0,0,641,134,1,0,0,0,642,644,5,45,0,0,643,642,1,0,0, - 0,643,644,1,0,0,0,644,645,1,0,0,0,645,647,3,137,68,0,646,648,3,139,69,0, - 647,646,1,0,0,0,647,648,1,0,0,0,648,136,1,0,0,0,649,651,7,0,0,0,650,649, - 1,0,0,0,651,652,1,0,0,0,652,650,1,0,0,0,652,653,1,0,0,0,653,662,1,0,0,0, - 654,656,5,95,0,0,655,657,7,0,0,0,656,655,1,0,0,0,657,658,1,0,0,0,658,656, - 1,0,0,0,658,659,1,0,0,0,659,661,1,0,0,0,660,654,1,0,0,0,661,664,1,0,0,0, - 662,660,1,0,0,0,662,663,1,0,0,0,663,138,1,0,0,0,664,662,1,0,0,0,665,666, - 7,1,0,0,666,667,3,137,68,0,667,140,1,0,0,0,668,669,5,105,0,0,669,670,5, - 110,0,0,670,698,5,116,0,0,671,672,5,98,0,0,672,673,5,111,0,0,673,674,5, - 111,0,0,674,698,5,108,0,0,675,676,5,115,0,0,676,677,5,116,0,0,677,678,5, - 114,0,0,678,679,5,105,0,0,679,680,5,110,0,0,680,698,5,103,0,0,681,682,5, - 112,0,0,682,683,5,117,0,0,683,684,5,98,0,0,684,685,5,107,0,0,685,686,5, - 101,0,0,686,698,5,121,0,0,687,688,5,115,0,0,688,689,5,105,0,0,689,698,5, - 103,0,0,690,691,5,100,0,0,691,692,5,97,0,0,692,693,5,116,0,0,693,694,5, - 97,0,0,694,695,5,115,0,0,695,696,5,105,0,0,696,698,5,103,0,0,697,668,1, - 0,0,0,697,671,1,0,0,0,697,675,1,0,0,0,697,681,1,0,0,0,697,687,1,0,0,0,697, - 690,1,0,0,0,698,142,1,0,0,0,699,700,5,98,0,0,700,701,5,121,0,0,701,702, - 5,116,0,0,702,703,5,101,0,0,703,704,5,115,0,0,704,144,1,0,0,0,705,706,5, - 98,0,0,706,707,5,121,0,0,707,708,5,116,0,0,708,709,5,101,0,0,709,710,5, - 115,0,0,710,711,1,0,0,0,711,717,3,147,73,0,712,713,5,98,0,0,713,714,5,121, - 0,0,714,715,5,116,0,0,715,717,5,101,0,0,716,705,1,0,0,0,716,712,1,0,0,0, - 717,146,1,0,0,0,718,722,7,2,0,0,719,721,7,0,0,0,720,719,1,0,0,0,721,724, - 1,0,0,0,722,720,1,0,0,0,722,723,1,0,0,0,723,148,1,0,0,0,724,722,1,0,0,0, - 725,731,5,34,0,0,726,727,5,92,0,0,727,730,5,34,0,0,728,730,8,3,0,0,729, - 726,1,0,0,0,729,728,1,0,0,0,730,733,1,0,0,0,731,732,1,0,0,0,731,729,1,0, - 0,0,732,734,1,0,0,0,733,731,1,0,0,0,734,746,5,34,0,0,735,741,5,39,0,0,736, - 737,5,92,0,0,737,740,5,39,0,0,738,740,8,4,0,0,739,736,1,0,0,0,739,738,1, - 0,0,0,740,743,1,0,0,0,741,742,1,0,0,0,741,739,1,0,0,0,742,744,1,0,0,0,743, - 741,1,0,0,0,744,746,5,39,0,0,745,725,1,0,0,0,745,735,1,0,0,0,746,150,1, - 0,0,0,747,748,5,100,0,0,748,749,5,97,0,0,749,750,5,116,0,0,750,751,5,101, - 0,0,751,752,5,40,0,0,752,753,1,0,0,0,753,754,3,149,74,0,754,755,5,41,0, - 0,755,152,1,0,0,0,756,757,5,48,0,0,757,761,7,5,0,0,758,760,7,6,0,0,759, - 758,1,0,0,0,760,763,1,0,0,0,761,759,1,0,0,0,761,762,1,0,0,0,762,154,1,0, - 0,0,763,761,1,0,0,0,764,765,5,116,0,0,765,766,5,104,0,0,766,767,5,105,0, - 0,767,768,5,115,0,0,768,769,5,46,0,0,769,770,5,97,0,0,770,771,5,103,0,0, - 771,780,5,101,0,0,772,773,5,116,0,0,773,774,5,120,0,0,774,775,5,46,0,0, - 775,776,5,116,0,0,776,777,5,105,0,0,777,778,5,109,0,0,778,780,5,101,0,0, - 779,764,1,0,0,0,779,772,1,0,0,0,780,156,1,0,0,0,781,782,5,117,0,0,782,783, - 5,110,0,0,783,784,5,115,0,0,784,785,5,97,0,0,785,786,5,102,0,0,786,787, - 5,101,0,0,787,788,5,95,0,0,788,789,5,105,0,0,789,790,5,110,0,0,790,830, - 5,116,0,0,791,792,5,117,0,0,792,793,5,110,0,0,793,794,5,115,0,0,794,795, - 5,97,0,0,795,796,5,102,0,0,796,797,5,101,0,0,797,798,5,95,0,0,798,799,5, - 98,0,0,799,800,5,111,0,0,800,801,5,111,0,0,801,830,5,108,0,0,802,803,5, - 117,0,0,803,804,5,110,0,0,804,805,5,115,0,0,805,806,5,97,0,0,806,807,5, - 102,0,0,807,808,5,101,0,0,808,809,5,95,0,0,809,810,5,98,0,0,810,811,5,121, - 0,0,811,812,5,116,0,0,812,813,5,101,0,0,813,814,5,115,0,0,814,816,1,0,0, - 0,815,817,3,147,73,0,816,815,1,0,0,0,816,817,1,0,0,0,817,830,1,0,0,0,818, - 819,5,117,0,0,819,820,5,110,0,0,820,821,5,115,0,0,821,822,5,97,0,0,822, - 823,5,102,0,0,823,824,5,101,0,0,824,825,5,95,0,0,825,826,5,98,0,0,826,827, - 5,121,0,0,827,828,5,116,0,0,828,830,5,101,0,0,829,781,1,0,0,0,829,791,1, - 0,0,0,829,802,1,0,0,0,829,818,1,0,0,0,830,158,1,0,0,0,831,832,5,116,0,0, - 832,833,5,104,0,0,833,834,5,105,0,0,834,835,5,115,0,0,835,836,5,46,0,0, - 836,837,5,97,0,0,837,838,5,99,0,0,838,839,5,116,0,0,839,840,5,105,0,0,840, - 841,5,118,0,0,841,842,5,101,0,0,842,843,5,73,0,0,843,844,5,110,0,0,844, - 845,5,112,0,0,845,846,5,117,0,0,846,847,5,116,0,0,847,848,5,73,0,0,848, - 849,5,110,0,0,849,850,5,100,0,0,850,851,5,101,0,0,851,926,5,120,0,0,852, - 853,5,116,0,0,853,854,5,104,0,0,854,855,5,105,0,0,855,856,5,115,0,0,856, - 857,5,46,0,0,857,858,5,97,0,0,858,859,5,99,0,0,859,860,5,116,0,0,860,861, - 5,105,0,0,861,862,5,118,0,0,862,863,5,101,0,0,863,864,5,66,0,0,864,865, - 5,121,0,0,865,866,5,116,0,0,866,867,5,101,0,0,867,868,5,99,0,0,868,869, - 5,111,0,0,869,870,5,100,0,0,870,926,5,101,0,0,871,872,5,116,0,0,872,873, - 5,120,0,0,873,874,5,46,0,0,874,875,5,105,0,0,875,876,5,110,0,0,876,877, - 5,112,0,0,877,878,5,117,0,0,878,879,5,116,0,0,879,880,5,115,0,0,880,881, - 5,46,0,0,881,882,5,108,0,0,882,883,5,101,0,0,883,884,5,110,0,0,884,885, - 5,103,0,0,885,886,5,116,0,0,886,926,5,104,0,0,887,888,5,116,0,0,888,889, - 5,120,0,0,889,890,5,46,0,0,890,891,5,111,0,0,891,892,5,117,0,0,892,893, - 5,116,0,0,893,894,5,112,0,0,894,895,5,117,0,0,895,896,5,116,0,0,896,897, - 5,115,0,0,897,898,5,46,0,0,898,899,5,108,0,0,899,900,5,101,0,0,900,901, - 5,110,0,0,901,902,5,103,0,0,902,903,5,116,0,0,903,926,5,104,0,0,904,905, - 5,116,0,0,905,906,5,120,0,0,906,907,5,46,0,0,907,908,5,118,0,0,908,909, - 5,101,0,0,909,910,5,114,0,0,910,911,5,115,0,0,911,912,5,105,0,0,912,913, - 5,111,0,0,913,926,5,110,0,0,914,915,5,116,0,0,915,916,5,120,0,0,916,917, - 5,46,0,0,917,918,5,108,0,0,918,919,5,111,0,0,919,920,5,99,0,0,920,921,5, - 107,0,0,921,922,5,116,0,0,922,923,5,105,0,0,923,924,5,109,0,0,924,926,5, - 101,0,0,925,831,1,0,0,0,925,852,1,0,0,0,925,871,1,0,0,0,925,887,1,0,0,0, - 925,904,1,0,0,0,925,914,1,0,0,0,926,160,1,0,0,0,927,931,7,7,0,0,928,930, - 7,8,0,0,929,928,1,0,0,0,930,933,1,0,0,0,931,929,1,0,0,0,931,932,1,0,0,0, - 932,162,1,0,0,0,933,931,1,0,0,0,934,936,7,9,0,0,935,934,1,0,0,0,936,937, - 1,0,0,0,937,935,1,0,0,0,937,938,1,0,0,0,938,939,1,0,0,0,939,940,6,81,0, - 0,940,164,1,0,0,0,941,942,5,47,0,0,942,943,5,42,0,0,943,947,1,0,0,0,944, - 946,9,0,0,0,945,944,1,0,0,0,946,949,1,0,0,0,947,948,1,0,0,0,947,945,1,0, - 0,0,948,950,1,0,0,0,949,947,1,0,0,0,950,951,5,42,0,0,951,952,5,47,0,0,952, - 953,1,0,0,0,953,954,6,82,1,0,954,166,1,0,0,0,955,956,5,47,0,0,956,957,5, - 47,0,0,957,961,1,0,0,0,958,960,8,10,0,0,959,958,1,0,0,0,960,963,1,0,0,0, - 961,959,1,0,0,0,961,962,1,0,0,0,962,964,1,0,0,0,963,961,1,0,0,0,964,965, - 6,83,1,0,965,168,1,0,0,0,28,0,558,564,570,581,640,643,647,652,658,662,697, - 716,722,729,731,739,741,745,761,779,816,829,925,931,937,947,961,2,6,0,0, - 0,1,0]; + 2,82,7,82,2,83,7,83,2,84,7,84,2,85,7,85,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1, + 1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5, + 1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1, + 10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12, + 1,12,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1, + 15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19, + 1,20,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1, + 24,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25, + 1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1, + 29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,32, + 1,32,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1, + 35,1,35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36, + 1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1, + 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38, + 1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1, + 39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40, + 1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1, + 41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41, + 1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1, + 42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43, + 1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1, + 44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45, + 1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1, + 47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,50,1,50, + 1,51,1,51,1,52,1,52,1,53,1,53,1,54,1,54,1,55,1,55,1,55,1,56,1,56,1,56,1, + 57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,60,1,60,1,61,1,61,1,61,1,62,1,62, + 1,62,1,63,1,63,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1, + 66,4,66,565,8,66,11,66,12,66,566,1,66,1,66,4,66,571,8,66,11,66,12,66,572, + 1,66,1,66,4,66,577,8,66,11,66,12,66,578,1,67,1,67,1,67,1,67,1,67,1,67,1, + 67,1,67,1,67,3,67,590,8,67,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68, + 1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1, + 68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68, + 1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1, + 68,1,68,1,68,1,68,1,68,3,68,649,8,68,1,69,3,69,652,8,69,1,69,1,69,3,69, + 656,8,69,1,70,4,70,659,8,70,11,70,12,70,660,1,70,1,70,4,70,665,8,70,11, + 70,12,70,666,5,70,669,8,70,10,70,12,70,672,9,70,1,71,1,71,1,71,1,72,1,72, + 1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1, + 72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,3,72,706, + 8,72,1,73,1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1, + 74,1,74,1,74,1,74,3,74,725,8,74,1,75,1,75,5,75,729,8,75,10,75,12,75,732, + 9,75,1,76,1,76,1,76,1,76,5,76,738,8,76,10,76,12,76,741,9,76,1,76,1,76,1, + 76,1,76,1,76,5,76,748,8,76,10,76,12,76,751,9,76,1,76,3,76,754,8,76,1,77, + 1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,78,1,78,1,78,5,78,768,8,78,10, + 78,12,78,771,9,78,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79, + 1,79,1,79,1,79,1,79,3,79,788,8,79,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1, + 80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80, + 1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,3,80,825, + 8,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,3,80,838,8, + 80,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81, + 1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1, + 81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81, + 1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1, + 81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81, + 1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1, + 81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,3,81,934,8,81,1,82,1,82,5,82,938, + 8,82,10,82,12,82,941,9,82,1,83,4,83,944,8,83,11,83,12,83,945,1,83,1,83, + 1,84,1,84,1,84,1,84,5,84,954,8,84,10,84,12,84,957,9,84,1,84,1,84,1,84,1, + 84,1,84,1,85,1,85,1,85,1,85,5,85,968,8,85,10,85,12,85,971,9,85,1,85,1,85, + 3,739,749,955,0,86,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11, + 23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23, + 47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35, + 71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47, + 95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57,115, + 58,117,59,119,60,121,61,123,62,125,63,127,64,129,65,131,66,133,67,135,68, + 137,69,139,70,141,71,143,72,145,73,147,74,149,75,151,76,153,77,155,78,157, + 79,159,80,161,81,163,82,165,83,167,84,169,85,171,86,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,1018,0,1,1,0,0,0,0,3, + 1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0, + 15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0, + 0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0, + 37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0, + 0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0, + 59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0, + 0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0, + 81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0, + 0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0, + 103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113, + 1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1, + 0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0, + 0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0, + 0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0, + 0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0, + 165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,1,173,1,0,0,0,3,180, + 1,0,0,0,5,182,1,0,0,0,7,193,1,0,0,0,9,195,1,0,0,0,11,197,1,0,0,0,13,200, + 1,0,0,0,15,202,1,0,0,0,17,204,1,0,0,0,19,207,1,0,0,0,21,209,1,0,0,0,23, + 216,1,0,0,0,25,225,1,0,0,0,27,233,1,0,0,0,29,235,1,0,0,0,31,237,1,0,0,0, + 33,246,1,0,0,0,35,248,1,0,0,0,37,250,1,0,0,0,39,252,1,0,0,0,41,259,1,0, + 0,0,43,262,1,0,0,0,45,265,1,0,0,0,47,268,1,0,0,0,49,271,1,0,0,0,51,279, + 1,0,0,0,53,291,1,0,0,0,55,294,1,0,0,0,57,299,1,0,0,0,59,302,1,0,0,0,61, + 308,1,0,0,0,63,312,1,0,0,0,65,316,1,0,0,0,67,318,1,0,0,0,69,320,1,0,0,0, + 71,331,1,0,0,0,73,338,1,0,0,0,75,355,1,0,0,0,77,370,1,0,0,0,79,385,1,0, + 0,0,81,398,1,0,0,0,83,408,1,0,0,0,85,433,1,0,0,0,87,448,1,0,0,0,89,467, + 1,0,0,0,91,483,1,0,0,0,93,494,1,0,0,0,95,502,1,0,0,0,97,509,1,0,0,0,99, + 516,1,0,0,0,101,518,1,0,0,0,103,520,1,0,0,0,105,522,1,0,0,0,107,524,1,0, + 0,0,109,526,1,0,0,0,111,528,1,0,0,0,113,531,1,0,0,0,115,534,1,0,0,0,117, + 537,1,0,0,0,119,540,1,0,0,0,121,542,1,0,0,0,123,544,1,0,0,0,125,547,1,0, + 0,0,127,550,1,0,0,0,129,552,1,0,0,0,131,554,1,0,0,0,133,564,1,0,0,0,135, + 589,1,0,0,0,137,648,1,0,0,0,139,651,1,0,0,0,141,658,1,0,0,0,143,673,1,0, + 0,0,145,705,1,0,0,0,147,707,1,0,0,0,149,724,1,0,0,0,151,726,1,0,0,0,153, + 753,1,0,0,0,155,755,1,0,0,0,157,764,1,0,0,0,159,787,1,0,0,0,161,837,1,0, + 0,0,163,933,1,0,0,0,165,935,1,0,0,0,167,943,1,0,0,0,169,949,1,0,0,0,171, + 963,1,0,0,0,173,174,5,112,0,0,174,175,5,114,0,0,175,176,5,97,0,0,176,177, + 5,103,0,0,177,178,5,109,0,0,178,179,5,97,0,0,179,2,1,0,0,0,180,181,5,59, + 0,0,181,4,1,0,0,0,182,183,5,99,0,0,183,184,5,97,0,0,184,185,5,115,0,0,185, + 186,5,104,0,0,186,187,5,115,0,0,187,188,5,99,0,0,188,189,5,114,0,0,189, + 190,5,105,0,0,190,191,5,112,0,0,191,192,5,116,0,0,192,6,1,0,0,0,193,194, + 5,94,0,0,194,8,1,0,0,0,195,196,5,126,0,0,196,10,1,0,0,0,197,198,5,62,0, + 0,198,199,5,61,0,0,199,12,1,0,0,0,200,201,5,62,0,0,201,14,1,0,0,0,202,203, + 5,60,0,0,203,16,1,0,0,0,204,205,5,60,0,0,205,206,5,61,0,0,206,18,1,0,0, + 0,207,208,5,61,0,0,208,20,1,0,0,0,209,210,5,105,0,0,210,211,5,109,0,0,211, + 212,5,112,0,0,212,213,5,111,0,0,213,214,5,114,0,0,214,215,5,116,0,0,215, + 22,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,24,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,26,1,0,0,0,233,234,5,40,0,0,234,28,1,0,0,0,235,236,5,41,0,0, + 236,30,1,0,0,0,237,238,5,99,0,0,238,239,5,111,0,0,239,240,5,110,0,0,240, + 241,5,116,0,0,241,242,5,114,0,0,242,243,5,97,0,0,243,244,5,99,0,0,244,245, + 5,116,0,0,245,32,1,0,0,0,246,247,5,123,0,0,247,34,1,0,0,0,248,249,5,125, + 0,0,249,36,1,0,0,0,250,251,5,44,0,0,251,38,1,0,0,0,252,253,5,114,0,0,253, + 254,5,101,0,0,254,255,5,116,0,0,255,256,5,117,0,0,256,257,5,114,0,0,257, + 258,5,110,0,0,258,40,1,0,0,0,259,260,5,43,0,0,260,261,5,61,0,0,261,42,1, + 0,0,0,262,263,5,45,0,0,263,264,5,61,0,0,264,44,1,0,0,0,265,266,5,43,0,0, + 266,267,5,43,0,0,267,46,1,0,0,0,268,269,5,45,0,0,269,270,5,45,0,0,270,48, + 1,0,0,0,271,272,5,114,0,0,272,273,5,101,0,0,273,274,5,113,0,0,274,275,5, + 117,0,0,275,276,5,105,0,0,276,277,5,114,0,0,277,278,5,101,0,0,278,50,1, + 0,0,0,279,280,5,99,0,0,280,281,5,111,0,0,281,282,5,110,0,0,282,283,5,115, + 0,0,283,284,5,111,0,0,284,285,5,108,0,0,285,286,5,101,0,0,286,287,5,46, + 0,0,287,288,5,108,0,0,288,289,5,111,0,0,289,290,5,103,0,0,290,52,1,0,0, + 0,291,292,5,105,0,0,292,293,5,102,0,0,293,54,1,0,0,0,294,295,5,101,0,0, + 295,296,5,108,0,0,296,297,5,115,0,0,297,298,5,101,0,0,298,56,1,0,0,0,299, + 300,5,100,0,0,300,301,5,111,0,0,301,58,1,0,0,0,302,303,5,119,0,0,303,304, + 5,104,0,0,304,305,5,105,0,0,305,306,5,108,0,0,306,307,5,101,0,0,307,60, + 1,0,0,0,308,309,5,102,0,0,309,310,5,111,0,0,310,311,5,114,0,0,311,62,1, + 0,0,0,312,313,5,110,0,0,313,314,5,101,0,0,314,315,5,119,0,0,315,64,1,0, + 0,0,316,317,5,91,0,0,317,66,1,0,0,0,318,319,5,93,0,0,319,68,1,0,0,0,320, + 321,5,116,0,0,321,322,5,120,0,0,322,323,5,46,0,0,323,324,5,111,0,0,324, + 325,5,117,0,0,325,326,5,116,0,0,326,327,5,112,0,0,327,328,5,117,0,0,328, + 329,5,116,0,0,329,330,5,115,0,0,330,70,1,0,0,0,331,332,5,46,0,0,332,333, + 5,118,0,0,333,334,5,97,0,0,334,335,5,108,0,0,335,336,5,117,0,0,336,337, + 5,101,0,0,337,72,1,0,0,0,338,339,5,46,0,0,339,340,5,108,0,0,340,341,5,111, + 0,0,341,342,5,99,0,0,342,343,5,107,0,0,343,344,5,105,0,0,344,345,5,110, + 0,0,345,346,5,103,0,0,346,347,5,66,0,0,347,348,5,121,0,0,348,349,5,116, + 0,0,349,350,5,101,0,0,350,351,5,99,0,0,351,352,5,111,0,0,352,353,5,100, + 0,0,353,354,5,101,0,0,354,74,1,0,0,0,355,356,5,46,0,0,356,357,5,116,0,0, + 357,358,5,111,0,0,358,359,5,107,0,0,359,360,5,101,0,0,360,361,5,110,0,0, + 361,362,5,67,0,0,362,363,5,97,0,0,363,364,5,116,0,0,364,365,5,101,0,0,365, + 366,5,103,0,0,366,367,5,111,0,0,367,368,5,114,0,0,368,369,5,121,0,0,369, + 76,1,0,0,0,370,371,5,46,0,0,371,372,5,110,0,0,372,373,5,102,0,0,373,374, + 5,116,0,0,374,375,5,67,0,0,375,376,5,111,0,0,376,377,5,109,0,0,377,378, + 5,109,0,0,378,379,5,105,0,0,379,380,5,116,0,0,380,381,5,109,0,0,381,382, + 5,101,0,0,382,383,5,110,0,0,383,384,5,116,0,0,384,78,1,0,0,0,385,386,5, + 46,0,0,386,387,5,116,0,0,387,388,5,111,0,0,388,389,5,107,0,0,389,390,5, + 101,0,0,390,391,5,110,0,0,391,392,5,65,0,0,392,393,5,109,0,0,393,394,5, + 111,0,0,394,395,5,117,0,0,395,396,5,110,0,0,396,397,5,116,0,0,397,80,1, + 0,0,0,398,399,5,116,0,0,399,400,5,120,0,0,400,401,5,46,0,0,401,402,5,105, + 0,0,402,403,5,110,0,0,403,404,5,112,0,0,404,405,5,117,0,0,405,406,5,116, + 0,0,406,407,5,115,0,0,407,82,1,0,0,0,408,409,5,46,0,0,409,410,5,111,0,0, + 410,411,5,117,0,0,411,412,5,116,0,0,412,413,5,112,0,0,413,414,5,111,0,0, + 414,415,5,105,0,0,415,416,5,110,0,0,416,417,5,116,0,0,417,418,5,84,0,0, + 418,419,5,114,0,0,419,420,5,97,0,0,420,421,5,110,0,0,421,422,5,115,0,0, + 422,423,5,97,0,0,423,424,5,99,0,0,424,425,5,116,0,0,425,426,5,105,0,0,426, + 427,5,111,0,0,427,428,5,110,0,0,428,429,5,72,0,0,429,430,5,97,0,0,430,431, + 5,115,0,0,431,432,5,104,0,0,432,84,1,0,0,0,433,434,5,46,0,0,434,435,5,111, + 0,0,435,436,5,117,0,0,436,437,5,116,0,0,437,438,5,112,0,0,438,439,5,111, + 0,0,439,440,5,105,0,0,440,441,5,110,0,0,441,442,5,116,0,0,442,443,5,73, + 0,0,443,444,5,110,0,0,444,445,5,100,0,0,445,446,5,101,0,0,446,447,5,120, + 0,0,447,86,1,0,0,0,448,449,5,46,0,0,449,450,5,117,0,0,450,451,5,110,0,0, + 451,452,5,108,0,0,452,453,5,111,0,0,453,454,5,99,0,0,454,455,5,107,0,0, + 455,456,5,105,0,0,456,457,5,110,0,0,457,458,5,103,0,0,458,459,5,66,0,0, + 459,460,5,121,0,0,460,461,5,116,0,0,461,462,5,101,0,0,462,463,5,99,0,0, + 463,464,5,111,0,0,464,465,5,100,0,0,465,466,5,101,0,0,466,88,1,0,0,0,467, + 468,5,46,0,0,468,469,5,115,0,0,469,470,5,101,0,0,470,471,5,113,0,0,471, + 472,5,117,0,0,472,473,5,101,0,0,473,474,5,110,0,0,474,475,5,99,0,0,475, + 476,5,101,0,0,476,477,5,78,0,0,477,478,5,117,0,0,478,479,5,109,0,0,479, + 480,5,98,0,0,480,481,5,101,0,0,481,482,5,114,0,0,482,90,1,0,0,0,483,484, + 5,46,0,0,484,485,5,114,0,0,485,486,5,101,0,0,486,487,5,118,0,0,487,488, + 5,101,0,0,488,489,5,114,0,0,489,490,5,115,0,0,490,491,5,101,0,0,491,492, + 5,40,0,0,492,493,5,41,0,0,493,92,1,0,0,0,494,495,5,46,0,0,495,496,5,108, + 0,0,496,497,5,101,0,0,497,498,5,110,0,0,498,499,5,103,0,0,499,500,5,116, + 0,0,500,501,5,104,0,0,501,94,1,0,0,0,502,503,5,46,0,0,503,504,5,115,0,0, + 504,505,5,112,0,0,505,506,5,108,0,0,506,507,5,105,0,0,507,508,5,116,0,0, + 508,96,1,0,0,0,509,510,5,46,0,0,510,511,5,115,0,0,511,512,5,108,0,0,512, + 513,5,105,0,0,513,514,5,99,0,0,514,515,5,101,0,0,515,98,1,0,0,0,516,517, + 5,33,0,0,517,100,1,0,0,0,518,519,5,45,0,0,519,102,1,0,0,0,520,521,5,42, + 0,0,521,104,1,0,0,0,522,523,5,47,0,0,523,106,1,0,0,0,524,525,5,37,0,0,525, + 108,1,0,0,0,526,527,5,43,0,0,527,110,1,0,0,0,528,529,5,62,0,0,529,530,5, + 62,0,0,530,112,1,0,0,0,531,532,5,60,0,0,532,533,5,60,0,0,533,114,1,0,0, + 0,534,535,5,61,0,0,535,536,5,61,0,0,536,116,1,0,0,0,537,538,5,33,0,0,538, + 539,5,61,0,0,539,118,1,0,0,0,540,541,5,38,0,0,541,120,1,0,0,0,542,543,5, + 124,0,0,543,122,1,0,0,0,544,545,5,38,0,0,545,546,5,38,0,0,546,124,1,0,0, + 0,547,548,5,124,0,0,548,549,5,124,0,0,549,126,1,0,0,0,550,551,5,63,0,0, + 551,128,1,0,0,0,552,553,5,58,0,0,553,130,1,0,0,0,554,555,5,99,0,0,555,556, + 5,111,0,0,556,557,5,110,0,0,557,558,5,115,0,0,558,559,5,116,0,0,559,560, + 5,97,0,0,560,561,5,110,0,0,561,562,5,116,0,0,562,132,1,0,0,0,563,565,7, + 0,0,0,564,563,1,0,0,0,565,566,1,0,0,0,566,564,1,0,0,0,566,567,1,0,0,0,567, + 568,1,0,0,0,568,570,5,46,0,0,569,571,7,0,0,0,570,569,1,0,0,0,571,572,1, + 0,0,0,572,570,1,0,0,0,572,573,1,0,0,0,573,574,1,0,0,0,574,576,5,46,0,0, + 575,577,7,0,0,0,576,575,1,0,0,0,577,578,1,0,0,0,578,576,1,0,0,0,578,579, + 1,0,0,0,579,134,1,0,0,0,580,581,5,116,0,0,581,582,5,114,0,0,582,583,5,117, + 0,0,583,590,5,101,0,0,584,585,5,102,0,0,585,586,5,97,0,0,586,587,5,108, + 0,0,587,588,5,115,0,0,588,590,5,101,0,0,589,580,1,0,0,0,589,584,1,0,0,0, + 590,136,1,0,0,0,591,592,5,115,0,0,592,593,5,97,0,0,593,594,5,116,0,0,594, + 595,5,111,0,0,595,596,5,115,0,0,596,597,5,104,0,0,597,598,5,105,0,0,598, + 649,5,115,0,0,599,600,5,115,0,0,600,601,5,97,0,0,601,602,5,116,0,0,602, + 649,5,115,0,0,603,604,5,102,0,0,604,605,5,105,0,0,605,606,5,110,0,0,606, + 607,5,110,0,0,607,608,5,101,0,0,608,649,5,121,0,0,609,610,5,98,0,0,610, + 611,5,105,0,0,611,612,5,116,0,0,612,649,5,115,0,0,613,614,5,98,0,0,614, + 615,5,105,0,0,615,616,5,116,0,0,616,617,5,99,0,0,617,618,5,111,0,0,618, + 619,5,105,0,0,619,649,5,110,0,0,620,621,5,115,0,0,621,622,5,101,0,0,622, + 623,5,99,0,0,623,624,5,111,0,0,624,625,5,110,0,0,625,626,5,100,0,0,626, + 649,5,115,0,0,627,628,5,109,0,0,628,629,5,105,0,0,629,630,5,110,0,0,630, + 631,5,117,0,0,631,632,5,116,0,0,632,633,5,101,0,0,633,649,5,115,0,0,634, + 635,5,104,0,0,635,636,5,111,0,0,636,637,5,117,0,0,637,638,5,114,0,0,638, + 649,5,115,0,0,639,640,5,100,0,0,640,641,5,97,0,0,641,642,5,121,0,0,642, + 649,5,115,0,0,643,644,5,119,0,0,644,645,5,101,0,0,645,646,5,101,0,0,646, + 647,5,107,0,0,647,649,5,115,0,0,648,591,1,0,0,0,648,599,1,0,0,0,648,603, + 1,0,0,0,648,609,1,0,0,0,648,613,1,0,0,0,648,620,1,0,0,0,648,627,1,0,0,0, + 648,634,1,0,0,0,648,639,1,0,0,0,648,643,1,0,0,0,649,138,1,0,0,0,650,652, + 5,45,0,0,651,650,1,0,0,0,651,652,1,0,0,0,652,653,1,0,0,0,653,655,3,141, + 70,0,654,656,3,143,71,0,655,654,1,0,0,0,655,656,1,0,0,0,656,140,1,0,0,0, + 657,659,7,0,0,0,658,657,1,0,0,0,659,660,1,0,0,0,660,658,1,0,0,0,660,661, + 1,0,0,0,661,670,1,0,0,0,662,664,5,95,0,0,663,665,7,0,0,0,664,663,1,0,0, + 0,665,666,1,0,0,0,666,664,1,0,0,0,666,667,1,0,0,0,667,669,1,0,0,0,668,662, + 1,0,0,0,669,672,1,0,0,0,670,668,1,0,0,0,670,671,1,0,0,0,671,142,1,0,0,0, + 672,670,1,0,0,0,673,674,7,1,0,0,674,675,3,141,70,0,675,144,1,0,0,0,676, + 677,5,105,0,0,677,678,5,110,0,0,678,706,5,116,0,0,679,680,5,98,0,0,680, + 681,5,111,0,0,681,682,5,111,0,0,682,706,5,108,0,0,683,684,5,115,0,0,684, + 685,5,116,0,0,685,686,5,114,0,0,686,687,5,105,0,0,687,688,5,110,0,0,688, + 706,5,103,0,0,689,690,5,112,0,0,690,691,5,117,0,0,691,692,5,98,0,0,692, + 693,5,107,0,0,693,694,5,101,0,0,694,706,5,121,0,0,695,696,5,115,0,0,696, + 697,5,105,0,0,697,706,5,103,0,0,698,699,5,100,0,0,699,700,5,97,0,0,700, + 701,5,116,0,0,701,702,5,97,0,0,702,703,5,115,0,0,703,704,5,105,0,0,704, + 706,5,103,0,0,705,676,1,0,0,0,705,679,1,0,0,0,705,683,1,0,0,0,705,689,1, + 0,0,0,705,695,1,0,0,0,705,698,1,0,0,0,706,146,1,0,0,0,707,708,5,98,0,0, + 708,709,5,121,0,0,709,710,5,116,0,0,710,711,5,101,0,0,711,712,5,115,0,0, + 712,148,1,0,0,0,713,714,5,98,0,0,714,715,5,121,0,0,715,716,5,116,0,0,716, + 717,5,101,0,0,717,718,5,115,0,0,718,719,1,0,0,0,719,725,3,151,75,0,720, + 721,5,98,0,0,721,722,5,121,0,0,722,723,5,116,0,0,723,725,5,101,0,0,724, + 713,1,0,0,0,724,720,1,0,0,0,725,150,1,0,0,0,726,730,7,2,0,0,727,729,7,0, + 0,0,728,727,1,0,0,0,729,732,1,0,0,0,730,728,1,0,0,0,730,731,1,0,0,0,731, + 152,1,0,0,0,732,730,1,0,0,0,733,739,5,34,0,0,734,735,5,92,0,0,735,738,5, + 34,0,0,736,738,8,3,0,0,737,734,1,0,0,0,737,736,1,0,0,0,738,741,1,0,0,0, + 739,740,1,0,0,0,739,737,1,0,0,0,740,742,1,0,0,0,741,739,1,0,0,0,742,754, + 5,34,0,0,743,749,5,39,0,0,744,745,5,92,0,0,745,748,5,39,0,0,746,748,8,4, + 0,0,747,744,1,0,0,0,747,746,1,0,0,0,748,751,1,0,0,0,749,750,1,0,0,0,749, + 747,1,0,0,0,750,752,1,0,0,0,751,749,1,0,0,0,752,754,5,39,0,0,753,733,1, + 0,0,0,753,743,1,0,0,0,754,154,1,0,0,0,755,756,5,100,0,0,756,757,5,97,0, + 0,757,758,5,116,0,0,758,759,5,101,0,0,759,760,5,40,0,0,760,761,1,0,0,0, + 761,762,3,153,76,0,762,763,5,41,0,0,763,156,1,0,0,0,764,765,5,48,0,0,765, + 769,7,5,0,0,766,768,7,6,0,0,767,766,1,0,0,0,768,771,1,0,0,0,769,767,1,0, + 0,0,769,770,1,0,0,0,770,158,1,0,0,0,771,769,1,0,0,0,772,773,5,116,0,0,773, + 774,5,104,0,0,774,775,5,105,0,0,775,776,5,115,0,0,776,777,5,46,0,0,777, + 778,5,97,0,0,778,779,5,103,0,0,779,788,5,101,0,0,780,781,5,116,0,0,781, + 782,5,120,0,0,782,783,5,46,0,0,783,784,5,116,0,0,784,785,5,105,0,0,785, + 786,5,109,0,0,786,788,5,101,0,0,787,772,1,0,0,0,787,780,1,0,0,0,788,160, + 1,0,0,0,789,790,5,117,0,0,790,791,5,110,0,0,791,792,5,115,0,0,792,793,5, + 97,0,0,793,794,5,102,0,0,794,795,5,101,0,0,795,796,5,95,0,0,796,797,5,105, + 0,0,797,798,5,110,0,0,798,838,5,116,0,0,799,800,5,117,0,0,800,801,5,110, + 0,0,801,802,5,115,0,0,802,803,5,97,0,0,803,804,5,102,0,0,804,805,5,101, + 0,0,805,806,5,95,0,0,806,807,5,98,0,0,807,808,5,111,0,0,808,809,5,111,0, + 0,809,838,5,108,0,0,810,811,5,117,0,0,811,812,5,110,0,0,812,813,5,115,0, + 0,813,814,5,97,0,0,814,815,5,102,0,0,815,816,5,101,0,0,816,817,5,95,0,0, + 817,818,5,98,0,0,818,819,5,121,0,0,819,820,5,116,0,0,820,821,5,101,0,0, + 821,822,5,115,0,0,822,824,1,0,0,0,823,825,3,151,75,0,824,823,1,0,0,0,824, + 825,1,0,0,0,825,838,1,0,0,0,826,827,5,117,0,0,827,828,5,110,0,0,828,829, + 5,115,0,0,829,830,5,97,0,0,830,831,5,102,0,0,831,832,5,101,0,0,832,833, + 5,95,0,0,833,834,5,98,0,0,834,835,5,121,0,0,835,836,5,116,0,0,836,838,5, + 101,0,0,837,789,1,0,0,0,837,799,1,0,0,0,837,810,1,0,0,0,837,826,1,0,0,0, + 838,162,1,0,0,0,839,840,5,116,0,0,840,841,5,104,0,0,841,842,5,105,0,0,842, + 843,5,115,0,0,843,844,5,46,0,0,844,845,5,97,0,0,845,846,5,99,0,0,846,847, + 5,116,0,0,847,848,5,105,0,0,848,849,5,118,0,0,849,850,5,101,0,0,850,851, + 5,73,0,0,851,852,5,110,0,0,852,853,5,112,0,0,853,854,5,117,0,0,854,855, + 5,116,0,0,855,856,5,73,0,0,856,857,5,110,0,0,857,858,5,100,0,0,858,859, + 5,101,0,0,859,934,5,120,0,0,860,861,5,116,0,0,861,862,5,104,0,0,862,863, + 5,105,0,0,863,864,5,115,0,0,864,865,5,46,0,0,865,866,5,97,0,0,866,867,5, + 99,0,0,867,868,5,116,0,0,868,869,5,105,0,0,869,870,5,118,0,0,870,871,5, + 101,0,0,871,872,5,66,0,0,872,873,5,121,0,0,873,874,5,116,0,0,874,875,5, + 101,0,0,875,876,5,99,0,0,876,877,5,111,0,0,877,878,5,100,0,0,878,934,5, + 101,0,0,879,880,5,116,0,0,880,881,5,120,0,0,881,882,5,46,0,0,882,883,5, + 105,0,0,883,884,5,110,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,934,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, + 111,0,0,899,900,5,117,0,0,900,901,5,116,0,0,901,902,5,112,0,0,902,903,5, + 117,0,0,903,904,5,116,0,0,904,905,5,115,0,0,905,906,5,46,0,0,906,907,5, + 108,0,0,907,908,5,101,0,0,908,909,5,110,0,0,909,910,5,103,0,0,910,911,5, + 116,0,0,911,934,5,104,0,0,912,913,5,116,0,0,913,914,5,120,0,0,914,915,5, + 46,0,0,915,916,5,118,0,0,916,917,5,101,0,0,917,918,5,114,0,0,918,919,5, + 115,0,0,919,920,5,105,0,0,920,921,5,111,0,0,921,934,5,110,0,0,922,923,5, + 116,0,0,923,924,5,120,0,0,924,925,5,46,0,0,925,926,5,108,0,0,926,927,5, + 111,0,0,927,928,5,99,0,0,928,929,5,107,0,0,929,930,5,116,0,0,930,931,5, + 105,0,0,931,932,5,109,0,0,932,934,5,101,0,0,933,839,1,0,0,0,933,860,1,0, + 0,0,933,879,1,0,0,0,933,895,1,0,0,0,933,912,1,0,0,0,933,922,1,0,0,0,934, + 164,1,0,0,0,935,939,7,7,0,0,936,938,7,8,0,0,937,936,1,0,0,0,938,941,1,0, + 0,0,939,937,1,0,0,0,939,940,1,0,0,0,940,166,1,0,0,0,941,939,1,0,0,0,942, + 944,7,9,0,0,943,942,1,0,0,0,944,945,1,0,0,0,945,943,1,0,0,0,945,946,1,0, + 0,0,946,947,1,0,0,0,947,948,6,83,0,0,948,168,1,0,0,0,949,950,5,47,0,0,950, + 951,5,42,0,0,951,955,1,0,0,0,952,954,9,0,0,0,953,952,1,0,0,0,954,957,1, + 0,0,0,955,956,1,0,0,0,955,953,1,0,0,0,956,958,1,0,0,0,957,955,1,0,0,0,958, + 959,5,42,0,0,959,960,5,47,0,0,960,961,1,0,0,0,961,962,6,84,1,0,962,170, + 1,0,0,0,963,964,5,47,0,0,964,965,5,47,0,0,965,969,1,0,0,0,966,968,8,10, + 0,0,967,966,1,0,0,0,968,971,1,0,0,0,969,967,1,0,0,0,969,970,1,0,0,0,970, + 972,1,0,0,0,971,969,1,0,0,0,972,973,6,85,1,0,973,172,1,0,0,0,28,0,566,572, + 578,589,648,651,655,660,666,670,705,724,730,737,739,747,749,753,769,787, + 824,837,933,939,945,955,969,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 0833d80e..a1e20f02 100644 --- a/packages/cashc/src/grammar/CashScriptParser.ts +++ b/packages/cashc/src/grammar/CashScriptParser.ts @@ -82,26 +82,28 @@ export default class CashScriptParser extends Parser { public static readonly T__61 = 62; public static readonly T__62 = 63; public static readonly T__63 = 64; - public static readonly VersionLiteral = 65; - public static readonly BooleanLiteral = 66; - public static readonly NumberUnit = 67; - public static readonly NumberLiteral = 68; - public static readonly NumberPart = 69; - public static readonly ExponentPart = 70; - public static readonly PrimitiveType = 71; - public static readonly UnboundedBytes = 72; - public static readonly BoundedBytes = 73; - public static readonly Bound = 74; - public static readonly StringLiteral = 75; - public static readonly DateLiteral = 76; - public static readonly HexLiteral = 77; - public static readonly TxVar = 78; - public static readonly UnsafeCast = 79; - public static readonly NullaryOp = 80; - public static readonly Identifier = 81; - public static readonly WHITESPACE = 82; - public static readonly COMMENT = 83; - public static readonly LINE_COMMENT = 84; + public static readonly T__64 = 65; + public static readonly T__65 = 66; + public static readonly VersionLiteral = 67; + public static readonly BooleanLiteral = 68; + public static readonly NumberUnit = 69; + public static readonly NumberLiteral = 70; + public static readonly NumberPart = 71; + public static readonly ExponentPart = 72; + public static readonly PrimitiveType = 73; + public static readonly UnboundedBytes = 74; + public static readonly BoundedBytes = 75; + public static readonly Bound = 76; + public static readonly StringLiteral = 77; + public static readonly DateLiteral = 78; + public static readonly HexLiteral = 79; + public static readonly TxVar = 80; + public static readonly UnsafeCast = 81; + public static readonly NullaryOp = 82; + public static readonly Identifier = 83; + public static readonly WHITESPACE = 84; + public static readonly COMMENT = 85; + public static readonly LINE_COMMENT = 86; public static readonly EOF = Token.EOF; public static readonly RULE_sourceFile = 0; public static readonly RULE_pragmaDirective = 1; @@ -188,6 +190,7 @@ export default class CashScriptParser extends Parser { "'=='", "'!='", "'&'", "'|'", "'&&'", "'||'", + "'?'", "':'", "'constant'", null, null, null, null, @@ -225,6 +228,7 @@ export default class CashScriptParser extends Parser { null, null, null, null, null, null, + null, null, null, "VersionLiteral", "BooleanLiteral", "NumberUnit", @@ -407,7 +411,7 @@ export default class CashScriptParser extends Parser { this.state = 115; this._errHandler.sync(this); _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 2032) !== 0) || _la===65) { + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 2032) !== 0) || _la===67) { { this.state = 114; this.versionConstraint(); @@ -708,7 +712,7 @@ export default class CashScriptParser extends Parser { this.state = 165; this._errHandler.sync(this); _la = this._input.LA(1); - while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3994025984) !== 0) || ((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 1031) !== 0)) { + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3994025984) !== 0) || ((((_la - 73)) & ~0x1F) === 0 && ((1 << (_la - 73)) & 1031) !== 0)) { { { this.state = 162; @@ -751,7 +755,7 @@ export default class CashScriptParser extends Parser { this.state = 182; this._errHandler.sync(this); _la = this._input.LA(1); - if (((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 7) !== 0)) { + if (((((_la - 73)) & ~0x1F) === 0 && ((1 << (_la - 73)) & 7) !== 0)) { { this.state = 171; this.parameter(); @@ -848,7 +852,7 @@ export default class CashScriptParser extends Parser { this.state = 193; this._errHandler.sync(this); _la = this._input.LA(1); - while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3994025984) !== 0) || ((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 1031) !== 0)) { + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3994025984) !== 0) || ((((_la - 73)) & ~0x1F) === 0 && ((1 << (_la - 73)) & 1031) !== 0)) { { { this.state = 190; @@ -870,10 +874,10 @@ export default class CashScriptParser extends Parser { case 29: case 30: case 31: - case 71: - case 72: case 73: - case 81: + case 74: + case 75: + case 83: this.enterOuterAlt(localctx, 2); { this.state = 197; @@ -919,10 +923,10 @@ export default class CashScriptParser extends Parser { case 20: case 25: case 26: - case 71: - case 72: case 73: - case 81: + case 74: + case 75: + case 83: this.enterOuterAlt(localctx, 2); { this.state = 201; @@ -1136,7 +1140,7 @@ export default class CashScriptParser extends Parser { this.state = 229; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===64) { + while (_la===66) { { { this.state = 226; @@ -1597,16 +1601,16 @@ export default class CashScriptParser extends Parser { this.state = 314; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 71: - case 72: case 73: + case 74: + case 75: this.enterOuterAlt(localctx, 1); { this.state = 312; this.variableDefinition(); } break; - case 81: + case 83: this.enterOuterAlt(localctx, 2); { this.state = 313; @@ -1664,18 +1668,18 @@ export default class CashScriptParser extends Parser { this.state = 320; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 81: + case 83: this.enterOuterAlt(localctx, 1); { this.state = 318; this.match(CashScriptParser.Identifier); } break; - case 66: case 68: - case 75: - case 76: + case 70: case 77: + case 78: + case 79: this.enterOuterAlt(localctx, 2); { this.state = 319; @@ -1714,7 +1718,7 @@ export default class CashScriptParser extends Parser { this.state = 334; this._errHandler.sync(this); _la = this._input.LA(1); - if (((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & 36357) !== 0)) { + if (((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 36357) !== 0)) { { this.state = 323; this.consoleParameter(); @@ -1808,7 +1812,7 @@ export default class CashScriptParser extends Parser { this.state = 353; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===5 || _la===14 || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 786955) !== 0) || ((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & 61029) !== 0)) { + if (_la===5 || _la===14 || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 786955) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 61029) !== 0)) { { this.state = 342; this.expression(0); @@ -2011,7 +2015,7 @@ export default class CashScriptParser extends Parser { this.consume(); } this.state = 387; - this.expression(15); + this.expression(16); } break; case 8: @@ -2024,7 +2028,7 @@ export default class CashScriptParser extends Parser { this.state = 400; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===5 || _la===14 || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 786955) !== 0) || ((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & 61029) !== 0)) { + if (_la===5 || _la===14 || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 786955) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 61029) !== 0)) { { this.state = 389; this.expression(0); @@ -2092,7 +2096,7 @@ export default class CashScriptParser extends Parser { break; } this._ctx.stop = this._input.LT(-1); - this.state = 460; + this.state = 466; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 37, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -2102,7 +2106,7 @@ export default class CashScriptParser extends Parser { } _prevctx = localctx; { - this.state = 458; + this.state = 464; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 36, this._ctx) ) { case 1: @@ -2111,8 +2115,8 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 408; - if (!(this.precpred(this._ctx, 14))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); + if (!(this.precpred(this._ctx, 15))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 15)"); } this.state = 409; (localctx as BinaryOpContext)._op = this._input.LT(1); @@ -2125,7 +2129,7 @@ export default class CashScriptParser extends Parser { this.consume(); } this.state = 410; - (localctx as BinaryOpContext)._right = this.expression(15); + (localctx as BinaryOpContext)._right = this.expression(16); } break; case 2: @@ -2134,8 +2138,8 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 411; - if (!(this.precpred(this._ctx, 13))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); + if (!(this.precpred(this._ctx, 14))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); } this.state = 412; (localctx as BinaryOpContext)._op = this._input.LT(1); @@ -2148,7 +2152,7 @@ export default class CashScriptParser extends Parser { this.consume(); } this.state = 413; - (localctx as BinaryOpContext)._right = this.expression(14); + (localctx as BinaryOpContext)._right = this.expression(15); } break; case 3: @@ -2157,8 +2161,8 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 414; - if (!(this.precpred(this._ctx, 12))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); + if (!(this.precpred(this._ctx, 13))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); } this.state = 415; (localctx as BinaryOpContext)._op = this._input.LT(1); @@ -2171,7 +2175,7 @@ export default class CashScriptParser extends Parser { this.consume(); } this.state = 416; - (localctx as BinaryOpContext)._right = this.expression(13); + (localctx as BinaryOpContext)._right = this.expression(14); } break; case 4: @@ -2180,8 +2184,8 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 417; - if (!(this.precpred(this._ctx, 11))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); + if (!(this.precpred(this._ctx, 12))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); } this.state = 418; (localctx as BinaryOpContext)._op = this._input.LT(1); @@ -2194,7 +2198,7 @@ export default class CashScriptParser extends Parser { this.consume(); } this.state = 419; - (localctx as BinaryOpContext)._right = this.expression(12); + (localctx as BinaryOpContext)._right = this.expression(13); } break; case 5: @@ -2203,8 +2207,8 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 420; - if (!(this.precpred(this._ctx, 10))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); + if (!(this.precpred(this._ctx, 11))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); } this.state = 421; (localctx as BinaryOpContext)._op = this._input.LT(1); @@ -2217,7 +2221,7 @@ export default class CashScriptParser extends Parser { this.consume(); } this.state = 422; - (localctx as BinaryOpContext)._right = this.expression(11); + (localctx as BinaryOpContext)._right = this.expression(12); } break; case 6: @@ -2226,13 +2230,13 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 423; - if (!(this.precpred(this._ctx, 9))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); + if (!(this.precpred(this._ctx, 10))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); } this.state = 424; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__59); this.state = 425; - (localctx as BinaryOpContext)._right = this.expression(10); + (localctx as BinaryOpContext)._right = this.expression(11); } break; case 7: @@ -2241,13 +2245,13 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 426; - if (!(this.precpred(this._ctx, 8))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); + if (!(this.precpred(this._ctx, 9))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } this.state = 427; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__3); this.state = 428; - (localctx as BinaryOpContext)._right = this.expression(9); + (localctx as BinaryOpContext)._right = this.expression(10); } break; case 8: @@ -2256,13 +2260,13 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 429; - if (!(this.precpred(this._ctx, 7))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); + if (!(this.precpred(this._ctx, 8))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } this.state = 430; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__60); this.state = 431; - (localctx as BinaryOpContext)._right = this.expression(8); + (localctx as BinaryOpContext)._right = this.expression(9); } break; case 9: @@ -2271,13 +2275,13 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 432; - if (!(this.precpred(this._ctx, 6))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); + if (!(this.precpred(this._ctx, 7))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } this.state = 433; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__61); this.state = 434; - (localctx as BinaryOpContext)._right = this.expression(7); + (localctx as BinaryOpContext)._right = this.expression(8); } break; case 10: @@ -2286,40 +2290,59 @@ export default class CashScriptParser extends Parser { (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 435; - if (!(this.precpred(this._ctx, 5))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); + if (!(this.precpred(this._ctx, 6))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } this.state = 436; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__62); this.state = 437; - (localctx as BinaryOpContext)._right = this.expression(6); + (localctx as BinaryOpContext)._right = this.expression(7); } break; case 11: { - localctx = new TupleIndexOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); + localctx = new TernaryContext(this, new ExpressionContext(this, _parentctx, _parentState)); + (localctx as TernaryContext)._condition = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); this.state = 438; - if (!(this.precpred(this._ctx, 21))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 21)"); + if (!(this.precpred(this._ctx, 5))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } this.state = 439; - this.match(CashScriptParser.T__32); + this.match(CashScriptParser.T__63); this.state = 440; - (localctx as TupleIndexOpContext)._index = this.match(CashScriptParser.NumberLiteral); + (localctx as TernaryContext)._consequent = this.expression(0); this.state = 441; - this.match(CashScriptParser.T__33); + this.match(CashScriptParser.T__64); + this.state = 442; + (localctx as TernaryContext)._alternative = this.expression(5); } break; case 12: + { + localctx = new TupleIndexOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); + this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); + this.state = 444; + if (!(this.precpred(this._ctx, 22))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 22)"); + } + this.state = 445; + this.match(CashScriptParser.T__32); + this.state = 446; + (localctx as TupleIndexOpContext)._index = this.match(CashScriptParser.NumberLiteral); + this.state = 447; + this.match(CashScriptParser.T__33); + } + break; + case 13: { localctx = new UnaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 442; - if (!(this.precpred(this._ctx, 18))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 18)"); + this.state = 448; + if (!(this.precpred(this._ctx, 19))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 19)"); } - this.state = 443; + this.state = 449; (localctx as UnaryOpContext)._op = this._input.LT(1); _la = this._input.LA(1); if(!(_la===46 || _la===47)) { @@ -2331,52 +2354,52 @@ export default class CashScriptParser extends Parser { } } break; - case 13: + case 14: { localctx = new BinaryOpContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as BinaryOpContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 444; - if (!(this.precpred(this._ctx, 17))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); + this.state = 450; + if (!(this.precpred(this._ctx, 18))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 18)"); } - this.state = 445; + this.state = 451; (localctx as BinaryOpContext)._op = this.match(CashScriptParser.T__47); - this.state = 446; + this.state = 452; this.match(CashScriptParser.T__13); - this.state = 447; + this.state = 453; (localctx as BinaryOpContext)._right = this.expression(0); - this.state = 448; + this.state = 454; this.match(CashScriptParser.T__14); } break; - case 14: + case 15: { localctx = new SliceContext(this, new ExpressionContext(this, _parentctx, _parentState)); (localctx as SliceContext)._element = _prevctx; this.pushNewRecursionContext(localctx, _startState, CashScriptParser.RULE_expression); - this.state = 450; - if (!(this.precpred(this._ctx, 16))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); + this.state = 456; + if (!(this.precpred(this._ctx, 17))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); } - this.state = 451; + this.state = 457; this.match(CashScriptParser.T__48); - this.state = 452; + this.state = 458; this.match(CashScriptParser.T__13); - this.state = 453; + this.state = 459; (localctx as SliceContext)._start = this.expression(0); - this.state = 454; + this.state = 460; this.match(CashScriptParser.T__18); - this.state = 455; + this.state = 461; (localctx as SliceContext)._end = this.expression(0); - this.state = 456; + this.state = 462; this.match(CashScriptParser.T__14); } break; } } } - this.state = 462; + this.state = 468; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 37, this._ctx); } @@ -2403,8 +2426,8 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 463; - this.match(CashScriptParser.T__63); + this.state = 469; + this.match(CashScriptParser.T__65); } } catch (re) { @@ -2426,41 +2449,41 @@ export default class CashScriptParser extends Parser { let localctx: LiteralContext = new LiteralContext(this, this._ctx, this.state); this.enterRule(localctx, 78, CashScriptParser.RULE_literal); try { - this.state = 470; + this.state = 476; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 66: + case 68: this.enterOuterAlt(localctx, 1); { - this.state = 465; + this.state = 471; this.match(CashScriptParser.BooleanLiteral); } break; - case 68: + case 70: this.enterOuterAlt(localctx, 2); { - this.state = 466; + this.state = 472; this.numberLiteral(); } break; - case 75: + case 77: this.enterOuterAlt(localctx, 3); { - this.state = 467; + this.state = 473; this.match(CashScriptParser.StringLiteral); } break; - case 76: + case 78: this.enterOuterAlt(localctx, 4); { - this.state = 468; + this.state = 474; this.match(CashScriptParser.DateLiteral); } break; - case 77: + case 79: this.enterOuterAlt(localctx, 5); { - this.state = 469; + this.state = 475; this.match(CashScriptParser.HexLiteral); } break; @@ -2489,14 +2512,14 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 472; + this.state = 478; this.match(CashScriptParser.NumberLiteral); - this.state = 474; + this.state = 480; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 39, this._ctx) ) { case 1: { - this.state = 473; + this.state = 479; this.match(CashScriptParser.NumberUnit); } break; @@ -2525,9 +2548,9 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 476; + this.state = 482; _la = this._input.LA(1); - if(!(((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 7) !== 0))) { + if(!(((((_la - 73)) & ~0x1F) === 0 && ((1 << (_la - 73)) & 7) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -2558,9 +2581,9 @@ export default class CashScriptParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 478; + this.state = 484; _la = this._input.LA(1); - if(!(((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 259) !== 0))) { + if(!(((((_la - 73)) & ~0x1F) === 0 && ((1 << (_la - 73)) & 259) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -2594,38 +2617,40 @@ export default class CashScriptParser extends Parser { private expression_sempred(localctx: ExpressionContext, predIndex: number): boolean { switch (predIndex) { case 0: - return this.precpred(this._ctx, 14); + return this.precpred(this._ctx, 15); case 1: - return this.precpred(this._ctx, 13); + return this.precpred(this._ctx, 14); case 2: - return this.precpred(this._ctx, 12); + return this.precpred(this._ctx, 13); case 3: - return this.precpred(this._ctx, 11); + return this.precpred(this._ctx, 12); case 4: - return this.precpred(this._ctx, 10); + return this.precpred(this._ctx, 11); case 5: - return this.precpred(this._ctx, 9); + return this.precpred(this._ctx, 10); case 6: - return this.precpred(this._ctx, 8); + return this.precpred(this._ctx, 9); case 7: - return this.precpred(this._ctx, 7); + return this.precpred(this._ctx, 8); case 8: - return this.precpred(this._ctx, 6); + return this.precpred(this._ctx, 7); case 9: - return this.precpred(this._ctx, 5); + return this.precpred(this._ctx, 6); case 10: - return this.precpred(this._ctx, 21); + return this.precpred(this._ctx, 5); case 11: - return this.precpred(this._ctx, 18); + return this.precpred(this._ctx, 22); case 12: - return this.precpred(this._ctx, 17); + return this.precpred(this._ctx, 19); case 13: - return this.precpred(this._ctx, 16); + return this.precpred(this._ctx, 18); + case 14: + return this.precpred(this._ctx, 17); } return true; } - public static readonly _serializedATN: number[] = [4,1,84,481,2,0,7,0,2, + public static readonly _serializedATN: number[] = [4,1,86,487,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, @@ -2659,131 +2684,133 @@ export default class CashScriptParser extends Parser { 1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37, 1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, - 37,1,37,1,37,1,37,1,37,5,37,459,8,37,10,37,12,37,462,9,37,1,38,1,38,1,39, - 1,39,1,39,1,39,1,39,3,39,471,8,39,1,40,1,40,3,40,475,8,40,1,41,1,41,1,42, - 1,42,1,42,0,1,74,43,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36, - 38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84, - 0,14,1,0,4,10,2,0,10,10,21,22,1,0,23,24,1,0,36,40,2,0,36,40,42,45,2,0,5, - 5,50,51,1,0,52,54,2,0,51,51,55,55,1,0,56,57,1,0,6,9,1,0,58,59,1,0,46,47, - 1,0,71,73,2,0,71,72,79,79,508,0,89,1,0,0,0,2,106,1,0,0,0,4,111,1,0,0,0, - 6,113,1,0,0,0,8,118,1,0,0,0,10,122,1,0,0,0,12,124,1,0,0,0,14,130,1,0,0, - 0,16,132,1,0,0,0,18,144,1,0,0,0,20,156,1,0,0,0,22,161,1,0,0,0,24,170,1, - 0,0,0,26,186,1,0,0,0,28,198,1,0,0,0,30,204,1,0,0,0,32,214,1,0,0,0,34,216, - 1,0,0,0,36,218,1,0,0,0,38,223,1,0,0,0,40,225,1,0,0,0,42,236,1,0,0,0,44, - 249,1,0,0,0,46,251,1,0,0,0,48,262,1,0,0,0,50,271,1,0,0,0,52,274,1,0,0,0, - 54,286,1,0,0,0,56,288,1,0,0,0,58,296,1,0,0,0,60,302,1,0,0,0,62,314,1,0, - 0,0,64,316,1,0,0,0,66,320,1,0,0,0,68,322,1,0,0,0,70,338,1,0,0,0,72,341, - 1,0,0,0,74,406,1,0,0,0,76,463,1,0,0,0,78,470,1,0,0,0,80,472,1,0,0,0,82, - 476,1,0,0,0,84,478,1,0,0,0,86,88,3,2,1,0,87,86,1,0,0,0,88,91,1,0,0,0,89, - 87,1,0,0,0,89,90,1,0,0,0,90,95,1,0,0,0,91,89,1,0,0,0,92,94,3,12,6,0,93, - 92,1,0,0,0,94,97,1,0,0,0,95,93,1,0,0,0,95,96,1,0,0,0,96,101,1,0,0,0,97, - 95,1,0,0,0,98,100,3,14,7,0,99,98,1,0,0,0,100,103,1,0,0,0,101,99,1,0,0,0, - 101,102,1,0,0,0,102,104,1,0,0,0,103,101,1,0,0,0,104,105,5,0,0,1,105,1,1, - 0,0,0,106,107,5,1,0,0,107,108,3,4,2,0,108,109,3,6,3,0,109,110,5,2,0,0,110, - 3,1,0,0,0,111,112,5,3,0,0,112,5,1,0,0,0,113,115,3,8,4,0,114,116,3,8,4,0, - 115,114,1,0,0,0,115,116,1,0,0,0,116,7,1,0,0,0,117,119,3,10,5,0,118,117, - 1,0,0,0,118,119,1,0,0,0,119,120,1,0,0,0,120,121,5,65,0,0,121,9,1,0,0,0, - 122,123,7,0,0,0,123,11,1,0,0,0,124,125,5,11,0,0,125,126,5,75,0,0,126,127, - 5,2,0,0,127,13,1,0,0,0,128,131,3,16,8,0,129,131,3,18,9,0,130,128,1,0,0, - 0,130,129,1,0,0,0,131,15,1,0,0,0,132,133,5,12,0,0,133,134,5,81,0,0,134, - 140,3,24,12,0,135,136,5,13,0,0,136,137,5,14,0,0,137,138,3,82,41,0,138,139, - 5,15,0,0,139,141,1,0,0,0,140,135,1,0,0,0,140,141,1,0,0,0,141,142,1,0,0, - 0,142,143,3,22,11,0,143,17,1,0,0,0,144,145,5,16,0,0,145,146,5,81,0,0,146, - 147,3,24,12,0,147,151,5,17,0,0,148,150,3,20,10,0,149,148,1,0,0,0,150,153, - 1,0,0,0,151,149,1,0,0,0,151,152,1,0,0,0,152,154,1,0,0,0,153,151,1,0,0,0, - 154,155,5,18,0,0,155,19,1,0,0,0,156,157,5,12,0,0,157,158,5,81,0,0,158,159, - 3,24,12,0,159,160,3,22,11,0,160,21,1,0,0,0,161,165,5,17,0,0,162,164,3,30, - 15,0,163,162,1,0,0,0,164,167,1,0,0,0,165,163,1,0,0,0,165,166,1,0,0,0,166, - 168,1,0,0,0,167,165,1,0,0,0,168,169,5,18,0,0,169,23,1,0,0,0,170,182,5,14, - 0,0,171,176,3,26,13,0,172,173,5,19,0,0,173,175,3,26,13,0,174,172,1,0,0, - 0,175,178,1,0,0,0,176,174,1,0,0,0,176,177,1,0,0,0,177,180,1,0,0,0,178,176, - 1,0,0,0,179,181,5,19,0,0,180,179,1,0,0,0,180,181,1,0,0,0,181,183,1,0,0, - 0,182,171,1,0,0,0,182,183,1,0,0,0,183,184,1,0,0,0,184,185,5,15,0,0,185, - 25,1,0,0,0,186,187,3,82,41,0,187,188,5,81,0,0,188,27,1,0,0,0,189,193,5, - 17,0,0,190,192,3,30,15,0,191,190,1,0,0,0,192,195,1,0,0,0,193,191,1,0,0, - 0,193,194,1,0,0,0,194,196,1,0,0,0,195,193,1,0,0,0,196,199,5,18,0,0,197, - 199,3,30,15,0,198,189,1,0,0,0,198,197,1,0,0,0,199,29,1,0,0,0,200,205,3, - 38,19,0,201,202,3,32,16,0,202,203,5,2,0,0,203,205,1,0,0,0,204,200,1,0,0, - 0,204,201,1,0,0,0,205,31,1,0,0,0,206,215,3,40,20,0,207,215,3,42,21,0,208, - 215,3,44,22,0,209,215,3,46,23,0,210,215,3,48,24,0,211,215,3,34,17,0,212, - 215,3,50,25,0,213,215,3,36,18,0,214,206,1,0,0,0,214,207,1,0,0,0,214,208, - 1,0,0,0,214,209,1,0,0,0,214,210,1,0,0,0,214,211,1,0,0,0,214,212,1,0,0,0, - 214,213,1,0,0,0,215,33,1,0,0,0,216,217,3,70,35,0,217,35,1,0,0,0,218,219, - 5,20,0,0,219,220,3,74,37,0,220,37,1,0,0,0,221,224,3,52,26,0,222,224,3,54, - 27,0,223,221,1,0,0,0,223,222,1,0,0,0,224,39,1,0,0,0,225,229,3,82,41,0,226, - 228,3,76,38,0,227,226,1,0,0,0,228,231,1,0,0,0,229,227,1,0,0,0,229,230,1, - 0,0,0,230,232,1,0,0,0,231,229,1,0,0,0,232,233,5,81,0,0,233,234,5,10,0,0, - 234,235,3,74,37,0,235,41,1,0,0,0,236,237,3,82,41,0,237,238,5,81,0,0,238, - 239,5,19,0,0,239,240,3,82,41,0,240,241,5,81,0,0,241,242,5,10,0,0,242,243, - 3,74,37,0,243,43,1,0,0,0,244,245,5,81,0,0,245,246,7,1,0,0,246,250,3,74, - 37,0,247,248,5,81,0,0,248,250,7,2,0,0,249,244,1,0,0,0,249,247,1,0,0,0,250, - 45,1,0,0,0,251,252,5,25,0,0,252,253,5,14,0,0,253,254,5,78,0,0,254,255,5, - 6,0,0,255,258,3,74,37,0,256,257,5,19,0,0,257,259,3,64,32,0,258,256,1,0, - 0,0,258,259,1,0,0,0,259,260,1,0,0,0,260,261,5,15,0,0,261,47,1,0,0,0,262, - 263,5,25,0,0,263,264,5,14,0,0,264,267,3,74,37,0,265,266,5,19,0,0,266,268, - 3,64,32,0,267,265,1,0,0,0,267,268,1,0,0,0,268,269,1,0,0,0,269,270,5,15, - 0,0,270,49,1,0,0,0,271,272,5,26,0,0,272,273,3,68,34,0,273,51,1,0,0,0,274, - 275,5,27,0,0,275,276,5,14,0,0,276,277,3,74,37,0,277,278,5,15,0,0,278,281, - 3,28,14,0,279,280,5,28,0,0,280,282,3,28,14,0,281,279,1,0,0,0,281,282,1, - 0,0,0,282,53,1,0,0,0,283,287,3,56,28,0,284,287,3,58,29,0,285,287,3,60,30, - 0,286,283,1,0,0,0,286,284,1,0,0,0,286,285,1,0,0,0,287,55,1,0,0,0,288,289, - 5,29,0,0,289,290,3,28,14,0,290,291,5,30,0,0,291,292,5,14,0,0,292,293,3, - 74,37,0,293,294,5,15,0,0,294,295,5,2,0,0,295,57,1,0,0,0,296,297,5,30,0, - 0,297,298,5,14,0,0,298,299,3,74,37,0,299,300,5,15,0,0,300,301,3,28,14,0, - 301,59,1,0,0,0,302,303,5,31,0,0,303,304,5,14,0,0,304,305,3,62,31,0,305, - 306,5,2,0,0,306,307,3,74,37,0,307,308,5,2,0,0,308,309,3,44,22,0,309,310, - 5,15,0,0,310,311,3,28,14,0,311,61,1,0,0,0,312,315,3,40,20,0,313,315,3,44, - 22,0,314,312,1,0,0,0,314,313,1,0,0,0,315,63,1,0,0,0,316,317,5,75,0,0,317, - 65,1,0,0,0,318,321,5,81,0,0,319,321,3,78,39,0,320,318,1,0,0,0,320,319,1, - 0,0,0,321,67,1,0,0,0,322,334,5,14,0,0,323,328,3,66,33,0,324,325,5,19,0, - 0,325,327,3,66,33,0,326,324,1,0,0,0,327,330,1,0,0,0,328,326,1,0,0,0,328, - 329,1,0,0,0,329,332,1,0,0,0,330,328,1,0,0,0,331,333,5,19,0,0,332,331,1, - 0,0,0,332,333,1,0,0,0,333,335,1,0,0,0,334,323,1,0,0,0,334,335,1,0,0,0,335, - 336,1,0,0,0,336,337,5,15,0,0,337,69,1,0,0,0,338,339,5,81,0,0,339,340,3, - 72,36,0,340,71,1,0,0,0,341,353,5,14,0,0,342,347,3,74,37,0,343,344,5,19, - 0,0,344,346,3,74,37,0,345,343,1,0,0,0,346,349,1,0,0,0,347,345,1,0,0,0,347, - 348,1,0,0,0,348,351,1,0,0,0,349,347,1,0,0,0,350,352,5,19,0,0,351,350,1, - 0,0,0,351,352,1,0,0,0,352,354,1,0,0,0,353,342,1,0,0,0,353,354,1,0,0,0,354, - 355,1,0,0,0,355,356,5,15,0,0,356,73,1,0,0,0,357,358,6,37,-1,0,358,359,5, - 14,0,0,359,360,3,74,37,0,360,361,5,15,0,0,361,407,1,0,0,0,362,363,3,84, - 42,0,363,364,5,14,0,0,364,366,3,74,37,0,365,367,5,19,0,0,366,365,1,0,0, - 0,366,367,1,0,0,0,367,368,1,0,0,0,368,369,5,15,0,0,369,407,1,0,0,0,370, - 407,3,70,35,0,371,372,5,32,0,0,372,373,5,81,0,0,373,407,3,72,36,0,374,375, - 5,35,0,0,375,376,5,33,0,0,376,377,3,74,37,0,377,378,5,34,0,0,378,379,7, - 3,0,0,379,407,1,0,0,0,380,381,5,41,0,0,381,382,5,33,0,0,382,383,3,74,37, - 0,383,384,5,34,0,0,384,385,7,4,0,0,385,407,1,0,0,0,386,387,7,5,0,0,387, - 407,3,74,37,15,388,400,5,33,0,0,389,394,3,74,37,0,390,391,5,19,0,0,391, - 393,3,74,37,0,392,390,1,0,0,0,393,396,1,0,0,0,394,392,1,0,0,0,394,395,1, - 0,0,0,395,398,1,0,0,0,396,394,1,0,0,0,397,399,5,19,0,0,398,397,1,0,0,0, - 398,399,1,0,0,0,399,401,1,0,0,0,400,389,1,0,0,0,400,401,1,0,0,0,401,402, - 1,0,0,0,402,407,5,34,0,0,403,407,5,80,0,0,404,407,5,81,0,0,405,407,3,78, - 39,0,406,357,1,0,0,0,406,362,1,0,0,0,406,370,1,0,0,0,406,371,1,0,0,0,406, - 374,1,0,0,0,406,380,1,0,0,0,406,386,1,0,0,0,406,388,1,0,0,0,406,403,1,0, - 0,0,406,404,1,0,0,0,406,405,1,0,0,0,407,460,1,0,0,0,408,409,10,14,0,0,409, - 410,7,6,0,0,410,459,3,74,37,15,411,412,10,13,0,0,412,413,7,7,0,0,413,459, - 3,74,37,14,414,415,10,12,0,0,415,416,7,8,0,0,416,459,3,74,37,13,417,418, - 10,11,0,0,418,419,7,9,0,0,419,459,3,74,37,12,420,421,10,10,0,0,421,422, - 7,10,0,0,422,459,3,74,37,11,423,424,10,9,0,0,424,425,5,60,0,0,425,459,3, - 74,37,10,426,427,10,8,0,0,427,428,5,4,0,0,428,459,3,74,37,9,429,430,10, - 7,0,0,430,431,5,61,0,0,431,459,3,74,37,8,432,433,10,6,0,0,433,434,5,62, - 0,0,434,459,3,74,37,7,435,436,10,5,0,0,436,437,5,63,0,0,437,459,3,74,37, - 6,438,439,10,21,0,0,439,440,5,33,0,0,440,441,5,68,0,0,441,459,5,34,0,0, - 442,443,10,18,0,0,443,459,7,11,0,0,444,445,10,17,0,0,445,446,5,48,0,0,446, - 447,5,14,0,0,447,448,3,74,37,0,448,449,5,15,0,0,449,459,1,0,0,0,450,451, - 10,16,0,0,451,452,5,49,0,0,452,453,5,14,0,0,453,454,3,74,37,0,454,455,5, - 19,0,0,455,456,3,74,37,0,456,457,5,15,0,0,457,459,1,0,0,0,458,408,1,0,0, - 0,458,411,1,0,0,0,458,414,1,0,0,0,458,417,1,0,0,0,458,420,1,0,0,0,458,423, - 1,0,0,0,458,426,1,0,0,0,458,429,1,0,0,0,458,432,1,0,0,0,458,435,1,0,0,0, - 458,438,1,0,0,0,458,442,1,0,0,0,458,444,1,0,0,0,458,450,1,0,0,0,459,462, - 1,0,0,0,460,458,1,0,0,0,460,461,1,0,0,0,461,75,1,0,0,0,462,460,1,0,0,0, - 463,464,5,64,0,0,464,77,1,0,0,0,465,471,5,66,0,0,466,471,3,80,40,0,467, - 471,5,75,0,0,468,471,5,76,0,0,469,471,5,77,0,0,470,465,1,0,0,0,470,466, - 1,0,0,0,470,467,1,0,0,0,470,468,1,0,0,0,470,469,1,0,0,0,471,79,1,0,0,0, - 472,474,5,68,0,0,473,475,5,67,0,0,474,473,1,0,0,0,474,475,1,0,0,0,475,81, - 1,0,0,0,476,477,7,12,0,0,477,83,1,0,0,0,478,479,7,13,0,0,479,85,1,0,0,0, - 40,89,95,101,115,118,130,140,151,165,176,180,182,193,198,204,214,223,229, - 249,258,267,281,286,314,320,328,332,334,347,351,353,366,394,398,400,406, - 458,460,470,474]; + 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,5,37,465,8,37,10,37, + 12,37,468,9,37,1,38,1,38,1,39,1,39,1,39,1,39,1,39,3,39,477,8,39,1,40,1, + 40,3,40,481,8,40,1,41,1,41,1,42,1,42,1,42,0,1,74,43,0,2,4,6,8,10,12,14, + 16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62, + 64,66,68,70,72,74,76,78,80,82,84,0,14,1,0,4,10,2,0,10,10,21,22,1,0,23,24, + 1,0,36,40,2,0,36,40,42,45,2,0,5,5,50,51,1,0,52,54,2,0,51,51,55,55,1,0,56, + 57,1,0,6,9,1,0,58,59,1,0,46,47,1,0,73,75,2,0,73,74,81,81,515,0,89,1,0,0, + 0,2,106,1,0,0,0,4,111,1,0,0,0,6,113,1,0,0,0,8,118,1,0,0,0,10,122,1,0,0, + 0,12,124,1,0,0,0,14,130,1,0,0,0,16,132,1,0,0,0,18,144,1,0,0,0,20,156,1, + 0,0,0,22,161,1,0,0,0,24,170,1,0,0,0,26,186,1,0,0,0,28,198,1,0,0,0,30,204, + 1,0,0,0,32,214,1,0,0,0,34,216,1,0,0,0,36,218,1,0,0,0,38,223,1,0,0,0,40, + 225,1,0,0,0,42,236,1,0,0,0,44,249,1,0,0,0,46,251,1,0,0,0,48,262,1,0,0,0, + 50,271,1,0,0,0,52,274,1,0,0,0,54,286,1,0,0,0,56,288,1,0,0,0,58,296,1,0, + 0,0,60,302,1,0,0,0,62,314,1,0,0,0,64,316,1,0,0,0,66,320,1,0,0,0,68,322, + 1,0,0,0,70,338,1,0,0,0,72,341,1,0,0,0,74,406,1,0,0,0,76,469,1,0,0,0,78, + 476,1,0,0,0,80,478,1,0,0,0,82,482,1,0,0,0,84,484,1,0,0,0,86,88,3,2,1,0, + 87,86,1,0,0,0,88,91,1,0,0,0,89,87,1,0,0,0,89,90,1,0,0,0,90,95,1,0,0,0,91, + 89,1,0,0,0,92,94,3,12,6,0,93,92,1,0,0,0,94,97,1,0,0,0,95,93,1,0,0,0,95, + 96,1,0,0,0,96,101,1,0,0,0,97,95,1,0,0,0,98,100,3,14,7,0,99,98,1,0,0,0,100, + 103,1,0,0,0,101,99,1,0,0,0,101,102,1,0,0,0,102,104,1,0,0,0,103,101,1,0, + 0,0,104,105,5,0,0,1,105,1,1,0,0,0,106,107,5,1,0,0,107,108,3,4,2,0,108,109, + 3,6,3,0,109,110,5,2,0,0,110,3,1,0,0,0,111,112,5,3,0,0,112,5,1,0,0,0,113, + 115,3,8,4,0,114,116,3,8,4,0,115,114,1,0,0,0,115,116,1,0,0,0,116,7,1,0,0, + 0,117,119,3,10,5,0,118,117,1,0,0,0,118,119,1,0,0,0,119,120,1,0,0,0,120, + 121,5,67,0,0,121,9,1,0,0,0,122,123,7,0,0,0,123,11,1,0,0,0,124,125,5,11, + 0,0,125,126,5,77,0,0,126,127,5,2,0,0,127,13,1,0,0,0,128,131,3,16,8,0,129, + 131,3,18,9,0,130,128,1,0,0,0,130,129,1,0,0,0,131,15,1,0,0,0,132,133,5,12, + 0,0,133,134,5,83,0,0,134,140,3,24,12,0,135,136,5,13,0,0,136,137,5,14,0, + 0,137,138,3,82,41,0,138,139,5,15,0,0,139,141,1,0,0,0,140,135,1,0,0,0,140, + 141,1,0,0,0,141,142,1,0,0,0,142,143,3,22,11,0,143,17,1,0,0,0,144,145,5, + 16,0,0,145,146,5,83,0,0,146,147,3,24,12,0,147,151,5,17,0,0,148,150,3,20, + 10,0,149,148,1,0,0,0,150,153,1,0,0,0,151,149,1,0,0,0,151,152,1,0,0,0,152, + 154,1,0,0,0,153,151,1,0,0,0,154,155,5,18,0,0,155,19,1,0,0,0,156,157,5,12, + 0,0,157,158,5,83,0,0,158,159,3,24,12,0,159,160,3,22,11,0,160,21,1,0,0,0, + 161,165,5,17,0,0,162,164,3,30,15,0,163,162,1,0,0,0,164,167,1,0,0,0,165, + 163,1,0,0,0,165,166,1,0,0,0,166,168,1,0,0,0,167,165,1,0,0,0,168,169,5,18, + 0,0,169,23,1,0,0,0,170,182,5,14,0,0,171,176,3,26,13,0,172,173,5,19,0,0, + 173,175,3,26,13,0,174,172,1,0,0,0,175,178,1,0,0,0,176,174,1,0,0,0,176,177, + 1,0,0,0,177,180,1,0,0,0,178,176,1,0,0,0,179,181,5,19,0,0,180,179,1,0,0, + 0,180,181,1,0,0,0,181,183,1,0,0,0,182,171,1,0,0,0,182,183,1,0,0,0,183,184, + 1,0,0,0,184,185,5,15,0,0,185,25,1,0,0,0,186,187,3,82,41,0,187,188,5,83, + 0,0,188,27,1,0,0,0,189,193,5,17,0,0,190,192,3,30,15,0,191,190,1,0,0,0,192, + 195,1,0,0,0,193,191,1,0,0,0,193,194,1,0,0,0,194,196,1,0,0,0,195,193,1,0, + 0,0,196,199,5,18,0,0,197,199,3,30,15,0,198,189,1,0,0,0,198,197,1,0,0,0, + 199,29,1,0,0,0,200,205,3,38,19,0,201,202,3,32,16,0,202,203,5,2,0,0,203, + 205,1,0,0,0,204,200,1,0,0,0,204,201,1,0,0,0,205,31,1,0,0,0,206,215,3,40, + 20,0,207,215,3,42,21,0,208,215,3,44,22,0,209,215,3,46,23,0,210,215,3,48, + 24,0,211,215,3,34,17,0,212,215,3,50,25,0,213,215,3,36,18,0,214,206,1,0, + 0,0,214,207,1,0,0,0,214,208,1,0,0,0,214,209,1,0,0,0,214,210,1,0,0,0,214, + 211,1,0,0,0,214,212,1,0,0,0,214,213,1,0,0,0,215,33,1,0,0,0,216,217,3,70, + 35,0,217,35,1,0,0,0,218,219,5,20,0,0,219,220,3,74,37,0,220,37,1,0,0,0,221, + 224,3,52,26,0,222,224,3,54,27,0,223,221,1,0,0,0,223,222,1,0,0,0,224,39, + 1,0,0,0,225,229,3,82,41,0,226,228,3,76,38,0,227,226,1,0,0,0,228,231,1,0, + 0,0,229,227,1,0,0,0,229,230,1,0,0,0,230,232,1,0,0,0,231,229,1,0,0,0,232, + 233,5,83,0,0,233,234,5,10,0,0,234,235,3,74,37,0,235,41,1,0,0,0,236,237, + 3,82,41,0,237,238,5,83,0,0,238,239,5,19,0,0,239,240,3,82,41,0,240,241,5, + 83,0,0,241,242,5,10,0,0,242,243,3,74,37,0,243,43,1,0,0,0,244,245,5,83,0, + 0,245,246,7,1,0,0,246,250,3,74,37,0,247,248,5,83,0,0,248,250,7,2,0,0,249, + 244,1,0,0,0,249,247,1,0,0,0,250,45,1,0,0,0,251,252,5,25,0,0,252,253,5,14, + 0,0,253,254,5,80,0,0,254,255,5,6,0,0,255,258,3,74,37,0,256,257,5,19,0,0, + 257,259,3,64,32,0,258,256,1,0,0,0,258,259,1,0,0,0,259,260,1,0,0,0,260,261, + 5,15,0,0,261,47,1,0,0,0,262,263,5,25,0,0,263,264,5,14,0,0,264,267,3,74, + 37,0,265,266,5,19,0,0,266,268,3,64,32,0,267,265,1,0,0,0,267,268,1,0,0,0, + 268,269,1,0,0,0,269,270,5,15,0,0,270,49,1,0,0,0,271,272,5,26,0,0,272,273, + 3,68,34,0,273,51,1,0,0,0,274,275,5,27,0,0,275,276,5,14,0,0,276,277,3,74, + 37,0,277,278,5,15,0,0,278,281,3,28,14,0,279,280,5,28,0,0,280,282,3,28,14, + 0,281,279,1,0,0,0,281,282,1,0,0,0,282,53,1,0,0,0,283,287,3,56,28,0,284, + 287,3,58,29,0,285,287,3,60,30,0,286,283,1,0,0,0,286,284,1,0,0,0,286,285, + 1,0,0,0,287,55,1,0,0,0,288,289,5,29,0,0,289,290,3,28,14,0,290,291,5,30, + 0,0,291,292,5,14,0,0,292,293,3,74,37,0,293,294,5,15,0,0,294,295,5,2,0,0, + 295,57,1,0,0,0,296,297,5,30,0,0,297,298,5,14,0,0,298,299,3,74,37,0,299, + 300,5,15,0,0,300,301,3,28,14,0,301,59,1,0,0,0,302,303,5,31,0,0,303,304, + 5,14,0,0,304,305,3,62,31,0,305,306,5,2,0,0,306,307,3,74,37,0,307,308,5, + 2,0,0,308,309,3,44,22,0,309,310,5,15,0,0,310,311,3,28,14,0,311,61,1,0,0, + 0,312,315,3,40,20,0,313,315,3,44,22,0,314,312,1,0,0,0,314,313,1,0,0,0,315, + 63,1,0,0,0,316,317,5,77,0,0,317,65,1,0,0,0,318,321,5,83,0,0,319,321,3,78, + 39,0,320,318,1,0,0,0,320,319,1,0,0,0,321,67,1,0,0,0,322,334,5,14,0,0,323, + 328,3,66,33,0,324,325,5,19,0,0,325,327,3,66,33,0,326,324,1,0,0,0,327,330, + 1,0,0,0,328,326,1,0,0,0,328,329,1,0,0,0,329,332,1,0,0,0,330,328,1,0,0,0, + 331,333,5,19,0,0,332,331,1,0,0,0,332,333,1,0,0,0,333,335,1,0,0,0,334,323, + 1,0,0,0,334,335,1,0,0,0,335,336,1,0,0,0,336,337,5,15,0,0,337,69,1,0,0,0, + 338,339,5,83,0,0,339,340,3,72,36,0,340,71,1,0,0,0,341,353,5,14,0,0,342, + 347,3,74,37,0,343,344,5,19,0,0,344,346,3,74,37,0,345,343,1,0,0,0,346,349, + 1,0,0,0,347,345,1,0,0,0,347,348,1,0,0,0,348,351,1,0,0,0,349,347,1,0,0,0, + 350,352,5,19,0,0,351,350,1,0,0,0,351,352,1,0,0,0,352,354,1,0,0,0,353,342, + 1,0,0,0,353,354,1,0,0,0,354,355,1,0,0,0,355,356,5,15,0,0,356,73,1,0,0,0, + 357,358,6,37,-1,0,358,359,5,14,0,0,359,360,3,74,37,0,360,361,5,15,0,0,361, + 407,1,0,0,0,362,363,3,84,42,0,363,364,5,14,0,0,364,366,3,74,37,0,365,367, + 5,19,0,0,366,365,1,0,0,0,366,367,1,0,0,0,367,368,1,0,0,0,368,369,5,15,0, + 0,369,407,1,0,0,0,370,407,3,70,35,0,371,372,5,32,0,0,372,373,5,83,0,0,373, + 407,3,72,36,0,374,375,5,35,0,0,375,376,5,33,0,0,376,377,3,74,37,0,377,378, + 5,34,0,0,378,379,7,3,0,0,379,407,1,0,0,0,380,381,5,41,0,0,381,382,5,33, + 0,0,382,383,3,74,37,0,383,384,5,34,0,0,384,385,7,4,0,0,385,407,1,0,0,0, + 386,387,7,5,0,0,387,407,3,74,37,16,388,400,5,33,0,0,389,394,3,74,37,0,390, + 391,5,19,0,0,391,393,3,74,37,0,392,390,1,0,0,0,393,396,1,0,0,0,394,392, + 1,0,0,0,394,395,1,0,0,0,395,398,1,0,0,0,396,394,1,0,0,0,397,399,5,19,0, + 0,398,397,1,0,0,0,398,399,1,0,0,0,399,401,1,0,0,0,400,389,1,0,0,0,400,401, + 1,0,0,0,401,402,1,0,0,0,402,407,5,34,0,0,403,407,5,82,0,0,404,407,5,83, + 0,0,405,407,3,78,39,0,406,357,1,0,0,0,406,362,1,0,0,0,406,370,1,0,0,0,406, + 371,1,0,0,0,406,374,1,0,0,0,406,380,1,0,0,0,406,386,1,0,0,0,406,388,1,0, + 0,0,406,403,1,0,0,0,406,404,1,0,0,0,406,405,1,0,0,0,407,466,1,0,0,0,408, + 409,10,15,0,0,409,410,7,6,0,0,410,465,3,74,37,16,411,412,10,14,0,0,412, + 413,7,7,0,0,413,465,3,74,37,15,414,415,10,13,0,0,415,416,7,8,0,0,416,465, + 3,74,37,14,417,418,10,12,0,0,418,419,7,9,0,0,419,465,3,74,37,13,420,421, + 10,11,0,0,421,422,7,10,0,0,422,465,3,74,37,12,423,424,10,10,0,0,424,425, + 5,60,0,0,425,465,3,74,37,11,426,427,10,9,0,0,427,428,5,4,0,0,428,465,3, + 74,37,10,429,430,10,8,0,0,430,431,5,61,0,0,431,465,3,74,37,9,432,433,10, + 7,0,0,433,434,5,62,0,0,434,465,3,74,37,8,435,436,10,6,0,0,436,437,5,63, + 0,0,437,465,3,74,37,7,438,439,10,5,0,0,439,440,5,64,0,0,440,441,3,74,37, + 0,441,442,5,65,0,0,442,443,3,74,37,5,443,465,1,0,0,0,444,445,10,22,0,0, + 445,446,5,33,0,0,446,447,5,70,0,0,447,465,5,34,0,0,448,449,10,19,0,0,449, + 465,7,11,0,0,450,451,10,18,0,0,451,452,5,48,0,0,452,453,5,14,0,0,453,454, + 3,74,37,0,454,455,5,15,0,0,455,465,1,0,0,0,456,457,10,17,0,0,457,458,5, + 49,0,0,458,459,5,14,0,0,459,460,3,74,37,0,460,461,5,19,0,0,461,462,3,74, + 37,0,462,463,5,15,0,0,463,465,1,0,0,0,464,408,1,0,0,0,464,411,1,0,0,0,464, + 414,1,0,0,0,464,417,1,0,0,0,464,420,1,0,0,0,464,423,1,0,0,0,464,426,1,0, + 0,0,464,429,1,0,0,0,464,432,1,0,0,0,464,435,1,0,0,0,464,438,1,0,0,0,464, + 444,1,0,0,0,464,448,1,0,0,0,464,450,1,0,0,0,464,456,1,0,0,0,465,468,1,0, + 0,0,466,464,1,0,0,0,466,467,1,0,0,0,467,75,1,0,0,0,468,466,1,0,0,0,469, + 470,5,66,0,0,470,77,1,0,0,0,471,477,5,68,0,0,472,477,3,80,40,0,473,477, + 5,77,0,0,474,477,5,78,0,0,475,477,5,79,0,0,476,471,1,0,0,0,476,472,1,0, + 0,0,476,473,1,0,0,0,476,474,1,0,0,0,476,475,1,0,0,0,477,79,1,0,0,0,478, + 480,5,70,0,0,479,481,5,69,0,0,480,479,1,0,0,0,480,481,1,0,0,0,481,81,1, + 0,0,0,482,483,7,12,0,0,483,83,1,0,0,0,484,485,7,13,0,0,485,85,1,0,0,0,40, + 89,95,101,115,118,130,140,151,165,176,180,182,193,198,204,214,223,229,249, + 258,267,281,286,314,320,328,332,334,347,351,353,366,394,398,400,406,464, + 466,476,480]; private static __ATN: ATN; public static get _ATN(): ATN { @@ -3851,6 +3878,29 @@ export class UnaryOpContext extends ExpressionContext { } } } +export class TernaryContext extends ExpressionContext { + public _condition!: ExpressionContext; + public _consequent!: ExpressionContext; + public _alternative!: ExpressionContext; + constructor(parser: CashScriptParser, ctx: ExpressionContext) { + super(parser, ctx.parentCtx, ctx.invokingState); + super.copyFrom(ctx); + } + public expression_list(): ExpressionContext[] { + return this.getTypedRuleContexts(ExpressionContext) as ExpressionContext[]; + } + public expression(i: number): ExpressionContext { + return this.getTypedRuleContext(ExpressionContext, i) as ExpressionContext; + } + // @Override + public accept(visitor: CashScriptVisitor): Result { + if (visitor.visitTernary) { + return visitor.visitTernary(this); + } else { + return visitor.visitChildren(this); + } + } +} export class LiteralExpressionContext extends ExpressionContext { constructor(parser: CashScriptParser, ctx: ExpressionContext) { super(parser, ctx.parentCtx, ctx.invokingState); diff --git a/packages/cashc/src/grammar/CashScriptVisitor.ts b/packages/cashc/src/grammar/CashScriptVisitor.ts index 6b47aa00..a01bb27c 100644 --- a/packages/cashc/src/grammar/CashScriptVisitor.ts +++ b/packages/cashc/src/grammar/CashScriptVisitor.ts @@ -43,6 +43,7 @@ import { ExpressionListContext } from "./CashScriptParser.js"; import { CastContext } from "./CashScriptParser.js"; import { UnaryIntrospectionOpContext } from "./CashScriptParser.js"; import { UnaryOpContext } from "./CashScriptParser.js"; +import { TernaryContext } from "./CashScriptParser.js"; import { LiteralExpressionContext } from "./CashScriptParser.js"; import { FunctionCallExpressionContext } from "./CashScriptParser.js"; import { ArrayContext } from "./CashScriptParser.js"; @@ -311,6 +312,13 @@ export default class CashScriptVisitor extends ParseTreeVisitor * @return the visitor result */ visitUnaryOp?: (ctx: UnaryOpContext) => Result; + /** + * Visit a parse tree produced by the `Ternary` + * labeled alternative in `CashScriptParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTernary?: (ctx: TernaryContext) => Result; /** * Visit a parse tree produced by the `LiteralExpression` * labeled alternative in `CashScriptParser.expression`. diff --git a/packages/cashc/src/print/OutputSourceCodeTraversal.ts b/packages/cashc/src/print/OutputSourceCodeTraversal.ts index 7f703f8a..3faf8ef0 100644 --- a/packages/cashc/src/print/OutputSourceCodeTraversal.ts +++ b/packages/cashc/src/print/OutputSourceCodeTraversal.ts @@ -15,6 +15,7 @@ import { FunctionCallNode, UnaryOpNode, BinaryOpNode, + TernaryNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, @@ -311,6 +312,17 @@ export default class OutputSourceCodeTraversal extends AstTraversal { return node; } + visitTernary(node: TernaryNode): Node { + this.addOutput('('); + node.condition = this.visit(node.condition); + this.addOutput(' ? '); + node.consequent = this.visit(node.consequent); + this.addOutput(' : '); + node.alternative = this.visit(node.alternative); + this.addOutput(')'); + return node; + } + visitUnaryOp(node: UnaryOpNode): Node { if (node.operator.startsWith('.')) { this.visit(node.expression); diff --git a/packages/cashc/src/semantic/TypeCheckTraversal.ts b/packages/cashc/src/semantic/TypeCheckTraversal.ts index 4c5d120c..7d27f463 100644 --- a/packages/cashc/src/semantic/TypeCheckTraversal.ts +++ b/packages/cashc/src/semantic/TypeCheckTraversal.ts @@ -19,6 +19,7 @@ import { ParameterNode, UnaryOpNode, BinaryOpNode, + TernaryNode, IdentifierNode, TimeOpNode, VariableDefinitionNode, @@ -53,11 +54,12 @@ import { BitshiftBitcountNegativeError, UnusedFunctionReturnError, ReturnTypeError, + TernaryBranchMismatchError, } from '../Errors.js'; import { BinaryOperator, NullaryOperator, UnaryOperator } from '../ast/Operator.js'; import { GlobalFunction } from '../ast/Globals.js'; import { Symbol } from '../ast/SymbolTable.js'; -import { resultingTypeForBinaryOp } from '../utils.js'; +import { resultingTypeForBinaryOp, resultingTypeForTernary } from '../utils.js'; export default class TypeCheckTraversal extends AstTraversal { private currentFunctionReturnType: Type = PrimitiveType.VOID; @@ -347,6 +349,29 @@ export default class TypeCheckTraversal extends AstTraversal { } } + visitTernary(node: TernaryNode): Node { + node.condition = this.visit(node.condition); + + // Mirror if-statement narrowing: a `x.length == N` condition narrows bytes types in the consequent + // (the branch taken when the condition holds), but not in the alternative. + const narrowings = extractBytesNarrowings(node.condition); + executeWithNarrowedTypes(narrowings, () => { node.consequent = this.visit(node.consequent); }); + + node.alternative = this.visit(node.alternative); + + if (!implicitlyCastable(node.condition.type, PrimitiveType.BOOL)) { + throw new TypeError(node.condition, node.condition.type, PrimitiveType.BOOL); + } + + const resultType = resultingTypeForTernary(node.consequent.type, node.alternative.type); + if (!resultType) { + throw new TernaryBranchMismatchError(node); + } + + node.type = resultType; + return node; + } + visitUnaryOp(node: UnaryOpNode): Node { node.expression = this.visit(node.expression); diff --git a/packages/cashc/src/utils.ts b/packages/cashc/src/utils.ts index c24a140d..c6dc746e 100644 --- a/packages/cashc/src/utils.ts +++ b/packages/cashc/src/utils.ts @@ -1,4 +1,4 @@ -import { BytesType, implicitlyCastable, PrimitiveType, Type } from '@cashscript/utils'; +import { arrayType, BytesType, implicitlyCastable, PrimitiveType, TupleType, Type } from '@cashscript/utils'; import { BinaryOperator } from './ast/Operator.js'; export function resultingTypeForBinaryOp( @@ -17,6 +17,14 @@ export function resultingTypeForBinaryOp( return undefined; } +// The type of a ternary `condition ? consequent : alternative` is the common type of both branches, +// resolved the same way array element types are. Tuples (e.g. from `.split`) are not valid branch values. +export function resultingTypeForTernary(consequent?: Type, alternative?: Type): Type | undefined { + if (!consequent || !alternative) return undefined; + if (consequent instanceof TupleType || alternative instanceof TupleType) return undefined; + return arrayType([consequent, alternative]); +} + export function isNumericType(type?: Type): boolean { return type === PrimitiveType.INT || type === PrimitiveType.BOOL; } diff --git a/packages/cashc/test/ast/fixtures.ts b/packages/cashc/test/ast/fixtures.ts index c54d2a0f..3498f584 100644 --- a/packages/cashc/test/ast/fixtures.ts +++ b/packages/cashc/test/ast/fixtures.ts @@ -24,6 +24,7 @@ import { NullaryOpNode, HexLiteralNode, UnaryOpNode, + TernaryNode, InstantiationNode, ConsoleStatementNode, DoWhileNode, @@ -1117,4 +1118,49 @@ export const fixtures: Fixture[] = [ ), ), }, + { + fn: 'ternary.cash', + ast: new SourceFileNode( + new ContractNode( + 'Ternary', + [new ParameterNode(PrimitiveType.INT, 'threshold')], + [new FunctionDefinitionNode( + FunctionKind.CONTRACT, + 'spend', + [new ParameterNode(PrimitiveType.INT, 'x'), new ParameterNode(PrimitiveType.INT, 'expected')], + new BlockNode([ + new VariableDefinitionNode( + PrimitiveType.INT, + [], + 'result', + new TernaryNode( + new BinaryOpNode( + new IdentifierNode('x'), + BinaryOperator.GT, + new IdentifierNode('threshold'), + ), + new BinaryOpNode( + new IdentifierNode('x'), + BinaryOperator.PLUS, + new IntLiteralNode(1n), + ), + new BinaryOpNode( + new IdentifierNode('x'), + BinaryOperator.MINUS, + new IntLiteralNode(1n), + ), + ), + ), + new RequireNode( + new BinaryOpNode( + new IdentifierNode('result'), + BinaryOperator.EQ, + new IdentifierNode('expected'), + ), + ), + ]), + )], + ), + ), + }, ]; diff --git a/packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_branch_mismatch.cash b/packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_branch_mismatch.cash new file mode 100644 index 00000000..5fbce683 --- /dev/null +++ b/packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_branch_mismatch.cash @@ -0,0 +1,6 @@ +contract Ternary() { + function spend(bool flag) { + int result = flag ? 1 : true; + require(result == 1); + } +} diff --git a/packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_tuple_rejection.cash b/packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_tuple_rejection.cash new file mode 100644 index 00000000..7750591e --- /dev/null +++ b/packages/cashc/test/compiler/TernaryBranchMismatchError/ternary_tuple_rejection.cash @@ -0,0 +1,6 @@ +contract Ternary() { + function spend(bool flag, bytes input) { + bytes a, bytes b = flag ? input.split(2) : input.split(3); + require(a == b); + } +} diff --git a/packages/cashc/test/compiler/TypeError/ternary_condition_not_bool.cash b/packages/cashc/test/compiler/TypeError/ternary_condition_not_bool.cash new file mode 100644 index 00000000..8146e9a0 --- /dev/null +++ b/packages/cashc/test/compiler/TypeError/ternary_condition_not_bool.cash @@ -0,0 +1,6 @@ +contract Ternary() { + function spend(int x) { + int result = x ? 1 : 2; + require(result == 1); + } +} diff --git a/packages/cashc/test/generation/fixtures.ts b/packages/cashc/test/generation/fixtures.ts index a8a6c2ec..3de7863b 100644 --- a/packages/cashc/test/generation/fixtures.ts +++ b/packages/cashc/test/generation/fixtures.ts @@ -1547,4 +1547,38 @@ export const fixtures: Fixture[] = [ fingerprint: '316a3305152ec0695bf80303736c79dd1f9cc2f1dbccf57d9965094401363307', }, }, + { + fn: 'ternary.cash', + artifact: { + contractName: 'Ternary', + constructorInputs: [{ name: 'threshold', type: 'int' }], + abi: [{ name: 'spend', inputs: [{ name: 'x', type: 'int' }, { name: 'expected', type: 'int' }] }], + bytecode: + // int result = x > threshold ? x + 1 : x - 1 + 'OP_OVER OP_LESSTHAN OP_IF OP_DUP OP_1ADD OP_ELSE OP_DUP OP_1SUB OP_ENDIF ' + // require(result == expected) + + 'OP_ROT OP_NUMEQUAL ' + + 'OP_NIP', + debug: { + bytecode: '789f63768b67768c687b9c77', + logs: [], + requires: [ + { ip: 12, line: 4 }, + ], + sourceMap: '3:21:3:22;:::34:1;:37::42:0;:::38;:::42:1;:45::50:0;:::46;:::50:1;:21;4:26:4:34:0;:8::36:1;2:40:5:5', + sourceTags: '11:11:sc', + }, + source: fs.readFileSync(new URL('../valid-contract-files/ternary.cash', import.meta.url), { encoding: 'utf-8' }), + compiler: { + name: 'cashc', + version, + options: { + enforceFunctionParameterTypes: true, + enforceLocktimeGuard: true, + }, + }, + updatedAt: '', + fingerprint: '082541b5fa11c05d39b2f8c06a29d20bdd6605ac0dc339e580d34e5c28d917e9', + }, + }, ]; diff --git a/packages/cashc/test/valid-contract-files/ternary.cash b/packages/cashc/test/valid-contract-files/ternary.cash new file mode 100644 index 00000000..cab45f82 --- /dev/null +++ b/packages/cashc/test/valid-contract-files/ternary.cash @@ -0,0 +1,6 @@ +contract Ternary(int threshold) { + function spend(int x, int expected) { + int result = x > threshold ? x + 1 : x - 1; + require(result == expected); + } +} diff --git a/packages/cashc/test/valid-contract-files/ternary_sig.cash b/packages/cashc/test/valid-contract-files/ternary_sig.cash new file mode 100644 index 00000000..2ce19c5e --- /dev/null +++ b/packages/cashc/test/valid-contract-files/ternary_sig.cash @@ -0,0 +1,6 @@ +contract Ternary(pubkey pk) { + function spend(bool useFirst, sig a, sig b) { + sig s = useFirst ? a : b; + require(checkSig(s, pk)); + } +} diff --git a/packages/cashscript/test/debugging.test.ts b/packages/cashscript/test/debugging.test.ts index 441afcab..3c7cb0ab 100644 --- a/packages/cashscript/test/debugging.test.ts +++ b/packages/cashscript/test/debugging.test.ts @@ -16,6 +16,7 @@ import { artifactTestLogInsideLoop, } from './fixture/debugging/debugging_contracts.js'; import { sha256 } from '@cashscript/utils'; +import { compileString } from 'cashc'; describe('Debugging tests', () => { describe('console.log statements', () => { @@ -814,3 +815,36 @@ describe('VM Resources', () => { expect(vmUsage[2]?.hashDigestIterations).toBeGreaterThan(0); }); }); + +// Regression: a single-line contract puts control-flow opcodes and the trailing stack cleanup on the same +// source line. The debug reconstruction (formatBitAuthScript) used to reorder those opcodes, producing a +// spurious "empty stack" error instead of evaluating the contract correctly. See enforceMonotonicDisplayLines. +describe('single-line contract debugging', () => { + const provider = new MockNetworkProvider(); + + const debugSpend = (artifact: ReturnType, args: unknown[]): TransactionBuilder => { + const contract = new Contract(artifact, [], { provider }); + const utxo = randomUtxo(); + provider.addUtxo(contract.address, utxo); + return new TransactionBuilder({ provider }) + .addInput(utxo, contract.unlock.f(...args)) + .addOutput({ to: contract.address, amount: utxo.satoshis - 2000n }); + }; + + it('evaluates a single-line ternary correctly (consequent and alternative branches)', () => { + const artifact = compileString('contract C(){ function f(int a, int b, int e){ int r = a == 0 ? b : 3; require(r == e); } }'); + expect(() => debugSpend(artifact, [0n, 7n, 7n]).debug()).not.toThrow(); + expect(() => debugSpend(artifact, [9n, 0n, 3n]).debug()).not.toThrow(); + }); + + it('reports a clean require failure (not a stack error) for a single-line ternary', () => { + const artifact = compileString('contract C(){ function f(int a, int b, int e){ int r = a == 0 ? b : 3; require(r == e); } }'); + expect(debugSpend(artifact, [9n, 0n, 5n])).toFailRequireWith(/Require statement failed/); + }); + + it('evaluates a single-line if-statement correctly', () => { + const artifact = compileString('contract C(){ function f(int a, int b, int e){ int r = b; if (a == 0) { r = b; } require(r == e); } }'); + expect(() => debugSpend(artifact, [0n, 7n, 7n]).debug()).not.toThrow(); + expect(() => debugSpend(artifact, [9n, 7n, 7n]).debug()).not.toThrow(); + }); +}); diff --git a/packages/cashscript/test/e2e/Ternary.test.ts b/packages/cashscript/test/e2e/Ternary.test.ts new file mode 100644 index 00000000..bf9d4619 --- /dev/null +++ b/packages/cashscript/test/e2e/Ternary.test.ts @@ -0,0 +1,208 @@ +import { compileString } from 'cashc'; +import { Contract, MockNetworkProvider, TransactionBuilder } from '../../src/index.js'; +import { randomUtxo } from '../../src/utils.js'; + +// These tests compile small contracts that exercise the ternary operator (`condition ? consequent : alternative`) +// and run them on the mock VM, asserting that the correct branch is taken for a range of inputs. This proves the +// generated OP_IF/OP_ELSE/OP_ENDIF bytecode keeps the stack balanced across both branches. +describe('Ternary operator', () => { + const provider = new MockNetworkProvider(); + + // Builds and debug-evaluates a transaction spending a fresh UTXO of `contract` via `unlock[fn](...args)`. + // `transaction.debug()` runs the contract on the VM and throws if a require statement fails. + const evaluate = (contract: Contract, fn: string, args: unknown[]): void => { + const utxo = randomUtxo(); + provider.addUtxo(contract.address, utxo); + new TransactionBuilder({ provider }) + .addInput(utxo, contract.unlock[fn](...args)) + .addOutput({ to: contract.address, amount: utxo.satoshis - 2000n }) + .debug(); + }; + + describe('basic int ternary', () => { + const artifact = compileString(` + contract Ternary(int threshold) { + function spend(int x, int expected) { + int result = x > threshold ? x + 1 : x - 1; + require(result == expected); + } + } + `); + const contract = new Contract(artifact, [3n], { provider }); + + it('takes the consequent branch when the condition is true', () => { + expect(() => evaluate(contract, 'spend', [5n, 6n])).not.toThrow(); + }); + + it('takes the alternative branch when the condition is false', () => { + expect(() => evaluate(contract, 'spend', [2n, 1n])).not.toThrow(); + }); + + it('fails when the consequent branch result is wrong', () => { + expect(() => evaluate(contract, 'spend', [5n, 4n])).toThrow(); + }); + + it('fails when the alternative branch result is wrong', () => { + expect(() => evaluate(contract, 'spend', [2n, 9n])).toThrow(); + }); + }); + + describe('nested (right-associative) ternary', () => { + const artifact = compileString(` + contract Ternary() { + function spend(int a, int expected) { + int result = a == 0 ? 10 : a == 1 ? 20 : 30; + require(result == expected); + } + } + `); + const contract = new Contract(artifact, [], { provider }); + + it('resolves the first arm', () => { + expect(() => evaluate(contract, 'spend', [0n, 10n])).not.toThrow(); + }); + + it('resolves the middle arm', () => { + expect(() => evaluate(contract, 'spend', [1n, 20n])).not.toThrow(); + }); + + it('resolves the final arm', () => { + expect(() => evaluate(contract, 'spend', [2n, 30n])).not.toThrow(); + }); + + it('fails for a mismatched arm', () => { + expect(() => evaluate(contract, 'spend', [1n, 30n])).toThrow(); + }); + }); + + describe('bytes-typed ternary', () => { + const artifact = compileString(` + contract Ternary() { + function spend(bool flag, bytes2 expected) { + bytes2 result = flag ? 0x1122 : 0x3344; + require(result == expected); + } + } + `); + const contract = new Contract(artifact, [], { provider }); + + it('selects the consequent value', () => { + expect(() => evaluate(contract, 'spend', [true, Uint8Array.from([0x11, 0x22])])).not.toThrow(); + }); + + it('selects the alternative value', () => { + expect(() => evaluate(contract, 'spend', [false, Uint8Array.from([0x33, 0x44])])).not.toThrow(); + }); + + it('fails when the selected value is wrong', () => { + expect(() => evaluate(contract, 'spend', [true, Uint8Array.from([0x33, 0x44])])).toThrow(); + }); + }); + + describe('pubkey-typed ternary', () => { + const artifact = compileString(` + contract Ternary() { + function spend(bool useFirst, pubkey a, pubkey b, pubkey expected) { + pubkey result = useFirst ? a : b; + require(result == expected); + } + } + `); + const contract = new Contract(artifact, [], { provider }); + const pkA = Uint8Array.from(Array(33).fill(0xaa)); + const pkB = Uint8Array.from(Array(33).fill(0xbb)); + + it('selects the consequent pubkey', () => { + expect(() => evaluate(contract, 'spend', [true, pkA, pkB, pkA])).not.toThrow(); + }); + + it('selects the alternative pubkey', () => { + expect(() => evaluate(contract, 'spend', [false, pkA, pkB, pkB])).not.toThrow(); + }); + + it('fails when the selected pubkey is wrong', () => { + expect(() => evaluate(contract, 'spend', [true, pkA, pkB, pkB])).toThrow(); + }); + }); + + describe('bytes narrowing in the ternary consequent', () => { + // `result` is declared bytes2, so the consequent `x` (an unbounded bytes parameter) only type-checks + // because the `x.length == 2` condition narrows it to bytes2 — the same narrowing applied to if-branches. + const artifact = compileString(` + contract Ternary() { + function spend(bytes x) { + bytes2 result = x.length == 2 ? x : 0x1122; + require(result == 0x1122); + } + } + `); + const contract = new Contract(artifact, [], { provider }); + + it('uses the narrowed consequent when the length matches', () => { + expect(() => evaluate(contract, 'spend', [Uint8Array.from([0x11, 0x22])])).not.toThrow(); + }); + + it('falls through to the alternative when the length differs', () => { + expect(() => evaluate(contract, 'spend', [Uint8Array.from([0x99])])).not.toThrow(); + }); + + it('fails when the narrowed consequent does not match', () => { + expect(() => evaluate(contract, 'spend', [Uint8Array.from([0x33, 0x44])])).toThrow(); + }); + }); + + describe('ternary as a user-defined function return value', () => { + const artifact = compileString(` + function pick(bool b, int x, int y) returns (int) { + return b ? x : y; + } + + contract Ternary() { + function spend(bool b, int expected) { + require(pick(b, 7, 9) == expected); + } + } + `); + const contract = new Contract(artifact, [], { provider }); + + it('returns the consequent', () => { + expect(() => evaluate(contract, 'spend', [true, 7n])).not.toThrow(); + }); + + it('returns the alternative', () => { + expect(() => evaluate(contract, 'spend', [false, 9n])).not.toThrow(); + }); + }); + + describe('ternary nested inside an if-statement', () => { + const artifact = compileString(` + contract Ternary() { + function spend(int a, bool flag, int expected) { + if (a > 0) { + int r = flag ? a * 2 : a * 3; + require(r == expected); + } else { + require(a == expected); + } + } + } + `); + const contract = new Contract(artifact, [], { provider }); + + it('takes the consequent inside the taken if-branch', () => { + expect(() => evaluate(contract, 'spend', [5n, true, 10n])).not.toThrow(); + }); + + it('takes the alternative inside the taken if-branch', () => { + expect(() => evaluate(contract, 'spend', [5n, false, 15n])).not.toThrow(); + }); + + it('takes the else-branch (ternary not evaluated)', () => { + expect(() => evaluate(contract, 'spend', [-3n, true, -3n])).not.toThrow(); + }); + + it('fails for a wrong result in the ternary branch', () => { + expect(() => evaluate(contract, 'spend', [5n, true, 15n])).toThrow(); + }); + }); +}); diff --git a/packages/utils/src/bitauth-script.ts b/packages/utils/src/bitauth-script.ts index 9cd3aab5..e7cbced3 100644 --- a/packages/utils/src/bitauth-script.ts +++ b/packages/utils/src/bitauth-script.ts @@ -38,7 +38,7 @@ export function formatBitAuthScript(bytecode: Script, sourceMap: string, sourceC // Splice synthetic annotation lines (e.g. for-loop updates) into source and remap opcode lines const insertions = buildInsertions(locationData, sourceLines, sourceTags); const splicedSourceLines = spliceSyntheticSourceLines(sourceLines, insertions); - const splicedLocationData = updateLocationData(locationData, insertions); + const splicedLocationData = enforceMonotonicDisplayLines(updateLocationData(locationData, insertions)); // Group opcodes by display line and convert to ASM const lineToAsm = buildLineToAsmMap(bytecode, splicedLocationData); @@ -61,6 +61,27 @@ function getDisplayLine(singleLocation: SingleLocationData): number { return positionHint === PositionHint.END ? location.end.line : location.start.line; } +// The debugging VM executes formatBitAuthScript's output, which buildLineToOpcodesMap groups by display line +// and emits in source-line order. That only matches bytecode order when display lines are non-decreasing in +// bytecode order. The compiler emits a monotonic source map, but annotation splicing can break this in degenerate +// cases (e.g. an epilogue tag on a single-line contract, where the closing brace shares the body's line). To keep +// the executed output equal to the real bytecode, we clamp each opcode's display line to never drop below the +// previous opcode's. Already-monotonic maps (the normal multi-line case) are returned unchanged. +function enforceMonotonicDisplayLines(locationData: FullLocationData): FullLocationData { + let maxLine = 0; + return locationData.map((entry) => { + const line = getDisplayLine(entry); + if (line >= maxLine) { + maxLine = line; + return entry; + } + return { + location: { start: { line: maxLine, column: 0 }, end: { line: maxLine, column: 0 } }, + positionHint: PositionHint.START, + }; + }); +} + function escapeCommentChars(text: string): string { return text.replaceAll('/*', '\\/*').replaceAll('*/', '*\\/'); } diff --git a/packages/utils/test/bitauth-script.test.ts b/packages/utils/test/bitauth-script.test.ts index 97d59b24..682e9478 100644 --- a/packages/utils/test/bitauth-script.test.ts +++ b/packages/utils/test/bitauth-script.test.ts @@ -1,7 +1,8 @@ -import { asmToScript } from '../src/script.js'; +import { asmToScript, bytecodeToScript, scriptToAsm } from '../src/script.js'; import { buildLineToAsmMap, formatBitAuthScript } from '../src/bitauth-script.js'; import { fixtures } from './fixtures/bitauth-script.fixture.js'; import { compileString } from 'cashc'; +import { hexToBin } from '@bitauth/libauth'; describe('Libauth Script formatting', () => { fixtures.forEach((fixture) => { @@ -29,4 +30,37 @@ describe('Libauth Script formatting', () => { }); }); }); + + // The debugging VM executes the ASM column of formatBitAuthScript's output (grouped by display line), so it must + // equal the real bytecode in order. This used to break for single-line contracts (and any source where an epilogue + // annotation shares the body's line), producing a reordered script and spurious "empty stack" failures. + describe('preserves bytecode order in the executed output', () => { + // The ASM tokens that the debugging VM actually executes: the part of each line before the `/* source */` comment. + const reconstructExecutedAsm = (formatted: string): string => formatted + .split('\n') + .map((line) => line.split('/*')[0].trim()) + .filter(Boolean) + .join(' ') + .replace(/\s+/g, ' ') + .trim(); + + const cases = { + 'single-line ternary': 'contract C(){ function f(int a, int b, int e){ int r = a == 0 ? b : 3; require(r == e); } }', + 'single-line if-statement': 'contract C(){ function f(int a, int b, int e){ int r = b; if (a == 0) { r = b; } require(r == e); } }', + 'multi-line ternary': 'contract C() {\n function f(int a, int b, int e) {\n int r = a == 0 ? b : 3;\n require(r == e);\n }\n}', + 'for-loop': 'contract C() {\n function f(int n, int e) {\n int sum = 0;\n for (int i = 0; i < n; i = i + 1) {\n sum = sum + i;\n }\n require(sum == e);\n }\n}', + }; + + Object.entries(cases).forEach(([name, sourceCode]) => { + it(`keeps the executed ASM equal to the real bytecode for a ${name}`, () => { + const artifact = compileString(sourceCode); + const script = bytecodeToScript(hexToBin(artifact.debug!.bytecode)); + const realAsm = scriptToAsm(script); + const formatted = formatBitAuthScript( + script, artifact.debug!.sourceMap, artifact.source, artifact.debug!.sourceTags, + ); + expect(reconstructExecutedAsm(formatted)).toBe(realAsm); + }); + }); + }); }); diff --git a/website/docs/compiler/grammar.md b/website/docs/compiler/grammar.md index 06093188..1d0db95a 100644 --- a/website/docs/compiler/grammar.md +++ b/website/docs/compiler/grammar.md @@ -192,6 +192,7 @@ expression | left=expression op='|' right=expression # BinaryOp | left=expression op='&&' right=expression # BinaryOp | left=expression op='||' right=expression # BinaryOp + | condition=expression '?' consequent=expression ':' alternative=expression # Ternary | '[' (expression (',' expression)* ','?)? ']' # Array | NullaryOp # NullaryOp | Identifier # Identifier diff --git a/website/docs/language/types.md b/website/docs/language/types.md index cdcdf61f..847342ac 100644 --- a/website/docs/language/types.md +++ b/website/docs/language/types.md @@ -245,7 +245,31 @@ An overview of all supported operators and their precedence is included below. N | 15 | Bitwise OR | `\|` | | 16 | Logical AND | `&&` | | 17 | Logical OR | `\|\|` | -| 18 | Assignment | `=` | +| 18 | Conditional (ternary) | ` ? : `| +| 19 | Assignment | `=` | + +### Conditional (ternary) operator + +The conditional operator ` ? : ` evaluates to `consequent` when `condition` is `true`, and to `alternative` otherwise. It is an expression, so it can be used anywhere a value is expected: + +```solidity +int fee = isPriority ? 2000 : 1000; +require(amount == (isPriority ? 2000 : 1000)); +``` + +The `condition` must be of type `bool`, and both branches must have a compatible type — the result type is the common type of the two branches (resolved the same way as array element types). The operator is right-associative, so it can be chained to express multiple cases: + +```solidity +// parsed as: a == 0 ? 10 : (a == 1 ? 20 : 30) +int result = a == 0 ? 10 : a == 1 ? 20 : 30; +``` + +Unlike `&&` and `||` (which always evaluate both operands), the ternary operator only evaluates the selected branch at runtime — it compiles to an `OP_IF`/`OP_ELSE`/`OP_ENDIF` block. This means the untaken branch is skipped entirely, so it is safe to guard a potentially-failing operation behind a condition: + +```solidity +// when denominator is zero, the division branch is never executed +int result = denominator != 0 ? numerator / denominator : 0; +``` ### Bitshift and arithmetic shift diff --git a/website/docs/releases/release-notes.md b/website/docs/releases/release-notes.md index 160d49f8..632eb979 100644 --- a/website/docs/releases/release-notes.md +++ b/website/docs/releases/release-notes.md @@ -9,6 +9,10 @@ title: Release Notes #### cashc compiler - :sparkles: Add support for user-defined reusable functions. - :sparkles: Add support for `import` directives to share user-defined functions across files. +- :sparkles: Add support for the conditional (ternary) operator ` ? : `. + +#### CashScript SDK +- :bug: Fix `debug()` (and `MockNetworkProvider` evaluation) reporting a spurious stack error for contracts whose control flow and stack cleanup share a single source line (e.g. single-line contracts). ## v0.13.2