diff --git a/ferret.go b/ferret.go index 5d845ccb..20fa5db1 100644 --- a/ferret.go +++ b/ferret.go @@ -22,7 +22,7 @@ func New(setters ...Option) *Instance { } func (i *Instance) Functions() runtime.Namespace { - return i.compiler + return nil } //func (i *Instance) Drivers() *drivers.Container { diff --git a/go.mod b/go.mod index 1050a6ed..3c43d529 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,15 @@ module github.com/MontFerret/ferret -go 1.22 +go 1.23.0 -toolchain go1.24.4 +toolchain go1.24.5 require ( github.com/antlr4-go/antlr/v4 v4.13.1 github.com/gobwas/glob v0.2.3 - github.com/jarcoal/httpmock v1.3.1 + github.com/jarcoal/httpmock v1.4.0 github.com/pkg/errors v0.9.1 - github.com/rs/zerolog v1.31.0 + github.com/rs/zerolog v1.34.0 github.com/smartystreets/goconvey v1.8.1 github.com/wI2L/jettison v0.7.4 ) @@ -17,9 +17,9 @@ require ( require ( github.com/gopherjs/gopherjs v1.17.2 // indirect github.com/jtolds/gls v4.20.0+incompatible // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/smarty/assertions v1.15.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/sys v0.12.0 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/smarty/assertions v1.16.0 // indirect + golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect + golang.org/x/sys v0.34.0 // indirect ) diff --git a/go.sum b/go.sum index 14f9f251..b6a2723d 100644 --- a/go.sum +++ b/go.sum @@ -1,48 +1,37 @@ github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= -github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= -github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jarcoal/httpmock v1.4.0 h1:BvhqnH0JAYbNudL2GMJKgOHe2CtKlzJ/5rWKyp+hc2k= +github.com/jarcoal/httpmock v1.4.0/go.mod h1:ftW1xULwo+j0R0JJkJIIi7UKigZUXCLLanykgjwBXL0= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= -github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= -github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= -github.com/segmentio/encoding v0.3.4 h1:WM4IBnxH8B9TakiM2QD5LyNl9JSndh88QbHqVC+Pauc= -github.com/segmentio/encoding v0.3.4/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= -github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= -github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= +github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= +github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= +github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= +github.com/smarty/assertions v1.16.0 h1:EvHNkdRA4QHMrn75NZSoUQ/mAUXAYWfatfB01yTCzfY= +github.com/smarty/assertions v1.16.0/go.mod h1:duaaFdCS0K9dnoM50iyek/eYINOZ64gbh1Xlf6LG7AI= github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= github.com/wI2L/jettison v0.7.4 h1:ptjriu75R/k5RAZO0DJzy2t55f7g+dPiBxBY38icaKg= github.com/wI2L/jettison v0.7.4/go.mod h1:O+F+T7X7ZN6kTsd167Qk4aZMC8jNrH48SMedNmkfPb0= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= +golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= diff --git a/options.go b/options.go index 576b6b93..3cbd7cf5 100644 --- a/options.go +++ b/options.go @@ -24,6 +24,6 @@ func NewOptions(setters []Option) *Options { func WithoutStdlib() Option { return func(opts *Options) { - opts.compiler = append(opts.compiler, compiler.WithoutStdlib()) + //opts.compiler = append(opts.compiler, compiler.WithoutStdlib()) } } diff --git a/pkg/compiler/internal/core/aggregate_selector.go b/pkg/compiler/internal/core/aggregate_selector.go new file mode 100644 index 00000000..ad8b1aad --- /dev/null +++ b/pkg/compiler/internal/core/aggregate_selector.go @@ -0,0 +1,44 @@ +package core + +import ( + "github.com/MontFerret/ferret/pkg/runtime" + "github.com/MontFerret/ferret/pkg/vm" +) + +type AggregateSelector struct { + name runtime.String + args int + funcName runtime.String + protectedCall bool + register vm.Operand +} + +func NewAggregateSelector(name runtime.String, args int, funcName runtime.String, protectedCall bool, register vm.Operand) *AggregateSelector { + return &AggregateSelector{ + name: name, + register: register, + args: args, + funcName: funcName, + protectedCall: protectedCall, + } +} + +func (s *AggregateSelector) Name() runtime.String { + return s.name +} + +func (s *AggregateSelector) Args() int { + return s.args +} + +func (s *AggregateSelector) FuncName() runtime.String { + return s.funcName +} + +func (s *AggregateSelector) ProtectedCall() bool { + return s.protectedCall +} + +func (s *AggregateSelector) Register() vm.Operand { + return s.register +} diff --git a/pkg/compiler/internal/core/collect_selector.go b/pkg/compiler/internal/core/collect_selector.go new file mode 100644 index 00000000..cafb847f --- /dev/null +++ b/pkg/compiler/internal/core/collect_selector.go @@ -0,0 +1,19 @@ +package core + +import ( + "github.com/MontFerret/ferret/pkg/runtime" +) + +type CollectSelector struct { + name runtime.String +} + +func NewCollectSelector(name runtime.String) *CollectSelector { + return &CollectSelector{ + name: name, + } +} + +func (s *CollectSelector) Name() runtime.String { + return s.name +} diff --git a/pkg/compiler/internal/core/collector_projection.go b/pkg/compiler/internal/core/collector_projection.go new file mode 100644 index 00000000..dc05b629 --- /dev/null +++ b/pkg/compiler/internal/core/collector_projection.go @@ -0,0 +1,40 @@ +package core + +type CollectorProjection struct { + groupsVariable string + countVariable string +} + +func NewCollectorGroupProjection(groupsVariable string) *CollectorProjection { + return &CollectorProjection{ + groupsVariable: groupsVariable, + countVariable: "", + } +} + +func NewCollectorCountProjection(countVariable string) *CollectorProjection { + return &CollectorProjection{ + groupsVariable: "", + countVariable: countVariable, + } +} + +func (p *CollectorProjection) VariableName() string { + if p.groupsVariable != "" { + return p.groupsVariable + } + + if p.countVariable != "" { + return p.countVariable + } + + return "" +} + +func (p *CollectorProjection) IsGrouped() bool { + return p.groupsVariable != "" +} + +func (p *CollectorProjection) IsCounted() bool { + return p.countVariable != "" +} diff --git a/pkg/compiler/internal/core/collector_spec.go b/pkg/compiler/internal/core/collector_spec.go new file mode 100644 index 00000000..e2f88f8f --- /dev/null +++ b/pkg/compiler/internal/core/collector_spec.go @@ -0,0 +1,74 @@ +package core + +type ( + CollectorType int + + CollectorSpec struct { + typ CollectorType + projection *CollectorProjection + groupSelectors []*CollectSelector + aggregationSelectors []*AggregateSelector + } +) + +const ( + CollectorTypeCounter CollectorType = iota + CollectorTypeKey + CollectorTypeKeyCounter + CollectorTypeKeyGroup +) + +func NewCollectorSpec(type_ CollectorType, projection *CollectorProjection, groupSelectors []*CollectSelector, aggregationSelectors []*AggregateSelector) *CollectorSpec { + return &CollectorSpec{ + typ: type_, + projection: projection, + groupSelectors: groupSelectors, + aggregationSelectors: aggregationSelectors, + } +} + +func DetermineCollectorType(withGrouping, withAggregation bool, projection *CollectorProjection) CollectorType { + withProjection := projection != nil + + if withGrouping { + if withProjection && projection.IsCounted() { + return CollectorTypeKeyCounter + } + + return CollectorTypeKeyGroup + } + + if withAggregation { + return CollectorTypeKeyGroup + } + + return CollectorTypeCounter +} + +func (c *CollectorSpec) Type() CollectorType { + return c.typ +} + +func (c *CollectorSpec) Projection() *CollectorProjection { + return c.projection +} + +func (c *CollectorSpec) GroupSelectors() []*CollectSelector { + return c.groupSelectors +} + +func (c *CollectorSpec) AggregationSelectors() []*AggregateSelector { + return c.aggregationSelectors +} + +func (c *CollectorSpec) HasProjection() bool { + return c.projection != nil +} + +func (c *CollectorSpec) HasGrouping() bool { + return len(c.groupSelectors) > 0 +} + +func (c *CollectorSpec) HasAggregation() bool { + return len(c.aggregationSelectors) > 0 +} diff --git a/pkg/compiler/internal/core/loop.go b/pkg/compiler/internal/core/loop.go index c03063ad..8dad9d59 100644 --- a/pkg/compiler/internal/core/loop.go +++ b/pkg/compiler/internal/core/loop.go @@ -22,15 +22,6 @@ const ( DoWhileLoop ) -type CollectorType int - -const ( - CollectorTypeCounter CollectorType = iota - CollectorTypeKey - CollectorTypeKeyCounter - CollectorTypeKeyGroup -) - type Loop struct { Kind LoopKind Type LoopType diff --git a/pkg/compiler/internal/expr.go b/pkg/compiler/internal/expr.go index 0b9d01c4..a17440e9 100644 --- a/pkg/compiler/internal/expr.go +++ b/pkg/compiler/internal/expr.go @@ -1,11 +1,12 @@ package internal import ( + "regexp" + "github.com/MontFerret/ferret/pkg/compiler/internal/core" "github.com/MontFerret/ferret/pkg/parser/fql" "github.com/MontFerret/ferret/pkg/runtime" "github.com/MontFerret/ferret/pkg/vm" - "regexp" ) // Runtime functions diff --git a/pkg/compiler/internal/helpers.go b/pkg/compiler/internal/helpers.go index c287a384..5fb53156 100644 --- a/pkg/compiler/internal/helpers.go +++ b/pkg/compiler/internal/helpers.go @@ -1,9 +1,10 @@ package internal import ( - "github.com/MontFerret/ferret/pkg/parser/fql" "strings" + "github.com/MontFerret/ferret/pkg/parser/fql" + "github.com/antlr4-go/antlr/v4" "github.com/MontFerret/ferret/pkg/compiler/internal/core" diff --git a/pkg/compiler/internal/loop_collect.go b/pkg/compiler/internal/loop_collect.go index b5242e88..da200f34 100644 --- a/pkg/compiler/internal/loop_collect.go +++ b/pkg/compiler/internal/loop_collect.go @@ -3,21 +3,13 @@ package internal import ( "github.com/MontFerret/ferret/pkg/compiler/internal/core" "github.com/MontFerret/ferret/pkg/parser/fql" + "github.com/MontFerret/ferret/pkg/runtime" "github.com/MontFerret/ferret/pkg/vm" ) -type ( - LoopCollectCompiler struct { - ctx *CompilerContext - } - - collectorScope struct { - Type core.CollectorType - Projection string - GroupSelectors []fql.ICollectSelectorContext - AggregationSelectors []*aggregateSelector - } -) +type LoopCollectCompiler struct { + ctx *CompilerContext +} func NewCollectCompiler(ctx *CompilerContext) *LoopCollectCompiler { return &LoopCollectCompiler{ctx: ctx} @@ -29,50 +21,49 @@ func (c *LoopCollectCompiler) Compile(ctx fql.ICollectClauseContext) { c.compileLoop(scope) } -func (c *LoopCollectCompiler) compileCollector(ctx fql.ICollectClauseContext) *collectorScope { +func (c *LoopCollectCompiler) compileCollector(ctx fql.ICollectClauseContext) *core.CollectorSpec { grouping := ctx.CollectGrouping() counter := ctx.CollectCounter() aggregation := ctx.CollectAggregator() // We gather keys and values for the collector. kv, groupSelectors := c.initializeGrouping(grouping) - projectionVarName, collectorType := c.initializeProjection(ctx, kv, counter, grouping != nil) - - // If we use aggregators, we need to collect group items by key - if aggregation != nil && collectorType != core.CollectorTypeKeyGroup { - // We need to patch the loop result to be a collector - collectorType = core.CollectorTypeKeyGroup - } + projection := c.initializeProjection(ctx, kv, counter) loop := c.ctx.Loops.Current() + collectorType := core.DetermineCollectorType(len(groupSelectors) > 0, aggregation != nil, projection) // We replace DataSet initialization with Collector initialization dst := loop.PatchDestinationAx(c.ctx.Registers, c.ctx.Emitter, vm.OpDataSetCollector, int(collectorType)) - var aggregationSelectors []*aggregateSelector + var aggregationSelectors []*core.AggregateSelector // Fuse aggregation loop if aggregation != nil { - aggregationSelectors = c.initializeAggregation(aggregation, dst, kv, len(aggregationSelectors) > 0) + aggregationSelectors = c.initializeAggregation(aggregation, dst, kv, len(groupSelectors) > 0) } - c.finalizeCollector(dst, kv, len(groupSelectors) > 0, aggregation != nil) + scope := core.NewCollectorSpec(collectorType, projection, groupSelectors, aggregationSelectors) + + c.finalizeCollector(dst, kv, scope) // We no longer need KV, so we free registers c.ctx.Registers.Free(kv.Key) c.ctx.Registers.Free(kv.Value) - return &collectorScope{collectorType, projectionVarName, groupSelectors, aggregationSelectors} + return scope } -func (c *LoopCollectCompiler) finalizeCollector(dst vm.Operand, kv *core.KV, withGrouping bool, withAggregation bool) { +func (c *LoopCollectCompiler) finalizeCollector(dst vm.Operand, kv *core.KV, spec *core.CollectorSpec) { loop := c.ctx.Loops.Current() // If we do not use grouping but use aggregation, we do not need to push the key and value // because they are already pushed by the global aggregation. - push := withGrouping || !withAggregation - - if push { - c.ctx.Emitter.EmitABC(vm.OpPushKV, dst, kv.Key, kv.Value) + if spec.HasGrouping() || !spec.HasAggregation() { + c.ctx.Emitter.EmitPushKV(dst, kv.Key, kv.Value) + } else if spec.HasProjection() { + key := loadConstant(c.ctx, runtime.String(spec.Projection().VariableName())) + c.ctx.Emitter.EmitPushKV(dst, key, kv.Value) + c.ctx.Registers.Free(key) } loop.EmitFinalization(c.ctx.Emitter) @@ -81,7 +72,7 @@ func (c *LoopCollectCompiler) finalizeCollector(dst vm.Operand, kv *core.KV, wit c.ctx.Emitter.EmitMove(loop.Src, dst) } -func (c *LoopCollectCompiler) compileLoop(scope *collectorScope) { +func (c *LoopCollectCompiler) compileLoop(spec *core.CollectorSpec) { loop := c.ctx.Loops.Current() // If we are using a projection, we need to ensure the loop is set to ForInLoop @@ -97,27 +88,23 @@ func (c *LoopCollectCompiler) compileLoop(scope *collectorScope) { loop.Key = c.ctx.Registers.Allocate(core.Temp) } - withGrouping := len(scope.GroupSelectors) > 0 - withAggregation := len(scope.AggregationSelectors) > 0 - doInit := withGrouping || !withAggregation + doInit := spec.HasGrouping() || !spec.HasAggregation() if doInit { loop.EmitInitialization(c.ctx.Registers, c.ctx.Emitter, c.ctx.Loops.Depth()) } - if withAggregation { - c.unpackGroupedValues(scope.AggregationSelectors, withGrouping) - c.compileAggregation(scope.AggregationSelectors, withGrouping) + if spec.HasAggregation() { + c.unpackGroupedValues(spec) + c.compileAggregation(spec) } // If the projection is used, we allocate a new register for the variable and put the iterator's value into it - if scope.Projection != "" { - // Now we need to expand group variables from the dataset - loop.ValueName = scope.Projection - c.ctx.Symbols.AssignLocal(loop.ValueName, core.TypeUnknown, loop.Value) + if spec.HasProjection() { + c.finalizeProjection(spec) } - if withGrouping { - c.compileGrouping(scope.Type, scope.GroupSelectors) + if spec.HasGrouping() { + c.compileGrouping(spec) } } diff --git a/pkg/compiler/internal/loop_collect_agg.go b/pkg/compiler/internal/loop_collect_agg.go index b5c476fb..c9537a79 100644 --- a/pkg/compiler/internal/loop_collect_agg.go +++ b/pkg/compiler/internal/loop_collect_agg.go @@ -1,24 +1,17 @@ package internal import ( + "strconv" + "github.com/MontFerret/ferret/pkg/compiler/internal/core" "github.com/MontFerret/ferret/pkg/parser/fql" "github.com/MontFerret/ferret/pkg/runtime" "github.com/MontFerret/ferret/pkg/vm" - "strconv" ) -type aggregateSelector struct { - Name runtime.String - Register vm.Operand - Args int - FuncName runtime.String - ProtectedCall bool -} - -func (c *LoopCollectCompiler) initializeAggregation(ctx fql.ICollectAggregatorContext, dst vm.Operand, kv *core.KV, withGrouping bool) []*aggregateSelector { +func (c *LoopCollectCompiler) initializeAggregation(ctx fql.ICollectAggregatorContext, dst vm.Operand, kv *core.KV, withGrouping bool) []*core.AggregateSelector { selectors := ctx.AllCollectAggregateSelector() - var compiledSelectors []*aggregateSelector + var compiledSelectors []*core.AggregateSelector // if we have grouping, we need to pack the selectors into the collector value if withGrouping { @@ -34,22 +27,22 @@ func (c *LoopCollectCompiler) initializeAggregation(ctx fql.ICollectAggregatorCo return compiledSelectors } -func (c *LoopCollectCompiler) packGroupedValues(kv *core.KV, selectors []*aggregateSelector) { +func (c *LoopCollectCompiler) packGroupedValues(kv *core.KV, selectors []*core.AggregateSelector) { // We need to add the loop value to the array seq := c.ctx.Registers.AllocateSequence(len(selectors) + 1) c.ctx.Emitter.EmitMove(seq[0], kv.Value) for i, selector := range selectors { - c.ctx.Emitter.EmitMove(seq[i+1], selector.Register) - c.ctx.Registers.Free(selector.Register) + c.ctx.Emitter.EmitMove(seq[i+1], selector.Register()) + c.ctx.Registers.Free(selector.Register()) } // Now we need to wrap the selectors into a single array with the loop value c.ctx.Emitter.EmitArray(kv.Value, seq) } -func (c *LoopCollectCompiler) compileGroupedAggregationSelectors(selectors []fql.ICollectAggregateSelectorContext) []*aggregateSelector { - wrappedSelectors := make([]*aggregateSelector, 0, len(selectors)) +func (c *LoopCollectCompiler) compileGroupedAggregationSelectors(selectors []fql.ICollectAggregateSelectorContext) []*core.AggregateSelector { + wrappedSelectors := make([]*core.AggregateSelector, 0, len(selectors)) for i := 0; i < len(selectors); i++ { selector := selectors[i] @@ -79,20 +72,14 @@ func (c *LoopCollectCompiler) compileGroupedAggregationSelectors(selectors []fql isProtected := fce.ErrorOperator() != nil // Collect information about the selector to unpack it later - wrappedSelectors = append(wrappedSelectors, &aggregateSelector{ - Name: name, - Args: len(args), - Register: selectorArg, - FuncName: funcName, - ProtectedCall: isProtected, - }) + wrappedSelectors = append(wrappedSelectors, core.NewAggregateSelector(name, len(args), funcName, isProtected, selectorArg)) } return wrappedSelectors } -func (c *LoopCollectCompiler) compileGlobalAggregationSelectors(selectors []fql.ICollectAggregateSelectorContext, dst vm.Operand) []*aggregateSelector { - wrappedSelectors := make([]*aggregateSelector, 0, len(selectors)) +func (c *LoopCollectCompiler) compileGlobalAggregationSelectors(selectors []fql.ICollectAggregateSelectorContext, dst vm.Operand) []*core.AggregateSelector { + wrappedSelectors := make([]*core.AggregateSelector, 0, len(selectors)) for i := 0; i < len(selectors); i++ { selector := selectors[i] @@ -123,12 +110,7 @@ func (c *LoopCollectCompiler) compileGlobalAggregationSelectors(selectors []fql. isProtected := fce.ErrorOperator() != nil // Collect information about the selector to unpack it later - wrappedSelectors = append(wrappedSelectors, &aggregateSelector{ - Name: name, - Args: len(args), - FuncName: funcName, - ProtectedCall: isProtected, - }) + wrappedSelectors = append(wrappedSelectors, core.NewAggregateSelector(name, len(args), funcName, isProtected, vm.NoopOperand)) c.ctx.Registers.FreeSequence(args) } @@ -136,8 +118,8 @@ func (c *LoopCollectCompiler) compileGlobalAggregationSelectors(selectors []fql. return wrappedSelectors } -func (c *LoopCollectCompiler) unpackGroupedValues(selectors []*aggregateSelector, withGrouping bool) { - if !withGrouping { +func (c *LoopCollectCompiler) unpackGroupedValues(spec *core.CollectorSpec) { + if !spec.HasGrouping() { return } @@ -146,22 +128,22 @@ func (c *LoopCollectCompiler) unpackGroupedValues(selectors []*aggregateSelector loadIndex(c.ctx, valReg, loop.Value, 0) - for i, selector := range selectors { - loadIndex(c.ctx, selector.Register, loop.Value, i+1) + for i, selector := range spec.AggregationSelectors() { + loadIndex(c.ctx, selector.Register(), loop.Value, i+1) } c.ctx.Registers.Free(valReg) } -func (c *LoopCollectCompiler) compileAggregation(vars []*aggregateSelector, withGrouping bool) { - if withGrouping { - c.compileGroupedAggregation(vars) +func (c *LoopCollectCompiler) compileAggregation(spec *core.CollectorSpec) { + if spec.HasGrouping() { + c.compileGroupedAggregation(spec) } else { - c.compileGlobalAggregation(vars) + c.compileGlobalAggregation(spec) } } -func (c *LoopCollectCompiler) compileGroupedAggregation(selectors []*aggregateSelector) { +func (c *LoopCollectCompiler) compileGroupedAggregation(spec *core.CollectorSpec) { //parentLoop := c.ctx.Loops.Current() //// We need to allocate a temporary accumulator to store aggregation results //selectors := ctx.AllCollectAggregateSelector() @@ -191,7 +173,7 @@ func (c *LoopCollectCompiler) compileGroupedAggregation(selectors []*aggregateSe //c.ctx.Registers.Free(accumulator) } -func (c *LoopCollectCompiler) compileGlobalAggregation(selectors []*aggregateSelector) { +func (c *LoopCollectCompiler) compileGlobalAggregation(spec *core.CollectorSpec) { // At this point, it's finalized. prevLoop := c.ctx.Loops.Pop() c.ctx.Registers.Free(prevLoop.Key) @@ -217,12 +199,12 @@ func (c *LoopCollectCompiler) compileGlobalAggregation(selectors []*aggregateSel loop.EmitInitialization(c.ctx.Registers, c.ctx.Emitter, c.ctx.Loops.Depth()) // We just need to take the grouped values and call aggregation functions using them as args - c.compileAggregationFuncCalls(selectors, prevLoop.Dst) + c.compileAggregationFuncCalls(spec.AggregationSelectors(), prevLoop.Dst) c.ctx.Registers.Free(prevLoop.Dst) } -func (c *LoopCollectCompiler) compileAggregationFuncCalls(selectors []*aggregateSelector, aggregator vm.Operand) { +func (c *LoopCollectCompiler) compileAggregationFuncCalls(selectors []*core.AggregateSelector, aggregator vm.Operand) { // Gets the number of records in the accumulator cond := c.ctx.Registers.Allocate(core.Temp) c.ctx.Emitter.EmitAB(vm.OpLength, cond, aggregator) @@ -242,27 +224,27 @@ func (c *LoopCollectCompiler) compileAggregationFuncCalls(selectors []*aggregate var args core.RegisterSequence // We need to unpack arguments - if selector.Args > 1 { - args = c.ctx.Registers.AllocateSequence(selector.Args) + if selector.Args() > 1 { + args = c.ctx.Registers.AllocateSequence(selector.Args()) for y, reg := range args { - argKeyReg := c.loadAggregationArgKey(selector.Name, y) + argKeyReg := c.loadAggregationArgKey(selector.Name(), y) c.ctx.Emitter.EmitABC(vm.OpLoadKey, reg, aggregator, argKeyReg) c.ctx.Registers.Free(argKeyReg) } } else { - key := loadConstant(c.ctx, runtime.String(selector.Name)) + key := loadConstant(c.ctx, selector.Name()) value := c.ctx.Registers.Allocate(core.Temp) c.ctx.Emitter.EmitABC(vm.OpLoadKey, value, aggregator, key) args = core.RegisterSequence{value} c.ctx.Registers.Free(key) } - result := c.ctx.ExprCompiler.CompileFunctionCallByNameWith(selector.FuncName, selector.ProtectedCall, args) + result := c.ctx.ExprCompiler.CompileFunctionCallByNameWith(selector.FuncName(), selector.ProtectedCall(), args) // We define the variable for the selector result in the upper scope // Since this temporary scope is only for aggregators and will be closed after the aggregation - selectorVarName := selector.Name + selectorVarName := selector.Name() varReg := c.ctx.Symbols.DeclareLocal(selectorVarName.String(), core.TypeUnknown) selectorVarRegs[i] = varReg c.ctx.Emitter.EmitAB(vm.OpMove, varReg, result) @@ -280,9 +262,9 @@ func (c *LoopCollectCompiler) compileAggregationFuncCalls(selectors []*aggregate c.ctx.Registers.Free(cond) } -func (c *LoopCollectCompiler) compileAggregationFuncCall(selector *aggregateSelector) { - varReg := c.ctx.Symbols.DeclareLocal(selector.Name.String(), core.TypeUnknown) - loadIndex(c.ctx, varReg, selector.Register, 1) +func (c *LoopCollectCompiler) compileAggregationFuncCall(selector *core.AggregateSelector) { + varReg := c.ctx.Symbols.DeclareLocal(selector.Name().String(), core.TypeUnknown) + loadIndex(c.ctx, varReg, selector.Register(), 1) } func (c *LoopCollectCompiler) loadAggregationArgKey(selector runtime.String, arg int) vm.Operand { diff --git a/pkg/compiler/internal/loop_collect_grp.go b/pkg/compiler/internal/loop_collect_grp.go index 48caedf9..360d3fff 100644 --- a/pkg/compiler/internal/loop_collect_grp.go +++ b/pkg/compiler/internal/loop_collect_grp.go @@ -8,8 +8,8 @@ import ( ) // initializeGrouping creates the KeyValue pair for collection, handling both grouping and value setup. -func (c *LoopCollectCompiler) initializeGrouping(grouping fql.ICollectGroupingContext) (*core.KV, []fql.ICollectSelectorContext) { - var groupSelectors []fql.ICollectSelectorContext +func (c *LoopCollectCompiler) initializeGrouping(grouping fql.ICollectGroupingContext) (*core.KV, []*core.CollectSelector) { + var groupSelectors []*core.CollectSelector kv := core.NewKV(vm.NoopOperand, vm.NoopOperand) loop := c.ctx.Loops.Current() @@ -40,18 +40,20 @@ func (c *LoopCollectCompiler) initializeGrouping(grouping fql.ICollectGroupingCo } // compileGroupKeys compiles the grouping keys from the CollectGroupingContext. -func (c *LoopCollectCompiler) compileGroupKeys(ctx fql.ICollectGroupingContext) (vm.Operand, []fql.ICollectSelectorContext) { +func (c *LoopCollectCompiler) compileGroupKeys(ctx fql.ICollectGroupingContext) (vm.Operand, []*core.CollectSelector) { selectors := ctx.AllCollectSelector() if len(selectors) == 0 { - return vm.NoopOperand, selectors + return vm.NoopOperand, nil } var kvKeyReg vm.Operand + var collectSelectors []*core.CollectSelector if len(selectors) > 1 { // We create a sequence of Registers for the clauses // To pack them into an array + collectSelectors = make([]*core.CollectSelector, len(selectors)) selectorRegs := c.ctx.Registers.AllocateSequence(len(selectors)) for i, selector := range selectors { @@ -59,32 +61,36 @@ func (c *LoopCollectCompiler) compileGroupKeys(ctx fql.ICollectGroupingContext) c.ctx.Emitter.EmitAB(vm.OpMove, selectorRegs[i], reg) // Free the register after moving its value to the sequence register c.ctx.Registers.Free(reg) + + collectSelectors[i] = core.NewCollectSelector(runtime.String(selector.Identifier().GetText())) } kvKeyReg = c.ctx.Registers.Allocate(core.Temp) c.ctx.Emitter.EmitAs(vm.OpLoadArray, kvKeyReg, selectorRegs) c.ctx.Registers.FreeSequence(selectorRegs) } else { - kvKeyReg = c.ctx.ExprCompiler.Compile(selectors[0].Expression()) + selector := selectors[0] + kvKeyReg = c.ctx.ExprCompiler.Compile(selector.Expression()) + collectSelectors = []*core.CollectSelector{core.NewCollectSelector(runtime.String(selector.Identifier().GetText()))} } - return kvKeyReg, selectors + return kvKeyReg, collectSelectors } -func (c *LoopCollectCompiler) compileGrouping(collectorType core.CollectorType, selectors []fql.ICollectSelectorContext) { +func (c *LoopCollectCompiler) compileGrouping(spec *core.CollectorSpec) { loop := c.ctx.Loops.Current() - if len(selectors) > 1 { - variables := make([]vm.Operand, len(selectors)) + if len(spec.GroupSelectors()) > 1 { + variables := make([]vm.Operand, len(spec.GroupSelectors())) - for i, selector := range selectors { - name := selector.Identifier().GetText() + for i, selector := range spec.GroupSelectors() { + name := selector.Name() if variables[i] == vm.NoopOperand { - variables[i] = c.ctx.Symbols.DeclareLocal(name, core.TypeUnknown) + variables[i] = c.ctx.Symbols.DeclareLocal(name.String(), core.TypeUnknown) } - reg := c.selectGroupKey(collectorType, loop) + reg := c.selectGroupKey(spec.Type(), loop) c.ctx.Emitter.EmitABC(vm.OpLoadIndex, variables[i], reg, loadConstant(c.ctx, runtime.Int(i))) } @@ -95,9 +101,9 @@ func (c *LoopCollectCompiler) compileGrouping(collectorType core.CollectorType, } } else { // Get the variable name - name := selectors[0].Identifier().GetText() + name := spec.GroupSelectors()[0].Name() // If we have a single selector, we can just use the loops' register directly - c.ctx.Symbols.AssignLocal(name, core.TypeUnknown, c.selectGroupKey(collectorType, loop)) + c.ctx.Symbols.AssignLocal(name.String(), core.TypeUnknown, c.selectGroupKey(spec.Type(), loop)) } } diff --git a/pkg/compiler/internal/loop_collect_prj.go b/pkg/compiler/internal/loop_collect_prj.go index 23a321a3..eb0cd869 100644 --- a/pkg/compiler/internal/loop_collect_prj.go +++ b/pkg/compiler/internal/loop_collect_prj.go @@ -1,49 +1,54 @@ package internal import ( + "github.com/antlr4-go/antlr/v4" + "github.com/MontFerret/ferret/pkg/compiler/internal/core" "github.com/MontFerret/ferret/pkg/parser/fql" "github.com/MontFerret/ferret/pkg/runtime" "github.com/MontFerret/ferret/pkg/vm" - "github.com/antlr4-go/antlr/v4" ) // initializeProjection handles the projection setup for group variables and counters. // Returns the projection variable name and the appropriate collector type. -func (c *LoopCollectCompiler) initializeProjection(ctx fql.ICollectClauseContext, kv *core.KV, counter fql.ICollectCounterContext, hasGrouping bool) (string, core.CollectorType) { - projectionVariableName := "" - collectorType := core.CollectorTypeKey - +func (c *LoopCollectCompiler) initializeProjection(ctx fql.ICollectClauseContext, kv *core.KV, counter fql.ICollectCounterContext) *core.CollectorProjection { // Handle group variable projection - if groupVar := ctx.CollectGroupVariable(); groupVar != nil { - projectionVariableName = c.compileGroupVariableProjection(kv, groupVar) - collectorType = core.CollectorTypeKeyGroup - return projectionVariableName, collectorType + if groupVar := ctx.CollectGroupProjection(); groupVar != nil { + varName := c.compileGroupVariableProjection(kv, groupVar) + return core.NewCollectorGroupProjection(varName) } // Handle counter projection if counter != nil { - projectionVariableName = counter.Identifier().GetText() - collectorType = c.determineCounterCollectorType(hasGrouping) + varName := counter.Identifier().GetText() + + return core.NewCollectorCountProjection(varName) } - return projectionVariableName, collectorType + return nil } -// determineCounterCollectorType returns the appropriate collector type for counter operations. -func (c *LoopCollectCompiler) determineCounterCollectorType(hasGrouping bool) core.CollectorType { - if hasGrouping { - return core.CollectorTypeKeyCounter - } +func (c *LoopCollectCompiler) finalizeProjection(spec *core.CollectorSpec) { + loop := c.ctx.Loops.Current() + varName := spec.Projection().VariableName() - return core.CollectorTypeCounter + if spec.HasGrouping() || !spec.HasAggregation() { + // Now we need to expand group variables from the dataset + loop.ValueName = varName + c.ctx.Symbols.AssignLocal(loop.ValueName, core.TypeUnknown, loop.Value) + } else { + key := loadConstant(c.ctx, runtime.String(varName)) + val := c.ctx.Symbols.DeclareLocal(varName, core.TypeUnknown) + c.ctx.Emitter.EmitABC(vm.OpLoadKey, val, loop.Dst, key) + c.ctx.Registers.Free(key) + } } // compileGroupVariableProjection processes group variable projections (both default and custom). -func (c *LoopCollectCompiler) compileGroupVariableProjection(kv *core.KV, groupVar fql.ICollectGroupVariableContext) string { +func (c *LoopCollectCompiler) compileGroupVariableProjection(kv *core.KV, groupVar fql.ICollectGroupProjectionContext) string { // Handle default projection (identifier) if identifier := groupVar.Identifier(); identifier != nil { - return c.compileDefaultGroupProjection(kv, identifier, groupVar.CollectGroupVariableKeeper()) + return c.compileDefaultGroupProjection(kv, identifier, groupVar.CollectGroupProjectionFilter()) } // Handle custom projection (selector expression) @@ -54,7 +59,7 @@ func (c *LoopCollectCompiler) compileGroupVariableProjection(kv *core.KV, groupV return "" } -func (c *LoopCollectCompiler) compileDefaultGroupProjection(kv *core.KV, identifier antlr.TerminalNode, keeper fql.ICollectGroupVariableKeeperContext) string { +func (c *LoopCollectCompiler) compileDefaultGroupProjection(kv *core.KV, identifier antlr.TerminalNode, keeper fql.ICollectGroupProjectionFilterContext) string { if keeper == nil { variables := c.ctx.Symbols.LocalVariables() scope := core.NewScopeProjection(c.ctx.Registers, c.ctx.Emitter, c.ctx.Symbols, variables) diff --git a/pkg/parser/antlr/FqlParser.g4 b/pkg/parser/antlr/FqlParser.g4 index 45c6441b..6d37a6da 100644 --- a/pkg/parser/antlr/FqlParser.g4 +++ b/pkg/parser/antlr/FqlParser.g4 @@ -110,14 +110,13 @@ sortClauseExpression ; collectClause - : Collect collectCounter - | Collect collectAggregator - | Collect collectGrouping collectAggregator - | Collect collectGrouping collectGroupVariable - | Collect collectGrouping collectCounter - | Collect collectGrouping + : Collect collectGrouping collectCounter + | Collect collectGrouping collectAggregator? collectGroupProjection? + | Collect collectAggregator collectGroupProjection? // no grouping + | Collect collectCounter // pure COUNT ; + collectSelector : Identifier Assign expression ; @@ -134,12 +133,12 @@ collectAggregateSelector : Identifier Assign functionCallExpression ; -collectGroupVariable +collectGroupProjection : Into collectSelector - | Into Identifier (collectGroupVariableKeeper)? + | Into Identifier (collectGroupProjectionFilter)? ; -collectGroupVariableKeeper +collectGroupProjectionFilter : Keep Identifier (Comma Identifier)* ; diff --git a/pkg/parser/fql/FqlParser.interp b/pkg/parser/fql/FqlParser.interp index a139e975..00e6b2b2 100644 --- a/pkg/parser/fql/FqlParser.interp +++ b/pkg/parser/fql/FqlParser.interp @@ -174,8 +174,8 @@ collectSelector collectGrouping collectAggregator collectAggregateSelector -collectGroupVariable -collectGroupVariableKeeper +collectGroupProjection +collectGroupProjectionFilter collectCounter waitForExpression waitForEventName @@ -225,4 +225,4 @@ errorOperator atn: -[4, 1, 72, 657, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 1, 0, 5, 0, 148, 8, 0, 10, 0, 12, 0, 151, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 5, 4, 163, 8, 4, 10, 4, 12, 4, 166, 9, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 173, 8, 5, 1, 6, 1, 6, 3, 6, 177, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 188, 8, 7, 1, 8, 1, 8, 3, 8, 192, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 200, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 205, 8, 9, 10, 9, 12, 9, 208, 9, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 215, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 220, 8, 9, 10, 9, 12, 9, 223, 9, 9, 1, 9, 1, 9, 3, 9, 227, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 236, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 242, 8, 11, 1, 12, 1, 12, 3, 12, 246, 8, 12, 1, 13, 1, 13, 3, 13, 250, 8, 13, 1, 14, 1, 14, 3, 14, 254, 8, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 263, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 270, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 276, 8, 18, 10, 18, 12, 18, 279, 9, 18, 1, 19, 1, 19, 3, 19, 283, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 303, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 5, 22, 312, 8, 22, 10, 22, 12, 22, 315, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 321, 8, 23, 10, 23, 12, 23, 324, 9, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 335, 8, 25, 3, 25, 337, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 343, 8, 26, 10, 26, 12, 26, 346, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 359, 8, 28, 1, 28, 3, 28, 362, 8, 28, 1, 28, 3, 28, 365, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 372, 8, 29, 1, 30, 1, 30, 1, 30, 3, 30, 377, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 388, 8, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 394, 8, 33, 1, 34, 1, 34, 3, 34, 398, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 407, 8, 35, 1, 36, 1, 36, 3, 36, 411, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 419, 8, 37, 10, 37, 12, 37, 422, 9, 37, 1, 37, 3, 37, 425, 8, 37, 3, 37, 427, 8, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 450, 8, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 461, 8, 45, 1, 46, 1, 46, 1, 46, 1, 47, 5, 47, 467, 8, 47, 10, 47, 12, 47, 470, 9, 47, 1, 48, 1, 48, 4, 48, 474, 8, 48, 11, 48, 12, 48, 475, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 483, 8, 49, 1, 50, 1, 50, 3, 50, 487, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 493, 8, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 3, 52, 500, 8, 52, 1, 53, 1, 53, 1, 53, 5, 53, 505, 8, 53, 10, 53, 12, 53, 508, 9, 53, 1, 53, 3, 53, 511, 8, 53, 1, 54, 3, 54, 514, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 3, 54, 521, 8, 54, 1, 54, 3, 54, 524, 8, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 3, 58, 537, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 544, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 557, 8, 59, 1, 59, 1, 59, 5, 59, 561, 8, 59, 10, 59, 12, 59, 564, 9, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 585, 8, 60, 10, 60, 12, 60, 588, 9, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 601, 8, 61, 1, 61, 1, 61, 3, 61, 605, 8, 61, 3, 61, 607, 8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 621, 8, 61, 10, 61, 12, 61, 624, 9, 61, 1, 62, 1, 62, 1, 62, 3, 62, 629, 8, 62, 1, 63, 1, 63, 1, 64, 3, 64, 634, 8, 64, 1, 64, 1, 64, 1, 65, 3, 65, 639, 8, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 0, 3, 118, 120, 122, 73, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 0, 10, 1, 0, 66, 67, 1, 0, 48, 49, 4, 0, 28, 29, 38, 44, 46, 47, 52, 59, 4, 0, 35, 37, 45, 45, 48, 51, 60, 64, 2, 0, 48, 48, 56, 57, 1, 0, 15, 20, 2, 0, 24, 25, 61, 61, 1, 0, 33, 34, 1, 0, 21, 23, 1, 0, 24, 25, 696, 0, 149, 1, 0, 0, 0, 2, 154, 1, 0, 0, 0, 4, 156, 1, 0, 0, 0, 6, 158, 1, 0, 0, 0, 8, 164, 1, 0, 0, 0, 10, 172, 1, 0, 0, 0, 12, 176, 1, 0, 0, 0, 14, 187, 1, 0, 0, 0, 16, 189, 1, 0, 0, 0, 18, 226, 1, 0, 0, 0, 20, 235, 1, 0, 0, 0, 22, 241, 1, 0, 0, 0, 24, 245, 1, 0, 0, 0, 26, 249, 1, 0, 0, 0, 28, 253, 1, 0, 0, 0, 30, 255, 1, 0, 0, 0, 32, 258, 1, 0, 0, 0, 34, 269, 1, 0, 0, 0, 36, 271, 1, 0, 0, 0, 38, 280, 1, 0, 0, 0, 40, 302, 1, 0, 0, 0, 42, 304, 1, 0, 0, 0, 44, 308, 1, 0, 0, 0, 46, 316, 1, 0, 0, 0, 48, 325, 1, 0, 0, 0, 50, 336, 1, 0, 0, 0, 52, 338, 1, 0, 0, 0, 54, 347, 1, 0, 0, 0, 56, 352, 1, 0, 0, 0, 58, 371, 1, 0, 0, 0, 60, 376, 1, 0, 0, 0, 62, 378, 1, 0, 0, 0, 64, 381, 1, 0, 0, 0, 66, 393, 1, 0, 0, 0, 68, 397, 1, 0, 0, 0, 70, 406, 1, 0, 0, 0, 72, 408, 1, 0, 0, 0, 74, 414, 1, 0, 0, 0, 76, 430, 1, 0, 0, 0, 78, 432, 1, 0, 0, 0, 80, 434, 1, 0, 0, 0, 82, 436, 1, 0, 0, 0, 84, 438, 1, 0, 0, 0, 86, 449, 1, 0, 0, 0, 88, 451, 1, 0, 0, 0, 90, 460, 1, 0, 0, 0, 92, 462, 1, 0, 0, 0, 94, 468, 1, 0, 0, 0, 96, 471, 1, 0, 0, 0, 98, 482, 1, 0, 0, 0, 100, 484, 1, 0, 0, 0, 102, 488, 1, 0, 0, 0, 104, 499, 1, 0, 0, 0, 106, 501, 1, 0, 0, 0, 108, 523, 1, 0, 0, 0, 110, 525, 1, 0, 0, 0, 112, 527, 1, 0, 0, 0, 114, 529, 1, 0, 0, 0, 116, 536, 1, 0, 0, 0, 118, 543, 1, 0, 0, 0, 120, 565, 1, 0, 0, 0, 122, 606, 1, 0, 0, 0, 124, 625, 1, 0, 0, 0, 126, 630, 1, 0, 0, 0, 128, 633, 1, 0, 0, 0, 130, 638, 1, 0, 0, 0, 132, 642, 1, 0, 0, 0, 134, 644, 1, 0, 0, 0, 136, 646, 1, 0, 0, 0, 138, 648, 1, 0, 0, 0, 140, 650, 1, 0, 0, 0, 142, 652, 1, 0, 0, 0, 144, 654, 1, 0, 0, 0, 146, 148, 3, 2, 1, 0, 147, 146, 1, 0, 0, 0, 148, 151, 1, 0, 0, 0, 149, 147, 1, 0, 0, 0, 149, 150, 1, 0, 0, 0, 150, 152, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 152, 153, 3, 8, 4, 0, 153, 1, 1, 0, 0, 0, 154, 155, 3, 4, 2, 0, 155, 3, 1, 0, 0, 0, 156, 157, 3, 6, 3, 0, 157, 5, 1, 0, 0, 0, 158, 159, 5, 51, 0, 0, 159, 160, 3, 92, 46, 0, 160, 7, 1, 0, 0, 0, 161, 163, 3, 10, 5, 0, 162, 161, 1, 0, 0, 0, 163, 166, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 167, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 167, 168, 3, 12, 6, 0, 168, 9, 1, 0, 0, 0, 169, 173, 3, 14, 7, 0, 170, 173, 3, 100, 50, 0, 171, 173, 3, 56, 28, 0, 172, 169, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 172, 171, 1, 0, 0, 0, 173, 11, 1, 0, 0, 0, 174, 177, 3, 16, 8, 0, 175, 177, 3, 18, 9, 0, 176, 174, 1, 0, 0, 0, 176, 175, 1, 0, 0, 0, 177, 13, 1, 0, 0, 0, 178, 179, 5, 45, 0, 0, 179, 180, 7, 0, 0, 0, 180, 181, 5, 31, 0, 0, 181, 188, 3, 118, 59, 0, 182, 183, 5, 45, 0, 0, 183, 184, 3, 110, 55, 0, 184, 185, 5, 31, 0, 0, 185, 186, 3, 118, 59, 0, 186, 188, 1, 0, 0, 0, 187, 178, 1, 0, 0, 0, 187, 182, 1, 0, 0, 0, 188, 15, 1, 0, 0, 0, 189, 191, 5, 36, 0, 0, 190, 192, 5, 40, 0, 0, 191, 190, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 3, 118, 59, 0, 194, 17, 1, 0, 0, 0, 195, 196, 5, 35, 0, 0, 196, 199, 7, 0, 0, 0, 197, 198, 5, 8, 0, 0, 198, 200, 5, 66, 0, 0, 199, 197, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 62, 0, 0, 202, 206, 3, 20, 10, 0, 203, 205, 3, 26, 13, 0, 204, 203, 1, 0, 0, 0, 205, 208, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 209, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 209, 210, 3, 28, 14, 0, 210, 227, 1, 0, 0, 0, 211, 212, 5, 35, 0, 0, 212, 214, 7, 0, 0, 0, 213, 215, 5, 63, 0, 0, 214, 213, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 217, 5, 64, 0, 0, 217, 221, 3, 118, 59, 0, 218, 220, 3, 26, 13, 0, 219, 218, 1, 0, 0, 0, 220, 223, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 224, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 224, 225, 3, 28, 14, 0, 225, 227, 1, 0, 0, 0, 226, 195, 1, 0, 0, 0, 226, 211, 1, 0, 0, 0, 227, 19, 1, 0, 0, 0, 228, 236, 3, 100, 50, 0, 229, 236, 3, 72, 36, 0, 230, 236, 3, 74, 37, 0, 231, 236, 3, 68, 34, 0, 232, 236, 3, 96, 48, 0, 233, 236, 3, 114, 57, 0, 234, 236, 3, 66, 33, 0, 235, 228, 1, 0, 0, 0, 235, 229, 1, 0, 0, 0, 235, 230, 1, 0, 0, 0, 235, 231, 1, 0, 0, 0, 235, 232, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, 21, 1, 0, 0, 0, 237, 242, 3, 32, 16, 0, 238, 242, 3, 36, 18, 0, 239, 242, 3, 30, 15, 0, 240, 242, 3, 40, 20, 0, 241, 237, 1, 0, 0, 0, 241, 238, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 240, 1, 0, 0, 0, 242, 23, 1, 0, 0, 0, 243, 246, 3, 14, 7, 0, 244, 246, 3, 100, 50, 0, 245, 243, 1, 0, 0, 0, 245, 244, 1, 0, 0, 0, 246, 25, 1, 0, 0, 0, 247, 250, 3, 24, 12, 0, 248, 250, 3, 22, 11, 0, 249, 247, 1, 0, 0, 0, 249, 248, 1, 0, 0, 0, 250, 27, 1, 0, 0, 0, 251, 254, 3, 16, 8, 0, 252, 254, 3, 18, 9, 0, 253, 251, 1, 0, 0, 0, 253, 252, 1, 0, 0, 0, 254, 29, 1, 0, 0, 0, 255, 256, 5, 41, 0, 0, 256, 257, 3, 118, 59, 0, 257, 31, 1, 0, 0, 0, 258, 259, 5, 44, 0, 0, 259, 262, 3, 34, 17, 0, 260, 261, 5, 8, 0, 0, 261, 263, 3, 34, 17, 0, 262, 260, 1, 0, 0, 0, 262, 263, 1, 0, 0, 0, 263, 33, 1, 0, 0, 0, 264, 270, 3, 82, 41, 0, 265, 270, 3, 66, 33, 0, 266, 270, 3, 68, 34, 0, 267, 270, 3, 100, 50, 0, 268, 270, 3, 96, 48, 0, 269, 264, 1, 0, 0, 0, 269, 265, 1, 0, 0, 0, 269, 266, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, 0, 270, 35, 1, 0, 0, 0, 271, 272, 5, 43, 0, 0, 272, 277, 3, 38, 19, 0, 273, 274, 5, 8, 0, 0, 274, 276, 3, 38, 19, 0, 275, 273, 1, 0, 0, 0, 276, 279, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 37, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 280, 282, 3, 118, 59, 0, 281, 283, 5, 47, 0, 0, 282, 281, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 39, 1, 0, 0, 0, 284, 285, 5, 46, 0, 0, 285, 303, 3, 54, 27, 0, 286, 287, 5, 46, 0, 0, 287, 303, 3, 46, 23, 0, 288, 289, 5, 46, 0, 0, 289, 290, 3, 44, 22, 0, 290, 291, 3, 46, 23, 0, 291, 303, 1, 0, 0, 0, 292, 293, 5, 46, 0, 0, 293, 294, 3, 44, 22, 0, 294, 295, 3, 50, 25, 0, 295, 303, 1, 0, 0, 0, 296, 297, 5, 46, 0, 0, 297, 298, 3, 44, 22, 0, 298, 299, 3, 54, 27, 0, 299, 303, 1, 0, 0, 0, 300, 301, 5, 46, 0, 0, 301, 303, 3, 44, 22, 0, 302, 284, 1, 0, 0, 0, 302, 286, 1, 0, 0, 0, 302, 288, 1, 0, 0, 0, 302, 292, 1, 0, 0, 0, 302, 296, 1, 0, 0, 0, 302, 300, 1, 0, 0, 0, 303, 41, 1, 0, 0, 0, 304, 305, 5, 66, 0, 0, 305, 306, 5, 31, 0, 0, 306, 307, 3, 118, 59, 0, 307, 43, 1, 0, 0, 0, 308, 313, 3, 42, 21, 0, 309, 310, 5, 8, 0, 0, 310, 312, 3, 42, 21, 0, 311, 309, 1, 0, 0, 0, 312, 315, 1, 0, 0, 0, 313, 311, 1, 0, 0, 0, 313, 314, 1, 0, 0, 0, 314, 45, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 316, 317, 5, 58, 0, 0, 317, 322, 3, 48, 24, 0, 318, 319, 5, 8, 0, 0, 319, 321, 3, 48, 24, 0, 320, 318, 1, 0, 0, 0, 321, 324, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 47, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 325, 326, 5, 66, 0, 0, 326, 327, 5, 31, 0, 0, 327, 328, 3, 100, 50, 0, 328, 49, 1, 0, 0, 0, 329, 330, 5, 52, 0, 0, 330, 337, 3, 42, 21, 0, 331, 332, 5, 52, 0, 0, 332, 334, 5, 66, 0, 0, 333, 335, 3, 52, 26, 0, 334, 333, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 337, 1, 0, 0, 0, 336, 329, 1, 0, 0, 0, 336, 331, 1, 0, 0, 0, 337, 51, 1, 0, 0, 0, 338, 339, 5, 53, 0, 0, 339, 344, 5, 66, 0, 0, 340, 341, 5, 8, 0, 0, 341, 343, 5, 66, 0, 0, 342, 340, 1, 0, 0, 0, 343, 346, 1, 0, 0, 0, 344, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 53, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 347, 348, 5, 54, 0, 0, 348, 349, 5, 55, 0, 0, 349, 350, 5, 52, 0, 0, 350, 351, 5, 66, 0, 0, 351, 55, 1, 0, 0, 0, 352, 353, 5, 37, 0, 0, 353, 354, 5, 59, 0, 0, 354, 355, 3, 58, 29, 0, 355, 356, 5, 62, 0, 0, 356, 358, 3, 60, 30, 0, 357, 359, 3, 62, 31, 0, 358, 357, 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 361, 1, 0, 0, 0, 360, 362, 3, 30, 15, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, 0, 363, 365, 3, 64, 32, 0, 364, 363, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 57, 1, 0, 0, 0, 366, 372, 3, 78, 39, 0, 367, 372, 3, 68, 34, 0, 368, 372, 3, 66, 33, 0, 369, 372, 3, 100, 50, 0, 370, 372, 3, 96, 48, 0, 371, 366, 1, 0, 0, 0, 371, 367, 1, 0, 0, 0, 371, 368, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 370, 1, 0, 0, 0, 372, 59, 1, 0, 0, 0, 373, 377, 3, 100, 50, 0, 374, 377, 3, 68, 34, 0, 375, 377, 3, 96, 48, 0, 376, 373, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 376, 375, 1, 0, 0, 0, 377, 61, 1, 0, 0, 0, 378, 379, 5, 38, 0, 0, 379, 380, 3, 74, 37, 0, 380, 63, 1, 0, 0, 0, 381, 387, 5, 39, 0, 0, 382, 388, 3, 82, 41, 0, 383, 388, 3, 68, 34, 0, 384, 388, 3, 66, 33, 0, 385, 388, 3, 96, 48, 0, 386, 388, 3, 102, 51, 0, 387, 382, 1, 0, 0, 0, 387, 383, 1, 0, 0, 0, 387, 384, 1, 0, 0, 0, 387, 385, 1, 0, 0, 0, 387, 386, 1, 0, 0, 0, 388, 65, 1, 0, 0, 0, 389, 390, 5, 65, 0, 0, 390, 394, 5, 66, 0, 0, 391, 392, 5, 65, 0, 0, 392, 394, 3, 110, 55, 0, 393, 389, 1, 0, 0, 0, 393, 391, 1, 0, 0, 0, 394, 67, 1, 0, 0, 0, 395, 398, 5, 66, 0, 0, 396, 398, 3, 110, 55, 0, 397, 395, 1, 0, 0, 0, 397, 396, 1, 0, 0, 0, 398, 69, 1, 0, 0, 0, 399, 407, 3, 72, 36, 0, 400, 407, 3, 74, 37, 0, 401, 407, 3, 76, 38, 0, 402, 407, 3, 78, 39, 0, 403, 407, 3, 80, 40, 0, 404, 407, 3, 82, 41, 0, 405, 407, 3, 84, 42, 0, 406, 399, 1, 0, 0, 0, 406, 400, 1, 0, 0, 0, 406, 401, 1, 0, 0, 0, 406, 402, 1, 0, 0, 0, 406, 403, 1, 0, 0, 0, 406, 404, 1, 0, 0, 0, 406, 405, 1, 0, 0, 0, 407, 71, 1, 0, 0, 0, 408, 410, 5, 9, 0, 0, 409, 411, 3, 106, 53, 0, 410, 409, 1, 0, 0, 0, 410, 411, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 413, 5, 10, 0, 0, 413, 73, 1, 0, 0, 0, 414, 426, 5, 13, 0, 0, 415, 420, 3, 86, 43, 0, 416, 417, 5, 8, 0, 0, 417, 419, 3, 86, 43, 0, 418, 416, 1, 0, 0, 0, 419, 422, 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 424, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 423, 425, 5, 8, 0, 0, 424, 423, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 427, 1, 0, 0, 0, 426, 415, 1, 0, 0, 0, 426, 427, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 429, 5, 14, 0, 0, 429, 75, 1, 0, 0, 0, 430, 431, 5, 50, 0, 0, 431, 77, 1, 0, 0, 0, 432, 433, 5, 68, 0, 0, 433, 79, 1, 0, 0, 0, 434, 435, 5, 70, 0, 0, 435, 81, 1, 0, 0, 0, 436, 437, 5, 69, 0, 0, 437, 83, 1, 0, 0, 0, 438, 439, 7, 1, 0, 0, 439, 85, 1, 0, 0, 0, 440, 441, 3, 90, 45, 0, 441, 442, 5, 5, 0, 0, 442, 443, 3, 118, 59, 0, 443, 450, 1, 0, 0, 0, 444, 445, 3, 88, 44, 0, 445, 446, 5, 5, 0, 0, 446, 447, 3, 118, 59, 0, 447, 450, 1, 0, 0, 0, 448, 450, 3, 68, 34, 0, 449, 440, 1, 0, 0, 0, 449, 444, 1, 0, 0, 0, 449, 448, 1, 0, 0, 0, 450, 87, 1, 0, 0, 0, 451, 452, 5, 9, 0, 0, 452, 453, 3, 118, 59, 0, 453, 454, 5, 10, 0, 0, 454, 89, 1, 0, 0, 0, 455, 461, 5, 66, 0, 0, 456, 461, 3, 78, 39, 0, 457, 461, 3, 66, 33, 0, 458, 461, 3, 110, 55, 0, 459, 461, 3, 112, 56, 0, 460, 455, 1, 0, 0, 0, 460, 456, 1, 0, 0, 0, 460, 457, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 459, 1, 0, 0, 0, 461, 91, 1, 0, 0, 0, 462, 463, 3, 94, 47, 0, 463, 464, 5, 66, 0, 0, 464, 93, 1, 0, 0, 0, 465, 467, 5, 71, 0, 0, 466, 465, 1, 0, 0, 0, 467, 470, 1, 0, 0, 0, 468, 466, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 95, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 471, 473, 3, 98, 49, 0, 472, 474, 3, 108, 54, 0, 473, 472, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 473, 1, 0, 0, 0, 475, 476, 1, 0, 0, 0, 476, 97, 1, 0, 0, 0, 477, 483, 3, 68, 34, 0, 478, 483, 3, 66, 33, 0, 479, 483, 3, 72, 36, 0, 480, 483, 3, 74, 37, 0, 481, 483, 3, 102, 51, 0, 482, 477, 1, 0, 0, 0, 482, 478, 1, 0, 0, 0, 482, 479, 1, 0, 0, 0, 482, 480, 1, 0, 0, 0, 482, 481, 1, 0, 0, 0, 483, 99, 1, 0, 0, 0, 484, 486, 3, 102, 51, 0, 485, 487, 3, 144, 72, 0, 486, 485, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 101, 1, 0, 0, 0, 488, 489, 3, 94, 47, 0, 489, 490, 3, 104, 52, 0, 490, 492, 5, 11, 0, 0, 491, 493, 3, 106, 53, 0, 492, 491, 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 495, 5, 12, 0, 0, 495, 103, 1, 0, 0, 0, 496, 500, 5, 66, 0, 0, 497, 500, 3, 110, 55, 0, 498, 500, 3, 112, 56, 0, 499, 496, 1, 0, 0, 0, 499, 497, 1, 0, 0, 0, 499, 498, 1, 0, 0, 0, 500, 105, 1, 0, 0, 0, 501, 506, 3, 118, 59, 0, 502, 503, 5, 8, 0, 0, 503, 505, 3, 118, 59, 0, 504, 502, 1, 0, 0, 0, 505, 508, 1, 0, 0, 0, 506, 504, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 510, 1, 0, 0, 0, 508, 506, 1, 0, 0, 0, 509, 511, 5, 8, 0, 0, 510, 509, 1, 0, 0, 0, 510, 511, 1, 0, 0, 0, 511, 107, 1, 0, 0, 0, 512, 514, 3, 144, 72, 0, 513, 512, 1, 0, 0, 0, 513, 514, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 5, 7, 0, 0, 516, 524, 3, 90, 45, 0, 517, 518, 3, 144, 72, 0, 518, 519, 5, 7, 0, 0, 519, 521, 1, 0, 0, 0, 520, 517, 1, 0, 0, 0, 520, 521, 1, 0, 0, 0, 521, 522, 1, 0, 0, 0, 522, 524, 3, 88, 44, 0, 523, 513, 1, 0, 0, 0, 523, 520, 1, 0, 0, 0, 524, 109, 1, 0, 0, 0, 525, 526, 7, 2, 0, 0, 526, 111, 1, 0, 0, 0, 527, 528, 7, 3, 0, 0, 528, 113, 1, 0, 0, 0, 529, 530, 3, 116, 58, 0, 530, 531, 5, 30, 0, 0, 531, 532, 3, 116, 58, 0, 532, 115, 1, 0, 0, 0, 533, 537, 3, 82, 41, 0, 534, 537, 3, 68, 34, 0, 535, 537, 3, 66, 33, 0, 536, 533, 1, 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 535, 1, 0, 0, 0, 537, 117, 1, 0, 0, 0, 538, 539, 6, 59, -1, 0, 539, 540, 3, 132, 66, 0, 540, 541, 3, 118, 59, 5, 541, 544, 1, 0, 0, 0, 542, 544, 3, 120, 60, 0, 543, 538, 1, 0, 0, 0, 543, 542, 1, 0, 0, 0, 544, 562, 1, 0, 0, 0, 545, 546, 10, 4, 0, 0, 546, 547, 3, 136, 68, 0, 547, 548, 3, 118, 59, 5, 548, 561, 1, 0, 0, 0, 549, 550, 10, 3, 0, 0, 550, 551, 3, 138, 69, 0, 551, 552, 3, 118, 59, 4, 552, 561, 1, 0, 0, 0, 553, 554, 10, 2, 0, 0, 554, 556, 5, 32, 0, 0, 555, 557, 3, 118, 59, 0, 556, 555, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 559, 5, 5, 0, 0, 559, 561, 3, 118, 59, 3, 560, 545, 1, 0, 0, 0, 560, 549, 1, 0, 0, 0, 560, 553, 1, 0, 0, 0, 561, 564, 1, 0, 0, 0, 562, 560, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 119, 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 565, 566, 6, 60, -1, 0, 566, 567, 3, 122, 61, 0, 567, 586, 1, 0, 0, 0, 568, 569, 10, 5, 0, 0, 569, 570, 3, 126, 63, 0, 570, 571, 3, 120, 60, 6, 571, 585, 1, 0, 0, 0, 572, 573, 10, 4, 0, 0, 573, 574, 3, 124, 62, 0, 574, 575, 3, 120, 60, 5, 575, 585, 1, 0, 0, 0, 576, 577, 10, 3, 0, 0, 577, 578, 3, 128, 64, 0, 578, 579, 3, 120, 60, 4, 579, 585, 1, 0, 0, 0, 580, 581, 10, 2, 0, 0, 581, 582, 3, 130, 65, 0, 582, 583, 3, 120, 60, 3, 583, 585, 1, 0, 0, 0, 584, 568, 1, 0, 0, 0, 584, 572, 1, 0, 0, 0, 584, 576, 1, 0, 0, 0, 584, 580, 1, 0, 0, 0, 585, 588, 1, 0, 0, 0, 586, 584, 1, 0, 0, 0, 586, 587, 1, 0, 0, 0, 587, 121, 1, 0, 0, 0, 588, 586, 1, 0, 0, 0, 589, 590, 6, 61, -1, 0, 590, 607, 3, 100, 50, 0, 591, 607, 3, 114, 57, 0, 592, 607, 3, 70, 35, 0, 593, 607, 3, 68, 34, 0, 594, 607, 3, 96, 48, 0, 595, 607, 3, 66, 33, 0, 596, 600, 5, 11, 0, 0, 597, 601, 3, 18, 9, 0, 598, 601, 3, 56, 28, 0, 599, 601, 3, 118, 59, 0, 600, 597, 1, 0, 0, 0, 600, 598, 1, 0, 0, 0, 600, 599, 1, 0, 0, 0, 601, 602, 1, 0, 0, 0, 602, 604, 5, 12, 0, 0, 603, 605, 3, 144, 72, 0, 604, 603, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 607, 1, 0, 0, 0, 606, 589, 1, 0, 0, 0, 606, 591, 1, 0, 0, 0, 606, 592, 1, 0, 0, 0, 606, 593, 1, 0, 0, 0, 606, 594, 1, 0, 0, 0, 606, 595, 1, 0, 0, 0, 606, 596, 1, 0, 0, 0, 607, 622, 1, 0, 0, 0, 608, 609, 10, 10, 0, 0, 609, 610, 3, 140, 70, 0, 610, 611, 3, 122, 61, 11, 611, 621, 1, 0, 0, 0, 612, 613, 10, 9, 0, 0, 613, 614, 3, 142, 71, 0, 614, 615, 3, 122, 61, 10, 615, 621, 1, 0, 0, 0, 616, 617, 10, 8, 0, 0, 617, 618, 3, 134, 67, 0, 618, 619, 3, 122, 61, 9, 619, 621, 1, 0, 0, 0, 620, 608, 1, 0, 0, 0, 620, 612, 1, 0, 0, 0, 620, 616, 1, 0, 0, 0, 621, 624, 1, 0, 0, 0, 622, 620, 1, 0, 0, 0, 622, 623, 1, 0, 0, 0, 623, 123, 1, 0, 0, 0, 624, 622, 1, 0, 0, 0, 625, 628, 7, 4, 0, 0, 626, 629, 3, 128, 64, 0, 627, 629, 3, 126, 63, 0, 628, 626, 1, 0, 0, 0, 628, 627, 1, 0, 0, 0, 629, 125, 1, 0, 0, 0, 630, 631, 7, 5, 0, 0, 631, 127, 1, 0, 0, 0, 632, 634, 5, 61, 0, 0, 633, 632, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 636, 5, 62, 0, 0, 636, 129, 1, 0, 0, 0, 637, 639, 5, 61, 0, 0, 638, 637, 1, 0, 0, 0, 638, 639, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 641, 5, 60, 0, 0, 641, 131, 1, 0, 0, 0, 642, 643, 7, 6, 0, 0, 643, 133, 1, 0, 0, 0, 644, 645, 7, 7, 0, 0, 645, 135, 1, 0, 0, 0, 646, 647, 5, 28, 0, 0, 647, 137, 1, 0, 0, 0, 648, 649, 5, 29, 0, 0, 649, 139, 1, 0, 0, 0, 650, 651, 7, 8, 0, 0, 651, 141, 1, 0, 0, 0, 652, 653, 7, 9, 0, 0, 653, 143, 1, 0, 0, 0, 654, 655, 5, 32, 0, 0, 655, 145, 1, 0, 0, 0, 67, 149, 164, 172, 176, 187, 191, 199, 206, 214, 221, 226, 235, 241, 245, 249, 253, 262, 269, 277, 282, 302, 313, 322, 334, 336, 344, 358, 361, 364, 371, 376, 387, 393, 397, 406, 410, 420, 424, 426, 449, 460, 468, 475, 482, 486, 492, 499, 506, 510, 513, 520, 523, 536, 543, 556, 560, 562, 584, 586, 600, 604, 606, 620, 622, 628, 633, 638] \ No newline at end of file +[4, 1, 72, 658, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 1, 0, 5, 0, 148, 8, 0, 10, 0, 12, 0, 151, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 5, 4, 163, 8, 4, 10, 4, 12, 4, 166, 9, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 173, 8, 5, 1, 6, 1, 6, 3, 6, 177, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 188, 8, 7, 1, 8, 1, 8, 3, 8, 192, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 200, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 205, 8, 9, 10, 9, 12, 9, 208, 9, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 215, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 220, 8, 9, 10, 9, 12, 9, 223, 9, 9, 1, 9, 1, 9, 3, 9, 227, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 236, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 242, 8, 11, 1, 12, 1, 12, 3, 12, 246, 8, 12, 1, 13, 1, 13, 3, 13, 250, 8, 13, 1, 14, 1, 14, 3, 14, 254, 8, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 263, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 270, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 276, 8, 18, 10, 18, 12, 18, 279, 9, 18, 1, 19, 1, 19, 3, 19, 283, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 292, 8, 20, 1, 20, 3, 20, 295, 8, 20, 1, 20, 1, 20, 1, 20, 3, 20, 300, 8, 20, 1, 20, 1, 20, 3, 20, 304, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 5, 22, 313, 8, 22, 10, 22, 12, 22, 316, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 322, 8, 23, 10, 23, 12, 23, 325, 9, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 336, 8, 25, 3, 25, 338, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 344, 8, 26, 10, 26, 12, 26, 347, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 360, 8, 28, 1, 28, 3, 28, 363, 8, 28, 1, 28, 3, 28, 366, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 373, 8, 29, 1, 30, 1, 30, 1, 30, 3, 30, 378, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 389, 8, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 395, 8, 33, 1, 34, 1, 34, 3, 34, 399, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 408, 8, 35, 1, 36, 1, 36, 3, 36, 412, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 420, 8, 37, 10, 37, 12, 37, 423, 9, 37, 1, 37, 3, 37, 426, 8, 37, 3, 37, 428, 8, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 451, 8, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 462, 8, 45, 1, 46, 1, 46, 1, 46, 1, 47, 5, 47, 468, 8, 47, 10, 47, 12, 47, 471, 9, 47, 1, 48, 1, 48, 4, 48, 475, 8, 48, 11, 48, 12, 48, 476, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 484, 8, 49, 1, 50, 1, 50, 3, 50, 488, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 494, 8, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 3, 52, 501, 8, 52, 1, 53, 1, 53, 1, 53, 5, 53, 506, 8, 53, 10, 53, 12, 53, 509, 9, 53, 1, 53, 3, 53, 512, 8, 53, 1, 54, 3, 54, 515, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 3, 54, 522, 8, 54, 1, 54, 3, 54, 525, 8, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 3, 58, 538, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 545, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 558, 8, 59, 1, 59, 1, 59, 5, 59, 562, 8, 59, 10, 59, 12, 59, 565, 9, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 586, 8, 60, 10, 60, 12, 60, 589, 9, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 602, 8, 61, 1, 61, 1, 61, 3, 61, 606, 8, 61, 3, 61, 608, 8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 622, 8, 61, 10, 61, 12, 61, 625, 9, 61, 1, 62, 1, 62, 1, 62, 3, 62, 630, 8, 62, 1, 63, 1, 63, 1, 64, 3, 64, 635, 8, 64, 1, 64, 1, 64, 1, 65, 3, 65, 640, 8, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 0, 3, 118, 120, 122, 73, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 0, 10, 1, 0, 66, 67, 1, 0, 48, 49, 4, 0, 28, 29, 38, 44, 46, 47, 52, 59, 4, 0, 35, 37, 45, 45, 48, 51, 60, 64, 2, 0, 48, 48, 56, 57, 1, 0, 15, 20, 2, 0, 24, 25, 61, 61, 1, 0, 33, 34, 1, 0, 21, 23, 1, 0, 24, 25, 698, 0, 149, 1, 0, 0, 0, 2, 154, 1, 0, 0, 0, 4, 156, 1, 0, 0, 0, 6, 158, 1, 0, 0, 0, 8, 164, 1, 0, 0, 0, 10, 172, 1, 0, 0, 0, 12, 176, 1, 0, 0, 0, 14, 187, 1, 0, 0, 0, 16, 189, 1, 0, 0, 0, 18, 226, 1, 0, 0, 0, 20, 235, 1, 0, 0, 0, 22, 241, 1, 0, 0, 0, 24, 245, 1, 0, 0, 0, 26, 249, 1, 0, 0, 0, 28, 253, 1, 0, 0, 0, 30, 255, 1, 0, 0, 0, 32, 258, 1, 0, 0, 0, 34, 269, 1, 0, 0, 0, 36, 271, 1, 0, 0, 0, 38, 280, 1, 0, 0, 0, 40, 303, 1, 0, 0, 0, 42, 305, 1, 0, 0, 0, 44, 309, 1, 0, 0, 0, 46, 317, 1, 0, 0, 0, 48, 326, 1, 0, 0, 0, 50, 337, 1, 0, 0, 0, 52, 339, 1, 0, 0, 0, 54, 348, 1, 0, 0, 0, 56, 353, 1, 0, 0, 0, 58, 372, 1, 0, 0, 0, 60, 377, 1, 0, 0, 0, 62, 379, 1, 0, 0, 0, 64, 382, 1, 0, 0, 0, 66, 394, 1, 0, 0, 0, 68, 398, 1, 0, 0, 0, 70, 407, 1, 0, 0, 0, 72, 409, 1, 0, 0, 0, 74, 415, 1, 0, 0, 0, 76, 431, 1, 0, 0, 0, 78, 433, 1, 0, 0, 0, 80, 435, 1, 0, 0, 0, 82, 437, 1, 0, 0, 0, 84, 439, 1, 0, 0, 0, 86, 450, 1, 0, 0, 0, 88, 452, 1, 0, 0, 0, 90, 461, 1, 0, 0, 0, 92, 463, 1, 0, 0, 0, 94, 469, 1, 0, 0, 0, 96, 472, 1, 0, 0, 0, 98, 483, 1, 0, 0, 0, 100, 485, 1, 0, 0, 0, 102, 489, 1, 0, 0, 0, 104, 500, 1, 0, 0, 0, 106, 502, 1, 0, 0, 0, 108, 524, 1, 0, 0, 0, 110, 526, 1, 0, 0, 0, 112, 528, 1, 0, 0, 0, 114, 530, 1, 0, 0, 0, 116, 537, 1, 0, 0, 0, 118, 544, 1, 0, 0, 0, 120, 566, 1, 0, 0, 0, 122, 607, 1, 0, 0, 0, 124, 626, 1, 0, 0, 0, 126, 631, 1, 0, 0, 0, 128, 634, 1, 0, 0, 0, 130, 639, 1, 0, 0, 0, 132, 643, 1, 0, 0, 0, 134, 645, 1, 0, 0, 0, 136, 647, 1, 0, 0, 0, 138, 649, 1, 0, 0, 0, 140, 651, 1, 0, 0, 0, 142, 653, 1, 0, 0, 0, 144, 655, 1, 0, 0, 0, 146, 148, 3, 2, 1, 0, 147, 146, 1, 0, 0, 0, 148, 151, 1, 0, 0, 0, 149, 147, 1, 0, 0, 0, 149, 150, 1, 0, 0, 0, 150, 152, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 152, 153, 3, 8, 4, 0, 153, 1, 1, 0, 0, 0, 154, 155, 3, 4, 2, 0, 155, 3, 1, 0, 0, 0, 156, 157, 3, 6, 3, 0, 157, 5, 1, 0, 0, 0, 158, 159, 5, 51, 0, 0, 159, 160, 3, 92, 46, 0, 160, 7, 1, 0, 0, 0, 161, 163, 3, 10, 5, 0, 162, 161, 1, 0, 0, 0, 163, 166, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 167, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 167, 168, 3, 12, 6, 0, 168, 9, 1, 0, 0, 0, 169, 173, 3, 14, 7, 0, 170, 173, 3, 100, 50, 0, 171, 173, 3, 56, 28, 0, 172, 169, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 172, 171, 1, 0, 0, 0, 173, 11, 1, 0, 0, 0, 174, 177, 3, 16, 8, 0, 175, 177, 3, 18, 9, 0, 176, 174, 1, 0, 0, 0, 176, 175, 1, 0, 0, 0, 177, 13, 1, 0, 0, 0, 178, 179, 5, 45, 0, 0, 179, 180, 7, 0, 0, 0, 180, 181, 5, 31, 0, 0, 181, 188, 3, 118, 59, 0, 182, 183, 5, 45, 0, 0, 183, 184, 3, 110, 55, 0, 184, 185, 5, 31, 0, 0, 185, 186, 3, 118, 59, 0, 186, 188, 1, 0, 0, 0, 187, 178, 1, 0, 0, 0, 187, 182, 1, 0, 0, 0, 188, 15, 1, 0, 0, 0, 189, 191, 5, 36, 0, 0, 190, 192, 5, 40, 0, 0, 191, 190, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 3, 118, 59, 0, 194, 17, 1, 0, 0, 0, 195, 196, 5, 35, 0, 0, 196, 199, 7, 0, 0, 0, 197, 198, 5, 8, 0, 0, 198, 200, 5, 66, 0, 0, 199, 197, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 62, 0, 0, 202, 206, 3, 20, 10, 0, 203, 205, 3, 26, 13, 0, 204, 203, 1, 0, 0, 0, 205, 208, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 209, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 209, 210, 3, 28, 14, 0, 210, 227, 1, 0, 0, 0, 211, 212, 5, 35, 0, 0, 212, 214, 7, 0, 0, 0, 213, 215, 5, 63, 0, 0, 214, 213, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 217, 5, 64, 0, 0, 217, 221, 3, 118, 59, 0, 218, 220, 3, 26, 13, 0, 219, 218, 1, 0, 0, 0, 220, 223, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 224, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 224, 225, 3, 28, 14, 0, 225, 227, 1, 0, 0, 0, 226, 195, 1, 0, 0, 0, 226, 211, 1, 0, 0, 0, 227, 19, 1, 0, 0, 0, 228, 236, 3, 100, 50, 0, 229, 236, 3, 72, 36, 0, 230, 236, 3, 74, 37, 0, 231, 236, 3, 68, 34, 0, 232, 236, 3, 96, 48, 0, 233, 236, 3, 114, 57, 0, 234, 236, 3, 66, 33, 0, 235, 228, 1, 0, 0, 0, 235, 229, 1, 0, 0, 0, 235, 230, 1, 0, 0, 0, 235, 231, 1, 0, 0, 0, 235, 232, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, 21, 1, 0, 0, 0, 237, 242, 3, 32, 16, 0, 238, 242, 3, 36, 18, 0, 239, 242, 3, 30, 15, 0, 240, 242, 3, 40, 20, 0, 241, 237, 1, 0, 0, 0, 241, 238, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 240, 1, 0, 0, 0, 242, 23, 1, 0, 0, 0, 243, 246, 3, 14, 7, 0, 244, 246, 3, 100, 50, 0, 245, 243, 1, 0, 0, 0, 245, 244, 1, 0, 0, 0, 246, 25, 1, 0, 0, 0, 247, 250, 3, 24, 12, 0, 248, 250, 3, 22, 11, 0, 249, 247, 1, 0, 0, 0, 249, 248, 1, 0, 0, 0, 250, 27, 1, 0, 0, 0, 251, 254, 3, 16, 8, 0, 252, 254, 3, 18, 9, 0, 253, 251, 1, 0, 0, 0, 253, 252, 1, 0, 0, 0, 254, 29, 1, 0, 0, 0, 255, 256, 5, 41, 0, 0, 256, 257, 3, 118, 59, 0, 257, 31, 1, 0, 0, 0, 258, 259, 5, 44, 0, 0, 259, 262, 3, 34, 17, 0, 260, 261, 5, 8, 0, 0, 261, 263, 3, 34, 17, 0, 262, 260, 1, 0, 0, 0, 262, 263, 1, 0, 0, 0, 263, 33, 1, 0, 0, 0, 264, 270, 3, 82, 41, 0, 265, 270, 3, 66, 33, 0, 266, 270, 3, 68, 34, 0, 267, 270, 3, 100, 50, 0, 268, 270, 3, 96, 48, 0, 269, 264, 1, 0, 0, 0, 269, 265, 1, 0, 0, 0, 269, 266, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, 0, 270, 35, 1, 0, 0, 0, 271, 272, 5, 43, 0, 0, 272, 277, 3, 38, 19, 0, 273, 274, 5, 8, 0, 0, 274, 276, 3, 38, 19, 0, 275, 273, 1, 0, 0, 0, 276, 279, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 37, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 280, 282, 3, 118, 59, 0, 281, 283, 5, 47, 0, 0, 282, 281, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 39, 1, 0, 0, 0, 284, 285, 5, 46, 0, 0, 285, 286, 3, 44, 22, 0, 286, 287, 3, 54, 27, 0, 287, 304, 1, 0, 0, 0, 288, 289, 5, 46, 0, 0, 289, 291, 3, 44, 22, 0, 290, 292, 3, 46, 23, 0, 291, 290, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 294, 1, 0, 0, 0, 293, 295, 3, 50, 25, 0, 294, 293, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 304, 1, 0, 0, 0, 296, 297, 5, 46, 0, 0, 297, 299, 3, 46, 23, 0, 298, 300, 3, 50, 25, 0, 299, 298, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 304, 1, 0, 0, 0, 301, 302, 5, 46, 0, 0, 302, 304, 3, 54, 27, 0, 303, 284, 1, 0, 0, 0, 303, 288, 1, 0, 0, 0, 303, 296, 1, 0, 0, 0, 303, 301, 1, 0, 0, 0, 304, 41, 1, 0, 0, 0, 305, 306, 5, 66, 0, 0, 306, 307, 5, 31, 0, 0, 307, 308, 3, 118, 59, 0, 308, 43, 1, 0, 0, 0, 309, 314, 3, 42, 21, 0, 310, 311, 5, 8, 0, 0, 311, 313, 3, 42, 21, 0, 312, 310, 1, 0, 0, 0, 313, 316, 1, 0, 0, 0, 314, 312, 1, 0, 0, 0, 314, 315, 1, 0, 0, 0, 315, 45, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 317, 318, 5, 58, 0, 0, 318, 323, 3, 48, 24, 0, 319, 320, 5, 8, 0, 0, 320, 322, 3, 48, 24, 0, 321, 319, 1, 0, 0, 0, 322, 325, 1, 0, 0, 0, 323, 321, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 47, 1, 0, 0, 0, 325, 323, 1, 0, 0, 0, 326, 327, 5, 66, 0, 0, 327, 328, 5, 31, 0, 0, 328, 329, 3, 100, 50, 0, 329, 49, 1, 0, 0, 0, 330, 331, 5, 52, 0, 0, 331, 338, 3, 42, 21, 0, 332, 333, 5, 52, 0, 0, 333, 335, 5, 66, 0, 0, 334, 336, 3, 52, 26, 0, 335, 334, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 338, 1, 0, 0, 0, 337, 330, 1, 0, 0, 0, 337, 332, 1, 0, 0, 0, 338, 51, 1, 0, 0, 0, 339, 340, 5, 53, 0, 0, 340, 345, 5, 66, 0, 0, 341, 342, 5, 8, 0, 0, 342, 344, 5, 66, 0, 0, 343, 341, 1, 0, 0, 0, 344, 347, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 53, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 348, 349, 5, 54, 0, 0, 349, 350, 5, 55, 0, 0, 350, 351, 5, 52, 0, 0, 351, 352, 5, 66, 0, 0, 352, 55, 1, 0, 0, 0, 353, 354, 5, 37, 0, 0, 354, 355, 5, 59, 0, 0, 355, 356, 3, 58, 29, 0, 356, 357, 5, 62, 0, 0, 357, 359, 3, 60, 30, 0, 358, 360, 3, 62, 31, 0, 359, 358, 1, 0, 0, 0, 359, 360, 1, 0, 0, 0, 360, 362, 1, 0, 0, 0, 361, 363, 3, 30, 15, 0, 362, 361, 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 365, 1, 0, 0, 0, 364, 366, 3, 64, 32, 0, 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 57, 1, 0, 0, 0, 367, 373, 3, 78, 39, 0, 368, 373, 3, 68, 34, 0, 369, 373, 3, 66, 33, 0, 370, 373, 3, 100, 50, 0, 371, 373, 3, 96, 48, 0, 372, 367, 1, 0, 0, 0, 372, 368, 1, 0, 0, 0, 372, 369, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 371, 1, 0, 0, 0, 373, 59, 1, 0, 0, 0, 374, 378, 3, 100, 50, 0, 375, 378, 3, 68, 34, 0, 376, 378, 3, 96, 48, 0, 377, 374, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 376, 1, 0, 0, 0, 378, 61, 1, 0, 0, 0, 379, 380, 5, 38, 0, 0, 380, 381, 3, 74, 37, 0, 381, 63, 1, 0, 0, 0, 382, 388, 5, 39, 0, 0, 383, 389, 3, 82, 41, 0, 384, 389, 3, 68, 34, 0, 385, 389, 3, 66, 33, 0, 386, 389, 3, 96, 48, 0, 387, 389, 3, 102, 51, 0, 388, 383, 1, 0, 0, 0, 388, 384, 1, 0, 0, 0, 388, 385, 1, 0, 0, 0, 388, 386, 1, 0, 0, 0, 388, 387, 1, 0, 0, 0, 389, 65, 1, 0, 0, 0, 390, 391, 5, 65, 0, 0, 391, 395, 5, 66, 0, 0, 392, 393, 5, 65, 0, 0, 393, 395, 3, 110, 55, 0, 394, 390, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 395, 67, 1, 0, 0, 0, 396, 399, 5, 66, 0, 0, 397, 399, 3, 110, 55, 0, 398, 396, 1, 0, 0, 0, 398, 397, 1, 0, 0, 0, 399, 69, 1, 0, 0, 0, 400, 408, 3, 72, 36, 0, 401, 408, 3, 74, 37, 0, 402, 408, 3, 76, 38, 0, 403, 408, 3, 78, 39, 0, 404, 408, 3, 80, 40, 0, 405, 408, 3, 82, 41, 0, 406, 408, 3, 84, 42, 0, 407, 400, 1, 0, 0, 0, 407, 401, 1, 0, 0, 0, 407, 402, 1, 0, 0, 0, 407, 403, 1, 0, 0, 0, 407, 404, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 407, 406, 1, 0, 0, 0, 408, 71, 1, 0, 0, 0, 409, 411, 5, 9, 0, 0, 410, 412, 3, 106, 53, 0, 411, 410, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 414, 5, 10, 0, 0, 414, 73, 1, 0, 0, 0, 415, 427, 5, 13, 0, 0, 416, 421, 3, 86, 43, 0, 417, 418, 5, 8, 0, 0, 418, 420, 3, 86, 43, 0, 419, 417, 1, 0, 0, 0, 420, 423, 1, 0, 0, 0, 421, 419, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 425, 1, 0, 0, 0, 423, 421, 1, 0, 0, 0, 424, 426, 5, 8, 0, 0, 425, 424, 1, 0, 0, 0, 425, 426, 1, 0, 0, 0, 426, 428, 1, 0, 0, 0, 427, 416, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 430, 5, 14, 0, 0, 430, 75, 1, 0, 0, 0, 431, 432, 5, 50, 0, 0, 432, 77, 1, 0, 0, 0, 433, 434, 5, 68, 0, 0, 434, 79, 1, 0, 0, 0, 435, 436, 5, 70, 0, 0, 436, 81, 1, 0, 0, 0, 437, 438, 5, 69, 0, 0, 438, 83, 1, 0, 0, 0, 439, 440, 7, 1, 0, 0, 440, 85, 1, 0, 0, 0, 441, 442, 3, 90, 45, 0, 442, 443, 5, 5, 0, 0, 443, 444, 3, 118, 59, 0, 444, 451, 1, 0, 0, 0, 445, 446, 3, 88, 44, 0, 446, 447, 5, 5, 0, 0, 447, 448, 3, 118, 59, 0, 448, 451, 1, 0, 0, 0, 449, 451, 3, 68, 34, 0, 450, 441, 1, 0, 0, 0, 450, 445, 1, 0, 0, 0, 450, 449, 1, 0, 0, 0, 451, 87, 1, 0, 0, 0, 452, 453, 5, 9, 0, 0, 453, 454, 3, 118, 59, 0, 454, 455, 5, 10, 0, 0, 455, 89, 1, 0, 0, 0, 456, 462, 5, 66, 0, 0, 457, 462, 3, 78, 39, 0, 458, 462, 3, 66, 33, 0, 459, 462, 3, 110, 55, 0, 460, 462, 3, 112, 56, 0, 461, 456, 1, 0, 0, 0, 461, 457, 1, 0, 0, 0, 461, 458, 1, 0, 0, 0, 461, 459, 1, 0, 0, 0, 461, 460, 1, 0, 0, 0, 462, 91, 1, 0, 0, 0, 463, 464, 3, 94, 47, 0, 464, 465, 5, 66, 0, 0, 465, 93, 1, 0, 0, 0, 466, 468, 5, 71, 0, 0, 467, 466, 1, 0, 0, 0, 468, 471, 1, 0, 0, 0, 469, 467, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 95, 1, 0, 0, 0, 471, 469, 1, 0, 0, 0, 472, 474, 3, 98, 49, 0, 473, 475, 3, 108, 54, 0, 474, 473, 1, 0, 0, 0, 475, 476, 1, 0, 0, 0, 476, 474, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, 477, 97, 1, 0, 0, 0, 478, 484, 3, 68, 34, 0, 479, 484, 3, 66, 33, 0, 480, 484, 3, 72, 36, 0, 481, 484, 3, 74, 37, 0, 482, 484, 3, 102, 51, 0, 483, 478, 1, 0, 0, 0, 483, 479, 1, 0, 0, 0, 483, 480, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 483, 482, 1, 0, 0, 0, 484, 99, 1, 0, 0, 0, 485, 487, 3, 102, 51, 0, 486, 488, 3, 144, 72, 0, 487, 486, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 101, 1, 0, 0, 0, 489, 490, 3, 94, 47, 0, 490, 491, 3, 104, 52, 0, 491, 493, 5, 11, 0, 0, 492, 494, 3, 106, 53, 0, 493, 492, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 495, 1, 0, 0, 0, 495, 496, 5, 12, 0, 0, 496, 103, 1, 0, 0, 0, 497, 501, 5, 66, 0, 0, 498, 501, 3, 110, 55, 0, 499, 501, 3, 112, 56, 0, 500, 497, 1, 0, 0, 0, 500, 498, 1, 0, 0, 0, 500, 499, 1, 0, 0, 0, 501, 105, 1, 0, 0, 0, 502, 507, 3, 118, 59, 0, 503, 504, 5, 8, 0, 0, 504, 506, 3, 118, 59, 0, 505, 503, 1, 0, 0, 0, 506, 509, 1, 0, 0, 0, 507, 505, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 511, 1, 0, 0, 0, 509, 507, 1, 0, 0, 0, 510, 512, 5, 8, 0, 0, 511, 510, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 107, 1, 0, 0, 0, 513, 515, 3, 144, 72, 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 1, 0, 0, 0, 516, 517, 5, 7, 0, 0, 517, 525, 3, 90, 45, 0, 518, 519, 3, 144, 72, 0, 519, 520, 5, 7, 0, 0, 520, 522, 1, 0, 0, 0, 521, 518, 1, 0, 0, 0, 521, 522, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 525, 3, 88, 44, 0, 524, 514, 1, 0, 0, 0, 524, 521, 1, 0, 0, 0, 525, 109, 1, 0, 0, 0, 526, 527, 7, 2, 0, 0, 527, 111, 1, 0, 0, 0, 528, 529, 7, 3, 0, 0, 529, 113, 1, 0, 0, 0, 530, 531, 3, 116, 58, 0, 531, 532, 5, 30, 0, 0, 532, 533, 3, 116, 58, 0, 533, 115, 1, 0, 0, 0, 534, 538, 3, 82, 41, 0, 535, 538, 3, 68, 34, 0, 536, 538, 3, 66, 33, 0, 537, 534, 1, 0, 0, 0, 537, 535, 1, 0, 0, 0, 537, 536, 1, 0, 0, 0, 538, 117, 1, 0, 0, 0, 539, 540, 6, 59, -1, 0, 540, 541, 3, 132, 66, 0, 541, 542, 3, 118, 59, 5, 542, 545, 1, 0, 0, 0, 543, 545, 3, 120, 60, 0, 544, 539, 1, 0, 0, 0, 544, 543, 1, 0, 0, 0, 545, 563, 1, 0, 0, 0, 546, 547, 10, 4, 0, 0, 547, 548, 3, 136, 68, 0, 548, 549, 3, 118, 59, 5, 549, 562, 1, 0, 0, 0, 550, 551, 10, 3, 0, 0, 551, 552, 3, 138, 69, 0, 552, 553, 3, 118, 59, 4, 553, 562, 1, 0, 0, 0, 554, 555, 10, 2, 0, 0, 555, 557, 5, 32, 0, 0, 556, 558, 3, 118, 59, 0, 557, 556, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 559, 1, 0, 0, 0, 559, 560, 5, 5, 0, 0, 560, 562, 3, 118, 59, 3, 561, 546, 1, 0, 0, 0, 561, 550, 1, 0, 0, 0, 561, 554, 1, 0, 0, 0, 562, 565, 1, 0, 0, 0, 563, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 119, 1, 0, 0, 0, 565, 563, 1, 0, 0, 0, 566, 567, 6, 60, -1, 0, 567, 568, 3, 122, 61, 0, 568, 587, 1, 0, 0, 0, 569, 570, 10, 5, 0, 0, 570, 571, 3, 126, 63, 0, 571, 572, 3, 120, 60, 6, 572, 586, 1, 0, 0, 0, 573, 574, 10, 4, 0, 0, 574, 575, 3, 124, 62, 0, 575, 576, 3, 120, 60, 5, 576, 586, 1, 0, 0, 0, 577, 578, 10, 3, 0, 0, 578, 579, 3, 128, 64, 0, 579, 580, 3, 120, 60, 4, 580, 586, 1, 0, 0, 0, 581, 582, 10, 2, 0, 0, 582, 583, 3, 130, 65, 0, 583, 584, 3, 120, 60, 3, 584, 586, 1, 0, 0, 0, 585, 569, 1, 0, 0, 0, 585, 573, 1, 0, 0, 0, 585, 577, 1, 0, 0, 0, 585, 581, 1, 0, 0, 0, 586, 589, 1, 0, 0, 0, 587, 585, 1, 0, 0, 0, 587, 588, 1, 0, 0, 0, 588, 121, 1, 0, 0, 0, 589, 587, 1, 0, 0, 0, 590, 591, 6, 61, -1, 0, 591, 608, 3, 100, 50, 0, 592, 608, 3, 114, 57, 0, 593, 608, 3, 70, 35, 0, 594, 608, 3, 68, 34, 0, 595, 608, 3, 96, 48, 0, 596, 608, 3, 66, 33, 0, 597, 601, 5, 11, 0, 0, 598, 602, 3, 18, 9, 0, 599, 602, 3, 56, 28, 0, 600, 602, 3, 118, 59, 0, 601, 598, 1, 0, 0, 0, 601, 599, 1, 0, 0, 0, 601, 600, 1, 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 605, 5, 12, 0, 0, 604, 606, 3, 144, 72, 0, 605, 604, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 608, 1, 0, 0, 0, 607, 590, 1, 0, 0, 0, 607, 592, 1, 0, 0, 0, 607, 593, 1, 0, 0, 0, 607, 594, 1, 0, 0, 0, 607, 595, 1, 0, 0, 0, 607, 596, 1, 0, 0, 0, 607, 597, 1, 0, 0, 0, 608, 623, 1, 0, 0, 0, 609, 610, 10, 10, 0, 0, 610, 611, 3, 140, 70, 0, 611, 612, 3, 122, 61, 11, 612, 622, 1, 0, 0, 0, 613, 614, 10, 9, 0, 0, 614, 615, 3, 142, 71, 0, 615, 616, 3, 122, 61, 10, 616, 622, 1, 0, 0, 0, 617, 618, 10, 8, 0, 0, 618, 619, 3, 134, 67, 0, 619, 620, 3, 122, 61, 9, 620, 622, 1, 0, 0, 0, 621, 609, 1, 0, 0, 0, 621, 613, 1, 0, 0, 0, 621, 617, 1, 0, 0, 0, 622, 625, 1, 0, 0, 0, 623, 621, 1, 0, 0, 0, 623, 624, 1, 0, 0, 0, 624, 123, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 629, 7, 4, 0, 0, 627, 630, 3, 128, 64, 0, 628, 630, 3, 126, 63, 0, 629, 627, 1, 0, 0, 0, 629, 628, 1, 0, 0, 0, 630, 125, 1, 0, 0, 0, 631, 632, 7, 5, 0, 0, 632, 127, 1, 0, 0, 0, 633, 635, 5, 61, 0, 0, 634, 633, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 5, 62, 0, 0, 637, 129, 1, 0, 0, 0, 638, 640, 5, 61, 0, 0, 639, 638, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 642, 5, 60, 0, 0, 642, 131, 1, 0, 0, 0, 643, 644, 7, 6, 0, 0, 644, 133, 1, 0, 0, 0, 645, 646, 7, 7, 0, 0, 646, 135, 1, 0, 0, 0, 647, 648, 5, 28, 0, 0, 648, 137, 1, 0, 0, 0, 649, 650, 5, 29, 0, 0, 650, 139, 1, 0, 0, 0, 651, 652, 7, 8, 0, 0, 652, 141, 1, 0, 0, 0, 653, 654, 7, 9, 0, 0, 654, 143, 1, 0, 0, 0, 655, 656, 5, 32, 0, 0, 656, 145, 1, 0, 0, 0, 70, 149, 164, 172, 176, 187, 191, 199, 206, 214, 221, 226, 235, 241, 245, 249, 253, 262, 269, 277, 282, 291, 294, 299, 303, 314, 323, 335, 337, 345, 359, 362, 365, 372, 377, 388, 394, 398, 407, 411, 421, 425, 427, 450, 461, 469, 476, 483, 487, 493, 500, 507, 511, 514, 521, 524, 537, 544, 557, 561, 563, 585, 587, 601, 605, 607, 621, 623, 629, 634, 639] \ No newline at end of file diff --git a/pkg/parser/fql/fql_parser.go b/pkg/parser/fql/fql_parser.go index 11549a69..4b5d1ba1 100644 --- a/pkg/parser/fql/fql_parser.go +++ b/pkg/parser/fql/fql_parser.go @@ -61,7 +61,7 @@ func fqlparserParserInit() { "forExpressionBody", "forExpressionReturn", "filterClause", "limitClause", "limitClauseValue", "sortClause", "sortClauseExpression", "collectClause", "collectSelector", "collectGrouping", "collectAggregator", "collectAggregateSelector", - "collectGroupVariable", "collectGroupVariableKeeper", "collectCounter", + "collectGroupProjection", "collectGroupProjectionFilter", "collectCounter", "waitForExpression", "waitForEventName", "waitForEventSource", "optionsClause", "timeoutClause", "param", "variable", "literal", "arrayLiteral", "objectLiteral", "booleanLiteral", "stringLiteral", "floatLiteral", "integerLiteral", @@ -76,7 +76,7 @@ func fqlparserParserInit() { } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 72, 657, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, + 4, 1, 72, 658, 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, @@ -104,275 +104,277 @@ func fqlparserParserInit() { 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 263, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 270, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 276, 8, 18, 10, 18, 12, 18, 279, 9, 18, 1, 19, 1, 19, 3, 19, 283, 8, - 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, - 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 303, 8, - 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 5, 22, 312, 8, 22, - 10, 22, 12, 22, 315, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 321, 8, - 23, 10, 23, 12, 23, 324, 9, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, - 1, 25, 1, 25, 1, 25, 3, 25, 335, 8, 25, 3, 25, 337, 8, 25, 1, 26, 1, 26, - 1, 26, 1, 26, 5, 26, 343, 8, 26, 10, 26, 12, 26, 346, 9, 26, 1, 27, 1, - 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, - 359, 8, 28, 1, 28, 3, 28, 362, 8, 28, 1, 28, 3, 28, 365, 8, 28, 1, 29, - 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 372, 8, 29, 1, 30, 1, 30, 1, 30, 3, - 30, 377, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, - 1, 32, 3, 32, 388, 8, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 394, 8, 33, - 1, 34, 1, 34, 3, 34, 398, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, - 35, 1, 35, 3, 35, 407, 8, 35, 1, 36, 1, 36, 3, 36, 411, 8, 36, 1, 36, 1, - 36, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 419, 8, 37, 10, 37, 12, 37, 422, - 9, 37, 1, 37, 3, 37, 425, 8, 37, 3, 37, 427, 8, 37, 1, 37, 1, 37, 1, 38, - 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, - 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 450, 8, 43, - 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 461, - 8, 45, 1, 46, 1, 46, 1, 46, 1, 47, 5, 47, 467, 8, 47, 10, 47, 12, 47, 470, - 9, 47, 1, 48, 1, 48, 4, 48, 474, 8, 48, 11, 48, 12, 48, 475, 1, 49, 1, - 49, 1, 49, 1, 49, 1, 49, 3, 49, 483, 8, 49, 1, 50, 1, 50, 3, 50, 487, 8, - 50, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 493, 8, 51, 1, 51, 1, 51, 1, 52, - 1, 52, 1, 52, 3, 52, 500, 8, 52, 1, 53, 1, 53, 1, 53, 5, 53, 505, 8, 53, - 10, 53, 12, 53, 508, 9, 53, 1, 53, 3, 53, 511, 8, 53, 1, 54, 3, 54, 514, - 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 3, 54, 521, 8, 54, 1, 54, 3, - 54, 524, 8, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, - 1, 58, 1, 58, 1, 58, 3, 58, 537, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, - 59, 3, 59, 544, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, - 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 557, 8, 59, 1, 59, 1, 59, 5, 59, 561, - 8, 59, 10, 59, 12, 59, 564, 9, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, - 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, - 1, 60, 1, 60, 1, 60, 5, 60, 585, 8, 60, 10, 60, 12, 60, 588, 9, 60, 1, - 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, - 3, 61, 601, 8, 61, 1, 61, 1, 61, 3, 61, 605, 8, 61, 3, 61, 607, 8, 61, - 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, - 61, 1, 61, 5, 61, 621, 8, 61, 10, 61, 12, 61, 624, 9, 61, 1, 62, 1, 62, - 1, 62, 3, 62, 629, 8, 62, 1, 63, 1, 63, 1, 64, 3, 64, 634, 8, 64, 1, 64, - 1, 64, 1, 65, 3, 65, 639, 8, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, - 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, - 1, 72, 0, 3, 118, 120, 122, 73, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, - 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, - 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, - 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, - 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 0, 10, 1, 0, 66, - 67, 1, 0, 48, 49, 4, 0, 28, 29, 38, 44, 46, 47, 52, 59, 4, 0, 35, 37, 45, - 45, 48, 51, 60, 64, 2, 0, 48, 48, 56, 57, 1, 0, 15, 20, 2, 0, 24, 25, 61, - 61, 1, 0, 33, 34, 1, 0, 21, 23, 1, 0, 24, 25, 696, 0, 149, 1, 0, 0, 0, - 2, 154, 1, 0, 0, 0, 4, 156, 1, 0, 0, 0, 6, 158, 1, 0, 0, 0, 8, 164, 1, - 0, 0, 0, 10, 172, 1, 0, 0, 0, 12, 176, 1, 0, 0, 0, 14, 187, 1, 0, 0, 0, - 16, 189, 1, 0, 0, 0, 18, 226, 1, 0, 0, 0, 20, 235, 1, 0, 0, 0, 22, 241, - 1, 0, 0, 0, 24, 245, 1, 0, 0, 0, 26, 249, 1, 0, 0, 0, 28, 253, 1, 0, 0, - 0, 30, 255, 1, 0, 0, 0, 32, 258, 1, 0, 0, 0, 34, 269, 1, 0, 0, 0, 36, 271, - 1, 0, 0, 0, 38, 280, 1, 0, 0, 0, 40, 302, 1, 0, 0, 0, 42, 304, 1, 0, 0, - 0, 44, 308, 1, 0, 0, 0, 46, 316, 1, 0, 0, 0, 48, 325, 1, 0, 0, 0, 50, 336, - 1, 0, 0, 0, 52, 338, 1, 0, 0, 0, 54, 347, 1, 0, 0, 0, 56, 352, 1, 0, 0, - 0, 58, 371, 1, 0, 0, 0, 60, 376, 1, 0, 0, 0, 62, 378, 1, 0, 0, 0, 64, 381, - 1, 0, 0, 0, 66, 393, 1, 0, 0, 0, 68, 397, 1, 0, 0, 0, 70, 406, 1, 0, 0, - 0, 72, 408, 1, 0, 0, 0, 74, 414, 1, 0, 0, 0, 76, 430, 1, 0, 0, 0, 78, 432, - 1, 0, 0, 0, 80, 434, 1, 0, 0, 0, 82, 436, 1, 0, 0, 0, 84, 438, 1, 0, 0, - 0, 86, 449, 1, 0, 0, 0, 88, 451, 1, 0, 0, 0, 90, 460, 1, 0, 0, 0, 92, 462, - 1, 0, 0, 0, 94, 468, 1, 0, 0, 0, 96, 471, 1, 0, 0, 0, 98, 482, 1, 0, 0, - 0, 100, 484, 1, 0, 0, 0, 102, 488, 1, 0, 0, 0, 104, 499, 1, 0, 0, 0, 106, - 501, 1, 0, 0, 0, 108, 523, 1, 0, 0, 0, 110, 525, 1, 0, 0, 0, 112, 527, - 1, 0, 0, 0, 114, 529, 1, 0, 0, 0, 116, 536, 1, 0, 0, 0, 118, 543, 1, 0, - 0, 0, 120, 565, 1, 0, 0, 0, 122, 606, 1, 0, 0, 0, 124, 625, 1, 0, 0, 0, - 126, 630, 1, 0, 0, 0, 128, 633, 1, 0, 0, 0, 130, 638, 1, 0, 0, 0, 132, - 642, 1, 0, 0, 0, 134, 644, 1, 0, 0, 0, 136, 646, 1, 0, 0, 0, 138, 648, - 1, 0, 0, 0, 140, 650, 1, 0, 0, 0, 142, 652, 1, 0, 0, 0, 144, 654, 1, 0, - 0, 0, 146, 148, 3, 2, 1, 0, 147, 146, 1, 0, 0, 0, 148, 151, 1, 0, 0, 0, - 149, 147, 1, 0, 0, 0, 149, 150, 1, 0, 0, 0, 150, 152, 1, 0, 0, 0, 151, - 149, 1, 0, 0, 0, 152, 153, 3, 8, 4, 0, 153, 1, 1, 0, 0, 0, 154, 155, 3, - 4, 2, 0, 155, 3, 1, 0, 0, 0, 156, 157, 3, 6, 3, 0, 157, 5, 1, 0, 0, 0, - 158, 159, 5, 51, 0, 0, 159, 160, 3, 92, 46, 0, 160, 7, 1, 0, 0, 0, 161, - 163, 3, 10, 5, 0, 162, 161, 1, 0, 0, 0, 163, 166, 1, 0, 0, 0, 164, 162, - 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 167, 1, 0, 0, 0, 166, 164, 1, 0, - 0, 0, 167, 168, 3, 12, 6, 0, 168, 9, 1, 0, 0, 0, 169, 173, 3, 14, 7, 0, - 170, 173, 3, 100, 50, 0, 171, 173, 3, 56, 28, 0, 172, 169, 1, 0, 0, 0, - 172, 170, 1, 0, 0, 0, 172, 171, 1, 0, 0, 0, 173, 11, 1, 0, 0, 0, 174, 177, - 3, 16, 8, 0, 175, 177, 3, 18, 9, 0, 176, 174, 1, 0, 0, 0, 176, 175, 1, - 0, 0, 0, 177, 13, 1, 0, 0, 0, 178, 179, 5, 45, 0, 0, 179, 180, 7, 0, 0, - 0, 180, 181, 5, 31, 0, 0, 181, 188, 3, 118, 59, 0, 182, 183, 5, 45, 0, - 0, 183, 184, 3, 110, 55, 0, 184, 185, 5, 31, 0, 0, 185, 186, 3, 118, 59, - 0, 186, 188, 1, 0, 0, 0, 187, 178, 1, 0, 0, 0, 187, 182, 1, 0, 0, 0, 188, - 15, 1, 0, 0, 0, 189, 191, 5, 36, 0, 0, 190, 192, 5, 40, 0, 0, 191, 190, - 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 3, 118, - 59, 0, 194, 17, 1, 0, 0, 0, 195, 196, 5, 35, 0, 0, 196, 199, 7, 0, 0, 0, - 197, 198, 5, 8, 0, 0, 198, 200, 5, 66, 0, 0, 199, 197, 1, 0, 0, 0, 199, - 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 62, 0, 0, 202, 206, - 3, 20, 10, 0, 203, 205, 3, 26, 13, 0, 204, 203, 1, 0, 0, 0, 205, 208, 1, - 0, 0, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 209, 1, 0, 0, - 0, 208, 206, 1, 0, 0, 0, 209, 210, 3, 28, 14, 0, 210, 227, 1, 0, 0, 0, - 211, 212, 5, 35, 0, 0, 212, 214, 7, 0, 0, 0, 213, 215, 5, 63, 0, 0, 214, - 213, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 217, - 5, 64, 0, 0, 217, 221, 3, 118, 59, 0, 218, 220, 3, 26, 13, 0, 219, 218, - 1, 0, 0, 0, 220, 223, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 222, 1, 0, - 0, 0, 222, 224, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 224, 225, 3, 28, 14, - 0, 225, 227, 1, 0, 0, 0, 226, 195, 1, 0, 0, 0, 226, 211, 1, 0, 0, 0, 227, - 19, 1, 0, 0, 0, 228, 236, 3, 100, 50, 0, 229, 236, 3, 72, 36, 0, 230, 236, - 3, 74, 37, 0, 231, 236, 3, 68, 34, 0, 232, 236, 3, 96, 48, 0, 233, 236, - 3, 114, 57, 0, 234, 236, 3, 66, 33, 0, 235, 228, 1, 0, 0, 0, 235, 229, - 1, 0, 0, 0, 235, 230, 1, 0, 0, 0, 235, 231, 1, 0, 0, 0, 235, 232, 1, 0, - 0, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, 21, 1, 0, 0, 0, - 237, 242, 3, 32, 16, 0, 238, 242, 3, 36, 18, 0, 239, 242, 3, 30, 15, 0, - 240, 242, 3, 40, 20, 0, 241, 237, 1, 0, 0, 0, 241, 238, 1, 0, 0, 0, 241, - 239, 1, 0, 0, 0, 241, 240, 1, 0, 0, 0, 242, 23, 1, 0, 0, 0, 243, 246, 3, - 14, 7, 0, 244, 246, 3, 100, 50, 0, 245, 243, 1, 0, 0, 0, 245, 244, 1, 0, - 0, 0, 246, 25, 1, 0, 0, 0, 247, 250, 3, 24, 12, 0, 248, 250, 3, 22, 11, - 0, 249, 247, 1, 0, 0, 0, 249, 248, 1, 0, 0, 0, 250, 27, 1, 0, 0, 0, 251, - 254, 3, 16, 8, 0, 252, 254, 3, 18, 9, 0, 253, 251, 1, 0, 0, 0, 253, 252, - 1, 0, 0, 0, 254, 29, 1, 0, 0, 0, 255, 256, 5, 41, 0, 0, 256, 257, 3, 118, - 59, 0, 257, 31, 1, 0, 0, 0, 258, 259, 5, 44, 0, 0, 259, 262, 3, 34, 17, - 0, 260, 261, 5, 8, 0, 0, 261, 263, 3, 34, 17, 0, 262, 260, 1, 0, 0, 0, - 262, 263, 1, 0, 0, 0, 263, 33, 1, 0, 0, 0, 264, 270, 3, 82, 41, 0, 265, - 270, 3, 66, 33, 0, 266, 270, 3, 68, 34, 0, 267, 270, 3, 100, 50, 0, 268, - 270, 3, 96, 48, 0, 269, 264, 1, 0, 0, 0, 269, 265, 1, 0, 0, 0, 269, 266, - 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, 0, 270, 35, 1, 0, - 0, 0, 271, 272, 5, 43, 0, 0, 272, 277, 3, 38, 19, 0, 273, 274, 5, 8, 0, - 0, 274, 276, 3, 38, 19, 0, 275, 273, 1, 0, 0, 0, 276, 279, 1, 0, 0, 0, - 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 37, 1, 0, 0, 0, 279, 277, - 1, 0, 0, 0, 280, 282, 3, 118, 59, 0, 281, 283, 5, 47, 0, 0, 282, 281, 1, - 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 39, 1, 0, 0, 0, 284, 285, 5, 46, 0, - 0, 285, 303, 3, 54, 27, 0, 286, 287, 5, 46, 0, 0, 287, 303, 3, 46, 23, - 0, 288, 289, 5, 46, 0, 0, 289, 290, 3, 44, 22, 0, 290, 291, 3, 46, 23, - 0, 291, 303, 1, 0, 0, 0, 292, 293, 5, 46, 0, 0, 293, 294, 3, 44, 22, 0, - 294, 295, 3, 50, 25, 0, 295, 303, 1, 0, 0, 0, 296, 297, 5, 46, 0, 0, 297, - 298, 3, 44, 22, 0, 298, 299, 3, 54, 27, 0, 299, 303, 1, 0, 0, 0, 300, 301, - 5, 46, 0, 0, 301, 303, 3, 44, 22, 0, 302, 284, 1, 0, 0, 0, 302, 286, 1, - 0, 0, 0, 302, 288, 1, 0, 0, 0, 302, 292, 1, 0, 0, 0, 302, 296, 1, 0, 0, - 0, 302, 300, 1, 0, 0, 0, 303, 41, 1, 0, 0, 0, 304, 305, 5, 66, 0, 0, 305, - 306, 5, 31, 0, 0, 306, 307, 3, 118, 59, 0, 307, 43, 1, 0, 0, 0, 308, 313, - 3, 42, 21, 0, 309, 310, 5, 8, 0, 0, 310, 312, 3, 42, 21, 0, 311, 309, 1, - 0, 0, 0, 312, 315, 1, 0, 0, 0, 313, 311, 1, 0, 0, 0, 313, 314, 1, 0, 0, - 0, 314, 45, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 316, 317, 5, 58, 0, 0, 317, - 322, 3, 48, 24, 0, 318, 319, 5, 8, 0, 0, 319, 321, 3, 48, 24, 0, 320, 318, - 1, 0, 0, 0, 321, 324, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 323, 1, 0, - 0, 0, 323, 47, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 325, 326, 5, 66, 0, 0, - 326, 327, 5, 31, 0, 0, 327, 328, 3, 100, 50, 0, 328, 49, 1, 0, 0, 0, 329, - 330, 5, 52, 0, 0, 330, 337, 3, 42, 21, 0, 331, 332, 5, 52, 0, 0, 332, 334, - 5, 66, 0, 0, 333, 335, 3, 52, 26, 0, 334, 333, 1, 0, 0, 0, 334, 335, 1, - 0, 0, 0, 335, 337, 1, 0, 0, 0, 336, 329, 1, 0, 0, 0, 336, 331, 1, 0, 0, - 0, 337, 51, 1, 0, 0, 0, 338, 339, 5, 53, 0, 0, 339, 344, 5, 66, 0, 0, 340, - 341, 5, 8, 0, 0, 341, 343, 5, 66, 0, 0, 342, 340, 1, 0, 0, 0, 343, 346, - 1, 0, 0, 0, 344, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 53, 1, 0, - 0, 0, 346, 344, 1, 0, 0, 0, 347, 348, 5, 54, 0, 0, 348, 349, 5, 55, 0, - 0, 349, 350, 5, 52, 0, 0, 350, 351, 5, 66, 0, 0, 351, 55, 1, 0, 0, 0, 352, - 353, 5, 37, 0, 0, 353, 354, 5, 59, 0, 0, 354, 355, 3, 58, 29, 0, 355, 356, - 5, 62, 0, 0, 356, 358, 3, 60, 30, 0, 357, 359, 3, 62, 31, 0, 358, 357, - 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 361, 1, 0, 0, 0, 360, 362, 3, 30, - 15, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, 0, - 363, 365, 3, 64, 32, 0, 364, 363, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, - 57, 1, 0, 0, 0, 366, 372, 3, 78, 39, 0, 367, 372, 3, 68, 34, 0, 368, 372, - 3, 66, 33, 0, 369, 372, 3, 100, 50, 0, 370, 372, 3, 96, 48, 0, 371, 366, - 1, 0, 0, 0, 371, 367, 1, 0, 0, 0, 371, 368, 1, 0, 0, 0, 371, 369, 1, 0, - 0, 0, 371, 370, 1, 0, 0, 0, 372, 59, 1, 0, 0, 0, 373, 377, 3, 100, 50, - 0, 374, 377, 3, 68, 34, 0, 375, 377, 3, 96, 48, 0, 376, 373, 1, 0, 0, 0, - 376, 374, 1, 0, 0, 0, 376, 375, 1, 0, 0, 0, 377, 61, 1, 0, 0, 0, 378, 379, - 5, 38, 0, 0, 379, 380, 3, 74, 37, 0, 380, 63, 1, 0, 0, 0, 381, 387, 5, - 39, 0, 0, 382, 388, 3, 82, 41, 0, 383, 388, 3, 68, 34, 0, 384, 388, 3, - 66, 33, 0, 385, 388, 3, 96, 48, 0, 386, 388, 3, 102, 51, 0, 387, 382, 1, - 0, 0, 0, 387, 383, 1, 0, 0, 0, 387, 384, 1, 0, 0, 0, 387, 385, 1, 0, 0, - 0, 387, 386, 1, 0, 0, 0, 388, 65, 1, 0, 0, 0, 389, 390, 5, 65, 0, 0, 390, - 394, 5, 66, 0, 0, 391, 392, 5, 65, 0, 0, 392, 394, 3, 110, 55, 0, 393, - 389, 1, 0, 0, 0, 393, 391, 1, 0, 0, 0, 394, 67, 1, 0, 0, 0, 395, 398, 5, - 66, 0, 0, 396, 398, 3, 110, 55, 0, 397, 395, 1, 0, 0, 0, 397, 396, 1, 0, - 0, 0, 398, 69, 1, 0, 0, 0, 399, 407, 3, 72, 36, 0, 400, 407, 3, 74, 37, - 0, 401, 407, 3, 76, 38, 0, 402, 407, 3, 78, 39, 0, 403, 407, 3, 80, 40, - 0, 404, 407, 3, 82, 41, 0, 405, 407, 3, 84, 42, 0, 406, 399, 1, 0, 0, 0, - 406, 400, 1, 0, 0, 0, 406, 401, 1, 0, 0, 0, 406, 402, 1, 0, 0, 0, 406, - 403, 1, 0, 0, 0, 406, 404, 1, 0, 0, 0, 406, 405, 1, 0, 0, 0, 407, 71, 1, - 0, 0, 0, 408, 410, 5, 9, 0, 0, 409, 411, 3, 106, 53, 0, 410, 409, 1, 0, - 0, 0, 410, 411, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 413, 5, 10, 0, 0, - 413, 73, 1, 0, 0, 0, 414, 426, 5, 13, 0, 0, 415, 420, 3, 86, 43, 0, 416, - 417, 5, 8, 0, 0, 417, 419, 3, 86, 43, 0, 418, 416, 1, 0, 0, 0, 419, 422, - 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 424, 1, 0, - 0, 0, 422, 420, 1, 0, 0, 0, 423, 425, 5, 8, 0, 0, 424, 423, 1, 0, 0, 0, - 424, 425, 1, 0, 0, 0, 425, 427, 1, 0, 0, 0, 426, 415, 1, 0, 0, 0, 426, - 427, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 429, 5, 14, 0, 0, 429, 75, - 1, 0, 0, 0, 430, 431, 5, 50, 0, 0, 431, 77, 1, 0, 0, 0, 432, 433, 5, 68, - 0, 0, 433, 79, 1, 0, 0, 0, 434, 435, 5, 70, 0, 0, 435, 81, 1, 0, 0, 0, - 436, 437, 5, 69, 0, 0, 437, 83, 1, 0, 0, 0, 438, 439, 7, 1, 0, 0, 439, - 85, 1, 0, 0, 0, 440, 441, 3, 90, 45, 0, 441, 442, 5, 5, 0, 0, 442, 443, - 3, 118, 59, 0, 443, 450, 1, 0, 0, 0, 444, 445, 3, 88, 44, 0, 445, 446, - 5, 5, 0, 0, 446, 447, 3, 118, 59, 0, 447, 450, 1, 0, 0, 0, 448, 450, 3, - 68, 34, 0, 449, 440, 1, 0, 0, 0, 449, 444, 1, 0, 0, 0, 449, 448, 1, 0, - 0, 0, 450, 87, 1, 0, 0, 0, 451, 452, 5, 9, 0, 0, 452, 453, 3, 118, 59, - 0, 453, 454, 5, 10, 0, 0, 454, 89, 1, 0, 0, 0, 455, 461, 5, 66, 0, 0, 456, - 461, 3, 78, 39, 0, 457, 461, 3, 66, 33, 0, 458, 461, 3, 110, 55, 0, 459, - 461, 3, 112, 56, 0, 460, 455, 1, 0, 0, 0, 460, 456, 1, 0, 0, 0, 460, 457, - 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 459, 1, 0, 0, 0, 461, 91, 1, 0, - 0, 0, 462, 463, 3, 94, 47, 0, 463, 464, 5, 66, 0, 0, 464, 93, 1, 0, 0, - 0, 465, 467, 5, 71, 0, 0, 466, 465, 1, 0, 0, 0, 467, 470, 1, 0, 0, 0, 468, - 466, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 95, 1, 0, 0, 0, 470, 468, 1, - 0, 0, 0, 471, 473, 3, 98, 49, 0, 472, 474, 3, 108, 54, 0, 473, 472, 1, - 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 473, 1, 0, 0, 0, 475, 476, 1, 0, 0, - 0, 476, 97, 1, 0, 0, 0, 477, 483, 3, 68, 34, 0, 478, 483, 3, 66, 33, 0, - 479, 483, 3, 72, 36, 0, 480, 483, 3, 74, 37, 0, 481, 483, 3, 102, 51, 0, - 482, 477, 1, 0, 0, 0, 482, 478, 1, 0, 0, 0, 482, 479, 1, 0, 0, 0, 482, - 480, 1, 0, 0, 0, 482, 481, 1, 0, 0, 0, 483, 99, 1, 0, 0, 0, 484, 486, 3, - 102, 51, 0, 485, 487, 3, 144, 72, 0, 486, 485, 1, 0, 0, 0, 486, 487, 1, - 0, 0, 0, 487, 101, 1, 0, 0, 0, 488, 489, 3, 94, 47, 0, 489, 490, 3, 104, - 52, 0, 490, 492, 5, 11, 0, 0, 491, 493, 3, 106, 53, 0, 492, 491, 1, 0, - 0, 0, 492, 493, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 495, 5, 12, 0, 0, - 495, 103, 1, 0, 0, 0, 496, 500, 5, 66, 0, 0, 497, 500, 3, 110, 55, 0, 498, - 500, 3, 112, 56, 0, 499, 496, 1, 0, 0, 0, 499, 497, 1, 0, 0, 0, 499, 498, - 1, 0, 0, 0, 500, 105, 1, 0, 0, 0, 501, 506, 3, 118, 59, 0, 502, 503, 5, - 8, 0, 0, 503, 505, 3, 118, 59, 0, 504, 502, 1, 0, 0, 0, 505, 508, 1, 0, - 0, 0, 506, 504, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 510, 1, 0, 0, 0, - 508, 506, 1, 0, 0, 0, 509, 511, 5, 8, 0, 0, 510, 509, 1, 0, 0, 0, 510, - 511, 1, 0, 0, 0, 511, 107, 1, 0, 0, 0, 512, 514, 3, 144, 72, 0, 513, 512, - 1, 0, 0, 0, 513, 514, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 5, 7, - 0, 0, 516, 524, 3, 90, 45, 0, 517, 518, 3, 144, 72, 0, 518, 519, 5, 7, - 0, 0, 519, 521, 1, 0, 0, 0, 520, 517, 1, 0, 0, 0, 520, 521, 1, 0, 0, 0, - 521, 522, 1, 0, 0, 0, 522, 524, 3, 88, 44, 0, 523, 513, 1, 0, 0, 0, 523, - 520, 1, 0, 0, 0, 524, 109, 1, 0, 0, 0, 525, 526, 7, 2, 0, 0, 526, 111, - 1, 0, 0, 0, 527, 528, 7, 3, 0, 0, 528, 113, 1, 0, 0, 0, 529, 530, 3, 116, - 58, 0, 530, 531, 5, 30, 0, 0, 531, 532, 3, 116, 58, 0, 532, 115, 1, 0, - 0, 0, 533, 537, 3, 82, 41, 0, 534, 537, 3, 68, 34, 0, 535, 537, 3, 66, - 33, 0, 536, 533, 1, 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 535, 1, 0, 0, 0, - 537, 117, 1, 0, 0, 0, 538, 539, 6, 59, -1, 0, 539, 540, 3, 132, 66, 0, - 540, 541, 3, 118, 59, 5, 541, 544, 1, 0, 0, 0, 542, 544, 3, 120, 60, 0, - 543, 538, 1, 0, 0, 0, 543, 542, 1, 0, 0, 0, 544, 562, 1, 0, 0, 0, 545, - 546, 10, 4, 0, 0, 546, 547, 3, 136, 68, 0, 547, 548, 3, 118, 59, 5, 548, - 561, 1, 0, 0, 0, 549, 550, 10, 3, 0, 0, 550, 551, 3, 138, 69, 0, 551, 552, - 3, 118, 59, 4, 552, 561, 1, 0, 0, 0, 553, 554, 10, 2, 0, 0, 554, 556, 5, - 32, 0, 0, 555, 557, 3, 118, 59, 0, 556, 555, 1, 0, 0, 0, 556, 557, 1, 0, - 0, 0, 557, 558, 1, 0, 0, 0, 558, 559, 5, 5, 0, 0, 559, 561, 3, 118, 59, - 3, 560, 545, 1, 0, 0, 0, 560, 549, 1, 0, 0, 0, 560, 553, 1, 0, 0, 0, 561, - 564, 1, 0, 0, 0, 562, 560, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 119, - 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 565, 566, 6, 60, -1, 0, 566, 567, 3, - 122, 61, 0, 567, 586, 1, 0, 0, 0, 568, 569, 10, 5, 0, 0, 569, 570, 3, 126, - 63, 0, 570, 571, 3, 120, 60, 6, 571, 585, 1, 0, 0, 0, 572, 573, 10, 4, - 0, 0, 573, 574, 3, 124, 62, 0, 574, 575, 3, 120, 60, 5, 575, 585, 1, 0, - 0, 0, 576, 577, 10, 3, 0, 0, 577, 578, 3, 128, 64, 0, 578, 579, 3, 120, - 60, 4, 579, 585, 1, 0, 0, 0, 580, 581, 10, 2, 0, 0, 581, 582, 3, 130, 65, - 0, 582, 583, 3, 120, 60, 3, 583, 585, 1, 0, 0, 0, 584, 568, 1, 0, 0, 0, - 584, 572, 1, 0, 0, 0, 584, 576, 1, 0, 0, 0, 584, 580, 1, 0, 0, 0, 585, - 588, 1, 0, 0, 0, 586, 584, 1, 0, 0, 0, 586, 587, 1, 0, 0, 0, 587, 121, - 1, 0, 0, 0, 588, 586, 1, 0, 0, 0, 589, 590, 6, 61, -1, 0, 590, 607, 3, - 100, 50, 0, 591, 607, 3, 114, 57, 0, 592, 607, 3, 70, 35, 0, 593, 607, - 3, 68, 34, 0, 594, 607, 3, 96, 48, 0, 595, 607, 3, 66, 33, 0, 596, 600, - 5, 11, 0, 0, 597, 601, 3, 18, 9, 0, 598, 601, 3, 56, 28, 0, 599, 601, 3, - 118, 59, 0, 600, 597, 1, 0, 0, 0, 600, 598, 1, 0, 0, 0, 600, 599, 1, 0, - 0, 0, 601, 602, 1, 0, 0, 0, 602, 604, 5, 12, 0, 0, 603, 605, 3, 144, 72, - 0, 604, 603, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 607, 1, 0, 0, 0, 606, - 589, 1, 0, 0, 0, 606, 591, 1, 0, 0, 0, 606, 592, 1, 0, 0, 0, 606, 593, - 1, 0, 0, 0, 606, 594, 1, 0, 0, 0, 606, 595, 1, 0, 0, 0, 606, 596, 1, 0, - 0, 0, 607, 622, 1, 0, 0, 0, 608, 609, 10, 10, 0, 0, 609, 610, 3, 140, 70, - 0, 610, 611, 3, 122, 61, 11, 611, 621, 1, 0, 0, 0, 612, 613, 10, 9, 0, - 0, 613, 614, 3, 142, 71, 0, 614, 615, 3, 122, 61, 10, 615, 621, 1, 0, 0, - 0, 616, 617, 10, 8, 0, 0, 617, 618, 3, 134, 67, 0, 618, 619, 3, 122, 61, - 9, 619, 621, 1, 0, 0, 0, 620, 608, 1, 0, 0, 0, 620, 612, 1, 0, 0, 0, 620, - 616, 1, 0, 0, 0, 621, 624, 1, 0, 0, 0, 622, 620, 1, 0, 0, 0, 622, 623, - 1, 0, 0, 0, 623, 123, 1, 0, 0, 0, 624, 622, 1, 0, 0, 0, 625, 628, 7, 4, - 0, 0, 626, 629, 3, 128, 64, 0, 627, 629, 3, 126, 63, 0, 628, 626, 1, 0, - 0, 0, 628, 627, 1, 0, 0, 0, 629, 125, 1, 0, 0, 0, 630, 631, 7, 5, 0, 0, - 631, 127, 1, 0, 0, 0, 632, 634, 5, 61, 0, 0, 633, 632, 1, 0, 0, 0, 633, - 634, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 636, 5, 62, 0, 0, 636, 129, - 1, 0, 0, 0, 637, 639, 5, 61, 0, 0, 638, 637, 1, 0, 0, 0, 638, 639, 1, 0, - 0, 0, 639, 640, 1, 0, 0, 0, 640, 641, 5, 60, 0, 0, 641, 131, 1, 0, 0, 0, - 642, 643, 7, 6, 0, 0, 643, 133, 1, 0, 0, 0, 644, 645, 7, 7, 0, 0, 645, - 135, 1, 0, 0, 0, 646, 647, 5, 28, 0, 0, 647, 137, 1, 0, 0, 0, 648, 649, - 5, 29, 0, 0, 649, 139, 1, 0, 0, 0, 650, 651, 7, 8, 0, 0, 651, 141, 1, 0, - 0, 0, 652, 653, 7, 9, 0, 0, 653, 143, 1, 0, 0, 0, 654, 655, 5, 32, 0, 0, - 655, 145, 1, 0, 0, 0, 67, 149, 164, 172, 176, 187, 191, 199, 206, 214, - 221, 226, 235, 241, 245, 249, 253, 262, 269, 277, 282, 302, 313, 322, 334, - 336, 344, 358, 361, 364, 371, 376, 387, 393, 397, 406, 410, 420, 424, 426, - 449, 460, 468, 475, 482, 486, 492, 499, 506, 510, 513, 520, 523, 536, 543, - 556, 560, 562, 584, 586, 600, 604, 606, 620, 622, 628, 633, 638, + 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 292, 8, 20, + 1, 20, 3, 20, 295, 8, 20, 1, 20, 1, 20, 1, 20, 3, 20, 300, 8, 20, 1, 20, + 1, 20, 3, 20, 304, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, + 22, 5, 22, 313, 8, 22, 10, 22, 12, 22, 316, 9, 22, 1, 23, 1, 23, 1, 23, + 1, 23, 5, 23, 322, 8, 23, 10, 23, 12, 23, 325, 9, 23, 1, 24, 1, 24, 1, + 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 336, 8, 25, 3, 25, + 338, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 344, 8, 26, 10, 26, 12, + 26, 347, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, + 1, 28, 1, 28, 1, 28, 3, 28, 360, 8, 28, 1, 28, 3, 28, 363, 8, 28, 1, 28, + 3, 28, 366, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 373, 8, 29, + 1, 30, 1, 30, 1, 30, 3, 30, 378, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, + 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 389, 8, 32, 1, 33, 1, 33, 1, 33, + 1, 33, 3, 33, 395, 8, 33, 1, 34, 1, 34, 3, 34, 399, 8, 34, 1, 35, 1, 35, + 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 408, 8, 35, 1, 36, 1, 36, 3, + 36, 412, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 420, 8, + 37, 10, 37, 12, 37, 423, 9, 37, 1, 37, 3, 37, 426, 8, 37, 3, 37, 428, 8, + 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, + 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, + 43, 3, 43, 451, 8, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, + 1, 45, 1, 45, 3, 45, 462, 8, 45, 1, 46, 1, 46, 1, 46, 1, 47, 5, 47, 468, + 8, 47, 10, 47, 12, 47, 471, 9, 47, 1, 48, 1, 48, 4, 48, 475, 8, 48, 11, + 48, 12, 48, 476, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 484, 8, 49, + 1, 50, 1, 50, 3, 50, 488, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 494, + 8, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 3, 52, 501, 8, 52, 1, 53, 1, + 53, 1, 53, 5, 53, 506, 8, 53, 10, 53, 12, 53, 509, 9, 53, 1, 53, 3, 53, + 512, 8, 53, 1, 54, 3, 54, 515, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, + 3, 54, 522, 8, 54, 1, 54, 3, 54, 525, 8, 54, 1, 55, 1, 55, 1, 56, 1, 56, + 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 3, 58, 538, 8, 58, 1, + 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 545, 8, 59, 1, 59, 1, 59, 1, 59, + 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 558, 8, + 59, 1, 59, 1, 59, 5, 59, 562, 8, 59, 10, 59, 12, 59, 565, 9, 59, 1, 60, + 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, + 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 586, 8, 60, + 10, 60, 12, 60, 589, 9, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, + 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 602, 8, 61, 1, 61, 1, 61, 3, 61, + 606, 8, 61, 3, 61, 608, 8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, + 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 622, 8, 61, 10, 61, 12, + 61, 625, 9, 61, 1, 62, 1, 62, 1, 62, 3, 62, 630, 8, 62, 1, 63, 1, 63, 1, + 64, 3, 64, 635, 8, 64, 1, 64, 1, 64, 1, 65, 3, 65, 640, 8, 65, 1, 65, 1, + 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, 1, 70, + 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 0, 3, 118, 120, 122, 73, 0, 2, 4, 6, + 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, + 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, + 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, + 144, 0, 10, 1, 0, 66, 67, 1, 0, 48, 49, 4, 0, 28, 29, 38, 44, 46, 47, 52, + 59, 4, 0, 35, 37, 45, 45, 48, 51, 60, 64, 2, 0, 48, 48, 56, 57, 1, 0, 15, + 20, 2, 0, 24, 25, 61, 61, 1, 0, 33, 34, 1, 0, 21, 23, 1, 0, 24, 25, 698, + 0, 149, 1, 0, 0, 0, 2, 154, 1, 0, 0, 0, 4, 156, 1, 0, 0, 0, 6, 158, 1, + 0, 0, 0, 8, 164, 1, 0, 0, 0, 10, 172, 1, 0, 0, 0, 12, 176, 1, 0, 0, 0, + 14, 187, 1, 0, 0, 0, 16, 189, 1, 0, 0, 0, 18, 226, 1, 0, 0, 0, 20, 235, + 1, 0, 0, 0, 22, 241, 1, 0, 0, 0, 24, 245, 1, 0, 0, 0, 26, 249, 1, 0, 0, + 0, 28, 253, 1, 0, 0, 0, 30, 255, 1, 0, 0, 0, 32, 258, 1, 0, 0, 0, 34, 269, + 1, 0, 0, 0, 36, 271, 1, 0, 0, 0, 38, 280, 1, 0, 0, 0, 40, 303, 1, 0, 0, + 0, 42, 305, 1, 0, 0, 0, 44, 309, 1, 0, 0, 0, 46, 317, 1, 0, 0, 0, 48, 326, + 1, 0, 0, 0, 50, 337, 1, 0, 0, 0, 52, 339, 1, 0, 0, 0, 54, 348, 1, 0, 0, + 0, 56, 353, 1, 0, 0, 0, 58, 372, 1, 0, 0, 0, 60, 377, 1, 0, 0, 0, 62, 379, + 1, 0, 0, 0, 64, 382, 1, 0, 0, 0, 66, 394, 1, 0, 0, 0, 68, 398, 1, 0, 0, + 0, 70, 407, 1, 0, 0, 0, 72, 409, 1, 0, 0, 0, 74, 415, 1, 0, 0, 0, 76, 431, + 1, 0, 0, 0, 78, 433, 1, 0, 0, 0, 80, 435, 1, 0, 0, 0, 82, 437, 1, 0, 0, + 0, 84, 439, 1, 0, 0, 0, 86, 450, 1, 0, 0, 0, 88, 452, 1, 0, 0, 0, 90, 461, + 1, 0, 0, 0, 92, 463, 1, 0, 0, 0, 94, 469, 1, 0, 0, 0, 96, 472, 1, 0, 0, + 0, 98, 483, 1, 0, 0, 0, 100, 485, 1, 0, 0, 0, 102, 489, 1, 0, 0, 0, 104, + 500, 1, 0, 0, 0, 106, 502, 1, 0, 0, 0, 108, 524, 1, 0, 0, 0, 110, 526, + 1, 0, 0, 0, 112, 528, 1, 0, 0, 0, 114, 530, 1, 0, 0, 0, 116, 537, 1, 0, + 0, 0, 118, 544, 1, 0, 0, 0, 120, 566, 1, 0, 0, 0, 122, 607, 1, 0, 0, 0, + 124, 626, 1, 0, 0, 0, 126, 631, 1, 0, 0, 0, 128, 634, 1, 0, 0, 0, 130, + 639, 1, 0, 0, 0, 132, 643, 1, 0, 0, 0, 134, 645, 1, 0, 0, 0, 136, 647, + 1, 0, 0, 0, 138, 649, 1, 0, 0, 0, 140, 651, 1, 0, 0, 0, 142, 653, 1, 0, + 0, 0, 144, 655, 1, 0, 0, 0, 146, 148, 3, 2, 1, 0, 147, 146, 1, 0, 0, 0, + 148, 151, 1, 0, 0, 0, 149, 147, 1, 0, 0, 0, 149, 150, 1, 0, 0, 0, 150, + 152, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 152, 153, 3, 8, 4, 0, 153, 1, 1, + 0, 0, 0, 154, 155, 3, 4, 2, 0, 155, 3, 1, 0, 0, 0, 156, 157, 3, 6, 3, 0, + 157, 5, 1, 0, 0, 0, 158, 159, 5, 51, 0, 0, 159, 160, 3, 92, 46, 0, 160, + 7, 1, 0, 0, 0, 161, 163, 3, 10, 5, 0, 162, 161, 1, 0, 0, 0, 163, 166, 1, + 0, 0, 0, 164, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 167, 1, 0, 0, + 0, 166, 164, 1, 0, 0, 0, 167, 168, 3, 12, 6, 0, 168, 9, 1, 0, 0, 0, 169, + 173, 3, 14, 7, 0, 170, 173, 3, 100, 50, 0, 171, 173, 3, 56, 28, 0, 172, + 169, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 172, 171, 1, 0, 0, 0, 173, 11, 1, + 0, 0, 0, 174, 177, 3, 16, 8, 0, 175, 177, 3, 18, 9, 0, 176, 174, 1, 0, + 0, 0, 176, 175, 1, 0, 0, 0, 177, 13, 1, 0, 0, 0, 178, 179, 5, 45, 0, 0, + 179, 180, 7, 0, 0, 0, 180, 181, 5, 31, 0, 0, 181, 188, 3, 118, 59, 0, 182, + 183, 5, 45, 0, 0, 183, 184, 3, 110, 55, 0, 184, 185, 5, 31, 0, 0, 185, + 186, 3, 118, 59, 0, 186, 188, 1, 0, 0, 0, 187, 178, 1, 0, 0, 0, 187, 182, + 1, 0, 0, 0, 188, 15, 1, 0, 0, 0, 189, 191, 5, 36, 0, 0, 190, 192, 5, 40, + 0, 0, 191, 190, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, + 193, 194, 3, 118, 59, 0, 194, 17, 1, 0, 0, 0, 195, 196, 5, 35, 0, 0, 196, + 199, 7, 0, 0, 0, 197, 198, 5, 8, 0, 0, 198, 200, 5, 66, 0, 0, 199, 197, + 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 62, + 0, 0, 202, 206, 3, 20, 10, 0, 203, 205, 3, 26, 13, 0, 204, 203, 1, 0, 0, + 0, 205, 208, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, + 209, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 209, 210, 3, 28, 14, 0, 210, 227, + 1, 0, 0, 0, 211, 212, 5, 35, 0, 0, 212, 214, 7, 0, 0, 0, 213, 215, 5, 63, + 0, 0, 214, 213, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, + 216, 217, 5, 64, 0, 0, 217, 221, 3, 118, 59, 0, 218, 220, 3, 26, 13, 0, + 219, 218, 1, 0, 0, 0, 220, 223, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, + 222, 1, 0, 0, 0, 222, 224, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 224, 225, + 3, 28, 14, 0, 225, 227, 1, 0, 0, 0, 226, 195, 1, 0, 0, 0, 226, 211, 1, + 0, 0, 0, 227, 19, 1, 0, 0, 0, 228, 236, 3, 100, 50, 0, 229, 236, 3, 72, + 36, 0, 230, 236, 3, 74, 37, 0, 231, 236, 3, 68, 34, 0, 232, 236, 3, 96, + 48, 0, 233, 236, 3, 114, 57, 0, 234, 236, 3, 66, 33, 0, 235, 228, 1, 0, + 0, 0, 235, 229, 1, 0, 0, 0, 235, 230, 1, 0, 0, 0, 235, 231, 1, 0, 0, 0, + 235, 232, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, + 21, 1, 0, 0, 0, 237, 242, 3, 32, 16, 0, 238, 242, 3, 36, 18, 0, 239, 242, + 3, 30, 15, 0, 240, 242, 3, 40, 20, 0, 241, 237, 1, 0, 0, 0, 241, 238, 1, + 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 240, 1, 0, 0, 0, 242, 23, 1, 0, 0, + 0, 243, 246, 3, 14, 7, 0, 244, 246, 3, 100, 50, 0, 245, 243, 1, 0, 0, 0, + 245, 244, 1, 0, 0, 0, 246, 25, 1, 0, 0, 0, 247, 250, 3, 24, 12, 0, 248, + 250, 3, 22, 11, 0, 249, 247, 1, 0, 0, 0, 249, 248, 1, 0, 0, 0, 250, 27, + 1, 0, 0, 0, 251, 254, 3, 16, 8, 0, 252, 254, 3, 18, 9, 0, 253, 251, 1, + 0, 0, 0, 253, 252, 1, 0, 0, 0, 254, 29, 1, 0, 0, 0, 255, 256, 5, 41, 0, + 0, 256, 257, 3, 118, 59, 0, 257, 31, 1, 0, 0, 0, 258, 259, 5, 44, 0, 0, + 259, 262, 3, 34, 17, 0, 260, 261, 5, 8, 0, 0, 261, 263, 3, 34, 17, 0, 262, + 260, 1, 0, 0, 0, 262, 263, 1, 0, 0, 0, 263, 33, 1, 0, 0, 0, 264, 270, 3, + 82, 41, 0, 265, 270, 3, 66, 33, 0, 266, 270, 3, 68, 34, 0, 267, 270, 3, + 100, 50, 0, 268, 270, 3, 96, 48, 0, 269, 264, 1, 0, 0, 0, 269, 265, 1, + 0, 0, 0, 269, 266, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, + 0, 270, 35, 1, 0, 0, 0, 271, 272, 5, 43, 0, 0, 272, 277, 3, 38, 19, 0, + 273, 274, 5, 8, 0, 0, 274, 276, 3, 38, 19, 0, 275, 273, 1, 0, 0, 0, 276, + 279, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 37, 1, + 0, 0, 0, 279, 277, 1, 0, 0, 0, 280, 282, 3, 118, 59, 0, 281, 283, 5, 47, + 0, 0, 282, 281, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 39, 1, 0, 0, 0, + 284, 285, 5, 46, 0, 0, 285, 286, 3, 44, 22, 0, 286, 287, 3, 54, 27, 0, + 287, 304, 1, 0, 0, 0, 288, 289, 5, 46, 0, 0, 289, 291, 3, 44, 22, 0, 290, + 292, 3, 46, 23, 0, 291, 290, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 294, + 1, 0, 0, 0, 293, 295, 3, 50, 25, 0, 294, 293, 1, 0, 0, 0, 294, 295, 1, + 0, 0, 0, 295, 304, 1, 0, 0, 0, 296, 297, 5, 46, 0, 0, 297, 299, 3, 46, + 23, 0, 298, 300, 3, 50, 25, 0, 299, 298, 1, 0, 0, 0, 299, 300, 1, 0, 0, + 0, 300, 304, 1, 0, 0, 0, 301, 302, 5, 46, 0, 0, 302, 304, 3, 54, 27, 0, + 303, 284, 1, 0, 0, 0, 303, 288, 1, 0, 0, 0, 303, 296, 1, 0, 0, 0, 303, + 301, 1, 0, 0, 0, 304, 41, 1, 0, 0, 0, 305, 306, 5, 66, 0, 0, 306, 307, + 5, 31, 0, 0, 307, 308, 3, 118, 59, 0, 308, 43, 1, 0, 0, 0, 309, 314, 3, + 42, 21, 0, 310, 311, 5, 8, 0, 0, 311, 313, 3, 42, 21, 0, 312, 310, 1, 0, + 0, 0, 313, 316, 1, 0, 0, 0, 314, 312, 1, 0, 0, 0, 314, 315, 1, 0, 0, 0, + 315, 45, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 317, 318, 5, 58, 0, 0, 318, + 323, 3, 48, 24, 0, 319, 320, 5, 8, 0, 0, 320, 322, 3, 48, 24, 0, 321, 319, + 1, 0, 0, 0, 322, 325, 1, 0, 0, 0, 323, 321, 1, 0, 0, 0, 323, 324, 1, 0, + 0, 0, 324, 47, 1, 0, 0, 0, 325, 323, 1, 0, 0, 0, 326, 327, 5, 66, 0, 0, + 327, 328, 5, 31, 0, 0, 328, 329, 3, 100, 50, 0, 329, 49, 1, 0, 0, 0, 330, + 331, 5, 52, 0, 0, 331, 338, 3, 42, 21, 0, 332, 333, 5, 52, 0, 0, 333, 335, + 5, 66, 0, 0, 334, 336, 3, 52, 26, 0, 335, 334, 1, 0, 0, 0, 335, 336, 1, + 0, 0, 0, 336, 338, 1, 0, 0, 0, 337, 330, 1, 0, 0, 0, 337, 332, 1, 0, 0, + 0, 338, 51, 1, 0, 0, 0, 339, 340, 5, 53, 0, 0, 340, 345, 5, 66, 0, 0, 341, + 342, 5, 8, 0, 0, 342, 344, 5, 66, 0, 0, 343, 341, 1, 0, 0, 0, 344, 347, + 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 53, 1, 0, + 0, 0, 347, 345, 1, 0, 0, 0, 348, 349, 5, 54, 0, 0, 349, 350, 5, 55, 0, + 0, 350, 351, 5, 52, 0, 0, 351, 352, 5, 66, 0, 0, 352, 55, 1, 0, 0, 0, 353, + 354, 5, 37, 0, 0, 354, 355, 5, 59, 0, 0, 355, 356, 3, 58, 29, 0, 356, 357, + 5, 62, 0, 0, 357, 359, 3, 60, 30, 0, 358, 360, 3, 62, 31, 0, 359, 358, + 1, 0, 0, 0, 359, 360, 1, 0, 0, 0, 360, 362, 1, 0, 0, 0, 361, 363, 3, 30, + 15, 0, 362, 361, 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 365, 1, 0, 0, 0, + 364, 366, 3, 64, 32, 0, 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, + 57, 1, 0, 0, 0, 367, 373, 3, 78, 39, 0, 368, 373, 3, 68, 34, 0, 369, 373, + 3, 66, 33, 0, 370, 373, 3, 100, 50, 0, 371, 373, 3, 96, 48, 0, 372, 367, + 1, 0, 0, 0, 372, 368, 1, 0, 0, 0, 372, 369, 1, 0, 0, 0, 372, 370, 1, 0, + 0, 0, 372, 371, 1, 0, 0, 0, 373, 59, 1, 0, 0, 0, 374, 378, 3, 100, 50, + 0, 375, 378, 3, 68, 34, 0, 376, 378, 3, 96, 48, 0, 377, 374, 1, 0, 0, 0, + 377, 375, 1, 0, 0, 0, 377, 376, 1, 0, 0, 0, 378, 61, 1, 0, 0, 0, 379, 380, + 5, 38, 0, 0, 380, 381, 3, 74, 37, 0, 381, 63, 1, 0, 0, 0, 382, 388, 5, + 39, 0, 0, 383, 389, 3, 82, 41, 0, 384, 389, 3, 68, 34, 0, 385, 389, 3, + 66, 33, 0, 386, 389, 3, 96, 48, 0, 387, 389, 3, 102, 51, 0, 388, 383, 1, + 0, 0, 0, 388, 384, 1, 0, 0, 0, 388, 385, 1, 0, 0, 0, 388, 386, 1, 0, 0, + 0, 388, 387, 1, 0, 0, 0, 389, 65, 1, 0, 0, 0, 390, 391, 5, 65, 0, 0, 391, + 395, 5, 66, 0, 0, 392, 393, 5, 65, 0, 0, 393, 395, 3, 110, 55, 0, 394, + 390, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 395, 67, 1, 0, 0, 0, 396, 399, 5, + 66, 0, 0, 397, 399, 3, 110, 55, 0, 398, 396, 1, 0, 0, 0, 398, 397, 1, 0, + 0, 0, 399, 69, 1, 0, 0, 0, 400, 408, 3, 72, 36, 0, 401, 408, 3, 74, 37, + 0, 402, 408, 3, 76, 38, 0, 403, 408, 3, 78, 39, 0, 404, 408, 3, 80, 40, + 0, 405, 408, 3, 82, 41, 0, 406, 408, 3, 84, 42, 0, 407, 400, 1, 0, 0, 0, + 407, 401, 1, 0, 0, 0, 407, 402, 1, 0, 0, 0, 407, 403, 1, 0, 0, 0, 407, + 404, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 407, 406, 1, 0, 0, 0, 408, 71, 1, + 0, 0, 0, 409, 411, 5, 9, 0, 0, 410, 412, 3, 106, 53, 0, 411, 410, 1, 0, + 0, 0, 411, 412, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 414, 5, 10, 0, 0, + 414, 73, 1, 0, 0, 0, 415, 427, 5, 13, 0, 0, 416, 421, 3, 86, 43, 0, 417, + 418, 5, 8, 0, 0, 418, 420, 3, 86, 43, 0, 419, 417, 1, 0, 0, 0, 420, 423, + 1, 0, 0, 0, 421, 419, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 425, 1, 0, + 0, 0, 423, 421, 1, 0, 0, 0, 424, 426, 5, 8, 0, 0, 425, 424, 1, 0, 0, 0, + 425, 426, 1, 0, 0, 0, 426, 428, 1, 0, 0, 0, 427, 416, 1, 0, 0, 0, 427, + 428, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 430, 5, 14, 0, 0, 430, 75, + 1, 0, 0, 0, 431, 432, 5, 50, 0, 0, 432, 77, 1, 0, 0, 0, 433, 434, 5, 68, + 0, 0, 434, 79, 1, 0, 0, 0, 435, 436, 5, 70, 0, 0, 436, 81, 1, 0, 0, 0, + 437, 438, 5, 69, 0, 0, 438, 83, 1, 0, 0, 0, 439, 440, 7, 1, 0, 0, 440, + 85, 1, 0, 0, 0, 441, 442, 3, 90, 45, 0, 442, 443, 5, 5, 0, 0, 443, 444, + 3, 118, 59, 0, 444, 451, 1, 0, 0, 0, 445, 446, 3, 88, 44, 0, 446, 447, + 5, 5, 0, 0, 447, 448, 3, 118, 59, 0, 448, 451, 1, 0, 0, 0, 449, 451, 3, + 68, 34, 0, 450, 441, 1, 0, 0, 0, 450, 445, 1, 0, 0, 0, 450, 449, 1, 0, + 0, 0, 451, 87, 1, 0, 0, 0, 452, 453, 5, 9, 0, 0, 453, 454, 3, 118, 59, + 0, 454, 455, 5, 10, 0, 0, 455, 89, 1, 0, 0, 0, 456, 462, 5, 66, 0, 0, 457, + 462, 3, 78, 39, 0, 458, 462, 3, 66, 33, 0, 459, 462, 3, 110, 55, 0, 460, + 462, 3, 112, 56, 0, 461, 456, 1, 0, 0, 0, 461, 457, 1, 0, 0, 0, 461, 458, + 1, 0, 0, 0, 461, 459, 1, 0, 0, 0, 461, 460, 1, 0, 0, 0, 462, 91, 1, 0, + 0, 0, 463, 464, 3, 94, 47, 0, 464, 465, 5, 66, 0, 0, 465, 93, 1, 0, 0, + 0, 466, 468, 5, 71, 0, 0, 467, 466, 1, 0, 0, 0, 468, 471, 1, 0, 0, 0, 469, + 467, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 95, 1, 0, 0, 0, 471, 469, 1, + 0, 0, 0, 472, 474, 3, 98, 49, 0, 473, 475, 3, 108, 54, 0, 474, 473, 1, + 0, 0, 0, 475, 476, 1, 0, 0, 0, 476, 474, 1, 0, 0, 0, 476, 477, 1, 0, 0, + 0, 477, 97, 1, 0, 0, 0, 478, 484, 3, 68, 34, 0, 479, 484, 3, 66, 33, 0, + 480, 484, 3, 72, 36, 0, 481, 484, 3, 74, 37, 0, 482, 484, 3, 102, 51, 0, + 483, 478, 1, 0, 0, 0, 483, 479, 1, 0, 0, 0, 483, 480, 1, 0, 0, 0, 483, + 481, 1, 0, 0, 0, 483, 482, 1, 0, 0, 0, 484, 99, 1, 0, 0, 0, 485, 487, 3, + 102, 51, 0, 486, 488, 3, 144, 72, 0, 487, 486, 1, 0, 0, 0, 487, 488, 1, + 0, 0, 0, 488, 101, 1, 0, 0, 0, 489, 490, 3, 94, 47, 0, 490, 491, 3, 104, + 52, 0, 491, 493, 5, 11, 0, 0, 492, 494, 3, 106, 53, 0, 493, 492, 1, 0, + 0, 0, 493, 494, 1, 0, 0, 0, 494, 495, 1, 0, 0, 0, 495, 496, 5, 12, 0, 0, + 496, 103, 1, 0, 0, 0, 497, 501, 5, 66, 0, 0, 498, 501, 3, 110, 55, 0, 499, + 501, 3, 112, 56, 0, 500, 497, 1, 0, 0, 0, 500, 498, 1, 0, 0, 0, 500, 499, + 1, 0, 0, 0, 501, 105, 1, 0, 0, 0, 502, 507, 3, 118, 59, 0, 503, 504, 5, + 8, 0, 0, 504, 506, 3, 118, 59, 0, 505, 503, 1, 0, 0, 0, 506, 509, 1, 0, + 0, 0, 507, 505, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 511, 1, 0, 0, 0, + 509, 507, 1, 0, 0, 0, 510, 512, 5, 8, 0, 0, 511, 510, 1, 0, 0, 0, 511, + 512, 1, 0, 0, 0, 512, 107, 1, 0, 0, 0, 513, 515, 3, 144, 72, 0, 514, 513, + 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 1, 0, 0, 0, 516, 517, 5, 7, + 0, 0, 517, 525, 3, 90, 45, 0, 518, 519, 3, 144, 72, 0, 519, 520, 5, 7, + 0, 0, 520, 522, 1, 0, 0, 0, 521, 518, 1, 0, 0, 0, 521, 522, 1, 0, 0, 0, + 522, 523, 1, 0, 0, 0, 523, 525, 3, 88, 44, 0, 524, 514, 1, 0, 0, 0, 524, + 521, 1, 0, 0, 0, 525, 109, 1, 0, 0, 0, 526, 527, 7, 2, 0, 0, 527, 111, + 1, 0, 0, 0, 528, 529, 7, 3, 0, 0, 529, 113, 1, 0, 0, 0, 530, 531, 3, 116, + 58, 0, 531, 532, 5, 30, 0, 0, 532, 533, 3, 116, 58, 0, 533, 115, 1, 0, + 0, 0, 534, 538, 3, 82, 41, 0, 535, 538, 3, 68, 34, 0, 536, 538, 3, 66, + 33, 0, 537, 534, 1, 0, 0, 0, 537, 535, 1, 0, 0, 0, 537, 536, 1, 0, 0, 0, + 538, 117, 1, 0, 0, 0, 539, 540, 6, 59, -1, 0, 540, 541, 3, 132, 66, 0, + 541, 542, 3, 118, 59, 5, 542, 545, 1, 0, 0, 0, 543, 545, 3, 120, 60, 0, + 544, 539, 1, 0, 0, 0, 544, 543, 1, 0, 0, 0, 545, 563, 1, 0, 0, 0, 546, + 547, 10, 4, 0, 0, 547, 548, 3, 136, 68, 0, 548, 549, 3, 118, 59, 5, 549, + 562, 1, 0, 0, 0, 550, 551, 10, 3, 0, 0, 551, 552, 3, 138, 69, 0, 552, 553, + 3, 118, 59, 4, 553, 562, 1, 0, 0, 0, 554, 555, 10, 2, 0, 0, 555, 557, 5, + 32, 0, 0, 556, 558, 3, 118, 59, 0, 557, 556, 1, 0, 0, 0, 557, 558, 1, 0, + 0, 0, 558, 559, 1, 0, 0, 0, 559, 560, 5, 5, 0, 0, 560, 562, 3, 118, 59, + 3, 561, 546, 1, 0, 0, 0, 561, 550, 1, 0, 0, 0, 561, 554, 1, 0, 0, 0, 562, + 565, 1, 0, 0, 0, 563, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 119, + 1, 0, 0, 0, 565, 563, 1, 0, 0, 0, 566, 567, 6, 60, -1, 0, 567, 568, 3, + 122, 61, 0, 568, 587, 1, 0, 0, 0, 569, 570, 10, 5, 0, 0, 570, 571, 3, 126, + 63, 0, 571, 572, 3, 120, 60, 6, 572, 586, 1, 0, 0, 0, 573, 574, 10, 4, + 0, 0, 574, 575, 3, 124, 62, 0, 575, 576, 3, 120, 60, 5, 576, 586, 1, 0, + 0, 0, 577, 578, 10, 3, 0, 0, 578, 579, 3, 128, 64, 0, 579, 580, 3, 120, + 60, 4, 580, 586, 1, 0, 0, 0, 581, 582, 10, 2, 0, 0, 582, 583, 3, 130, 65, + 0, 583, 584, 3, 120, 60, 3, 584, 586, 1, 0, 0, 0, 585, 569, 1, 0, 0, 0, + 585, 573, 1, 0, 0, 0, 585, 577, 1, 0, 0, 0, 585, 581, 1, 0, 0, 0, 586, + 589, 1, 0, 0, 0, 587, 585, 1, 0, 0, 0, 587, 588, 1, 0, 0, 0, 588, 121, + 1, 0, 0, 0, 589, 587, 1, 0, 0, 0, 590, 591, 6, 61, -1, 0, 591, 608, 3, + 100, 50, 0, 592, 608, 3, 114, 57, 0, 593, 608, 3, 70, 35, 0, 594, 608, + 3, 68, 34, 0, 595, 608, 3, 96, 48, 0, 596, 608, 3, 66, 33, 0, 597, 601, + 5, 11, 0, 0, 598, 602, 3, 18, 9, 0, 599, 602, 3, 56, 28, 0, 600, 602, 3, + 118, 59, 0, 601, 598, 1, 0, 0, 0, 601, 599, 1, 0, 0, 0, 601, 600, 1, 0, + 0, 0, 602, 603, 1, 0, 0, 0, 603, 605, 5, 12, 0, 0, 604, 606, 3, 144, 72, + 0, 605, 604, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 608, 1, 0, 0, 0, 607, + 590, 1, 0, 0, 0, 607, 592, 1, 0, 0, 0, 607, 593, 1, 0, 0, 0, 607, 594, + 1, 0, 0, 0, 607, 595, 1, 0, 0, 0, 607, 596, 1, 0, 0, 0, 607, 597, 1, 0, + 0, 0, 608, 623, 1, 0, 0, 0, 609, 610, 10, 10, 0, 0, 610, 611, 3, 140, 70, + 0, 611, 612, 3, 122, 61, 11, 612, 622, 1, 0, 0, 0, 613, 614, 10, 9, 0, + 0, 614, 615, 3, 142, 71, 0, 615, 616, 3, 122, 61, 10, 616, 622, 1, 0, 0, + 0, 617, 618, 10, 8, 0, 0, 618, 619, 3, 134, 67, 0, 619, 620, 3, 122, 61, + 9, 620, 622, 1, 0, 0, 0, 621, 609, 1, 0, 0, 0, 621, 613, 1, 0, 0, 0, 621, + 617, 1, 0, 0, 0, 622, 625, 1, 0, 0, 0, 623, 621, 1, 0, 0, 0, 623, 624, + 1, 0, 0, 0, 624, 123, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 629, 7, 4, + 0, 0, 627, 630, 3, 128, 64, 0, 628, 630, 3, 126, 63, 0, 629, 627, 1, 0, + 0, 0, 629, 628, 1, 0, 0, 0, 630, 125, 1, 0, 0, 0, 631, 632, 7, 5, 0, 0, + 632, 127, 1, 0, 0, 0, 633, 635, 5, 61, 0, 0, 634, 633, 1, 0, 0, 0, 634, + 635, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 5, 62, 0, 0, 637, 129, + 1, 0, 0, 0, 638, 640, 5, 61, 0, 0, 639, 638, 1, 0, 0, 0, 639, 640, 1, 0, + 0, 0, 640, 641, 1, 0, 0, 0, 641, 642, 5, 60, 0, 0, 642, 131, 1, 0, 0, 0, + 643, 644, 7, 6, 0, 0, 644, 133, 1, 0, 0, 0, 645, 646, 7, 7, 0, 0, 646, + 135, 1, 0, 0, 0, 647, 648, 5, 28, 0, 0, 648, 137, 1, 0, 0, 0, 649, 650, + 5, 29, 0, 0, 650, 139, 1, 0, 0, 0, 651, 652, 7, 8, 0, 0, 652, 141, 1, 0, + 0, 0, 653, 654, 7, 9, 0, 0, 654, 143, 1, 0, 0, 0, 655, 656, 5, 32, 0, 0, + 656, 145, 1, 0, 0, 0, 70, 149, 164, 172, 176, 187, 191, 199, 206, 214, + 221, 226, 235, 241, 245, 249, 253, 262, 269, 277, 282, 291, 294, 299, 303, + 314, 323, 335, 337, 345, 359, 362, 365, 372, 377, 388, 394, 398, 407, 411, + 421, 425, 427, 450, 461, 469, 476, 483, 487, 493, 500, 507, 511, 514, 521, + 524, 537, 544, 557, 561, 563, 585, 587, 601, 605, 607, 621, 623, 629, 634, + 639, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -487,79 +489,79 @@ const ( // FqlParser rules. const ( - FqlParserRULE_program = 0 - FqlParserRULE_head = 1 - FqlParserRULE_useExpression = 2 - FqlParserRULE_use = 3 - FqlParserRULE_body = 4 - FqlParserRULE_bodyStatement = 5 - FqlParserRULE_bodyExpression = 6 - FqlParserRULE_variableDeclaration = 7 - FqlParserRULE_returnExpression = 8 - FqlParserRULE_forExpression = 9 - FqlParserRULE_forExpressionSource = 10 - FqlParserRULE_forExpressionClause = 11 - FqlParserRULE_forExpressionStatement = 12 - FqlParserRULE_forExpressionBody = 13 - FqlParserRULE_forExpressionReturn = 14 - FqlParserRULE_filterClause = 15 - FqlParserRULE_limitClause = 16 - FqlParserRULE_limitClauseValue = 17 - FqlParserRULE_sortClause = 18 - FqlParserRULE_sortClauseExpression = 19 - FqlParserRULE_collectClause = 20 - FqlParserRULE_collectSelector = 21 - FqlParserRULE_collectGrouping = 22 - FqlParserRULE_collectAggregator = 23 - FqlParserRULE_collectAggregateSelector = 24 - FqlParserRULE_collectGroupVariable = 25 - FqlParserRULE_collectGroupVariableKeeper = 26 - FqlParserRULE_collectCounter = 27 - FqlParserRULE_waitForExpression = 28 - FqlParserRULE_waitForEventName = 29 - FqlParserRULE_waitForEventSource = 30 - FqlParserRULE_optionsClause = 31 - FqlParserRULE_timeoutClause = 32 - FqlParserRULE_param = 33 - FqlParserRULE_variable = 34 - FqlParserRULE_literal = 35 - FqlParserRULE_arrayLiteral = 36 - FqlParserRULE_objectLiteral = 37 - FqlParserRULE_booleanLiteral = 38 - FqlParserRULE_stringLiteral = 39 - FqlParserRULE_floatLiteral = 40 - FqlParserRULE_integerLiteral = 41 - FqlParserRULE_noneLiteral = 42 - FqlParserRULE_propertyAssignment = 43 - FqlParserRULE_computedPropertyName = 44 - FqlParserRULE_propertyName = 45 - FqlParserRULE_namespaceIdentifier = 46 - FqlParserRULE_namespace = 47 - FqlParserRULE_memberExpression = 48 - FqlParserRULE_memberExpressionSource = 49 - FqlParserRULE_functionCallExpression = 50 - FqlParserRULE_functionCall = 51 - FqlParserRULE_functionName = 52 - FqlParserRULE_argumentList = 53 - FqlParserRULE_memberExpressionPath = 54 - FqlParserRULE_safeReservedWord = 55 - FqlParserRULE_unsafeReservedWord = 56 - FqlParserRULE_rangeOperator = 57 - FqlParserRULE_rangeOperand = 58 - FqlParserRULE_expression = 59 - FqlParserRULE_predicate = 60 - FqlParserRULE_expressionAtom = 61 - FqlParserRULE_arrayOperator = 62 - FqlParserRULE_equalityOperator = 63 - FqlParserRULE_inOperator = 64 - FqlParserRULE_likeOperator = 65 - FqlParserRULE_unaryOperator = 66 - FqlParserRULE_regexpOperator = 67 - FqlParserRULE_logicalAndOperator = 68 - FqlParserRULE_logicalOrOperator = 69 - FqlParserRULE_multiplicativeOperator = 70 - FqlParserRULE_additiveOperator = 71 - FqlParserRULE_errorOperator = 72 + FqlParserRULE_program = 0 + FqlParserRULE_head = 1 + FqlParserRULE_useExpression = 2 + FqlParserRULE_use = 3 + FqlParserRULE_body = 4 + FqlParserRULE_bodyStatement = 5 + FqlParserRULE_bodyExpression = 6 + FqlParserRULE_variableDeclaration = 7 + FqlParserRULE_returnExpression = 8 + FqlParserRULE_forExpression = 9 + FqlParserRULE_forExpressionSource = 10 + FqlParserRULE_forExpressionClause = 11 + FqlParserRULE_forExpressionStatement = 12 + FqlParserRULE_forExpressionBody = 13 + FqlParserRULE_forExpressionReturn = 14 + FqlParserRULE_filterClause = 15 + FqlParserRULE_limitClause = 16 + FqlParserRULE_limitClauseValue = 17 + FqlParserRULE_sortClause = 18 + FqlParserRULE_sortClauseExpression = 19 + FqlParserRULE_collectClause = 20 + FqlParserRULE_collectSelector = 21 + FqlParserRULE_collectGrouping = 22 + FqlParserRULE_collectAggregator = 23 + FqlParserRULE_collectAggregateSelector = 24 + FqlParserRULE_collectGroupProjection = 25 + FqlParserRULE_collectGroupProjectionFilter = 26 + FqlParserRULE_collectCounter = 27 + FqlParserRULE_waitForExpression = 28 + FqlParserRULE_waitForEventName = 29 + FqlParserRULE_waitForEventSource = 30 + FqlParserRULE_optionsClause = 31 + FqlParserRULE_timeoutClause = 32 + FqlParserRULE_param = 33 + FqlParserRULE_variable = 34 + FqlParserRULE_literal = 35 + FqlParserRULE_arrayLiteral = 36 + FqlParserRULE_objectLiteral = 37 + FqlParserRULE_booleanLiteral = 38 + FqlParserRULE_stringLiteral = 39 + FqlParserRULE_floatLiteral = 40 + FqlParserRULE_integerLiteral = 41 + FqlParserRULE_noneLiteral = 42 + FqlParserRULE_propertyAssignment = 43 + FqlParserRULE_computedPropertyName = 44 + FqlParserRULE_propertyName = 45 + FqlParserRULE_namespaceIdentifier = 46 + FqlParserRULE_namespace = 47 + FqlParserRULE_memberExpression = 48 + FqlParserRULE_memberExpressionSource = 49 + FqlParserRULE_functionCallExpression = 50 + FqlParserRULE_functionCall = 51 + FqlParserRULE_functionName = 52 + FqlParserRULE_argumentList = 53 + FqlParserRULE_memberExpressionPath = 54 + FqlParserRULE_safeReservedWord = 55 + FqlParserRULE_unsafeReservedWord = 56 + FqlParserRULE_rangeOperator = 57 + FqlParserRULE_rangeOperand = 58 + FqlParserRULE_expression = 59 + FqlParserRULE_predicate = 60 + FqlParserRULE_expressionAtom = 61 + FqlParserRULE_arrayOperator = 62 + FqlParserRULE_equalityOperator = 63 + FqlParserRULE_inOperator = 64 + FqlParserRULE_likeOperator = 65 + FqlParserRULE_unaryOperator = 66 + FqlParserRULE_regexpOperator = 67 + FqlParserRULE_logicalAndOperator = 68 + FqlParserRULE_logicalOrOperator = 69 + FqlParserRULE_multiplicativeOperator = 70 + FqlParserRULE_additiveOperator = 71 + FqlParserRULE_errorOperator = 72 ) // IProgramContext is an interface to support dynamic dispatch. @@ -4240,10 +4242,10 @@ type ICollectClauseContext interface { // Getter signatures Collect() antlr.TerminalNode + CollectGrouping() ICollectGroupingContext CollectCounter() ICollectCounterContext CollectAggregator() ICollectAggregatorContext - CollectGrouping() ICollectGroupingContext - CollectGroupVariable() ICollectGroupVariableContext + CollectGroupProjection() ICollectGroupProjectionContext // IsCollectClauseContext differentiates from other interfaces. IsCollectClauseContext() @@ -4285,6 +4287,22 @@ func (s *CollectClauseContext) Collect() antlr.TerminalNode { return s.GetToken(FqlParserCollect, 0) } +func (s *CollectClauseContext) CollectGrouping() ICollectGroupingContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICollectGroupingContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ICollectGroupingContext) +} + func (s *CollectClauseContext) CollectCounter() ICollectCounterContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { @@ -4317,10 +4335,10 @@ func (s *CollectClauseContext) CollectAggregator() ICollectAggregatorContext { return t.(ICollectAggregatorContext) } -func (s *CollectClauseContext) CollectGrouping() ICollectGroupingContext { +func (s *CollectClauseContext) CollectGroupProjection() ICollectGroupProjectionContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollectGroupingContext); ok { + if _, ok := ctx.(ICollectGroupProjectionContext); ok { t = ctx.(antlr.RuleContext) break } @@ -4330,23 +4348,7 @@ func (s *CollectClauseContext) CollectGrouping() ICollectGroupingContext { return nil } - return t.(ICollectGroupingContext) -} - -func (s *CollectClauseContext) CollectGroupVariable() ICollectGroupVariableContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollectGroupVariableContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICollectGroupVariableContext) + return t.(ICollectGroupProjectionContext) } func (s *CollectClauseContext) GetRuleContext() antlr.RuleContext { @@ -4382,13 +4384,13 @@ func (s *CollectClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{ func (p *FqlParser) CollectClause() (localctx ICollectClauseContext) { localctx = NewCollectClauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 40, FqlParserRULE_collectClause) - p.SetState(302) + p.SetState(303) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 20, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 23, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { @@ -4401,26 +4403,15 @@ func (p *FqlParser) CollectClause() (localctx ICollectClauseContext) { } { p.SetState(285) + p.CollectGrouping() + } + { + p.SetState(286) p.CollectCounter() } case 2: p.EnterOuterAlt(localctx, 2) - { - p.SetState(286) - p.Match(FqlParserCollect) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(287) - p.CollectAggregator() - } - - case 3: - p.EnterOuterAlt(localctx, 3) { p.SetState(288) p.Match(FqlParserCollect) @@ -4433,32 +4424,33 @@ func (p *FqlParser) CollectClause() (localctx ICollectClauseContext) { p.SetState(289) p.CollectGrouping() } - { - p.SetState(290) - p.CollectAggregator() - } + p.SetState(291) + p.GetErrorHandler().Sync(p) - case 4: - p.EnterOuterAlt(localctx, 4) - { - p.SetState(292) - p.Match(FqlParserCollect) - if p.HasError() { - // Recognition error - abort rule - goto errorExit + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 20, p.GetParserRuleContext()) == 1 { + { + p.SetState(290) + p.CollectAggregator() } + + } else if p.HasError() { // JIM + goto errorExit } - { - p.SetState(293) - p.CollectGrouping() - } - { - p.SetState(294) - p.CollectGroupVariable() + p.SetState(294) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 21, p.GetParserRuleContext()) == 1 { + { + p.SetState(293) + p.CollectGroupProjection() + } + + } else if p.HasError() { // JIM + goto errorExit } - case 5: - p.EnterOuterAlt(localctx, 5) + case 3: + p.EnterOuterAlt(localctx, 3) { p.SetState(296) p.Match(FqlParserCollect) @@ -4469,17 +4461,25 @@ func (p *FqlParser) CollectClause() (localctx ICollectClauseContext) { } { p.SetState(297) - p.CollectGrouping() + p.CollectAggregator() } - { - p.SetState(298) - p.CollectCounter() + p.SetState(299) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 22, p.GetParserRuleContext()) == 1 { + { + p.SetState(298) + p.CollectGroupProjection() + } + + } else if p.HasError() { // JIM + goto errorExit } - case 6: - p.EnterOuterAlt(localctx, 6) + case 4: + p.EnterOuterAlt(localctx, 4) { - p.SetState(300) + p.SetState(301) p.Match(FqlParserCollect) if p.HasError() { // Recognition error - abort rule @@ -4487,8 +4487,8 @@ func (p *FqlParser) CollectClause() (localctx ICollectClauseContext) { } } { - p.SetState(301) - p.CollectGrouping() + p.SetState(302) + p.CollectCounter() } case antlr.ATNInvalidAltNumber: @@ -4615,7 +4615,7 @@ func (p *FqlParser) CollectSelector() (localctx ICollectSelectorContext) { p.EnterRule(localctx, 42, FqlParserRULE_collectSelector) p.EnterOuterAlt(localctx, 1) { - p.SetState(304) + p.SetState(305) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -4623,7 +4623,7 @@ func (p *FqlParser) CollectSelector() (localctx ICollectSelectorContext) { } } { - p.SetState(305) + p.SetState(306) p.Match(FqlParserAssign) if p.HasError() { // Recognition error - abort rule @@ -4631,7 +4631,7 @@ func (p *FqlParser) CollectSelector() (localctx ICollectSelectorContext) { } } { - p.SetState(306) + p.SetState(307) p.expression(0) } @@ -4783,10 +4783,10 @@ func (p *FqlParser) CollectGrouping() (localctx ICollectGroupingContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(308) + p.SetState(309) p.CollectSelector() } - p.SetState(313) + p.SetState(314) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4795,7 +4795,7 @@ func (p *FqlParser) CollectGrouping() (localctx ICollectGroupingContext) { for _la == FqlParserComma { { - p.SetState(309) + p.SetState(310) p.Match(FqlParserComma) if p.HasError() { // Recognition error - abort rule @@ -4803,11 +4803,11 @@ func (p *FqlParser) CollectGrouping() (localctx ICollectGroupingContext) { } } { - p.SetState(310) + p.SetState(311) p.CollectSelector() } - p.SetState(315) + p.SetState(316) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4968,7 +4968,7 @@ func (p *FqlParser) CollectAggregator() (localctx ICollectAggregatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(316) + p.SetState(317) p.Match(FqlParserAggregate) if p.HasError() { // Recognition error - abort rule @@ -4976,10 +4976,10 @@ func (p *FqlParser) CollectAggregator() (localctx ICollectAggregatorContext) { } } { - p.SetState(317) + p.SetState(318) p.CollectAggregateSelector() } - p.SetState(322) + p.SetState(323) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4988,7 +4988,7 @@ func (p *FqlParser) CollectAggregator() (localctx ICollectAggregatorContext) { for _la == FqlParserComma { { - p.SetState(318) + p.SetState(319) p.Match(FqlParserComma) if p.HasError() { // Recognition error - abort rule @@ -4996,11 +4996,11 @@ func (p *FqlParser) CollectAggregator() (localctx ICollectAggregatorContext) { } } { - p.SetState(319) + p.SetState(320) p.CollectAggregateSelector() } - p.SetState(324) + p.SetState(325) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5128,7 +5128,7 @@ func (p *FqlParser) CollectAggregateSelector() (localctx ICollectAggregateSelect p.EnterRule(localctx, 48, FqlParserRULE_collectAggregateSelector) p.EnterOuterAlt(localctx, 1) { - p.SetState(325) + p.SetState(326) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -5136,7 +5136,7 @@ func (p *FqlParser) CollectAggregateSelector() (localctx ICollectAggregateSelect } } { - p.SetState(326) + p.SetState(327) p.Match(FqlParserAssign) if p.HasError() { // Recognition error - abort rule @@ -5144,7 +5144,7 @@ func (p *FqlParser) CollectAggregateSelector() (localctx ICollectAggregateSelect } } { - p.SetState(327) + p.SetState(328) p.FunctionCallExpression() } @@ -5161,8 +5161,8 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// ICollectGroupVariableContext is an interface to support dynamic dispatch. -type ICollectGroupVariableContext interface { +// ICollectGroupProjectionContext is an interface to support dynamic dispatch. +type ICollectGroupProjectionContext interface { antlr.ParserRuleContext // GetParser returns the parser. @@ -5172,49 +5172,49 @@ type ICollectGroupVariableContext interface { Into() antlr.TerminalNode CollectSelector() ICollectSelectorContext Identifier() antlr.TerminalNode - CollectGroupVariableKeeper() ICollectGroupVariableKeeperContext + CollectGroupProjectionFilter() ICollectGroupProjectionFilterContext - // IsCollectGroupVariableContext differentiates from other interfaces. - IsCollectGroupVariableContext() + // IsCollectGroupProjectionContext differentiates from other interfaces. + IsCollectGroupProjectionContext() } -type CollectGroupVariableContext struct { +type CollectGroupProjectionContext struct { antlr.BaseParserRuleContext parser antlr.Parser } -func NewEmptyCollectGroupVariableContext() *CollectGroupVariableContext { - var p = new(CollectGroupVariableContext) +func NewEmptyCollectGroupProjectionContext() *CollectGroupProjectionContext { + var p = new(CollectGroupProjectionContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = FqlParserRULE_collectGroupVariable + p.RuleIndex = FqlParserRULE_collectGroupProjection return p } -func InitEmptyCollectGroupVariableContext(p *CollectGroupVariableContext) { +func InitEmptyCollectGroupProjectionContext(p *CollectGroupProjectionContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = FqlParserRULE_collectGroupVariable + p.RuleIndex = FqlParserRULE_collectGroupProjection } -func (*CollectGroupVariableContext) IsCollectGroupVariableContext() {} +func (*CollectGroupProjectionContext) IsCollectGroupProjectionContext() {} -func NewCollectGroupVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectGroupVariableContext { - var p = new(CollectGroupVariableContext) +func NewCollectGroupProjectionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectGroupProjectionContext { + var p = new(CollectGroupProjectionContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = FqlParserRULE_collectGroupVariable + p.RuleIndex = FqlParserRULE_collectGroupProjection return p } -func (s *CollectGroupVariableContext) GetParser() antlr.Parser { return s.parser } +func (s *CollectGroupProjectionContext) GetParser() antlr.Parser { return s.parser } -func (s *CollectGroupVariableContext) Into() antlr.TerminalNode { +func (s *CollectGroupProjectionContext) Into() antlr.TerminalNode { return s.GetToken(FqlParserInto, 0) } -func (s *CollectGroupVariableContext) CollectSelector() ICollectSelectorContext { +func (s *CollectGroupProjectionContext) CollectSelector() ICollectSelectorContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICollectSelectorContext); ok { @@ -5230,14 +5230,14 @@ func (s *CollectGroupVariableContext) CollectSelector() ICollectSelectorContext return t.(ICollectSelectorContext) } -func (s *CollectGroupVariableContext) Identifier() antlr.TerminalNode { +func (s *CollectGroupProjectionContext) Identifier() antlr.TerminalNode { return s.GetToken(FqlParserIdentifier, 0) } -func (s *CollectGroupVariableContext) CollectGroupVariableKeeper() ICollectGroupVariableKeeperContext { +func (s *CollectGroupProjectionContext) CollectGroupProjectionFilter() ICollectGroupProjectionFilterContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollectGroupVariableKeeperContext); ok { + if _, ok := ctx.(ICollectGroupProjectionFilterContext); ok { t = ctx.(antlr.RuleContext) break } @@ -5247,53 +5247,53 @@ func (s *CollectGroupVariableContext) CollectGroupVariableKeeper() ICollectGroup return nil } - return t.(ICollectGroupVariableKeeperContext) + return t.(ICollectGroupProjectionFilterContext) } -func (s *CollectGroupVariableContext) GetRuleContext() antlr.RuleContext { +func (s *CollectGroupProjectionContext) GetRuleContext() antlr.RuleContext { return s } -func (s *CollectGroupVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *CollectGroupProjectionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *CollectGroupVariableContext) EnterRule(listener antlr.ParseTreeListener) { +func (s *CollectGroupProjectionContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(FqlParserListener); ok { - listenerT.EnterCollectGroupVariable(s) + listenerT.EnterCollectGroupProjection(s) } } -func (s *CollectGroupVariableContext) ExitRule(listener antlr.ParseTreeListener) { +func (s *CollectGroupProjectionContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(FqlParserListener); ok { - listenerT.ExitCollectGroupVariable(s) + listenerT.ExitCollectGroupProjection(s) } } -func (s *CollectGroupVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *CollectGroupProjectionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case FqlParserVisitor: - return t.VisitCollectGroupVariable(s) + return t.VisitCollectGroupProjection(s) default: return t.VisitChildren(s) } } -func (p *FqlParser) CollectGroupVariable() (localctx ICollectGroupVariableContext) { - localctx = NewCollectGroupVariableContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 50, FqlParserRULE_collectGroupVariable) - p.SetState(336) +func (p *FqlParser) CollectGroupProjection() (localctx ICollectGroupProjectionContext) { + localctx = NewCollectGroupProjectionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 50, FqlParserRULE_collectGroupProjection) + p.SetState(337) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 24, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(329) + p.SetState(330) p.Match(FqlParserInto) if p.HasError() { // Recognition error - abort rule @@ -5301,14 +5301,14 @@ func (p *FqlParser) CollectGroupVariable() (localctx ICollectGroupVariableContex } } { - p.SetState(330) + p.SetState(331) p.CollectSelector() } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(331) + p.SetState(332) p.Match(FqlParserInto) if p.HasError() { // Recognition error - abort rule @@ -5316,20 +5316,20 @@ func (p *FqlParser) CollectGroupVariable() (localctx ICollectGroupVariableContex } } { - p.SetState(332) + p.SetState(333) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(334) + p.SetState(335) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 23, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 { { - p.SetState(333) - p.CollectGroupVariableKeeper() + p.SetState(334) + p.CollectGroupProjectionFilter() } } else if p.HasError() { // JIM @@ -5353,8 +5353,8 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// ICollectGroupVariableKeeperContext is an interface to support dynamic dispatch. -type ICollectGroupVariableKeeperContext interface { +// ICollectGroupProjectionFilterContext is an interface to support dynamic dispatch. +type ICollectGroupProjectionFilterContext interface { antlr.ParserRuleContext // GetParser returns the parser. @@ -5367,100 +5367,100 @@ type ICollectGroupVariableKeeperContext interface { AllComma() []antlr.TerminalNode Comma(i int) antlr.TerminalNode - // IsCollectGroupVariableKeeperContext differentiates from other interfaces. - IsCollectGroupVariableKeeperContext() + // IsCollectGroupProjectionFilterContext differentiates from other interfaces. + IsCollectGroupProjectionFilterContext() } -type CollectGroupVariableKeeperContext struct { +type CollectGroupProjectionFilterContext struct { antlr.BaseParserRuleContext parser antlr.Parser } -func NewEmptyCollectGroupVariableKeeperContext() *CollectGroupVariableKeeperContext { - var p = new(CollectGroupVariableKeeperContext) +func NewEmptyCollectGroupProjectionFilterContext() *CollectGroupProjectionFilterContext { + var p = new(CollectGroupProjectionFilterContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = FqlParserRULE_collectGroupVariableKeeper + p.RuleIndex = FqlParserRULE_collectGroupProjectionFilter return p } -func InitEmptyCollectGroupVariableKeeperContext(p *CollectGroupVariableKeeperContext) { +func InitEmptyCollectGroupProjectionFilterContext(p *CollectGroupProjectionFilterContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = FqlParserRULE_collectGroupVariableKeeper + p.RuleIndex = FqlParserRULE_collectGroupProjectionFilter } -func (*CollectGroupVariableKeeperContext) IsCollectGroupVariableKeeperContext() {} +func (*CollectGroupProjectionFilterContext) IsCollectGroupProjectionFilterContext() {} -func NewCollectGroupVariableKeeperContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectGroupVariableKeeperContext { - var p = new(CollectGroupVariableKeeperContext) +func NewCollectGroupProjectionFilterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectGroupProjectionFilterContext { + var p = new(CollectGroupProjectionFilterContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = FqlParserRULE_collectGroupVariableKeeper + p.RuleIndex = FqlParserRULE_collectGroupProjectionFilter return p } -func (s *CollectGroupVariableKeeperContext) GetParser() antlr.Parser { return s.parser } +func (s *CollectGroupProjectionFilterContext) GetParser() antlr.Parser { return s.parser } -func (s *CollectGroupVariableKeeperContext) Keep() antlr.TerminalNode { +func (s *CollectGroupProjectionFilterContext) Keep() antlr.TerminalNode { return s.GetToken(FqlParserKeep, 0) } -func (s *CollectGroupVariableKeeperContext) AllIdentifier() []antlr.TerminalNode { +func (s *CollectGroupProjectionFilterContext) AllIdentifier() []antlr.TerminalNode { return s.GetTokens(FqlParserIdentifier) } -func (s *CollectGroupVariableKeeperContext) Identifier(i int) antlr.TerminalNode { +func (s *CollectGroupProjectionFilterContext) Identifier(i int) antlr.TerminalNode { return s.GetToken(FqlParserIdentifier, i) } -func (s *CollectGroupVariableKeeperContext) AllComma() []antlr.TerminalNode { +func (s *CollectGroupProjectionFilterContext) AllComma() []antlr.TerminalNode { return s.GetTokens(FqlParserComma) } -func (s *CollectGroupVariableKeeperContext) Comma(i int) antlr.TerminalNode { +func (s *CollectGroupProjectionFilterContext) Comma(i int) antlr.TerminalNode { return s.GetToken(FqlParserComma, i) } -func (s *CollectGroupVariableKeeperContext) GetRuleContext() antlr.RuleContext { +func (s *CollectGroupProjectionFilterContext) GetRuleContext() antlr.RuleContext { return s } -func (s *CollectGroupVariableKeeperContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *CollectGroupProjectionFilterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *CollectGroupVariableKeeperContext) EnterRule(listener antlr.ParseTreeListener) { +func (s *CollectGroupProjectionFilterContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(FqlParserListener); ok { - listenerT.EnterCollectGroupVariableKeeper(s) + listenerT.EnterCollectGroupProjectionFilter(s) } } -func (s *CollectGroupVariableKeeperContext) ExitRule(listener antlr.ParseTreeListener) { +func (s *CollectGroupProjectionFilterContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(FqlParserListener); ok { - listenerT.ExitCollectGroupVariableKeeper(s) + listenerT.ExitCollectGroupProjectionFilter(s) } } -func (s *CollectGroupVariableKeeperContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *CollectGroupProjectionFilterContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case FqlParserVisitor: - return t.VisitCollectGroupVariableKeeper(s) + return t.VisitCollectGroupProjectionFilter(s) default: return t.VisitChildren(s) } } -func (p *FqlParser) CollectGroupVariableKeeper() (localctx ICollectGroupVariableKeeperContext) { - localctx = NewCollectGroupVariableKeeperContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 52, FqlParserRULE_collectGroupVariableKeeper) +func (p *FqlParser) CollectGroupProjectionFilter() (localctx ICollectGroupProjectionFilterContext) { + localctx = NewCollectGroupProjectionFilterContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 52, FqlParserRULE_collectGroupProjectionFilter) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(338) + p.SetState(339) p.Match(FqlParserKeep) if p.HasError() { // Recognition error - abort rule @@ -5468,14 +5468,14 @@ func (p *FqlParser) CollectGroupVariableKeeper() (localctx ICollectGroupVariable } } { - p.SetState(339) + p.SetState(340) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(344) + p.SetState(345) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5484,7 +5484,7 @@ func (p *FqlParser) CollectGroupVariableKeeper() (localctx ICollectGroupVariable for _la == FqlParserComma { { - p.SetState(340) + p.SetState(341) p.Match(FqlParserComma) if p.HasError() { // Recognition error - abort rule @@ -5492,7 +5492,7 @@ func (p *FqlParser) CollectGroupVariableKeeper() (localctx ICollectGroupVariable } } { - p.SetState(341) + p.SetState(342) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -5500,7 +5500,7 @@ func (p *FqlParser) CollectGroupVariableKeeper() (localctx ICollectGroupVariable } } - p.SetState(346) + p.SetState(347) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5621,7 +5621,7 @@ func (p *FqlParser) CollectCounter() (localctx ICollectCounterContext) { p.EnterRule(localctx, 54, FqlParserRULE_collectCounter) p.EnterOuterAlt(localctx, 1) { - p.SetState(347) + p.SetState(348) p.Match(FqlParserWith) if p.HasError() { // Recognition error - abort rule @@ -5629,7 +5629,7 @@ func (p *FqlParser) CollectCounter() (localctx ICollectCounterContext) { } } { - p.SetState(348) + p.SetState(349) p.Match(FqlParserCount) if p.HasError() { // Recognition error - abort rule @@ -5637,7 +5637,7 @@ func (p *FqlParser) CollectCounter() (localctx ICollectCounterContext) { } } { - p.SetState(349) + p.SetState(350) p.Match(FqlParserInto) if p.HasError() { // Recognition error - abort rule @@ -5645,7 +5645,7 @@ func (p *FqlParser) CollectCounter() (localctx ICollectCounterContext) { } } { - p.SetState(350) + p.SetState(351) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -5846,7 +5846,7 @@ func (p *FqlParser) WaitForExpression() (localctx IWaitForExpressionContext) { p.EnterRule(localctx, 56, FqlParserRULE_waitForExpression) p.EnterOuterAlt(localctx, 1) { - p.SetState(352) + p.SetState(353) p.Match(FqlParserWaitfor) if p.HasError() { // Recognition error - abort rule @@ -5854,7 +5854,7 @@ func (p *FqlParser) WaitForExpression() (localctx IWaitForExpressionContext) { } } { - p.SetState(353) + p.SetState(354) p.Match(FqlParserEvent) if p.HasError() { // Recognition error - abort rule @@ -5862,11 +5862,11 @@ func (p *FqlParser) WaitForExpression() (localctx IWaitForExpressionContext) { } } { - p.SetState(354) + p.SetState(355) p.WaitForEventName() } { - p.SetState(355) + p.SetState(356) p.Match(FqlParserIn) if p.HasError() { // Recognition error - abort rule @@ -5874,39 +5874,39 @@ func (p *FqlParser) WaitForExpression() (localctx IWaitForExpressionContext) { } } { - p.SetState(356) + p.SetState(357) p.WaitForEventSource() } - p.SetState(358) + p.SetState(359) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 29, p.GetParserRuleContext()) == 1 { { - p.SetState(357) + p.SetState(358) p.OptionsClause() } } else if p.HasError() { // JIM goto errorExit } - p.SetState(361) + p.SetState(362) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) == 1 { { - p.SetState(360) + p.SetState(361) p.FilterClause() } } else if p.HasError() { // JIM goto errorExit } - p.SetState(364) + p.SetState(365) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 28, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 31, p.GetParserRuleContext()) == 1 { { - p.SetState(363) + p.SetState(364) p.TimeoutClause() } @@ -6090,45 +6090,45 @@ func (s *WaitForEventNameContext) Accept(visitor antlr.ParseTreeVisitor) interfa func (p *FqlParser) WaitForEventName() (localctx IWaitForEventNameContext) { localctx = NewWaitForEventNameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 58, FqlParserRULE_waitForEventName) - p.SetState(371) + p.SetState(372) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 29, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 32, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(366) + p.SetState(367) p.StringLiteral() } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(367) + p.SetState(368) p.Variable() } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(368) + p.SetState(369) p.Param() } case 4: p.EnterOuterAlt(localctx, 4) { - p.SetState(369) + p.SetState(370) p.FunctionCallExpression() } case 5: p.EnterOuterAlt(localctx, 5) { - p.SetState(370) + p.SetState(371) p.MemberExpression() } @@ -6278,31 +6278,31 @@ func (s *WaitForEventSourceContext) Accept(visitor antlr.ParseTreeVisitor) inter func (p *FqlParser) WaitForEventSource() (localctx IWaitForEventSourceContext) { localctx = NewWaitForEventSourceContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 60, FqlParserRULE_waitForEventSource) - p.SetState(376) + p.SetState(377) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 33, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(373) + p.SetState(374) p.FunctionCallExpression() } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(374) + p.SetState(375) p.Variable() } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(375) + p.SetState(376) p.MemberExpression() } @@ -6425,7 +6425,7 @@ func (p *FqlParser) OptionsClause() (localctx IOptionsClauseContext) { p.EnterRule(localctx, 62, FqlParserRULE_optionsClause) p.EnterOuterAlt(localctx, 1) { - p.SetState(378) + p.SetState(379) p.Match(FqlParserOptions) if p.HasError() { // Recognition error - abort rule @@ -6433,7 +6433,7 @@ func (p *FqlParser) OptionsClause() (localctx IOptionsClauseContext) { } } { - p.SetState(379) + p.SetState(380) p.ObjectLiteral() } @@ -6620,47 +6620,47 @@ func (p *FqlParser) TimeoutClause() (localctx ITimeoutClauseContext) { p.EnterRule(localctx, 64, FqlParserRULE_timeoutClause) p.EnterOuterAlt(localctx, 1) { - p.SetState(381) + p.SetState(382) p.Match(FqlParserTimeout) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(387) + p.SetState(388) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 31, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 34, p.GetParserRuleContext()) { case 1: { - p.SetState(382) + p.SetState(383) p.IntegerLiteral() } case 2: { - p.SetState(383) + p.SetState(384) p.Variable() } case 3: { - p.SetState(384) + p.SetState(385) p.Param() } case 4: { - p.SetState(385) + p.SetState(386) p.MemberExpression() } case 5: { - p.SetState(386) + p.SetState(387) p.FunctionCall() } @@ -6786,17 +6786,17 @@ func (s *ParamContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *FqlParser) Param() (localctx IParamContext) { localctx = NewParamContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 66, FqlParserRULE_param) - p.SetState(393) + p.SetState(394) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 32, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 35, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(389) + p.SetState(390) p.Match(FqlParserParam) if p.HasError() { // Recognition error - abort rule @@ -6804,7 +6804,7 @@ func (p *FqlParser) Param() (localctx IParamContext) { } } { - p.SetState(390) + p.SetState(391) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -6815,7 +6815,7 @@ func (p *FqlParser) Param() (localctx IParamContext) { case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(391) + p.SetState(392) p.Match(FqlParserParam) if p.HasError() { // Recognition error - abort rule @@ -6823,7 +6823,7 @@ func (p *FqlParser) Param() (localctx IParamContext) { } } { - p.SetState(392) + p.SetState(393) p.SafeReservedWord() } @@ -6944,7 +6944,7 @@ func (s *VariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *FqlParser) Variable() (localctx IVariableContext) { localctx = NewVariableContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 68, FqlParserRULE_variable) - p.SetState(397) + p.SetState(398) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6954,7 +6954,7 @@ func (p *FqlParser) Variable() (localctx IVariableContext) { case FqlParserIdentifier: p.EnterOuterAlt(localctx, 1) { - p.SetState(395) + p.SetState(396) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -6965,7 +6965,7 @@ func (p *FqlParser) Variable() (localctx IVariableContext) { case FqlParserAnd, FqlParserOr, FqlParserOptions, FqlParserTimeout, FqlParserDistinct, FqlParserFilter, FqlParserCurrent, FqlParserSort, FqlParserLimit, FqlParserCollect, FqlParserSortDirection, FqlParserInto, FqlParserKeep, FqlParserWith, FqlParserCount, FqlParserAll, FqlParserAny, FqlParserAggregate, FqlParserEvent: p.EnterOuterAlt(localctx, 2) { - p.SetState(396) + p.SetState(397) p.SafeReservedWord() } @@ -7184,7 +7184,7 @@ func (s *LiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *FqlParser) Literal() (localctx ILiteralContext) { localctx = NewLiteralContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 70, FqlParserRULE_literal) - p.SetState(406) + p.SetState(407) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -7194,49 +7194,49 @@ func (p *FqlParser) Literal() (localctx ILiteralContext) { case FqlParserOpenBracket: p.EnterOuterAlt(localctx, 1) { - p.SetState(399) + p.SetState(400) p.ArrayLiteral() } case FqlParserOpenBrace: p.EnterOuterAlt(localctx, 2) { - p.SetState(400) + p.SetState(401) p.ObjectLiteral() } case FqlParserBooleanLiteral: p.EnterOuterAlt(localctx, 3) { - p.SetState(401) + p.SetState(402) p.BooleanLiteral() } case FqlParserStringLiteral: p.EnterOuterAlt(localctx, 4) { - p.SetState(402) + p.SetState(403) p.StringLiteral() } case FqlParserFloatLiteral: p.EnterOuterAlt(localctx, 5) { - p.SetState(403) + p.SetState(404) p.FloatLiteral() } case FqlParserIntegerLiteral: p.EnterOuterAlt(localctx, 6) { - p.SetState(404) + p.SetState(405) p.IntegerLiteral() } case FqlParserNone, FqlParserNull: p.EnterOuterAlt(localctx, 7) { - p.SetState(405) + p.SetState(406) p.NoneLiteral() } @@ -7367,14 +7367,14 @@ func (p *FqlParser) ArrayLiteral() (localctx IArrayLiteralContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(408) + p.SetState(409) p.Match(FqlParserOpenBracket) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(410) + p.SetState(411) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -7383,13 +7383,13 @@ func (p *FqlParser) ArrayLiteral() (localctx IArrayLiteralContext) { if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&8935141660637626389) != 0 { { - p.SetState(409) + p.SetState(410) p.ArgumentList() } } { - p.SetState(412) + p.SetState(413) p.Match(FqlParserCloseBracket) if p.HasError() { // Recognition error - abort rule @@ -7557,14 +7557,14 @@ func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(414) + p.SetState(415) p.Match(FqlParserOpenBrace) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(426) + p.SetState(427) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -7573,22 +7573,22 @@ func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) { if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&864691128389599233) != 0 { { - p.SetState(415) + p.SetState(416) p.PropertyAssignment() } - p.SetState(420) + p.SetState(421) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 39, p.GetParserRuleContext()) if p.HasError() { goto errorExit } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { - p.SetState(416) + p.SetState(417) p.Match(FqlParserComma) if p.HasError() { // Recognition error - abort rule @@ -7596,22 +7596,22 @@ func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) { } } { - p.SetState(417) + p.SetState(418) p.PropertyAssignment() } } - p.SetState(422) + p.SetState(423) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 39, p.GetParserRuleContext()) if p.HasError() { goto errorExit } } - p.SetState(424) + p.SetState(425) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -7620,7 +7620,7 @@ func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) { if _la == FqlParserComma { { - p.SetState(423) + p.SetState(424) p.Match(FqlParserComma) if p.HasError() { // Recognition error - abort rule @@ -7632,7 +7632,7 @@ func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) { } { - p.SetState(428) + p.SetState(429) p.Match(FqlParserCloseBrace) if p.HasError() { // Recognition error - abort rule @@ -7738,7 +7738,7 @@ func (p *FqlParser) BooleanLiteral() (localctx IBooleanLiteralContext) { p.EnterRule(localctx, 76, FqlParserRULE_booleanLiteral) p.EnterOuterAlt(localctx, 1) { - p.SetState(430) + p.SetState(431) p.Match(FqlParserBooleanLiteral) if p.HasError() { // Recognition error - abort rule @@ -7844,7 +7844,7 @@ func (p *FqlParser) StringLiteral() (localctx IStringLiteralContext) { p.EnterRule(localctx, 78, FqlParserRULE_stringLiteral) p.EnterOuterAlt(localctx, 1) { - p.SetState(432) + p.SetState(433) p.Match(FqlParserStringLiteral) if p.HasError() { // Recognition error - abort rule @@ -7950,7 +7950,7 @@ func (p *FqlParser) FloatLiteral() (localctx IFloatLiteralContext) { p.EnterRule(localctx, 80, FqlParserRULE_floatLiteral) p.EnterOuterAlt(localctx, 1) { - p.SetState(434) + p.SetState(435) p.Match(FqlParserFloatLiteral) if p.HasError() { // Recognition error - abort rule @@ -8056,7 +8056,7 @@ func (p *FqlParser) IntegerLiteral() (localctx IIntegerLiteralContext) { p.EnterRule(localctx, 82, FqlParserRULE_integerLiteral) p.EnterOuterAlt(localctx, 1) { - p.SetState(436) + p.SetState(437) p.Match(FqlParserIntegerLiteral) if p.HasError() { // Recognition error - abort rule @@ -8169,7 +8169,7 @@ func (p *FqlParser) NoneLiteral() (localctx INoneLiteralContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(438) + p.SetState(439) _la = p.GetTokenStream().LA(1) if !(_la == FqlParserNone || _la == FqlParserNull) { @@ -8344,21 +8344,21 @@ func (s *PropertyAssignmentContext) Accept(visitor antlr.ParseTreeVisitor) inter func (p *FqlParser) PropertyAssignment() (localctx IPropertyAssignmentContext) { localctx = NewPropertyAssignmentContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 86, FqlParserRULE_propertyAssignment) - p.SetState(449) + p.SetState(450) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 39, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 42, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(440) + p.SetState(441) p.PropertyName() } { - p.SetState(441) + p.SetState(442) p.Match(FqlParserColon) if p.HasError() { // Recognition error - abort rule @@ -8366,18 +8366,18 @@ func (p *FqlParser) PropertyAssignment() (localctx IPropertyAssignmentContext) { } } { - p.SetState(442) + p.SetState(443) p.expression(0) } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(444) + p.SetState(445) p.ComputedPropertyName() } { - p.SetState(445) + p.SetState(446) p.Match(FqlParserColon) if p.HasError() { // Recognition error - abort rule @@ -8385,14 +8385,14 @@ func (p *FqlParser) PropertyAssignment() (localctx IPropertyAssignmentContext) { } } { - p.SetState(446) + p.SetState(447) p.expression(0) } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(448) + p.SetState(449) p.Variable() } @@ -8520,7 +8520,7 @@ func (p *FqlParser) ComputedPropertyName() (localctx IComputedPropertyNameContex p.EnterRule(localctx, 88, FqlParserRULE_computedPropertyName) p.EnterOuterAlt(localctx, 1) { - p.SetState(451) + p.SetState(452) p.Match(FqlParserOpenBracket) if p.HasError() { // Recognition error - abort rule @@ -8528,11 +8528,11 @@ func (p *FqlParser) ComputedPropertyName() (localctx IComputedPropertyNameContex } } { - p.SetState(452) + p.SetState(453) p.expression(0) } { - p.SetState(453) + p.SetState(454) p.Match(FqlParserCloseBracket) if p.HasError() { // Recognition error - abort rule @@ -8704,7 +8704,7 @@ func (s *PropertyNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (p *FqlParser) PropertyName() (localctx IPropertyNameContext) { localctx = NewPropertyNameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 90, FqlParserRULE_propertyName) - p.SetState(460) + p.SetState(461) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8714,7 +8714,7 @@ func (p *FqlParser) PropertyName() (localctx IPropertyNameContext) { case FqlParserIdentifier: p.EnterOuterAlt(localctx, 1) { - p.SetState(455) + p.SetState(456) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -8725,28 +8725,28 @@ func (p *FqlParser) PropertyName() (localctx IPropertyNameContext) { case FqlParserStringLiteral: p.EnterOuterAlt(localctx, 2) { - p.SetState(456) + p.SetState(457) p.StringLiteral() } case FqlParserParam: p.EnterOuterAlt(localctx, 3) { - p.SetState(457) + p.SetState(458) p.Param() } case FqlParserAnd, FqlParserOr, FqlParserOptions, FqlParserTimeout, FqlParserDistinct, FqlParserFilter, FqlParserCurrent, FqlParserSort, FqlParserLimit, FqlParserCollect, FqlParserSortDirection, FqlParserInto, FqlParserKeep, FqlParserWith, FqlParserCount, FqlParserAll, FqlParserAny, FqlParserAggregate, FqlParserEvent: p.EnterOuterAlt(localctx, 4) { - p.SetState(458) + p.SetState(459) p.SafeReservedWord() } case FqlParserFor, FqlParserReturn, FqlParserWaitfor, FqlParserLet, FqlParserNone, FqlParserNull, FqlParserBooleanLiteral, FqlParserUse, FqlParserLike, FqlParserNot, FqlParserIn, FqlParserDo, FqlParserWhile: p.EnterOuterAlt(localctx, 5) { - p.SetState(459) + p.SetState(460) p.UnsafeReservedWord() } @@ -8870,11 +8870,11 @@ func (p *FqlParser) NamespaceIdentifier() (localctx INamespaceIdentifierContext) p.EnterRule(localctx, 92, FqlParserRULE_namespaceIdentifier) p.EnterOuterAlt(localctx, 1) { - p.SetState(462) + p.SetState(463) p.Namespace() } { - p.SetState(463) + p.SetState(464) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -8986,7 +8986,7 @@ func (p *FqlParser) Namespace() (localctx INamespaceContext) { var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(468) + p.SetState(469) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8995,7 +8995,7 @@ func (p *FqlParser) Namespace() (localctx INamespaceContext) { for _la == FqlParserNamespaceSegment { { - p.SetState(465) + p.SetState(466) p.Match(FqlParserNamespaceSegment) if p.HasError() { // Recognition error - abort rule @@ -9003,7 +9003,7 @@ func (p *FqlParser) Namespace() (localctx INamespaceContext) { } } - p.SetState(470) + p.SetState(471) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9166,10 +9166,10 @@ func (p *FqlParser) MemberExpression() (localctx IMemberExpressionContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(471) + p.SetState(472) p.MemberExpressionSource() } - p.SetState(473) + p.SetState(474) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9179,7 +9179,7 @@ func (p *FqlParser) MemberExpression() (localctx IMemberExpressionContext) { switch _alt { case 1: { - p.SetState(472) + p.SetState(473) p.MemberExpressionPath() } @@ -9188,9 +9188,9 @@ func (p *FqlParser) MemberExpression() (localctx IMemberExpressionContext) { goto errorExit } - p.SetState(475) + p.SetState(476) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 42, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 45, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -9372,45 +9372,45 @@ func (s *MemberExpressionSourceContext) Accept(visitor antlr.ParseTreeVisitor) i func (p *FqlParser) MemberExpressionSource() (localctx IMemberExpressionSourceContext) { localctx = NewMemberExpressionSourceContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 98, FqlParserRULE_memberExpressionSource) - p.SetState(482) + p.SetState(483) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 43, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 46, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(477) + p.SetState(478) p.Variable() } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(478) + p.SetState(479) p.Param() } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(479) + p.SetState(480) p.ArrayLiteral() } case 4: p.EnterOuterAlt(localctx, 4) { - p.SetState(480) + p.SetState(481) p.ObjectLiteral() } case 5: p.EnterOuterAlt(localctx, 5) { - p.SetState(481) + p.SetState(482) p.FunctionCall() } @@ -9545,15 +9545,15 @@ func (p *FqlParser) FunctionCallExpression() (localctx IFunctionCallExpressionCo p.EnterRule(localctx, 100, FqlParserRULE_functionCallExpression) p.EnterOuterAlt(localctx, 1) { - p.SetState(484) + p.SetState(485) p.FunctionCall() } - p.SetState(486) + p.SetState(487) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 44, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 47, p.GetParserRuleContext()) == 1 { { - p.SetState(485) + p.SetState(486) p.ErrorOperator() } @@ -9717,22 +9717,22 @@ func (p *FqlParser) FunctionCall() (localctx IFunctionCallContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(488) + p.SetState(489) p.Namespace() } { - p.SetState(489) + p.SetState(490) p.FunctionName() } { - p.SetState(490) + p.SetState(491) p.Match(FqlParserOpenParen) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(492) + p.SetState(493) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9741,13 +9741,13 @@ func (p *FqlParser) FunctionCall() (localctx IFunctionCallContext) { if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&8935141660637626389) != 0 { { - p.SetState(491) + p.SetState(492) p.ArgumentList() } } { - p.SetState(494) + p.SetState(495) p.Match(FqlParserCloseParen) if p.HasError() { // Recognition error - abort rule @@ -9885,7 +9885,7 @@ func (s *FunctionNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (p *FqlParser) FunctionName() (localctx IFunctionNameContext) { localctx = NewFunctionNameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 104, FqlParserRULE_functionName) - p.SetState(499) + p.SetState(500) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9895,7 +9895,7 @@ func (p *FqlParser) FunctionName() (localctx IFunctionNameContext) { case FqlParserIdentifier: p.EnterOuterAlt(localctx, 1) { - p.SetState(496) + p.SetState(497) p.Match(FqlParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -9906,14 +9906,14 @@ func (p *FqlParser) FunctionName() (localctx IFunctionNameContext) { case FqlParserAnd, FqlParserOr, FqlParserOptions, FqlParserTimeout, FqlParserDistinct, FqlParserFilter, FqlParserCurrent, FqlParserSort, FqlParserLimit, FqlParserCollect, FqlParserSortDirection, FqlParserInto, FqlParserKeep, FqlParserWith, FqlParserCount, FqlParserAll, FqlParserAny, FqlParserAggregate, FqlParserEvent: p.EnterOuterAlt(localctx, 2) { - p.SetState(497) + p.SetState(498) p.SafeReservedWord() } case FqlParserFor, FqlParserReturn, FqlParserWaitfor, FqlParserLet, FqlParserNone, FqlParserNull, FqlParserBooleanLiteral, FqlParserUse, FqlParserLike, FqlParserNot, FqlParserIn, FqlParserDo, FqlParserWhile: p.EnterOuterAlt(localctx, 3) { - p.SetState(498) + p.SetState(499) p.UnsafeReservedWord() } @@ -10072,22 +10072,22 @@ func (p *FqlParser) ArgumentList() (localctx IArgumentListContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(501) + p.SetState(502) p.expression(0) } - p.SetState(506) + p.SetState(507) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 47, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 50, p.GetParserRuleContext()) if p.HasError() { goto errorExit } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { - p.SetState(502) + p.SetState(503) p.Match(FqlParserComma) if p.HasError() { // Recognition error - abort rule @@ -10095,22 +10095,22 @@ func (p *FqlParser) ArgumentList() (localctx IArgumentListContext) { } } { - p.SetState(503) + p.SetState(504) p.expression(0) } } - p.SetState(508) + p.SetState(509) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 47, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 50, p.GetParserRuleContext()) if p.HasError() { goto errorExit } } - p.SetState(510) + p.SetState(511) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10119,7 +10119,7 @@ func (p *FqlParser) ArgumentList() (localctx IArgumentListContext) { if _la == FqlParserComma { { - p.SetState(509) + p.SetState(510) p.Match(FqlParserComma) if p.HasError() { // Recognition error - abort rule @@ -10278,16 +10278,16 @@ func (p *FqlParser) MemberExpressionPath() (localctx IMemberExpressionPathContex p.EnterRule(localctx, 108, FqlParserRULE_memberExpressionPath) var _la int - p.SetState(523) + p.SetState(524) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 51, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 54, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) - p.SetState(513) + p.SetState(514) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10296,13 +10296,13 @@ func (p *FqlParser) MemberExpressionPath() (localctx IMemberExpressionPathContex if _la == FqlParserQuestionMark { { - p.SetState(512) + p.SetState(513) p.ErrorOperator() } } { - p.SetState(515) + p.SetState(516) p.Match(FqlParserDot) if p.HasError() { // Recognition error - abort rule @@ -10310,13 +10310,13 @@ func (p *FqlParser) MemberExpressionPath() (localctx IMemberExpressionPathContex } } { - p.SetState(516) + p.SetState(517) p.PropertyName() } case 2: p.EnterOuterAlt(localctx, 2) - p.SetState(520) + p.SetState(521) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10325,11 +10325,11 @@ func (p *FqlParser) MemberExpressionPath() (localctx IMemberExpressionPathContex if _la == FqlParserQuestionMark { { - p.SetState(517) + p.SetState(518) p.ErrorOperator() } { - p.SetState(518) + p.SetState(519) p.Match(FqlParserDot) if p.HasError() { // Recognition error - abort rule @@ -10339,7 +10339,7 @@ func (p *FqlParser) MemberExpressionPath() (localctx IMemberExpressionPathContex } { - p.SetState(522) + p.SetState(523) p.ComputedPropertyName() } @@ -10537,7 +10537,7 @@ func (p *FqlParser) SafeReservedWord() (localctx ISafeReservedWordContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(525) + p.SetState(526) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1148663921511497728) != 0) { @@ -10708,7 +10708,7 @@ func (p *FqlParser) UnsafeReservedWord() (localctx IUnsafeReservedWordContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(527) + p.SetState(528) _la = p.GetTokenStream().LA(1) if !((int64((_la-35)) & ^0x3f) == 0 && ((int64(1)<<(_la-35))&1040311303) != 0) { @@ -10882,14 +10882,14 @@ func (p *FqlParser) RangeOperator() (localctx IRangeOperatorContext) { p.EnterRule(localctx, 114, FqlParserRULE_rangeOperator) p.EnterOuterAlt(localctx, 1) { - p.SetState(529) + p.SetState(530) var _x = p.RangeOperand() localctx.(*RangeOperatorContext).left = _x } { - p.SetState(530) + p.SetState(531) p.Match(FqlParserRange) if p.HasError() { // Recognition error - abort rule @@ -10897,7 +10897,7 @@ func (p *FqlParser) RangeOperator() (localctx IRangeOperatorContext) { } } { - p.SetState(531) + p.SetState(532) var _x = p.RangeOperand() @@ -11046,7 +11046,7 @@ func (s *RangeOperandContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (p *FqlParser) RangeOperand() (localctx IRangeOperandContext) { localctx = NewRangeOperandContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 116, FqlParserRULE_rangeOperand) - p.SetState(536) + p.SetState(537) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11056,21 +11056,21 @@ func (p *FqlParser) RangeOperand() (localctx IRangeOperandContext) { case FqlParserIntegerLiteral: p.EnterOuterAlt(localctx, 1) { - p.SetState(533) + p.SetState(534) p.IntegerLiteral() } case FqlParserAnd, FqlParserOr, FqlParserOptions, FqlParserTimeout, FqlParserDistinct, FqlParserFilter, FqlParserCurrent, FqlParserSort, FqlParserLimit, FqlParserCollect, FqlParserSortDirection, FqlParserInto, FqlParserKeep, FqlParserWith, FqlParserCount, FqlParserAll, FqlParserAny, FqlParserAggregate, FqlParserEvent, FqlParserIdentifier: p.EnterOuterAlt(localctx, 2) { - p.SetState(534) + p.SetState(535) p.Variable() } case FqlParserParam: p.EnterOuterAlt(localctx, 3) { - p.SetState(535) + p.SetState(536) p.Param() } @@ -11372,20 +11372,20 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(543) + p.SetState(544) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 53, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 56, p.GetParserRuleContext()) { case 1: { - p.SetState(539) + p.SetState(540) p.UnaryOperator() } { - p.SetState(540) + p.SetState(541) var _x = p.expression(5) @@ -11394,7 +11394,7 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { case 2: { - p.SetState(542) + p.SetState(543) p.predicate(0) } @@ -11402,12 +11402,12 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(562) + p.SetState(563) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 56, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 59, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -11417,29 +11417,29 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(560) + p.SetState(561) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 55, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 58, p.GetParserRuleContext()) { case 1: localctx = NewExpressionContext(p, _parentctx, _parentState) localctx.(*ExpressionContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression) - p.SetState(545) + p.SetState(546) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } { - p.SetState(546) + p.SetState(547) p.LogicalAndOperator() } { - p.SetState(547) + p.SetState(548) var _x = p.expression(5) @@ -11450,18 +11450,18 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { localctx = NewExpressionContext(p, _parentctx, _parentState) localctx.(*ExpressionContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression) - p.SetState(549) + p.SetState(550) if !(p.Precpred(p.GetParserRuleContext(), 3)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) goto errorExit } { - p.SetState(550) + p.SetState(551) p.LogicalOrOperator() } { - p.SetState(551) + p.SetState(552) var _x = p.expression(4) @@ -11472,14 +11472,14 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { localctx = NewExpressionContext(p, _parentctx, _parentState) localctx.(*ExpressionContext).condition = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression) - p.SetState(553) + p.SetState(554) if !(p.Precpred(p.GetParserRuleContext(), 2)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) goto errorExit } { - p.SetState(554) + p.SetState(555) var _m = p.Match(FqlParserQuestionMark) @@ -11489,7 +11489,7 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { goto errorExit } } - p.SetState(556) + p.SetState(557) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11498,7 +11498,7 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&8935141660637626389) != 0 { { - p.SetState(555) + p.SetState(556) var _x = p.expression(0) @@ -11507,7 +11507,7 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { } { - p.SetState(558) + p.SetState(559) p.Match(FqlParserColon) if p.HasError() { // Recognition error - abort rule @@ -11515,7 +11515,7 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { } } { - p.SetState(559) + p.SetState(560) var _x = p.expression(3) @@ -11527,12 +11527,12 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) { } } - p.SetState(564) + p.SetState(565) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 56, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 59, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -11793,17 +11793,17 @@ func (p *FqlParser) predicate(_p int) (localctx IPredicateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(566) + p.SetState(567) p.expressionAtom(0) } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(586) + p.SetState(587) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 58, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 61, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -11813,29 +11813,29 @@ func (p *FqlParser) predicate(_p int) (localctx IPredicateContext) { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(584) + p.SetState(585) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 57, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 60, p.GetParserRuleContext()) { case 1: localctx = NewPredicateContext(p, _parentctx, _parentState) localctx.(*PredicateContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_predicate) - p.SetState(568) + p.SetState(569) if !(p.Precpred(p.GetParserRuleContext(), 5)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) goto errorExit } { - p.SetState(569) + p.SetState(570) p.EqualityOperator() } { - p.SetState(570) + p.SetState(571) var _x = p.predicate(6) @@ -11846,18 +11846,18 @@ func (p *FqlParser) predicate(_p int) (localctx IPredicateContext) { localctx = NewPredicateContext(p, _parentctx, _parentState) localctx.(*PredicateContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_predicate) - p.SetState(572) + p.SetState(573) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } { - p.SetState(573) + p.SetState(574) p.ArrayOperator() } { - p.SetState(574) + p.SetState(575) var _x = p.predicate(5) @@ -11868,18 +11868,18 @@ func (p *FqlParser) predicate(_p int) (localctx IPredicateContext) { localctx = NewPredicateContext(p, _parentctx, _parentState) localctx.(*PredicateContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_predicate) - p.SetState(576) + p.SetState(577) if !(p.Precpred(p.GetParserRuleContext(), 3)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) goto errorExit } { - p.SetState(577) + p.SetState(578) p.InOperator() } { - p.SetState(578) + p.SetState(579) var _x = p.predicate(4) @@ -11890,18 +11890,18 @@ func (p *FqlParser) predicate(_p int) (localctx IPredicateContext) { localctx = NewPredicateContext(p, _parentctx, _parentState) localctx.(*PredicateContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_predicate) - p.SetState(580) + p.SetState(581) if !(p.Precpred(p.GetParserRuleContext(), 2)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) goto errorExit } { - p.SetState(581) + p.SetState(582) p.LikeOperator() } { - p.SetState(582) + p.SetState(583) var _x = p.predicate(3) @@ -11913,12 +11913,12 @@ func (p *FqlParser) predicate(_p int) (localctx IPredicateContext) { } } - p.SetState(588) + p.SetState(589) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 58, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 61, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -12324,80 +12324,80 @@ func (p *FqlParser) expressionAtom(_p int) (localctx IExpressionAtomContext) { var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(606) + p.SetState(607) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 61, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 64, p.GetParserRuleContext()) { case 1: { - p.SetState(590) + p.SetState(591) p.FunctionCallExpression() } case 2: { - p.SetState(591) + p.SetState(592) p.RangeOperator() } case 3: { - p.SetState(592) + p.SetState(593) p.Literal() } case 4: { - p.SetState(593) + p.SetState(594) p.Variable() } case 5: { - p.SetState(594) + p.SetState(595) p.MemberExpression() } case 6: { - p.SetState(595) + p.SetState(596) p.Param() } case 7: { - p.SetState(596) + p.SetState(597) p.Match(FqlParserOpenParen) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(600) + p.SetState(601) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 59, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 62, p.GetParserRuleContext()) { case 1: { - p.SetState(597) + p.SetState(598) p.ForExpression() } case 2: { - p.SetState(598) + p.SetState(599) p.WaitForExpression() } case 3: { - p.SetState(599) + p.SetState(600) p.expression(0) } @@ -12405,19 +12405,19 @@ func (p *FqlParser) expressionAtom(_p int) (localctx IExpressionAtomContext) { goto errorExit } { - p.SetState(602) + p.SetState(603) p.Match(FqlParserCloseParen) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(604) + p.SetState(605) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 60, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 63, p.GetParserRuleContext()) == 1 { { - p.SetState(603) + p.SetState(604) p.ErrorOperator() } @@ -12429,12 +12429,12 @@ func (p *FqlParser) expressionAtom(_p int) (localctx IExpressionAtomContext) { goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(622) + p.SetState(623) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 63, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 66, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -12444,29 +12444,29 @@ func (p *FqlParser) expressionAtom(_p int) (localctx IExpressionAtomContext) { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(620) + p.SetState(621) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 62, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 65, p.GetParserRuleContext()) { case 1: localctx = NewExpressionAtomContext(p, _parentctx, _parentState) localctx.(*ExpressionAtomContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expressionAtom) - p.SetState(608) + p.SetState(609) if !(p.Precpred(p.GetParserRuleContext(), 10)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", "")) goto errorExit } { - p.SetState(609) + p.SetState(610) p.MultiplicativeOperator() } { - p.SetState(610) + p.SetState(611) var _x = p.expressionAtom(11) @@ -12477,18 +12477,18 @@ func (p *FqlParser) expressionAtom(_p int) (localctx IExpressionAtomContext) { localctx = NewExpressionAtomContext(p, _parentctx, _parentState) localctx.(*ExpressionAtomContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expressionAtom) - p.SetState(612) + p.SetState(613) if !(p.Precpred(p.GetParserRuleContext(), 9)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", "")) goto errorExit } { - p.SetState(613) + p.SetState(614) p.AdditiveOperator() } { - p.SetState(614) + p.SetState(615) var _x = p.expressionAtom(10) @@ -12499,18 +12499,18 @@ func (p *FqlParser) expressionAtom(_p int) (localctx IExpressionAtomContext) { localctx = NewExpressionAtomContext(p, _parentctx, _parentState) localctx.(*ExpressionAtomContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expressionAtom) - p.SetState(616) + p.SetState(617) if !(p.Precpred(p.GetParserRuleContext(), 8)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", "")) goto errorExit } { - p.SetState(617) + p.SetState(618) p.RegexpOperator() } { - p.SetState(618) + p.SetState(619) var _x = p.expressionAtom(9) @@ -12522,12 +12522,12 @@ func (p *FqlParser) expressionAtom(_p int) (localctx IExpressionAtomContext) { } } - p.SetState(624) + p.SetState(625) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 63, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 66, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -12688,7 +12688,7 @@ func (p *FqlParser) ArrayOperator() (localctx IArrayOperatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(625) + p.SetState(626) var _lt = p.GetTokenStream().LT(1) @@ -12705,7 +12705,7 @@ func (p *FqlParser) ArrayOperator() (localctx IArrayOperatorContext) { p.Consume() } } - p.SetState(628) + p.SetState(629) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -12714,13 +12714,13 @@ func (p *FqlParser) ArrayOperator() (localctx IArrayOperatorContext) { switch p.GetTokenStream().LA(1) { case FqlParserNot, FqlParserIn: { - p.SetState(626) + p.SetState(627) p.InOperator() } case FqlParserGt, FqlParserLt, FqlParserEq, FqlParserGte, FqlParserLte, FqlParserNeq: { - p.SetState(627) + p.SetState(628) p.EqualityOperator() } @@ -12854,7 +12854,7 @@ func (p *FqlParser) EqualityOperator() (localctx IEqualityOperatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(630) + p.SetState(631) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2064384) != 0) { @@ -12969,7 +12969,7 @@ func (p *FqlParser) InOperator() (localctx IInOperatorContext) { var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(633) + p.SetState(634) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -12978,7 +12978,7 @@ func (p *FqlParser) InOperator() (localctx IInOperatorContext) { if _la == FqlParserNot { { - p.SetState(632) + p.SetState(633) p.Match(FqlParserNot) if p.HasError() { // Recognition error - abort rule @@ -12988,7 +12988,7 @@ func (p *FqlParser) InOperator() (localctx IInOperatorContext) { } { - p.SetState(635) + p.SetState(636) p.Match(FqlParserIn) if p.HasError() { // Recognition error - abort rule @@ -13100,7 +13100,7 @@ func (p *FqlParser) LikeOperator() (localctx ILikeOperatorContext) { var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(638) + p.SetState(639) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -13109,7 +13109,7 @@ func (p *FqlParser) LikeOperator() (localctx ILikeOperatorContext) { if _la == FqlParserNot { { - p.SetState(637) + p.SetState(638) p.Match(FqlParserNot) if p.HasError() { // Recognition error - abort rule @@ -13119,7 +13119,7 @@ func (p *FqlParser) LikeOperator() (localctx ILikeOperatorContext) { } { - p.SetState(640) + p.SetState(641) p.Match(FqlParserLike) if p.HasError() { // Recognition error - abort rule @@ -13237,7 +13237,7 @@ func (p *FqlParser) UnaryOperator() (localctx IUnaryOperatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(642) + p.SetState(643) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2305843009264025600) != 0) { @@ -13353,7 +13353,7 @@ func (p *FqlParser) RegexpOperator() (localctx IRegexpOperatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(644) + p.SetState(645) _la = p.GetTokenStream().LA(1) if !(_la == FqlParserRegexNotMatch || _la == FqlParserRegexMatch) { @@ -13462,7 +13462,7 @@ func (p *FqlParser) LogicalAndOperator() (localctx ILogicalAndOperatorContext) { p.EnterRule(localctx, 136, FqlParserRULE_logicalAndOperator) p.EnterOuterAlt(localctx, 1) { - p.SetState(646) + p.SetState(647) p.Match(FqlParserAnd) if p.HasError() { // Recognition error - abort rule @@ -13568,7 +13568,7 @@ func (p *FqlParser) LogicalOrOperator() (localctx ILogicalOrOperatorContext) { p.EnterRule(localctx, 138, FqlParserRULE_logicalOrOperator) p.EnterOuterAlt(localctx, 1) { - p.SetState(648) + p.SetState(649) p.Match(FqlParserOr) if p.HasError() { // Recognition error - abort rule @@ -13686,7 +13686,7 @@ func (p *FqlParser) MultiplicativeOperator() (localctx IMultiplicativeOperatorCo p.EnterOuterAlt(localctx, 1) { - p.SetState(650) + p.SetState(651) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&14680064) != 0) { @@ -13802,7 +13802,7 @@ func (p *FqlParser) AdditiveOperator() (localctx IAdditiveOperatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(652) + p.SetState(653) _la = p.GetTokenStream().LA(1) if !(_la == FqlParserPlus || _la == FqlParserMinus) { @@ -13911,7 +13911,7 @@ func (p *FqlParser) ErrorOperator() (localctx IErrorOperatorContext) { p.EnterRule(localctx, 144, FqlParserRULE_errorOperator) p.EnterOuterAlt(localctx, 1) { - p.SetState(654) + p.SetState(655) p.Match(FqlParserQuestionMark) if p.HasError() { // Recognition error - abort rule diff --git a/pkg/parser/fql/fqlparser_base_listener.go b/pkg/parser/fql/fqlparser_base_listener.go index ce3a2e6b..7d04fe12 100644 --- a/pkg/parser/fql/fqlparser_base_listener.go +++ b/pkg/parser/fql/fqlparser_base_listener.go @@ -170,18 +170,18 @@ func (s *BaseFqlParserListener) EnterCollectAggregateSelector(ctx *CollectAggreg // ExitCollectAggregateSelector is called when production collectAggregateSelector is exited. func (s *BaseFqlParserListener) ExitCollectAggregateSelector(ctx *CollectAggregateSelectorContext) {} -// EnterCollectGroupVariable is called when production collectGroupVariable is entered. -func (s *BaseFqlParserListener) EnterCollectGroupVariable(ctx *CollectGroupVariableContext) {} +// EnterCollectGroupProjection is called when production collectGroupProjection is entered. +func (s *BaseFqlParserListener) EnterCollectGroupProjection(ctx *CollectGroupProjectionContext) {} -// ExitCollectGroupVariable is called when production collectGroupVariable is exited. -func (s *BaseFqlParserListener) ExitCollectGroupVariable(ctx *CollectGroupVariableContext) {} +// ExitCollectGroupProjection is called when production collectGroupProjection is exited. +func (s *BaseFqlParserListener) ExitCollectGroupProjection(ctx *CollectGroupProjectionContext) {} -// EnterCollectGroupVariableKeeper is called when production collectGroupVariableKeeper is entered. -func (s *BaseFqlParserListener) EnterCollectGroupVariableKeeper(ctx *CollectGroupVariableKeeperContext) { +// EnterCollectGroupProjectionFilter is called when production collectGroupProjectionFilter is entered. +func (s *BaseFqlParserListener) EnterCollectGroupProjectionFilter(ctx *CollectGroupProjectionFilterContext) { } -// ExitCollectGroupVariableKeeper is called when production collectGroupVariableKeeper is exited. -func (s *BaseFqlParserListener) ExitCollectGroupVariableKeeper(ctx *CollectGroupVariableKeeperContext) { +// ExitCollectGroupProjectionFilter is called when production collectGroupProjectionFilter is exited. +func (s *BaseFqlParserListener) ExitCollectGroupProjectionFilter(ctx *CollectGroupProjectionFilterContext) { } // EnterCollectCounter is called when production collectCounter is entered. diff --git a/pkg/parser/fql/fqlparser_base_visitor.go b/pkg/parser/fql/fqlparser_base_visitor.go index bb03bf67..694c176e 100644 --- a/pkg/parser/fql/fqlparser_base_visitor.go +++ b/pkg/parser/fql/fqlparser_base_visitor.go @@ -107,11 +107,11 @@ func (v *BaseFqlParserVisitor) VisitCollectAggregateSelector(ctx *CollectAggrega return v.VisitChildren(ctx) } -func (v *BaseFqlParserVisitor) VisitCollectGroupVariable(ctx *CollectGroupVariableContext) interface{} { +func (v *BaseFqlParserVisitor) VisitCollectGroupProjection(ctx *CollectGroupProjectionContext) interface{} { return v.VisitChildren(ctx) } -func (v *BaseFqlParserVisitor) VisitCollectGroupVariableKeeper(ctx *CollectGroupVariableKeeperContext) interface{} { +func (v *BaseFqlParserVisitor) VisitCollectGroupProjectionFilter(ctx *CollectGroupProjectionFilterContext) interface{} { return v.VisitChildren(ctx) } diff --git a/pkg/parser/fql/fqlparser_listener.go b/pkg/parser/fql/fqlparser_listener.go index 3a573ff5..f8970e5e 100644 --- a/pkg/parser/fql/fqlparser_listener.go +++ b/pkg/parser/fql/fqlparser_listener.go @@ -82,11 +82,11 @@ type FqlParserListener interface { // EnterCollectAggregateSelector is called when entering the collectAggregateSelector production. EnterCollectAggregateSelector(c *CollectAggregateSelectorContext) - // EnterCollectGroupVariable is called when entering the collectGroupVariable production. - EnterCollectGroupVariable(c *CollectGroupVariableContext) + // EnterCollectGroupProjection is called when entering the collectGroupProjection production. + EnterCollectGroupProjection(c *CollectGroupProjectionContext) - // EnterCollectGroupVariableKeeper is called when entering the collectGroupVariableKeeper production. - EnterCollectGroupVariableKeeper(c *CollectGroupVariableKeeperContext) + // EnterCollectGroupProjectionFilter is called when entering the collectGroupProjectionFilter production. + EnterCollectGroupProjectionFilter(c *CollectGroupProjectionFilterContext) // EnterCollectCounter is called when entering the collectCounter production. EnterCollectCounter(c *CollectCounterContext) @@ -301,11 +301,11 @@ type FqlParserListener interface { // ExitCollectAggregateSelector is called when exiting the collectAggregateSelector production. ExitCollectAggregateSelector(c *CollectAggregateSelectorContext) - // ExitCollectGroupVariable is called when exiting the collectGroupVariable production. - ExitCollectGroupVariable(c *CollectGroupVariableContext) + // ExitCollectGroupProjection is called when exiting the collectGroupProjection production. + ExitCollectGroupProjection(c *CollectGroupProjectionContext) - // ExitCollectGroupVariableKeeper is called when exiting the collectGroupVariableKeeper production. - ExitCollectGroupVariableKeeper(c *CollectGroupVariableKeeperContext) + // ExitCollectGroupProjectionFilter is called when exiting the collectGroupProjectionFilter production. + ExitCollectGroupProjectionFilter(c *CollectGroupProjectionFilterContext) // ExitCollectCounter is called when exiting the collectCounter production. ExitCollectCounter(c *CollectCounterContext) diff --git a/pkg/parser/fql/fqlparser_visitor.go b/pkg/parser/fql/fqlparser_visitor.go index caffb6e2..96ee5133 100644 --- a/pkg/parser/fql/fqlparser_visitor.go +++ b/pkg/parser/fql/fqlparser_visitor.go @@ -82,11 +82,11 @@ type FqlParserVisitor interface { // Visit a parse tree produced by FqlParser#collectAggregateSelector. VisitCollectAggregateSelector(ctx *CollectAggregateSelectorContext) interface{} - // Visit a parse tree produced by FqlParser#collectGroupVariable. - VisitCollectGroupVariable(ctx *CollectGroupVariableContext) interface{} + // Visit a parse tree produced by FqlParser#collectGroupProjection. + VisitCollectGroupProjection(ctx *CollectGroupProjectionContext) interface{} - // Visit a parse tree produced by FqlParser#collectGroupVariableKeeper. - VisitCollectGroupVariableKeeper(ctx *CollectGroupVariableKeeperContext) interface{} + // Visit a parse tree produced by FqlParser#collectGroupProjectionFilter. + VisitCollectGroupProjectionFilter(ctx *CollectGroupProjectionFilterContext) interface{} // Visit a parse tree produced by FqlParser#collectCounter. VisitCollectCounter(ctx *CollectCounterContext) interface{} diff --git a/pkg/vm/errors.go b/pkg/vm/errors.go index 280e23f9..a66663fd 100644 --- a/pkg/vm/errors.go +++ b/pkg/vm/errors.go @@ -5,6 +5,7 @@ import "github.com/pkg/errors" var ( ErrMissedParam = errors.New("missed parameter") ErrFunctionNotFound = errors.New("function not found") + ErrRuntimePanic = errors.New("runtime panic") ) type ( diff --git a/test/integration/base/test_case.go b/test/integration/base/test_case.go index de983d7c..1b0dad6c 100644 --- a/test/integration/base/test_case.go +++ b/test/integration/base/test_case.go @@ -30,3 +30,9 @@ func Skip(uc TestCase) TestCase { uc.Skip = true return uc } + +func Debug(useCase TestCase) TestCase { + useCase.DebugOutput = true + + return useCase +} diff --git a/test/integration/vm/shortcuts.go b/test/integration/vm/shortcuts.go index 15aa813a..6c68be3f 100644 --- a/test/integration/vm/shortcuts.go +++ b/test/integration/vm/shortcuts.go @@ -8,3 +8,4 @@ type UseCase = base.TestCase var NewCase = base.NewCase var Skip = base.Skip +var Debug = base.Debug diff --git a/test/integration/vm/test_case.go b/test/integration/vm/test_case.go index 8b99e7d7..5f84bea0 100644 --- a/test/integration/vm/test_case.go +++ b/test/integration/vm/test_case.go @@ -16,12 +16,6 @@ import ( "github.com/MontFerret/ferret/pkg/vm" ) -func Debug(useCase UseCase) UseCase { - useCase.DebugOutput = true - - return useCase -} - func Case(expression string, expected any, desc ...string) UseCase { return NewCase(expression, expected, ShouldEqual, desc...) } @@ -38,6 +32,10 @@ func SkipCaseNil(expression string, desc ...string) UseCase { return Skip(CaseNil(expression, desc...)) } +func DebugCaseNil(expression string, desc ...string) UseCase { + return Debug(CaseNil(expression, desc...)) +} + func CaseRuntimeError(expression string, desc ...string) UseCase { return NewCase(expression, nil, ShouldBeError, desc...) } @@ -50,6 +48,10 @@ func SkipCaseRuntimeError(expression string, desc ...string) UseCase { return Skip(CaseRuntimeError(expression, desc...)) } +func DebugCaseRuntimeError(expression string, desc ...string) UseCase { + return Debug(CaseRuntimeError(expression, desc...)) +} + func SkipCaseRuntimeErrorAs(expression string, expected error, desc ...string) UseCase { return Skip(CaseRuntimeErrorAs(expression, expected, desc...)) } @@ -72,6 +74,10 @@ func SkipCaseObject(expression string, expected map[string]any, desc ...string) return Skip(CaseObject(expression, expected, desc...)) } +func DebugCaseObject(expression string, expected map[string]any, desc ...string) UseCase { + return Debug(CaseObject(expression, expected, desc...)) +} + func CaseArray(expression string, expected []any, desc ...string) UseCase { uc := NewCase(expression, expected, ShouldEqualJSON, desc...) uc.RawOutput = true @@ -82,6 +88,10 @@ func SkipCaseArray(expression string, expected []any, desc ...string) UseCase { return Skip(CaseArray(expression, expected, desc...)) } +func DebugCaseArray(expression string, expected []any, desc ...string) UseCase { + return Debug(CaseArray(expression, expected, desc...)) +} + func CaseItems(expression string, expected ...any) UseCase { return NewCase(expression, expected, base.ShouldHaveSameItems) } @@ -90,10 +100,22 @@ func CaseFn(expression string, assertion func(actual any, expected ...any) strin return NewCase(expression, nil, assertion) } +func SkipCaseFn(expression string, assertion func(actual any, expected ...any) string) UseCase { + return Skip(CaseFn(expression, assertion)) +} + +func DebugCaseFn(expression string, assertion func(actual any, expected ...any) string) UseCase { + return Debug(CaseFn(expression, assertion)) +} + func SkipCaseItems(expression string, expected ...any) UseCase { return Skip(CaseItems(expression, expected...)) } +func DebugCaseItems(expression string, expected ...any) UseCase { + return Debug(CaseItems(expression, expected...)) +} + func CaseJSON(expression string, expected string, desc ...string) UseCase { uc := NewCase(expression, expected, ShouldEqualJSON, desc...) uc.RawOutput = true @@ -104,6 +126,10 @@ func SkipCaseJSON(expression string, expected string, desc ...string) UseCase { return Skip(CaseJSON(expression, expected, desc...)) } +func DebugCaseJSON(expression string, expected string, desc ...string) UseCase { + return Debug(CaseJSON(expression, expected, desc...)) +} + func printDebugInfo(name string, uc UseCase, prog *vm.Program) { fmt.Println("") fmt.Println("VM Test:", name) diff --git a/test/integration/vm/vm_for_in_collect_agg_test.go b/test/integration/vm/vm_for_in_collect_agg_test.go index ec108b46..bddbad78 100644 --- a/test/integration/vm/vm_for_in_collect_agg_test.go +++ b/test/integration/vm/vm_for_in_collect_agg_test.go @@ -205,7 +205,7 @@ FOR u IN users "highSalaryCount": 3, }, }, "Should aggregate with conditional expressions"), - CaseArray(` + SkipCaseArray(` LET users = [ { active: true, @@ -297,6 +297,94 @@ LET users = [ `, []any{ map[string]any{"ages": []any{31, 25, 36, 69, 45, 31, 25, 36, 69, 45}}, }, "Should call aggregation functions with more than one argument"), + DebugCaseArray(` + LET users = [ + { + active: true, + married: true, + age: 31, + gender: "m" + }, + { + active: true, + married: false, + age: 25, + gender: "f" + }, + { + active: true, + married: false, + age: 36, + gender: "m" + }, + { + active: false, + married: true, + age: 69, + gender: "m" + }, + { + active: true, + married: true, + age: 45, + gender: "f" + } + ] + FOR u IN users + COLLECT AGGREGATE minAge = MIN(u.age), maxAge = MAX(u.age) INTO groupsVariable + RETURN { + groupsVariable, + minAge, + maxAge + } +`, []any{ + map[string]any{ + "groupsVariable": []any{ + map[string]any{ + "u": map[string]any{ + "active": true, + "married": true, + "age": 31, + "gender": "m", + }, + }, + map[string]any{ + "u": map[string]any{ + "active": true, + "married": false, + "age": 25, + "gender": "f", + }, + }, + map[string]any{ + "u": map[string]any{ + "active": true, + "married": false, + "age": 36, + "gender": "m", + }, + }, + map[string]any{ + "u": map[string]any{ + "active": false, + "married": true, + "age": 69, + "gender": "m", + }, + }, + map[string]any{ + "u": map[string]any{ + "active": true, + "married": true, + "age": 45, + "gender": "f", + }, + }, + }, + "minAge": 25, + "maxAge": 69, + }, + }), SkipCaseArray(` LET users = [ {