diff --git a/pkg/machine/script/NumScript.g4 b/pkg/machine/script/NumScript.g4 index 2b595706d..489759bd2 100644 --- a/pkg/machine/script/NumScript.g4 +++ b/pkg/machine/script/NumScript.g4 @@ -41,6 +41,7 @@ PORTION: REMAINING: 'remaining'; KEPT: 'kept'; BALANCE: 'balance'; +SAVE: 'save'; NUMBER: [0-9]+; PERCENT: '%'; VARIABLE_NAME: '$' [a-z_]+ [a-z0-9_]*; @@ -132,6 +133,7 @@ valueAwareSource statement : PRINT expr=expression # Print + | SAVE (mon=expression | monAll=monetaryAll) FROM acc=expression # SaveFromAccount | SET_TX_META '(' key=STRING ',' value=expression ')' # SetTxMeta | SET_ACCOUNT_META '(' acc=expression ',' key=STRING ',' value=expression ')' # SetAccountMeta | FAIL # Fail diff --git a/pkg/machine/script/compiler/compiler.go b/pkg/machine/script/compiler/compiler.go index d217e95a9..18c840743 100644 --- a/pkg/machine/script/compiler/compiler.go +++ b/pkg/machine/script/compiler/compiler.go @@ -410,7 +410,7 @@ func (p *parseVisitor) VisitSetAccountMeta(ctx *parser.SetAccountMetaContext) *C } if ty != internal.TypeAccount { return LogicError(ctx, fmt.Errorf( - "variable is of type %s, and should be of type account", ty)) + "set_account_meta: expression is of type %s, and should be of type account", ty)) } p.PushAddress(*accAddr) @@ -419,7 +419,48 @@ func (p *parseVisitor) VisitSetAccountMeta(ctx *parser.SetAccountMetaContext) *C return nil } -// print statement +func (p *parseVisitor) VisitSaveFromAccount(c *parser.SaveFromAccountContext) *CompileError { + var ( + typ internal.Type + addr *internal.Address + compErr *CompileError + ) + if monAll := c.GetMonAll(); monAll != nil { + typ, addr, compErr = p.VisitExpr(monAll.GetAsset(), false) + if compErr != nil { + return compErr + } + if typ != internal.TypeAsset { + return LogicError(c, fmt.Errorf( + "save monetary all from account: the first expression should be of type 'asset' instead of '%s'", typ)) + } + } else if mon := c.GetMon(); mon != nil { + typ, addr, compErr = p.VisitExpr(mon, false) + if compErr != nil { + return compErr + } + if typ != internal.TypeMonetary { + return LogicError(c, fmt.Errorf( + "save monetary from account: the first expression should be of type 'monetary' instead of '%s'", typ)) + } + } + p.PushAddress(*addr) + + typ, addr, compErr = p.VisitExpr(c.GetAcc(), false) + if compErr != nil { + return compErr + } + if typ != internal.TypeAccount { + return LogicError(c, fmt.Errorf( + "save monetary from account: the second expression should be of type 'account' instead of '%s'", typ)) + } + p.PushAddress(*addr) + + p.AppendInstruction(program.OP_SAVE) + + return nil +} + func (p *parseVisitor) VisitPrint(ctx *parser.PrintContext) *CompileError { _, _, err := p.VisitExpr(ctx.GetExpr(), true) if err != nil { @@ -431,7 +472,6 @@ func (p *parseVisitor) VisitPrint(ctx *parser.PrintContext) *CompileError { return nil } -// vars declaration block func (p *parseVisitor) VisitVars(c *parser.VarListDeclContext) *CompileError { if len(c.GetV()) > 32768 { return LogicError(c, fmt.Errorf("number of variables exceeded %v", 32768)) @@ -561,6 +601,8 @@ func (p *parseVisitor) VisitScript(c parser.IScriptContext) *CompileError { err = p.VisitSetTxMeta(c) case *parser.SetAccountMetaContext: err = p.VisitSetAccountMeta(c) + case *parser.SaveFromAccountContext: + err = p.VisitSaveFromAccount(c) default: return InternalError(c) } diff --git a/pkg/machine/script/compiler/compiler_test.go b/pkg/machine/script/compiler/compiler_test.go index 4d94ce558..57a7224d7 100644 --- a/pkg/machine/script/compiler/compiler_test.go +++ b/pkg/machine/script/compiler/compiler_test.go @@ -1366,9 +1366,9 @@ func TestPrint(t *testing.T) { program.OP_PRINT, }, Resources: []program.Resource{ - program.Constant{Inner: core.NewMonetaryInt(1)}, - program.Constant{Inner: core.NewMonetaryInt(2)}, - program.Constant{Inner: core.NewMonetaryInt(3)}, + program.Constant{Inner: internal.NewMonetaryInt(1)}, + program.Constant{Inner: internal.NewMonetaryInt(2)}, + program.Constant{Inner: internal.NewMonetaryInt(3)}, }, }, }) @@ -1415,30 +1415,30 @@ func TestSendWithArithmetic(t *testing.T) { }, Resources: []program.Resource{ program.Variable{ - Typ: core.TypeAsset, + Typ: internal.TypeAsset, Name: "ass", }, program.Variable{ - Typ: core.TypeMonetary, + Typ: internal.TypeMonetary, Name: "mon", }, - program.Constant{Inner: core.Asset("EUR")}, + program.Constant{Inner: internal.Asset("EUR")}, program.Monetary{ Asset: 2, - Amount: core.NewMonetaryInt(1), + Amount: internal.NewMonetaryInt(1), }, program.Monetary{ Asset: 0, - Amount: core.NewMonetaryInt(3), + Amount: internal.NewMonetaryInt(3), }, program.Monetary{ Asset: 2, - Amount: core.NewMonetaryInt(4), + Amount: internal.NewMonetaryInt(4), }, - program.Constant{Inner: core.AccountAddress("a")}, - program.Constant{Inner: core.NewMonetaryInt(0)}, - program.Constant{Inner: core.NewMonetaryInt(1)}, - program.Constant{Inner: core.AccountAddress("b")}, + program.Constant{Inner: internal.AccountAddress("a")}, + program.Constant{Inner: internal.NewMonetaryInt(0)}, + program.Constant{Inner: internal.NewMonetaryInt(1)}, + program.Constant{Inner: internal.AccountAddress("b")}, }, }, }) @@ -1480,3 +1480,232 @@ func TestSendWithArithmetic(t *testing.T) { }) }) } + +func TestSaveFromAccount(t *testing.T) { + t.Run("simple", func(t *testing.T) { + test(t, TestCase{ + Case: ` + save [EUR 10] from @alice + + send [EUR 20] ( + source = @alice + destination = @bob + )`, + Expected: CaseResult{ + Instructions: []byte{ + program.OP_APUSH, 01, 00, + program.OP_APUSH, 02, 00, + program.OP_SAVE, + program.OP_APUSH, 02, 00, + program.OP_APUSH, 03, 00, + program.OP_ASSET, + program.OP_APUSH, 04, 00, + program.OP_MONETARY_NEW, + program.OP_TAKE_ALL, + program.OP_APUSH, 03, 00, + program.OP_TAKE, + program.OP_APUSH, 05, 00, + program.OP_BUMP, + program.OP_REPAY, + program.OP_FUNDING_SUM, + program.OP_TAKE, + program.OP_APUSH, 06, 00, + program.OP_SEND, + program.OP_REPAY, + }, + Resources: []program.Resource{ + program.Constant{Inner: internal.Asset("EUR")}, + program.Monetary{ + Asset: 0, + Amount: internal.NewMonetaryInt(10), + }, + program.Constant{Inner: internal.AccountAddress("alice")}, + program.Monetary{ + Asset: 0, + Amount: internal.NewMonetaryInt(20), + }, + program.Constant{Inner: internal.NewMonetaryInt(0)}, + program.Constant{Inner: internal.NewMonetaryInt(1)}, + program.Constant{Inner: internal.AccountAddress("bob")}, + }, + }, + }) + }) + + t.Run("save all", func(t *testing.T) { + test(t, TestCase{ + Case: ` + save [EUR *] from @alice + + send [EUR 20] ( + source = @alice + destination = @bob + )`, + Expected: CaseResult{ + Instructions: []byte{ + program.OP_APUSH, 00, 00, + program.OP_APUSH, 01, 00, + program.OP_SAVE, + program.OP_APUSH, 01, 00, + program.OP_APUSH, 02, 00, + program.OP_ASSET, + program.OP_APUSH, 03, 00, + program.OP_MONETARY_NEW, + program.OP_TAKE_ALL, + program.OP_APUSH, 02, 00, + program.OP_TAKE, + program.OP_APUSH, 04, 00, + program.OP_BUMP, + program.OP_REPAY, + program.OP_FUNDING_SUM, + program.OP_TAKE, + program.OP_APUSH, 05, 00, + program.OP_SEND, + program.OP_REPAY, + }, + Resources: []program.Resource{ + program.Constant{Inner: internal.Asset("EUR")}, + program.Constant{Inner: internal.AccountAddress("alice")}, + program.Monetary{ + Asset: 0, + Amount: internal.NewMonetaryInt(20), + }, + program.Constant{Inner: internal.NewMonetaryInt(0)}, + program.Constant{Inner: internal.NewMonetaryInt(1)}, + program.Constant{Inner: internal.AccountAddress("bob")}, + }, + }, + }) + }) + + t.Run("with asset var", func(t *testing.T) { + test(t, TestCase{ + Case: ` + vars { + asset $ass + } + + save [$ass 10] from @alice + + send [$ass 20] ( + source = @alice + destination = @bob + )`, + Expected: CaseResult{ + Instructions: []byte{ + program.OP_APUSH, 01, 00, + program.OP_APUSH, 02, 00, + program.OP_SAVE, + program.OP_APUSH, 02, 00, + program.OP_APUSH, 03, 00, + program.OP_ASSET, + program.OP_APUSH, 04, 00, + program.OP_MONETARY_NEW, + program.OP_TAKE_ALL, + program.OP_APUSH, 03, 00, + program.OP_TAKE, + program.OP_APUSH, 05, 00, + program.OP_BUMP, + program.OP_REPAY, + program.OP_FUNDING_SUM, + program.OP_TAKE, + program.OP_APUSH, 06, 00, + program.OP_SEND, + program.OP_REPAY, + }, + Resources: []program.Resource{ + program.Variable{Typ: internal.TypeAsset, Name: "ass"}, + program.Monetary{ + Asset: 0, + Amount: internal.NewMonetaryInt(10), + }, + program.Constant{Inner: internal.AccountAddress("alice")}, + program.Monetary{ + Asset: 0, + Amount: internal.NewMonetaryInt(20), + }, + program.Constant{Inner: internal.NewMonetaryInt(0)}, + program.Constant{Inner: internal.NewMonetaryInt(1)}, + program.Constant{Inner: internal.AccountAddress("bob")}, + }, + }, + }) + }) + + t.Run("with monetary var", func(t *testing.T) { + test(t, TestCase{ + Case: ` + vars { + monetary $mon + } + + save $mon from @alice + + send [EUR 20] ( + source = @alice + destination = @bob + )`, + Expected: CaseResult{ + Instructions: []byte{ + program.OP_APUSH, 00, 00, + program.OP_APUSH, 01, 00, + program.OP_SAVE, + program.OP_APUSH, 01, 00, + program.OP_APUSH, 03, 00, + program.OP_ASSET, + program.OP_APUSH, 04, 00, + program.OP_MONETARY_NEW, + program.OP_TAKE_ALL, + program.OP_APUSH, 03, 00, + program.OP_TAKE, + program.OP_APUSH, 05, 00, + program.OP_BUMP, + program.OP_REPAY, + program.OP_FUNDING_SUM, + program.OP_TAKE, + program.OP_APUSH, 06, 00, + program.OP_SEND, + program.OP_REPAY, + }, + Resources: []program.Resource{ + program.Variable{Typ: internal.TypeMonetary, Name: "mon"}, + program.Constant{Inner: internal.AccountAddress("alice")}, + program.Constant{Inner: internal.Asset("EUR")}, + program.Monetary{ + Asset: 2, + Amount: internal.NewMonetaryInt(20), + }, + program.Constant{Inner: internal.NewMonetaryInt(0)}, + program.Constant{Inner: internal.NewMonetaryInt(1)}, + program.Constant{Inner: internal.AccountAddress("bob")}, + }, + }, + }) + }) + + t.Run("error wrong type monetary", func(t *testing.T) { + test(t, TestCase{ + Case: ` + save 30 from @alice + `, + Expected: CaseResult{ + Instructions: []byte{}, + Resources: []program.Resource{}, + Error: "save monetary from account: the first expression should be of type 'monetary' instead of 'number'", + }, + }) + }) + + t.Run("error wrong type account", func(t *testing.T) { + test(t, TestCase{ + Case: ` + save [EUR 30] from ALICE + `, + Expected: CaseResult{ + Instructions: []byte{}, + Resources: []program.Resource{}, + Error: "save monetary from account: the second expression should be of type 'account' instead of 'asset'", + }, + }) + }) +} diff --git a/pkg/machine/script/parser/NumScript.interp b/pkg/machine/script/parser/NumScript.interp index 965b4352d..12a17ac08 100644 --- a/pkg/machine/script/parser/NumScript.interp +++ b/pkg/machine/script/parser/NumScript.interp @@ -41,6 +41,7 @@ null 'remaining' 'kept' 'balance' +'save' null '%' null @@ -90,6 +91,7 @@ PORTION REMAINING KEPT BALANCE +SAVE NUMBER PERCENT VARIABLE_NAME @@ -123,4 +125,4 @@ script atn: -[4, 1, 46, 284, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 63, 8, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 3, 4, 70, 8, 4, 1, 4, 1, 4, 1, 4, 5, 4, 75, 8, 4, 10, 4, 12, 4, 78, 9, 4, 1, 5, 1, 5, 1, 5, 3, 5, 83, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 4, 6, 92, 8, 6, 11, 6, 12, 6, 93, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 4, 7, 107, 8, 7, 11, 7, 12, 7, 108, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 116, 8, 8, 1, 9, 1, 9, 1, 9, 3, 9, 121, 8, 9, 1, 10, 1, 10, 1, 10, 3, 10, 126, 8, 10, 1, 11, 1, 11, 3, 11, 130, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 4, 12, 137, 8, 12, 11, 12, 12, 12, 138, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 3, 14, 151, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 4, 15, 160, 8, 15, 11, 15, 12, 15, 161, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 168, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 192, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 212, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 217, 8, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 235, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 241, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 4, 21, 248, 8, 21, 11, 21, 12, 21, 249, 4, 21, 252, 8, 21, 11, 21, 12, 21, 253, 1, 21, 1, 21, 1, 21, 1, 22, 5, 22, 260, 8, 22, 10, 22, 12, 22, 263, 9, 22, 1, 22, 3, 22, 266, 8, 22, 1, 22, 1, 22, 1, 22, 5, 22, 271, 8, 22, 10, 22, 12, 22, 274, 9, 22, 1, 22, 5, 22, 277, 8, 22, 10, 22, 12, 22, 280, 9, 22, 1, 22, 1, 22, 1, 22, 0, 1, 8, 23, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 0, 2, 1, 0, 22, 23, 1, 0, 31, 36, 295, 0, 46, 1, 0, 0, 0, 2, 51, 1, 0, 0, 0, 4, 62, 1, 0, 0, 0, 6, 64, 1, 0, 0, 0, 8, 69, 1, 0, 0, 0, 10, 82, 1, 0, 0, 0, 12, 84, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, 16, 115, 1, 0, 0, 0, 18, 120, 1, 0, 0, 0, 20, 125, 1, 0, 0, 0, 22, 127, 1, 0, 0, 0, 24, 131, 1, 0, 0, 0, 26, 142, 1, 0, 0, 0, 28, 150, 1, 0, 0, 0, 30, 152, 1, 0, 0, 0, 32, 167, 1, 0, 0, 0, 34, 216, 1, 0, 0, 0, 36, 218, 1, 0, 0, 0, 38, 234, 1, 0, 0, 0, 40, 236, 1, 0, 0, 0, 42, 242, 1, 0, 0, 0, 44, 261, 1, 0, 0, 0, 46, 47, 5, 26, 0, 0, 47, 48, 3, 8, 4, 0, 48, 49, 5, 42, 0, 0, 49, 50, 5, 27, 0, 0, 50, 1, 1, 0, 0, 0, 51, 52, 5, 26, 0, 0, 52, 53, 3, 8, 4, 0, 53, 54, 5, 1, 0, 0, 54, 55, 5, 27, 0, 0, 55, 3, 1, 0, 0, 0, 56, 63, 5, 45, 0, 0, 57, 63, 5, 46, 0, 0, 58, 63, 5, 42, 0, 0, 59, 63, 5, 37, 0, 0, 60, 63, 5, 38, 0, 0, 61, 63, 3, 0, 0, 0, 62, 56, 1, 0, 0, 0, 62, 57, 1, 0, 0, 0, 62, 58, 1, 0, 0, 0, 62, 59, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 61, 1, 0, 0, 0, 63, 5, 1, 0, 0, 0, 64, 65, 5, 44, 0, 0, 65, 7, 1, 0, 0, 0, 66, 67, 6, 4, -1, 0, 67, 70, 3, 4, 2, 0, 68, 70, 3, 6, 3, 0, 69, 66, 1, 0, 0, 0, 69, 68, 1, 0, 0, 0, 70, 76, 1, 0, 0, 0, 71, 72, 10, 3, 0, 0, 72, 73, 7, 0, 0, 0, 73, 75, 3, 8, 4, 4, 74, 71, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 9, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 83, 5, 38, 0, 0, 80, 83, 3, 6, 3, 0, 81, 83, 5, 39, 0, 0, 82, 79, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 11, 1, 0, 0, 0, 84, 85, 5, 28, 0, 0, 85, 91, 5, 5, 0, 0, 86, 87, 5, 18, 0, 0, 87, 88, 3, 8, 4, 0, 88, 89, 3, 16, 8, 0, 89, 90, 5, 5, 0, 0, 90, 92, 1, 0, 0, 0, 91, 86, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 96, 5, 39, 0, 0, 96, 97, 3, 16, 8, 0, 97, 98, 5, 5, 0, 0, 98, 99, 5, 29, 0, 0, 99, 13, 1, 0, 0, 0, 100, 101, 5, 28, 0, 0, 101, 106, 5, 5, 0, 0, 102, 103, 3, 10, 5, 0, 103, 104, 3, 16, 8, 0, 104, 105, 5, 5, 0, 0, 105, 107, 1, 0, 0, 0, 106, 102, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 111, 5, 29, 0, 0, 111, 15, 1, 0, 0, 0, 112, 113, 5, 20, 0, 0, 113, 116, 3, 18, 9, 0, 114, 116, 5, 40, 0, 0, 115, 112, 1, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 17, 1, 0, 0, 0, 117, 121, 3, 8, 4, 0, 118, 121, 3, 12, 6, 0, 119, 121, 3, 14, 7, 0, 120, 117, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 119, 1, 0, 0, 0, 121, 19, 1, 0, 0, 0, 122, 123, 5, 2, 0, 0, 123, 126, 3, 8, 4, 0, 124, 126, 5, 3, 0, 0, 125, 122, 1, 0, 0, 0, 125, 124, 1, 0, 0, 0, 126, 21, 1, 0, 0, 0, 127, 129, 3, 8, 4, 0, 128, 130, 3, 20, 10, 0, 129, 128, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 23, 1, 0, 0, 0, 131, 132, 5, 28, 0, 0, 132, 136, 5, 5, 0, 0, 133, 134, 3, 28, 14, 0, 134, 135, 5, 5, 0, 0, 135, 137, 1, 0, 0, 0, 136, 133, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 141, 5, 29, 0, 0, 141, 25, 1, 0, 0, 0, 142, 143, 5, 18, 0, 0, 143, 144, 3, 8, 4, 0, 144, 145, 5, 17, 0, 0, 145, 146, 3, 28, 14, 0, 146, 27, 1, 0, 0, 0, 147, 151, 3, 22, 11, 0, 148, 151, 3, 26, 13, 0, 149, 151, 3, 24, 12, 0, 150, 147, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 150, 149, 1, 0, 0, 0, 151, 29, 1, 0, 0, 0, 152, 153, 5, 28, 0, 0, 153, 159, 5, 5, 0, 0, 154, 155, 3, 10, 5, 0, 155, 156, 5, 17, 0, 0, 156, 157, 3, 28, 14, 0, 157, 158, 5, 5, 0, 0, 158, 160, 1, 0, 0, 0, 159, 154, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 5, 29, 0, 0, 164, 31, 1, 0, 0, 0, 165, 168, 3, 28, 14, 0, 166, 168, 3, 30, 15, 0, 167, 165, 1, 0, 0, 0, 167, 166, 1, 0, 0, 0, 168, 33, 1, 0, 0, 0, 169, 170, 5, 13, 0, 0, 170, 217, 3, 8, 4, 0, 171, 172, 5, 11, 0, 0, 172, 173, 5, 24, 0, 0, 173, 174, 5, 37, 0, 0, 174, 175, 5, 4, 0, 0, 175, 176, 3, 8, 4, 0, 176, 177, 5, 25, 0, 0, 177, 217, 1, 0, 0, 0, 178, 179, 5, 12, 0, 0, 179, 180, 5, 24, 0, 0, 180, 181, 3, 8, 4, 0, 181, 182, 5, 4, 0, 0, 182, 183, 5, 37, 0, 0, 183, 184, 5, 4, 0, 0, 184, 185, 3, 8, 4, 0, 185, 186, 5, 25, 0, 0, 186, 217, 1, 0, 0, 0, 187, 217, 5, 14, 0, 0, 188, 191, 5, 15, 0, 0, 189, 192, 3, 8, 4, 0, 190, 192, 3, 2, 1, 0, 191, 189, 1, 0, 0, 0, 191, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 5, 24, 0, 0, 194, 211, 5, 5, 0, 0, 195, 196, 5, 16, 0, 0, 196, 197, 5, 30, 0, 0, 197, 198, 3, 32, 16, 0, 198, 199, 5, 5, 0, 0, 199, 200, 5, 19, 0, 0, 200, 201, 5, 30, 0, 0, 201, 202, 3, 18, 9, 0, 202, 212, 1, 0, 0, 0, 203, 204, 5, 19, 0, 0, 204, 205, 5, 30, 0, 0, 205, 206, 3, 18, 9, 0, 206, 207, 5, 5, 0, 0, 207, 208, 5, 16, 0, 0, 208, 209, 5, 30, 0, 0, 209, 210, 3, 32, 16, 0, 210, 212, 1, 0, 0, 0, 211, 195, 1, 0, 0, 0, 211, 203, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 214, 5, 5, 0, 0, 214, 215, 5, 25, 0, 0, 215, 217, 1, 0, 0, 0, 216, 169, 1, 0, 0, 0, 216, 171, 1, 0, 0, 0, 216, 178, 1, 0, 0, 0, 216, 187, 1, 0, 0, 0, 216, 188, 1, 0, 0, 0, 217, 35, 1, 0, 0, 0, 218, 219, 7, 1, 0, 0, 219, 37, 1, 0, 0, 0, 220, 221, 5, 10, 0, 0, 221, 222, 5, 24, 0, 0, 222, 223, 3, 8, 4, 0, 223, 224, 5, 4, 0, 0, 224, 225, 5, 37, 0, 0, 225, 226, 5, 25, 0, 0, 226, 235, 1, 0, 0, 0, 227, 228, 5, 41, 0, 0, 228, 229, 5, 24, 0, 0, 229, 230, 3, 8, 4, 0, 230, 231, 5, 4, 0, 0, 231, 232, 3, 8, 4, 0, 232, 233, 5, 25, 0, 0, 233, 235, 1, 0, 0, 0, 234, 220, 1, 0, 0, 0, 234, 227, 1, 0, 0, 0, 235, 39, 1, 0, 0, 0, 236, 237, 3, 36, 18, 0, 237, 240, 3, 6, 3, 0, 238, 239, 5, 30, 0, 0, 239, 241, 3, 38, 19, 0, 240, 238, 1, 0, 0, 0, 240, 241, 1, 0, 0, 0, 241, 41, 1, 0, 0, 0, 242, 243, 5, 9, 0, 0, 243, 244, 5, 28, 0, 0, 244, 251, 5, 5, 0, 0, 245, 247, 3, 40, 20, 0, 246, 248, 5, 5, 0, 0, 247, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 252, 1, 0, 0, 0, 251, 245, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 256, 5, 29, 0, 0, 256, 257, 5, 5, 0, 0, 257, 43, 1, 0, 0, 0, 258, 260, 5, 5, 0, 0, 259, 258, 1, 0, 0, 0, 260, 263, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 265, 1, 0, 0, 0, 263, 261, 1, 0, 0, 0, 264, 266, 3, 42, 21, 0, 265, 264, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 272, 3, 34, 17, 0, 268, 269, 5, 5, 0, 0, 269, 271, 3, 34, 17, 0, 270, 268, 1, 0, 0, 0, 271, 274, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 272, 273, 1, 0, 0, 0, 273, 278, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 275, 277, 5, 5, 0, 0, 276, 275, 1, 0, 0, 0, 277, 280, 1, 0, 0, 0, 278, 276, 1, 0, 0, 0, 278, 279, 1, 0, 0, 0, 279, 281, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 281, 282, 5, 0, 0, 1, 282, 45, 1, 0, 0, 0, 25, 62, 69, 76, 82, 93, 108, 115, 120, 125, 129, 138, 150, 161, 167, 191, 211, 216, 234, 240, 249, 253, 261, 265, 272, 278] +[4, 1, 47, 292, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 63, 8, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 3, 4, 70, 8, 4, 1, 4, 1, 4, 1, 4, 5, 4, 75, 8, 4, 10, 4, 12, 4, 78, 9, 4, 1, 5, 1, 5, 1, 5, 3, 5, 83, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 4, 6, 92, 8, 6, 11, 6, 12, 6, 93, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 4, 7, 107, 8, 7, 11, 7, 12, 7, 108, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 116, 8, 8, 1, 9, 1, 9, 1, 9, 3, 9, 121, 8, 9, 1, 10, 1, 10, 1, 10, 3, 10, 126, 8, 10, 1, 11, 1, 11, 3, 11, 130, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 4, 12, 137, 8, 12, 11, 12, 12, 12, 138, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 3, 14, 151, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 4, 15, 160, 8, 15, 11, 15, 12, 15, 161, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 168, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 175, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 200, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 220, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 225, 8, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 243, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 249, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 4, 21, 256, 8, 21, 11, 21, 12, 21, 257, 4, 21, 260, 8, 21, 11, 21, 12, 21, 261, 1, 21, 1, 21, 1, 21, 1, 22, 5, 22, 268, 8, 22, 10, 22, 12, 22, 271, 9, 22, 1, 22, 3, 22, 274, 8, 22, 1, 22, 1, 22, 1, 22, 5, 22, 279, 8, 22, 10, 22, 12, 22, 282, 9, 22, 1, 22, 5, 22, 285, 8, 22, 10, 22, 12, 22, 288, 9, 22, 1, 22, 1, 22, 1, 22, 0, 1, 8, 23, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 0, 2, 1, 0, 22, 23, 1, 0, 31, 36, 305, 0, 46, 1, 0, 0, 0, 2, 51, 1, 0, 0, 0, 4, 62, 1, 0, 0, 0, 6, 64, 1, 0, 0, 0, 8, 69, 1, 0, 0, 0, 10, 82, 1, 0, 0, 0, 12, 84, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, 16, 115, 1, 0, 0, 0, 18, 120, 1, 0, 0, 0, 20, 125, 1, 0, 0, 0, 22, 127, 1, 0, 0, 0, 24, 131, 1, 0, 0, 0, 26, 142, 1, 0, 0, 0, 28, 150, 1, 0, 0, 0, 30, 152, 1, 0, 0, 0, 32, 167, 1, 0, 0, 0, 34, 224, 1, 0, 0, 0, 36, 226, 1, 0, 0, 0, 38, 242, 1, 0, 0, 0, 40, 244, 1, 0, 0, 0, 42, 250, 1, 0, 0, 0, 44, 269, 1, 0, 0, 0, 46, 47, 5, 26, 0, 0, 47, 48, 3, 8, 4, 0, 48, 49, 5, 43, 0, 0, 49, 50, 5, 27, 0, 0, 50, 1, 1, 0, 0, 0, 51, 52, 5, 26, 0, 0, 52, 53, 3, 8, 4, 0, 53, 54, 5, 1, 0, 0, 54, 55, 5, 27, 0, 0, 55, 3, 1, 0, 0, 0, 56, 63, 5, 46, 0, 0, 57, 63, 5, 47, 0, 0, 58, 63, 5, 43, 0, 0, 59, 63, 5, 37, 0, 0, 60, 63, 5, 38, 0, 0, 61, 63, 3, 0, 0, 0, 62, 56, 1, 0, 0, 0, 62, 57, 1, 0, 0, 0, 62, 58, 1, 0, 0, 0, 62, 59, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 61, 1, 0, 0, 0, 63, 5, 1, 0, 0, 0, 64, 65, 5, 45, 0, 0, 65, 7, 1, 0, 0, 0, 66, 67, 6, 4, -1, 0, 67, 70, 3, 4, 2, 0, 68, 70, 3, 6, 3, 0, 69, 66, 1, 0, 0, 0, 69, 68, 1, 0, 0, 0, 70, 76, 1, 0, 0, 0, 71, 72, 10, 3, 0, 0, 72, 73, 7, 0, 0, 0, 73, 75, 3, 8, 4, 4, 74, 71, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 9, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 83, 5, 38, 0, 0, 80, 83, 3, 6, 3, 0, 81, 83, 5, 39, 0, 0, 82, 79, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 11, 1, 0, 0, 0, 84, 85, 5, 28, 0, 0, 85, 91, 5, 5, 0, 0, 86, 87, 5, 18, 0, 0, 87, 88, 3, 8, 4, 0, 88, 89, 3, 16, 8, 0, 89, 90, 5, 5, 0, 0, 90, 92, 1, 0, 0, 0, 91, 86, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 96, 5, 39, 0, 0, 96, 97, 3, 16, 8, 0, 97, 98, 5, 5, 0, 0, 98, 99, 5, 29, 0, 0, 99, 13, 1, 0, 0, 0, 100, 101, 5, 28, 0, 0, 101, 106, 5, 5, 0, 0, 102, 103, 3, 10, 5, 0, 103, 104, 3, 16, 8, 0, 104, 105, 5, 5, 0, 0, 105, 107, 1, 0, 0, 0, 106, 102, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 111, 5, 29, 0, 0, 111, 15, 1, 0, 0, 0, 112, 113, 5, 20, 0, 0, 113, 116, 3, 18, 9, 0, 114, 116, 5, 40, 0, 0, 115, 112, 1, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 17, 1, 0, 0, 0, 117, 121, 3, 8, 4, 0, 118, 121, 3, 12, 6, 0, 119, 121, 3, 14, 7, 0, 120, 117, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 119, 1, 0, 0, 0, 121, 19, 1, 0, 0, 0, 122, 123, 5, 2, 0, 0, 123, 126, 3, 8, 4, 0, 124, 126, 5, 3, 0, 0, 125, 122, 1, 0, 0, 0, 125, 124, 1, 0, 0, 0, 126, 21, 1, 0, 0, 0, 127, 129, 3, 8, 4, 0, 128, 130, 3, 20, 10, 0, 129, 128, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 23, 1, 0, 0, 0, 131, 132, 5, 28, 0, 0, 132, 136, 5, 5, 0, 0, 133, 134, 3, 28, 14, 0, 134, 135, 5, 5, 0, 0, 135, 137, 1, 0, 0, 0, 136, 133, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 141, 5, 29, 0, 0, 141, 25, 1, 0, 0, 0, 142, 143, 5, 18, 0, 0, 143, 144, 3, 8, 4, 0, 144, 145, 5, 17, 0, 0, 145, 146, 3, 28, 14, 0, 146, 27, 1, 0, 0, 0, 147, 151, 3, 22, 11, 0, 148, 151, 3, 26, 13, 0, 149, 151, 3, 24, 12, 0, 150, 147, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 150, 149, 1, 0, 0, 0, 151, 29, 1, 0, 0, 0, 152, 153, 5, 28, 0, 0, 153, 159, 5, 5, 0, 0, 154, 155, 3, 10, 5, 0, 155, 156, 5, 17, 0, 0, 156, 157, 3, 28, 14, 0, 157, 158, 5, 5, 0, 0, 158, 160, 1, 0, 0, 0, 159, 154, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 5, 29, 0, 0, 164, 31, 1, 0, 0, 0, 165, 168, 3, 28, 14, 0, 166, 168, 3, 30, 15, 0, 167, 165, 1, 0, 0, 0, 167, 166, 1, 0, 0, 0, 168, 33, 1, 0, 0, 0, 169, 170, 5, 13, 0, 0, 170, 225, 3, 8, 4, 0, 171, 174, 5, 42, 0, 0, 172, 175, 3, 8, 4, 0, 173, 175, 3, 2, 1, 0, 174, 172, 1, 0, 0, 0, 174, 173, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 5, 17, 0, 0, 177, 178, 3, 8, 4, 0, 178, 225, 1, 0, 0, 0, 179, 180, 5, 11, 0, 0, 180, 181, 5, 24, 0, 0, 181, 182, 5, 37, 0, 0, 182, 183, 5, 4, 0, 0, 183, 184, 3, 8, 4, 0, 184, 185, 5, 25, 0, 0, 185, 225, 1, 0, 0, 0, 186, 187, 5, 12, 0, 0, 187, 188, 5, 24, 0, 0, 188, 189, 3, 8, 4, 0, 189, 190, 5, 4, 0, 0, 190, 191, 5, 37, 0, 0, 191, 192, 5, 4, 0, 0, 192, 193, 3, 8, 4, 0, 193, 194, 5, 25, 0, 0, 194, 225, 1, 0, 0, 0, 195, 225, 5, 14, 0, 0, 196, 199, 5, 15, 0, 0, 197, 200, 3, 8, 4, 0, 198, 200, 3, 2, 1, 0, 199, 197, 1, 0, 0, 0, 199, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 24, 0, 0, 202, 219, 5, 5, 0, 0, 203, 204, 5, 16, 0, 0, 204, 205, 5, 30, 0, 0, 205, 206, 3, 32, 16, 0, 206, 207, 5, 5, 0, 0, 207, 208, 5, 19, 0, 0, 208, 209, 5, 30, 0, 0, 209, 210, 3, 18, 9, 0, 210, 220, 1, 0, 0, 0, 211, 212, 5, 19, 0, 0, 212, 213, 5, 30, 0, 0, 213, 214, 3, 18, 9, 0, 214, 215, 5, 5, 0, 0, 215, 216, 5, 16, 0, 0, 216, 217, 5, 30, 0, 0, 217, 218, 3, 32, 16, 0, 218, 220, 1, 0, 0, 0, 219, 203, 1, 0, 0, 0, 219, 211, 1, 0, 0, 0, 220, 221, 1, 0, 0, 0, 221, 222, 5, 5, 0, 0, 222, 223, 5, 25, 0, 0, 223, 225, 1, 0, 0, 0, 224, 169, 1, 0, 0, 0, 224, 171, 1, 0, 0, 0, 224, 179, 1, 0, 0, 0, 224, 186, 1, 0, 0, 0, 224, 195, 1, 0, 0, 0, 224, 196, 1, 0, 0, 0, 225, 35, 1, 0, 0, 0, 226, 227, 7, 1, 0, 0, 227, 37, 1, 0, 0, 0, 228, 229, 5, 10, 0, 0, 229, 230, 5, 24, 0, 0, 230, 231, 3, 8, 4, 0, 231, 232, 5, 4, 0, 0, 232, 233, 5, 37, 0, 0, 233, 234, 5, 25, 0, 0, 234, 243, 1, 0, 0, 0, 235, 236, 5, 41, 0, 0, 236, 237, 5, 24, 0, 0, 237, 238, 3, 8, 4, 0, 238, 239, 5, 4, 0, 0, 239, 240, 3, 8, 4, 0, 240, 241, 5, 25, 0, 0, 241, 243, 1, 0, 0, 0, 242, 228, 1, 0, 0, 0, 242, 235, 1, 0, 0, 0, 243, 39, 1, 0, 0, 0, 244, 245, 3, 36, 18, 0, 245, 248, 3, 6, 3, 0, 246, 247, 5, 30, 0, 0, 247, 249, 3, 38, 19, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 41, 1, 0, 0, 0, 250, 251, 5, 9, 0, 0, 251, 252, 5, 28, 0, 0, 252, 259, 5, 5, 0, 0, 253, 255, 3, 40, 20, 0, 254, 256, 5, 5, 0, 0, 255, 254, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 260, 1, 0, 0, 0, 259, 253, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 263, 1, 0, 0, 0, 263, 264, 5, 29, 0, 0, 264, 265, 5, 5, 0, 0, 265, 43, 1, 0, 0, 0, 266, 268, 5, 5, 0, 0, 267, 266, 1, 0, 0, 0, 268, 271, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 273, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, 272, 274, 3, 42, 21, 0, 273, 272, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 275, 1, 0, 0, 0, 275, 280, 3, 34, 17, 0, 276, 277, 5, 5, 0, 0, 277, 279, 3, 34, 17, 0, 278, 276, 1, 0, 0, 0, 279, 282, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 286, 1, 0, 0, 0, 282, 280, 1, 0, 0, 0, 283, 285, 5, 5, 0, 0, 284, 283, 1, 0, 0, 0, 285, 288, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 289, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 289, 290, 5, 0, 0, 1, 290, 45, 1, 0, 0, 0, 26, 62, 69, 76, 82, 93, 108, 115, 120, 125, 129, 138, 150, 161, 167, 174, 199, 219, 224, 242, 248, 257, 261, 269, 273, 280, 286] diff --git a/pkg/machine/script/parser/NumScript.tokens b/pkg/machine/script/parser/NumScript.tokens index c469c7c12..cb7dd35a2 100644 --- a/pkg/machine/script/parser/NumScript.tokens +++ b/pkg/machine/script/parser/NumScript.tokens @@ -39,11 +39,12 @@ PORTION=38 REMAINING=39 KEPT=40 BALANCE=41 -NUMBER=42 -PERCENT=43 -VARIABLE_NAME=44 -ACCOUNT=45 -ASSET=46 +SAVE=42 +NUMBER=43 +PERCENT=44 +VARIABLE_NAME=45 +ACCOUNT=46 +ASSET=47 '*'=1 'allowing overdraft up to'=2 'allowing unbounded overdraft'=3 @@ -79,4 +80,5 @@ ASSET=46 'remaining'=39 'kept'=40 'balance'=41 -'%'=43 +'save'=42 +'%'=44 diff --git a/pkg/machine/script/parser/NumScriptLexer.interp b/pkg/machine/script/parser/NumScriptLexer.interp index 831e270c0..531a9b456 100644 --- a/pkg/machine/script/parser/NumScriptLexer.interp +++ b/pkg/machine/script/parser/NumScriptLexer.interp @@ -41,6 +41,7 @@ null 'remaining' 'kept' 'balance' +'save' null '%' null @@ -90,6 +91,7 @@ PORTION REMAINING KEPT BALANCE +SAVE NUMBER PERCENT VARIABLE_NAME @@ -138,6 +140,7 @@ PORTION REMAINING KEPT BALANCE +SAVE NUMBER PERCENT VARIABLE_NAME @@ -152,4 +155,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 46, 450, 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, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 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, 4, 4, 153, 8, 4, 11, 4, 12, 4, 154, 1, 5, 4, 5, 158, 8, 5, 11, 5, 12, 5, 159, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 169, 8, 6, 10, 6, 12, 6, 172, 9, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 183, 8, 7, 10, 7, 12, 7, 186, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 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, 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, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 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, 5, 36, 352, 8, 36, 10, 36, 12, 36, 355, 9, 36, 1, 36, 1, 36, 1, 37, 4, 37, 360, 8, 37, 11, 37, 12, 37, 361, 1, 37, 3, 37, 365, 8, 37, 1, 37, 1, 37, 3, 37, 369, 8, 37, 1, 37, 4, 37, 372, 8, 37, 11, 37, 12, 37, 373, 1, 37, 4, 37, 377, 8, 37, 11, 37, 12, 37, 378, 1, 37, 1, 37, 4, 37, 383, 8, 37, 11, 37, 12, 37, 384, 3, 37, 387, 8, 37, 1, 37, 3, 37, 390, 8, 37, 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, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 4, 41, 416, 8, 41, 11, 41, 12, 41, 417, 1, 42, 1, 42, 1, 43, 1, 43, 4, 43, 424, 8, 43, 11, 43, 12, 43, 425, 1, 43, 5, 43, 429, 8, 43, 10, 43, 12, 43, 432, 9, 43, 1, 44, 1, 44, 4, 44, 436, 8, 44, 11, 44, 12, 44, 437, 1, 44, 5, 44, 441, 8, 44, 10, 44, 12, 44, 444, 9, 44, 1, 45, 4, 45, 447, 8, 45, 11, 45, 12, 45, 448, 2, 170, 184, 0, 46, 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, 1, 0, 10, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 6, 0, 32, 32, 45, 45, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 1, 0, 32, 32, 2, 0, 95, 95, 97, 122, 3, 0, 48, 57, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 58, 65, 90, 95, 95, 97, 122, 2, 0, 47, 57, 65, 90, 469, 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, 1, 93, 1, 0, 0, 0, 3, 95, 1, 0, 0, 0, 5, 120, 1, 0, 0, 0, 7, 149, 1, 0, 0, 0, 9, 152, 1, 0, 0, 0, 11, 157, 1, 0, 0, 0, 13, 163, 1, 0, 0, 0, 15, 178, 1, 0, 0, 0, 17, 191, 1, 0, 0, 0, 19, 196, 1, 0, 0, 0, 21, 201, 1, 0, 0, 0, 23, 213, 1, 0, 0, 0, 25, 230, 1, 0, 0, 0, 27, 236, 1, 0, 0, 0, 29, 241, 1, 0, 0, 0, 31, 246, 1, 0, 0, 0, 33, 253, 1, 0, 0, 0, 35, 258, 1, 0, 0, 0, 37, 262, 1, 0, 0, 0, 39, 274, 1, 0, 0, 0, 41, 277, 1, 0, 0, 0, 43, 286, 1, 0, 0, 0, 45, 288, 1, 0, 0, 0, 47, 290, 1, 0, 0, 0, 49, 292, 1, 0, 0, 0, 51, 294, 1, 0, 0, 0, 53, 296, 1, 0, 0, 0, 55, 298, 1, 0, 0, 0, 57, 300, 1, 0, 0, 0, 59, 302, 1, 0, 0, 0, 61, 304, 1, 0, 0, 0, 63, 312, 1, 0, 0, 0, 65, 318, 1, 0, 0, 0, 67, 325, 1, 0, 0, 0, 69, 334, 1, 0, 0, 0, 71, 342, 1, 0, 0, 0, 73, 349, 1, 0, 0, 0, 75, 389, 1, 0, 0, 0, 77, 391, 1, 0, 0, 0, 79, 401, 1, 0, 0, 0, 81, 406, 1, 0, 0, 0, 83, 415, 1, 0, 0, 0, 85, 419, 1, 0, 0, 0, 87, 421, 1, 0, 0, 0, 89, 433, 1, 0, 0, 0, 91, 446, 1, 0, 0, 0, 93, 94, 5, 42, 0, 0, 94, 2, 1, 0, 0, 0, 95, 96, 5, 97, 0, 0, 96, 97, 5, 108, 0, 0, 97, 98, 5, 108, 0, 0, 98, 99, 5, 111, 0, 0, 99, 100, 5, 119, 0, 0, 100, 101, 5, 105, 0, 0, 101, 102, 5, 110, 0, 0, 102, 103, 5, 103, 0, 0, 103, 104, 5, 32, 0, 0, 104, 105, 5, 111, 0, 0, 105, 106, 5, 118, 0, 0, 106, 107, 5, 101, 0, 0, 107, 108, 5, 114, 0, 0, 108, 109, 5, 100, 0, 0, 109, 110, 5, 114, 0, 0, 110, 111, 5, 97, 0, 0, 111, 112, 5, 102, 0, 0, 112, 113, 5, 116, 0, 0, 113, 114, 5, 32, 0, 0, 114, 115, 5, 117, 0, 0, 115, 116, 5, 112, 0, 0, 116, 117, 5, 32, 0, 0, 117, 118, 5, 116, 0, 0, 118, 119, 5, 111, 0, 0, 119, 4, 1, 0, 0, 0, 120, 121, 5, 97, 0, 0, 121, 122, 5, 108, 0, 0, 122, 123, 5, 108, 0, 0, 123, 124, 5, 111, 0, 0, 124, 125, 5, 119, 0, 0, 125, 126, 5, 105, 0, 0, 126, 127, 5, 110, 0, 0, 127, 128, 5, 103, 0, 0, 128, 129, 5, 32, 0, 0, 129, 130, 5, 117, 0, 0, 130, 131, 5, 110, 0, 0, 131, 132, 5, 98, 0, 0, 132, 133, 5, 111, 0, 0, 133, 134, 5, 117, 0, 0, 134, 135, 5, 110, 0, 0, 135, 136, 5, 100, 0, 0, 136, 137, 5, 101, 0, 0, 137, 138, 5, 100, 0, 0, 138, 139, 5, 32, 0, 0, 139, 140, 5, 111, 0, 0, 140, 141, 5, 118, 0, 0, 141, 142, 5, 101, 0, 0, 142, 143, 5, 114, 0, 0, 143, 144, 5, 100, 0, 0, 144, 145, 5, 114, 0, 0, 145, 146, 5, 97, 0, 0, 146, 147, 5, 102, 0, 0, 147, 148, 5, 116, 0, 0, 148, 6, 1, 0, 0, 0, 149, 150, 5, 44, 0, 0, 150, 8, 1, 0, 0, 0, 151, 153, 7, 0, 0, 0, 152, 151, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 152, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, 155, 10, 1, 0, 0, 0, 156, 158, 7, 1, 0, 0, 157, 156, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 162, 6, 5, 0, 0, 162, 12, 1, 0, 0, 0, 163, 164, 5, 47, 0, 0, 164, 165, 5, 42, 0, 0, 165, 170, 1, 0, 0, 0, 166, 169, 3, 13, 6, 0, 167, 169, 9, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, 167, 1, 0, 0, 0, 169, 172, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 173, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 173, 174, 5, 42, 0, 0, 174, 175, 5, 47, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 6, 6, 0, 0, 177, 14, 1, 0, 0, 0, 178, 179, 5, 47, 0, 0, 179, 180, 5, 47, 0, 0, 180, 184, 1, 0, 0, 0, 181, 183, 9, 0, 0, 0, 182, 181, 1, 0, 0, 0, 183, 186, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 184, 182, 1, 0, 0, 0, 185, 187, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 187, 188, 3, 9, 4, 0, 188, 189, 1, 0, 0, 0, 189, 190, 6, 7, 0, 0, 190, 16, 1, 0, 0, 0, 191, 192, 5, 118, 0, 0, 192, 193, 5, 97, 0, 0, 193, 194, 5, 114, 0, 0, 194, 195, 5, 115, 0, 0, 195, 18, 1, 0, 0, 0, 196, 197, 5, 109, 0, 0, 197, 198, 5, 101, 0, 0, 198, 199, 5, 116, 0, 0, 199, 200, 5, 97, 0, 0, 200, 20, 1, 0, 0, 0, 201, 202, 5, 115, 0, 0, 202, 203, 5, 101, 0, 0, 203, 204, 5, 116, 0, 0, 204, 205, 5, 95, 0, 0, 205, 206, 5, 116, 0, 0, 206, 207, 5, 120, 0, 0, 207, 208, 5, 95, 0, 0, 208, 209, 5, 109, 0, 0, 209, 210, 5, 101, 0, 0, 210, 211, 5, 116, 0, 0, 211, 212, 5, 97, 0, 0, 212, 22, 1, 0, 0, 0, 213, 214, 5, 115, 0, 0, 214, 215, 5, 101, 0, 0, 215, 216, 5, 116, 0, 0, 216, 217, 5, 95, 0, 0, 217, 218, 5, 97, 0, 0, 218, 219, 5, 99, 0, 0, 219, 220, 5, 99, 0, 0, 220, 221, 5, 111, 0, 0, 221, 222, 5, 117, 0, 0, 222, 223, 5, 110, 0, 0, 223, 224, 5, 116, 0, 0, 224, 225, 5, 95, 0, 0, 225, 226, 5, 109, 0, 0, 226, 227, 5, 101, 0, 0, 227, 228, 5, 116, 0, 0, 228, 229, 5, 97, 0, 0, 229, 24, 1, 0, 0, 0, 230, 231, 5, 112, 0, 0, 231, 232, 5, 114, 0, 0, 232, 233, 5, 105, 0, 0, 233, 234, 5, 110, 0, 0, 234, 235, 5, 116, 0, 0, 235, 26, 1, 0, 0, 0, 236, 237, 5, 102, 0, 0, 237, 238, 5, 97, 0, 0, 238, 239, 5, 105, 0, 0, 239, 240, 5, 108, 0, 0, 240, 28, 1, 0, 0, 0, 241, 242, 5, 115, 0, 0, 242, 243, 5, 101, 0, 0, 243, 244, 5, 110, 0, 0, 244, 245, 5, 100, 0, 0, 245, 30, 1, 0, 0, 0, 246, 247, 5, 115, 0, 0, 247, 248, 5, 111, 0, 0, 248, 249, 5, 117, 0, 0, 249, 250, 5, 114, 0, 0, 250, 251, 5, 99, 0, 0, 251, 252, 5, 101, 0, 0, 252, 32, 1, 0, 0, 0, 253, 254, 5, 102, 0, 0, 254, 255, 5, 114, 0, 0, 255, 256, 5, 111, 0, 0, 256, 257, 5, 109, 0, 0, 257, 34, 1, 0, 0, 0, 258, 259, 5, 109, 0, 0, 259, 260, 5, 97, 0, 0, 260, 261, 5, 120, 0, 0, 261, 36, 1, 0, 0, 0, 262, 263, 5, 100, 0, 0, 263, 264, 5, 101, 0, 0, 264, 265, 5, 115, 0, 0, 265, 266, 5, 116, 0, 0, 266, 267, 5, 105, 0, 0, 267, 268, 5, 110, 0, 0, 268, 269, 5, 97, 0, 0, 269, 270, 5, 116, 0, 0, 270, 271, 5, 105, 0, 0, 271, 272, 5, 111, 0, 0, 272, 273, 5, 110, 0, 0, 273, 38, 1, 0, 0, 0, 274, 275, 5, 116, 0, 0, 275, 276, 5, 111, 0, 0, 276, 40, 1, 0, 0, 0, 277, 278, 5, 97, 0, 0, 278, 279, 5, 108, 0, 0, 279, 280, 5, 108, 0, 0, 280, 281, 5, 111, 0, 0, 281, 282, 5, 99, 0, 0, 282, 283, 5, 97, 0, 0, 283, 284, 5, 116, 0, 0, 284, 285, 5, 101, 0, 0, 285, 42, 1, 0, 0, 0, 286, 287, 5, 43, 0, 0, 287, 44, 1, 0, 0, 0, 288, 289, 5, 45, 0, 0, 289, 46, 1, 0, 0, 0, 290, 291, 5, 40, 0, 0, 291, 48, 1, 0, 0, 0, 292, 293, 5, 41, 0, 0, 293, 50, 1, 0, 0, 0, 294, 295, 5, 91, 0, 0, 295, 52, 1, 0, 0, 0, 296, 297, 5, 93, 0, 0, 297, 54, 1, 0, 0, 0, 298, 299, 5, 123, 0, 0, 299, 56, 1, 0, 0, 0, 300, 301, 5, 125, 0, 0, 301, 58, 1, 0, 0, 0, 302, 303, 5, 61, 0, 0, 303, 60, 1, 0, 0, 0, 304, 305, 5, 97, 0, 0, 305, 306, 5, 99, 0, 0, 306, 307, 5, 99, 0, 0, 307, 308, 5, 111, 0, 0, 308, 309, 5, 117, 0, 0, 309, 310, 5, 110, 0, 0, 310, 311, 5, 116, 0, 0, 311, 62, 1, 0, 0, 0, 312, 313, 5, 97, 0, 0, 313, 314, 5, 115, 0, 0, 314, 315, 5, 115, 0, 0, 315, 316, 5, 101, 0, 0, 316, 317, 5, 116, 0, 0, 317, 64, 1, 0, 0, 0, 318, 319, 5, 110, 0, 0, 319, 320, 5, 117, 0, 0, 320, 321, 5, 109, 0, 0, 321, 322, 5, 98, 0, 0, 322, 323, 5, 101, 0, 0, 323, 324, 5, 114, 0, 0, 324, 66, 1, 0, 0, 0, 325, 326, 5, 109, 0, 0, 326, 327, 5, 111, 0, 0, 327, 328, 5, 110, 0, 0, 328, 329, 5, 101, 0, 0, 329, 330, 5, 116, 0, 0, 330, 331, 5, 97, 0, 0, 331, 332, 5, 114, 0, 0, 332, 333, 5, 121, 0, 0, 333, 68, 1, 0, 0, 0, 334, 335, 5, 112, 0, 0, 335, 336, 5, 111, 0, 0, 336, 337, 5, 114, 0, 0, 337, 338, 5, 116, 0, 0, 338, 339, 5, 105, 0, 0, 339, 340, 5, 111, 0, 0, 340, 341, 5, 110, 0, 0, 341, 70, 1, 0, 0, 0, 342, 343, 5, 115, 0, 0, 343, 344, 5, 116, 0, 0, 344, 345, 5, 114, 0, 0, 345, 346, 5, 105, 0, 0, 346, 347, 5, 110, 0, 0, 347, 348, 5, 103, 0, 0, 348, 72, 1, 0, 0, 0, 349, 353, 5, 34, 0, 0, 350, 352, 7, 2, 0, 0, 351, 350, 1, 0, 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 356, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 356, 357, 5, 34, 0, 0, 357, 74, 1, 0, 0, 0, 358, 360, 7, 3, 0, 0, 359, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, 0, 363, 365, 7, 4, 0, 0, 364, 363, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 368, 5, 47, 0, 0, 367, 369, 7, 4, 0, 0, 368, 367, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 371, 1, 0, 0, 0, 370, 372, 7, 3, 0, 0, 371, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 373, 374, 1, 0, 0, 0, 374, 390, 1, 0, 0, 0, 375, 377, 7, 3, 0, 0, 376, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 386, 1, 0, 0, 0, 380, 382, 5, 46, 0, 0, 381, 383, 7, 3, 0, 0, 382, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 382, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 387, 1, 0, 0, 0, 386, 380, 1, 0, 0, 0, 386, 387, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 390, 5, 37, 0, 0, 389, 359, 1, 0, 0, 0, 389, 376, 1, 0, 0, 0, 390, 76, 1, 0, 0, 0, 391, 392, 5, 114, 0, 0, 392, 393, 5, 101, 0, 0, 393, 394, 5, 109, 0, 0, 394, 395, 5, 97, 0, 0, 395, 396, 5, 105, 0, 0, 396, 397, 5, 110, 0, 0, 397, 398, 5, 105, 0, 0, 398, 399, 5, 110, 0, 0, 399, 400, 5, 103, 0, 0, 400, 78, 1, 0, 0, 0, 401, 402, 5, 107, 0, 0, 402, 403, 5, 101, 0, 0, 403, 404, 5, 112, 0, 0, 404, 405, 5, 116, 0, 0, 405, 80, 1, 0, 0, 0, 406, 407, 5, 98, 0, 0, 407, 408, 5, 97, 0, 0, 408, 409, 5, 108, 0, 0, 409, 410, 5, 97, 0, 0, 410, 411, 5, 110, 0, 0, 411, 412, 5, 99, 0, 0, 412, 413, 5, 101, 0, 0, 413, 82, 1, 0, 0, 0, 414, 416, 7, 3, 0, 0, 415, 414, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 84, 1, 0, 0, 0, 419, 420, 5, 37, 0, 0, 420, 86, 1, 0, 0, 0, 421, 423, 5, 36, 0, 0, 422, 424, 7, 5, 0, 0, 423, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 423, 1, 0, 0, 0, 425, 426, 1, 0, 0, 0, 426, 430, 1, 0, 0, 0, 427, 429, 7, 6, 0, 0, 428, 427, 1, 0, 0, 0, 429, 432, 1, 0, 0, 0, 430, 428, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 88, 1, 0, 0, 0, 432, 430, 1, 0, 0, 0, 433, 435, 5, 64, 0, 0, 434, 436, 7, 7, 0, 0, 435, 434, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 435, 1, 0, 0, 0, 437, 438, 1, 0, 0, 0, 438, 442, 1, 0, 0, 0, 439, 441, 7, 8, 0, 0, 440, 439, 1, 0, 0, 0, 441, 444, 1, 0, 0, 0, 442, 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 90, 1, 0, 0, 0, 444, 442, 1, 0, 0, 0, 445, 447, 7, 9, 0, 0, 446, 445, 1, 0, 0, 0, 447, 448, 1, 0, 0, 0, 448, 446, 1, 0, 0, 0, 448, 449, 1, 0, 0, 0, 449, 92, 1, 0, 0, 0, 21, 0, 154, 159, 168, 170, 184, 353, 361, 364, 368, 373, 378, 384, 386, 389, 417, 425, 430, 437, 442, 448, 1, 6, 0, 0] +[4, 0, 47, 457, 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, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 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, 4, 4, 155, 8, 4, 11, 4, 12, 4, 156, 1, 5, 4, 5, 160, 8, 5, 11, 5, 12, 5, 161, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 171, 8, 6, 10, 6, 12, 6, 174, 9, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 185, 8, 7, 10, 7, 12, 7, 188, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 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, 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, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 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, 5, 36, 354, 8, 36, 10, 36, 12, 36, 357, 9, 36, 1, 36, 1, 36, 1, 37, 4, 37, 362, 8, 37, 11, 37, 12, 37, 363, 1, 37, 3, 37, 367, 8, 37, 1, 37, 1, 37, 3, 37, 371, 8, 37, 1, 37, 4, 37, 374, 8, 37, 11, 37, 12, 37, 375, 1, 37, 4, 37, 379, 8, 37, 11, 37, 12, 37, 380, 1, 37, 1, 37, 4, 37, 385, 8, 37, 11, 37, 12, 37, 386, 3, 37, 389, 8, 37, 1, 37, 3, 37, 392, 8, 37, 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, 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, 42, 4, 42, 423, 8, 42, 11, 42, 12, 42, 424, 1, 43, 1, 43, 1, 44, 1, 44, 4, 44, 431, 8, 44, 11, 44, 12, 44, 432, 1, 44, 5, 44, 436, 8, 44, 10, 44, 12, 44, 439, 9, 44, 1, 45, 1, 45, 4, 45, 443, 8, 45, 11, 45, 12, 45, 444, 1, 45, 5, 45, 448, 8, 45, 10, 45, 12, 45, 451, 9, 45, 1, 46, 4, 46, 454, 8, 46, 11, 46, 12, 46, 455, 2, 172, 186, 0, 47, 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, 1, 0, 10, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 6, 0, 32, 32, 45, 45, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 1, 0, 32, 32, 2, 0, 95, 95, 97, 122, 3, 0, 48, 57, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 58, 65, 90, 95, 95, 97, 122, 2, 0, 47, 57, 65, 90, 476, 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, 1, 95, 1, 0, 0, 0, 3, 97, 1, 0, 0, 0, 5, 122, 1, 0, 0, 0, 7, 151, 1, 0, 0, 0, 9, 154, 1, 0, 0, 0, 11, 159, 1, 0, 0, 0, 13, 165, 1, 0, 0, 0, 15, 180, 1, 0, 0, 0, 17, 193, 1, 0, 0, 0, 19, 198, 1, 0, 0, 0, 21, 203, 1, 0, 0, 0, 23, 215, 1, 0, 0, 0, 25, 232, 1, 0, 0, 0, 27, 238, 1, 0, 0, 0, 29, 243, 1, 0, 0, 0, 31, 248, 1, 0, 0, 0, 33, 255, 1, 0, 0, 0, 35, 260, 1, 0, 0, 0, 37, 264, 1, 0, 0, 0, 39, 276, 1, 0, 0, 0, 41, 279, 1, 0, 0, 0, 43, 288, 1, 0, 0, 0, 45, 290, 1, 0, 0, 0, 47, 292, 1, 0, 0, 0, 49, 294, 1, 0, 0, 0, 51, 296, 1, 0, 0, 0, 53, 298, 1, 0, 0, 0, 55, 300, 1, 0, 0, 0, 57, 302, 1, 0, 0, 0, 59, 304, 1, 0, 0, 0, 61, 306, 1, 0, 0, 0, 63, 314, 1, 0, 0, 0, 65, 320, 1, 0, 0, 0, 67, 327, 1, 0, 0, 0, 69, 336, 1, 0, 0, 0, 71, 344, 1, 0, 0, 0, 73, 351, 1, 0, 0, 0, 75, 391, 1, 0, 0, 0, 77, 393, 1, 0, 0, 0, 79, 403, 1, 0, 0, 0, 81, 408, 1, 0, 0, 0, 83, 416, 1, 0, 0, 0, 85, 422, 1, 0, 0, 0, 87, 426, 1, 0, 0, 0, 89, 428, 1, 0, 0, 0, 91, 440, 1, 0, 0, 0, 93, 453, 1, 0, 0, 0, 95, 96, 5, 42, 0, 0, 96, 2, 1, 0, 0, 0, 97, 98, 5, 97, 0, 0, 98, 99, 5, 108, 0, 0, 99, 100, 5, 108, 0, 0, 100, 101, 5, 111, 0, 0, 101, 102, 5, 119, 0, 0, 102, 103, 5, 105, 0, 0, 103, 104, 5, 110, 0, 0, 104, 105, 5, 103, 0, 0, 105, 106, 5, 32, 0, 0, 106, 107, 5, 111, 0, 0, 107, 108, 5, 118, 0, 0, 108, 109, 5, 101, 0, 0, 109, 110, 5, 114, 0, 0, 110, 111, 5, 100, 0, 0, 111, 112, 5, 114, 0, 0, 112, 113, 5, 97, 0, 0, 113, 114, 5, 102, 0, 0, 114, 115, 5, 116, 0, 0, 115, 116, 5, 32, 0, 0, 116, 117, 5, 117, 0, 0, 117, 118, 5, 112, 0, 0, 118, 119, 5, 32, 0, 0, 119, 120, 5, 116, 0, 0, 120, 121, 5, 111, 0, 0, 121, 4, 1, 0, 0, 0, 122, 123, 5, 97, 0, 0, 123, 124, 5, 108, 0, 0, 124, 125, 5, 108, 0, 0, 125, 126, 5, 111, 0, 0, 126, 127, 5, 119, 0, 0, 127, 128, 5, 105, 0, 0, 128, 129, 5, 110, 0, 0, 129, 130, 5, 103, 0, 0, 130, 131, 5, 32, 0, 0, 131, 132, 5, 117, 0, 0, 132, 133, 5, 110, 0, 0, 133, 134, 5, 98, 0, 0, 134, 135, 5, 111, 0, 0, 135, 136, 5, 117, 0, 0, 136, 137, 5, 110, 0, 0, 137, 138, 5, 100, 0, 0, 138, 139, 5, 101, 0, 0, 139, 140, 5, 100, 0, 0, 140, 141, 5, 32, 0, 0, 141, 142, 5, 111, 0, 0, 142, 143, 5, 118, 0, 0, 143, 144, 5, 101, 0, 0, 144, 145, 5, 114, 0, 0, 145, 146, 5, 100, 0, 0, 146, 147, 5, 114, 0, 0, 147, 148, 5, 97, 0, 0, 148, 149, 5, 102, 0, 0, 149, 150, 5, 116, 0, 0, 150, 6, 1, 0, 0, 0, 151, 152, 5, 44, 0, 0, 152, 8, 1, 0, 0, 0, 153, 155, 7, 0, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 10, 1, 0, 0, 0, 158, 160, 7, 1, 0, 0, 159, 158, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 6, 5, 0, 0, 164, 12, 1, 0, 0, 0, 165, 166, 5, 47, 0, 0, 166, 167, 5, 42, 0, 0, 167, 172, 1, 0, 0, 0, 168, 171, 3, 13, 6, 0, 169, 171, 9, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 169, 1, 0, 0, 0, 171, 174, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 173, 175, 1, 0, 0, 0, 174, 172, 1, 0, 0, 0, 175, 176, 5, 42, 0, 0, 176, 177, 5, 47, 0, 0, 177, 178, 1, 0, 0, 0, 178, 179, 6, 6, 0, 0, 179, 14, 1, 0, 0, 0, 180, 181, 5, 47, 0, 0, 181, 182, 5, 47, 0, 0, 182, 186, 1, 0, 0, 0, 183, 185, 9, 0, 0, 0, 184, 183, 1, 0, 0, 0, 185, 188, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 187, 189, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 189, 190, 3, 9, 4, 0, 190, 191, 1, 0, 0, 0, 191, 192, 6, 7, 0, 0, 192, 16, 1, 0, 0, 0, 193, 194, 5, 118, 0, 0, 194, 195, 5, 97, 0, 0, 195, 196, 5, 114, 0, 0, 196, 197, 5, 115, 0, 0, 197, 18, 1, 0, 0, 0, 198, 199, 5, 109, 0, 0, 199, 200, 5, 101, 0, 0, 200, 201, 5, 116, 0, 0, 201, 202, 5, 97, 0, 0, 202, 20, 1, 0, 0, 0, 203, 204, 5, 115, 0, 0, 204, 205, 5, 101, 0, 0, 205, 206, 5, 116, 0, 0, 206, 207, 5, 95, 0, 0, 207, 208, 5, 116, 0, 0, 208, 209, 5, 120, 0, 0, 209, 210, 5, 95, 0, 0, 210, 211, 5, 109, 0, 0, 211, 212, 5, 101, 0, 0, 212, 213, 5, 116, 0, 0, 213, 214, 5, 97, 0, 0, 214, 22, 1, 0, 0, 0, 215, 216, 5, 115, 0, 0, 216, 217, 5, 101, 0, 0, 217, 218, 5, 116, 0, 0, 218, 219, 5, 95, 0, 0, 219, 220, 5, 97, 0, 0, 220, 221, 5, 99, 0, 0, 221, 222, 5, 99, 0, 0, 222, 223, 5, 111, 0, 0, 223, 224, 5, 117, 0, 0, 224, 225, 5, 110, 0, 0, 225, 226, 5, 116, 0, 0, 226, 227, 5, 95, 0, 0, 227, 228, 5, 109, 0, 0, 228, 229, 5, 101, 0, 0, 229, 230, 5, 116, 0, 0, 230, 231, 5, 97, 0, 0, 231, 24, 1, 0, 0, 0, 232, 233, 5, 112, 0, 0, 233, 234, 5, 114, 0, 0, 234, 235, 5, 105, 0, 0, 235, 236, 5, 110, 0, 0, 236, 237, 5, 116, 0, 0, 237, 26, 1, 0, 0, 0, 238, 239, 5, 102, 0, 0, 239, 240, 5, 97, 0, 0, 240, 241, 5, 105, 0, 0, 241, 242, 5, 108, 0, 0, 242, 28, 1, 0, 0, 0, 243, 244, 5, 115, 0, 0, 244, 245, 5, 101, 0, 0, 245, 246, 5, 110, 0, 0, 246, 247, 5, 100, 0, 0, 247, 30, 1, 0, 0, 0, 248, 249, 5, 115, 0, 0, 249, 250, 5, 111, 0, 0, 250, 251, 5, 117, 0, 0, 251, 252, 5, 114, 0, 0, 252, 253, 5, 99, 0, 0, 253, 254, 5, 101, 0, 0, 254, 32, 1, 0, 0, 0, 255, 256, 5, 102, 0, 0, 256, 257, 5, 114, 0, 0, 257, 258, 5, 111, 0, 0, 258, 259, 5, 109, 0, 0, 259, 34, 1, 0, 0, 0, 260, 261, 5, 109, 0, 0, 261, 262, 5, 97, 0, 0, 262, 263, 5, 120, 0, 0, 263, 36, 1, 0, 0, 0, 264, 265, 5, 100, 0, 0, 265, 266, 5, 101, 0, 0, 266, 267, 5, 115, 0, 0, 267, 268, 5, 116, 0, 0, 268, 269, 5, 105, 0, 0, 269, 270, 5, 110, 0, 0, 270, 271, 5, 97, 0, 0, 271, 272, 5, 116, 0, 0, 272, 273, 5, 105, 0, 0, 273, 274, 5, 111, 0, 0, 274, 275, 5, 110, 0, 0, 275, 38, 1, 0, 0, 0, 276, 277, 5, 116, 0, 0, 277, 278, 5, 111, 0, 0, 278, 40, 1, 0, 0, 0, 279, 280, 5, 97, 0, 0, 280, 281, 5, 108, 0, 0, 281, 282, 5, 108, 0, 0, 282, 283, 5, 111, 0, 0, 283, 284, 5, 99, 0, 0, 284, 285, 5, 97, 0, 0, 285, 286, 5, 116, 0, 0, 286, 287, 5, 101, 0, 0, 287, 42, 1, 0, 0, 0, 288, 289, 5, 43, 0, 0, 289, 44, 1, 0, 0, 0, 290, 291, 5, 45, 0, 0, 291, 46, 1, 0, 0, 0, 292, 293, 5, 40, 0, 0, 293, 48, 1, 0, 0, 0, 294, 295, 5, 41, 0, 0, 295, 50, 1, 0, 0, 0, 296, 297, 5, 91, 0, 0, 297, 52, 1, 0, 0, 0, 298, 299, 5, 93, 0, 0, 299, 54, 1, 0, 0, 0, 300, 301, 5, 123, 0, 0, 301, 56, 1, 0, 0, 0, 302, 303, 5, 125, 0, 0, 303, 58, 1, 0, 0, 0, 304, 305, 5, 61, 0, 0, 305, 60, 1, 0, 0, 0, 306, 307, 5, 97, 0, 0, 307, 308, 5, 99, 0, 0, 308, 309, 5, 99, 0, 0, 309, 310, 5, 111, 0, 0, 310, 311, 5, 117, 0, 0, 311, 312, 5, 110, 0, 0, 312, 313, 5, 116, 0, 0, 313, 62, 1, 0, 0, 0, 314, 315, 5, 97, 0, 0, 315, 316, 5, 115, 0, 0, 316, 317, 5, 115, 0, 0, 317, 318, 5, 101, 0, 0, 318, 319, 5, 116, 0, 0, 319, 64, 1, 0, 0, 0, 320, 321, 5, 110, 0, 0, 321, 322, 5, 117, 0, 0, 322, 323, 5, 109, 0, 0, 323, 324, 5, 98, 0, 0, 324, 325, 5, 101, 0, 0, 325, 326, 5, 114, 0, 0, 326, 66, 1, 0, 0, 0, 327, 328, 5, 109, 0, 0, 328, 329, 5, 111, 0, 0, 329, 330, 5, 110, 0, 0, 330, 331, 5, 101, 0, 0, 331, 332, 5, 116, 0, 0, 332, 333, 5, 97, 0, 0, 333, 334, 5, 114, 0, 0, 334, 335, 5, 121, 0, 0, 335, 68, 1, 0, 0, 0, 336, 337, 5, 112, 0, 0, 337, 338, 5, 111, 0, 0, 338, 339, 5, 114, 0, 0, 339, 340, 5, 116, 0, 0, 340, 341, 5, 105, 0, 0, 341, 342, 5, 111, 0, 0, 342, 343, 5, 110, 0, 0, 343, 70, 1, 0, 0, 0, 344, 345, 5, 115, 0, 0, 345, 346, 5, 116, 0, 0, 346, 347, 5, 114, 0, 0, 347, 348, 5, 105, 0, 0, 348, 349, 5, 110, 0, 0, 349, 350, 5, 103, 0, 0, 350, 72, 1, 0, 0, 0, 351, 355, 5, 34, 0, 0, 352, 354, 7, 2, 0, 0, 353, 352, 1, 0, 0, 0, 354, 357, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 358, 1, 0, 0, 0, 357, 355, 1, 0, 0, 0, 358, 359, 5, 34, 0, 0, 359, 74, 1, 0, 0, 0, 360, 362, 7, 3, 0, 0, 361, 360, 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 361, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 366, 1, 0, 0, 0, 365, 367, 7, 4, 0, 0, 366, 365, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 370, 5, 47, 0, 0, 369, 371, 7, 4, 0, 0, 370, 369, 1, 0, 0, 0, 370, 371, 1, 0, 0, 0, 371, 373, 1, 0, 0, 0, 372, 374, 7, 3, 0, 0, 373, 372, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 373, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 392, 1, 0, 0, 0, 377, 379, 7, 3, 0, 0, 378, 377, 1, 0, 0, 0, 379, 380, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 380, 381, 1, 0, 0, 0, 381, 388, 1, 0, 0, 0, 382, 384, 5, 46, 0, 0, 383, 385, 7, 3, 0, 0, 384, 383, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 384, 1, 0, 0, 0, 386, 387, 1, 0, 0, 0, 387, 389, 1, 0, 0, 0, 388, 382, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 390, 1, 0, 0, 0, 390, 392, 5, 37, 0, 0, 391, 361, 1, 0, 0, 0, 391, 378, 1, 0, 0, 0, 392, 76, 1, 0, 0, 0, 393, 394, 5, 114, 0, 0, 394, 395, 5, 101, 0, 0, 395, 396, 5, 109, 0, 0, 396, 397, 5, 97, 0, 0, 397, 398, 5, 105, 0, 0, 398, 399, 5, 110, 0, 0, 399, 400, 5, 105, 0, 0, 400, 401, 5, 110, 0, 0, 401, 402, 5, 103, 0, 0, 402, 78, 1, 0, 0, 0, 403, 404, 5, 107, 0, 0, 404, 405, 5, 101, 0, 0, 405, 406, 5, 112, 0, 0, 406, 407, 5, 116, 0, 0, 407, 80, 1, 0, 0, 0, 408, 409, 5, 98, 0, 0, 409, 410, 5, 97, 0, 0, 410, 411, 5, 108, 0, 0, 411, 412, 5, 97, 0, 0, 412, 413, 5, 110, 0, 0, 413, 414, 5, 99, 0, 0, 414, 415, 5, 101, 0, 0, 415, 82, 1, 0, 0, 0, 416, 417, 5, 115, 0, 0, 417, 418, 5, 97, 0, 0, 418, 419, 5, 118, 0, 0, 419, 420, 5, 101, 0, 0, 420, 84, 1, 0, 0, 0, 421, 423, 7, 3, 0, 0, 422, 421, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 86, 1, 0, 0, 0, 426, 427, 5, 37, 0, 0, 427, 88, 1, 0, 0, 0, 428, 430, 5, 36, 0, 0, 429, 431, 7, 5, 0, 0, 430, 429, 1, 0, 0, 0, 431, 432, 1, 0, 0, 0, 432, 430, 1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 437, 1, 0, 0, 0, 434, 436, 7, 6, 0, 0, 435, 434, 1, 0, 0, 0, 436, 439, 1, 0, 0, 0, 437, 435, 1, 0, 0, 0, 437, 438, 1, 0, 0, 0, 438, 90, 1, 0, 0, 0, 439, 437, 1, 0, 0, 0, 440, 442, 5, 64, 0, 0, 441, 443, 7, 7, 0, 0, 442, 441, 1, 0, 0, 0, 443, 444, 1, 0, 0, 0, 444, 442, 1, 0, 0, 0, 444, 445, 1, 0, 0, 0, 445, 449, 1, 0, 0, 0, 446, 448, 7, 8, 0, 0, 447, 446, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 447, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 450, 92, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 454, 7, 9, 0, 0, 453, 452, 1, 0, 0, 0, 454, 455, 1, 0, 0, 0, 455, 453, 1, 0, 0, 0, 455, 456, 1, 0, 0, 0, 456, 94, 1, 0, 0, 0, 21, 0, 156, 161, 170, 172, 186, 355, 363, 366, 370, 375, 380, 386, 388, 391, 424, 432, 437, 444, 449, 455, 1, 6, 0, 0] diff --git a/pkg/machine/script/parser/NumScriptLexer.tokens b/pkg/machine/script/parser/NumScriptLexer.tokens index c469c7c12..cb7dd35a2 100644 --- a/pkg/machine/script/parser/NumScriptLexer.tokens +++ b/pkg/machine/script/parser/NumScriptLexer.tokens @@ -39,11 +39,12 @@ PORTION=38 REMAINING=39 KEPT=40 BALANCE=41 -NUMBER=42 -PERCENT=43 -VARIABLE_NAME=44 -ACCOUNT=45 -ASSET=46 +SAVE=42 +NUMBER=43 +PERCENT=44 +VARIABLE_NAME=45 +ACCOUNT=46 +ASSET=47 '*'=1 'allowing overdraft up to'=2 'allowing unbounded overdraft'=3 @@ -79,4 +80,5 @@ ASSET=46 'remaining'=39 'kept'=40 'balance'=41 -'%'=43 +'save'=42 +'%'=44 diff --git a/pkg/machine/script/parser/numscript_base_listener.go b/pkg/machine/script/parser/numscript_base_listener.go index 48a7c9aba..5e4904df7 100644 --- a/pkg/machine/script/parser/numscript_base_listener.go +++ b/pkg/machine/script/parser/numscript_base_listener.go @@ -231,6 +231,12 @@ func (s *BaseNumScriptListener) EnterPrint(ctx *PrintContext) {} // ExitPrint is called when production Print is exited. func (s *BaseNumScriptListener) ExitPrint(ctx *PrintContext) {} +// EnterSaveFromAccount is called when production SaveFromAccount is entered. +func (s *BaseNumScriptListener) EnterSaveFromAccount(ctx *SaveFromAccountContext) {} + +// ExitSaveFromAccount is called when production SaveFromAccount is exited. +func (s *BaseNumScriptListener) ExitSaveFromAccount(ctx *SaveFromAccountContext) {} + // EnterSetTxMeta is called when production SetTxMeta is entered. func (s *BaseNumScriptListener) EnterSetTxMeta(ctx *SetTxMetaContext) {} diff --git a/pkg/machine/script/parser/numscript_lexer.go b/pkg/machine/script/parser/numscript_lexer.go index 65d3cf51c..eb341644d 100644 --- a/pkg/machine/script/parser/numscript_lexer.go +++ b/pkg/machine/script/parser/numscript_lexer.go @@ -49,7 +49,8 @@ func numscriptlexerLexerInit() { "'print'", "'fail'", "'send'", "'source'", "'from'", "'max'", "'destination'", "'to'", "'allocate'", "'+'", "'-'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'='", "'account'", "'asset'", "'number'", "'monetary'", "'portion'", - "'string'", "", "", "'remaining'", "'kept'", "'balance'", "", "'%'", + "'string'", "", "", "'remaining'", "'kept'", "'balance'", "'save'", + "", "'%'", } staticData.symbolicNames = []string{ "", "", "", "", "", "NEWLINE", "WHITESPACE", "MULTILINE_COMMENT", "LINE_COMMENT", @@ -57,8 +58,8 @@ func numscriptlexerLexerInit() { "SEND", "SOURCE", "FROM", "MAX", "DESTINATION", "TO", "ALLOCATE", "OP_ADD", "OP_SUB", "LPAREN", "RPAREN", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "EQ", "TY_ACCOUNT", "TY_ASSET", "TY_NUMBER", "TY_MONETARY", "TY_PORTION", - "TY_STRING", "STRING", "PORTION", "REMAINING", "KEPT", "BALANCE", "NUMBER", - "PERCENT", "VARIABLE_NAME", "ACCOUNT", "ASSET", + "TY_STRING", "STRING", "PORTION", "REMAINING", "KEPT", "BALANCE", "SAVE", + "NUMBER", "PERCENT", "VARIABLE_NAME", "ACCOUNT", "ASSET", } staticData.ruleNames = []string{ "T__0", "T__1", "T__2", "T__3", "NEWLINE", "WHITESPACE", "MULTILINE_COMMENT", @@ -67,11 +68,12 @@ func numscriptlexerLexerInit() { "OP_ADD", "OP_SUB", "LPAREN", "RPAREN", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "EQ", "TY_ACCOUNT", "TY_ASSET", "TY_NUMBER", "TY_MONETARY", "TY_PORTION", "TY_STRING", "STRING", "PORTION", "REMAINING", "KEPT", - "BALANCE", "NUMBER", "PERCENT", "VARIABLE_NAME", "ACCOUNT", "ASSET", + "BALANCE", "SAVE", "NUMBER", "PERCENT", "VARIABLE_NAME", "ACCOUNT", + "ASSET", } staticData.predictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 0, 46, 450, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, + 4, 0, 47, 457, 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, @@ -79,198 +81,201 @@ func numscriptlexerLexerInit() { 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, 1, 0, 1, 0, + 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, + 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 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, 2, 1, 2, 1, 2, 1, 2, 1, 2, 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, 4, 4, 153, 8, 4, - 11, 4, 12, 4, 154, 1, 5, 4, 5, 158, 8, 5, 11, 5, 12, 5, 159, 1, 5, 1, 5, - 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 169, 8, 6, 10, 6, 12, 6, 172, 9, 6, - 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 183, 8, 7, - 10, 7, 12, 7, 186, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, - 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, - 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, 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, 13, 1, - 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, - 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, - 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, - 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, - 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, - 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, - 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, - 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, - 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, - 1, 33, 1, 33, 1, 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, 5, 36, 352, - 8, 36, 10, 36, 12, 36, 355, 9, 36, 1, 36, 1, 36, 1, 37, 4, 37, 360, 8, - 37, 11, 37, 12, 37, 361, 1, 37, 3, 37, 365, 8, 37, 1, 37, 1, 37, 3, 37, - 369, 8, 37, 1, 37, 4, 37, 372, 8, 37, 11, 37, 12, 37, 373, 1, 37, 4, 37, - 377, 8, 37, 11, 37, 12, 37, 378, 1, 37, 1, 37, 4, 37, 383, 8, 37, 11, 37, - 12, 37, 384, 3, 37, 387, 8, 37, 1, 37, 3, 37, 390, 8, 37, 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, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, - 1, 41, 4, 41, 416, 8, 41, 11, 41, 12, 41, 417, 1, 42, 1, 42, 1, 43, 1, - 43, 4, 43, 424, 8, 43, 11, 43, 12, 43, 425, 1, 43, 5, 43, 429, 8, 43, 10, - 43, 12, 43, 432, 9, 43, 1, 44, 1, 44, 4, 44, 436, 8, 44, 11, 44, 12, 44, - 437, 1, 44, 5, 44, 441, 8, 44, 10, 44, 12, 44, 444, 9, 44, 1, 45, 4, 45, - 447, 8, 45, 11, 45, 12, 45, 448, 2, 170, 184, 0, 46, 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, 1, 0, 10, 2, 0, 10, 10, - 13, 13, 2, 0, 9, 9, 32, 32, 6, 0, 32, 32, 45, 45, 48, 57, 65, 90, 95, 95, - 97, 122, 1, 0, 48, 57, 1, 0, 32, 32, 2, 0, 95, 95, 97, 122, 3, 0, 48, 57, - 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 58, 65, 90, 95, - 95, 97, 122, 2, 0, 47, 57, 65, 90, 469, 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, 1, 93, 1, 0, 0, 0, 3, 95, 1, 0, 0, 0, - 5, 120, 1, 0, 0, 0, 7, 149, 1, 0, 0, 0, 9, 152, 1, 0, 0, 0, 11, 157, 1, - 0, 0, 0, 13, 163, 1, 0, 0, 0, 15, 178, 1, 0, 0, 0, 17, 191, 1, 0, 0, 0, - 19, 196, 1, 0, 0, 0, 21, 201, 1, 0, 0, 0, 23, 213, 1, 0, 0, 0, 25, 230, - 1, 0, 0, 0, 27, 236, 1, 0, 0, 0, 29, 241, 1, 0, 0, 0, 31, 246, 1, 0, 0, - 0, 33, 253, 1, 0, 0, 0, 35, 258, 1, 0, 0, 0, 37, 262, 1, 0, 0, 0, 39, 274, - 1, 0, 0, 0, 41, 277, 1, 0, 0, 0, 43, 286, 1, 0, 0, 0, 45, 288, 1, 0, 0, - 0, 47, 290, 1, 0, 0, 0, 49, 292, 1, 0, 0, 0, 51, 294, 1, 0, 0, 0, 53, 296, - 1, 0, 0, 0, 55, 298, 1, 0, 0, 0, 57, 300, 1, 0, 0, 0, 59, 302, 1, 0, 0, - 0, 61, 304, 1, 0, 0, 0, 63, 312, 1, 0, 0, 0, 65, 318, 1, 0, 0, 0, 67, 325, - 1, 0, 0, 0, 69, 334, 1, 0, 0, 0, 71, 342, 1, 0, 0, 0, 73, 349, 1, 0, 0, - 0, 75, 389, 1, 0, 0, 0, 77, 391, 1, 0, 0, 0, 79, 401, 1, 0, 0, 0, 81, 406, - 1, 0, 0, 0, 83, 415, 1, 0, 0, 0, 85, 419, 1, 0, 0, 0, 87, 421, 1, 0, 0, - 0, 89, 433, 1, 0, 0, 0, 91, 446, 1, 0, 0, 0, 93, 94, 5, 42, 0, 0, 94, 2, - 1, 0, 0, 0, 95, 96, 5, 97, 0, 0, 96, 97, 5, 108, 0, 0, 97, 98, 5, 108, - 0, 0, 98, 99, 5, 111, 0, 0, 99, 100, 5, 119, 0, 0, 100, 101, 5, 105, 0, - 0, 101, 102, 5, 110, 0, 0, 102, 103, 5, 103, 0, 0, 103, 104, 5, 32, 0, - 0, 104, 105, 5, 111, 0, 0, 105, 106, 5, 118, 0, 0, 106, 107, 5, 101, 0, - 0, 107, 108, 5, 114, 0, 0, 108, 109, 5, 100, 0, 0, 109, 110, 5, 114, 0, - 0, 110, 111, 5, 97, 0, 0, 111, 112, 5, 102, 0, 0, 112, 113, 5, 116, 0, - 0, 113, 114, 5, 32, 0, 0, 114, 115, 5, 117, 0, 0, 115, 116, 5, 112, 0, - 0, 116, 117, 5, 32, 0, 0, 117, 118, 5, 116, 0, 0, 118, 119, 5, 111, 0, - 0, 119, 4, 1, 0, 0, 0, 120, 121, 5, 97, 0, 0, 121, 122, 5, 108, 0, 0, 122, - 123, 5, 108, 0, 0, 123, 124, 5, 111, 0, 0, 124, 125, 5, 119, 0, 0, 125, - 126, 5, 105, 0, 0, 126, 127, 5, 110, 0, 0, 127, 128, 5, 103, 0, 0, 128, - 129, 5, 32, 0, 0, 129, 130, 5, 117, 0, 0, 130, 131, 5, 110, 0, 0, 131, - 132, 5, 98, 0, 0, 132, 133, 5, 111, 0, 0, 133, 134, 5, 117, 0, 0, 134, - 135, 5, 110, 0, 0, 135, 136, 5, 100, 0, 0, 136, 137, 5, 101, 0, 0, 137, - 138, 5, 100, 0, 0, 138, 139, 5, 32, 0, 0, 139, 140, 5, 111, 0, 0, 140, - 141, 5, 118, 0, 0, 141, 142, 5, 101, 0, 0, 142, 143, 5, 114, 0, 0, 143, - 144, 5, 100, 0, 0, 144, 145, 5, 114, 0, 0, 145, 146, 5, 97, 0, 0, 146, - 147, 5, 102, 0, 0, 147, 148, 5, 116, 0, 0, 148, 6, 1, 0, 0, 0, 149, 150, - 5, 44, 0, 0, 150, 8, 1, 0, 0, 0, 151, 153, 7, 0, 0, 0, 152, 151, 1, 0, - 0, 0, 153, 154, 1, 0, 0, 0, 154, 152, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, - 155, 10, 1, 0, 0, 0, 156, 158, 7, 1, 0, 0, 157, 156, 1, 0, 0, 0, 158, 159, - 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 161, 1, 0, - 0, 0, 161, 162, 6, 5, 0, 0, 162, 12, 1, 0, 0, 0, 163, 164, 5, 47, 0, 0, - 164, 165, 5, 42, 0, 0, 165, 170, 1, 0, 0, 0, 166, 169, 3, 13, 6, 0, 167, - 169, 9, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, 167, 1, 0, 0, 0, 169, 172, - 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 173, 1, 0, - 0, 0, 172, 170, 1, 0, 0, 0, 173, 174, 5, 42, 0, 0, 174, 175, 5, 47, 0, - 0, 175, 176, 1, 0, 0, 0, 176, 177, 6, 6, 0, 0, 177, 14, 1, 0, 0, 0, 178, - 179, 5, 47, 0, 0, 179, 180, 5, 47, 0, 0, 180, 184, 1, 0, 0, 0, 181, 183, - 9, 0, 0, 0, 182, 181, 1, 0, 0, 0, 183, 186, 1, 0, 0, 0, 184, 185, 1, 0, - 0, 0, 184, 182, 1, 0, 0, 0, 185, 187, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, - 187, 188, 3, 9, 4, 0, 188, 189, 1, 0, 0, 0, 189, 190, 6, 7, 0, 0, 190, - 16, 1, 0, 0, 0, 191, 192, 5, 118, 0, 0, 192, 193, 5, 97, 0, 0, 193, 194, - 5, 114, 0, 0, 194, 195, 5, 115, 0, 0, 195, 18, 1, 0, 0, 0, 196, 197, 5, - 109, 0, 0, 197, 198, 5, 101, 0, 0, 198, 199, 5, 116, 0, 0, 199, 200, 5, - 97, 0, 0, 200, 20, 1, 0, 0, 0, 201, 202, 5, 115, 0, 0, 202, 203, 5, 101, - 0, 0, 203, 204, 5, 116, 0, 0, 204, 205, 5, 95, 0, 0, 205, 206, 5, 116, - 0, 0, 206, 207, 5, 120, 0, 0, 207, 208, 5, 95, 0, 0, 208, 209, 5, 109, - 0, 0, 209, 210, 5, 101, 0, 0, 210, 211, 5, 116, 0, 0, 211, 212, 5, 97, - 0, 0, 212, 22, 1, 0, 0, 0, 213, 214, 5, 115, 0, 0, 214, 215, 5, 101, 0, - 0, 215, 216, 5, 116, 0, 0, 216, 217, 5, 95, 0, 0, 217, 218, 5, 97, 0, 0, - 218, 219, 5, 99, 0, 0, 219, 220, 5, 99, 0, 0, 220, 221, 5, 111, 0, 0, 221, - 222, 5, 117, 0, 0, 222, 223, 5, 110, 0, 0, 223, 224, 5, 116, 0, 0, 224, - 225, 5, 95, 0, 0, 225, 226, 5, 109, 0, 0, 226, 227, 5, 101, 0, 0, 227, - 228, 5, 116, 0, 0, 228, 229, 5, 97, 0, 0, 229, 24, 1, 0, 0, 0, 230, 231, - 5, 112, 0, 0, 231, 232, 5, 114, 0, 0, 232, 233, 5, 105, 0, 0, 233, 234, - 5, 110, 0, 0, 234, 235, 5, 116, 0, 0, 235, 26, 1, 0, 0, 0, 236, 237, 5, - 102, 0, 0, 237, 238, 5, 97, 0, 0, 238, 239, 5, 105, 0, 0, 239, 240, 5, - 108, 0, 0, 240, 28, 1, 0, 0, 0, 241, 242, 5, 115, 0, 0, 242, 243, 5, 101, - 0, 0, 243, 244, 5, 110, 0, 0, 244, 245, 5, 100, 0, 0, 245, 30, 1, 0, 0, - 0, 246, 247, 5, 115, 0, 0, 247, 248, 5, 111, 0, 0, 248, 249, 5, 117, 0, - 0, 249, 250, 5, 114, 0, 0, 250, 251, 5, 99, 0, 0, 251, 252, 5, 101, 0, - 0, 252, 32, 1, 0, 0, 0, 253, 254, 5, 102, 0, 0, 254, 255, 5, 114, 0, 0, - 255, 256, 5, 111, 0, 0, 256, 257, 5, 109, 0, 0, 257, 34, 1, 0, 0, 0, 258, - 259, 5, 109, 0, 0, 259, 260, 5, 97, 0, 0, 260, 261, 5, 120, 0, 0, 261, - 36, 1, 0, 0, 0, 262, 263, 5, 100, 0, 0, 263, 264, 5, 101, 0, 0, 264, 265, - 5, 115, 0, 0, 265, 266, 5, 116, 0, 0, 266, 267, 5, 105, 0, 0, 267, 268, - 5, 110, 0, 0, 268, 269, 5, 97, 0, 0, 269, 270, 5, 116, 0, 0, 270, 271, - 5, 105, 0, 0, 271, 272, 5, 111, 0, 0, 272, 273, 5, 110, 0, 0, 273, 38, - 1, 0, 0, 0, 274, 275, 5, 116, 0, 0, 275, 276, 5, 111, 0, 0, 276, 40, 1, - 0, 0, 0, 277, 278, 5, 97, 0, 0, 278, 279, 5, 108, 0, 0, 279, 280, 5, 108, - 0, 0, 280, 281, 5, 111, 0, 0, 281, 282, 5, 99, 0, 0, 282, 283, 5, 97, 0, - 0, 283, 284, 5, 116, 0, 0, 284, 285, 5, 101, 0, 0, 285, 42, 1, 0, 0, 0, - 286, 287, 5, 43, 0, 0, 287, 44, 1, 0, 0, 0, 288, 289, 5, 45, 0, 0, 289, - 46, 1, 0, 0, 0, 290, 291, 5, 40, 0, 0, 291, 48, 1, 0, 0, 0, 292, 293, 5, - 41, 0, 0, 293, 50, 1, 0, 0, 0, 294, 295, 5, 91, 0, 0, 295, 52, 1, 0, 0, - 0, 296, 297, 5, 93, 0, 0, 297, 54, 1, 0, 0, 0, 298, 299, 5, 123, 0, 0, - 299, 56, 1, 0, 0, 0, 300, 301, 5, 125, 0, 0, 301, 58, 1, 0, 0, 0, 302, - 303, 5, 61, 0, 0, 303, 60, 1, 0, 0, 0, 304, 305, 5, 97, 0, 0, 305, 306, - 5, 99, 0, 0, 306, 307, 5, 99, 0, 0, 307, 308, 5, 111, 0, 0, 308, 309, 5, - 117, 0, 0, 309, 310, 5, 110, 0, 0, 310, 311, 5, 116, 0, 0, 311, 62, 1, - 0, 0, 0, 312, 313, 5, 97, 0, 0, 313, 314, 5, 115, 0, 0, 314, 315, 5, 115, - 0, 0, 315, 316, 5, 101, 0, 0, 316, 317, 5, 116, 0, 0, 317, 64, 1, 0, 0, - 0, 318, 319, 5, 110, 0, 0, 319, 320, 5, 117, 0, 0, 320, 321, 5, 109, 0, - 0, 321, 322, 5, 98, 0, 0, 322, 323, 5, 101, 0, 0, 323, 324, 5, 114, 0, - 0, 324, 66, 1, 0, 0, 0, 325, 326, 5, 109, 0, 0, 326, 327, 5, 111, 0, 0, - 327, 328, 5, 110, 0, 0, 328, 329, 5, 101, 0, 0, 329, 330, 5, 116, 0, 0, - 330, 331, 5, 97, 0, 0, 331, 332, 5, 114, 0, 0, 332, 333, 5, 121, 0, 0, - 333, 68, 1, 0, 0, 0, 334, 335, 5, 112, 0, 0, 335, 336, 5, 111, 0, 0, 336, - 337, 5, 114, 0, 0, 337, 338, 5, 116, 0, 0, 338, 339, 5, 105, 0, 0, 339, - 340, 5, 111, 0, 0, 340, 341, 5, 110, 0, 0, 341, 70, 1, 0, 0, 0, 342, 343, - 5, 115, 0, 0, 343, 344, 5, 116, 0, 0, 344, 345, 5, 114, 0, 0, 345, 346, - 5, 105, 0, 0, 346, 347, 5, 110, 0, 0, 347, 348, 5, 103, 0, 0, 348, 72, - 1, 0, 0, 0, 349, 353, 5, 34, 0, 0, 350, 352, 7, 2, 0, 0, 351, 350, 1, 0, - 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, - 354, 356, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 356, 357, 5, 34, 0, 0, 357, - 74, 1, 0, 0, 0, 358, 360, 7, 3, 0, 0, 359, 358, 1, 0, 0, 0, 360, 361, 1, - 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, - 0, 363, 365, 7, 4, 0, 0, 364, 363, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, - 366, 1, 0, 0, 0, 366, 368, 5, 47, 0, 0, 367, 369, 7, 4, 0, 0, 368, 367, - 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 371, 1, 0, 0, 0, 370, 372, 7, 3, - 0, 0, 371, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, - 373, 374, 1, 0, 0, 0, 374, 390, 1, 0, 0, 0, 375, 377, 7, 3, 0, 0, 376, - 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, - 1, 0, 0, 0, 379, 386, 1, 0, 0, 0, 380, 382, 5, 46, 0, 0, 381, 383, 7, 3, - 0, 0, 382, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 382, 1, 0, 0, 0, - 384, 385, 1, 0, 0, 0, 385, 387, 1, 0, 0, 0, 386, 380, 1, 0, 0, 0, 386, - 387, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 390, 5, 37, 0, 0, 389, 359, - 1, 0, 0, 0, 389, 376, 1, 0, 0, 0, 390, 76, 1, 0, 0, 0, 391, 392, 5, 114, - 0, 0, 392, 393, 5, 101, 0, 0, 393, 394, 5, 109, 0, 0, 394, 395, 5, 97, - 0, 0, 395, 396, 5, 105, 0, 0, 396, 397, 5, 110, 0, 0, 397, 398, 5, 105, - 0, 0, 398, 399, 5, 110, 0, 0, 399, 400, 5, 103, 0, 0, 400, 78, 1, 0, 0, - 0, 401, 402, 5, 107, 0, 0, 402, 403, 5, 101, 0, 0, 403, 404, 5, 112, 0, - 0, 404, 405, 5, 116, 0, 0, 405, 80, 1, 0, 0, 0, 406, 407, 5, 98, 0, 0, - 407, 408, 5, 97, 0, 0, 408, 409, 5, 108, 0, 0, 409, 410, 5, 97, 0, 0, 410, - 411, 5, 110, 0, 0, 411, 412, 5, 99, 0, 0, 412, 413, 5, 101, 0, 0, 413, - 82, 1, 0, 0, 0, 414, 416, 7, 3, 0, 0, 415, 414, 1, 0, 0, 0, 416, 417, 1, - 0, 0, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 84, 1, 0, 0, - 0, 419, 420, 5, 37, 0, 0, 420, 86, 1, 0, 0, 0, 421, 423, 5, 36, 0, 0, 422, - 424, 7, 5, 0, 0, 423, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 423, - 1, 0, 0, 0, 425, 426, 1, 0, 0, 0, 426, 430, 1, 0, 0, 0, 427, 429, 7, 6, - 0, 0, 428, 427, 1, 0, 0, 0, 429, 432, 1, 0, 0, 0, 430, 428, 1, 0, 0, 0, - 430, 431, 1, 0, 0, 0, 431, 88, 1, 0, 0, 0, 432, 430, 1, 0, 0, 0, 433, 435, - 5, 64, 0, 0, 434, 436, 7, 7, 0, 0, 435, 434, 1, 0, 0, 0, 436, 437, 1, 0, - 0, 0, 437, 435, 1, 0, 0, 0, 437, 438, 1, 0, 0, 0, 438, 442, 1, 0, 0, 0, - 439, 441, 7, 8, 0, 0, 440, 439, 1, 0, 0, 0, 441, 444, 1, 0, 0, 0, 442, - 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 90, 1, 0, 0, 0, 444, 442, 1, - 0, 0, 0, 445, 447, 7, 9, 0, 0, 446, 445, 1, 0, 0, 0, 447, 448, 1, 0, 0, - 0, 448, 446, 1, 0, 0, 0, 448, 449, 1, 0, 0, 0, 449, 92, 1, 0, 0, 0, 21, - 0, 154, 159, 168, 170, 184, 353, 361, 364, 368, 373, 378, 384, 386, 389, - 417, 425, 430, 437, 442, 448, 1, 6, 0, 0, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 4, 4, + 155, 8, 4, 11, 4, 12, 4, 156, 1, 5, 4, 5, 160, 8, 5, 11, 5, 12, 5, 161, + 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 171, 8, 6, 10, 6, 12, 6, + 174, 9, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, + 185, 8, 7, 10, 7, 12, 7, 188, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, + 10, 1, 10, 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, 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, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, + 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, + 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, + 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, + 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, + 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, + 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, + 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, + 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, + 33, 1, 33, 1, 33, 1, 33, 1, 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, 5, + 36, 354, 8, 36, 10, 36, 12, 36, 357, 9, 36, 1, 36, 1, 36, 1, 37, 4, 37, + 362, 8, 37, 11, 37, 12, 37, 363, 1, 37, 3, 37, 367, 8, 37, 1, 37, 1, 37, + 3, 37, 371, 8, 37, 1, 37, 4, 37, 374, 8, 37, 11, 37, 12, 37, 375, 1, 37, + 4, 37, 379, 8, 37, 11, 37, 12, 37, 380, 1, 37, 1, 37, 4, 37, 385, 8, 37, + 11, 37, 12, 37, 386, 3, 37, 389, 8, 37, 1, 37, 3, 37, 392, 8, 37, 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, 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, 42, 4, 42, 423, 8, 42, 11, + 42, 12, 42, 424, 1, 43, 1, 43, 1, 44, 1, 44, 4, 44, 431, 8, 44, 11, 44, + 12, 44, 432, 1, 44, 5, 44, 436, 8, 44, 10, 44, 12, 44, 439, 9, 44, 1, 45, + 1, 45, 4, 45, 443, 8, 45, 11, 45, 12, 45, 444, 1, 45, 5, 45, 448, 8, 45, + 10, 45, 12, 45, 451, 9, 45, 1, 46, 4, 46, 454, 8, 46, 11, 46, 12, 46, 455, + 2, 172, 186, 0, 47, 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, 1, 0, 10, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, + 32, 6, 0, 32, 32, 45, 45, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, + 1, 0, 32, 32, 2, 0, 95, 95, 97, 122, 3, 0, 48, 57, 95, 95, 97, 122, 3, + 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 58, 65, 90, 95, 95, 97, 122, 2, 0, + 47, 57, 65, 90, 476, 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, 1, 95, 1, 0, 0, 0, 3, 97, 1, 0, 0, + 0, 5, 122, 1, 0, 0, 0, 7, 151, 1, 0, 0, 0, 9, 154, 1, 0, 0, 0, 11, 159, + 1, 0, 0, 0, 13, 165, 1, 0, 0, 0, 15, 180, 1, 0, 0, 0, 17, 193, 1, 0, 0, + 0, 19, 198, 1, 0, 0, 0, 21, 203, 1, 0, 0, 0, 23, 215, 1, 0, 0, 0, 25, 232, + 1, 0, 0, 0, 27, 238, 1, 0, 0, 0, 29, 243, 1, 0, 0, 0, 31, 248, 1, 0, 0, + 0, 33, 255, 1, 0, 0, 0, 35, 260, 1, 0, 0, 0, 37, 264, 1, 0, 0, 0, 39, 276, + 1, 0, 0, 0, 41, 279, 1, 0, 0, 0, 43, 288, 1, 0, 0, 0, 45, 290, 1, 0, 0, + 0, 47, 292, 1, 0, 0, 0, 49, 294, 1, 0, 0, 0, 51, 296, 1, 0, 0, 0, 53, 298, + 1, 0, 0, 0, 55, 300, 1, 0, 0, 0, 57, 302, 1, 0, 0, 0, 59, 304, 1, 0, 0, + 0, 61, 306, 1, 0, 0, 0, 63, 314, 1, 0, 0, 0, 65, 320, 1, 0, 0, 0, 67, 327, + 1, 0, 0, 0, 69, 336, 1, 0, 0, 0, 71, 344, 1, 0, 0, 0, 73, 351, 1, 0, 0, + 0, 75, 391, 1, 0, 0, 0, 77, 393, 1, 0, 0, 0, 79, 403, 1, 0, 0, 0, 81, 408, + 1, 0, 0, 0, 83, 416, 1, 0, 0, 0, 85, 422, 1, 0, 0, 0, 87, 426, 1, 0, 0, + 0, 89, 428, 1, 0, 0, 0, 91, 440, 1, 0, 0, 0, 93, 453, 1, 0, 0, 0, 95, 96, + 5, 42, 0, 0, 96, 2, 1, 0, 0, 0, 97, 98, 5, 97, 0, 0, 98, 99, 5, 108, 0, + 0, 99, 100, 5, 108, 0, 0, 100, 101, 5, 111, 0, 0, 101, 102, 5, 119, 0, + 0, 102, 103, 5, 105, 0, 0, 103, 104, 5, 110, 0, 0, 104, 105, 5, 103, 0, + 0, 105, 106, 5, 32, 0, 0, 106, 107, 5, 111, 0, 0, 107, 108, 5, 118, 0, + 0, 108, 109, 5, 101, 0, 0, 109, 110, 5, 114, 0, 0, 110, 111, 5, 100, 0, + 0, 111, 112, 5, 114, 0, 0, 112, 113, 5, 97, 0, 0, 113, 114, 5, 102, 0, + 0, 114, 115, 5, 116, 0, 0, 115, 116, 5, 32, 0, 0, 116, 117, 5, 117, 0, + 0, 117, 118, 5, 112, 0, 0, 118, 119, 5, 32, 0, 0, 119, 120, 5, 116, 0, + 0, 120, 121, 5, 111, 0, 0, 121, 4, 1, 0, 0, 0, 122, 123, 5, 97, 0, 0, 123, + 124, 5, 108, 0, 0, 124, 125, 5, 108, 0, 0, 125, 126, 5, 111, 0, 0, 126, + 127, 5, 119, 0, 0, 127, 128, 5, 105, 0, 0, 128, 129, 5, 110, 0, 0, 129, + 130, 5, 103, 0, 0, 130, 131, 5, 32, 0, 0, 131, 132, 5, 117, 0, 0, 132, + 133, 5, 110, 0, 0, 133, 134, 5, 98, 0, 0, 134, 135, 5, 111, 0, 0, 135, + 136, 5, 117, 0, 0, 136, 137, 5, 110, 0, 0, 137, 138, 5, 100, 0, 0, 138, + 139, 5, 101, 0, 0, 139, 140, 5, 100, 0, 0, 140, 141, 5, 32, 0, 0, 141, + 142, 5, 111, 0, 0, 142, 143, 5, 118, 0, 0, 143, 144, 5, 101, 0, 0, 144, + 145, 5, 114, 0, 0, 145, 146, 5, 100, 0, 0, 146, 147, 5, 114, 0, 0, 147, + 148, 5, 97, 0, 0, 148, 149, 5, 102, 0, 0, 149, 150, 5, 116, 0, 0, 150, + 6, 1, 0, 0, 0, 151, 152, 5, 44, 0, 0, 152, 8, 1, 0, 0, 0, 153, 155, 7, + 0, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 154, 1, 0, 0, + 0, 156, 157, 1, 0, 0, 0, 157, 10, 1, 0, 0, 0, 158, 160, 7, 1, 0, 0, 159, + 158, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 161, 162, + 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 6, 5, 0, 0, 164, 12, 1, 0, + 0, 0, 165, 166, 5, 47, 0, 0, 166, 167, 5, 42, 0, 0, 167, 172, 1, 0, 0, + 0, 168, 171, 3, 13, 6, 0, 169, 171, 9, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, + 169, 1, 0, 0, 0, 171, 174, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 172, 170, + 1, 0, 0, 0, 173, 175, 1, 0, 0, 0, 174, 172, 1, 0, 0, 0, 175, 176, 5, 42, + 0, 0, 176, 177, 5, 47, 0, 0, 177, 178, 1, 0, 0, 0, 178, 179, 6, 6, 0, 0, + 179, 14, 1, 0, 0, 0, 180, 181, 5, 47, 0, 0, 181, 182, 5, 47, 0, 0, 182, + 186, 1, 0, 0, 0, 183, 185, 9, 0, 0, 0, 184, 183, 1, 0, 0, 0, 185, 188, + 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 187, 189, 1, 0, + 0, 0, 188, 186, 1, 0, 0, 0, 189, 190, 3, 9, 4, 0, 190, 191, 1, 0, 0, 0, + 191, 192, 6, 7, 0, 0, 192, 16, 1, 0, 0, 0, 193, 194, 5, 118, 0, 0, 194, + 195, 5, 97, 0, 0, 195, 196, 5, 114, 0, 0, 196, 197, 5, 115, 0, 0, 197, + 18, 1, 0, 0, 0, 198, 199, 5, 109, 0, 0, 199, 200, 5, 101, 0, 0, 200, 201, + 5, 116, 0, 0, 201, 202, 5, 97, 0, 0, 202, 20, 1, 0, 0, 0, 203, 204, 5, + 115, 0, 0, 204, 205, 5, 101, 0, 0, 205, 206, 5, 116, 0, 0, 206, 207, 5, + 95, 0, 0, 207, 208, 5, 116, 0, 0, 208, 209, 5, 120, 0, 0, 209, 210, 5, + 95, 0, 0, 210, 211, 5, 109, 0, 0, 211, 212, 5, 101, 0, 0, 212, 213, 5, + 116, 0, 0, 213, 214, 5, 97, 0, 0, 214, 22, 1, 0, 0, 0, 215, 216, 5, 115, + 0, 0, 216, 217, 5, 101, 0, 0, 217, 218, 5, 116, 0, 0, 218, 219, 5, 95, + 0, 0, 219, 220, 5, 97, 0, 0, 220, 221, 5, 99, 0, 0, 221, 222, 5, 99, 0, + 0, 222, 223, 5, 111, 0, 0, 223, 224, 5, 117, 0, 0, 224, 225, 5, 110, 0, + 0, 225, 226, 5, 116, 0, 0, 226, 227, 5, 95, 0, 0, 227, 228, 5, 109, 0, + 0, 228, 229, 5, 101, 0, 0, 229, 230, 5, 116, 0, 0, 230, 231, 5, 97, 0, + 0, 231, 24, 1, 0, 0, 0, 232, 233, 5, 112, 0, 0, 233, 234, 5, 114, 0, 0, + 234, 235, 5, 105, 0, 0, 235, 236, 5, 110, 0, 0, 236, 237, 5, 116, 0, 0, + 237, 26, 1, 0, 0, 0, 238, 239, 5, 102, 0, 0, 239, 240, 5, 97, 0, 0, 240, + 241, 5, 105, 0, 0, 241, 242, 5, 108, 0, 0, 242, 28, 1, 0, 0, 0, 243, 244, + 5, 115, 0, 0, 244, 245, 5, 101, 0, 0, 245, 246, 5, 110, 0, 0, 246, 247, + 5, 100, 0, 0, 247, 30, 1, 0, 0, 0, 248, 249, 5, 115, 0, 0, 249, 250, 5, + 111, 0, 0, 250, 251, 5, 117, 0, 0, 251, 252, 5, 114, 0, 0, 252, 253, 5, + 99, 0, 0, 253, 254, 5, 101, 0, 0, 254, 32, 1, 0, 0, 0, 255, 256, 5, 102, + 0, 0, 256, 257, 5, 114, 0, 0, 257, 258, 5, 111, 0, 0, 258, 259, 5, 109, + 0, 0, 259, 34, 1, 0, 0, 0, 260, 261, 5, 109, 0, 0, 261, 262, 5, 97, 0, + 0, 262, 263, 5, 120, 0, 0, 263, 36, 1, 0, 0, 0, 264, 265, 5, 100, 0, 0, + 265, 266, 5, 101, 0, 0, 266, 267, 5, 115, 0, 0, 267, 268, 5, 116, 0, 0, + 268, 269, 5, 105, 0, 0, 269, 270, 5, 110, 0, 0, 270, 271, 5, 97, 0, 0, + 271, 272, 5, 116, 0, 0, 272, 273, 5, 105, 0, 0, 273, 274, 5, 111, 0, 0, + 274, 275, 5, 110, 0, 0, 275, 38, 1, 0, 0, 0, 276, 277, 5, 116, 0, 0, 277, + 278, 5, 111, 0, 0, 278, 40, 1, 0, 0, 0, 279, 280, 5, 97, 0, 0, 280, 281, + 5, 108, 0, 0, 281, 282, 5, 108, 0, 0, 282, 283, 5, 111, 0, 0, 283, 284, + 5, 99, 0, 0, 284, 285, 5, 97, 0, 0, 285, 286, 5, 116, 0, 0, 286, 287, 5, + 101, 0, 0, 287, 42, 1, 0, 0, 0, 288, 289, 5, 43, 0, 0, 289, 44, 1, 0, 0, + 0, 290, 291, 5, 45, 0, 0, 291, 46, 1, 0, 0, 0, 292, 293, 5, 40, 0, 0, 293, + 48, 1, 0, 0, 0, 294, 295, 5, 41, 0, 0, 295, 50, 1, 0, 0, 0, 296, 297, 5, + 91, 0, 0, 297, 52, 1, 0, 0, 0, 298, 299, 5, 93, 0, 0, 299, 54, 1, 0, 0, + 0, 300, 301, 5, 123, 0, 0, 301, 56, 1, 0, 0, 0, 302, 303, 5, 125, 0, 0, + 303, 58, 1, 0, 0, 0, 304, 305, 5, 61, 0, 0, 305, 60, 1, 0, 0, 0, 306, 307, + 5, 97, 0, 0, 307, 308, 5, 99, 0, 0, 308, 309, 5, 99, 0, 0, 309, 310, 5, + 111, 0, 0, 310, 311, 5, 117, 0, 0, 311, 312, 5, 110, 0, 0, 312, 313, 5, + 116, 0, 0, 313, 62, 1, 0, 0, 0, 314, 315, 5, 97, 0, 0, 315, 316, 5, 115, + 0, 0, 316, 317, 5, 115, 0, 0, 317, 318, 5, 101, 0, 0, 318, 319, 5, 116, + 0, 0, 319, 64, 1, 0, 0, 0, 320, 321, 5, 110, 0, 0, 321, 322, 5, 117, 0, + 0, 322, 323, 5, 109, 0, 0, 323, 324, 5, 98, 0, 0, 324, 325, 5, 101, 0, + 0, 325, 326, 5, 114, 0, 0, 326, 66, 1, 0, 0, 0, 327, 328, 5, 109, 0, 0, + 328, 329, 5, 111, 0, 0, 329, 330, 5, 110, 0, 0, 330, 331, 5, 101, 0, 0, + 331, 332, 5, 116, 0, 0, 332, 333, 5, 97, 0, 0, 333, 334, 5, 114, 0, 0, + 334, 335, 5, 121, 0, 0, 335, 68, 1, 0, 0, 0, 336, 337, 5, 112, 0, 0, 337, + 338, 5, 111, 0, 0, 338, 339, 5, 114, 0, 0, 339, 340, 5, 116, 0, 0, 340, + 341, 5, 105, 0, 0, 341, 342, 5, 111, 0, 0, 342, 343, 5, 110, 0, 0, 343, + 70, 1, 0, 0, 0, 344, 345, 5, 115, 0, 0, 345, 346, 5, 116, 0, 0, 346, 347, + 5, 114, 0, 0, 347, 348, 5, 105, 0, 0, 348, 349, 5, 110, 0, 0, 349, 350, + 5, 103, 0, 0, 350, 72, 1, 0, 0, 0, 351, 355, 5, 34, 0, 0, 352, 354, 7, + 2, 0, 0, 353, 352, 1, 0, 0, 0, 354, 357, 1, 0, 0, 0, 355, 353, 1, 0, 0, + 0, 355, 356, 1, 0, 0, 0, 356, 358, 1, 0, 0, 0, 357, 355, 1, 0, 0, 0, 358, + 359, 5, 34, 0, 0, 359, 74, 1, 0, 0, 0, 360, 362, 7, 3, 0, 0, 361, 360, + 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 361, 1, 0, 0, 0, 363, 364, 1, 0, + 0, 0, 364, 366, 1, 0, 0, 0, 365, 367, 7, 4, 0, 0, 366, 365, 1, 0, 0, 0, + 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 370, 5, 47, 0, 0, 369, + 371, 7, 4, 0, 0, 370, 369, 1, 0, 0, 0, 370, 371, 1, 0, 0, 0, 371, 373, + 1, 0, 0, 0, 372, 374, 7, 3, 0, 0, 373, 372, 1, 0, 0, 0, 374, 375, 1, 0, + 0, 0, 375, 373, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 392, 1, 0, 0, 0, + 377, 379, 7, 3, 0, 0, 378, 377, 1, 0, 0, 0, 379, 380, 1, 0, 0, 0, 380, + 378, 1, 0, 0, 0, 380, 381, 1, 0, 0, 0, 381, 388, 1, 0, 0, 0, 382, 384, + 5, 46, 0, 0, 383, 385, 7, 3, 0, 0, 384, 383, 1, 0, 0, 0, 385, 386, 1, 0, + 0, 0, 386, 384, 1, 0, 0, 0, 386, 387, 1, 0, 0, 0, 387, 389, 1, 0, 0, 0, + 388, 382, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 390, 1, 0, 0, 0, 390, + 392, 5, 37, 0, 0, 391, 361, 1, 0, 0, 0, 391, 378, 1, 0, 0, 0, 392, 76, + 1, 0, 0, 0, 393, 394, 5, 114, 0, 0, 394, 395, 5, 101, 0, 0, 395, 396, 5, + 109, 0, 0, 396, 397, 5, 97, 0, 0, 397, 398, 5, 105, 0, 0, 398, 399, 5, + 110, 0, 0, 399, 400, 5, 105, 0, 0, 400, 401, 5, 110, 0, 0, 401, 402, 5, + 103, 0, 0, 402, 78, 1, 0, 0, 0, 403, 404, 5, 107, 0, 0, 404, 405, 5, 101, + 0, 0, 405, 406, 5, 112, 0, 0, 406, 407, 5, 116, 0, 0, 407, 80, 1, 0, 0, + 0, 408, 409, 5, 98, 0, 0, 409, 410, 5, 97, 0, 0, 410, 411, 5, 108, 0, 0, + 411, 412, 5, 97, 0, 0, 412, 413, 5, 110, 0, 0, 413, 414, 5, 99, 0, 0, 414, + 415, 5, 101, 0, 0, 415, 82, 1, 0, 0, 0, 416, 417, 5, 115, 0, 0, 417, 418, + 5, 97, 0, 0, 418, 419, 5, 118, 0, 0, 419, 420, 5, 101, 0, 0, 420, 84, 1, + 0, 0, 0, 421, 423, 7, 3, 0, 0, 422, 421, 1, 0, 0, 0, 423, 424, 1, 0, 0, + 0, 424, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 86, 1, 0, 0, 0, 426, + 427, 5, 37, 0, 0, 427, 88, 1, 0, 0, 0, 428, 430, 5, 36, 0, 0, 429, 431, + 7, 5, 0, 0, 430, 429, 1, 0, 0, 0, 431, 432, 1, 0, 0, 0, 432, 430, 1, 0, + 0, 0, 432, 433, 1, 0, 0, 0, 433, 437, 1, 0, 0, 0, 434, 436, 7, 6, 0, 0, + 435, 434, 1, 0, 0, 0, 436, 439, 1, 0, 0, 0, 437, 435, 1, 0, 0, 0, 437, + 438, 1, 0, 0, 0, 438, 90, 1, 0, 0, 0, 439, 437, 1, 0, 0, 0, 440, 442, 5, + 64, 0, 0, 441, 443, 7, 7, 0, 0, 442, 441, 1, 0, 0, 0, 443, 444, 1, 0, 0, + 0, 444, 442, 1, 0, 0, 0, 444, 445, 1, 0, 0, 0, 445, 449, 1, 0, 0, 0, 446, + 448, 7, 8, 0, 0, 447, 446, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 447, + 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 450, 92, 1, 0, 0, 0, 451, 449, 1, 0, + 0, 0, 452, 454, 7, 9, 0, 0, 453, 452, 1, 0, 0, 0, 454, 455, 1, 0, 0, 0, + 455, 453, 1, 0, 0, 0, 455, 456, 1, 0, 0, 0, 456, 94, 1, 0, 0, 0, 21, 0, + 156, 161, 170, 172, 186, 355, 363, 366, 370, 375, 380, 386, 388, 391, 424, + 432, 437, 444, 449, 455, 1, 6, 0, 0, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -352,9 +357,10 @@ const ( NumScriptLexerREMAINING = 39 NumScriptLexerKEPT = 40 NumScriptLexerBALANCE = 41 - NumScriptLexerNUMBER = 42 - NumScriptLexerPERCENT = 43 - NumScriptLexerVARIABLE_NAME = 44 - NumScriptLexerACCOUNT = 45 - NumScriptLexerASSET = 46 + NumScriptLexerSAVE = 42 + NumScriptLexerNUMBER = 43 + NumScriptLexerPERCENT = 44 + NumScriptLexerVARIABLE_NAME = 45 + NumScriptLexerACCOUNT = 46 + NumScriptLexerASSET = 47 ) diff --git a/pkg/machine/script/parser/numscript_listener.go b/pkg/machine/script/parser/numscript_listener.go index 280ef99cb..bf9a31377 100644 --- a/pkg/machine/script/parser/numscript_listener.go +++ b/pkg/machine/script/parser/numscript_listener.go @@ -110,6 +110,9 @@ type NumScriptListener interface { // EnterPrint is called when entering the Print production. EnterPrint(c *PrintContext) + // EnterSaveFromAccount is called when entering the SaveFromAccount production. + EnterSaveFromAccount(c *SaveFromAccountContext) + // EnterSetTxMeta is called when entering the SetTxMeta production. EnterSetTxMeta(c *SetTxMetaContext) @@ -242,6 +245,9 @@ type NumScriptListener interface { // ExitPrint is called when exiting the Print production. ExitPrint(c *PrintContext) + // ExitSaveFromAccount is called when exiting the SaveFromAccount production. + ExitSaveFromAccount(c *SaveFromAccountContext) + // ExitSetTxMeta is called when exiting the SetTxMeta production. ExitSetTxMeta(c *SetTxMetaContext) diff --git a/pkg/machine/script/parser/numscript_parser.go b/pkg/machine/script/parser/numscript_parser.go index 84ca909fd..bc1b1a0fd 100644 --- a/pkg/machine/script/parser/numscript_parser.go +++ b/pkg/machine/script/parser/numscript_parser.go @@ -38,7 +38,8 @@ func numscriptParserInit() { "'print'", "'fail'", "'send'", "'source'", "'from'", "'max'", "'destination'", "'to'", "'allocate'", "'+'", "'-'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'='", "'account'", "'asset'", "'number'", "'monetary'", "'portion'", - "'string'", "", "", "'remaining'", "'kept'", "'balance'", "", "'%'", + "'string'", "", "", "'remaining'", "'kept'", "'balance'", "'save'", + "", "'%'", } staticData.symbolicNames = []string{ "", "", "", "", "", "NEWLINE", "WHITESPACE", "MULTILINE_COMMENT", "LINE_COMMENT", @@ -46,8 +47,8 @@ func numscriptParserInit() { "SEND", "SOURCE", "FROM", "MAX", "DESTINATION", "TO", "ALLOCATE", "OP_ADD", "OP_SUB", "LPAREN", "RPAREN", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "EQ", "TY_ACCOUNT", "TY_ASSET", "TY_NUMBER", "TY_MONETARY", "TY_PORTION", - "TY_STRING", "STRING", "PORTION", "REMAINING", "KEPT", "BALANCE", "NUMBER", - "PERCENT", "VARIABLE_NAME", "ACCOUNT", "ASSET", + "TY_STRING", "STRING", "PORTION", "REMAINING", "KEPT", "BALANCE", "SAVE", + "NUMBER", "PERCENT", "VARIABLE_NAME", "ACCOUNT", "ASSET", } staticData.ruleNames = []string{ "monetary", "monetaryAll", "literal", "variable", "expression", "allotmentPortion", @@ -58,7 +59,7 @@ func numscriptParserInit() { } staticData.predictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 46, 284, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, + 4, 1, 47, 292, 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, @@ -75,33 +76,34 @@ func numscriptParserInit() { 13, 1, 13, 1, 14, 1, 14, 1, 14, 3, 14, 151, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 4, 15, 160, 8, 15, 11, 15, 12, 15, 161, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 168, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, - 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, - 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 192, 8, 17, - 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, - 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 212, 8, 17, - 1, 17, 1, 17, 1, 17, 3, 17, 217, 8, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, - 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, - 1, 19, 3, 19, 235, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 241, 8, 20, - 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 4, 21, 248, 8, 21, 11, 21, 12, 21, 249, - 4, 21, 252, 8, 21, 11, 21, 12, 21, 253, 1, 21, 1, 21, 1, 21, 1, 22, 5, - 22, 260, 8, 22, 10, 22, 12, 22, 263, 9, 22, 1, 22, 3, 22, 266, 8, 22, 1, - 22, 1, 22, 1, 22, 5, 22, 271, 8, 22, 10, 22, 12, 22, 274, 9, 22, 1, 22, - 5, 22, 277, 8, 22, 10, 22, 12, 22, 280, 9, 22, 1, 22, 1, 22, 1, 22, 0, - 1, 8, 23, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, - 34, 36, 38, 40, 42, 44, 0, 2, 1, 0, 22, 23, 1, 0, 31, 36, 295, 0, 46, 1, - 0, 0, 0, 2, 51, 1, 0, 0, 0, 4, 62, 1, 0, 0, 0, 6, 64, 1, 0, 0, 0, 8, 69, - 1, 0, 0, 0, 10, 82, 1, 0, 0, 0, 12, 84, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, - 16, 115, 1, 0, 0, 0, 18, 120, 1, 0, 0, 0, 20, 125, 1, 0, 0, 0, 22, 127, - 1, 0, 0, 0, 24, 131, 1, 0, 0, 0, 26, 142, 1, 0, 0, 0, 28, 150, 1, 0, 0, - 0, 30, 152, 1, 0, 0, 0, 32, 167, 1, 0, 0, 0, 34, 216, 1, 0, 0, 0, 36, 218, - 1, 0, 0, 0, 38, 234, 1, 0, 0, 0, 40, 236, 1, 0, 0, 0, 42, 242, 1, 0, 0, - 0, 44, 261, 1, 0, 0, 0, 46, 47, 5, 26, 0, 0, 47, 48, 3, 8, 4, 0, 48, 49, - 5, 42, 0, 0, 49, 50, 5, 27, 0, 0, 50, 1, 1, 0, 0, 0, 51, 52, 5, 26, 0, + 1, 17, 3, 17, 175, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, + 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, + 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 200, 8, 17, 1, 17, 1, + 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, + 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 220, 8, 17, 1, 17, 1, + 17, 1, 17, 3, 17, 225, 8, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, + 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, + 19, 243, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 249, 8, 20, 1, 21, 1, + 21, 1, 21, 1, 21, 1, 21, 4, 21, 256, 8, 21, 11, 21, 12, 21, 257, 4, 21, + 260, 8, 21, 11, 21, 12, 21, 261, 1, 21, 1, 21, 1, 21, 1, 22, 5, 22, 268, + 8, 22, 10, 22, 12, 22, 271, 9, 22, 1, 22, 3, 22, 274, 8, 22, 1, 22, 1, + 22, 1, 22, 5, 22, 279, 8, 22, 10, 22, 12, 22, 282, 9, 22, 1, 22, 5, 22, + 285, 8, 22, 10, 22, 12, 22, 288, 9, 22, 1, 22, 1, 22, 1, 22, 0, 1, 8, 23, + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, + 38, 40, 42, 44, 0, 2, 1, 0, 22, 23, 1, 0, 31, 36, 305, 0, 46, 1, 0, 0, + 0, 2, 51, 1, 0, 0, 0, 4, 62, 1, 0, 0, 0, 6, 64, 1, 0, 0, 0, 8, 69, 1, 0, + 0, 0, 10, 82, 1, 0, 0, 0, 12, 84, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, 16, + 115, 1, 0, 0, 0, 18, 120, 1, 0, 0, 0, 20, 125, 1, 0, 0, 0, 22, 127, 1, + 0, 0, 0, 24, 131, 1, 0, 0, 0, 26, 142, 1, 0, 0, 0, 28, 150, 1, 0, 0, 0, + 30, 152, 1, 0, 0, 0, 32, 167, 1, 0, 0, 0, 34, 224, 1, 0, 0, 0, 36, 226, + 1, 0, 0, 0, 38, 242, 1, 0, 0, 0, 40, 244, 1, 0, 0, 0, 42, 250, 1, 0, 0, + 0, 44, 269, 1, 0, 0, 0, 46, 47, 5, 26, 0, 0, 47, 48, 3, 8, 4, 0, 48, 49, + 5, 43, 0, 0, 49, 50, 5, 27, 0, 0, 50, 1, 1, 0, 0, 0, 51, 52, 5, 26, 0, 0, 52, 53, 3, 8, 4, 0, 53, 54, 5, 1, 0, 0, 54, 55, 5, 27, 0, 0, 55, 3, - 1, 0, 0, 0, 56, 63, 5, 45, 0, 0, 57, 63, 5, 46, 0, 0, 58, 63, 5, 42, 0, + 1, 0, 0, 0, 56, 63, 5, 46, 0, 0, 57, 63, 5, 47, 0, 0, 58, 63, 5, 43, 0, 0, 59, 63, 5, 37, 0, 0, 60, 63, 5, 38, 0, 0, 61, 63, 3, 0, 0, 0, 62, 56, 1, 0, 0, 0, 62, 57, 1, 0, 0, 0, 62, 58, 1, 0, 0, 0, 62, 59, 1, 0, 0, 0, - 62, 60, 1, 0, 0, 0, 62, 61, 1, 0, 0, 0, 63, 5, 1, 0, 0, 0, 64, 65, 5, 44, + 62, 60, 1, 0, 0, 0, 62, 61, 1, 0, 0, 0, 63, 5, 1, 0, 0, 0, 64, 65, 5, 45, 0, 0, 65, 7, 1, 0, 0, 0, 66, 67, 6, 4, -1, 0, 67, 70, 3, 4, 2, 0, 68, 70, 3, 6, 3, 0, 69, 66, 1, 0, 0, 0, 69, 68, 1, 0, 0, 0, 70, 76, 1, 0, 0, 0, 71, 72, 10, 3, 0, 0, 72, 73, 7, 0, 0, 0, 73, 75, 3, 8, 4, 4, 74, 71, 1, @@ -138,48 +140,51 @@ func numscriptParserInit() { 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 5, 29, 0, 0, 164, 31, 1, 0, 0, 0, 165, 168, 3, 28, 14, 0, 166, 168, 3, 30, 15, 0, 167, 165, 1, 0, 0, 0, 167, 166, 1, 0, 0, 0, 168, 33, 1, 0, 0, - 0, 169, 170, 5, 13, 0, 0, 170, 217, 3, 8, 4, 0, 171, 172, 5, 11, 0, 0, - 172, 173, 5, 24, 0, 0, 173, 174, 5, 37, 0, 0, 174, 175, 5, 4, 0, 0, 175, - 176, 3, 8, 4, 0, 176, 177, 5, 25, 0, 0, 177, 217, 1, 0, 0, 0, 178, 179, - 5, 12, 0, 0, 179, 180, 5, 24, 0, 0, 180, 181, 3, 8, 4, 0, 181, 182, 5, - 4, 0, 0, 182, 183, 5, 37, 0, 0, 183, 184, 5, 4, 0, 0, 184, 185, 3, 8, 4, - 0, 185, 186, 5, 25, 0, 0, 186, 217, 1, 0, 0, 0, 187, 217, 5, 14, 0, 0, - 188, 191, 5, 15, 0, 0, 189, 192, 3, 8, 4, 0, 190, 192, 3, 2, 1, 0, 191, - 189, 1, 0, 0, 0, 191, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, - 5, 24, 0, 0, 194, 211, 5, 5, 0, 0, 195, 196, 5, 16, 0, 0, 196, 197, 5, - 30, 0, 0, 197, 198, 3, 32, 16, 0, 198, 199, 5, 5, 0, 0, 199, 200, 5, 19, - 0, 0, 200, 201, 5, 30, 0, 0, 201, 202, 3, 18, 9, 0, 202, 212, 1, 0, 0, - 0, 203, 204, 5, 19, 0, 0, 204, 205, 5, 30, 0, 0, 205, 206, 3, 18, 9, 0, - 206, 207, 5, 5, 0, 0, 207, 208, 5, 16, 0, 0, 208, 209, 5, 30, 0, 0, 209, - 210, 3, 32, 16, 0, 210, 212, 1, 0, 0, 0, 211, 195, 1, 0, 0, 0, 211, 203, - 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 214, 5, 5, 0, 0, 214, 215, 5, 25, - 0, 0, 215, 217, 1, 0, 0, 0, 216, 169, 1, 0, 0, 0, 216, 171, 1, 0, 0, 0, - 216, 178, 1, 0, 0, 0, 216, 187, 1, 0, 0, 0, 216, 188, 1, 0, 0, 0, 217, - 35, 1, 0, 0, 0, 218, 219, 7, 1, 0, 0, 219, 37, 1, 0, 0, 0, 220, 221, 5, - 10, 0, 0, 221, 222, 5, 24, 0, 0, 222, 223, 3, 8, 4, 0, 223, 224, 5, 4, - 0, 0, 224, 225, 5, 37, 0, 0, 225, 226, 5, 25, 0, 0, 226, 235, 1, 0, 0, - 0, 227, 228, 5, 41, 0, 0, 228, 229, 5, 24, 0, 0, 229, 230, 3, 8, 4, 0, - 230, 231, 5, 4, 0, 0, 231, 232, 3, 8, 4, 0, 232, 233, 5, 25, 0, 0, 233, - 235, 1, 0, 0, 0, 234, 220, 1, 0, 0, 0, 234, 227, 1, 0, 0, 0, 235, 39, 1, - 0, 0, 0, 236, 237, 3, 36, 18, 0, 237, 240, 3, 6, 3, 0, 238, 239, 5, 30, - 0, 0, 239, 241, 3, 38, 19, 0, 240, 238, 1, 0, 0, 0, 240, 241, 1, 0, 0, - 0, 241, 41, 1, 0, 0, 0, 242, 243, 5, 9, 0, 0, 243, 244, 5, 28, 0, 0, 244, - 251, 5, 5, 0, 0, 245, 247, 3, 40, 20, 0, 246, 248, 5, 5, 0, 0, 247, 246, - 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 249, 250, 1, 0, - 0, 0, 250, 252, 1, 0, 0, 0, 251, 245, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, - 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, - 256, 5, 29, 0, 0, 256, 257, 5, 5, 0, 0, 257, 43, 1, 0, 0, 0, 258, 260, - 5, 5, 0, 0, 259, 258, 1, 0, 0, 0, 260, 263, 1, 0, 0, 0, 261, 259, 1, 0, - 0, 0, 261, 262, 1, 0, 0, 0, 262, 265, 1, 0, 0, 0, 263, 261, 1, 0, 0, 0, - 264, 266, 3, 42, 21, 0, 265, 264, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, - 267, 1, 0, 0, 0, 267, 272, 3, 34, 17, 0, 268, 269, 5, 5, 0, 0, 269, 271, - 3, 34, 17, 0, 270, 268, 1, 0, 0, 0, 271, 274, 1, 0, 0, 0, 272, 270, 1, - 0, 0, 0, 272, 273, 1, 0, 0, 0, 273, 278, 1, 0, 0, 0, 274, 272, 1, 0, 0, - 0, 275, 277, 5, 5, 0, 0, 276, 275, 1, 0, 0, 0, 277, 280, 1, 0, 0, 0, 278, - 276, 1, 0, 0, 0, 278, 279, 1, 0, 0, 0, 279, 281, 1, 0, 0, 0, 280, 278, - 1, 0, 0, 0, 281, 282, 5, 0, 0, 1, 282, 45, 1, 0, 0, 0, 25, 62, 69, 76, - 82, 93, 108, 115, 120, 125, 129, 138, 150, 161, 167, 191, 211, 216, 234, - 240, 249, 253, 261, 265, 272, 278, + 0, 169, 170, 5, 13, 0, 0, 170, 225, 3, 8, 4, 0, 171, 174, 5, 42, 0, 0, + 172, 175, 3, 8, 4, 0, 173, 175, 3, 2, 1, 0, 174, 172, 1, 0, 0, 0, 174, + 173, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 5, 17, 0, 0, 177, 178, + 3, 8, 4, 0, 178, 225, 1, 0, 0, 0, 179, 180, 5, 11, 0, 0, 180, 181, 5, 24, + 0, 0, 181, 182, 5, 37, 0, 0, 182, 183, 5, 4, 0, 0, 183, 184, 3, 8, 4, 0, + 184, 185, 5, 25, 0, 0, 185, 225, 1, 0, 0, 0, 186, 187, 5, 12, 0, 0, 187, + 188, 5, 24, 0, 0, 188, 189, 3, 8, 4, 0, 189, 190, 5, 4, 0, 0, 190, 191, + 5, 37, 0, 0, 191, 192, 5, 4, 0, 0, 192, 193, 3, 8, 4, 0, 193, 194, 5, 25, + 0, 0, 194, 225, 1, 0, 0, 0, 195, 225, 5, 14, 0, 0, 196, 199, 5, 15, 0, + 0, 197, 200, 3, 8, 4, 0, 198, 200, 3, 2, 1, 0, 199, 197, 1, 0, 0, 0, 199, + 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 24, 0, 0, 202, 219, + 5, 5, 0, 0, 203, 204, 5, 16, 0, 0, 204, 205, 5, 30, 0, 0, 205, 206, 3, + 32, 16, 0, 206, 207, 5, 5, 0, 0, 207, 208, 5, 19, 0, 0, 208, 209, 5, 30, + 0, 0, 209, 210, 3, 18, 9, 0, 210, 220, 1, 0, 0, 0, 211, 212, 5, 19, 0, + 0, 212, 213, 5, 30, 0, 0, 213, 214, 3, 18, 9, 0, 214, 215, 5, 5, 0, 0, + 215, 216, 5, 16, 0, 0, 216, 217, 5, 30, 0, 0, 217, 218, 3, 32, 16, 0, 218, + 220, 1, 0, 0, 0, 219, 203, 1, 0, 0, 0, 219, 211, 1, 0, 0, 0, 220, 221, + 1, 0, 0, 0, 221, 222, 5, 5, 0, 0, 222, 223, 5, 25, 0, 0, 223, 225, 1, 0, + 0, 0, 224, 169, 1, 0, 0, 0, 224, 171, 1, 0, 0, 0, 224, 179, 1, 0, 0, 0, + 224, 186, 1, 0, 0, 0, 224, 195, 1, 0, 0, 0, 224, 196, 1, 0, 0, 0, 225, + 35, 1, 0, 0, 0, 226, 227, 7, 1, 0, 0, 227, 37, 1, 0, 0, 0, 228, 229, 5, + 10, 0, 0, 229, 230, 5, 24, 0, 0, 230, 231, 3, 8, 4, 0, 231, 232, 5, 4, + 0, 0, 232, 233, 5, 37, 0, 0, 233, 234, 5, 25, 0, 0, 234, 243, 1, 0, 0, + 0, 235, 236, 5, 41, 0, 0, 236, 237, 5, 24, 0, 0, 237, 238, 3, 8, 4, 0, + 238, 239, 5, 4, 0, 0, 239, 240, 3, 8, 4, 0, 240, 241, 5, 25, 0, 0, 241, + 243, 1, 0, 0, 0, 242, 228, 1, 0, 0, 0, 242, 235, 1, 0, 0, 0, 243, 39, 1, + 0, 0, 0, 244, 245, 3, 36, 18, 0, 245, 248, 3, 6, 3, 0, 246, 247, 5, 30, + 0, 0, 247, 249, 3, 38, 19, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, + 0, 249, 41, 1, 0, 0, 0, 250, 251, 5, 9, 0, 0, 251, 252, 5, 28, 0, 0, 252, + 259, 5, 5, 0, 0, 253, 255, 3, 40, 20, 0, 254, 256, 5, 5, 0, 0, 255, 254, + 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, + 0, 0, 258, 260, 1, 0, 0, 0, 259, 253, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, + 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 263, 1, 0, 0, 0, 263, + 264, 5, 29, 0, 0, 264, 265, 5, 5, 0, 0, 265, 43, 1, 0, 0, 0, 266, 268, + 5, 5, 0, 0, 267, 266, 1, 0, 0, 0, 268, 271, 1, 0, 0, 0, 269, 267, 1, 0, + 0, 0, 269, 270, 1, 0, 0, 0, 270, 273, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, + 272, 274, 3, 42, 21, 0, 273, 272, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, + 275, 1, 0, 0, 0, 275, 280, 3, 34, 17, 0, 276, 277, 5, 5, 0, 0, 277, 279, + 3, 34, 17, 0, 278, 276, 1, 0, 0, 0, 279, 282, 1, 0, 0, 0, 280, 278, 1, + 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 286, 1, 0, 0, 0, 282, 280, 1, 0, 0, + 0, 283, 285, 5, 5, 0, 0, 284, 283, 1, 0, 0, 0, 285, 288, 1, 0, 0, 0, 286, + 284, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 289, 1, 0, 0, 0, 288, 286, + 1, 0, 0, 0, 289, 290, 5, 0, 0, 1, 290, 45, 1, 0, 0, 0, 26, 62, 69, 76, + 82, 93, 108, 115, 120, 125, 129, 138, 150, 161, 167, 174, 199, 219, 224, + 242, 248, 257, 261, 269, 273, 280, 286, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -259,11 +264,12 @@ const ( NumScriptParserREMAINING = 39 NumScriptParserKEPT = 40 NumScriptParserBALANCE = 41 - NumScriptParserNUMBER = 42 - NumScriptParserPERCENT = 43 - NumScriptParserVARIABLE_NAME = 44 - NumScriptParserACCOUNT = 45 - NumScriptParserASSET = 46 + NumScriptParserSAVE = 42 + NumScriptParserNUMBER = 43 + NumScriptParserPERCENT = 44 + NumScriptParserVARIABLE_NAME = 45 + NumScriptParserACCOUNT = 46 + NumScriptParserASSET = 47 ) // NumScriptParser rules. @@ -4210,6 +4216,116 @@ func (s *PrintContext) ExitRule(listener antlr.ParseTreeListener) { } } +type SaveFromAccountContext struct { + *StatementContext + mon IExpressionContext + monAll IMonetaryAllContext + acc IExpressionContext +} + +func NewSaveFromAccountContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SaveFromAccountContext { + var p = new(SaveFromAccountContext) + + p.StatementContext = NewEmptyStatementContext() + p.parser = parser + p.CopyFrom(ctx.(*StatementContext)) + + return p +} + +func (s *SaveFromAccountContext) GetMon() IExpressionContext { return s.mon } + +func (s *SaveFromAccountContext) GetMonAll() IMonetaryAllContext { return s.monAll } + +func (s *SaveFromAccountContext) GetAcc() IExpressionContext { return s.acc } + +func (s *SaveFromAccountContext) SetMon(v IExpressionContext) { s.mon = v } + +func (s *SaveFromAccountContext) SetMonAll(v IMonetaryAllContext) { s.monAll = v } + +func (s *SaveFromAccountContext) SetAcc(v IExpressionContext) { s.acc = v } + +func (s *SaveFromAccountContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SaveFromAccountContext) SAVE() antlr.TerminalNode { + return s.GetToken(NumScriptParserSAVE, 0) +} + +func (s *SaveFromAccountContext) FROM() antlr.TerminalNode { + return s.GetToken(NumScriptParserFROM, 0) +} + +func (s *SaveFromAccountContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *SaveFromAccountContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SaveFromAccountContext) MonetaryAll() IMonetaryAllContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IMonetaryAllContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IMonetaryAllContext) +} + +func (s *SaveFromAccountContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(NumScriptListener); ok { + listenerT.EnterSaveFromAccount(s) + } +} + +func (s *SaveFromAccountContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(NumScriptListener); ok { + listenerT.ExitSaveFromAccount(s) + } +} + type SetTxMetaContext struct { *StatementContext key antlr.Token @@ -4591,7 +4707,7 @@ func (p *NumScriptParser) Statement() (localctx IStatementContext) { } }() - p.SetState(216) + p.SetState(224) p.GetErrorHandler().Sync(p) switch p.GetTokenStream().LA(1) { @@ -4610,106 +4726,147 @@ func (p *NumScriptParser) Statement() (localctx IStatementContext) { localctx.(*PrintContext).expr = _x } - case NumScriptParserSET_TX_META: - localctx = NewSetTxMetaContext(p, localctx) + case NumScriptParserSAVE: + localctx = NewSaveFromAccountContext(p, localctx) p.EnterOuterAlt(localctx, 2) { p.SetState(171) + p.Match(NumScriptParserSAVE) + } + p.SetState(174) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) { + case 1: + { + p.SetState(172) + + var _x = p.expression(0) + + localctx.(*SaveFromAccountContext).mon = _x + } + + case 2: + { + p.SetState(173) + + var _x = p.MonetaryAll() + + localctx.(*SaveFromAccountContext).monAll = _x + } + + } + { + p.SetState(176) + p.Match(NumScriptParserFROM) + } + { + p.SetState(177) + + var _x = p.expression(0) + + localctx.(*SaveFromAccountContext).acc = _x + } + + case NumScriptParserSET_TX_META: + localctx = NewSetTxMetaContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(179) p.Match(NumScriptParserSET_TX_META) } { - p.SetState(172) + p.SetState(180) p.Match(NumScriptParserLPAREN) } { - p.SetState(173) + p.SetState(181) var _m = p.Match(NumScriptParserSTRING) localctx.(*SetTxMetaContext).key = _m } { - p.SetState(174) + p.SetState(182) p.Match(NumScriptParserT__3) } { - p.SetState(175) + p.SetState(183) var _x = p.expression(0) localctx.(*SetTxMetaContext).value = _x } { - p.SetState(176) + p.SetState(184) p.Match(NumScriptParserRPAREN) } case NumScriptParserSET_ACCOUNT_META: localctx = NewSetAccountMetaContext(p, localctx) - p.EnterOuterAlt(localctx, 3) + p.EnterOuterAlt(localctx, 4) { - p.SetState(178) + p.SetState(186) p.Match(NumScriptParserSET_ACCOUNT_META) } { - p.SetState(179) + p.SetState(187) p.Match(NumScriptParserLPAREN) } { - p.SetState(180) + p.SetState(188) var _x = p.expression(0) localctx.(*SetAccountMetaContext).acc = _x } { - p.SetState(181) + p.SetState(189) p.Match(NumScriptParserT__3) } { - p.SetState(182) + p.SetState(190) var _m = p.Match(NumScriptParserSTRING) localctx.(*SetAccountMetaContext).key = _m } { - p.SetState(183) + p.SetState(191) p.Match(NumScriptParserT__3) } { - p.SetState(184) + p.SetState(192) var _x = p.expression(0) localctx.(*SetAccountMetaContext).value = _x } { - p.SetState(185) + p.SetState(193) p.Match(NumScriptParserRPAREN) } case NumScriptParserFAIL: localctx = NewFailContext(p, localctx) - p.EnterOuterAlt(localctx, 4) + p.EnterOuterAlt(localctx, 5) { - p.SetState(187) + p.SetState(195) p.Match(NumScriptParserFAIL) } case NumScriptParserSEND: localctx = NewSendContext(p, localctx) - p.EnterOuterAlt(localctx, 5) + p.EnterOuterAlt(localctx, 6) { - p.SetState(188) + p.SetState(196) p.Match(NumScriptParserSEND) } - p.SetState(191) + p.SetState(199) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 15, p.GetParserRuleContext()) { case 1: { - p.SetState(189) + p.SetState(197) var _x = p.expression(0) @@ -4718,7 +4875,7 @@ func (p *NumScriptParser) Statement() (localctx IStatementContext) { case 2: { - p.SetState(190) + p.SetState(198) var _x = p.MonetaryAll() @@ -4727,47 +4884,47 @@ func (p *NumScriptParser) Statement() (localctx IStatementContext) { } { - p.SetState(193) + p.SetState(201) p.Match(NumScriptParserLPAREN) } { - p.SetState(194) + p.SetState(202) p.Match(NumScriptParserNEWLINE) } - p.SetState(211) + p.SetState(219) p.GetErrorHandler().Sync(p) switch p.GetTokenStream().LA(1) { case NumScriptParserSOURCE: { - p.SetState(195) + p.SetState(203) p.Match(NumScriptParserSOURCE) } { - p.SetState(196) + p.SetState(204) p.Match(NumScriptParserEQ) } { - p.SetState(197) + p.SetState(205) var _x = p.ValueAwareSource() localctx.(*SendContext).src = _x } { - p.SetState(198) + p.SetState(206) p.Match(NumScriptParserNEWLINE) } { - p.SetState(199) + p.SetState(207) p.Match(NumScriptParserDESTINATION) } { - p.SetState(200) + p.SetState(208) p.Match(NumScriptParserEQ) } { - p.SetState(201) + p.SetState(209) var _x = p.Destination() @@ -4776,34 +4933,34 @@ func (p *NumScriptParser) Statement() (localctx IStatementContext) { case NumScriptParserDESTINATION: { - p.SetState(203) + p.SetState(211) p.Match(NumScriptParserDESTINATION) } { - p.SetState(204) + p.SetState(212) p.Match(NumScriptParserEQ) } { - p.SetState(205) + p.SetState(213) var _x = p.Destination() localctx.(*SendContext).dest = _x } { - p.SetState(206) + p.SetState(214) p.Match(NumScriptParserNEWLINE) } { - p.SetState(207) + p.SetState(215) p.Match(NumScriptParserSOURCE) } { - p.SetState(208) + p.SetState(216) p.Match(NumScriptParserEQ) } { - p.SetState(209) + p.SetState(217) var _x = p.ValueAwareSource() @@ -4814,11 +4971,11 @@ func (p *NumScriptParser) Statement() (localctx IStatementContext) { panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) } { - p.SetState(213) + p.SetState(221) p.Match(NumScriptParserNEWLINE) } { - p.SetState(214) + p.SetState(222) p.Match(NumScriptParserRPAREN) } @@ -4937,7 +5094,7 @@ func (p *NumScriptParser) Type_() (localctx IType_Context) { p.EnterOuterAlt(localctx, 1) { - p.SetState(218) + p.SetState(226) _la = p.GetTokenStream().LA(1) if !(((_la-31)&-(0x1f+1)) == 0 && ((1< OP_TX_META // OP_ACCOUNT_META // + OP_SAVE ) func OpcodeName(op byte) string { @@ -77,6 +78,8 @@ func OpcodeName(op byte) string { return "OP_TX_META" case OP_ACCOUNT_META: return "OP_ACCOUNT_META" + case OP_SAVE: + return "OP_SAVE" default: return "Unknown opcode" }