github.com/siglens/siglens@v0.0.0-20240328180423-f7ce9ae441ed/pkg/ast/spl/spl.go (about)

     1  // Code generated by pigeon; DO NOT EDIT.
     2  
     3  package spl
     4  
     5  import (
     6  	"bytes"
     7  	"encoding/json"
     8  	"errors"
     9  	"fmt"
    10  	"io"
    11  	"math"
    12  	"os"
    13  	"regexp"
    14  	"sort"
    15  	"strconv"
    16  	"strings"
    17  	"sync"
    18  	"unicode"
    19  	"unicode/utf8"
    20  
    21  	"github.com/siglens/siglens/pkg/ast"
    22  	"github.com/siglens/siglens/pkg/segment/aggregations"
    23  	"github.com/siglens/siglens/pkg/segment/query"
    24  	"github.com/siglens/siglens/pkg/segment/structs"
    25  	"github.com/siglens/siglens/pkg/segment/utils"
    26  	log "github.com/sirupsen/logrus"
    27  )
    28  
    29  func getParseError(err error) error {
    30  	switch ev := err.(type) {
    31  	case errList:
    32  		if pe, ok := ev[0].(*parserError); ok {
    33  			return &ast.ParseError{
    34  				Inner:    pe.Inner,
    35  				Line:     pe.pos.line,
    36  				Column:   pe.pos.col,
    37  				Offset:   pe.pos.offset,
    38  				Prefix:   pe.prefix,
    39  				Expected: pe.expected,
    40  			}
    41  		}
    42  	}
    43  	return err
    44  }
    45  
    46  // Remove the first and last character of the string
    47  func removeQuotes(s any) string {
    48  	str := s.(string)
    49  	if len(str) < 3 {
    50  		return ""
    51  	}
    52  
    53  	return str[1 : len(str)-1]
    54  }
    55  
    56  // Check if it rename fields with similar names using a wildcard
    57  func isRegexRename(originalPattern, newPattern string) (bool, error) {
    58  	oldWildcards := strings.Count(originalPattern, "*")
    59  	newWildcards := strings.Count(newPattern, "*")
    60  
    61  	if oldWildcards == 0 && newWildcards == 0 {
    62  		return false, nil
    63  	} else if oldWildcards > 0 && oldWildcards == newWildcards {
    64  		return true, nil
    65  	} else {
    66  		return false, errors.New("Patterns do not match")
    67  	}
    68  }
    69  
    70  func deMorgansLaw(node *ast.Node) {
    71  	switch node.NodeType {
    72  	case ast.NodeTerminal:
    73  		switch node.Comparison.Op {
    74  		case "=":
    75  			node.Comparison.Op = "!="
    76  		case "!=":
    77  			node.Comparison.Op = "="
    78  		case ">":
    79  			node.Comparison.Op = "<="
    80  		case "<":
    81  			node.Comparison.Op = ">="
    82  		case ">=":
    83  			node.Comparison.Op = "<"
    84  		case "<=":
    85  			node.Comparison.Op = ">"
    86  		default:
    87  			log.Errorf("deMorgansLaw: unexpected node comparison op: %v", node.Comparison.Op)
    88  		}
    89  	case ast.NodeAnd:
    90  		node.NodeType = ast.NodeOr
    91  		deMorgansLaw(node.Left)
    92  		deMorgansLaw(node.Right)
    93  	case ast.NodeOr:
    94  		node.NodeType = ast.NodeAnd
    95  		deMorgansLaw(node.Left)
    96  		deMorgansLaw(node.Right)
    97  	default:
    98  		log.Errorf("deMorgansLaw: unexpected NodeType: %v", node.NodeType)
    99  	}
   100  }
   101  
   102  // Generate NumericExpr struct for eval functions
   103  func createNumericExpr(op string, leftNumericExpr *structs.NumericExpr, rightNumericExpr *structs.NumericExpr, numericExprMode structs.NumericExprMode) (*structs.NumericExpr, error) {
   104  	if leftNumericExpr == nil {
   105  		return nil, fmt.Errorf("expr cannot be nil")
   106  	}
   107  
   108  	return &structs.NumericExpr{
   109  		IsTerminal:      false,
   110  		Op:              op,
   111  		Left:            leftNumericExpr,
   112  		Right:           rightNumericExpr,
   113  		NumericExprMode: numericExprMode,
   114  	}, nil
   115  }
   116  
   117  func transferUint8ToString(opName interface{}) (string, error) {
   118  	strData, ok := opName.([]byte)
   119  	if !ok {
   120  		return "", fmt.Errorf("opName is not a []byte")
   121  	}
   122  
   123  	opNameStr := string(strData)
   124  	return opNameStr, nil
   125  }
   126  
   127  func transferPCREToRE2(pattern string) string {
   128  	pattern = strings.Replace(pattern, "(?<", "(?P<", -1)
   129  	return pattern
   130  }
   131  
   132  func getRexColNames(pattern string) ([]string, error) {
   133  	re, err := regexp.Compile(`\?<(?P<GroupName>[a-zA-Z0-9_]+)>`)
   134  	if err != nil {
   135  		return nil, fmt.Errorf("getRexColNames: There are some errors in the pattern: %v", err)
   136  	}
   137  	matches := re.FindAllStringSubmatch(pattern, -1)
   138  
   139  	var rexColNames []string
   140  	for _, match := range matches {
   141  		rexColNames = append(rexColNames, match[1])
   142  	}
   143  
   144  	return rexColNames, nil
   145  }
   146  
   147  type aggregator struct {
   148  	measureAgg         *structs.MeasureAggregator
   149  	renameOutputField  bool
   150  	outputFieldNewName string
   151  }
   152  
   153  type singleAggTemp struct {
   154  	aggregators   []*aggregator
   155  	SplitByClause *structs.SplitByClause
   156  }
   157  
   158  type TxnArgs struct {
   159  	argOption string
   160  	arguments *structs.TransactionArguments
   161  }
   162  
   163  type TimechartArgs struct {
   164  	singleAggExpr *singleAggTemp
   165  	// Todo: Add eval clause expr.
   166  	tcOptions *structs.TcOptions
   167  }
   168  
   169  var g = &grammar{
   170  	rules: []*rule{
   171  		{
   172  			name: "Start",
   173  			pos:  position{line: 157, col: 1, offset: 4199},
   174  			expr: &actionExpr{
   175  				pos: position{line: 157, col: 10, offset: 4208},
   176  				run: (*parser).callonStart1,
   177  				expr: &seqExpr{
   178  					pos: position{line: 157, col: 10, offset: 4208},
   179  					exprs: []any{
   180  						&zeroOrOneExpr{
   181  							pos: position{line: 157, col: 10, offset: 4208},
   182  							expr: &ruleRefExpr{
   183  								pos:  position{line: 157, col: 10, offset: 4208},
   184  								name: "SPACE",
   185  							},
   186  						},
   187  						&labeledExpr{
   188  							pos:   position{line: 157, col: 17, offset: 4215},
   189  							label: "initialSearch",
   190  							expr: &ruleRefExpr{
   191  								pos:  position{line: 157, col: 32, offset: 4230},
   192  								name: "InitialSearchBlock",
   193  							},
   194  						},
   195  						&labeledExpr{
   196  							pos:   position{line: 157, col: 52, offset: 4250},
   197  							label: "filterBlocks",
   198  							expr: &zeroOrMoreExpr{
   199  								pos: position{line: 157, col: 65, offset: 4263},
   200  								expr: &ruleRefExpr{
   201  									pos:  position{line: 157, col: 66, offset: 4264},
   202  									name: "FilterBlock",
   203  								},
   204  							},
   205  						},
   206  						&labeledExpr{
   207  							pos:   position{line: 157, col: 80, offset: 4278},
   208  							label: "queryAggBlocks",
   209  							expr: &zeroOrMoreExpr{
   210  								pos: position{line: 157, col: 95, offset: 4293},
   211  								expr: &ruleRefExpr{
   212  									pos:  position{line: 157, col: 96, offset: 4294},
   213  									name: "QueryAggergatorBlock",
   214  								},
   215  							},
   216  						},
   217  						&zeroOrOneExpr{
   218  							pos: position{line: 157, col: 119, offset: 4317},
   219  							expr: &ruleRefExpr{
   220  								pos:  position{line: 157, col: 119, offset: 4317},
   221  								name: "SPACE",
   222  							},
   223  						},
   224  						&ruleRefExpr{
   225  							pos:  position{line: 157, col: 126, offset: 4324},
   226  							name: "EOF",
   227  						},
   228  					},
   229  				},
   230  			},
   231  		},
   232  		{
   233  			name: "InitialSearchBlock",
   234  			pos:  position{line: 228, col: 1, offset: 6525},
   235  			expr: &actionExpr{
   236  				pos: position{line: 228, col: 23, offset: 6547},
   237  				run: (*parser).callonInitialSearchBlock1,
   238  				expr: &seqExpr{
   239  					pos: position{line: 228, col: 23, offset: 6547},
   240  					exprs: []any{
   241  						&zeroOrOneExpr{
   242  							pos: position{line: 228, col: 23, offset: 6547},
   243  							expr: &ruleRefExpr{
   244  								pos:  position{line: 228, col: 23, offset: 6547},
   245  								name: "CMD_SEARCH",
   246  							},
   247  						},
   248  						&labeledExpr{
   249  							pos:   position{line: 228, col: 35, offset: 6559},
   250  							label: "clause",
   251  							expr: &ruleRefExpr{
   252  								pos:  position{line: 228, col: 42, offset: 6566},
   253  								name: "ClauseLevel4",
   254  							},
   255  						},
   256  					},
   257  				},
   258  			},
   259  		},
   260  		{
   261  			name: "SearchBlock",
   262  			pos:  position{line: 232, col: 1, offset: 6607},
   263  			expr: &actionExpr{
   264  				pos: position{line: 232, col: 16, offset: 6622},
   265  				run: (*parser).callonSearchBlock1,
   266  				expr: &seqExpr{
   267  					pos: position{line: 232, col: 16, offset: 6622},
   268  					exprs: []any{
   269  						&notExpr{
   270  							pos: position{line: 232, col: 16, offset: 6622},
   271  							expr: &ruleRefExpr{
   272  								pos:  position{line: 232, col: 18, offset: 6624},
   273  								name: "ALLCMD",
   274  							},
   275  						},
   276  						&zeroOrOneExpr{
   277  							pos: position{line: 232, col: 26, offset: 6632},
   278  							expr: &ruleRefExpr{
   279  								pos:  position{line: 232, col: 26, offset: 6632},
   280  								name: "CMD_SEARCH",
   281  							},
   282  						},
   283  						&labeledExpr{
   284  							pos:   position{line: 232, col: 38, offset: 6644},
   285  							label: "clause",
   286  							expr: &ruleRefExpr{
   287  								pos:  position{line: 232, col: 45, offset: 6651},
   288  								name: "ClauseLevel4",
   289  							},
   290  						},
   291  					},
   292  				},
   293  			},
   294  		},
   295  		{
   296  			name: "FilterBlock",
   297  			pos:  position{line: 236, col: 1, offset: 6692},
   298  			expr: &actionExpr{
   299  				pos: position{line: 236, col: 16, offset: 6707},
   300  				run: (*parser).callonFilterBlock1,
   301  				expr: &seqExpr{
   302  					pos: position{line: 236, col: 16, offset: 6707},
   303  					exprs: []any{
   304  						&ruleRefExpr{
   305  							pos:  position{line: 236, col: 16, offset: 6707},
   306  							name: "PIPE",
   307  						},
   308  						&labeledExpr{
   309  							pos:   position{line: 236, col: 21, offset: 6712},
   310  							label: "block",
   311  							expr: &choiceExpr{
   312  								pos: position{line: 236, col: 28, offset: 6719},
   313  								alternatives: []any{
   314  									&ruleRefExpr{
   315  										pos:  position{line: 236, col: 28, offset: 6719},
   316  										name: "SearchBlock",
   317  									},
   318  									&ruleRefExpr{
   319  										pos:  position{line: 236, col: 42, offset: 6733},
   320  										name: "RegexBlock",
   321  									},
   322  								},
   323  							},
   324  						},
   325  					},
   326  				},
   327  			},
   328  		},
   329  		{
   330  			name: "QueryAggergatorBlock",
   331  			pos:  position{line: 241, col: 1, offset: 6809},
   332  			expr: &actionExpr{
   333  				pos: position{line: 241, col: 25, offset: 6833},
   334  				run: (*parser).callonQueryAggergatorBlock1,
   335  				expr: &labeledExpr{
   336  					pos:   position{line: 241, col: 25, offset: 6833},
   337  					label: "block",
   338  					expr: &choiceExpr{
   339  						pos: position{line: 241, col: 32, offset: 6840},
   340  						alternatives: []any{
   341  							&ruleRefExpr{
   342  								pos:  position{line: 241, col: 32, offset: 6840},
   343  								name: "FieldSelectBlock",
   344  							},
   345  							&ruleRefExpr{
   346  								pos:  position{line: 241, col: 51, offset: 6859},
   347  								name: "AggregatorBlock",
   348  							},
   349  							&ruleRefExpr{
   350  								pos:  position{line: 241, col: 69, offset: 6877},
   351  								name: "EvalBlock",
   352  							},
   353  							&ruleRefExpr{
   354  								pos:  position{line: 241, col: 81, offset: 6889},
   355  								name: "WhereBlock",
   356  							},
   357  							&ruleRefExpr{
   358  								pos:  position{line: 241, col: 94, offset: 6902},
   359  								name: "HeadBlock",
   360  							},
   361  							&ruleRefExpr{
   362  								pos:  position{line: 241, col: 106, offset: 6914},
   363  								name: "RexBlock",
   364  							},
   365  							&ruleRefExpr{
   366  								pos:  position{line: 241, col: 117, offset: 6925},
   367  								name: "StatisticBlock",
   368  							},
   369  							&ruleRefExpr{
   370  								pos:  position{line: 241, col: 134, offset: 6942},
   371  								name: "RenameBlock",
   372  							},
   373  							&ruleRefExpr{
   374  								pos:  position{line: 241, col: 148, offset: 6956},
   375  								name: "TimechartBlock",
   376  							},
   377  							&ruleRefExpr{
   378  								pos:  position{line: 241, col: 165, offset: 6973},
   379  								name: "TransactionBlock",
   380  							},
   381  							&ruleRefExpr{
   382  								pos:  position{line: 241, col: 184, offset: 6992},
   383  								name: "DedupBlock",
   384  							},
   385  							&ruleRefExpr{
   386  								pos:  position{line: 241, col: 197, offset: 7005},
   387  								name: "SortBlock",
   388  							},
   389  						},
   390  					},
   391  				},
   392  			},
   393  		},
   394  		{
   395  			name: "FieldSelectBlock",
   396  			pos:  position{line: 246, col: 1, offset: 7096},
   397  			expr: &actionExpr{
   398  				pos: position{line: 246, col: 21, offset: 7116},
   399  				run: (*parser).callonFieldSelectBlock1,
   400  				expr: &seqExpr{
   401  					pos: position{line: 246, col: 21, offset: 7116},
   402  					exprs: []any{
   403  						&ruleRefExpr{
   404  							pos:  position{line: 246, col: 21, offset: 7116},
   405  							name: "PIPE",
   406  						},
   407  						&ruleRefExpr{
   408  							pos:  position{line: 246, col: 26, offset: 7121},
   409  							name: "CMD_FIELDS",
   410  						},
   411  						&labeledExpr{
   412  							pos:   position{line: 246, col: 37, offset: 7132},
   413  							label: "op",
   414  							expr: &zeroOrOneExpr{
   415  								pos: position{line: 246, col: 40, offset: 7135},
   416  								expr: &choiceExpr{
   417  									pos: position{line: 246, col: 41, offset: 7136},
   418  									alternatives: []any{
   419  										&litMatcher{
   420  											pos:        position{line: 246, col: 41, offset: 7136},
   421  											val:        "-",
   422  											ignoreCase: false,
   423  											want:       "\"-\"",
   424  										},
   425  										&litMatcher{
   426  											pos:        position{line: 246, col: 47, offset: 7142},
   427  											val:        "+",
   428  											ignoreCase: false,
   429  											want:       "\"+\"",
   430  										},
   431  									},
   432  								},
   433  							},
   434  						},
   435  						&ruleRefExpr{
   436  							pos:  position{line: 246, col: 53, offset: 7148},
   437  							name: "EMPTY_OR_SPACE",
   438  						},
   439  						&labeledExpr{
   440  							pos:   position{line: 246, col: 68, offset: 7163},
   441  							label: "fields",
   442  							expr: &ruleRefExpr{
   443  								pos:  position{line: 246, col: 75, offset: 7170},
   444  								name: "FieldNameList",
   445  							},
   446  						},
   447  					},
   448  				},
   449  			},
   450  		},
   451  		{
   452  			name: "AggregatorBlock",
   453  			pos:  position{line: 264, col: 1, offset: 7674},
   454  			expr: &actionExpr{
   455  				pos: position{line: 264, col: 20, offset: 7693},
   456  				run: (*parser).callonAggregatorBlock1,
   457  				expr: &seqExpr{
   458  					pos: position{line: 264, col: 20, offset: 7693},
   459  					exprs: []any{
   460  						&ruleRefExpr{
   461  							pos:  position{line: 264, col: 20, offset: 7693},
   462  							name: "PIPE",
   463  						},
   464  						&ruleRefExpr{
   465  							pos:  position{line: 264, col: 25, offset: 7698},
   466  							name: "CMD_STATS",
   467  						},
   468  						&labeledExpr{
   469  							pos:   position{line: 264, col: 35, offset: 7708},
   470  							label: "aggs",
   471  							expr: &ruleRefExpr{
   472  								pos:  position{line: 264, col: 40, offset: 7713},
   473  								name: "AggregationList",
   474  							},
   475  						},
   476  						&labeledExpr{
   477  							pos:   position{line: 264, col: 56, offset: 7729},
   478  							label: "byFields",
   479  							expr: &zeroOrOneExpr{
   480  								pos: position{line: 264, col: 65, offset: 7738},
   481  								expr: &ruleRefExpr{
   482  									pos:  position{line: 264, col: 66, offset: 7739},
   483  									name: "GroupbyBlock",
   484  								},
   485  							},
   486  						},
   487  					},
   488  				},
   489  			},
   490  		},
   491  		{
   492  			name: "GroupbyBlock",
   493  			pos:  position{line: 309, col: 1, offset: 9233},
   494  			expr: &actionExpr{
   495  				pos: position{line: 309, col: 17, offset: 9249},
   496  				run: (*parser).callonGroupbyBlock1,
   497  				expr: &seqExpr{
   498  					pos: position{line: 309, col: 17, offset: 9249},
   499  					exprs: []any{
   500  						&ruleRefExpr{
   501  							pos:  position{line: 309, col: 17, offset: 9249},
   502  							name: "BY",
   503  						},
   504  						&labeledExpr{
   505  							pos:   position{line: 309, col: 20, offset: 9252},
   506  							label: "fields",
   507  							expr: &ruleRefExpr{
   508  								pos:  position{line: 309, col: 27, offset: 9259},
   509  								name: "FieldNameList",
   510  							},
   511  						},
   512  					},
   513  				},
   514  			},
   515  		},
   516  		{
   517  			name: "RegexBlock",
   518  			pos:  position{line: 320, col: 1, offset: 9608},
   519  			expr: &actionExpr{
   520  				pos: position{line: 320, col: 15, offset: 9622},
   521  				run: (*parser).callonRegexBlock1,
   522  				expr: &seqExpr{
   523  					pos: position{line: 320, col: 15, offset: 9622},
   524  					exprs: []any{
   525  						&ruleRefExpr{
   526  							pos:  position{line: 320, col: 15, offset: 9622},
   527  							name: "CMD_REGEX",
   528  						},
   529  						&labeledExpr{
   530  							pos:   position{line: 320, col: 25, offset: 9632},
   531  							label: "keyAndOp",
   532  							expr: &zeroOrOneExpr{
   533  								pos: position{line: 320, col: 34, offset: 9641},
   534  								expr: &seqExpr{
   535  									pos: position{line: 320, col: 35, offset: 9642},
   536  									exprs: []any{
   537  										&ruleRefExpr{
   538  											pos:  position{line: 320, col: 35, offset: 9642},
   539  											name: "FieldName",
   540  										},
   541  										&ruleRefExpr{
   542  											pos:  position{line: 320, col: 45, offset: 9652},
   543  											name: "EqualityOperator",
   544  										},
   545  									},
   546  								},
   547  							},
   548  						},
   549  						&labeledExpr{
   550  							pos:   position{line: 320, col: 64, offset: 9671},
   551  							label: "str",
   552  							expr: &ruleRefExpr{
   553  								pos:  position{line: 320, col: 68, offset: 9675},
   554  								name: "QuotedString",
   555  							},
   556  						},
   557  					},
   558  				},
   559  			},
   560  		},
   561  		{
   562  			name: "ClauseLevel4",
   563  			pos:  position{line: 348, col: 1, offset: 10254},
   564  			expr: &actionExpr{
   565  				pos: position{line: 348, col: 17, offset: 10270},
   566  				run: (*parser).callonClauseLevel41,
   567  				expr: &seqExpr{
   568  					pos: position{line: 348, col: 17, offset: 10270},
   569  					exprs: []any{
   570  						&labeledExpr{
   571  							pos:   position{line: 348, col: 17, offset: 10270},
   572  							label: "first",
   573  							expr: &ruleRefExpr{
   574  								pos:  position{line: 348, col: 23, offset: 10276},
   575  								name: "ClauseLevel3",
   576  							},
   577  						},
   578  						&labeledExpr{
   579  							pos:   position{line: 348, col: 36, offset: 10289},
   580  							label: "rest",
   581  							expr: &zeroOrMoreExpr{
   582  								pos: position{line: 348, col: 41, offset: 10294},
   583  								expr: &seqExpr{
   584  									pos: position{line: 348, col: 42, offset: 10295},
   585  									exprs: []any{
   586  										&choiceExpr{
   587  											pos: position{line: 348, col: 43, offset: 10296},
   588  											alternatives: []any{
   589  												&ruleRefExpr{
   590  													pos:  position{line: 348, col: 43, offset: 10296},
   591  													name: "AND",
   592  												},
   593  												&ruleRefExpr{
   594  													pos:  position{line: 348, col: 49, offset: 10302},
   595  													name: "SPACE",
   596  												},
   597  											},
   598  										},
   599  										&ruleRefExpr{
   600  											pos:  position{line: 348, col: 56, offset: 10309},
   601  											name: "ClauseLevel3",
   602  										},
   603  									},
   604  								},
   605  							},
   606  						},
   607  					},
   608  				},
   609  			},
   610  		},
   611  		{
   612  			name: "ClauseLevel3",
   613  			pos:  position{line: 366, col: 1, offset: 10686},
   614  			expr: &actionExpr{
   615  				pos: position{line: 366, col: 17, offset: 10702},
   616  				run: (*parser).callonClauseLevel31,
   617  				expr: &seqExpr{
   618  					pos: position{line: 366, col: 17, offset: 10702},
   619  					exprs: []any{
   620  						&labeledExpr{
   621  							pos:   position{line: 366, col: 17, offset: 10702},
   622  							label: "first",
   623  							expr: &ruleRefExpr{
   624  								pos:  position{line: 366, col: 23, offset: 10708},
   625  								name: "ClauseLevel2",
   626  							},
   627  						},
   628  						&labeledExpr{
   629  							pos:   position{line: 366, col: 36, offset: 10721},
   630  							label: "rest",
   631  							expr: &zeroOrMoreExpr{
   632  								pos: position{line: 366, col: 41, offset: 10726},
   633  								expr: &seqExpr{
   634  									pos: position{line: 366, col: 42, offset: 10727},
   635  									exprs: []any{
   636  										&ruleRefExpr{
   637  											pos:  position{line: 366, col: 42, offset: 10727},
   638  											name: "OR",
   639  										},
   640  										&ruleRefExpr{
   641  											pos:  position{line: 366, col: 45, offset: 10730},
   642  											name: "ClauseLevel2",
   643  										},
   644  									},
   645  								},
   646  							},
   647  						},
   648  					},
   649  				},
   650  			},
   651  		},
   652  		{
   653  			name: "ClauseLevel2",
   654  			pos:  position{line: 384, col: 1, offset: 11095},
   655  			expr: &choiceExpr{
   656  				pos: position{line: 384, col: 17, offset: 11111},
   657  				alternatives: []any{
   658  					&actionExpr{
   659  						pos: position{line: 384, col: 17, offset: 11111},
   660  						run: (*parser).callonClauseLevel22,
   661  						expr: &seqExpr{
   662  							pos: position{line: 384, col: 17, offset: 11111},
   663  							exprs: []any{
   664  								&labeledExpr{
   665  									pos:   position{line: 384, col: 17, offset: 11111},
   666  									label: "notList",
   667  									expr: &oneOrMoreExpr{
   668  										pos: position{line: 384, col: 25, offset: 11119},
   669  										expr: &ruleRefExpr{
   670  											pos:  position{line: 384, col: 25, offset: 11119},
   671  											name: "NOT",
   672  										},
   673  									},
   674  								},
   675  								&labeledExpr{
   676  									pos:   position{line: 384, col: 30, offset: 11124},
   677  									label: "first",
   678  									expr: &ruleRefExpr{
   679  										pos:  position{line: 384, col: 36, offset: 11130},
   680  										name: "ClauseLevel1",
   681  									},
   682  								},
   683  							},
   684  						},
   685  					},
   686  					&actionExpr{
   687  						pos: position{line: 395, col: 5, offset: 11426},
   688  						run: (*parser).callonClauseLevel29,
   689  						expr: &labeledExpr{
   690  							pos:   position{line: 395, col: 5, offset: 11426},
   691  							label: "clause",
   692  							expr: &ruleRefExpr{
   693  								pos:  position{line: 395, col: 12, offset: 11433},
   694  								name: "ClauseLevel1",
   695  							},
   696  						},
   697  					},
   698  				},
   699  			},
   700  		},
   701  		{
   702  			name: "ClauseLevel1",
   703  			pos:  position{line: 399, col: 1, offset: 11474},
   704  			expr: &choiceExpr{
   705  				pos: position{line: 399, col: 17, offset: 11490},
   706  				alternatives: []any{
   707  					&actionExpr{
   708  						pos: position{line: 399, col: 17, offset: 11490},
   709  						run: (*parser).callonClauseLevel12,
   710  						expr: &seqExpr{
   711  							pos: position{line: 399, col: 17, offset: 11490},
   712  							exprs: []any{
   713  								&ruleRefExpr{
   714  									pos:  position{line: 399, col: 17, offset: 11490},
   715  									name: "L_PAREN",
   716  								},
   717  								&labeledExpr{
   718  									pos:   position{line: 399, col: 25, offset: 11498},
   719  									label: "clause",
   720  									expr: &ruleRefExpr{
   721  										pos:  position{line: 399, col: 32, offset: 11505},
   722  										name: "ClauseLevel4",
   723  									},
   724  								},
   725  								&ruleRefExpr{
   726  									pos:  position{line: 399, col: 45, offset: 11518},
   727  									name: "R_PAREN",
   728  								},
   729  							},
   730  						},
   731  					},
   732  					&actionExpr{
   733  						pos: position{line: 401, col: 5, offset: 11555},
   734  						run: (*parser).callonClauseLevel18,
   735  						expr: &labeledExpr{
   736  							pos:   position{line: 401, col: 5, offset: 11555},
   737  							label: "term",
   738  							expr: &ruleRefExpr{
   739  								pos:  position{line: 401, col: 10, offset: 11560},
   740  								name: "SearchTerm",
   741  							},
   742  						},
   743  					},
   744  				},
   745  			},
   746  		},
   747  		{
   748  			name: "SearchTerm",
   749  			pos:  position{line: 407, col: 1, offset: 11718},
   750  			expr: &actionExpr{
   751  				pos: position{line: 407, col: 15, offset: 11732},
   752  				run: (*parser).callonSearchTerm1,
   753  				expr: &labeledExpr{
   754  					pos:   position{line: 407, col: 15, offset: 11732},
   755  					label: "term",
   756  					expr: &choiceExpr{
   757  						pos: position{line: 407, col: 21, offset: 11738},
   758  						alternatives: []any{
   759  							&ruleRefExpr{
   760  								pos:  position{line: 407, col: 21, offset: 11738},
   761  								name: "FieldWithNumberValue",
   762  							},
   763  							&ruleRefExpr{
   764  								pos:  position{line: 407, col: 44, offset: 11761},
   765  								name: "FieldWithBooleanValue",
   766  							},
   767  							&ruleRefExpr{
   768  								pos:  position{line: 407, col: 68, offset: 11785},
   769  								name: "FieldWithStringValue",
   770  							},
   771  						},
   772  					},
   773  				},
   774  			},
   775  		},
   776  		{
   777  			name: "TimechartBlock",
   778  			pos:  position{line: 412, col: 1, offset: 11926},
   779  			expr: &actionExpr{
   780  				pos: position{line: 412, col: 19, offset: 11944},
   781  				run: (*parser).callonTimechartBlock1,
   782  				expr: &seqExpr{
   783  					pos: position{line: 412, col: 19, offset: 11944},
   784  					exprs: []any{
   785  						&ruleRefExpr{
   786  							pos:  position{line: 412, col: 19, offset: 11944},
   787  							name: "PIPE",
   788  						},
   789  						&ruleRefExpr{
   790  							pos:  position{line: 412, col: 24, offset: 11949},
   791  							name: "CMD_TIMECHART",
   792  						},
   793  						&labeledExpr{
   794  							pos:   position{line: 412, col: 38, offset: 11963},
   795  							label: "tcArgs",
   796  							expr: &ruleRefExpr{
   797  								pos:  position{line: 412, col: 45, offset: 11970},
   798  								name: "TimechartArgumentsList",
   799  							},
   800  						},
   801  						&labeledExpr{
   802  							pos:   position{line: 412, col: 68, offset: 11993},
   803  							label: "limitExpr",
   804  							expr: &zeroOrOneExpr{
   805  								pos: position{line: 412, col: 78, offset: 12003},
   806  								expr: &ruleRefExpr{
   807  									pos:  position{line: 412, col: 79, offset: 12004},
   808  									name: "LimitExpr",
   809  								},
   810  							},
   811  						},
   812  					},
   813  				},
   814  			},
   815  		},
   816  		{
   817  			name: "TimechartArgumentsList",
   818  			pos:  position{line: 500, col: 1, offset: 14747},
   819  			expr: &actionExpr{
   820  				pos: position{line: 500, col: 27, offset: 14773},
   821  				run: (*parser).callonTimechartArgumentsList1,
   822  				expr: &seqExpr{
   823  					pos: position{line: 500, col: 27, offset: 14773},
   824  					exprs: []any{
   825  						&labeledExpr{
   826  							pos:   position{line: 500, col: 27, offset: 14773},
   827  							label: "first",
   828  							expr: &ruleRefExpr{
   829  								pos:  position{line: 500, col: 33, offset: 14779},
   830  								name: "TimechartArgument",
   831  							},
   832  						},
   833  						&labeledExpr{
   834  							pos:   position{line: 500, col: 51, offset: 14797},
   835  							label: "rest",
   836  							expr: &zeroOrMoreExpr{
   837  								pos: position{line: 500, col: 56, offset: 14802},
   838  								expr: &seqExpr{
   839  									pos: position{line: 500, col: 57, offset: 14803},
   840  									exprs: []any{
   841  										&ruleRefExpr{
   842  											pos:  position{line: 500, col: 57, offset: 14803},
   843  											name: "SPACE",
   844  										},
   845  										&ruleRefExpr{
   846  											pos:  position{line: 500, col: 63, offset: 14809},
   847  											name: "TimechartArgument",
   848  										},
   849  									},
   850  								},
   851  							},
   852  						},
   853  					},
   854  				},
   855  			},
   856  		},
   857  		{
   858  			name: "TimechartArgument",
   859  			pos:  position{line: 529, col: 1, offset: 15543},
   860  			expr: &actionExpr{
   861  				pos: position{line: 529, col: 22, offset: 15564},
   862  				run: (*parser).callonTimechartArgument1,
   863  				expr: &labeledExpr{
   864  					pos:   position{line: 529, col: 22, offset: 15564},
   865  					label: "tcArg",
   866  					expr: &choiceExpr{
   867  						pos: position{line: 529, col: 29, offset: 15571},
   868  						alternatives: []any{
   869  							&ruleRefExpr{
   870  								pos:  position{line: 529, col: 29, offset: 15571},
   871  								name: "SingleAggExpr",
   872  							},
   873  							&ruleRefExpr{
   874  								pos:  position{line: 529, col: 45, offset: 15587},
   875  								name: "TcOptions",
   876  							},
   877  						},
   878  					},
   879  				},
   880  			},
   881  		},
   882  		{
   883  			name: "SingleAggExpr",
   884  			pos:  position{line: 533, col: 1, offset: 15625},
   885  			expr: &actionExpr{
   886  				pos: position{line: 533, col: 18, offset: 15642},
   887  				run: (*parser).callonSingleAggExpr1,
   888  				expr: &seqExpr{
   889  					pos: position{line: 533, col: 18, offset: 15642},
   890  					exprs: []any{
   891  						&labeledExpr{
   892  							pos:   position{line: 533, col: 18, offset: 15642},
   893  							label: "aggs",
   894  							expr: &ruleRefExpr{
   895  								pos:  position{line: 533, col: 23, offset: 15647},
   896  								name: "AggregationList",
   897  							},
   898  						},
   899  						&labeledExpr{
   900  							pos:   position{line: 533, col: 39, offset: 15663},
   901  							label: "splitByClause",
   902  							expr: &zeroOrOneExpr{
   903  								pos: position{line: 533, col: 53, offset: 15677},
   904  								expr: &ruleRefExpr{
   905  									pos:  position{line: 533, col: 53, offset: 15677},
   906  									name: "SplitByClause",
   907  								},
   908  							},
   909  						},
   910  					},
   911  				},
   912  			},
   913  		},
   914  		{
   915  			name: "SplitByClause",
   916  			pos:  position{line: 547, col: 1, offset: 16016},
   917  			expr: &actionExpr{
   918  				pos: position{line: 547, col: 18, offset: 16033},
   919  				run: (*parser).callonSplitByClause1,
   920  				expr: &seqExpr{
   921  					pos: position{line: 547, col: 18, offset: 16033},
   922  					exprs: []any{
   923  						&ruleRefExpr{
   924  							pos:  position{line: 547, col: 18, offset: 16033},
   925  							name: "BY",
   926  						},
   927  						&labeledExpr{
   928  							pos:   position{line: 547, col: 21, offset: 16036},
   929  							label: "field",
   930  							expr: &ruleRefExpr{
   931  								pos:  position{line: 547, col: 27, offset: 16042},
   932  								name: "FieldName",
   933  							},
   934  						},
   935  					},
   936  				},
   937  			},
   938  		},
   939  		{
   940  			name: "TcOptions",
   941  			pos:  position{line: 555, col: 1, offset: 16171},
   942  			expr: &actionExpr{
   943  				pos: position{line: 555, col: 14, offset: 16184},
   944  				run: (*parser).callonTcOptions1,
   945  				expr: &labeledExpr{
   946  					pos:   position{line: 555, col: 14, offset: 16184},
   947  					label: "option",
   948  					expr: &choiceExpr{
   949  						pos: position{line: 555, col: 22, offset: 16192},
   950  						alternatives: []any{
   951  							&ruleRefExpr{
   952  								pos:  position{line: 555, col: 22, offset: 16192},
   953  								name: "BinOptions",
   954  							},
   955  							&oneOrMoreExpr{
   956  								pos: position{line: 555, col: 35, offset: 16205},
   957  								expr: &ruleRefExpr{
   958  									pos:  position{line: 555, col: 36, offset: 16206},
   959  									name: "TcOption",
   960  								},
   961  							},
   962  						},
   963  					},
   964  				},
   965  			},
   966  		},
   967  		{
   968  			name: "TcOption",
   969  			pos:  position{line: 597, col: 1, offset: 17726},
   970  			expr: &actionExpr{
   971  				pos: position{line: 597, col: 13, offset: 17738},
   972  				run: (*parser).callonTcOption1,
   973  				expr: &seqExpr{
   974  					pos: position{line: 597, col: 13, offset: 17738},
   975  					exprs: []any{
   976  						&ruleRefExpr{
   977  							pos:  position{line: 597, col: 13, offset: 17738},
   978  							name: "SPACE",
   979  						},
   980  						&labeledExpr{
   981  							pos:   position{line: 597, col: 19, offset: 17744},
   982  							label: "tcOptionCMD",
   983  							expr: &ruleRefExpr{
   984  								pos:  position{line: 597, col: 31, offset: 17756},
   985  								name: "TcOptionCMD",
   986  							},
   987  						},
   988  						&ruleRefExpr{
   989  							pos:  position{line: 597, col: 43, offset: 17768},
   990  							name: "EQUAL",
   991  						},
   992  						&labeledExpr{
   993  							pos:   position{line: 597, col: 49, offset: 17774},
   994  							label: "val",
   995  							expr: &ruleRefExpr{
   996  								pos:  position{line: 597, col: 53, offset: 17778},
   997  								name: "EvalFieldToRead",
   998  							},
   999  						},
  1000  					},
  1001  				},
  1002  			},
  1003  		},
  1004  		{
  1005  			name: "TcOptionCMD",
  1006  			pos:  position{line: 602, col: 1, offset: 17891},
  1007  			expr: &actionExpr{
  1008  				pos: position{line: 602, col: 16, offset: 17906},
  1009  				run: (*parser).callonTcOptionCMD1,
  1010  				expr: &labeledExpr{
  1011  					pos:   position{line: 602, col: 16, offset: 17906},
  1012  					label: "option",
  1013  					expr: &choiceExpr{
  1014  						pos: position{line: 602, col: 24, offset: 17914},
  1015  						alternatives: []any{
  1016  							&litMatcher{
  1017  								pos:        position{line: 602, col: 24, offset: 17914},
  1018  								val:        "usenull",
  1019  								ignoreCase: false,
  1020  								want:       "\"usenull\"",
  1021  							},
  1022  							&litMatcher{
  1023  								pos:        position{line: 602, col: 36, offset: 17926},
  1024  								val:        "useother",
  1025  								ignoreCase: false,
  1026  								want:       "\"useother\"",
  1027  							},
  1028  							&litMatcher{
  1029  								pos:        position{line: 602, col: 49, offset: 17939},
  1030  								val:        "nullstr",
  1031  								ignoreCase: false,
  1032  								want:       "\"nullstr\"",
  1033  							},
  1034  							&litMatcher{
  1035  								pos:        position{line: 602, col: 61, offset: 17951},
  1036  								val:        "otherstr",
  1037  								ignoreCase: false,
  1038  								want:       "\"otherstr\"",
  1039  							},
  1040  						},
  1041  					},
  1042  				},
  1043  			},
  1044  		},
  1045  		{
  1046  			name: "BinOptions",
  1047  			pos:  position{line: 611, col: 1, offset: 18300},
  1048  			expr: &actionExpr{
  1049  				pos: position{line: 611, col: 15, offset: 18314},
  1050  				run: (*parser).callonBinOptions1,
  1051  				expr: &labeledExpr{
  1052  					pos:   position{line: 611, col: 15, offset: 18314},
  1053  					label: "spanOptions",
  1054  					expr: &ruleRefExpr{
  1055  						pos:  position{line: 611, col: 27, offset: 18326},
  1056  						name: "SpanOptions",
  1057  					},
  1058  				},
  1059  			},
  1060  		},
  1061  		{
  1062  			name: "SpanOptions",
  1063  			pos:  position{line: 619, col: 1, offset: 18551},
  1064  			expr: &actionExpr{
  1065  				pos: position{line: 619, col: 16, offset: 18566},
  1066  				run: (*parser).callonSpanOptions1,
  1067  				expr: &seqExpr{
  1068  					pos: position{line: 619, col: 16, offset: 18566},
  1069  					exprs: []any{
  1070  						&ruleRefExpr{
  1071  							pos:  position{line: 619, col: 16, offset: 18566},
  1072  							name: "CMD_SPAN",
  1073  						},
  1074  						&ruleRefExpr{
  1075  							pos:  position{line: 619, col: 25, offset: 18575},
  1076  							name: "EQUAL",
  1077  						},
  1078  						&labeledExpr{
  1079  							pos:   position{line: 619, col: 31, offset: 18581},
  1080  							label: "spanLength",
  1081  							expr: &ruleRefExpr{
  1082  								pos:  position{line: 619, col: 42, offset: 18592},
  1083  								name: "SpanLength",
  1084  							},
  1085  						},
  1086  					},
  1087  				},
  1088  			},
  1089  		},
  1090  		{
  1091  			name: "SpanLength",
  1092  			pos:  position{line: 626, col: 1, offset: 18738},
  1093  			expr: &actionExpr{
  1094  				pos: position{line: 626, col: 15, offset: 18752},
  1095  				run: (*parser).callonSpanLength1,
  1096  				expr: &seqExpr{
  1097  					pos: position{line: 626, col: 15, offset: 18752},
  1098  					exprs: []any{
  1099  						&labeledExpr{
  1100  							pos:   position{line: 626, col: 15, offset: 18752},
  1101  							label: "intAsStr",
  1102  							expr: &ruleRefExpr{
  1103  								pos:  position{line: 626, col: 24, offset: 18761},
  1104  								name: "IntegerAsString",
  1105  							},
  1106  						},
  1107  						&labeledExpr{
  1108  							pos:   position{line: 626, col: 40, offset: 18777},
  1109  							label: "timeScale",
  1110  							expr: &ruleRefExpr{
  1111  								pos:  position{line: 626, col: 50, offset: 18787},
  1112  								name: "TimeScale",
  1113  							},
  1114  						},
  1115  					},
  1116  				},
  1117  			},
  1118  		},
  1119  		{
  1120  			name: "TimeScale",
  1121  			pos:  position{line: 639, col: 1, offset: 19105},
  1122  			expr: &actionExpr{
  1123  				pos: position{line: 639, col: 14, offset: 19118},
  1124  				run: (*parser).callonTimeScale1,
  1125  				expr: &labeledExpr{
  1126  					pos:   position{line: 639, col: 14, offset: 19118},
  1127  					label: "timeUnit",
  1128  					expr: &choiceExpr{
  1129  						pos: position{line: 639, col: 24, offset: 19128},
  1130  						alternatives: []any{
  1131  							&ruleRefExpr{
  1132  								pos:  position{line: 639, col: 24, offset: 19128},
  1133  								name: "Second",
  1134  							},
  1135  							&ruleRefExpr{
  1136  								pos:  position{line: 639, col: 33, offset: 19137},
  1137  								name: "Minute",
  1138  							},
  1139  							&ruleRefExpr{
  1140  								pos:  position{line: 639, col: 42, offset: 19146},
  1141  								name: "Hour",
  1142  							},
  1143  							&ruleRefExpr{
  1144  								pos:  position{line: 639, col: 49, offset: 19153},
  1145  								name: "Day",
  1146  							},
  1147  							&ruleRefExpr{
  1148  								pos:  position{line: 639, col: 54, offset: 19158},
  1149  								name: "Week",
  1150  							},
  1151  							&ruleRefExpr{
  1152  								pos:  position{line: 639, col: 61, offset: 19165},
  1153  								name: "Month",
  1154  							},
  1155  							&ruleRefExpr{
  1156  								pos:  position{line: 639, col: 69, offset: 19173},
  1157  								name: "Quarter",
  1158  							},
  1159  							&ruleRefExpr{
  1160  								pos:  position{line: 639, col: 78, offset: 19182},
  1161  								name: "Subseconds",
  1162  							},
  1163  						},
  1164  					},
  1165  				},
  1166  			},
  1167  		},
  1168  		{
  1169  			name: "LimitExpr",
  1170  			pos:  position{line: 644, col: 1, offset: 19304},
  1171  			expr: &actionExpr{
  1172  				pos: position{line: 644, col: 14, offset: 19317},
  1173  				run: (*parser).callonLimitExpr1,
  1174  				expr: &seqExpr{
  1175  					pos: position{line: 644, col: 14, offset: 19317},
  1176  					exprs: []any{
  1177  						&ruleRefExpr{
  1178  							pos:  position{line: 644, col: 14, offset: 19317},
  1179  							name: "SPACE",
  1180  						},
  1181  						&litMatcher{
  1182  							pos:        position{line: 644, col: 20, offset: 19323},
  1183  							val:        "limit",
  1184  							ignoreCase: false,
  1185  							want:       "\"limit\"",
  1186  						},
  1187  						&ruleRefExpr{
  1188  							pos:  position{line: 644, col: 28, offset: 19331},
  1189  							name: "EQUAL",
  1190  						},
  1191  						&labeledExpr{
  1192  							pos:   position{line: 644, col: 34, offset: 19337},
  1193  							label: "sortBy",
  1194  							expr: &zeroOrOneExpr{
  1195  								pos: position{line: 644, col: 41, offset: 19344},
  1196  								expr: &choiceExpr{
  1197  									pos: position{line: 644, col: 42, offset: 19345},
  1198  									alternatives: []any{
  1199  										&litMatcher{
  1200  											pos:        position{line: 644, col: 42, offset: 19345},
  1201  											val:        "top",
  1202  											ignoreCase: false,
  1203  											want:       "\"top\"",
  1204  										},
  1205  										&litMatcher{
  1206  											pos:        position{line: 644, col: 50, offset: 19353},
  1207  											val:        "bottom",
  1208  											ignoreCase: false,
  1209  											want:       "\"bottom\"",
  1210  										},
  1211  									},
  1212  								},
  1213  							},
  1214  						},
  1215  						&ruleRefExpr{
  1216  							pos:  position{line: 644, col: 61, offset: 19364},
  1217  							name: "EMPTY_OR_SPACE",
  1218  						},
  1219  						&labeledExpr{
  1220  							pos:   position{line: 644, col: 76, offset: 19379},
  1221  							label: "intAsStr",
  1222  							expr: &ruleRefExpr{
  1223  								pos:  position{line: 644, col: 86, offset: 19389},
  1224  								name: "IntegerAsString",
  1225  							},
  1226  						},
  1227  					},
  1228  				},
  1229  			},
  1230  		},
  1231  		{
  1232  			name: "StatisticBlock",
  1233  			pos:  position{line: 668, col: 1, offset: 19970},
  1234  			expr: &actionExpr{
  1235  				pos: position{line: 668, col: 19, offset: 19988},
  1236  				run: (*parser).callonStatisticBlock1,
  1237  				expr: &seqExpr{
  1238  					pos: position{line: 668, col: 19, offset: 19988},
  1239  					exprs: []any{
  1240  						&ruleRefExpr{
  1241  							pos:  position{line: 668, col: 19, offset: 19988},
  1242  							name: "PIPE",
  1243  						},
  1244  						&labeledExpr{
  1245  							pos:   position{line: 668, col: 24, offset: 19993},
  1246  							label: "statisticExpr",
  1247  							expr: &ruleRefExpr{
  1248  								pos:  position{line: 668, col: 38, offset: 20007},
  1249  								name: "StatisticExpr",
  1250  							},
  1251  						},
  1252  					},
  1253  				},
  1254  			},
  1255  		},
  1256  		{
  1257  			name: "StatisticExpr",
  1258  			pos:  position{line: 701, col: 1, offset: 20985},
  1259  			expr: &actionExpr{
  1260  				pos: position{line: 701, col: 18, offset: 21002},
  1261  				run: (*parser).callonStatisticExpr1,
  1262  				expr: &seqExpr{
  1263  					pos: position{line: 701, col: 18, offset: 21002},
  1264  					exprs: []any{
  1265  						&labeledExpr{
  1266  							pos:   position{line: 701, col: 18, offset: 21002},
  1267  							label: "cmd",
  1268  							expr: &choiceExpr{
  1269  								pos: position{line: 701, col: 23, offset: 21007},
  1270  								alternatives: []any{
  1271  									&ruleRefExpr{
  1272  										pos:  position{line: 701, col: 23, offset: 21007},
  1273  										name: "CMD_TOP",
  1274  									},
  1275  									&ruleRefExpr{
  1276  										pos:  position{line: 701, col: 33, offset: 21017},
  1277  										name: "CMD_RARE",
  1278  									},
  1279  								},
  1280  							},
  1281  						},
  1282  						&labeledExpr{
  1283  							pos:   position{line: 701, col: 43, offset: 21027},
  1284  							label: "limit",
  1285  							expr: &zeroOrOneExpr{
  1286  								pos: position{line: 701, col: 49, offset: 21033},
  1287  								expr: &ruleRefExpr{
  1288  									pos:  position{line: 701, col: 50, offset: 21034},
  1289  									name: "StatisticLimit",
  1290  								},
  1291  							},
  1292  						},
  1293  						&labeledExpr{
  1294  							pos:   position{line: 701, col: 67, offset: 21051},
  1295  							label: "fieldList",
  1296  							expr: &seqExpr{
  1297  								pos: position{line: 701, col: 78, offset: 21062},
  1298  								exprs: []any{
  1299  									&ruleRefExpr{
  1300  										pos:  position{line: 701, col: 78, offset: 21062},
  1301  										name: "SPACE",
  1302  									},
  1303  									&ruleRefExpr{
  1304  										pos:  position{line: 701, col: 84, offset: 21068},
  1305  										name: "FieldNameList",
  1306  									},
  1307  								},
  1308  							},
  1309  						},
  1310  						&labeledExpr{
  1311  							pos:   position{line: 701, col: 99, offset: 21083},
  1312  							label: "byClause",
  1313  							expr: &zeroOrOneExpr{
  1314  								pos: position{line: 701, col: 108, offset: 21092},
  1315  								expr: &ruleRefExpr{
  1316  									pos:  position{line: 701, col: 109, offset: 21093},
  1317  									name: "ByClause",
  1318  								},
  1319  							},
  1320  						},
  1321  						&labeledExpr{
  1322  							pos:   position{line: 701, col: 120, offset: 21104},
  1323  							label: "options",
  1324  							expr: &zeroOrOneExpr{
  1325  								pos: position{line: 701, col: 128, offset: 21112},
  1326  								expr: &ruleRefExpr{
  1327  									pos:  position{line: 701, col: 129, offset: 21113},
  1328  									name: "StatisticOptions",
  1329  								},
  1330  							},
  1331  						},
  1332  					},
  1333  				},
  1334  			},
  1335  		},
  1336  		{
  1337  			name: "StatisticLimit",
  1338  			pos:  position{line: 743, col: 1, offset: 22198},
  1339  			expr: &choiceExpr{
  1340  				pos: position{line: 743, col: 19, offset: 22216},
  1341  				alternatives: []any{
  1342  					&actionExpr{
  1343  						pos: position{line: 743, col: 19, offset: 22216},
  1344  						run: (*parser).callonStatisticLimit2,
  1345  						expr: &seqExpr{
  1346  							pos: position{line: 743, col: 19, offset: 22216},
  1347  							exprs: []any{
  1348  								&ruleRefExpr{
  1349  									pos:  position{line: 743, col: 19, offset: 22216},
  1350  									name: "SPACE",
  1351  								},
  1352  								&labeledExpr{
  1353  									pos:   position{line: 743, col: 25, offset: 22222},
  1354  									label: "number",
  1355  									expr: &ruleRefExpr{
  1356  										pos:  position{line: 743, col: 32, offset: 22229},
  1357  										name: "IntegerAsString",
  1358  									},
  1359  								},
  1360  							},
  1361  						},
  1362  					},
  1363  					&actionExpr{
  1364  						pos: position{line: 746, col: 3, offset: 22283},
  1365  						run: (*parser).callonStatisticLimit7,
  1366  						expr: &seqExpr{
  1367  							pos: position{line: 746, col: 3, offset: 22283},
  1368  							exprs: []any{
  1369  								&ruleRefExpr{
  1370  									pos:  position{line: 746, col: 3, offset: 22283},
  1371  									name: "SPACE",
  1372  								},
  1373  								&litMatcher{
  1374  									pos:        position{line: 746, col: 9, offset: 22289},
  1375  									val:        "limit",
  1376  									ignoreCase: false,
  1377  									want:       "\"limit\"",
  1378  								},
  1379  								&ruleRefExpr{
  1380  									pos:  position{line: 746, col: 17, offset: 22297},
  1381  									name: "EQUAL",
  1382  								},
  1383  								&labeledExpr{
  1384  									pos:   position{line: 746, col: 23, offset: 22303},
  1385  									label: "limit",
  1386  									expr: &ruleRefExpr{
  1387  										pos:  position{line: 746, col: 30, offset: 22310},
  1388  										name: "IntegerAsString",
  1389  									},
  1390  								},
  1391  							},
  1392  						},
  1393  					},
  1394  				},
  1395  			},
  1396  		},
  1397  		{
  1398  			name: "StatisticOptions",
  1399  			pos:  position{line: 751, col: 1, offset: 22408},
  1400  			expr: &actionExpr{
  1401  				pos: position{line: 751, col: 21, offset: 22428},
  1402  				run: (*parser).callonStatisticOptions1,
  1403  				expr: &labeledExpr{
  1404  					pos:   position{line: 751, col: 21, offset: 22428},
  1405  					label: "option",
  1406  					expr: &zeroOrMoreExpr{
  1407  						pos: position{line: 751, col: 28, offset: 22435},
  1408  						expr: &ruleRefExpr{
  1409  							pos:  position{line: 751, col: 29, offset: 22436},
  1410  							name: "StatisticOption",
  1411  						},
  1412  					},
  1413  				},
  1414  			},
  1415  		},
  1416  		{
  1417  			name: "StatisticOption",
  1418  			pos:  position{line: 800, col: 1, offset: 23998},
  1419  			expr: &actionExpr{
  1420  				pos: position{line: 800, col: 20, offset: 24017},
  1421  				run: (*parser).callonStatisticOption1,
  1422  				expr: &seqExpr{
  1423  					pos: position{line: 800, col: 20, offset: 24017},
  1424  					exprs: []any{
  1425  						&ruleRefExpr{
  1426  							pos:  position{line: 800, col: 20, offset: 24017},
  1427  							name: "SPACE",
  1428  						},
  1429  						&labeledExpr{
  1430  							pos:   position{line: 800, col: 26, offset: 24023},
  1431  							label: "optionCMD",
  1432  							expr: &ruleRefExpr{
  1433  								pos:  position{line: 800, col: 36, offset: 24033},
  1434  								name: "StatisticOptionCMD",
  1435  							},
  1436  						},
  1437  						&ruleRefExpr{
  1438  							pos:  position{line: 800, col: 55, offset: 24052},
  1439  							name: "EQUAL",
  1440  						},
  1441  						&labeledExpr{
  1442  							pos:   position{line: 800, col: 61, offset: 24058},
  1443  							label: "field",
  1444  							expr: &ruleRefExpr{
  1445  								pos:  position{line: 800, col: 67, offset: 24064},
  1446  								name: "EvalFieldToRead",
  1447  							},
  1448  						},
  1449  					},
  1450  				},
  1451  			},
  1452  		},
  1453  		{
  1454  			name: "StatisticOptionCMD",
  1455  			pos:  position{line: 805, col: 1, offset: 24173},
  1456  			expr: &actionExpr{
  1457  				pos: position{line: 805, col: 23, offset: 24195},
  1458  				run: (*parser).callonStatisticOptionCMD1,
  1459  				expr: &labeledExpr{
  1460  					pos:   position{line: 805, col: 23, offset: 24195},
  1461  					label: "option",
  1462  					expr: &choiceExpr{
  1463  						pos: position{line: 805, col: 31, offset: 24203},
  1464  						alternatives: []any{
  1465  							&litMatcher{
  1466  								pos:        position{line: 805, col: 31, offset: 24203},
  1467  								val:        "countfield",
  1468  								ignoreCase: false,
  1469  								want:       "\"countfield\"",
  1470  							},
  1471  							&litMatcher{
  1472  								pos:        position{line: 805, col: 46, offset: 24218},
  1473  								val:        "showcount",
  1474  								ignoreCase: false,
  1475  								want:       "\"showcount\"",
  1476  							},
  1477  							&litMatcher{
  1478  								pos:        position{line: 805, col: 60, offset: 24232},
  1479  								val:        "otherstr",
  1480  								ignoreCase: false,
  1481  								want:       "\"otherstr\"",
  1482  							},
  1483  							&litMatcher{
  1484  								pos:        position{line: 805, col: 73, offset: 24245},
  1485  								val:        "useother",
  1486  								ignoreCase: false,
  1487  								want:       "\"useother\"",
  1488  							},
  1489  							&litMatcher{
  1490  								pos:        position{line: 805, col: 85, offset: 24257},
  1491  								val:        "percentfield",
  1492  								ignoreCase: false,
  1493  								want:       "\"percentfield\"",
  1494  							},
  1495  							&litMatcher{
  1496  								pos:        position{line: 805, col: 102, offset: 24274},
  1497  								val:        "showperc",
  1498  								ignoreCase: false,
  1499  								want:       "\"showperc\"",
  1500  							},
  1501  						},
  1502  					},
  1503  				},
  1504  			},
  1505  		},
  1506  		{
  1507  			name: "ByClause",
  1508  			pos:  position{line: 813, col: 1, offset: 24461},
  1509  			expr: &choiceExpr{
  1510  				pos: position{line: 813, col: 13, offset: 24473},
  1511  				alternatives: []any{
  1512  					&actionExpr{
  1513  						pos: position{line: 813, col: 13, offset: 24473},
  1514  						run: (*parser).callonByClause2,
  1515  						expr: &seqExpr{
  1516  							pos: position{line: 813, col: 13, offset: 24473},
  1517  							exprs: []any{
  1518  								&ruleRefExpr{
  1519  									pos:  position{line: 813, col: 13, offset: 24473},
  1520  									name: "BY",
  1521  								},
  1522  								&labeledExpr{
  1523  									pos:   position{line: 813, col: 16, offset: 24476},
  1524  									label: "fieldList",
  1525  									expr: &ruleRefExpr{
  1526  										pos:  position{line: 813, col: 26, offset: 24486},
  1527  										name: "FieldNameList",
  1528  									},
  1529  								},
  1530  							},
  1531  						},
  1532  					},
  1533  					&actionExpr{
  1534  						pos: position{line: 816, col: 3, offset: 24543},
  1535  						run: (*parser).callonByClause7,
  1536  						expr: &labeledExpr{
  1537  							pos:   position{line: 816, col: 3, offset: 24543},
  1538  							label: "groupByBlock",
  1539  							expr: &ruleRefExpr{
  1540  								pos:  position{line: 816, col: 16, offset: 24556},
  1541  								name: "GroupbyBlock",
  1542  							},
  1543  						},
  1544  					},
  1545  				},
  1546  			},
  1547  		},
  1548  		{
  1549  			name: "DedupBlock",
  1550  			pos:  position{line: 820, col: 1, offset: 24614},
  1551  			expr: &actionExpr{
  1552  				pos: position{line: 820, col: 15, offset: 24628},
  1553  				run: (*parser).callonDedupBlock1,
  1554  				expr: &seqExpr{
  1555  					pos: position{line: 820, col: 15, offset: 24628},
  1556  					exprs: []any{
  1557  						&ruleRefExpr{
  1558  							pos:  position{line: 820, col: 15, offset: 24628},
  1559  							name: "PIPE",
  1560  						},
  1561  						&ruleRefExpr{
  1562  							pos:  position{line: 820, col: 20, offset: 24633},
  1563  							name: "CMD_DEDUP",
  1564  						},
  1565  						&labeledExpr{
  1566  							pos:   position{line: 820, col: 30, offset: 24643},
  1567  							label: "dedupExpr",
  1568  							expr: &ruleRefExpr{
  1569  								pos:  position{line: 820, col: 40, offset: 24653},
  1570  								name: "DedupExpr",
  1571  							},
  1572  						},
  1573  					},
  1574  				},
  1575  			},
  1576  		},
  1577  		{
  1578  			name: "DedupExpr",
  1579  			pos:  position{line: 840, col: 1, offset: 25221},
  1580  			expr: &actionExpr{
  1581  				pos: position{line: 840, col: 14, offset: 25234},
  1582  				run: (*parser).callonDedupExpr1,
  1583  				expr: &seqExpr{
  1584  					pos: position{line: 840, col: 14, offset: 25234},
  1585  					exprs: []any{
  1586  						&labeledExpr{
  1587  							pos:   position{line: 840, col: 14, offset: 25234},
  1588  							label: "limitArr",
  1589  							expr: &zeroOrOneExpr{
  1590  								pos: position{line: 840, col: 23, offset: 25243},
  1591  								expr: &seqExpr{
  1592  									pos: position{line: 840, col: 24, offset: 25244},
  1593  									exprs: []any{
  1594  										&ruleRefExpr{
  1595  											pos:  position{line: 840, col: 24, offset: 25244},
  1596  											name: "SPACE",
  1597  										},
  1598  										&ruleRefExpr{
  1599  											pos:  position{line: 840, col: 30, offset: 25250},
  1600  											name: "IntegerAsString",
  1601  										},
  1602  									},
  1603  								},
  1604  							},
  1605  						},
  1606  						&labeledExpr{
  1607  							pos:   position{line: 840, col: 48, offset: 25268},
  1608  							label: "options1",
  1609  							expr: &zeroOrOneExpr{
  1610  								pos: position{line: 840, col: 57, offset: 25277},
  1611  								expr: &ruleRefExpr{
  1612  									pos:  position{line: 840, col: 58, offset: 25278},
  1613  									name: "DedupOptions",
  1614  								},
  1615  							},
  1616  						},
  1617  						&labeledExpr{
  1618  							pos:   position{line: 840, col: 73, offset: 25293},
  1619  							label: "fieldList",
  1620  							expr: &zeroOrOneExpr{
  1621  								pos: position{line: 840, col: 83, offset: 25303},
  1622  								expr: &ruleRefExpr{
  1623  									pos:  position{line: 840, col: 84, offset: 25304},
  1624  									name: "DedupFieldList",
  1625  								},
  1626  							},
  1627  						},
  1628  						&labeledExpr{
  1629  							pos:   position{line: 840, col: 101, offset: 25321},
  1630  							label: "options2",
  1631  							expr: &zeroOrOneExpr{
  1632  								pos: position{line: 840, col: 110, offset: 25330},
  1633  								expr: &ruleRefExpr{
  1634  									pos:  position{line: 840, col: 111, offset: 25331},
  1635  									name: "DedupOptions",
  1636  								},
  1637  							},
  1638  						},
  1639  						&labeledExpr{
  1640  							pos:   position{line: 840, col: 126, offset: 25346},
  1641  							label: "sortByClause",
  1642  							expr: &zeroOrOneExpr{
  1643  								pos: position{line: 840, col: 139, offset: 25359},
  1644  								expr: &ruleRefExpr{
  1645  									pos:  position{line: 840, col: 140, offset: 25360},
  1646  									name: "DedupSortByClause",
  1647  								},
  1648  							},
  1649  						},
  1650  					},
  1651  				},
  1652  			},
  1653  		},
  1654  		{
  1655  			name: "DedupFieldName",
  1656  			pos:  position{line: 897, col: 1, offset: 27098},
  1657  			expr: &actionExpr{
  1658  				pos: position{line: 897, col: 19, offset: 27116},
  1659  				run: (*parser).callonDedupFieldName1,
  1660  				expr: &seqExpr{
  1661  					pos: position{line: 897, col: 19, offset: 27116},
  1662  					exprs: []any{
  1663  						&notExpr{
  1664  							pos: position{line: 897, col: 19, offset: 27116},
  1665  							expr: &litMatcher{
  1666  								pos:        position{line: 897, col: 21, offset: 27118},
  1667  								val:        "sortby",
  1668  								ignoreCase: false,
  1669  								want:       "\"sortby\"",
  1670  							},
  1671  						},
  1672  						&labeledExpr{
  1673  							pos:   position{line: 897, col: 31, offset: 27128},
  1674  							label: "field",
  1675  							expr: &ruleRefExpr{
  1676  								pos:  position{line: 897, col: 37, offset: 27134},
  1677  								name: "FieldName",
  1678  							},
  1679  						},
  1680  					},
  1681  				},
  1682  			},
  1683  		},
  1684  		{
  1685  			name: "DedupFieldList",
  1686  			pos:  position{line: 901, col: 1, offset: 27171},
  1687  			expr: &actionExpr{
  1688  				pos: position{line: 901, col: 19, offset: 27189},
  1689  				run: (*parser).callonDedupFieldList1,
  1690  				expr: &seqExpr{
  1691  					pos: position{line: 901, col: 19, offset: 27189},
  1692  					exprs: []any{
  1693  						&ruleRefExpr{
  1694  							pos:  position{line: 901, col: 19, offset: 27189},
  1695  							name: "SPACE",
  1696  						},
  1697  						&labeledExpr{
  1698  							pos:   position{line: 901, col: 25, offset: 27195},
  1699  							label: "first",
  1700  							expr: &ruleRefExpr{
  1701  								pos:  position{line: 901, col: 31, offset: 27201},
  1702  								name: "DedupFieldName",
  1703  							},
  1704  						},
  1705  						&labeledExpr{
  1706  							pos:   position{line: 901, col: 46, offset: 27216},
  1707  							label: "rest",
  1708  							expr: &zeroOrMoreExpr{
  1709  								pos: position{line: 901, col: 51, offset: 27221},
  1710  								expr: &seqExpr{
  1711  									pos: position{line: 901, col: 52, offset: 27222},
  1712  									exprs: []any{
  1713  										&ruleRefExpr{
  1714  											pos:  position{line: 901, col: 52, offset: 27222},
  1715  											name: "SPACE",
  1716  										},
  1717  										&ruleRefExpr{
  1718  											pos:  position{line: 901, col: 58, offset: 27228},
  1719  											name: "DedupFieldName",
  1720  										},
  1721  										&notExpr{
  1722  											pos: position{line: 901, col: 73, offset: 27243},
  1723  											expr: &ruleRefExpr{
  1724  												pos:  position{line: 901, col: 74, offset: 27244},
  1725  												name: "EQUAL",
  1726  											},
  1727  										},
  1728  									},
  1729  								},
  1730  							},
  1731  						},
  1732  					},
  1733  				},
  1734  			},
  1735  		},
  1736  		{
  1737  			name: "DedupOptions",
  1738  			pos:  position{line: 919, col: 1, offset: 27772},
  1739  			expr: &actionExpr{
  1740  				pos: position{line: 919, col: 17, offset: 27788},
  1741  				run: (*parser).callonDedupOptions1,
  1742  				expr: &labeledExpr{
  1743  					pos:   position{line: 919, col: 17, offset: 27788},
  1744  					label: "option",
  1745  					expr: &zeroOrMoreExpr{
  1746  						pos: position{line: 919, col: 24, offset: 27795},
  1747  						expr: &ruleRefExpr{
  1748  							pos:  position{line: 919, col: 25, offset: 27796},
  1749  							name: "DedupOption",
  1750  						},
  1751  					},
  1752  				},
  1753  			},
  1754  		},
  1755  		{
  1756  			name: "DedupOption",
  1757  			pos:  position{line: 959, col: 1, offset: 29062},
  1758  			expr: &actionExpr{
  1759  				pos: position{line: 959, col: 16, offset: 29077},
  1760  				run: (*parser).callonDedupOption1,
  1761  				expr: &seqExpr{
  1762  					pos: position{line: 959, col: 16, offset: 29077},
  1763  					exprs: []any{
  1764  						&ruleRefExpr{
  1765  							pos:  position{line: 959, col: 16, offset: 29077},
  1766  							name: "SPACE",
  1767  						},
  1768  						&labeledExpr{
  1769  							pos:   position{line: 959, col: 22, offset: 29083},
  1770  							label: "optionCMD",
  1771  							expr: &ruleRefExpr{
  1772  								pos:  position{line: 959, col: 32, offset: 29093},
  1773  								name: "DedupOptionCMD",
  1774  							},
  1775  						},
  1776  						&litMatcher{
  1777  							pos:        position{line: 959, col: 47, offset: 29108},
  1778  							val:        "=",
  1779  							ignoreCase: false,
  1780  							want:       "\"=\"",
  1781  						},
  1782  						&labeledExpr{
  1783  							pos:   position{line: 959, col: 51, offset: 29112},
  1784  							label: "field",
  1785  							expr: &ruleRefExpr{
  1786  								pos:  position{line: 959, col: 57, offset: 29118},
  1787  								name: "EvalFieldToRead",
  1788  							},
  1789  						},
  1790  					},
  1791  				},
  1792  			},
  1793  		},
  1794  		{
  1795  			name: "DedupOptionCMD",
  1796  			pos:  position{line: 964, col: 1, offset: 29227},
  1797  			expr: &actionExpr{
  1798  				pos: position{line: 964, col: 19, offset: 29245},
  1799  				run: (*parser).callonDedupOptionCMD1,
  1800  				expr: &labeledExpr{
  1801  					pos:   position{line: 964, col: 19, offset: 29245},
  1802  					label: "option",
  1803  					expr: &choiceExpr{
  1804  						pos: position{line: 964, col: 27, offset: 29253},
  1805  						alternatives: []any{
  1806  							&litMatcher{
  1807  								pos:        position{line: 964, col: 27, offset: 29253},
  1808  								val:        "consecutive",
  1809  								ignoreCase: false,
  1810  								want:       "\"consecutive\"",
  1811  							},
  1812  							&litMatcher{
  1813  								pos:        position{line: 964, col: 43, offset: 29269},
  1814  								val:        "keepempty",
  1815  								ignoreCase: false,
  1816  								want:       "\"keepempty\"",
  1817  							},
  1818  							&litMatcher{
  1819  								pos:        position{line: 964, col: 57, offset: 29283},
  1820  								val:        "keepevents",
  1821  								ignoreCase: false,
  1822  								want:       "\"keepevents\"",
  1823  							},
  1824  						},
  1825  					},
  1826  				},
  1827  			},
  1828  		},
  1829  		{
  1830  			name: "DedupSortByClause",
  1831  			pos:  position{line: 972, col: 1, offset: 29468},
  1832  			expr: &actionExpr{
  1833  				pos: position{line: 972, col: 22, offset: 29489},
  1834  				run: (*parser).callonDedupSortByClause1,
  1835  				expr: &seqExpr{
  1836  					pos: position{line: 972, col: 22, offset: 29489},
  1837  					exprs: []any{
  1838  						&ruleRefExpr{
  1839  							pos:  position{line: 972, col: 22, offset: 29489},
  1840  							name: "CMD_DEDUP_SORTBY",
  1841  						},
  1842  						&labeledExpr{
  1843  							pos:   position{line: 972, col: 39, offset: 29506},
  1844  							label: "dedupSortEles",
  1845  							expr: &ruleRefExpr{
  1846  								pos:  position{line: 972, col: 53, offset: 29520},
  1847  								name: "SortElements",
  1848  							},
  1849  						},
  1850  					},
  1851  				},
  1852  			},
  1853  		},
  1854  		{
  1855  			name: "SortElements",
  1856  			pos:  position{line: 977, col: 1, offset: 29628},
  1857  			expr: &actionExpr{
  1858  				pos: position{line: 977, col: 17, offset: 29644},
  1859  				run: (*parser).callonSortElements1,
  1860  				expr: &seqExpr{
  1861  					pos: position{line: 977, col: 17, offset: 29644},
  1862  					exprs: []any{
  1863  						&labeledExpr{
  1864  							pos:   position{line: 977, col: 17, offset: 29644},
  1865  							label: "first",
  1866  							expr: &ruleRefExpr{
  1867  								pos:  position{line: 977, col: 23, offset: 29650},
  1868  								name: "SingleSortElement",
  1869  							},
  1870  						},
  1871  						&labeledExpr{
  1872  							pos:   position{line: 977, col: 41, offset: 29668},
  1873  							label: "rest",
  1874  							expr: &zeroOrMoreExpr{
  1875  								pos: position{line: 977, col: 46, offset: 29673},
  1876  								expr: &seqExpr{
  1877  									pos: position{line: 977, col: 47, offset: 29674},
  1878  									exprs: []any{
  1879  										&ruleRefExpr{
  1880  											pos:  position{line: 977, col: 47, offset: 29674},
  1881  											name: "EMPTY_OR_COMMA",
  1882  										},
  1883  										&ruleRefExpr{
  1884  											pos:  position{line: 977, col: 62, offset: 29689},
  1885  											name: "SingleSortElement",
  1886  										},
  1887  									},
  1888  								},
  1889  							},
  1890  						},
  1891  					},
  1892  				},
  1893  			},
  1894  		},
  1895  		{
  1896  			name: "SingleSortElement",
  1897  			pos:  position{line: 992, col: 1, offset: 30047},
  1898  			expr: &actionExpr{
  1899  				pos: position{line: 992, col: 22, offset: 30068},
  1900  				run: (*parser).callonSingleSortElement1,
  1901  				expr: &labeledExpr{
  1902  					pos:   position{line: 992, col: 22, offset: 30068},
  1903  					label: "element",
  1904  					expr: &choiceExpr{
  1905  						pos: position{line: 992, col: 31, offset: 30077},
  1906  						alternatives: []any{
  1907  							&ruleRefExpr{
  1908  								pos:  position{line: 992, col: 31, offset: 30077},
  1909  								name: "SingleSortElementWithCast",
  1910  							},
  1911  							&ruleRefExpr{
  1912  								pos:  position{line: 992, col: 59, offset: 30105},
  1913  								name: "SingleSortElementWithoutCast",
  1914  							},
  1915  						},
  1916  					},
  1917  				},
  1918  			},
  1919  		},
  1920  		{
  1921  			name: "SingleSortElementWithoutCast",
  1922  			pos:  position{line: 996, col: 1, offset: 30164},
  1923  			expr: &actionExpr{
  1924  				pos: position{line: 996, col: 33, offset: 30196},
  1925  				run: (*parser).callonSingleSortElementWithoutCast1,
  1926  				expr: &seqExpr{
  1927  					pos: position{line: 996, col: 33, offset: 30196},
  1928  					exprs: []any{
  1929  						&labeledExpr{
  1930  							pos:   position{line: 996, col: 33, offset: 30196},
  1931  							label: "sortBySymbol",
  1932  							expr: &choiceExpr{
  1933  								pos: position{line: 996, col: 47, offset: 30210},
  1934  								alternatives: []any{
  1935  									&litMatcher{
  1936  										pos:        position{line: 996, col: 47, offset: 30210},
  1937  										val:        "+",
  1938  										ignoreCase: false,
  1939  										want:       "\"+\"",
  1940  									},
  1941  									&litMatcher{
  1942  										pos:        position{line: 996, col: 53, offset: 30216},
  1943  										val:        "-",
  1944  										ignoreCase: false,
  1945  										want:       "\"-\"",
  1946  									},
  1947  									&litMatcher{
  1948  										pos:        position{line: 996, col: 59, offset: 30222},
  1949  										val:        "",
  1950  										ignoreCase: false,
  1951  										want:       "\"\"",
  1952  									},
  1953  								},
  1954  							},
  1955  						},
  1956  						&labeledExpr{
  1957  							pos:   position{line: 996, col: 63, offset: 30226},
  1958  							label: "field",
  1959  							expr: &ruleRefExpr{
  1960  								pos:  position{line: 996, col: 69, offset: 30232},
  1961  								name: "FieldName",
  1962  							},
  1963  						},
  1964  					},
  1965  				},
  1966  			},
  1967  		},
  1968  		{
  1969  			name: "SingleSortElementWithCast",
  1970  			pos:  position{line: 1011, col: 1, offset: 30507},
  1971  			expr: &actionExpr{
  1972  				pos: position{line: 1011, col: 30, offset: 30536},
  1973  				run: (*parser).callonSingleSortElementWithCast1,
  1974  				expr: &seqExpr{
  1975  					pos: position{line: 1011, col: 30, offset: 30536},
  1976  					exprs: []any{
  1977  						&labeledExpr{
  1978  							pos:   position{line: 1011, col: 30, offset: 30536},
  1979  							label: "sortBySymbol",
  1980  							expr: &choiceExpr{
  1981  								pos: position{line: 1011, col: 44, offset: 30550},
  1982  								alternatives: []any{
  1983  									&litMatcher{
  1984  										pos:        position{line: 1011, col: 44, offset: 30550},
  1985  										val:        "+",
  1986  										ignoreCase: false,
  1987  										want:       "\"+\"",
  1988  									},
  1989  									&litMatcher{
  1990  										pos:        position{line: 1011, col: 50, offset: 30556},
  1991  										val:        "-",
  1992  										ignoreCase: false,
  1993  										want:       "\"-\"",
  1994  									},
  1995  									&litMatcher{
  1996  										pos:        position{line: 1011, col: 56, offset: 30562},
  1997  										val:        "",
  1998  										ignoreCase: false,
  1999  										want:       "\"\"",
  2000  									},
  2001  								},
  2002  							},
  2003  						},
  2004  						&labeledExpr{
  2005  							pos:   position{line: 1011, col: 60, offset: 30566},
  2006  							label: "op",
  2007  							expr: &choiceExpr{
  2008  								pos: position{line: 1011, col: 64, offset: 30570},
  2009  								alternatives: []any{
  2010  									&litMatcher{
  2011  										pos:        position{line: 1011, col: 64, offset: 30570},
  2012  										val:        "auto",
  2013  										ignoreCase: false,
  2014  										want:       "\"auto\"",
  2015  									},
  2016  									&litMatcher{
  2017  										pos:        position{line: 1011, col: 73, offset: 30579},
  2018  										val:        "str",
  2019  										ignoreCase: false,
  2020  										want:       "\"str\"",
  2021  									},
  2022  									&litMatcher{
  2023  										pos:        position{line: 1011, col: 81, offset: 30587},
  2024  										val:        "ip",
  2025  										ignoreCase: false,
  2026  										want:       "\"ip\"",
  2027  									},
  2028  									&litMatcher{
  2029  										pos:        position{line: 1011, col: 88, offset: 30594},
  2030  										val:        "num",
  2031  										ignoreCase: false,
  2032  										want:       "\"num\"",
  2033  									},
  2034  								},
  2035  							},
  2036  						},
  2037  						&ruleRefExpr{
  2038  							pos:  position{line: 1011, col: 95, offset: 30601},
  2039  							name: "L_PAREN",
  2040  						},
  2041  						&labeledExpr{
  2042  							pos:   position{line: 1011, col: 103, offset: 30609},
  2043  							label: "field",
  2044  							expr: &ruleRefExpr{
  2045  								pos:  position{line: 1011, col: 109, offset: 30615},
  2046  								name: "FieldName",
  2047  							},
  2048  						},
  2049  						&ruleRefExpr{
  2050  							pos:  position{line: 1011, col: 119, offset: 30625},
  2051  							name: "R_PAREN",
  2052  						},
  2053  					},
  2054  				},
  2055  			},
  2056  		},
  2057  		{
  2058  			name: "RenameBlock",
  2059  			pos:  position{line: 1031, col: 1, offset: 31050},
  2060  			expr: &actionExpr{
  2061  				pos: position{line: 1031, col: 16, offset: 31065},
  2062  				run: (*parser).callonRenameBlock1,
  2063  				expr: &seqExpr{
  2064  					pos: position{line: 1031, col: 16, offset: 31065},
  2065  					exprs: []any{
  2066  						&ruleRefExpr{
  2067  							pos:  position{line: 1031, col: 16, offset: 31065},
  2068  							name: "PIPE",
  2069  						},
  2070  						&ruleRefExpr{
  2071  							pos:  position{line: 1031, col: 21, offset: 31070},
  2072  							name: "CMD_RENAME",
  2073  						},
  2074  						&labeledExpr{
  2075  							pos:   position{line: 1031, col: 32, offset: 31081},
  2076  							label: "renameExpr",
  2077  							expr: &ruleRefExpr{
  2078  								pos:  position{line: 1031, col: 43, offset: 31092},
  2079  								name: "RenameExpr",
  2080  							},
  2081  						},
  2082  					},
  2083  				},
  2084  			},
  2085  		},
  2086  		{
  2087  			name: "RenameExpr",
  2088  			pos:  position{line: 1047, col: 1, offset: 31467},
  2089  			expr: &choiceExpr{
  2090  				pos: position{line: 1047, col: 15, offset: 31481},
  2091  				alternatives: []any{
  2092  					&actionExpr{
  2093  						pos: position{line: 1047, col: 15, offset: 31481},
  2094  						run: (*parser).callonRenameExpr2,
  2095  						expr: &seqExpr{
  2096  							pos: position{line: 1047, col: 15, offset: 31481},
  2097  							exprs: []any{
  2098  								&labeledExpr{
  2099  									pos:   position{line: 1047, col: 15, offset: 31481},
  2100  									label: "originalPattern",
  2101  									expr: &ruleRefExpr{
  2102  										pos:  position{line: 1047, col: 31, offset: 31497},
  2103  										name: "RenamePattern",
  2104  									},
  2105  								},
  2106  								&ruleRefExpr{
  2107  									pos:  position{line: 1047, col: 45, offset: 31511},
  2108  									name: "AS",
  2109  								},
  2110  								&labeledExpr{
  2111  									pos:   position{line: 1047, col: 48, offset: 31514},
  2112  									label: "newPattern",
  2113  									expr: &ruleRefExpr{
  2114  										pos:  position{line: 1047, col: 59, offset: 31525},
  2115  										name: "QuotedString",
  2116  									},
  2117  								},
  2118  							},
  2119  						},
  2120  					},
  2121  					&actionExpr{
  2122  						pos: position{line: 1058, col: 3, offset: 31844},
  2123  						run: (*parser).callonRenameExpr9,
  2124  						expr: &seqExpr{
  2125  							pos: position{line: 1058, col: 3, offset: 31844},
  2126  							exprs: []any{
  2127  								&labeledExpr{
  2128  									pos:   position{line: 1058, col: 3, offset: 31844},
  2129  									label: "originalPattern",
  2130  									expr: &ruleRefExpr{
  2131  										pos:  position{line: 1058, col: 19, offset: 31860},
  2132  										name: "RenamePattern",
  2133  									},
  2134  								},
  2135  								&ruleRefExpr{
  2136  									pos:  position{line: 1058, col: 33, offset: 31874},
  2137  									name: "AS",
  2138  								},
  2139  								&labeledExpr{
  2140  									pos:   position{line: 1058, col: 36, offset: 31877},
  2141  									label: "newPattern",
  2142  									expr: &ruleRefExpr{
  2143  										pos:  position{line: 1058, col: 47, offset: 31888},
  2144  										name: "RenamePattern",
  2145  									},
  2146  								},
  2147  							},
  2148  						},
  2149  					},
  2150  				},
  2151  			},
  2152  		},
  2153  		{
  2154  			name: "RexBlock",
  2155  			pos:  position{line: 1080, col: 1, offset: 32454},
  2156  			expr: &actionExpr{
  2157  				pos: position{line: 1080, col: 13, offset: 32466},
  2158  				run: (*parser).callonRexBlock1,
  2159  				expr: &seqExpr{
  2160  					pos: position{line: 1080, col: 13, offset: 32466},
  2161  					exprs: []any{
  2162  						&ruleRefExpr{
  2163  							pos:  position{line: 1080, col: 13, offset: 32466},
  2164  							name: "PIPE",
  2165  						},
  2166  						&ruleRefExpr{
  2167  							pos:  position{line: 1080, col: 18, offset: 32471},
  2168  							name: "CMD_REX",
  2169  						},
  2170  						&litMatcher{
  2171  							pos:        position{line: 1080, col: 26, offset: 32479},
  2172  							val:        "field",
  2173  							ignoreCase: false,
  2174  							want:       "\"field\"",
  2175  						},
  2176  						&ruleRefExpr{
  2177  							pos:  position{line: 1080, col: 34, offset: 32487},
  2178  							name: "EQUAL",
  2179  						},
  2180  						&labeledExpr{
  2181  							pos:   position{line: 1080, col: 40, offset: 32493},
  2182  							label: "field",
  2183  							expr: &ruleRefExpr{
  2184  								pos:  position{line: 1080, col: 46, offset: 32499},
  2185  								name: "EvalFieldToRead",
  2186  							},
  2187  						},
  2188  						&ruleRefExpr{
  2189  							pos:  position{line: 1080, col: 62, offset: 32515},
  2190  							name: "SPACE",
  2191  						},
  2192  						&labeledExpr{
  2193  							pos:   position{line: 1080, col: 68, offset: 32521},
  2194  							label: "str",
  2195  							expr: &ruleRefExpr{
  2196  								pos:  position{line: 1080, col: 72, offset: 32525},
  2197  								name: "QuotedString",
  2198  							},
  2199  						},
  2200  					},
  2201  				},
  2202  			},
  2203  		},
  2204  		{
  2205  			name: "SortBlock",
  2206  			pos:  position{line: 1108, col: 1, offset: 33228},
  2207  			expr: &actionExpr{
  2208  				pos: position{line: 1108, col: 14, offset: 33241},
  2209  				run: (*parser).callonSortBlock1,
  2210  				expr: &seqExpr{
  2211  					pos: position{line: 1108, col: 14, offset: 33241},
  2212  					exprs: []any{
  2213  						&ruleRefExpr{
  2214  							pos:  position{line: 1108, col: 14, offset: 33241},
  2215  							name: "PIPE",
  2216  						},
  2217  						&ruleRefExpr{
  2218  							pos:  position{line: 1108, col: 19, offset: 33246},
  2219  							name: "CMD_SORT",
  2220  						},
  2221  						&labeledExpr{
  2222  							pos:   position{line: 1108, col: 28, offset: 33255},
  2223  							label: "sortByEles",
  2224  							expr: &ruleRefExpr{
  2225  								pos:  position{line: 1108, col: 39, offset: 33266},
  2226  								name: "SortElements",
  2227  							},
  2228  						},
  2229  					},
  2230  				},
  2231  			},
  2232  		},
  2233  		{
  2234  			name: "EvalBlock",
  2235  			pos:  position{line: 1141, col: 1, offset: 34063},
  2236  			expr: &actionExpr{
  2237  				pos: position{line: 1141, col: 14, offset: 34076},
  2238  				run: (*parser).callonEvalBlock1,
  2239  				expr: &seqExpr{
  2240  					pos: position{line: 1141, col: 14, offset: 34076},
  2241  					exprs: []any{
  2242  						&ruleRefExpr{
  2243  							pos:  position{line: 1141, col: 14, offset: 34076},
  2244  							name: "PIPE",
  2245  						},
  2246  						&ruleRefExpr{
  2247  							pos:  position{line: 1141, col: 19, offset: 34081},
  2248  							name: "CMD_EVAL",
  2249  						},
  2250  						&labeledExpr{
  2251  							pos:   position{line: 1141, col: 28, offset: 34090},
  2252  							label: "first",
  2253  							expr: &ruleRefExpr{
  2254  								pos:  position{line: 1141, col: 34, offset: 34096},
  2255  								name: "SingleEval",
  2256  							},
  2257  						},
  2258  						&labeledExpr{
  2259  							pos:   position{line: 1141, col: 45, offset: 34107},
  2260  							label: "rest",
  2261  							expr: &zeroOrMoreExpr{
  2262  								pos: position{line: 1141, col: 50, offset: 34112},
  2263  								expr: &seqExpr{
  2264  									pos: position{line: 1141, col: 51, offset: 34113},
  2265  									exprs: []any{
  2266  										&ruleRefExpr{
  2267  											pos:  position{line: 1141, col: 51, offset: 34113},
  2268  											name: "COMMA",
  2269  										},
  2270  										&ruleRefExpr{
  2271  											pos:  position{line: 1141, col: 57, offset: 34119},
  2272  											name: "SingleEval",
  2273  										},
  2274  									},
  2275  								},
  2276  							},
  2277  						},
  2278  					},
  2279  				},
  2280  			},
  2281  		},
  2282  		{
  2283  			name: "SingleEval",
  2284  			pos:  position{line: 1168, col: 1, offset: 34920},
  2285  			expr: &actionExpr{
  2286  				pos: position{line: 1168, col: 15, offset: 34934},
  2287  				run: (*parser).callonSingleEval1,
  2288  				expr: &seqExpr{
  2289  					pos: position{line: 1168, col: 15, offset: 34934},
  2290  					exprs: []any{
  2291  						&labeledExpr{
  2292  							pos:   position{line: 1168, col: 15, offset: 34934},
  2293  							label: "field",
  2294  							expr: &ruleRefExpr{
  2295  								pos:  position{line: 1168, col: 21, offset: 34940},
  2296  								name: "FieldName",
  2297  							},
  2298  						},
  2299  						&ruleRefExpr{
  2300  							pos:  position{line: 1168, col: 31, offset: 34950},
  2301  							name: "EQUAL",
  2302  						},
  2303  						&labeledExpr{
  2304  							pos:   position{line: 1168, col: 37, offset: 34956},
  2305  							label: "expr",
  2306  							expr: &ruleRefExpr{
  2307  								pos:  position{line: 1168, col: 42, offset: 34961},
  2308  								name: "EvalExpression",
  2309  							},
  2310  						},
  2311  					},
  2312  				},
  2313  			},
  2314  		},
  2315  		{
  2316  			name: "EvalExpression",
  2317  			pos:  position{line: 1181, col: 1, offset: 35362},
  2318  			expr: &actionExpr{
  2319  				pos: position{line: 1181, col: 19, offset: 35380},
  2320  				run: (*parser).callonEvalExpression1,
  2321  				expr: &labeledExpr{
  2322  					pos:   position{line: 1181, col: 19, offset: 35380},
  2323  					label: "value",
  2324  					expr: &ruleRefExpr{
  2325  						pos:  position{line: 1181, col: 25, offset: 35386},
  2326  						name: "ValueExpr",
  2327  					},
  2328  				},
  2329  			},
  2330  		},
  2331  		{
  2332  			name: "ConditionExpr",
  2333  			pos:  position{line: 1189, col: 1, offset: 35533},
  2334  			expr: &actionExpr{
  2335  				pos: position{line: 1189, col: 18, offset: 35550},
  2336  				run: (*parser).callonConditionExpr1,
  2337  				expr: &seqExpr{
  2338  					pos: position{line: 1189, col: 18, offset: 35550},
  2339  					exprs: []any{
  2340  						&litMatcher{
  2341  							pos:        position{line: 1189, col: 18, offset: 35550},
  2342  							val:        "if",
  2343  							ignoreCase: false,
  2344  							want:       "\"if\"",
  2345  						},
  2346  						&ruleRefExpr{
  2347  							pos:  position{line: 1189, col: 23, offset: 35555},
  2348  							name: "L_PAREN",
  2349  						},
  2350  						&labeledExpr{
  2351  							pos:   position{line: 1189, col: 31, offset: 35563},
  2352  							label: "condition",
  2353  							expr: &ruleRefExpr{
  2354  								pos:  position{line: 1189, col: 41, offset: 35573},
  2355  								name: "BoolExpr",
  2356  							},
  2357  						},
  2358  						&ruleRefExpr{
  2359  							pos:  position{line: 1189, col: 50, offset: 35582},
  2360  							name: "COMMA",
  2361  						},
  2362  						&labeledExpr{
  2363  							pos:   position{line: 1189, col: 56, offset: 35588},
  2364  							label: "trueValue",
  2365  							expr: &ruleRefExpr{
  2366  								pos:  position{line: 1189, col: 66, offset: 35598},
  2367  								name: "ValueExpr",
  2368  							},
  2369  						},
  2370  						&ruleRefExpr{
  2371  							pos:  position{line: 1189, col: 76, offset: 35608},
  2372  							name: "COMMA",
  2373  						},
  2374  						&labeledExpr{
  2375  							pos:   position{line: 1189, col: 82, offset: 35614},
  2376  							label: "falseValue",
  2377  							expr: &ruleRefExpr{
  2378  								pos:  position{line: 1189, col: 93, offset: 35625},
  2379  								name: "ValueExpr",
  2380  							},
  2381  						},
  2382  						&ruleRefExpr{
  2383  							pos:  position{line: 1189, col: 103, offset: 35635},
  2384  							name: "R_PAREN",
  2385  						},
  2386  					},
  2387  				},
  2388  			},
  2389  		},
  2390  		{
  2391  			name: "TextExpr",
  2392  			pos:  position{line: 1201, col: 1, offset: 35885},
  2393  			expr: &choiceExpr{
  2394  				pos: position{line: 1201, col: 13, offset: 35897},
  2395  				alternatives: []any{
  2396  					&actionExpr{
  2397  						pos: position{line: 1201, col: 13, offset: 35897},
  2398  						run: (*parser).callonTextExpr2,
  2399  						expr: &seqExpr{
  2400  							pos: position{line: 1201, col: 14, offset: 35898},
  2401  							exprs: []any{
  2402  								&labeledExpr{
  2403  									pos:   position{line: 1201, col: 14, offset: 35898},
  2404  									label: "opName",
  2405  									expr: &litMatcher{
  2406  										pos:        position{line: 1201, col: 22, offset: 35906},
  2407  										val:        "lower",
  2408  										ignoreCase: false,
  2409  										want:       "\"lower\"",
  2410  									},
  2411  								},
  2412  								&ruleRefExpr{
  2413  									pos:  position{line: 1201, col: 31, offset: 35915},
  2414  									name: "L_PAREN",
  2415  								},
  2416  								&labeledExpr{
  2417  									pos:   position{line: 1201, col: 39, offset: 35923},
  2418  									label: "stringExpr",
  2419  									expr: &ruleRefExpr{
  2420  										pos:  position{line: 1201, col: 50, offset: 35934},
  2421  										name: "StringExpr",
  2422  									},
  2423  								},
  2424  								&ruleRefExpr{
  2425  									pos:  position{line: 1201, col: 61, offset: 35945},
  2426  									name: "R_PAREN",
  2427  								},
  2428  							},
  2429  						},
  2430  					},
  2431  					&actionExpr{
  2432  						pos: position{line: 1215, col: 3, offset: 36257},
  2433  						run: (*parser).callonTextExpr10,
  2434  						expr: &seqExpr{
  2435  							pos: position{line: 1215, col: 4, offset: 36258},
  2436  							exprs: []any{
  2437  								&labeledExpr{
  2438  									pos:   position{line: 1215, col: 4, offset: 36258},
  2439  									label: "opName",
  2440  									expr: &choiceExpr{
  2441  										pos: position{line: 1215, col: 12, offset: 36266},
  2442  										alternatives: []any{
  2443  											&litMatcher{
  2444  												pos:        position{line: 1215, col: 12, offset: 36266},
  2445  												val:        "max",
  2446  												ignoreCase: false,
  2447  												want:       "\"max\"",
  2448  											},
  2449  											&litMatcher{
  2450  												pos:        position{line: 1215, col: 20, offset: 36274},
  2451  												val:        "min",
  2452  												ignoreCase: false,
  2453  												want:       "\"min\"",
  2454  											},
  2455  										},
  2456  									},
  2457  								},
  2458  								&ruleRefExpr{
  2459  									pos:  position{line: 1215, col: 27, offset: 36281},
  2460  									name: "L_PAREN",
  2461  								},
  2462  								&labeledExpr{
  2463  									pos:   position{line: 1215, col: 35, offset: 36289},
  2464  									label: "firstVal",
  2465  									expr: &ruleRefExpr{
  2466  										pos:  position{line: 1215, col: 44, offset: 36298},
  2467  										name: "StringExpr",
  2468  									},
  2469  								},
  2470  								&labeledExpr{
  2471  									pos:   position{line: 1215, col: 55, offset: 36309},
  2472  									label: "rest",
  2473  									expr: &zeroOrMoreExpr{
  2474  										pos: position{line: 1215, col: 60, offset: 36314},
  2475  										expr: &seqExpr{
  2476  											pos: position{line: 1215, col: 61, offset: 36315},
  2477  											exprs: []any{
  2478  												&ruleRefExpr{
  2479  													pos:  position{line: 1215, col: 61, offset: 36315},
  2480  													name: "COMMA",
  2481  												},
  2482  												&ruleRefExpr{
  2483  													pos:  position{line: 1215, col: 67, offset: 36321},
  2484  													name: "StringExpr",
  2485  												},
  2486  											},
  2487  										},
  2488  									},
  2489  								},
  2490  								&ruleRefExpr{
  2491  									pos:  position{line: 1215, col: 80, offset: 36334},
  2492  									name: "R_PAREN",
  2493  								},
  2494  							},
  2495  						},
  2496  					},
  2497  					&actionExpr{
  2498  						pos: position{line: 1238, col: 3, offset: 37025},
  2499  						run: (*parser).callonTextExpr25,
  2500  						expr: &seqExpr{
  2501  							pos: position{line: 1238, col: 4, offset: 37026},
  2502  							exprs: []any{
  2503  								&labeledExpr{
  2504  									pos:   position{line: 1238, col: 4, offset: 37026},
  2505  									label: "opName",
  2506  									expr: &litMatcher{
  2507  										pos:        position{line: 1238, col: 12, offset: 37034},
  2508  										val:        "urldecode",
  2509  										ignoreCase: false,
  2510  										want:       "\"urldecode\"",
  2511  									},
  2512  								},
  2513  								&ruleRefExpr{
  2514  									pos:  position{line: 1238, col: 25, offset: 37047},
  2515  									name: "L_PAREN",
  2516  								},
  2517  								&labeledExpr{
  2518  									pos:   position{line: 1238, col: 33, offset: 37055},
  2519  									label: "url",
  2520  									expr: &ruleRefExpr{
  2521  										pos:  position{line: 1238, col: 37, offset: 37059},
  2522  										name: "StringExpr",
  2523  									},
  2524  								},
  2525  								&ruleRefExpr{
  2526  									pos:  position{line: 1238, col: 48, offset: 37070},
  2527  									name: "R_PAREN",
  2528  								},
  2529  							},
  2530  						},
  2531  					},
  2532  					&actionExpr{
  2533  						pos: position{line: 1250, col: 3, offset: 37409},
  2534  						run: (*parser).callonTextExpr33,
  2535  						expr: &seqExpr{
  2536  							pos: position{line: 1250, col: 4, offset: 37410},
  2537  							exprs: []any{
  2538  								&labeledExpr{
  2539  									pos:   position{line: 1250, col: 4, offset: 37410},
  2540  									label: "opName",
  2541  									expr: &litMatcher{
  2542  										pos:        position{line: 1250, col: 12, offset: 37418},
  2543  										val:        "split",
  2544  										ignoreCase: false,
  2545  										want:       "\"split\"",
  2546  									},
  2547  								},
  2548  								&ruleRefExpr{
  2549  									pos:  position{line: 1250, col: 21, offset: 37427},
  2550  									name: "L_PAREN",
  2551  								},
  2552  								&labeledExpr{
  2553  									pos:   position{line: 1250, col: 29, offset: 37435},
  2554  									label: "stringExpr",
  2555  									expr: &ruleRefExpr{
  2556  										pos:  position{line: 1250, col: 40, offset: 37446},
  2557  										name: "StringExpr",
  2558  									},
  2559  								},
  2560  								&ruleRefExpr{
  2561  									pos:  position{line: 1250, col: 51, offset: 37457},
  2562  									name: "COMMA",
  2563  								},
  2564  								&labeledExpr{
  2565  									pos:   position{line: 1250, col: 57, offset: 37463},
  2566  									label: "delim",
  2567  									expr: &ruleRefExpr{
  2568  										pos:  position{line: 1250, col: 63, offset: 37469},
  2569  										name: "StringExpr",
  2570  									},
  2571  								},
  2572  								&ruleRefExpr{
  2573  									pos:  position{line: 1250, col: 74, offset: 37480},
  2574  									name: "R_PAREN",
  2575  								},
  2576  							},
  2577  						},
  2578  					},
  2579  					&actionExpr{
  2580  						pos: position{line: 1262, col: 3, offset: 37813},
  2581  						run: (*parser).callonTextExpr44,
  2582  						expr: &seqExpr{
  2583  							pos: position{line: 1262, col: 4, offset: 37814},
  2584  							exprs: []any{
  2585  								&labeledExpr{
  2586  									pos:   position{line: 1262, col: 4, offset: 37814},
  2587  									label: "opName",
  2588  									expr: &litMatcher{
  2589  										pos:        position{line: 1262, col: 12, offset: 37822},
  2590  										val:        "substr",
  2591  										ignoreCase: false,
  2592  										want:       "\"substr\"",
  2593  									},
  2594  								},
  2595  								&ruleRefExpr{
  2596  									pos:  position{line: 1262, col: 22, offset: 37832},
  2597  									name: "L_PAREN",
  2598  								},
  2599  								&labeledExpr{
  2600  									pos:   position{line: 1262, col: 30, offset: 37840},
  2601  									label: "stringExpr",
  2602  									expr: &ruleRefExpr{
  2603  										pos:  position{line: 1262, col: 41, offset: 37851},
  2604  										name: "StringExpr",
  2605  									},
  2606  								},
  2607  								&ruleRefExpr{
  2608  									pos:  position{line: 1262, col: 52, offset: 37862},
  2609  									name: "COMMA",
  2610  								},
  2611  								&labeledExpr{
  2612  									pos:   position{line: 1262, col: 58, offset: 37868},
  2613  									label: "startIndex",
  2614  									expr: &ruleRefExpr{
  2615  										pos:  position{line: 1262, col: 69, offset: 37879},
  2616  										name: "NumericExpr",
  2617  									},
  2618  								},
  2619  								&labeledExpr{
  2620  									pos:   position{line: 1262, col: 81, offset: 37891},
  2621  									label: "lengthParam",
  2622  									expr: &zeroOrOneExpr{
  2623  										pos: position{line: 1262, col: 93, offset: 37903},
  2624  										expr: &seqExpr{
  2625  											pos: position{line: 1262, col: 94, offset: 37904},
  2626  											exprs: []any{
  2627  												&ruleRefExpr{
  2628  													pos:  position{line: 1262, col: 94, offset: 37904},
  2629  													name: "COMMA",
  2630  												},
  2631  												&ruleRefExpr{
  2632  													pos:  position{line: 1262, col: 100, offset: 37910},
  2633  													name: "NumericExpr",
  2634  												},
  2635  											},
  2636  										},
  2637  									},
  2638  								},
  2639  								&ruleRefExpr{
  2640  									pos:  position{line: 1262, col: 114, offset: 37924},
  2641  									name: "R_PAREN",
  2642  								},
  2643  							},
  2644  						},
  2645  					},
  2646  					&actionExpr{
  2647  						pos: position{line: 1295, col: 3, offset: 39101},
  2648  						run: (*parser).callonTextExpr60,
  2649  						expr: &seqExpr{
  2650  							pos: position{line: 1295, col: 3, offset: 39101},
  2651  							exprs: []any{
  2652  								&litMatcher{
  2653  									pos:        position{line: 1295, col: 3, offset: 39101},
  2654  									val:        "tostring",
  2655  									ignoreCase: false,
  2656  									want:       "\"tostring\"",
  2657  								},
  2658  								&ruleRefExpr{
  2659  									pos:  position{line: 1295, col: 14, offset: 39112},
  2660  									name: "L_PAREN",
  2661  								},
  2662  								&labeledExpr{
  2663  									pos:   position{line: 1295, col: 22, offset: 39120},
  2664  									label: "value",
  2665  									expr: &ruleRefExpr{
  2666  										pos:  position{line: 1295, col: 28, offset: 39126},
  2667  										name: "ValueExpr",
  2668  									},
  2669  								},
  2670  								&labeledExpr{
  2671  									pos:   position{line: 1295, col: 38, offset: 39136},
  2672  									label: "format",
  2673  									expr: &zeroOrOneExpr{
  2674  										pos: position{line: 1295, col: 45, offset: 39143},
  2675  										expr: &seqExpr{
  2676  											pos: position{line: 1295, col: 46, offset: 39144},
  2677  											exprs: []any{
  2678  												&ruleRefExpr{
  2679  													pos:  position{line: 1295, col: 46, offset: 39144},
  2680  													name: "COMMA",
  2681  												},
  2682  												&ruleRefExpr{
  2683  													pos:  position{line: 1295, col: 52, offset: 39150},
  2684  													name: "StringExpr",
  2685  												},
  2686  											},
  2687  										},
  2688  									},
  2689  								},
  2690  								&ruleRefExpr{
  2691  									pos:  position{line: 1295, col: 66, offset: 39164},
  2692  									name: "R_PAREN",
  2693  								},
  2694  							},
  2695  						},
  2696  					},
  2697  					&actionExpr{
  2698  						pos: position{line: 1308, col: 3, offset: 39533},
  2699  						run: (*parser).callonTextExpr72,
  2700  						expr: &seqExpr{
  2701  							pos: position{line: 1308, col: 4, offset: 39534},
  2702  							exprs: []any{
  2703  								&labeledExpr{
  2704  									pos:   position{line: 1308, col: 4, offset: 39534},
  2705  									label: "opName",
  2706  									expr: &choiceExpr{
  2707  										pos: position{line: 1308, col: 12, offset: 39542},
  2708  										alternatives: []any{
  2709  											&litMatcher{
  2710  												pos:        position{line: 1308, col: 12, offset: 39542},
  2711  												val:        "ltrim",
  2712  												ignoreCase: false,
  2713  												want:       "\"ltrim\"",
  2714  											},
  2715  											&litMatcher{
  2716  												pos:        position{line: 1308, col: 22, offset: 39552},
  2717  												val:        "rtrim",
  2718  												ignoreCase: false,
  2719  												want:       "\"rtrim\"",
  2720  											},
  2721  										},
  2722  									},
  2723  								},
  2724  								&ruleRefExpr{
  2725  									pos:  position{line: 1308, col: 31, offset: 39561},
  2726  									name: "L_PAREN",
  2727  								},
  2728  								&labeledExpr{
  2729  									pos:   position{line: 1308, col: 39, offset: 39569},
  2730  									label: "expr",
  2731  									expr: &ruleRefExpr{
  2732  										pos:  position{line: 1308, col: 45, offset: 39575},
  2733  										name: "StringExpr",
  2734  									},
  2735  								},
  2736  								&labeledExpr{
  2737  									pos:   position{line: 1308, col: 57, offset: 39587},
  2738  									label: "strToRemoveExpr",
  2739  									expr: &zeroOrOneExpr{
  2740  										pos: position{line: 1308, col: 73, offset: 39603},
  2741  										expr: &ruleRefExpr{
  2742  											pos:  position{line: 1308, col: 74, offset: 39604},
  2743  											name: "StrToRemoveExpr",
  2744  										},
  2745  									},
  2746  								},
  2747  								&ruleRefExpr{
  2748  									pos:  position{line: 1308, col: 92, offset: 39622},
  2749  									name: "R_PAREN",
  2750  								},
  2751  							},
  2752  						},
  2753  					},
  2754  				},
  2755  			},
  2756  		},
  2757  		{
  2758  			name: "StrToRemoveExpr",
  2759  			pos:  position{line: 1333, col: 1, offset: 40221},
  2760  			expr: &actionExpr{
  2761  				pos: position{line: 1333, col: 20, offset: 40240},
  2762  				run: (*parser).callonStrToRemoveExpr1,
  2763  				expr: &seqExpr{
  2764  					pos: position{line: 1333, col: 20, offset: 40240},
  2765  					exprs: []any{
  2766  						&ruleRefExpr{
  2767  							pos:  position{line: 1333, col: 20, offset: 40240},
  2768  							name: "COMMA",
  2769  						},
  2770  						&labeledExpr{
  2771  							pos:   position{line: 1333, col: 26, offset: 40246},
  2772  							label: "strToRemove",
  2773  							expr: &ruleRefExpr{
  2774  								pos:  position{line: 1333, col: 38, offset: 40258},
  2775  								name: "String",
  2776  							},
  2777  						},
  2778  					},
  2779  				},
  2780  			},
  2781  		},
  2782  		{
  2783  			name: "EvalFieldToRead",
  2784  			pos:  position{line: 1339, col: 1, offset: 40443},
  2785  			expr: &choiceExpr{
  2786  				pos: position{line: 1339, col: 20, offset: 40462},
  2787  				alternatives: []any{
  2788  					&actionExpr{
  2789  						pos: position{line: 1339, col: 20, offset: 40462},
  2790  						run: (*parser).callonEvalFieldToRead2,
  2791  						expr: &seqExpr{
  2792  							pos: position{line: 1339, col: 20, offset: 40462},
  2793  							exprs: []any{
  2794  								&oneOrMoreExpr{
  2795  									pos: position{line: 1339, col: 20, offset: 40462},
  2796  									expr: &charClassMatcher{
  2797  										pos:        position{line: 1339, col: 20, offset: 40462},
  2798  										val:        "[a-zA-Z_]",
  2799  										chars:      []rune{'_'},
  2800  										ranges:     []rune{'a', 'z', 'A', 'Z'},
  2801  										ignoreCase: false,
  2802  										inverted:   false,
  2803  									},
  2804  								},
  2805  								&notExpr{
  2806  									pos: position{line: 1339, col: 31, offset: 40473},
  2807  									expr: &litMatcher{
  2808  										pos:        position{line: 1339, col: 33, offset: 40475},
  2809  										val:        "(",
  2810  										ignoreCase: false,
  2811  										want:       "\"(\"",
  2812  									},
  2813  								},
  2814  							},
  2815  						},
  2816  					},
  2817  					&actionExpr{
  2818  						pos: position{line: 1342, col: 3, offset: 40517},
  2819  						run: (*parser).callonEvalFieldToRead8,
  2820  						expr: &seqExpr{
  2821  							pos: position{line: 1342, col: 3, offset: 40517},
  2822  							exprs: []any{
  2823  								&litMatcher{
  2824  									pos:        position{line: 1342, col: 3, offset: 40517},
  2825  									val:        "'",
  2826  									ignoreCase: false,
  2827  									want:       "\"'\"",
  2828  								},
  2829  								&labeledExpr{
  2830  									pos:   position{line: 1342, col: 7, offset: 40521},
  2831  									label: "field",
  2832  									expr: &ruleRefExpr{
  2833  										pos:  position{line: 1342, col: 13, offset: 40527},
  2834  										name: "FieldName",
  2835  									},
  2836  								},
  2837  								&litMatcher{
  2838  									pos:        position{line: 1342, col: 23, offset: 40537},
  2839  									val:        "'",
  2840  									ignoreCase: false,
  2841  									want:       "\"'\"",
  2842  								},
  2843  							},
  2844  						},
  2845  					},
  2846  				},
  2847  			},
  2848  		},
  2849  		{
  2850  			name: "WhereBlock",
  2851  			pos:  position{line: 1347, col: 1, offset: 40605},
  2852  			expr: &actionExpr{
  2853  				pos: position{line: 1347, col: 15, offset: 40619},
  2854  				run: (*parser).callonWhereBlock1,
  2855  				expr: &seqExpr{
  2856  					pos: position{line: 1347, col: 15, offset: 40619},
  2857  					exprs: []any{
  2858  						&ruleRefExpr{
  2859  							pos:  position{line: 1347, col: 15, offset: 40619},
  2860  							name: "PIPE",
  2861  						},
  2862  						&ruleRefExpr{
  2863  							pos:  position{line: 1347, col: 20, offset: 40624},
  2864  							name: "CMD_WHERE",
  2865  						},
  2866  						&labeledExpr{
  2867  							pos:   position{line: 1347, col: 30, offset: 40634},
  2868  							label: "condition",
  2869  							expr: &ruleRefExpr{
  2870  								pos:  position{line: 1347, col: 40, offset: 40644},
  2871  								name: "BoolExpr",
  2872  							},
  2873  						},
  2874  					},
  2875  				},
  2876  			},
  2877  		},
  2878  		{
  2879  			name: "BoolExpr",
  2880  			pos:  position{line: 1359, col: 1, offset: 40937},
  2881  			expr: &actionExpr{
  2882  				pos: position{line: 1359, col: 13, offset: 40949},
  2883  				run: (*parser).callonBoolExpr1,
  2884  				expr: &labeledExpr{
  2885  					pos:   position{line: 1359, col: 13, offset: 40949},
  2886  					label: "expr",
  2887  					expr: &ruleRefExpr{
  2888  						pos:  position{line: 1359, col: 18, offset: 40954},
  2889  						name: "BoolExprLevel4",
  2890  					},
  2891  				},
  2892  			},
  2893  		},
  2894  		{
  2895  			name: "BoolExprLevel4",
  2896  			pos:  position{line: 1364, col: 1, offset: 41024},
  2897  			expr: &actionExpr{
  2898  				pos: position{line: 1364, col: 19, offset: 41042},
  2899  				run: (*parser).callonBoolExprLevel41,
  2900  				expr: &seqExpr{
  2901  					pos: position{line: 1364, col: 19, offset: 41042},
  2902  					exprs: []any{
  2903  						&labeledExpr{
  2904  							pos:   position{line: 1364, col: 19, offset: 41042},
  2905  							label: "first",
  2906  							expr: &ruleRefExpr{
  2907  								pos:  position{line: 1364, col: 25, offset: 41048},
  2908  								name: "BoolExprLevel3",
  2909  							},
  2910  						},
  2911  						&labeledExpr{
  2912  							pos:   position{line: 1364, col: 40, offset: 41063},
  2913  							label: "rest",
  2914  							expr: &zeroOrMoreExpr{
  2915  								pos: position{line: 1364, col: 45, offset: 41068},
  2916  								expr: &seqExpr{
  2917  									pos: position{line: 1364, col: 46, offset: 41069},
  2918  									exprs: []any{
  2919  										&ruleRefExpr{
  2920  											pos:  position{line: 1364, col: 46, offset: 41069},
  2921  											name: "OR",
  2922  										},
  2923  										&ruleRefExpr{
  2924  											pos:  position{line: 1364, col: 49, offset: 41072},
  2925  											name: "BoolExprLevel3",
  2926  										},
  2927  									},
  2928  								},
  2929  							},
  2930  						},
  2931  					},
  2932  				},
  2933  			},
  2934  		},
  2935  		{
  2936  			name: "BoolExprLevel3",
  2937  			pos:  position{line: 1384, col: 1, offset: 41510},
  2938  			expr: &actionExpr{
  2939  				pos: position{line: 1384, col: 19, offset: 41528},
  2940  				run: (*parser).callonBoolExprLevel31,
  2941  				expr: &seqExpr{
  2942  					pos: position{line: 1384, col: 19, offset: 41528},
  2943  					exprs: []any{
  2944  						&labeledExpr{
  2945  							pos:   position{line: 1384, col: 19, offset: 41528},
  2946  							label: "first",
  2947  							expr: &ruleRefExpr{
  2948  								pos:  position{line: 1384, col: 25, offset: 41534},
  2949  								name: "BoolExprLevel2",
  2950  							},
  2951  						},
  2952  						&labeledExpr{
  2953  							pos:   position{line: 1384, col: 40, offset: 41549},
  2954  							label: "rest",
  2955  							expr: &zeroOrMoreExpr{
  2956  								pos: position{line: 1384, col: 45, offset: 41554},
  2957  								expr: &seqExpr{
  2958  									pos: position{line: 1384, col: 46, offset: 41555},
  2959  									exprs: []any{
  2960  										&ruleRefExpr{
  2961  											pos:  position{line: 1384, col: 46, offset: 41555},
  2962  											name: "AND",
  2963  										},
  2964  										&ruleRefExpr{
  2965  											pos:  position{line: 1384, col: 50, offset: 41559},
  2966  											name: "BoolExprLevel2",
  2967  										},
  2968  									},
  2969  								},
  2970  							},
  2971  						},
  2972  					},
  2973  				},
  2974  			},
  2975  		},
  2976  		{
  2977  			name: "BoolExprLevel2",
  2978  			pos:  position{line: 1404, col: 1, offset: 41998},
  2979  			expr: &choiceExpr{
  2980  				pos: position{line: 1404, col: 19, offset: 42016},
  2981  				alternatives: []any{
  2982  					&actionExpr{
  2983  						pos: position{line: 1404, col: 19, offset: 42016},
  2984  						run: (*parser).callonBoolExprLevel22,
  2985  						expr: &seqExpr{
  2986  							pos: position{line: 1404, col: 19, offset: 42016},
  2987  							exprs: []any{
  2988  								&ruleRefExpr{
  2989  									pos:  position{line: 1404, col: 19, offset: 42016},
  2990  									name: "NOT",
  2991  								},
  2992  								&ruleRefExpr{
  2993  									pos:  position{line: 1404, col: 23, offset: 42020},
  2994  									name: "L_PAREN",
  2995  								},
  2996  								&labeledExpr{
  2997  									pos:   position{line: 1404, col: 31, offset: 42028},
  2998  									label: "first",
  2999  									expr: &ruleRefExpr{
  3000  										pos:  position{line: 1404, col: 37, offset: 42034},
  3001  										name: "BoolExprLevel1",
  3002  									},
  3003  								},
  3004  								&ruleRefExpr{
  3005  									pos:  position{line: 1404, col: 52, offset: 42049},
  3006  									name: "R_PAREN",
  3007  								},
  3008  							},
  3009  						},
  3010  					},
  3011  					&actionExpr{
  3012  						pos: position{line: 1414, col: 3, offset: 42252},
  3013  						run: (*parser).callonBoolExprLevel29,
  3014  						expr: &labeledExpr{
  3015  							pos:   position{line: 1414, col: 3, offset: 42252},
  3016  							label: "first",
  3017  							expr: &ruleRefExpr{
  3018  								pos:  position{line: 1414, col: 9, offset: 42258},
  3019  								name: "BoolExprLevel1",
  3020  							},
  3021  						},
  3022  					},
  3023  				},
  3024  			},
  3025  		},
  3026  		{
  3027  			name: "BoolExprLevel1",
  3028  			pos:  position{line: 1419, col: 1, offset: 42329},
  3029  			expr: &choiceExpr{
  3030  				pos: position{line: 1419, col: 19, offset: 42347},
  3031  				alternatives: []any{
  3032  					&actionExpr{
  3033  						pos: position{line: 1419, col: 19, offset: 42347},
  3034  						run: (*parser).callonBoolExprLevel12,
  3035  						expr: &seqExpr{
  3036  							pos: position{line: 1419, col: 19, offset: 42347},
  3037  							exprs: []any{
  3038  								&ruleRefExpr{
  3039  									pos:  position{line: 1419, col: 19, offset: 42347},
  3040  									name: "L_PAREN",
  3041  								},
  3042  								&labeledExpr{
  3043  									pos:   position{line: 1419, col: 27, offset: 42355},
  3044  									label: "first",
  3045  									expr: &ruleRefExpr{
  3046  										pos:  position{line: 1419, col: 33, offset: 42361},
  3047  										name: "BoolExprLevel4",
  3048  									},
  3049  								},
  3050  								&ruleRefExpr{
  3051  									pos:  position{line: 1419, col: 48, offset: 42376},
  3052  									name: "R_PAREN",
  3053  								},
  3054  							},
  3055  						},
  3056  					},
  3057  					&actionExpr{
  3058  						pos: position{line: 1422, col: 3, offset: 42412},
  3059  						run: (*parser).callonBoolExprLevel18,
  3060  						expr: &seqExpr{
  3061  							pos: position{line: 1422, col: 4, offset: 42413},
  3062  							exprs: []any{
  3063  								&labeledExpr{
  3064  									pos:   position{line: 1422, col: 4, offset: 42413},
  3065  									label: "op",
  3066  									expr: &choiceExpr{
  3067  										pos: position{line: 1422, col: 8, offset: 42417},
  3068  										alternatives: []any{
  3069  											&litMatcher{
  3070  												pos:        position{line: 1422, col: 8, offset: 42417},
  3071  												val:        "isbool",
  3072  												ignoreCase: false,
  3073  												want:       "\"isbool\"",
  3074  											},
  3075  											&litMatcher{
  3076  												pos:        position{line: 1422, col: 19, offset: 42428},
  3077  												val:        "isint",
  3078  												ignoreCase: false,
  3079  												want:       "\"isint\"",
  3080  											},
  3081  											&litMatcher{
  3082  												pos:        position{line: 1422, col: 29, offset: 42438},
  3083  												val:        "isstr",
  3084  												ignoreCase: false,
  3085  												want:       "\"isstr\"",
  3086  											},
  3087  											&litMatcher{
  3088  												pos:        position{line: 1422, col: 39, offset: 42448},
  3089  												val:        "isnull",
  3090  												ignoreCase: false,
  3091  												want:       "\"isnull\"",
  3092  											},
  3093  										},
  3094  									},
  3095  								},
  3096  								&ruleRefExpr{
  3097  									pos:  position{line: 1422, col: 49, offset: 42458},
  3098  									name: "L_PAREN",
  3099  								},
  3100  								&labeledExpr{
  3101  									pos:   position{line: 1422, col: 57, offset: 42466},
  3102  									label: "value",
  3103  									expr: &ruleRefExpr{
  3104  										pos:  position{line: 1422, col: 63, offset: 42472},
  3105  										name: "ValueExpr",
  3106  									},
  3107  								},
  3108  								&ruleRefExpr{
  3109  									pos:  position{line: 1422, col: 73, offset: 42482},
  3110  									name: "R_PAREN",
  3111  								},
  3112  							},
  3113  						},
  3114  					},
  3115  					&actionExpr{
  3116  						pos: position{line: 1435, col: 3, offset: 42818},
  3117  						run: (*parser).callonBoolExprLevel120,
  3118  						expr: &labeledExpr{
  3119  							pos:   position{line: 1435, col: 3, offset: 42818},
  3120  							label: "likeExpr",
  3121  							expr: &ruleRefExpr{
  3122  								pos:  position{line: 1435, col: 13, offset: 42828},
  3123  								name: "LikeExpr",
  3124  							},
  3125  						},
  3126  					},
  3127  				},
  3128  			},
  3129  		},
  3130  		{
  3131  			name: "LikeExpr",
  3132  			pos:  position{line: 1438, col: 1, offset: 42866},
  3133  			expr: &choiceExpr{
  3134  				pos: position{line: 1438, col: 13, offset: 42878},
  3135  				alternatives: []any{
  3136  					&actionExpr{
  3137  						pos: position{line: 1438, col: 13, offset: 42878},
  3138  						run: (*parser).callonLikeExpr2,
  3139  						expr: &seqExpr{
  3140  							pos: position{line: 1438, col: 13, offset: 42878},
  3141  							exprs: []any{
  3142  								&labeledExpr{
  3143  									pos:   position{line: 1438, col: 13, offset: 42878},
  3144  									label: "left",
  3145  									expr: &ruleRefExpr{
  3146  										pos:  position{line: 1438, col: 18, offset: 42883},
  3147  										name: "ValueExpr",
  3148  									},
  3149  								},
  3150  								&ruleRefExpr{
  3151  									pos:  position{line: 1438, col: 28, offset: 42893},
  3152  									name: "SPACE",
  3153  								},
  3154  								&litMatcher{
  3155  									pos:        position{line: 1438, col: 34, offset: 42899},
  3156  									val:        "LIKE",
  3157  									ignoreCase: false,
  3158  									want:       "\"LIKE\"",
  3159  								},
  3160  								&ruleRefExpr{
  3161  									pos:  position{line: 1438, col: 41, offset: 42906},
  3162  									name: "SPACE",
  3163  								},
  3164  								&labeledExpr{
  3165  									pos:   position{line: 1438, col: 47, offset: 42912},
  3166  									label: "right",
  3167  									expr: &ruleRefExpr{
  3168  										pos:  position{line: 1438, col: 53, offset: 42918},
  3169  										name: "ValueExpr",
  3170  									},
  3171  								},
  3172  							},
  3173  						},
  3174  					},
  3175  					&actionExpr{
  3176  						pos: position{line: 1447, col: 3, offset: 43138},
  3177  						run: (*parser).callonLikeExpr11,
  3178  						expr: &seqExpr{
  3179  							pos: position{line: 1447, col: 3, offset: 43138},
  3180  							exprs: []any{
  3181  								&litMatcher{
  3182  									pos:        position{line: 1447, col: 3, offset: 43138},
  3183  									val:        "like",
  3184  									ignoreCase: false,
  3185  									want:       "\"like\"",
  3186  								},
  3187  								&ruleRefExpr{
  3188  									pos:  position{line: 1447, col: 10, offset: 43145},
  3189  									name: "L_PAREN",
  3190  								},
  3191  								&labeledExpr{
  3192  									pos:   position{line: 1447, col: 18, offset: 43153},
  3193  									label: "stringr",
  3194  									expr: &ruleRefExpr{
  3195  										pos:  position{line: 1447, col: 26, offset: 43161},
  3196  										name: "ValueExpr",
  3197  									},
  3198  								},
  3199  								&ruleRefExpr{
  3200  									pos:  position{line: 1447, col: 36, offset: 43171},
  3201  									name: "COMMA",
  3202  								},
  3203  								&labeledExpr{
  3204  									pos:   position{line: 1447, col: 42, offset: 43177},
  3205  									label: "pattern",
  3206  									expr: &ruleRefExpr{
  3207  										pos:  position{line: 1447, col: 50, offset: 43185},
  3208  										name: "ValueExpr",
  3209  									},
  3210  								},
  3211  								&ruleRefExpr{
  3212  									pos:  position{line: 1447, col: 60, offset: 43195},
  3213  									name: "R_PAREN",
  3214  								},
  3215  							},
  3216  						},
  3217  					},
  3218  					&actionExpr{
  3219  						pos: position{line: 1456, col: 3, offset: 43426},
  3220  						run: (*parser).callonLikeExpr21,
  3221  						expr: &seqExpr{
  3222  							pos: position{line: 1456, col: 3, offset: 43426},
  3223  							exprs: []any{
  3224  								&litMatcher{
  3225  									pos:        position{line: 1456, col: 3, offset: 43426},
  3226  									val:        "match",
  3227  									ignoreCase: false,
  3228  									want:       "\"match\"",
  3229  								},
  3230  								&ruleRefExpr{
  3231  									pos:  position{line: 1456, col: 11, offset: 43434},
  3232  									name: "L_PAREN",
  3233  								},
  3234  								&labeledExpr{
  3235  									pos:   position{line: 1456, col: 19, offset: 43442},
  3236  									label: "stringVal",
  3237  									expr: &ruleRefExpr{
  3238  										pos:  position{line: 1456, col: 29, offset: 43452},
  3239  										name: "ValueExpr",
  3240  									},
  3241  								},
  3242  								&ruleRefExpr{
  3243  									pos:  position{line: 1456, col: 39, offset: 43462},
  3244  									name: "COMMA",
  3245  								},
  3246  								&labeledExpr{
  3247  									pos:   position{line: 1456, col: 45, offset: 43468},
  3248  									label: "pattern",
  3249  									expr: &ruleRefExpr{
  3250  										pos:  position{line: 1456, col: 53, offset: 43476},
  3251  										name: "ValueExpr",
  3252  									},
  3253  								},
  3254  								&ruleRefExpr{
  3255  									pos:  position{line: 1456, col: 63, offset: 43486},
  3256  									name: "R_PAREN",
  3257  								},
  3258  							},
  3259  						},
  3260  					},
  3261  					&actionExpr{
  3262  						pos: position{line: 1465, col: 3, offset: 43720},
  3263  						run: (*parser).callonLikeExpr31,
  3264  						expr: &seqExpr{
  3265  							pos: position{line: 1465, col: 3, offset: 43720},
  3266  							exprs: []any{
  3267  								&litMatcher{
  3268  									pos:        position{line: 1465, col: 3, offset: 43720},
  3269  									val:        "cidrmatch",
  3270  									ignoreCase: false,
  3271  									want:       "\"cidrmatch\"",
  3272  								},
  3273  								&ruleRefExpr{
  3274  									pos:  position{line: 1465, col: 15, offset: 43732},
  3275  									name: "L_PAREN",
  3276  								},
  3277  								&labeledExpr{
  3278  									pos:   position{line: 1465, col: 23, offset: 43740},
  3279  									label: "cidr",
  3280  									expr: &ruleRefExpr{
  3281  										pos:  position{line: 1465, col: 28, offset: 43745},
  3282  										name: "ValueExpr",
  3283  									},
  3284  								},
  3285  								&ruleRefExpr{
  3286  									pos:  position{line: 1465, col: 38, offset: 43755},
  3287  									name: "COMMA",
  3288  								},
  3289  								&labeledExpr{
  3290  									pos:   position{line: 1465, col: 44, offset: 43761},
  3291  									label: "ip",
  3292  									expr: &ruleRefExpr{
  3293  										pos:  position{line: 1465, col: 47, offset: 43764},
  3294  										name: "ValueExpr",
  3295  									},
  3296  								},
  3297  								&ruleRefExpr{
  3298  									pos:  position{line: 1465, col: 57, offset: 43774},
  3299  									name: "R_PAREN",
  3300  								},
  3301  							},
  3302  						},
  3303  					},
  3304  					&actionExpr{
  3305  						pos: position{line: 1474, col: 3, offset: 43994},
  3306  						run: (*parser).callonLikeExpr41,
  3307  						expr: &labeledExpr{
  3308  							pos:   position{line: 1474, col: 3, offset: 43994},
  3309  							label: "inExpr",
  3310  							expr: &ruleRefExpr{
  3311  								pos:  position{line: 1474, col: 11, offset: 44002},
  3312  								name: "InExpr",
  3313  							},
  3314  						},
  3315  					},
  3316  					&actionExpr{
  3317  						pos: position{line: 1477, col: 3, offset: 44038},
  3318  						run: (*parser).callonLikeExpr44,
  3319  						expr: &labeledExpr{
  3320  							pos:   position{line: 1477, col: 3, offset: 44038},
  3321  							label: "boolComparisonExpr",
  3322  							expr: &ruleRefExpr{
  3323  								pos:  position{line: 1477, col: 22, offset: 44057},
  3324  								name: "BoolComparisonExpr",
  3325  							},
  3326  						},
  3327  					},
  3328  				},
  3329  			},
  3330  		},
  3331  		{
  3332  			name: "BoolComparisonExpr",
  3333  			pos:  position{line: 1481, col: 1, offset: 44116},
  3334  			expr: &actionExpr{
  3335  				pos: position{line: 1481, col: 23, offset: 44138},
  3336  				run: (*parser).callonBoolComparisonExpr1,
  3337  				expr: &seqExpr{
  3338  					pos: position{line: 1481, col: 23, offset: 44138},
  3339  					exprs: []any{
  3340  						&labeledExpr{
  3341  							pos:   position{line: 1481, col: 23, offset: 44138},
  3342  							label: "left",
  3343  							expr: &ruleRefExpr{
  3344  								pos:  position{line: 1481, col: 28, offset: 44143},
  3345  								name: "ValueExpr",
  3346  							},
  3347  						},
  3348  						&labeledExpr{
  3349  							pos:   position{line: 1481, col: 38, offset: 44153},
  3350  							label: "op",
  3351  							expr: &ruleRefExpr{
  3352  								pos:  position{line: 1481, col: 41, offset: 44156},
  3353  								name: "EqualityOrInequality",
  3354  							},
  3355  						},
  3356  						&labeledExpr{
  3357  							pos:   position{line: 1481, col: 62, offset: 44177},
  3358  							label: "right",
  3359  							expr: &ruleRefExpr{
  3360  								pos:  position{line: 1481, col: 68, offset: 44183},
  3361  								name: "ValueExpr",
  3362  							},
  3363  						},
  3364  					},
  3365  				},
  3366  			},
  3367  		},
  3368  		{
  3369  			name: "InExpr",
  3370  			pos:  position{line: 1493, col: 1, offset: 44409},
  3371  			expr: &choiceExpr{
  3372  				pos: position{line: 1493, col: 11, offset: 44419},
  3373  				alternatives: []any{
  3374  					&actionExpr{
  3375  						pos: position{line: 1493, col: 11, offset: 44419},
  3376  						run: (*parser).callonInExpr2,
  3377  						expr: &seqExpr{
  3378  							pos: position{line: 1493, col: 11, offset: 44419},
  3379  							exprs: []any{
  3380  								&labeledExpr{
  3381  									pos:   position{line: 1493, col: 11, offset: 44419},
  3382  									label: "left",
  3383  									expr: &ruleRefExpr{
  3384  										pos:  position{line: 1493, col: 16, offset: 44424},
  3385  										name: "ValueExpr",
  3386  									},
  3387  								},
  3388  								&ruleRefExpr{
  3389  									pos:  position{line: 1493, col: 26, offset: 44434},
  3390  									name: "SPACE",
  3391  								},
  3392  								&litMatcher{
  3393  									pos:        position{line: 1493, col: 32, offset: 44440},
  3394  									val:        "in",
  3395  									ignoreCase: false,
  3396  									want:       "\"in\"",
  3397  								},
  3398  								&ruleRefExpr{
  3399  									pos:  position{line: 1493, col: 37, offset: 44445},
  3400  									name: "L_PAREN",
  3401  								},
  3402  								&labeledExpr{
  3403  									pos:   position{line: 1493, col: 45, offset: 44453},
  3404  									label: "valueToJudge",
  3405  									expr: &ruleRefExpr{
  3406  										pos:  position{line: 1493, col: 58, offset: 44466},
  3407  										name: "ValueExpr",
  3408  									},
  3409  								},
  3410  								&labeledExpr{
  3411  									pos:   position{line: 1493, col: 68, offset: 44476},
  3412  									label: "rest",
  3413  									expr: &zeroOrMoreExpr{
  3414  										pos: position{line: 1493, col: 73, offset: 44481},
  3415  										expr: &seqExpr{
  3416  											pos: position{line: 1493, col: 74, offset: 44482},
  3417  											exprs: []any{
  3418  												&ruleRefExpr{
  3419  													pos:  position{line: 1493, col: 74, offset: 44482},
  3420  													name: "COMMA",
  3421  												},
  3422  												&ruleRefExpr{
  3423  													pos:  position{line: 1493, col: 80, offset: 44488},
  3424  													name: "ValueExpr",
  3425  												},
  3426  											},
  3427  										},
  3428  									},
  3429  								},
  3430  								&ruleRefExpr{
  3431  									pos:  position{line: 1493, col: 92, offset: 44500},
  3432  									name: "R_PAREN",
  3433  								},
  3434  							},
  3435  						},
  3436  					},
  3437  					&actionExpr{
  3438  						pos: position{line: 1512, col: 3, offset: 45051},
  3439  						run: (*parser).callonInExpr17,
  3440  						expr: &seqExpr{
  3441  							pos: position{line: 1512, col: 3, offset: 45051},
  3442  							exprs: []any{
  3443  								&litMatcher{
  3444  									pos:        position{line: 1512, col: 3, offset: 45051},
  3445  									val:        "in",
  3446  									ignoreCase: false,
  3447  									want:       "\"in\"",
  3448  								},
  3449  								&ruleRefExpr{
  3450  									pos:  position{line: 1512, col: 8, offset: 45056},
  3451  									name: "L_PAREN",
  3452  								},
  3453  								&labeledExpr{
  3454  									pos:   position{line: 1512, col: 16, offset: 45064},
  3455  									label: "valueToJudge",
  3456  									expr: &ruleRefExpr{
  3457  										pos:  position{line: 1512, col: 29, offset: 45077},
  3458  										name: "ValueExpr",
  3459  									},
  3460  								},
  3461  								&labeledExpr{
  3462  									pos:   position{line: 1512, col: 39, offset: 45087},
  3463  									label: "rest",
  3464  									expr: &zeroOrMoreExpr{
  3465  										pos: position{line: 1512, col: 44, offset: 45092},
  3466  										expr: &seqExpr{
  3467  											pos: position{line: 1512, col: 45, offset: 45093},
  3468  											exprs: []any{
  3469  												&ruleRefExpr{
  3470  													pos:  position{line: 1512, col: 45, offset: 45093},
  3471  													name: "COMMA",
  3472  												},
  3473  												&ruleRefExpr{
  3474  													pos:  position{line: 1512, col: 51, offset: 45099},
  3475  													name: "ValueExpr",
  3476  												},
  3477  											},
  3478  										},
  3479  									},
  3480  								},
  3481  								&ruleRefExpr{
  3482  									pos:  position{line: 1512, col: 63, offset: 45111},
  3483  									name: "R_PAREN",
  3484  								},
  3485  							},
  3486  						},
  3487  					},
  3488  				},
  3489  			},
  3490  		},
  3491  		{
  3492  			name: "ValueExpr",
  3493  			pos:  position{line: 1537, col: 1, offset: 45901},
  3494  			expr: &choiceExpr{
  3495  				pos: position{line: 1537, col: 14, offset: 45914},
  3496  				alternatives: []any{
  3497  					&actionExpr{
  3498  						pos: position{line: 1537, col: 14, offset: 45914},
  3499  						run: (*parser).callonValueExpr2,
  3500  						expr: &labeledExpr{
  3501  							pos:   position{line: 1537, col: 14, offset: 45914},
  3502  							label: "condition",
  3503  							expr: &ruleRefExpr{
  3504  								pos:  position{line: 1537, col: 24, offset: 45924},
  3505  								name: "ConditionExpr",
  3506  							},
  3507  						},
  3508  					},
  3509  					&actionExpr{
  3510  						pos: position{line: 1546, col: 3, offset: 46114},
  3511  						run: (*parser).callonValueExpr5,
  3512  						expr: &seqExpr{
  3513  							pos: position{line: 1546, col: 3, offset: 46114},
  3514  							exprs: []any{
  3515  								&ruleRefExpr{
  3516  									pos:  position{line: 1546, col: 3, offset: 46114},
  3517  									name: "L_PAREN",
  3518  								},
  3519  								&labeledExpr{
  3520  									pos:   position{line: 1546, col: 12, offset: 46123},
  3521  									label: "condition",
  3522  									expr: &ruleRefExpr{
  3523  										pos:  position{line: 1546, col: 22, offset: 46133},
  3524  										name: "ConditionExpr",
  3525  									},
  3526  								},
  3527  								&ruleRefExpr{
  3528  									pos:  position{line: 1546, col: 37, offset: 46148},
  3529  									name: "R_PAREN",
  3530  								},
  3531  							},
  3532  						},
  3533  					},
  3534  					&actionExpr{
  3535  						pos: position{line: 1555, col: 3, offset: 46332},
  3536  						run: (*parser).callonValueExpr11,
  3537  						expr: &labeledExpr{
  3538  							pos:   position{line: 1555, col: 3, offset: 46332},
  3539  							label: "numeric",
  3540  							expr: &ruleRefExpr{
  3541  								pos:  position{line: 1555, col: 11, offset: 46340},
  3542  								name: "NumericExpr",
  3543  							},
  3544  						},
  3545  					},
  3546  					&actionExpr{
  3547  						pos: position{line: 1564, col: 3, offset: 46520},
  3548  						run: (*parser).callonValueExpr14,
  3549  						expr: &labeledExpr{
  3550  							pos:   position{line: 1564, col: 3, offset: 46520},
  3551  							label: "str",
  3552  							expr: &ruleRefExpr{
  3553  								pos:  position{line: 1564, col: 7, offset: 46524},
  3554  								name: "StringExpr",
  3555  							},
  3556  						},
  3557  					},
  3558  					&actionExpr{
  3559  						pos: position{line: 1573, col: 3, offset: 46696},
  3560  						run: (*parser).callonValueExpr17,
  3561  						expr: &seqExpr{
  3562  							pos: position{line: 1573, col: 3, offset: 46696},
  3563  							exprs: []any{
  3564  								&ruleRefExpr{
  3565  									pos:  position{line: 1573, col: 3, offset: 46696},
  3566  									name: "L_PAREN",
  3567  								},
  3568  								&labeledExpr{
  3569  									pos:   position{line: 1573, col: 12, offset: 46705},
  3570  									label: "str",
  3571  									expr: &ruleRefExpr{
  3572  										pos:  position{line: 1573, col: 16, offset: 46709},
  3573  										name: "StringExpr",
  3574  									},
  3575  								},
  3576  								&ruleRefExpr{
  3577  									pos:  position{line: 1573, col: 28, offset: 46721},
  3578  									name: "R_PAREN",
  3579  								},
  3580  							},
  3581  						},
  3582  					},
  3583  					&actionExpr{
  3584  						pos: position{line: 1582, col: 3, offset: 46890},
  3585  						run: (*parser).callonValueExpr23,
  3586  						expr: &seqExpr{
  3587  							pos: position{line: 1582, col: 3, offset: 46890},
  3588  							exprs: []any{
  3589  								&ruleRefExpr{
  3590  									pos:  position{line: 1582, col: 3, offset: 46890},
  3591  									name: "L_PAREN",
  3592  								},
  3593  								&labeledExpr{
  3594  									pos:   position{line: 1582, col: 11, offset: 46898},
  3595  									label: "boolean",
  3596  									expr: &ruleRefExpr{
  3597  										pos:  position{line: 1582, col: 19, offset: 46906},
  3598  										name: "BoolExpr",
  3599  									},
  3600  								},
  3601  								&ruleRefExpr{
  3602  									pos:  position{line: 1582, col: 28, offset: 46915},
  3603  									name: "R_PAREN",
  3604  								},
  3605  							},
  3606  						},
  3607  					},
  3608  				},
  3609  			},
  3610  		},
  3611  		{
  3612  			name: "StringExpr",
  3613  			pos:  position{line: 1592, col: 1, offset: 47086},
  3614  			expr: &choiceExpr{
  3615  				pos: position{line: 1592, col: 15, offset: 47100},
  3616  				alternatives: []any{
  3617  					&actionExpr{
  3618  						pos: position{line: 1592, col: 15, offset: 47100},
  3619  						run: (*parser).callonStringExpr2,
  3620  						expr: &seqExpr{
  3621  							pos: position{line: 1592, col: 15, offset: 47100},
  3622  							exprs: []any{
  3623  								&labeledExpr{
  3624  									pos:   position{line: 1592, col: 15, offset: 47100},
  3625  									label: "text",
  3626  									expr: &ruleRefExpr{
  3627  										pos:  position{line: 1592, col: 20, offset: 47105},
  3628  										name: "TextExpr",
  3629  									},
  3630  								},
  3631  								&notExpr{
  3632  									pos: position{line: 1592, col: 29, offset: 47114},
  3633  									expr: &ruleRefExpr{
  3634  										pos:  position{line: 1592, col: 31, offset: 47116},
  3635  										name: "EVAL_CONCAT",
  3636  									},
  3637  								},
  3638  							},
  3639  						},
  3640  					},
  3641  					&actionExpr{
  3642  						pos: position{line: 1600, col: 3, offset: 47286},
  3643  						run: (*parser).callonStringExpr8,
  3644  						expr: &seqExpr{
  3645  							pos: position{line: 1600, col: 3, offset: 47286},
  3646  							exprs: []any{
  3647  								&labeledExpr{
  3648  									pos:   position{line: 1600, col: 3, offset: 47286},
  3649  									label: "str",
  3650  									expr: &ruleRefExpr{
  3651  										pos:  position{line: 1600, col: 7, offset: 47290},
  3652  										name: "QuotedString",
  3653  									},
  3654  								},
  3655  								&notExpr{
  3656  									pos: position{line: 1600, col: 20, offset: 47303},
  3657  									expr: &ruleRefExpr{
  3658  										pos:  position{line: 1600, col: 22, offset: 47305},
  3659  										name: "EVAL_CONCAT",
  3660  									},
  3661  								},
  3662  							},
  3663  						},
  3664  					},
  3665  					&actionExpr{
  3666  						pos: position{line: 1608, col: 3, offset: 47470},
  3667  						run: (*parser).callonStringExpr14,
  3668  						expr: &seqExpr{
  3669  							pos: position{line: 1608, col: 3, offset: 47470},
  3670  							exprs: []any{
  3671  								&labeledExpr{
  3672  									pos:   position{line: 1608, col: 3, offset: 47470},
  3673  									label: "field",
  3674  									expr: &ruleRefExpr{
  3675  										pos:  position{line: 1608, col: 9, offset: 47476},
  3676  										name: "EvalFieldToRead",
  3677  									},
  3678  								},
  3679  								&notExpr{
  3680  									pos: position{line: 1608, col: 25, offset: 47492},
  3681  									expr: &choiceExpr{
  3682  										pos: position{line: 1608, col: 27, offset: 47494},
  3683  										alternatives: []any{
  3684  											&ruleRefExpr{
  3685  												pos:  position{line: 1608, col: 27, offset: 47494},
  3686  												name: "OpPlus",
  3687  											},
  3688  											&ruleRefExpr{
  3689  												pos:  position{line: 1608, col: 36, offset: 47503},
  3690  												name: "OpMinus",
  3691  											},
  3692  											&ruleRefExpr{
  3693  												pos:  position{line: 1608, col: 46, offset: 47513},
  3694  												name: "OpMul",
  3695  											},
  3696  											&ruleRefExpr{
  3697  												pos:  position{line: 1608, col: 54, offset: 47521},
  3698  												name: "OpDiv",
  3699  											},
  3700  											&ruleRefExpr{
  3701  												pos:  position{line: 1608, col: 62, offset: 47529},
  3702  												name: "EVAL_CONCAT",
  3703  											},
  3704  											&litMatcher{
  3705  												pos:        position{line: 1608, col: 76, offset: 47543},
  3706  												val:        "(",
  3707  												ignoreCase: false,
  3708  												want:       "\"(\"",
  3709  											},
  3710  										},
  3711  									},
  3712  								},
  3713  							},
  3714  						},
  3715  					},
  3716  					&actionExpr{
  3717  						pos: position{line: 1616, col: 3, offset: 47693},
  3718  						run: (*parser).callonStringExpr26,
  3719  						expr: &labeledExpr{
  3720  							pos:   position{line: 1616, col: 3, offset: 47693},
  3721  							label: "concat",
  3722  							expr: &ruleRefExpr{
  3723  								pos:  position{line: 1616, col: 10, offset: 47700},
  3724  								name: "ConcatExpr",
  3725  							},
  3726  						},
  3727  					},
  3728  				},
  3729  			},
  3730  		},
  3731  		{
  3732  			name: "ConcatExpr",
  3733  			pos:  position{line: 1626, col: 1, offset: 47906},
  3734  			expr: &actionExpr{
  3735  				pos: position{line: 1626, col: 15, offset: 47920},
  3736  				run: (*parser).callonConcatExpr1,
  3737  				expr: &seqExpr{
  3738  					pos: position{line: 1626, col: 15, offset: 47920},
  3739  					exprs: []any{
  3740  						&labeledExpr{
  3741  							pos:   position{line: 1626, col: 15, offset: 47920},
  3742  							label: "first",
  3743  							expr: &ruleRefExpr{
  3744  								pos:  position{line: 1626, col: 21, offset: 47926},
  3745  								name: "ConcatAtom",
  3746  							},
  3747  						},
  3748  						&labeledExpr{
  3749  							pos:   position{line: 1626, col: 32, offset: 47937},
  3750  							label: "rest",
  3751  							expr: &zeroOrMoreExpr{
  3752  								pos: position{line: 1626, col: 37, offset: 47942},
  3753  								expr: &seqExpr{
  3754  									pos: position{line: 1626, col: 38, offset: 47943},
  3755  									exprs: []any{
  3756  										&ruleRefExpr{
  3757  											pos:  position{line: 1626, col: 38, offset: 47943},
  3758  											name: "EVAL_CONCAT",
  3759  										},
  3760  										&ruleRefExpr{
  3761  											pos:  position{line: 1626, col: 50, offset: 47955},
  3762  											name: "ConcatAtom",
  3763  										},
  3764  									},
  3765  								},
  3766  							},
  3767  						},
  3768  						&notExpr{
  3769  							pos: position{line: 1626, col: 63, offset: 47968},
  3770  							expr: &choiceExpr{
  3771  								pos: position{line: 1626, col: 65, offset: 47970},
  3772  								alternatives: []any{
  3773  									&ruleRefExpr{
  3774  										pos:  position{line: 1626, col: 65, offset: 47970},
  3775  										name: "OpPlus",
  3776  									},
  3777  									&ruleRefExpr{
  3778  										pos:  position{line: 1626, col: 74, offset: 47979},
  3779  										name: "OpMinus",
  3780  									},
  3781  									&ruleRefExpr{
  3782  										pos:  position{line: 1626, col: 84, offset: 47989},
  3783  										name: "OpMul",
  3784  									},
  3785  									&ruleRefExpr{
  3786  										pos:  position{line: 1626, col: 92, offset: 47997},
  3787  										name: "OpDiv",
  3788  									},
  3789  									&litMatcher{
  3790  										pos:        position{line: 1626, col: 100, offset: 48005},
  3791  										val:        "(",
  3792  										ignoreCase: false,
  3793  										want:       "\"(\"",
  3794  									},
  3795  								},
  3796  							},
  3797  						},
  3798  					},
  3799  				},
  3800  			},
  3801  		},
  3802  		{
  3803  			name: "ConcatAtom",
  3804  			pos:  position{line: 1644, col: 1, offset: 48411},
  3805  			expr: &choiceExpr{
  3806  				pos: position{line: 1644, col: 15, offset: 48425},
  3807  				alternatives: []any{
  3808  					&actionExpr{
  3809  						pos: position{line: 1644, col: 15, offset: 48425},
  3810  						run: (*parser).callonConcatAtom2,
  3811  						expr: &labeledExpr{
  3812  							pos:   position{line: 1644, col: 15, offset: 48425},
  3813  							label: "text",
  3814  							expr: &ruleRefExpr{
  3815  								pos:  position{line: 1644, col: 20, offset: 48430},
  3816  								name: "TextExpr",
  3817  							},
  3818  						},
  3819  					},
  3820  					&actionExpr{
  3821  						pos: position{line: 1653, col: 3, offset: 48594},
  3822  						run: (*parser).callonConcatAtom5,
  3823  						expr: &labeledExpr{
  3824  							pos:   position{line: 1653, col: 3, offset: 48594},
  3825  							label: "str",
  3826  							expr: &ruleRefExpr{
  3827  								pos:  position{line: 1653, col: 7, offset: 48598},
  3828  								name: "QuotedString",
  3829  							},
  3830  						},
  3831  					},
  3832  					&actionExpr{
  3833  						pos: position{line: 1661, col: 3, offset: 48737},
  3834  						run: (*parser).callonConcatAtom8,
  3835  						expr: &labeledExpr{
  3836  							pos:   position{line: 1661, col: 3, offset: 48737},
  3837  							label: "number",
  3838  							expr: &ruleRefExpr{
  3839  								pos:  position{line: 1661, col: 10, offset: 48744},
  3840  								name: "NumberAsString",
  3841  							},
  3842  						},
  3843  					},
  3844  					&actionExpr{
  3845  						pos: position{line: 1669, col: 3, offset: 48883},
  3846  						run: (*parser).callonConcatAtom11,
  3847  						expr: &labeledExpr{
  3848  							pos:   position{line: 1669, col: 3, offset: 48883},
  3849  							label: "field",
  3850  							expr: &ruleRefExpr{
  3851  								pos:  position{line: 1669, col: 9, offset: 48889},
  3852  								name: "EvalFieldToRead",
  3853  							},
  3854  						},
  3855  					},
  3856  				},
  3857  			},
  3858  		},
  3859  		{
  3860  			name: "NumericExpr",
  3861  			pos:  position{line: 1679, col: 1, offset: 49058},
  3862  			expr: &actionExpr{
  3863  				pos: position{line: 1679, col: 16, offset: 49073},
  3864  				run: (*parser).callonNumericExpr1,
  3865  				expr: &seqExpr{
  3866  					pos: position{line: 1679, col: 16, offset: 49073},
  3867  					exprs: []any{
  3868  						&labeledExpr{
  3869  							pos:   position{line: 1679, col: 16, offset: 49073},
  3870  							label: "expr",
  3871  							expr: &ruleRefExpr{
  3872  								pos:  position{line: 1679, col: 21, offset: 49078},
  3873  								name: "NumericExprLevel3",
  3874  							},
  3875  						},
  3876  						&notExpr{
  3877  							pos: position{line: 1679, col: 39, offset: 49096},
  3878  							expr: &choiceExpr{
  3879  								pos: position{line: 1679, col: 41, offset: 49098},
  3880  								alternatives: []any{
  3881  									&ruleRefExpr{
  3882  										pos:  position{line: 1679, col: 41, offset: 49098},
  3883  										name: "EVAL_CONCAT",
  3884  									},
  3885  									&litMatcher{
  3886  										pos:        position{line: 1679, col: 55, offset: 49112},
  3887  										val:        "\"",
  3888  										ignoreCase: false,
  3889  										want:       "\"\\\"\"",
  3890  									},
  3891  								},
  3892  							},
  3893  						},
  3894  					},
  3895  				},
  3896  			},
  3897  		},
  3898  		{
  3899  			name: "NumericExprLevel3",
  3900  			pos:  position{line: 1684, col: 1, offset: 49177},
  3901  			expr: &actionExpr{
  3902  				pos: position{line: 1684, col: 22, offset: 49198},
  3903  				run: (*parser).callonNumericExprLevel31,
  3904  				expr: &seqExpr{
  3905  					pos: position{line: 1684, col: 22, offset: 49198},
  3906  					exprs: []any{
  3907  						&labeledExpr{
  3908  							pos:   position{line: 1684, col: 22, offset: 49198},
  3909  							label: "first",
  3910  							expr: &ruleRefExpr{
  3911  								pos:  position{line: 1684, col: 28, offset: 49204},
  3912  								name: "NumericExprLevel2",
  3913  							},
  3914  						},
  3915  						&labeledExpr{
  3916  							pos:   position{line: 1684, col: 46, offset: 49222},
  3917  							label: "rest",
  3918  							expr: &zeroOrMoreExpr{
  3919  								pos: position{line: 1684, col: 51, offset: 49227},
  3920  								expr: &seqExpr{
  3921  									pos: position{line: 1684, col: 52, offset: 49228},
  3922  									exprs: []any{
  3923  										&choiceExpr{
  3924  											pos: position{line: 1684, col: 53, offset: 49229},
  3925  											alternatives: []any{
  3926  												&ruleRefExpr{
  3927  													pos:  position{line: 1684, col: 53, offset: 49229},
  3928  													name: "OpPlus",
  3929  												},
  3930  												&ruleRefExpr{
  3931  													pos:  position{line: 1684, col: 62, offset: 49238},
  3932  													name: "OpMinus",
  3933  												},
  3934  											},
  3935  										},
  3936  										&ruleRefExpr{
  3937  											pos:  position{line: 1684, col: 71, offset: 49247},
  3938  											name: "NumericExprLevel2",
  3939  										},
  3940  									},
  3941  								},
  3942  							},
  3943  						},
  3944  					},
  3945  				},
  3946  			},
  3947  		},
  3948  		{
  3949  			name: "NumericExprLevel2",
  3950  			pos:  position{line: 1705, col: 1, offset: 49748},
  3951  			expr: &actionExpr{
  3952  				pos: position{line: 1705, col: 22, offset: 49769},
  3953  				run: (*parser).callonNumericExprLevel21,
  3954  				expr: &seqExpr{
  3955  					pos: position{line: 1705, col: 22, offset: 49769},
  3956  					exprs: []any{
  3957  						&labeledExpr{
  3958  							pos:   position{line: 1705, col: 22, offset: 49769},
  3959  							label: "first",
  3960  							expr: &ruleRefExpr{
  3961  								pos:  position{line: 1705, col: 28, offset: 49775},
  3962  								name: "NumericExprLevel1",
  3963  							},
  3964  						},
  3965  						&labeledExpr{
  3966  							pos:   position{line: 1705, col: 46, offset: 49793},
  3967  							label: "rest",
  3968  							expr: &zeroOrMoreExpr{
  3969  								pos: position{line: 1705, col: 51, offset: 49798},
  3970  								expr: &seqExpr{
  3971  									pos: position{line: 1705, col: 52, offset: 49799},
  3972  									exprs: []any{
  3973  										&choiceExpr{
  3974  											pos: position{line: 1705, col: 53, offset: 49800},
  3975  											alternatives: []any{
  3976  												&ruleRefExpr{
  3977  													pos:  position{line: 1705, col: 53, offset: 49800},
  3978  													name: "OpMul",
  3979  												},
  3980  												&ruleRefExpr{
  3981  													pos:  position{line: 1705, col: 61, offset: 49808},
  3982  													name: "OpDiv",
  3983  												},
  3984  											},
  3985  										},
  3986  										&ruleRefExpr{
  3987  											pos:  position{line: 1705, col: 68, offset: 49815},
  3988  											name: "NumericExprLevel1",
  3989  										},
  3990  									},
  3991  								},
  3992  							},
  3993  						},
  3994  					},
  3995  				},
  3996  			},
  3997  		},
  3998  		{
  3999  			name: "RoundPrecisionExpr",
  4000  			pos:  position{line: 1725, col: 1, offset: 50284},
  4001  			expr: &actionExpr{
  4002  				pos: position{line: 1725, col: 23, offset: 50306},
  4003  				run: (*parser).callonRoundPrecisionExpr1,
  4004  				expr: &seqExpr{
  4005  					pos: position{line: 1725, col: 23, offset: 50306},
  4006  					exprs: []any{
  4007  						&ruleRefExpr{
  4008  							pos:  position{line: 1725, col: 23, offset: 50306},
  4009  							name: "COMMA",
  4010  						},
  4011  						&labeledExpr{
  4012  							pos:   position{line: 1725, col: 29, offset: 50312},
  4013  							label: "expr",
  4014  							expr: &ruleRefExpr{
  4015  								pos:  position{line: 1725, col: 34, offset: 50317},
  4016  								name: "NumericExprLevel3",
  4017  							},
  4018  						},
  4019  					},
  4020  				},
  4021  			},
  4022  		},
  4023  		{
  4024  			name: "NumericExprLevel1",
  4025  			pos:  position{line: 1735, col: 1, offset: 50561},
  4026  			expr: &choiceExpr{
  4027  				pos: position{line: 1735, col: 22, offset: 50582},
  4028  				alternatives: []any{
  4029  					&actionExpr{
  4030  						pos: position{line: 1735, col: 22, offset: 50582},
  4031  						run: (*parser).callonNumericExprLevel12,
  4032  						expr: &seqExpr{
  4033  							pos: position{line: 1735, col: 22, offset: 50582},
  4034  							exprs: []any{
  4035  								&ruleRefExpr{
  4036  									pos:  position{line: 1735, col: 22, offset: 50582},
  4037  									name: "L_PAREN",
  4038  								},
  4039  								&labeledExpr{
  4040  									pos:   position{line: 1735, col: 30, offset: 50590},
  4041  									label: "expr",
  4042  									expr: &ruleRefExpr{
  4043  										pos:  position{line: 1735, col: 35, offset: 50595},
  4044  										name: "NumericExprLevel3",
  4045  									},
  4046  								},
  4047  								&ruleRefExpr{
  4048  									pos:  position{line: 1735, col: 53, offset: 50613},
  4049  									name: "R_PAREN",
  4050  								},
  4051  							},
  4052  						},
  4053  					},
  4054  					&actionExpr{
  4055  						pos: position{line: 1738, col: 3, offset: 50648},
  4056  						run: (*parser).callonNumericExprLevel18,
  4057  						expr: &labeledExpr{
  4058  							pos:   position{line: 1738, col: 3, offset: 50648},
  4059  							label: "numericEvalExpr",
  4060  							expr: &ruleRefExpr{
  4061  								pos:  position{line: 1738, col: 20, offset: 50665},
  4062  								name: "NumericEvalExpr",
  4063  							},
  4064  						},
  4065  					},
  4066  					&actionExpr{
  4067  						pos: position{line: 1741, col: 3, offset: 50719},
  4068  						run: (*parser).callonNumericExprLevel111,
  4069  						expr: &labeledExpr{
  4070  							pos:   position{line: 1741, col: 3, offset: 50719},
  4071  							label: "field",
  4072  							expr: &ruleRefExpr{
  4073  								pos:  position{line: 1741, col: 9, offset: 50725},
  4074  								name: "EvalFieldToRead",
  4075  							},
  4076  						},
  4077  					},
  4078  					&actionExpr{
  4079  						pos: position{line: 1751, col: 3, offset: 50944},
  4080  						run: (*parser).callonNumericExprLevel114,
  4081  						expr: &labeledExpr{
  4082  							pos:   position{line: 1751, col: 3, offset: 50944},
  4083  							label: "number",
  4084  							expr: &ruleRefExpr{
  4085  								pos:  position{line: 1751, col: 10, offset: 50951},
  4086  								name: "NumberAsString",
  4087  							},
  4088  						},
  4089  					},
  4090  				},
  4091  			},
  4092  		},
  4093  		{
  4094  			name: "NumericEvalExpr",
  4095  			pos:  position{line: 1763, col: 1, offset: 51209},
  4096  			expr: &choiceExpr{
  4097  				pos: position{line: 1763, col: 20, offset: 51228},
  4098  				alternatives: []any{
  4099  					&actionExpr{
  4100  						pos: position{line: 1763, col: 20, offset: 51228},
  4101  						run: (*parser).callonNumericEvalExpr2,
  4102  						expr: &seqExpr{
  4103  							pos: position{line: 1763, col: 21, offset: 51229},
  4104  							exprs: []any{
  4105  								&labeledExpr{
  4106  									pos:   position{line: 1763, col: 21, offset: 51229},
  4107  									label: "opName",
  4108  									expr: &choiceExpr{
  4109  										pos: position{line: 1763, col: 29, offset: 51237},
  4110  										alternatives: []any{
  4111  											&litMatcher{
  4112  												pos:        position{line: 1763, col: 29, offset: 51237},
  4113  												val:        "abs",
  4114  												ignoreCase: false,
  4115  												want:       "\"abs\"",
  4116  											},
  4117  											&litMatcher{
  4118  												pos:        position{line: 1763, col: 37, offset: 51245},
  4119  												val:        "ceil",
  4120  												ignoreCase: false,
  4121  												want:       "\"ceil\"",
  4122  											},
  4123  											&litMatcher{
  4124  												pos:        position{line: 1763, col: 46, offset: 51254},
  4125  												val:        "sqrt",
  4126  												ignoreCase: false,
  4127  												want:       "\"sqrt\"",
  4128  											},
  4129  											&litMatcher{
  4130  												pos:        position{line: 1763, col: 54, offset: 51262},
  4131  												val:        "exact",
  4132  												ignoreCase: false,
  4133  												want:       "\"exact\"",
  4134  											},
  4135  											&litMatcher{
  4136  												pos:        position{line: 1763, col: 63, offset: 51271},
  4137  												val:        "exp",
  4138  												ignoreCase: false,
  4139  												want:       "\"exp\"",
  4140  											},
  4141  										},
  4142  									},
  4143  								},
  4144  								&ruleRefExpr{
  4145  									pos:  position{line: 1763, col: 70, offset: 51278},
  4146  									name: "L_PAREN",
  4147  								},
  4148  								&labeledExpr{
  4149  									pos:   position{line: 1763, col: 78, offset: 51286},
  4150  									label: "expr",
  4151  									expr: &ruleRefExpr{
  4152  										pos:  position{line: 1763, col: 84, offset: 51292},
  4153  										name: "NumericExprLevel3",
  4154  									},
  4155  								},
  4156  								&ruleRefExpr{
  4157  									pos:  position{line: 1763, col: 103, offset: 51311},
  4158  									name: "R_PAREN",
  4159  								},
  4160  							},
  4161  						},
  4162  					},
  4163  					&actionExpr{
  4164  						pos: position{line: 1783, col: 3, offset: 51823},
  4165  						run: (*parser).callonNumericEvalExpr15,
  4166  						expr: &seqExpr{
  4167  							pos: position{line: 1783, col: 3, offset: 51823},
  4168  							exprs: []any{
  4169  								&labeledExpr{
  4170  									pos:   position{line: 1783, col: 3, offset: 51823},
  4171  									label: "roundExpr",
  4172  									expr: &litMatcher{
  4173  										pos:        position{line: 1783, col: 13, offset: 51833},
  4174  										val:        "round",
  4175  										ignoreCase: false,
  4176  										want:       "\"round\"",
  4177  									},
  4178  								},
  4179  								&ruleRefExpr{
  4180  									pos:  position{line: 1783, col: 21, offset: 51841},
  4181  									name: "L_PAREN",
  4182  								},
  4183  								&labeledExpr{
  4184  									pos:   position{line: 1783, col: 29, offset: 51849},
  4185  									label: "expr",
  4186  									expr: &ruleRefExpr{
  4187  										pos:  position{line: 1783, col: 35, offset: 51855},
  4188  										name: "NumericExprLevel3",
  4189  									},
  4190  								},
  4191  								&labeledExpr{
  4192  									pos:   position{line: 1783, col: 54, offset: 51874},
  4193  									label: "roundPrecision",
  4194  									expr: &zeroOrOneExpr{
  4195  										pos: position{line: 1783, col: 69, offset: 51889},
  4196  										expr: &ruleRefExpr{
  4197  											pos:  position{line: 1783, col: 70, offset: 51890},
  4198  											name: "RoundPrecisionExpr",
  4199  										},
  4200  									},
  4201  								},
  4202  								&ruleRefExpr{
  4203  									pos:  position{line: 1783, col: 91, offset: 51911},
  4204  									name: "R_PAREN",
  4205  								},
  4206  							},
  4207  						},
  4208  					},
  4209  					&actionExpr{
  4210  						pos: position{line: 1804, col: 3, offset: 52529},
  4211  						run: (*parser).callonNumericEvalExpr26,
  4212  						expr: &seqExpr{
  4213  							pos: position{line: 1804, col: 3, offset: 52529},
  4214  							exprs: []any{
  4215  								&litMatcher{
  4216  									pos:        position{line: 1804, col: 3, offset: 52529},
  4217  									val:        "now",
  4218  									ignoreCase: false,
  4219  									want:       "\"now\"",
  4220  								},
  4221  								&litMatcher{
  4222  									pos:        position{line: 1804, col: 9, offset: 52535},
  4223  									val:        "()",
  4224  									ignoreCase: false,
  4225  									want:       "\"()\"",
  4226  								},
  4227  							},
  4228  						},
  4229  					},
  4230  					&actionExpr{
  4231  						pos: position{line: 1810, col: 3, offset: 52643},
  4232  						run: (*parser).callonNumericEvalExpr30,
  4233  						expr: &seqExpr{
  4234  							pos: position{line: 1810, col: 3, offset: 52643},
  4235  							exprs: []any{
  4236  								&litMatcher{
  4237  									pos:        position{line: 1810, col: 3, offset: 52643},
  4238  									val:        "tonumber",
  4239  									ignoreCase: false,
  4240  									want:       "\"tonumber\"",
  4241  								},
  4242  								&ruleRefExpr{
  4243  									pos:  position{line: 1810, col: 14, offset: 52654},
  4244  									name: "L_PAREN",
  4245  								},
  4246  								&labeledExpr{
  4247  									pos:   position{line: 1810, col: 22, offset: 52662},
  4248  									label: "stringExpr",
  4249  									expr: &ruleRefExpr{
  4250  										pos:  position{line: 1810, col: 33, offset: 52673},
  4251  										name: "StringExpr",
  4252  									},
  4253  								},
  4254  								&labeledExpr{
  4255  									pos:   position{line: 1810, col: 44, offset: 52684},
  4256  									label: "baseExpr",
  4257  									expr: &zeroOrOneExpr{
  4258  										pos: position{line: 1810, col: 53, offset: 52693},
  4259  										expr: &seqExpr{
  4260  											pos: position{line: 1810, col: 54, offset: 52694},
  4261  											exprs: []any{
  4262  												&ruleRefExpr{
  4263  													pos:  position{line: 1810, col: 54, offset: 52694},
  4264  													name: "COMMA",
  4265  												},
  4266  												&ruleRefExpr{
  4267  													pos:  position{line: 1810, col: 60, offset: 52700},
  4268  													name: "NumericExprLevel3",
  4269  												},
  4270  											},
  4271  										},
  4272  									},
  4273  								},
  4274  								&ruleRefExpr{
  4275  									pos:  position{line: 1810, col: 80, offset: 52720},
  4276  									name: "R_PAREN",
  4277  								},
  4278  							},
  4279  						},
  4280  					},
  4281  					&actionExpr{
  4282  						pos: position{line: 1838, col: 3, offset: 53562},
  4283  						run: (*parser).callonNumericEvalExpr42,
  4284  						expr: &seqExpr{
  4285  							pos: position{line: 1838, col: 3, offset: 53562},
  4286  							exprs: []any{
  4287  								&labeledExpr{
  4288  									pos:   position{line: 1838, col: 3, offset: 53562},
  4289  									label: "lenExpr",
  4290  									expr: &litMatcher{
  4291  										pos:        position{line: 1838, col: 12, offset: 53571},
  4292  										val:        "len",
  4293  										ignoreCase: false,
  4294  										want:       "\"len\"",
  4295  									},
  4296  								},
  4297  								&ruleRefExpr{
  4298  									pos:  position{line: 1838, col: 18, offset: 53577},
  4299  									name: "L_PAREN",
  4300  								},
  4301  								&labeledExpr{
  4302  									pos:   position{line: 1838, col: 26, offset: 53585},
  4303  									label: "expr",
  4304  									expr: &ruleRefExpr{
  4305  										pos:  position{line: 1838, col: 31, offset: 53590},
  4306  										name: "LenExpr",
  4307  									},
  4308  								},
  4309  								&ruleRefExpr{
  4310  									pos:  position{line: 1838, col: 39, offset: 53598},
  4311  									name: "R_PAREN",
  4312  								},
  4313  							},
  4314  						},
  4315  					},
  4316  				},
  4317  			},
  4318  		},
  4319  		{
  4320  			name: "LenExpr",
  4321  			pos:  position{line: 1842, col: 1, offset: 53632},
  4322  			expr: &choiceExpr{
  4323  				pos: position{line: 1842, col: 12, offset: 53643},
  4324  				alternatives: []any{
  4325  					&actionExpr{
  4326  						pos: position{line: 1842, col: 12, offset: 53643},
  4327  						run: (*parser).callonLenExpr2,
  4328  						expr: &seqExpr{
  4329  							pos: position{line: 1842, col: 12, offset: 53643},
  4330  							exprs: []any{
  4331  								&labeledExpr{
  4332  									pos:   position{line: 1842, col: 12, offset: 53643},
  4333  									label: "str",
  4334  									expr: &ruleRefExpr{
  4335  										pos:  position{line: 1842, col: 16, offset: 53647},
  4336  										name: "QuotedString",
  4337  									},
  4338  								},
  4339  								&notExpr{
  4340  									pos: position{line: 1842, col: 29, offset: 53660},
  4341  									expr: &ruleRefExpr{
  4342  										pos:  position{line: 1842, col: 31, offset: 53662},
  4343  										name: "EVAL_CONCAT",
  4344  									},
  4345  								},
  4346  							},
  4347  						},
  4348  					},
  4349  					&actionExpr{
  4350  						pos: position{line: 1858, col: 3, offset: 54023},
  4351  						run: (*parser).callonLenExpr8,
  4352  						expr: &seqExpr{
  4353  							pos: position{line: 1858, col: 3, offset: 54023},
  4354  							exprs: []any{
  4355  								&labeledExpr{
  4356  									pos:   position{line: 1858, col: 3, offset: 54023},
  4357  									label: "field",
  4358  									expr: &ruleRefExpr{
  4359  										pos:  position{line: 1858, col: 9, offset: 54029},
  4360  										name: "EvalFieldToRead",
  4361  									},
  4362  								},
  4363  								&notExpr{
  4364  									pos: position{line: 1858, col: 25, offset: 54045},
  4365  									expr: &choiceExpr{
  4366  										pos: position{line: 1858, col: 27, offset: 54047},
  4367  										alternatives: []any{
  4368  											&ruleRefExpr{
  4369  												pos:  position{line: 1858, col: 27, offset: 54047},
  4370  												name: "OpPlus",
  4371  											},
  4372  											&ruleRefExpr{
  4373  												pos:  position{line: 1858, col: 36, offset: 54056},
  4374  												name: "OpMinus",
  4375  											},
  4376  											&ruleRefExpr{
  4377  												pos:  position{line: 1858, col: 46, offset: 54066},
  4378  												name: "OpMul",
  4379  											},
  4380  											&ruleRefExpr{
  4381  												pos:  position{line: 1858, col: 54, offset: 54074},
  4382  												name: "OpDiv",
  4383  											},
  4384  											&ruleRefExpr{
  4385  												pos:  position{line: 1858, col: 62, offset: 54082},
  4386  												name: "EVAL_CONCAT",
  4387  											},
  4388  											&litMatcher{
  4389  												pos:        position{line: 1858, col: 76, offset: 54096},
  4390  												val:        "(",
  4391  												ignoreCase: false,
  4392  												want:       "\"(\"",
  4393  											},
  4394  										},
  4395  									},
  4396  								},
  4397  							},
  4398  						},
  4399  					},
  4400  				},
  4401  			},
  4402  		},
  4403  		{
  4404  			name: "HeadBlock",
  4405  			pos:  position{line: 1876, col: 1, offset: 54484},
  4406  			expr: &choiceExpr{
  4407  				pos: position{line: 1876, col: 14, offset: 54497},
  4408  				alternatives: []any{
  4409  					&actionExpr{
  4410  						pos: position{line: 1876, col: 14, offset: 54497},
  4411  						run: (*parser).callonHeadBlock2,
  4412  						expr: &seqExpr{
  4413  							pos: position{line: 1876, col: 14, offset: 54497},
  4414  							exprs: []any{
  4415  								&ruleRefExpr{
  4416  									pos:  position{line: 1876, col: 14, offset: 54497},
  4417  									name: "PIPE",
  4418  								},
  4419  								&ruleRefExpr{
  4420  									pos:  position{line: 1876, col: 19, offset: 54502},
  4421  									name: "CMD_HEAD",
  4422  								},
  4423  								&zeroOrOneExpr{
  4424  									pos: position{line: 1876, col: 28, offset: 54511},
  4425  									expr: &seqExpr{
  4426  										pos: position{line: 1876, col: 29, offset: 54512},
  4427  										exprs: []any{
  4428  											&litMatcher{
  4429  												pos:        position{line: 1876, col: 29, offset: 54512},
  4430  												val:        "limit",
  4431  												ignoreCase: false,
  4432  												want:       "\"limit\"",
  4433  											},
  4434  											&ruleRefExpr{
  4435  												pos:  position{line: 1876, col: 37, offset: 54520},
  4436  												name: "EQUAL",
  4437  											},
  4438  										},
  4439  									},
  4440  								},
  4441  								&labeledExpr{
  4442  									pos:   position{line: 1876, col: 45, offset: 54528},
  4443  									label: "intAsStr",
  4444  									expr: &ruleRefExpr{
  4445  										pos:  position{line: 1876, col: 54, offset: 54537},
  4446  										name: "IntegerAsString",
  4447  									},
  4448  								},
  4449  							},
  4450  						},
  4451  					},
  4452  					&actionExpr{
  4453  						pos: position{line: 1891, col: 3, offset: 54953},
  4454  						run: (*parser).callonHeadBlock12,
  4455  						expr: &seqExpr{
  4456  							pos: position{line: 1891, col: 3, offset: 54953},
  4457  							exprs: []any{
  4458  								&ruleRefExpr{
  4459  									pos:  position{line: 1891, col: 3, offset: 54953},
  4460  									name: "PIPE",
  4461  								},
  4462  								&ruleRefExpr{
  4463  									pos:  position{line: 1891, col: 8, offset: 54958},
  4464  									name: "CMD_HEAD_NO_SPACE",
  4465  								},
  4466  							},
  4467  						},
  4468  					},
  4469  				},
  4470  			},
  4471  		},
  4472  		{
  4473  			name: "AggregationList",
  4474  			pos:  position{line: 1904, col: 1, offset: 55408},
  4475  			expr: &actionExpr{
  4476  				pos: position{line: 1904, col: 20, offset: 55427},
  4477  				run: (*parser).callonAggregationList1,
  4478  				expr: &seqExpr{
  4479  					pos: position{line: 1904, col: 20, offset: 55427},
  4480  					exprs: []any{
  4481  						&labeledExpr{
  4482  							pos:   position{line: 1904, col: 20, offset: 55427},
  4483  							label: "first",
  4484  							expr: &ruleRefExpr{
  4485  								pos:  position{line: 1904, col: 26, offset: 55433},
  4486  								name: "Aggregator",
  4487  							},
  4488  						},
  4489  						&labeledExpr{
  4490  							pos:   position{line: 1904, col: 37, offset: 55444},
  4491  							label: "rest",
  4492  							expr: &zeroOrMoreExpr{
  4493  								pos: position{line: 1904, col: 42, offset: 55449},
  4494  								expr: &seqExpr{
  4495  									pos: position{line: 1904, col: 43, offset: 55450},
  4496  									exprs: []any{
  4497  										&choiceExpr{
  4498  											pos: position{line: 1904, col: 44, offset: 55451},
  4499  											alternatives: []any{
  4500  												&ruleRefExpr{
  4501  													pos:  position{line: 1904, col: 44, offset: 55451},
  4502  													name: "COMMA",
  4503  												},
  4504  												&ruleRefExpr{
  4505  													pos:  position{line: 1904, col: 52, offset: 55459},
  4506  													name: "SPACE",
  4507  												},
  4508  											},
  4509  										},
  4510  										&ruleRefExpr{
  4511  											pos:  position{line: 1904, col: 59, offset: 55466},
  4512  											name: "Aggregator",
  4513  										},
  4514  									},
  4515  								},
  4516  							},
  4517  						},
  4518  					},
  4519  				},
  4520  			},
  4521  		},
  4522  		{
  4523  			name: "Aggregator",
  4524  			pos:  position{line: 1921, col: 1, offset: 55969},
  4525  			expr: &actionExpr{
  4526  				pos: position{line: 1921, col: 15, offset: 55983},
  4527  				run: (*parser).callonAggregator1,
  4528  				expr: &seqExpr{
  4529  					pos: position{line: 1921, col: 15, offset: 55983},
  4530  					exprs: []any{
  4531  						&labeledExpr{
  4532  							pos:   position{line: 1921, col: 15, offset: 55983},
  4533  							label: "aggFunc",
  4534  							expr: &ruleRefExpr{
  4535  								pos:  position{line: 1921, col: 23, offset: 55991},
  4536  								name: "AggFunction",
  4537  							},
  4538  						},
  4539  						&labeledExpr{
  4540  							pos:   position{line: 1921, col: 35, offset: 56003},
  4541  							label: "asField",
  4542  							expr: &zeroOrOneExpr{
  4543  								pos: position{line: 1921, col: 43, offset: 56011},
  4544  								expr: &ruleRefExpr{
  4545  									pos:  position{line: 1921, col: 43, offset: 56011},
  4546  									name: "AsField",
  4547  								},
  4548  							},
  4549  						},
  4550  					},
  4551  				},
  4552  			},
  4553  		},
  4554  		{
  4555  			name: "AggFunction",
  4556  			pos:  position{line: 1937, col: 1, offset: 56852},
  4557  			expr: &actionExpr{
  4558  				pos: position{line: 1937, col: 16, offset: 56867},
  4559  				run: (*parser).callonAggFunction1,
  4560  				expr: &labeledExpr{
  4561  					pos:   position{line: 1937, col: 16, offset: 56867},
  4562  					label: "agg",
  4563  					expr: &choiceExpr{
  4564  						pos: position{line: 1937, col: 21, offset: 56872},
  4565  						alternatives: []any{
  4566  							&ruleRefExpr{
  4567  								pos:  position{line: 1937, col: 21, offset: 56872},
  4568  								name: "AggCount",
  4569  							},
  4570  							&ruleRefExpr{
  4571  								pos:  position{line: 1937, col: 32, offset: 56883},
  4572  								name: "AggDistinctCount",
  4573  							},
  4574  							&ruleRefExpr{
  4575  								pos:  position{line: 1937, col: 51, offset: 56902},
  4576  								name: "AggAvg",
  4577  							},
  4578  							&ruleRefExpr{
  4579  								pos:  position{line: 1937, col: 60, offset: 56911},
  4580  								name: "AggMin",
  4581  							},
  4582  							&ruleRefExpr{
  4583  								pos:  position{line: 1937, col: 69, offset: 56920},
  4584  								name: "AggMax",
  4585  							},
  4586  							&ruleRefExpr{
  4587  								pos:  position{line: 1937, col: 78, offset: 56929},
  4588  								name: "AggRange",
  4589  							},
  4590  							&ruleRefExpr{
  4591  								pos:  position{line: 1937, col: 89, offset: 56940},
  4592  								name: "AggSum",
  4593  							},
  4594  							&ruleRefExpr{
  4595  								pos:  position{line: 1937, col: 98, offset: 56949},
  4596  								name: "AggValues",
  4597  							},
  4598  						},
  4599  					},
  4600  				},
  4601  			},
  4602  		},
  4603  		{
  4604  			name: "AsField",
  4605  			pos:  position{line: 1941, col: 1, offset: 56985},
  4606  			expr: &actionExpr{
  4607  				pos: position{line: 1941, col: 12, offset: 56996},
  4608  				run: (*parser).callonAsField1,
  4609  				expr: &seqExpr{
  4610  					pos: position{line: 1941, col: 12, offset: 56996},
  4611  					exprs: []any{
  4612  						&ruleRefExpr{
  4613  							pos:  position{line: 1941, col: 12, offset: 56996},
  4614  							name: "AS",
  4615  						},
  4616  						&labeledExpr{
  4617  							pos:   position{line: 1941, col: 15, offset: 56999},
  4618  							label: "field",
  4619  							expr: &choiceExpr{
  4620  								pos: position{line: 1941, col: 23, offset: 57007},
  4621  								alternatives: []any{
  4622  									&ruleRefExpr{
  4623  										pos:  position{line: 1941, col: 23, offset: 57007},
  4624  										name: "FieldName",
  4625  									},
  4626  									&ruleRefExpr{
  4627  										pos:  position{line: 1941, col: 35, offset: 57019},
  4628  										name: "String",
  4629  									},
  4630  								},
  4631  							},
  4632  						},
  4633  					},
  4634  				},
  4635  			},
  4636  		},
  4637  		{
  4638  			name: "AggCount",
  4639  			pos:  position{line: 1955, col: 1, offset: 57348},
  4640  			expr: &choiceExpr{
  4641  				pos: position{line: 1955, col: 13, offset: 57360},
  4642  				alternatives: []any{
  4643  					&actionExpr{
  4644  						pos: position{line: 1955, col: 13, offset: 57360},
  4645  						run: (*parser).callonAggCount2,
  4646  						expr: &seqExpr{
  4647  							pos: position{line: 1955, col: 13, offset: 57360},
  4648  							exprs: []any{
  4649  								&choiceExpr{
  4650  									pos: position{line: 1955, col: 14, offset: 57361},
  4651  									alternatives: []any{
  4652  										&litMatcher{
  4653  											pos:        position{line: 1955, col: 14, offset: 57361},
  4654  											val:        "count",
  4655  											ignoreCase: false,
  4656  											want:       "\"count\"",
  4657  										},
  4658  										&litMatcher{
  4659  											pos:        position{line: 1955, col: 24, offset: 57371},
  4660  											val:        "c",
  4661  											ignoreCase: false,
  4662  											want:       "\"c\"",
  4663  										},
  4664  									},
  4665  								},
  4666  								&ruleRefExpr{
  4667  									pos:  position{line: 1955, col: 29, offset: 57376},
  4668  									name: "L_PAREN",
  4669  								},
  4670  								&litMatcher{
  4671  									pos:        position{line: 1955, col: 37, offset: 57384},
  4672  									val:        "eval",
  4673  									ignoreCase: false,
  4674  									want:       "\"eval\"",
  4675  								},
  4676  								&labeledExpr{
  4677  									pos:   position{line: 1955, col: 44, offset: 57391},
  4678  									label: "boolExpr",
  4679  									expr: &ruleRefExpr{
  4680  										pos:  position{line: 1955, col: 53, offset: 57400},
  4681  										name: "BoolExpr",
  4682  									},
  4683  								},
  4684  								&ruleRefExpr{
  4685  									pos:  position{line: 1955, col: 62, offset: 57409},
  4686  									name: "R_PAREN",
  4687  								},
  4688  							},
  4689  						},
  4690  					},
  4691  					&actionExpr{
  4692  						pos: position{line: 1970, col: 3, offset: 57759},
  4693  						run: (*parser).callonAggCount12,
  4694  						expr: &seqExpr{
  4695  							pos: position{line: 1970, col: 3, offset: 57759},
  4696  							exprs: []any{
  4697  								&choiceExpr{
  4698  									pos: position{line: 1970, col: 4, offset: 57760},
  4699  									alternatives: []any{
  4700  										&litMatcher{
  4701  											pos:        position{line: 1970, col: 4, offset: 57760},
  4702  											val:        "count",
  4703  											ignoreCase: false,
  4704  											want:       "\"count\"",
  4705  										},
  4706  										&litMatcher{
  4707  											pos:        position{line: 1970, col: 14, offset: 57770},
  4708  											val:        "c",
  4709  											ignoreCase: false,
  4710  											want:       "\"c\"",
  4711  										},
  4712  									},
  4713  								},
  4714  								&ruleRefExpr{
  4715  									pos:  position{line: 1970, col: 19, offset: 57775},
  4716  									name: "L_PAREN",
  4717  								},
  4718  								&labeledExpr{
  4719  									pos:   position{line: 1970, col: 27, offset: 57783},
  4720  									label: "field",
  4721  									expr: &ruleRefExpr{
  4722  										pos:  position{line: 1970, col: 33, offset: 57789},
  4723  										name: "FieldName",
  4724  									},
  4725  								},
  4726  								&ruleRefExpr{
  4727  									pos:  position{line: 1970, col: 43, offset: 57799},
  4728  									name: "R_PAREN",
  4729  								},
  4730  							},
  4731  						},
  4732  					},
  4733  					&actionExpr{
  4734  						pos: position{line: 1977, col: 5, offset: 57950},
  4735  						run: (*parser).callonAggCount21,
  4736  						expr: &choiceExpr{
  4737  							pos: position{line: 1977, col: 6, offset: 57951},
  4738  							alternatives: []any{
  4739  								&litMatcher{
  4740  									pos:        position{line: 1977, col: 6, offset: 57951},
  4741  									val:        "count",
  4742  									ignoreCase: false,
  4743  									want:       "\"count\"",
  4744  								},
  4745  								&litMatcher{
  4746  									pos:        position{line: 1977, col: 16, offset: 57961},
  4747  									val:        "c",
  4748  									ignoreCase: false,
  4749  									want:       "\"c\"",
  4750  								},
  4751  							},
  4752  						},
  4753  					},
  4754  				},
  4755  			},
  4756  		},
  4757  		{
  4758  			name: "AggDistinctCount",
  4759  			pos:  position{line: 1986, col: 1, offset: 58097},
  4760  			expr: &choiceExpr{
  4761  				pos: position{line: 1986, col: 21, offset: 58117},
  4762  				alternatives: []any{
  4763  					&actionExpr{
  4764  						pos: position{line: 1986, col: 21, offset: 58117},
  4765  						run: (*parser).callonAggDistinctCount2,
  4766  						expr: &seqExpr{
  4767  							pos: position{line: 1986, col: 21, offset: 58117},
  4768  							exprs: []any{
  4769  								&choiceExpr{
  4770  									pos: position{line: 1986, col: 22, offset: 58118},
  4771  									alternatives: []any{
  4772  										&litMatcher{
  4773  											pos:        position{line: 1986, col: 22, offset: 58118},
  4774  											val:        "distinct_count",
  4775  											ignoreCase: false,
  4776  											want:       "\"distinct_count\"",
  4777  										},
  4778  										&litMatcher{
  4779  											pos:        position{line: 1986, col: 41, offset: 58137},
  4780  											val:        "dc",
  4781  											ignoreCase: false,
  4782  											want:       "\"dc\"",
  4783  										},
  4784  									},
  4785  								},
  4786  								&ruleRefExpr{
  4787  									pos:  position{line: 1986, col: 47, offset: 58143},
  4788  									name: "L_PAREN",
  4789  								},
  4790  								&litMatcher{
  4791  									pos:        position{line: 1986, col: 55, offset: 58151},
  4792  									val:        "eval",
  4793  									ignoreCase: false,
  4794  									want:       "\"eval\"",
  4795  								},
  4796  								&labeledExpr{
  4797  									pos:   position{line: 1986, col: 62, offset: 58158},
  4798  									label: "valueExpr",
  4799  									expr: &ruleRefExpr{
  4800  										pos:  position{line: 1986, col: 72, offset: 58168},
  4801  										name: "ValueExpr",
  4802  									},
  4803  								},
  4804  								&ruleRefExpr{
  4805  									pos:  position{line: 1986, col: 82, offset: 58178},
  4806  									name: "R_PAREN",
  4807  								},
  4808  							},
  4809  						},
  4810  					},
  4811  					&actionExpr{
  4812  						pos: position{line: 1996, col: 3, offset: 58412},
  4813  						run: (*parser).callonAggDistinctCount12,
  4814  						expr: &seqExpr{
  4815  							pos: position{line: 1996, col: 3, offset: 58412},
  4816  							exprs: []any{
  4817  								&choiceExpr{
  4818  									pos: position{line: 1996, col: 4, offset: 58413},
  4819  									alternatives: []any{
  4820  										&litMatcher{
  4821  											pos:        position{line: 1996, col: 4, offset: 58413},
  4822  											val:        "distinct_count",
  4823  											ignoreCase: false,
  4824  											want:       "\"distinct_count\"",
  4825  										},
  4826  										&litMatcher{
  4827  											pos:        position{line: 1996, col: 23, offset: 58432},
  4828  											val:        "dc",
  4829  											ignoreCase: false,
  4830  											want:       "\"dc\"",
  4831  										},
  4832  									},
  4833  								},
  4834  								&ruleRefExpr{
  4835  									pos:  position{line: 1996, col: 29, offset: 58438},
  4836  									name: "L_PAREN",
  4837  								},
  4838  								&labeledExpr{
  4839  									pos:   position{line: 1996, col: 37, offset: 58446},
  4840  									label: "field",
  4841  									expr: &ruleRefExpr{
  4842  										pos:  position{line: 1996, col: 43, offset: 58452},
  4843  										name: "FieldName",
  4844  									},
  4845  								},
  4846  								&ruleRefExpr{
  4847  									pos:  position{line: 1996, col: 53, offset: 58462},
  4848  									name: "R_PAREN",
  4849  								},
  4850  							},
  4851  						},
  4852  					},
  4853  				},
  4854  			},
  4855  		},
  4856  		{
  4857  			name: "AggAvg",
  4858  			pos:  position{line: 2005, col: 1, offset: 58618},
  4859  			expr: &choiceExpr{
  4860  				pos: position{line: 2005, col: 11, offset: 58628},
  4861  				alternatives: []any{
  4862  					&actionExpr{
  4863  						pos: position{line: 2005, col: 11, offset: 58628},
  4864  						run: (*parser).callonAggAvg2,
  4865  						expr: &seqExpr{
  4866  							pos: position{line: 2005, col: 11, offset: 58628},
  4867  							exprs: []any{
  4868  								&litMatcher{
  4869  									pos:        position{line: 2005, col: 11, offset: 58628},
  4870  									val:        "avg",
  4871  									ignoreCase: false,
  4872  									want:       "\"avg\"",
  4873  								},
  4874  								&ruleRefExpr{
  4875  									pos:  position{line: 2005, col: 17, offset: 58634},
  4876  									name: "L_PAREN",
  4877  								},
  4878  								&litMatcher{
  4879  									pos:        position{line: 2005, col: 25, offset: 58642},
  4880  									val:        "eval",
  4881  									ignoreCase: false,
  4882  									want:       "\"eval\"",
  4883  								},
  4884  								&ruleRefExpr{
  4885  									pos:  position{line: 2005, col: 32, offset: 58649},
  4886  									name: "L_PAREN",
  4887  								},
  4888  								&labeledExpr{
  4889  									pos:   position{line: 2005, col: 40, offset: 58657},
  4890  									label: "boolComparisonExpr",
  4891  									expr: &ruleRefExpr{
  4892  										pos:  position{line: 2005, col: 59, offset: 58676},
  4893  										name: "BoolComparisonExpr",
  4894  									},
  4895  								},
  4896  								&ruleRefExpr{
  4897  									pos:  position{line: 2005, col: 78, offset: 58695},
  4898  									name: "R_PAREN",
  4899  								},
  4900  								&ruleRefExpr{
  4901  									pos:  position{line: 2005, col: 86, offset: 58703},
  4902  									name: "R_PAREN",
  4903  								},
  4904  							},
  4905  						},
  4906  					},
  4907  					&actionExpr{
  4908  						pos: position{line: 2020, col: 3, offset: 59061},
  4909  						run: (*parser).callonAggAvg12,
  4910  						expr: &seqExpr{
  4911  							pos: position{line: 2020, col: 3, offset: 59061},
  4912  							exprs: []any{
  4913  								&litMatcher{
  4914  									pos:        position{line: 2020, col: 3, offset: 59061},
  4915  									val:        "avg",
  4916  									ignoreCase: false,
  4917  									want:       "\"avg\"",
  4918  								},
  4919  								&ruleRefExpr{
  4920  									pos:  position{line: 2020, col: 9, offset: 59067},
  4921  									name: "L_PAREN",
  4922  								},
  4923  								&labeledExpr{
  4924  									pos:   position{line: 2020, col: 17, offset: 59075},
  4925  									label: "field",
  4926  									expr: &ruleRefExpr{
  4927  										pos:  position{line: 2020, col: 23, offset: 59081},
  4928  										name: "FieldName",
  4929  									},
  4930  								},
  4931  								&ruleRefExpr{
  4932  									pos:  position{line: 2020, col: 33, offset: 59091},
  4933  									name: "R_PAREN",
  4934  								},
  4935  							},
  4936  						},
  4937  					},
  4938  				},
  4939  			},
  4940  		},
  4941  		{
  4942  			name: "AggMin",
  4943  			pos:  position{line: 2029, col: 1, offset: 59239},
  4944  			expr: &choiceExpr{
  4945  				pos: position{line: 2029, col: 11, offset: 59249},
  4946  				alternatives: []any{
  4947  					&actionExpr{
  4948  						pos: position{line: 2029, col: 11, offset: 59249},
  4949  						run: (*parser).callonAggMin2,
  4950  						expr: &seqExpr{
  4951  							pos: position{line: 2029, col: 11, offset: 59249},
  4952  							exprs: []any{
  4953  								&litMatcher{
  4954  									pos:        position{line: 2029, col: 11, offset: 59249},
  4955  									val:        "min",
  4956  									ignoreCase: false,
  4957  									want:       "\"min\"",
  4958  								},
  4959  								&ruleRefExpr{
  4960  									pos:  position{line: 2029, col: 17, offset: 59255},
  4961  									name: "L_PAREN",
  4962  								},
  4963  								&litMatcher{
  4964  									pos:        position{line: 2029, col: 25, offset: 59263},
  4965  									val:        "eval",
  4966  									ignoreCase: false,
  4967  									want:       "\"eval\"",
  4968  								},
  4969  								&ruleRefExpr{
  4970  									pos:  position{line: 2029, col: 32, offset: 59270},
  4971  									name: "L_PAREN",
  4972  								},
  4973  								&labeledExpr{
  4974  									pos:   position{line: 2029, col: 40, offset: 59278},
  4975  									label: "boolComparisonExpr",
  4976  									expr: &ruleRefExpr{
  4977  										pos:  position{line: 2029, col: 59, offset: 59297},
  4978  										name: "BoolComparisonExpr",
  4979  									},
  4980  								},
  4981  								&ruleRefExpr{
  4982  									pos:  position{line: 2029, col: 78, offset: 59316},
  4983  									name: "R_PAREN",
  4984  								},
  4985  								&ruleRefExpr{
  4986  									pos:  position{line: 2029, col: 86, offset: 59324},
  4987  									name: "R_PAREN",
  4988  								},
  4989  							},
  4990  						},
  4991  					},
  4992  					&actionExpr{
  4993  						pos: position{line: 2044, col: 3, offset: 59682},
  4994  						run: (*parser).callonAggMin12,
  4995  						expr: &seqExpr{
  4996  							pos: position{line: 2044, col: 3, offset: 59682},
  4997  							exprs: []any{
  4998  								&litMatcher{
  4999  									pos:        position{line: 2044, col: 3, offset: 59682},
  5000  									val:        "min",
  5001  									ignoreCase: false,
  5002  									want:       "\"min\"",
  5003  								},
  5004  								&ruleRefExpr{
  5005  									pos:  position{line: 2044, col: 9, offset: 59688},
  5006  									name: "L_PAREN",
  5007  								},
  5008  								&labeledExpr{
  5009  									pos:   position{line: 2044, col: 17, offset: 59696},
  5010  									label: "field",
  5011  									expr: &ruleRefExpr{
  5012  										pos:  position{line: 2044, col: 23, offset: 59702},
  5013  										name: "FieldName",
  5014  									},
  5015  								},
  5016  								&ruleRefExpr{
  5017  									pos:  position{line: 2044, col: 33, offset: 59712},
  5018  									name: "R_PAREN",
  5019  								},
  5020  							},
  5021  						},
  5022  					},
  5023  				},
  5024  			},
  5025  		},
  5026  		{
  5027  			name: "AggMax",
  5028  			pos:  position{line: 2053, col: 1, offset: 59860},
  5029  			expr: &choiceExpr{
  5030  				pos: position{line: 2053, col: 11, offset: 59870},
  5031  				alternatives: []any{
  5032  					&actionExpr{
  5033  						pos: position{line: 2053, col: 11, offset: 59870},
  5034  						run: (*parser).callonAggMax2,
  5035  						expr: &seqExpr{
  5036  							pos: position{line: 2053, col: 11, offset: 59870},
  5037  							exprs: []any{
  5038  								&litMatcher{
  5039  									pos:        position{line: 2053, col: 11, offset: 59870},
  5040  									val:        "max",
  5041  									ignoreCase: false,
  5042  									want:       "\"max\"",
  5043  								},
  5044  								&ruleRefExpr{
  5045  									pos:  position{line: 2053, col: 17, offset: 59876},
  5046  									name: "L_PAREN",
  5047  								},
  5048  								&litMatcher{
  5049  									pos:        position{line: 2053, col: 25, offset: 59884},
  5050  									val:        "eval",
  5051  									ignoreCase: false,
  5052  									want:       "\"eval\"",
  5053  								},
  5054  								&ruleRefExpr{
  5055  									pos:  position{line: 2053, col: 32, offset: 59891},
  5056  									name: "L_PAREN",
  5057  								},
  5058  								&labeledExpr{
  5059  									pos:   position{line: 2053, col: 41, offset: 59900},
  5060  									label: "boolComparisonExpr",
  5061  									expr: &ruleRefExpr{
  5062  										pos:  position{line: 2053, col: 60, offset: 59919},
  5063  										name: "BoolComparisonExpr",
  5064  									},
  5065  								},
  5066  								&ruleRefExpr{
  5067  									pos:  position{line: 2053, col: 79, offset: 59938},
  5068  									name: "R_PAREN",
  5069  								},
  5070  								&ruleRefExpr{
  5071  									pos:  position{line: 2053, col: 87, offset: 59946},
  5072  									name: "R_PAREN",
  5073  								},
  5074  							},
  5075  						},
  5076  					},
  5077  					&actionExpr{
  5078  						pos: position{line: 2068, col: 3, offset: 60304},
  5079  						run: (*parser).callonAggMax12,
  5080  						expr: &seqExpr{
  5081  							pos: position{line: 2068, col: 3, offset: 60304},
  5082  							exprs: []any{
  5083  								&litMatcher{
  5084  									pos:        position{line: 2068, col: 3, offset: 60304},
  5085  									val:        "max",
  5086  									ignoreCase: false,
  5087  									want:       "\"max\"",
  5088  								},
  5089  								&ruleRefExpr{
  5090  									pos:  position{line: 2068, col: 9, offset: 60310},
  5091  									name: "L_PAREN",
  5092  								},
  5093  								&labeledExpr{
  5094  									pos:   position{line: 2068, col: 17, offset: 60318},
  5095  									label: "field",
  5096  									expr: &ruleRefExpr{
  5097  										pos:  position{line: 2068, col: 23, offset: 60324},
  5098  										name: "FieldName",
  5099  									},
  5100  								},
  5101  								&ruleRefExpr{
  5102  									pos:  position{line: 2068, col: 33, offset: 60334},
  5103  									name: "R_PAREN",
  5104  								},
  5105  							},
  5106  						},
  5107  					},
  5108  				},
  5109  			},
  5110  		},
  5111  		{
  5112  			name: "AggRange",
  5113  			pos:  position{line: 2077, col: 1, offset: 60482},
  5114  			expr: &choiceExpr{
  5115  				pos: position{line: 2077, col: 13, offset: 60494},
  5116  				alternatives: []any{
  5117  					&actionExpr{
  5118  						pos: position{line: 2077, col: 13, offset: 60494},
  5119  						run: (*parser).callonAggRange2,
  5120  						expr: &seqExpr{
  5121  							pos: position{line: 2077, col: 13, offset: 60494},
  5122  							exprs: []any{
  5123  								&litMatcher{
  5124  									pos:        position{line: 2077, col: 13, offset: 60494},
  5125  									val:        "range",
  5126  									ignoreCase: false,
  5127  									want:       "\"range\"",
  5128  								},
  5129  								&ruleRefExpr{
  5130  									pos:  position{line: 2077, col: 21, offset: 60502},
  5131  									name: "L_PAREN",
  5132  								},
  5133  								&litMatcher{
  5134  									pos:        position{line: 2077, col: 29, offset: 60510},
  5135  									val:        "eval",
  5136  									ignoreCase: false,
  5137  									want:       "\"eval\"",
  5138  								},
  5139  								&ruleRefExpr{
  5140  									pos:  position{line: 2077, col: 36, offset: 60517},
  5141  									name: "L_PAREN",
  5142  								},
  5143  								&labeledExpr{
  5144  									pos:   position{line: 2077, col: 44, offset: 60525},
  5145  									label: "boolComparisonExpr",
  5146  									expr: &ruleRefExpr{
  5147  										pos:  position{line: 2077, col: 63, offset: 60544},
  5148  										name: "BoolComparisonExpr",
  5149  									},
  5150  								},
  5151  								&ruleRefExpr{
  5152  									pos:  position{line: 2077, col: 82, offset: 60563},
  5153  									name: "R_PAREN",
  5154  								},
  5155  								&ruleRefExpr{
  5156  									pos:  position{line: 2077, col: 90, offset: 60571},
  5157  									name: "R_PAREN",
  5158  								},
  5159  							},
  5160  						},
  5161  					},
  5162  					&actionExpr{
  5163  						pos: position{line: 2092, col: 3, offset: 60931},
  5164  						run: (*parser).callonAggRange12,
  5165  						expr: &seqExpr{
  5166  							pos: position{line: 2092, col: 3, offset: 60931},
  5167  							exprs: []any{
  5168  								&litMatcher{
  5169  									pos:        position{line: 2092, col: 3, offset: 60931},
  5170  									val:        "range",
  5171  									ignoreCase: false,
  5172  									want:       "\"range\"",
  5173  								},
  5174  								&ruleRefExpr{
  5175  									pos:  position{line: 2092, col: 11, offset: 60939},
  5176  									name: "L_PAREN",
  5177  								},
  5178  								&labeledExpr{
  5179  									pos:   position{line: 2092, col: 19, offset: 60947},
  5180  									label: "field",
  5181  									expr: &ruleRefExpr{
  5182  										pos:  position{line: 2092, col: 25, offset: 60953},
  5183  										name: "FieldName",
  5184  									},
  5185  								},
  5186  								&ruleRefExpr{
  5187  									pos:  position{line: 2092, col: 35, offset: 60963},
  5188  									name: "R_PAREN",
  5189  								},
  5190  							},
  5191  						},
  5192  					},
  5193  				},
  5194  			},
  5195  		},
  5196  		{
  5197  			name: "AggSum",
  5198  			pos:  position{line: 2101, col: 1, offset: 61113},
  5199  			expr: &choiceExpr{
  5200  				pos: position{line: 2101, col: 11, offset: 61123},
  5201  				alternatives: []any{
  5202  					&actionExpr{
  5203  						pos: position{line: 2101, col: 11, offset: 61123},
  5204  						run: (*parser).callonAggSum2,
  5205  						expr: &seqExpr{
  5206  							pos: position{line: 2101, col: 11, offset: 61123},
  5207  							exprs: []any{
  5208  								&litMatcher{
  5209  									pos:        position{line: 2101, col: 11, offset: 61123},
  5210  									val:        "sum",
  5211  									ignoreCase: false,
  5212  									want:       "\"sum\"",
  5213  								},
  5214  								&ruleRefExpr{
  5215  									pos:  position{line: 2101, col: 17, offset: 61129},
  5216  									name: "L_PAREN",
  5217  								},
  5218  								&litMatcher{
  5219  									pos:        position{line: 2101, col: 25, offset: 61137},
  5220  									val:        "eval",
  5221  									ignoreCase: false,
  5222  									want:       "\"eval\"",
  5223  								},
  5224  								&ruleRefExpr{
  5225  									pos:  position{line: 2101, col: 32, offset: 61144},
  5226  									name: "L_PAREN",
  5227  								},
  5228  								&labeledExpr{
  5229  									pos:   position{line: 2101, col: 40, offset: 61152},
  5230  									label: "boolComparisonExpr",
  5231  									expr: &ruleRefExpr{
  5232  										pos:  position{line: 2101, col: 59, offset: 61171},
  5233  										name: "BoolComparisonExpr",
  5234  									},
  5235  								},
  5236  								&ruleRefExpr{
  5237  									pos:  position{line: 2101, col: 78, offset: 61190},
  5238  									name: "R_PAREN",
  5239  								},
  5240  								&ruleRefExpr{
  5241  									pos:  position{line: 2101, col: 86, offset: 61198},
  5242  									name: "R_PAREN",
  5243  								},
  5244  							},
  5245  						},
  5246  					},
  5247  					&actionExpr{
  5248  						pos: position{line: 2116, col: 3, offset: 61556},
  5249  						run: (*parser).callonAggSum12,
  5250  						expr: &seqExpr{
  5251  							pos: position{line: 2116, col: 3, offset: 61556},
  5252  							exprs: []any{
  5253  								&litMatcher{
  5254  									pos:        position{line: 2116, col: 3, offset: 61556},
  5255  									val:        "sum",
  5256  									ignoreCase: false,
  5257  									want:       "\"sum\"",
  5258  								},
  5259  								&ruleRefExpr{
  5260  									pos:  position{line: 2116, col: 9, offset: 61562},
  5261  									name: "L_PAREN",
  5262  								},
  5263  								&labeledExpr{
  5264  									pos:   position{line: 2116, col: 17, offset: 61570},
  5265  									label: "field",
  5266  									expr: &ruleRefExpr{
  5267  										pos:  position{line: 2116, col: 23, offset: 61576},
  5268  										name: "FieldName",
  5269  									},
  5270  								},
  5271  								&ruleRefExpr{
  5272  									pos:  position{line: 2116, col: 33, offset: 61586},
  5273  									name: "R_PAREN",
  5274  								},
  5275  							},
  5276  						},
  5277  					},
  5278  				},
  5279  			},
  5280  		},
  5281  		{
  5282  			name: "AggValues",
  5283  			pos:  position{line: 2125, col: 1, offset: 61734},
  5284  			expr: &choiceExpr{
  5285  				pos: position{line: 2125, col: 14, offset: 61747},
  5286  				alternatives: []any{
  5287  					&actionExpr{
  5288  						pos: position{line: 2125, col: 14, offset: 61747},
  5289  						run: (*parser).callonAggValues2,
  5290  						expr: &seqExpr{
  5291  							pos: position{line: 2125, col: 14, offset: 61747},
  5292  							exprs: []any{
  5293  								&litMatcher{
  5294  									pos:        position{line: 2125, col: 14, offset: 61747},
  5295  									val:        "values",
  5296  									ignoreCase: false,
  5297  									want:       "\"values\"",
  5298  								},
  5299  								&ruleRefExpr{
  5300  									pos:  position{line: 2125, col: 23, offset: 61756},
  5301  									name: "L_PAREN",
  5302  								},
  5303  								&litMatcher{
  5304  									pos:        position{line: 2125, col: 31, offset: 61764},
  5305  									val:        "eval",
  5306  									ignoreCase: false,
  5307  									want:       "\"eval\"",
  5308  								},
  5309  								&labeledExpr{
  5310  									pos:   position{line: 2125, col: 38, offset: 61771},
  5311  									label: "valueExpr",
  5312  									expr: &ruleRefExpr{
  5313  										pos:  position{line: 2125, col: 48, offset: 61781},
  5314  										name: "ValueExpr",
  5315  									},
  5316  								},
  5317  								&ruleRefExpr{
  5318  									pos:  position{line: 2125, col: 58, offset: 61791},
  5319  									name: "R_PAREN",
  5320  								},
  5321  							},
  5322  						},
  5323  					},
  5324  					&actionExpr{
  5325  						pos: position{line: 2135, col: 3, offset: 62020},
  5326  						run: (*parser).callonAggValues10,
  5327  						expr: &seqExpr{
  5328  							pos: position{line: 2135, col: 3, offset: 62020},
  5329  							exprs: []any{
  5330  								&litMatcher{
  5331  									pos:        position{line: 2135, col: 3, offset: 62020},
  5332  									val:        "values",
  5333  									ignoreCase: false,
  5334  									want:       "\"values\"",
  5335  								},
  5336  								&ruleRefExpr{
  5337  									pos:  position{line: 2135, col: 12, offset: 62029},
  5338  									name: "L_PAREN",
  5339  								},
  5340  								&labeledExpr{
  5341  									pos:   position{line: 2135, col: 20, offset: 62037},
  5342  									label: "field",
  5343  									expr: &ruleRefExpr{
  5344  										pos:  position{line: 2135, col: 26, offset: 62043},
  5345  										name: "FieldName",
  5346  									},
  5347  								},
  5348  								&ruleRefExpr{
  5349  									pos:  position{line: 2135, col: 36, offset: 62053},
  5350  									name: "R_PAREN",
  5351  								},
  5352  							},
  5353  						},
  5354  					},
  5355  				},
  5356  			},
  5357  		},
  5358  		{
  5359  			name: "FieldWithNumberValue",
  5360  			pos:  position{line: 2144, col: 1, offset: 62204},
  5361  			expr: &actionExpr{
  5362  				pos: position{line: 2144, col: 25, offset: 62228},
  5363  				run: (*parser).callonFieldWithNumberValue1,
  5364  				expr: &labeledExpr{
  5365  					pos:   position{line: 2144, col: 25, offset: 62228},
  5366  					label: "keyValuePair",
  5367  					expr: &choiceExpr{
  5368  						pos: position{line: 2144, col: 39, offset: 62242},
  5369  						alternatives: []any{
  5370  							&ruleRefExpr{
  5371  								pos:  position{line: 2144, col: 39, offset: 62242},
  5372  								name: "NamedFieldWithNumberValue",
  5373  							},
  5374  							&ruleRefExpr{
  5375  								pos:  position{line: 2144, col: 67, offset: 62270},
  5376  								name: "UnnamedFieldWithNumberValue",
  5377  							},
  5378  						},
  5379  					},
  5380  				},
  5381  			},
  5382  		},
  5383  		{
  5384  			name: "NamedFieldWithNumberValue",
  5385  			pos:  position{line: 2148, col: 1, offset: 62333},
  5386  			expr: &actionExpr{
  5387  				pos: position{line: 2148, col: 30, offset: 62362},
  5388  				run: (*parser).callonNamedFieldWithNumberValue1,
  5389  				expr: &seqExpr{
  5390  					pos: position{line: 2148, col: 30, offset: 62362},
  5391  					exprs: []any{
  5392  						&labeledExpr{
  5393  							pos:   position{line: 2148, col: 30, offset: 62362},
  5394  							label: "key",
  5395  							expr: &ruleRefExpr{
  5396  								pos:  position{line: 2148, col: 34, offset: 62366},
  5397  								name: "FieldName",
  5398  							},
  5399  						},
  5400  						&labeledExpr{
  5401  							pos:   position{line: 2148, col: 44, offset: 62376},
  5402  							label: "op",
  5403  							expr: &choiceExpr{
  5404  								pos: position{line: 2148, col: 48, offset: 62380},
  5405  								alternatives: []any{
  5406  									&ruleRefExpr{
  5407  										pos:  position{line: 2148, col: 48, offset: 62380},
  5408  										name: "EqualityOperator",
  5409  									},
  5410  									&ruleRefExpr{
  5411  										pos:  position{line: 2148, col: 67, offset: 62399},
  5412  										name: "InequalityOperator",
  5413  									},
  5414  								},
  5415  							},
  5416  						},
  5417  						&labeledExpr{
  5418  							pos:   position{line: 2148, col: 87, offset: 62419},
  5419  							label: "value",
  5420  							expr: &ruleRefExpr{
  5421  								pos:  position{line: 2148, col: 93, offset: 62425},
  5422  								name: "Number",
  5423  							},
  5424  						},
  5425  					},
  5426  				},
  5427  			},
  5428  		},
  5429  		{
  5430  			name: "UnnamedFieldWithNumberValue",
  5431  			pos:  position{line: 2161, col: 1, offset: 62659},
  5432  			expr: &actionExpr{
  5433  				pos: position{line: 2161, col: 32, offset: 62690},
  5434  				run: (*parser).callonUnnamedFieldWithNumberValue1,
  5435  				expr: &labeledExpr{
  5436  					pos:   position{line: 2161, col: 32, offset: 62690},
  5437  					label: "value",
  5438  					expr: &ruleRefExpr{
  5439  						pos:  position{line: 2161, col: 38, offset: 62696},
  5440  						name: "Number",
  5441  					},
  5442  				},
  5443  			},
  5444  		},
  5445  		{
  5446  			name: "FieldWithBooleanValue",
  5447  			pos:  position{line: 2174, col: 1, offset: 62913},
  5448  			expr: &actionExpr{
  5449  				pos: position{line: 2174, col: 26, offset: 62938},
  5450  				run: (*parser).callonFieldWithBooleanValue1,
  5451  				expr: &seqExpr{
  5452  					pos: position{line: 2174, col: 26, offset: 62938},
  5453  					exprs: []any{
  5454  						&labeledExpr{
  5455  							pos:   position{line: 2174, col: 26, offset: 62938},
  5456  							label: "key",
  5457  							expr: &ruleRefExpr{
  5458  								pos:  position{line: 2174, col: 30, offset: 62942},
  5459  								name: "FieldName",
  5460  							},
  5461  						},
  5462  						&labeledExpr{
  5463  							pos:   position{line: 2174, col: 40, offset: 62952},
  5464  							label: "op",
  5465  							expr: &ruleRefExpr{
  5466  								pos:  position{line: 2174, col: 43, offset: 62955},
  5467  								name: "EqualityOperator",
  5468  							},
  5469  						},
  5470  						&labeledExpr{
  5471  							pos:   position{line: 2174, col: 60, offset: 62972},
  5472  							label: "value",
  5473  							expr: &ruleRefExpr{
  5474  								pos:  position{line: 2174, col: 66, offset: 62978},
  5475  								name: "Boolean",
  5476  							},
  5477  						},
  5478  					},
  5479  				},
  5480  			},
  5481  		},
  5482  		{
  5483  			name: "FieldWithStringValue",
  5484  			pos:  position{line: 2187, col: 1, offset: 63213},
  5485  			expr: &actionExpr{
  5486  				pos: position{line: 2187, col: 25, offset: 63237},
  5487  				run: (*parser).callonFieldWithStringValue1,
  5488  				expr: &labeledExpr{
  5489  					pos:   position{line: 2187, col: 25, offset: 63237},
  5490  					label: "keyValuePair",
  5491  					expr: &choiceExpr{
  5492  						pos: position{line: 2187, col: 39, offset: 63251},
  5493  						alternatives: []any{
  5494  							&ruleRefExpr{
  5495  								pos:  position{line: 2187, col: 39, offset: 63251},
  5496  								name: "NamedFieldWithStringValue",
  5497  							},
  5498  							&ruleRefExpr{
  5499  								pos:  position{line: 2187, col: 67, offset: 63279},
  5500  								name: "UnnamedFieldWithStringValue",
  5501  							},
  5502  						},
  5503  					},
  5504  				},
  5505  			},
  5506  		},
  5507  		{
  5508  			name: "NamedFieldWithStringValue",
  5509  			pos:  position{line: 2191, col: 1, offset: 63342},
  5510  			expr: &actionExpr{
  5511  				pos: position{line: 2191, col: 30, offset: 63371},
  5512  				run: (*parser).callonNamedFieldWithStringValue1,
  5513  				expr: &seqExpr{
  5514  					pos: position{line: 2191, col: 30, offset: 63371},
  5515  					exprs: []any{
  5516  						&labeledExpr{
  5517  							pos:   position{line: 2191, col: 30, offset: 63371},
  5518  							label: "key",
  5519  							expr: &ruleRefExpr{
  5520  								pos:  position{line: 2191, col: 34, offset: 63375},
  5521  								name: "FieldName",
  5522  							},
  5523  						},
  5524  						&labeledExpr{
  5525  							pos:   position{line: 2191, col: 44, offset: 63385},
  5526  							label: "op",
  5527  							expr: &ruleRefExpr{
  5528  								pos:  position{line: 2191, col: 47, offset: 63388},
  5529  								name: "EqualityOperator",
  5530  							},
  5531  						},
  5532  						&labeledExpr{
  5533  							pos:   position{line: 2191, col: 64, offset: 63405},
  5534  							label: "value",
  5535  							expr: &ruleRefExpr{
  5536  								pos:  position{line: 2191, col: 70, offset: 63411},
  5537  								name: "String",
  5538  							},
  5539  						},
  5540  					},
  5541  				},
  5542  			},
  5543  		},
  5544  		{
  5545  			name: "UnnamedFieldWithStringValue",
  5546  			pos:  position{line: 2203, col: 1, offset: 63644},
  5547  			expr: &actionExpr{
  5548  				pos: position{line: 2203, col: 32, offset: 63675},
  5549  				run: (*parser).callonUnnamedFieldWithStringValue1,
  5550  				expr: &labeledExpr{
  5551  					pos:   position{line: 2203, col: 32, offset: 63675},
  5552  					label: "value",
  5553  					expr: &ruleRefExpr{
  5554  						pos:  position{line: 2203, col: 38, offset: 63681},
  5555  						name: "String",
  5556  					},
  5557  				},
  5558  			},
  5559  		},
  5560  		{
  5561  			name: "FieldNameList",
  5562  			pos:  position{line: 2217, col: 1, offset: 64012},
  5563  			expr: &actionExpr{
  5564  				pos: position{line: 2217, col: 18, offset: 64029},
  5565  				run: (*parser).callonFieldNameList1,
  5566  				expr: &seqExpr{
  5567  					pos: position{line: 2217, col: 18, offset: 64029},
  5568  					exprs: []any{
  5569  						&labeledExpr{
  5570  							pos:   position{line: 2217, col: 18, offset: 64029},
  5571  							label: "first",
  5572  							expr: &ruleRefExpr{
  5573  								pos:  position{line: 2217, col: 24, offset: 64035},
  5574  								name: "FieldName",
  5575  							},
  5576  						},
  5577  						&labeledExpr{
  5578  							pos:   position{line: 2217, col: 34, offset: 64045},
  5579  							label: "rest",
  5580  							expr: &zeroOrMoreExpr{
  5581  								pos: position{line: 2217, col: 39, offset: 64050},
  5582  								expr: &seqExpr{
  5583  									pos: position{line: 2217, col: 40, offset: 64051},
  5584  									exprs: []any{
  5585  										&ruleRefExpr{
  5586  											pos:  position{line: 2217, col: 40, offset: 64051},
  5587  											name: "COMMA",
  5588  										},
  5589  										&ruleRefExpr{
  5590  											pos:  position{line: 2217, col: 46, offset: 64057},
  5591  											name: "FieldName",
  5592  										},
  5593  									},
  5594  								},
  5595  							},
  5596  						},
  5597  					},
  5598  				},
  5599  			},
  5600  		},
  5601  		{
  5602  			name: "FieldName",
  5603  			pos:  position{line: 2237, col: 1, offset: 64820},
  5604  			expr: &actionExpr{
  5605  				pos: position{line: 2237, col: 14, offset: 64833},
  5606  				run: (*parser).callonFieldName1,
  5607  				expr: &seqExpr{
  5608  					pos: position{line: 2237, col: 14, offset: 64833},
  5609  					exprs: []any{
  5610  						&charClassMatcher{
  5611  							pos:        position{line: 2237, col: 14, offset: 64833},
  5612  							val:        "[a-zA-Z0-9:*]",
  5613  							chars:      []rune{':', '*'},
  5614  							ranges:     []rune{'a', 'z', 'A', 'Z', '0', '9'},
  5615  							ignoreCase: false,
  5616  							inverted:   false,
  5617  						},
  5618  						&zeroOrMoreExpr{
  5619  							pos: position{line: 2237, col: 27, offset: 64846},
  5620  							expr: &charClassMatcher{
  5621  								pos:        position{line: 2237, col: 27, offset: 64846},
  5622  								val:        "[a-zA-Z0-9:_.*]",
  5623  								chars:      []rune{':', '_', '.', '*'},
  5624  								ranges:     []rune{'a', 'z', 'A', 'Z', '0', '9'},
  5625  								ignoreCase: false,
  5626  								inverted:   false,
  5627  							},
  5628  						},
  5629  					},
  5630  				},
  5631  			},
  5632  		},
  5633  		{
  5634  			name: "String",
  5635  			pos:  position{line: 2241, col: 1, offset: 64899},
  5636  			expr: &actionExpr{
  5637  				pos: position{line: 2241, col: 11, offset: 64909},
  5638  				run: (*parser).callonString1,
  5639  				expr: &labeledExpr{
  5640  					pos:   position{line: 2241, col: 11, offset: 64909},
  5641  					label: "str",
  5642  					expr: &choiceExpr{
  5643  						pos: position{line: 2241, col: 16, offset: 64914},
  5644  						alternatives: []any{
  5645  							&ruleRefExpr{
  5646  								pos:  position{line: 2241, col: 16, offset: 64914},
  5647  								name: "QuotedString",
  5648  							},
  5649  							&ruleRefExpr{
  5650  								pos:  position{line: 2241, col: 31, offset: 64929},
  5651  								name: "UnquotedString",
  5652  							},
  5653  						},
  5654  					},
  5655  				},
  5656  			},
  5657  		},
  5658  		{
  5659  			name: "QuotedString",
  5660  			pos:  position{line: 2245, col: 1, offset: 64970},
  5661  			expr: &actionExpr{
  5662  				pos: position{line: 2245, col: 17, offset: 64986},
  5663  				run: (*parser).callonQuotedString1,
  5664  				expr: &seqExpr{
  5665  					pos: position{line: 2245, col: 17, offset: 64986},
  5666  					exprs: []any{
  5667  						&litMatcher{
  5668  							pos:        position{line: 2245, col: 17, offset: 64986},
  5669  							val:        "\"",
  5670  							ignoreCase: false,
  5671  							want:       "\"\\\"\"",
  5672  						},
  5673  						&zeroOrMoreExpr{
  5674  							pos: position{line: 2245, col: 21, offset: 64990},
  5675  							expr: &charClassMatcher{
  5676  								pos:        position{line: 2245, col: 21, offset: 64990},
  5677  								val:        "[^\"]",
  5678  								chars:      []rune{'"'},
  5679  								ignoreCase: false,
  5680  								inverted:   true,
  5681  							},
  5682  						},
  5683  						&litMatcher{
  5684  							pos:        position{line: 2245, col: 27, offset: 64996},
  5685  							val:        "\"",
  5686  							ignoreCase: false,
  5687  							want:       "\"\\\"\"",
  5688  						},
  5689  					},
  5690  				},
  5691  			},
  5692  		},
  5693  		{
  5694  			name: "Boolean",
  5695  			pos:  position{line: 2250, col: 1, offset: 65107},
  5696  			expr: &actionExpr{
  5697  				pos: position{line: 2250, col: 12, offset: 65118},
  5698  				run: (*parser).callonBoolean1,
  5699  				expr: &choiceExpr{
  5700  					pos: position{line: 2250, col: 13, offset: 65119},
  5701  					alternatives: []any{
  5702  						&litMatcher{
  5703  							pos:        position{line: 2250, col: 13, offset: 65119},
  5704  							val:        "true",
  5705  							ignoreCase: false,
  5706  							want:       "\"true\"",
  5707  						},
  5708  						&litMatcher{
  5709  							pos:        position{line: 2250, col: 22, offset: 65128},
  5710  							val:        "false",
  5711  							ignoreCase: false,
  5712  							want:       "\"false\"",
  5713  						},
  5714  					},
  5715  				},
  5716  			},
  5717  		},
  5718  		{
  5719  			name: "UnquotedString",
  5720  			pos:  position{line: 2255, col: 1, offset: 65222},
  5721  			expr: &actionExpr{
  5722  				pos: position{line: 2255, col: 19, offset: 65240},
  5723  				run: (*parser).callonUnquotedString1,
  5724  				expr: &oneOrMoreExpr{
  5725  					pos: position{line: 2255, col: 19, offset: 65240},
  5726  					expr: &choiceExpr{
  5727  						pos: position{line: 2255, col: 20, offset: 65241},
  5728  						alternatives: []any{
  5729  							&litMatcher{
  5730  								pos:        position{line: 2255, col: 20, offset: 65241},
  5731  								val:        "*",
  5732  								ignoreCase: false,
  5733  								want:       "\"*\"",
  5734  							},
  5735  							&seqExpr{
  5736  								pos: position{line: 2255, col: 27, offset: 65248},
  5737  								exprs: []any{
  5738  									&notExpr{
  5739  										pos: position{line: 2255, col: 27, offset: 65248},
  5740  										expr: &choiceExpr{
  5741  											pos: position{line: 2255, col: 29, offset: 65250},
  5742  											alternatives: []any{
  5743  												&ruleRefExpr{
  5744  													pos:  position{line: 2255, col: 29, offset: 65250},
  5745  													name: "MAJOR_BREAK",
  5746  												},
  5747  												&litMatcher{
  5748  													pos:        position{line: 2255, col: 43, offset: 65264},
  5749  													val:        "|",
  5750  													ignoreCase: false,
  5751  													want:       "\"|\"",
  5752  												},
  5753  												&ruleRefExpr{
  5754  													pos:  position{line: 2255, col: 49, offset: 65270},
  5755  													name: "EOF",
  5756  												},
  5757  											},
  5758  										},
  5759  									},
  5760  									&anyMatcher{
  5761  										line: 2255, col: 54, offset: 65275,
  5762  									},
  5763  								},
  5764  							},
  5765  						},
  5766  					},
  5767  				},
  5768  			},
  5769  		},
  5770  		{
  5771  			name: "RenamePattern",
  5772  			pos:  position{line: 2262, col: 1, offset: 65449},
  5773  			expr: &actionExpr{
  5774  				pos: position{line: 2262, col: 18, offset: 65466},
  5775  				run: (*parser).callonRenamePattern1,
  5776  				expr: &oneOrMoreExpr{
  5777  					pos: position{line: 2262, col: 18, offset: 65466},
  5778  					expr: &charClassMatcher{
  5779  						pos:        position{line: 2262, col: 18, offset: 65466},
  5780  						val:        "[a-zA-Z0-9_*]",
  5781  						chars:      []rune{'_', '*'},
  5782  						ranges:     []rune{'a', 'z', 'A', 'Z', '0', '9'},
  5783  						ignoreCase: false,
  5784  						inverted:   false,
  5785  					},
  5786  				},
  5787  			},
  5788  		},
  5789  		{
  5790  			name: "Number",
  5791  			pos:  position{line: 2266, col: 1, offset: 65517},
  5792  			expr: &actionExpr{
  5793  				pos: position{line: 2266, col: 11, offset: 65527},
  5794  				run: (*parser).callonNumber1,
  5795  				expr: &labeledExpr{
  5796  					pos:   position{line: 2266, col: 11, offset: 65527},
  5797  					label: "number",
  5798  					expr: &ruleRefExpr{
  5799  						pos:  position{line: 2266, col: 18, offset: 65534},
  5800  						name: "NumberAsString",
  5801  					},
  5802  				},
  5803  			},
  5804  		},
  5805  		{
  5806  			name: "NumberAsString",
  5807  			pos:  position{line: 2272, col: 1, offset: 65723},
  5808  			expr: &actionExpr{
  5809  				pos: position{line: 2272, col: 19, offset: 65741},
  5810  				run: (*parser).callonNumberAsString1,
  5811  				expr: &seqExpr{
  5812  					pos: position{line: 2272, col: 19, offset: 65741},
  5813  					exprs: []any{
  5814  						&labeledExpr{
  5815  							pos:   position{line: 2272, col: 19, offset: 65741},
  5816  							label: "number",
  5817  							expr: &choiceExpr{
  5818  								pos: position{line: 2272, col: 27, offset: 65749},
  5819  								alternatives: []any{
  5820  									&ruleRefExpr{
  5821  										pos:  position{line: 2272, col: 27, offset: 65749},
  5822  										name: "FloatAsString",
  5823  									},
  5824  									&ruleRefExpr{
  5825  										pos:  position{line: 2272, col: 43, offset: 65765},
  5826  										name: "IntegerAsString",
  5827  									},
  5828  								},
  5829  							},
  5830  						},
  5831  						&andExpr{
  5832  							pos: position{line: 2272, col: 60, offset: 65782},
  5833  							expr: &choiceExpr{
  5834  								pos: position{line: 2272, col: 62, offset: 65784},
  5835  								alternatives: []any{
  5836  									&ruleRefExpr{
  5837  										pos:  position{line: 2272, col: 62, offset: 65784},
  5838  										name: "SPACE",
  5839  									},
  5840  									&litMatcher{
  5841  										pos:        position{line: 2272, col: 70, offset: 65792},
  5842  										val:        "|",
  5843  										ignoreCase: false,
  5844  										want:       "\"|\"",
  5845  									},
  5846  									&litMatcher{
  5847  										pos:        position{line: 2272, col: 76, offset: 65798},
  5848  										val:        ")",
  5849  										ignoreCase: false,
  5850  										want:       "\")\"",
  5851  									},
  5852  									&litMatcher{
  5853  										pos:        position{line: 2272, col: 82, offset: 65804},
  5854  										val:        ",",
  5855  										ignoreCase: false,
  5856  										want:       "\",\"",
  5857  									},
  5858  									&ruleRefExpr{
  5859  										pos:  position{line: 2272, col: 88, offset: 65810},
  5860  										name: "EOF",
  5861  									},
  5862  								},
  5863  							},
  5864  						},
  5865  					},
  5866  				},
  5867  			},
  5868  		},
  5869  		{
  5870  			name: "FloatAsString",
  5871  			pos:  position{line: 2278, col: 1, offset: 65939},
  5872  			expr: &actionExpr{
  5873  				pos: position{line: 2278, col: 18, offset: 65956},
  5874  				run: (*parser).callonFloatAsString1,
  5875  				expr: &seqExpr{
  5876  					pos: position{line: 2278, col: 18, offset: 65956},
  5877  					exprs: []any{
  5878  						&zeroOrOneExpr{
  5879  							pos: position{line: 2278, col: 18, offset: 65956},
  5880  							expr: &charClassMatcher{
  5881  								pos:        position{line: 2278, col: 18, offset: 65956},
  5882  								val:        "[-+]",
  5883  								chars:      []rune{'-', '+'},
  5884  								ignoreCase: false,
  5885  								inverted:   false,
  5886  							},
  5887  						},
  5888  						&zeroOrMoreExpr{
  5889  							pos: position{line: 2278, col: 24, offset: 65962},
  5890  							expr: &charClassMatcher{
  5891  								pos:        position{line: 2278, col: 24, offset: 65962},
  5892  								val:        "[0-9]",
  5893  								ranges:     []rune{'0', '9'},
  5894  								ignoreCase: false,
  5895  								inverted:   false,
  5896  							},
  5897  						},
  5898  						&litMatcher{
  5899  							pos:        position{line: 2278, col: 31, offset: 65969},
  5900  							val:        ".",
  5901  							ignoreCase: false,
  5902  							want:       "\".\"",
  5903  						},
  5904  						&oneOrMoreExpr{
  5905  							pos: position{line: 2278, col: 35, offset: 65973},
  5906  							expr: &charClassMatcher{
  5907  								pos:        position{line: 2278, col: 35, offset: 65973},
  5908  								val:        "[0-9]",
  5909  								ranges:     []rune{'0', '9'},
  5910  								ignoreCase: false,
  5911  								inverted:   false,
  5912  							},
  5913  						},
  5914  					},
  5915  				},
  5916  			},
  5917  		},
  5918  		{
  5919  			name: "IntegerAsString",
  5920  			pos:  position{line: 2283, col: 1, offset: 66068},
  5921  			expr: &actionExpr{
  5922  				pos: position{line: 2283, col: 20, offset: 66087},
  5923  				run: (*parser).callonIntegerAsString1,
  5924  				expr: &seqExpr{
  5925  					pos: position{line: 2283, col: 20, offset: 66087},
  5926  					exprs: []any{
  5927  						&zeroOrOneExpr{
  5928  							pos: position{line: 2283, col: 20, offset: 66087},
  5929  							expr: &charClassMatcher{
  5930  								pos:        position{line: 2283, col: 20, offset: 66087},
  5931  								val:        "[-+]",
  5932  								chars:      []rune{'-', '+'},
  5933  								ignoreCase: false,
  5934  								inverted:   false,
  5935  							},
  5936  						},
  5937  						&oneOrMoreExpr{
  5938  							pos: position{line: 2283, col: 26, offset: 66093},
  5939  							expr: &charClassMatcher{
  5940  								pos:        position{line: 2283, col: 26, offset: 66093},
  5941  								val:        "[0-9]",
  5942  								ranges:     []rune{'0', '9'},
  5943  								ignoreCase: false,
  5944  								inverted:   false,
  5945  							},
  5946  						},
  5947  					},
  5948  				},
  5949  			},
  5950  		},
  5951  		{
  5952  			name: "EqualityOperator",
  5953  			pos:  position{line: 2287, col: 1, offset: 66136},
  5954  			expr: &actionExpr{
  5955  				pos: position{line: 2287, col: 21, offset: 66156},
  5956  				run: (*parser).callonEqualityOperator1,
  5957  				expr: &seqExpr{
  5958  					pos: position{line: 2287, col: 21, offset: 66156},
  5959  					exprs: []any{
  5960  						&ruleRefExpr{
  5961  							pos:  position{line: 2287, col: 21, offset: 66156},
  5962  							name: "EMPTY_OR_SPACE",
  5963  						},
  5964  						&labeledExpr{
  5965  							pos:   position{line: 2287, col: 36, offset: 66171},
  5966  							label: "op",
  5967  							expr: &choiceExpr{
  5968  								pos: position{line: 2287, col: 40, offset: 66175},
  5969  								alternatives: []any{
  5970  									&litMatcher{
  5971  										pos:        position{line: 2287, col: 40, offset: 66175},
  5972  										val:        "=",
  5973  										ignoreCase: false,
  5974  										want:       "\"=\"",
  5975  									},
  5976  									&litMatcher{
  5977  										pos:        position{line: 2287, col: 46, offset: 66181},
  5978  										val:        "!=",
  5979  										ignoreCase: false,
  5980  										want:       "\"!=\"",
  5981  									},
  5982  								},
  5983  							},
  5984  						},
  5985  						&ruleRefExpr{
  5986  							pos:  position{line: 2287, col: 52, offset: 66187},
  5987  							name: "EMPTY_OR_SPACE",
  5988  						},
  5989  					},
  5990  				},
  5991  			},
  5992  		},
  5993  		{
  5994  			name: "InequalityOperator",
  5995  			pos:  position{line: 2295, col: 1, offset: 66368},
  5996  			expr: &actionExpr{
  5997  				pos: position{line: 2295, col: 23, offset: 66390},
  5998  				run: (*parser).callonInequalityOperator1,
  5999  				expr: &seqExpr{
  6000  					pos: position{line: 2295, col: 23, offset: 66390},
  6001  					exprs: []any{
  6002  						&ruleRefExpr{
  6003  							pos:  position{line: 2295, col: 23, offset: 66390},
  6004  							name: "EMPTY_OR_SPACE",
  6005  						},
  6006  						&labeledExpr{
  6007  							pos:   position{line: 2295, col: 38, offset: 66405},
  6008  							label: "op",
  6009  							expr: &choiceExpr{
  6010  								pos: position{line: 2295, col: 42, offset: 66409},
  6011  								alternatives: []any{
  6012  									&litMatcher{
  6013  										pos:        position{line: 2295, col: 42, offset: 66409},
  6014  										val:        "<=",
  6015  										ignoreCase: false,
  6016  										want:       "\"<=\"",
  6017  									},
  6018  									&litMatcher{
  6019  										pos:        position{line: 2295, col: 49, offset: 66416},
  6020  										val:        "<",
  6021  										ignoreCase: false,
  6022  										want:       "\"<\"",
  6023  									},
  6024  									&litMatcher{
  6025  										pos:        position{line: 2295, col: 55, offset: 66422},
  6026  										val:        ">=",
  6027  										ignoreCase: false,
  6028  										want:       "\">=\"",
  6029  									},
  6030  									&litMatcher{
  6031  										pos:        position{line: 2295, col: 62, offset: 66429},
  6032  										val:        ">",
  6033  										ignoreCase: false,
  6034  										want:       "\">\"",
  6035  									},
  6036  								},
  6037  							},
  6038  						},
  6039  						&ruleRefExpr{
  6040  							pos:  position{line: 2295, col: 67, offset: 66434},
  6041  							name: "EMPTY_OR_SPACE",
  6042  						},
  6043  					},
  6044  				},
  6045  			},
  6046  		},
  6047  		{
  6048  			name: "EqualityOrInequality",
  6049  			pos:  position{line: 2303, col: 1, offset: 66617},
  6050  			expr: &choiceExpr{
  6051  				pos: position{line: 2303, col: 25, offset: 66641},
  6052  				alternatives: []any{
  6053  					&actionExpr{
  6054  						pos: position{line: 2303, col: 25, offset: 66641},
  6055  						run: (*parser).callonEqualityOrInequality2,
  6056  						expr: &labeledExpr{
  6057  							pos:   position{line: 2303, col: 25, offset: 66641},
  6058  							label: "op",
  6059  							expr: &ruleRefExpr{
  6060  								pos:  position{line: 2303, col: 28, offset: 66644},
  6061  								name: "EqualityOperator",
  6062  							},
  6063  						},
  6064  					},
  6065  					&actionExpr{
  6066  						pos: position{line: 2306, col: 3, offset: 66686},
  6067  						run: (*parser).callonEqualityOrInequality5,
  6068  						expr: &labeledExpr{
  6069  							pos:   position{line: 2306, col: 3, offset: 66686},
  6070  							label: "op",
  6071  							expr: &ruleRefExpr{
  6072  								pos:  position{line: 2306, col: 6, offset: 66689},
  6073  								name: "InequalityOperator",
  6074  							},
  6075  						},
  6076  					},
  6077  				},
  6078  			},
  6079  		},
  6080  		{
  6081  			name: "OpPlus",
  6082  			pos:  position{line: 2310, col: 1, offset: 66732},
  6083  			expr: &actionExpr{
  6084  				pos: position{line: 2310, col: 11, offset: 66742},
  6085  				run: (*parser).callonOpPlus1,
  6086  				expr: &seqExpr{
  6087  					pos: position{line: 2310, col: 11, offset: 66742},
  6088  					exprs: []any{
  6089  						&ruleRefExpr{
  6090  							pos:  position{line: 2310, col: 11, offset: 66742},
  6091  							name: "EMPTY_OR_SPACE",
  6092  						},
  6093  						&litMatcher{
  6094  							pos:        position{line: 2310, col: 26, offset: 66757},
  6095  							val:        "+",
  6096  							ignoreCase: false,
  6097  							want:       "\"+\"",
  6098  						},
  6099  						&ruleRefExpr{
  6100  							pos:  position{line: 2310, col: 30, offset: 66761},
  6101  							name: "EMPTY_OR_SPACE",
  6102  						},
  6103  					},
  6104  				},
  6105  			},
  6106  		},
  6107  		{
  6108  			name: "OpMinus",
  6109  			pos:  position{line: 2314, col: 1, offset: 66801},
  6110  			expr: &actionExpr{
  6111  				pos: position{line: 2314, col: 12, offset: 66812},
  6112  				run: (*parser).callonOpMinus1,
  6113  				expr: &seqExpr{
  6114  					pos: position{line: 2314, col: 12, offset: 66812},
  6115  					exprs: []any{
  6116  						&ruleRefExpr{
  6117  							pos:  position{line: 2314, col: 12, offset: 66812},
  6118  							name: "EMPTY_OR_SPACE",
  6119  						},
  6120  						&litMatcher{
  6121  							pos:        position{line: 2314, col: 27, offset: 66827},
  6122  							val:        "-",
  6123  							ignoreCase: false,
  6124  							want:       "\"-\"",
  6125  						},
  6126  						&ruleRefExpr{
  6127  							pos:  position{line: 2314, col: 31, offset: 66831},
  6128  							name: "EMPTY_OR_SPACE",
  6129  						},
  6130  					},
  6131  				},
  6132  			},
  6133  		},
  6134  		{
  6135  			name: "OpMul",
  6136  			pos:  position{line: 2318, col: 1, offset: 66871},
  6137  			expr: &actionExpr{
  6138  				pos: position{line: 2318, col: 10, offset: 66880},
  6139  				run: (*parser).callonOpMul1,
  6140  				expr: &seqExpr{
  6141  					pos: position{line: 2318, col: 10, offset: 66880},
  6142  					exprs: []any{
  6143  						&ruleRefExpr{
  6144  							pos:  position{line: 2318, col: 10, offset: 66880},
  6145  							name: "EMPTY_OR_SPACE",
  6146  						},
  6147  						&litMatcher{
  6148  							pos:        position{line: 2318, col: 25, offset: 66895},
  6149  							val:        "*",
  6150  							ignoreCase: false,
  6151  							want:       "\"*\"",
  6152  						},
  6153  						&ruleRefExpr{
  6154  							pos:  position{line: 2318, col: 29, offset: 66899},
  6155  							name: "EMPTY_OR_SPACE",
  6156  						},
  6157  					},
  6158  				},
  6159  			},
  6160  		},
  6161  		{
  6162  			name: "OpDiv",
  6163  			pos:  position{line: 2322, col: 1, offset: 66939},
  6164  			expr: &actionExpr{
  6165  				pos: position{line: 2322, col: 10, offset: 66948},
  6166  				run: (*parser).callonOpDiv1,
  6167  				expr: &seqExpr{
  6168  					pos: position{line: 2322, col: 10, offset: 66948},
  6169  					exprs: []any{
  6170  						&ruleRefExpr{
  6171  							pos:  position{line: 2322, col: 10, offset: 66948},
  6172  							name: "EMPTY_OR_SPACE",
  6173  						},
  6174  						&litMatcher{
  6175  							pos:        position{line: 2322, col: 25, offset: 66963},
  6176  							val:        "/",
  6177  							ignoreCase: false,
  6178  							want:       "\"/\"",
  6179  						},
  6180  						&ruleRefExpr{
  6181  							pos:  position{line: 2322, col: 29, offset: 66967},
  6182  							name: "EMPTY_OR_SPACE",
  6183  						},
  6184  					},
  6185  				},
  6186  			},
  6187  		},
  6188  		{
  6189  			name: "Second",
  6190  			pos:  position{line: 2327, col: 1, offset: 67031},
  6191  			expr: &actionExpr{
  6192  				pos: position{line: 2327, col: 11, offset: 67041},
  6193  				run: (*parser).callonSecond1,
  6194  				expr: &choiceExpr{
  6195  					pos: position{line: 2327, col: 12, offset: 67042},
  6196  					alternatives: []any{
  6197  						&litMatcher{
  6198  							pos:        position{line: 2327, col: 12, offset: 67042},
  6199  							val:        "seconds",
  6200  							ignoreCase: false,
  6201  							want:       "\"seconds\"",
  6202  						},
  6203  						&litMatcher{
  6204  							pos:        position{line: 2327, col: 24, offset: 67054},
  6205  							val:        "second",
  6206  							ignoreCase: false,
  6207  							want:       "\"second\"",
  6208  						},
  6209  						&litMatcher{
  6210  							pos:        position{line: 2327, col: 35, offset: 67065},
  6211  							val:        "secs",
  6212  							ignoreCase: false,
  6213  							want:       "\"secs\"",
  6214  						},
  6215  						&litMatcher{
  6216  							pos:        position{line: 2327, col: 44, offset: 67074},
  6217  							val:        "sec",
  6218  							ignoreCase: false,
  6219  							want:       "\"sec\"",
  6220  						},
  6221  						&litMatcher{
  6222  							pos:        position{line: 2327, col: 52, offset: 67082},
  6223  							val:        "s",
  6224  							ignoreCase: false,
  6225  							want:       "\"s\"",
  6226  						},
  6227  					},
  6228  				},
  6229  			},
  6230  		},
  6231  		{
  6232  			name: "Minute",
  6233  			pos:  position{line: 2331, col: 1, offset: 67123},
  6234  			expr: &actionExpr{
  6235  				pos: position{line: 2331, col: 11, offset: 67133},
  6236  				run: (*parser).callonMinute1,
  6237  				expr: &choiceExpr{
  6238  					pos: position{line: 2331, col: 12, offset: 67134},
  6239  					alternatives: []any{
  6240  						&litMatcher{
  6241  							pos:        position{line: 2331, col: 12, offset: 67134},
  6242  							val:        "minutes",
  6243  							ignoreCase: false,
  6244  							want:       "\"minutes\"",
  6245  						},
  6246  						&litMatcher{
  6247  							pos:        position{line: 2331, col: 24, offset: 67146},
  6248  							val:        "minute",
  6249  							ignoreCase: false,
  6250  							want:       "\"minute\"",
  6251  						},
  6252  						&litMatcher{
  6253  							pos:        position{line: 2331, col: 35, offset: 67157},
  6254  							val:        "mins",
  6255  							ignoreCase: false,
  6256  							want:       "\"mins\"",
  6257  						},
  6258  						&litMatcher{
  6259  							pos:        position{line: 2331, col: 44, offset: 67166},
  6260  							val:        "min",
  6261  							ignoreCase: false,
  6262  							want:       "\"min\"",
  6263  						},
  6264  						&litMatcher{
  6265  							pos:        position{line: 2331, col: 52, offset: 67174},
  6266  							val:        "m",
  6267  							ignoreCase: false,
  6268  							want:       "\"m\"",
  6269  						},
  6270  					},
  6271  				},
  6272  			},
  6273  		},
  6274  		{
  6275  			name: "Hour",
  6276  			pos:  position{line: 2335, col: 1, offset: 67215},
  6277  			expr: &actionExpr{
  6278  				pos: position{line: 2335, col: 9, offset: 67223},
  6279  				run: (*parser).callonHour1,
  6280  				expr: &choiceExpr{
  6281  					pos: position{line: 2335, col: 10, offset: 67224},
  6282  					alternatives: []any{
  6283  						&litMatcher{
  6284  							pos:        position{line: 2335, col: 10, offset: 67224},
  6285  							val:        "hours",
  6286  							ignoreCase: false,
  6287  							want:       "\"hours\"",
  6288  						},
  6289  						&litMatcher{
  6290  							pos:        position{line: 2335, col: 20, offset: 67234},
  6291  							val:        "hour",
  6292  							ignoreCase: false,
  6293  							want:       "\"hour\"",
  6294  						},
  6295  						&litMatcher{
  6296  							pos:        position{line: 2335, col: 29, offset: 67243},
  6297  							val:        "hrs",
  6298  							ignoreCase: false,
  6299  							want:       "\"hrs\"",
  6300  						},
  6301  						&litMatcher{
  6302  							pos:        position{line: 2335, col: 37, offset: 67251},
  6303  							val:        "hr",
  6304  							ignoreCase: false,
  6305  							want:       "\"hr\"",
  6306  						},
  6307  						&litMatcher{
  6308  							pos:        position{line: 2335, col: 44, offset: 67258},
  6309  							val:        "h",
  6310  							ignoreCase: false,
  6311  							want:       "\"h\"",
  6312  						},
  6313  					},
  6314  				},
  6315  			},
  6316  		},
  6317  		{
  6318  			name: "Day",
  6319  			pos:  position{line: 2339, col: 1, offset: 67297},
  6320  			expr: &actionExpr{
  6321  				pos: position{line: 2339, col: 8, offset: 67304},
  6322  				run: (*parser).callonDay1,
  6323  				expr: &choiceExpr{
  6324  					pos: position{line: 2339, col: 9, offset: 67305},
  6325  					alternatives: []any{
  6326  						&litMatcher{
  6327  							pos:        position{line: 2339, col: 9, offset: 67305},
  6328  							val:        "days",
  6329  							ignoreCase: false,
  6330  							want:       "\"days\"",
  6331  						},
  6332  						&litMatcher{
  6333  							pos:        position{line: 2339, col: 18, offset: 67314},
  6334  							val:        "day",
  6335  							ignoreCase: false,
  6336  							want:       "\"day\"",
  6337  						},
  6338  						&litMatcher{
  6339  							pos:        position{line: 2339, col: 26, offset: 67322},
  6340  							val:        "d",
  6341  							ignoreCase: false,
  6342  							want:       "\"d\"",
  6343  						},
  6344  					},
  6345  				},
  6346  			},
  6347  		},
  6348  		{
  6349  			name: "Week",
  6350  			pos:  position{line: 2343, col: 1, offset: 67360},
  6351  			expr: &actionExpr{
  6352  				pos: position{line: 2343, col: 9, offset: 67368},
  6353  				run: (*parser).callonWeek1,
  6354  				expr: &choiceExpr{
  6355  					pos: position{line: 2343, col: 10, offset: 67369},
  6356  					alternatives: []any{
  6357  						&litMatcher{
  6358  							pos:        position{line: 2343, col: 10, offset: 67369},
  6359  							val:        "weeks",
  6360  							ignoreCase: false,
  6361  							want:       "\"weeks\"",
  6362  						},
  6363  						&litMatcher{
  6364  							pos:        position{line: 2343, col: 20, offset: 67379},
  6365  							val:        "week",
  6366  							ignoreCase: false,
  6367  							want:       "\"week\"",
  6368  						},
  6369  						&litMatcher{
  6370  							pos:        position{line: 2343, col: 29, offset: 67388},
  6371  							val:        "w",
  6372  							ignoreCase: false,
  6373  							want:       "\"w\"",
  6374  						},
  6375  					},
  6376  				},
  6377  			},
  6378  		},
  6379  		{
  6380  			name: "Month",
  6381  			pos:  position{line: 2347, col: 1, offset: 67427},
  6382  			expr: &actionExpr{
  6383  				pos: position{line: 2347, col: 10, offset: 67436},
  6384  				run: (*parser).callonMonth1,
  6385  				expr: &choiceExpr{
  6386  					pos: position{line: 2347, col: 11, offset: 67437},
  6387  					alternatives: []any{
  6388  						&litMatcher{
  6389  							pos:        position{line: 2347, col: 11, offset: 67437},
  6390  							val:        "months",
  6391  							ignoreCase: false,
  6392  							want:       "\"months\"",
  6393  						},
  6394  						&litMatcher{
  6395  							pos:        position{line: 2347, col: 22, offset: 67448},
  6396  							val:        "month",
  6397  							ignoreCase: false,
  6398  							want:       "\"month\"",
  6399  						},
  6400  						&litMatcher{
  6401  							pos:        position{line: 2347, col: 32, offset: 67458},
  6402  							val:        "mon",
  6403  							ignoreCase: false,
  6404  							want:       "\"mon\"",
  6405  						},
  6406  					},
  6407  				},
  6408  			},
  6409  		},
  6410  		{
  6411  			name: "Quarter",
  6412  			pos:  position{line: 2351, col: 1, offset: 67500},
  6413  			expr: &actionExpr{
  6414  				pos: position{line: 2351, col: 12, offset: 67511},
  6415  				run: (*parser).callonQuarter1,
  6416  				expr: &choiceExpr{
  6417  					pos: position{line: 2351, col: 13, offset: 67512},
  6418  					alternatives: []any{
  6419  						&litMatcher{
  6420  							pos:        position{line: 2351, col: 13, offset: 67512},
  6421  							val:        "quarters",
  6422  							ignoreCase: false,
  6423  							want:       "\"quarters\"",
  6424  						},
  6425  						&litMatcher{
  6426  							pos:        position{line: 2351, col: 26, offset: 67525},
  6427  							val:        "quarter",
  6428  							ignoreCase: false,
  6429  							want:       "\"quarter\"",
  6430  						},
  6431  						&litMatcher{
  6432  							pos:        position{line: 2351, col: 38, offset: 67537},
  6433  							val:        "qtrs",
  6434  							ignoreCase: false,
  6435  							want:       "\"qtrs\"",
  6436  						},
  6437  						&litMatcher{
  6438  							pos:        position{line: 2351, col: 47, offset: 67546},
  6439  							val:        "qtr",
  6440  							ignoreCase: false,
  6441  							want:       "\"qtr\"",
  6442  						},
  6443  						&litMatcher{
  6444  							pos:        position{line: 2351, col: 55, offset: 67554},
  6445  							val:        "q",
  6446  							ignoreCase: false,
  6447  							want:       "\"q\"",
  6448  						},
  6449  					},
  6450  				},
  6451  			},
  6452  		},
  6453  		{
  6454  			name: "Subseconds",
  6455  			pos:  position{line: 2356, col: 1, offset: 67688},
  6456  			expr: &actionExpr{
  6457  				pos: position{line: 2356, col: 15, offset: 67702},
  6458  				run: (*parser).callonSubseconds1,
  6459  				expr: &choiceExpr{
  6460  					pos: position{line: 2356, col: 16, offset: 67703},
  6461  					alternatives: []any{
  6462  						&litMatcher{
  6463  							pos:        position{line: 2356, col: 16, offset: 67703},
  6464  							val:        "us",
  6465  							ignoreCase: false,
  6466  							want:       "\"us\"",
  6467  						},
  6468  						&litMatcher{
  6469  							pos:        position{line: 2356, col: 23, offset: 67710},
  6470  							val:        "ms",
  6471  							ignoreCase: false,
  6472  							want:       "\"ms\"",
  6473  						},
  6474  						&litMatcher{
  6475  							pos:        position{line: 2356, col: 30, offset: 67717},
  6476  							val:        "cs",
  6477  							ignoreCase: false,
  6478  							want:       "\"cs\"",
  6479  						},
  6480  						&litMatcher{
  6481  							pos:        position{line: 2356, col: 37, offset: 67724},
  6482  							val:        "ds",
  6483  							ignoreCase: false,
  6484  							want:       "\"ds\"",
  6485  						},
  6486  					},
  6487  				},
  6488  			},
  6489  		},
  6490  		{
  6491  			name: "TransactionBlock",
  6492  			pos:  position{line: 2365, col: 1, offset: 67947},
  6493  			expr: &actionExpr{
  6494  				pos: position{line: 2365, col: 21, offset: 67967},
  6495  				run: (*parser).callonTransactionBlock1,
  6496  				expr: &seqExpr{
  6497  					pos: position{line: 2365, col: 21, offset: 67967},
  6498  					exprs: []any{
  6499  						&ruleRefExpr{
  6500  							pos:  position{line: 2365, col: 21, offset: 67967},
  6501  							name: "PIPE",
  6502  						},
  6503  						&ruleRefExpr{
  6504  							pos:  position{line: 2365, col: 26, offset: 67972},
  6505  							name: "CMD_TRANSACTION",
  6506  						},
  6507  						&labeledExpr{
  6508  							pos:   position{line: 2365, col: 42, offset: 67988},
  6509  							label: "txnOptions",
  6510  							expr: &ruleRefExpr{
  6511  								pos:  position{line: 2365, col: 53, offset: 67999},
  6512  								name: "TransactionOptions",
  6513  							},
  6514  						},
  6515  					},
  6516  				},
  6517  			},
  6518  		},
  6519  		{
  6520  			name: "TransactionOptions",
  6521  			pos:  position{line: 2374, col: 1, offset: 68305},
  6522  			expr: &actionExpr{
  6523  				pos: position{line: 2374, col: 23, offset: 68327},
  6524  				run: (*parser).callonTransactionOptions1,
  6525  				expr: &labeledExpr{
  6526  					pos:   position{line: 2374, col: 23, offset: 68327},
  6527  					label: "txnOptions",
  6528  					expr: &zeroOrOneExpr{
  6529  						pos: position{line: 2374, col: 34, offset: 68338},
  6530  						expr: &ruleRefExpr{
  6531  							pos:  position{line: 2374, col: 34, offset: 68338},
  6532  							name: "TransactionDefinitionOptionsList",
  6533  						},
  6534  					},
  6535  				},
  6536  			},
  6537  		},
  6538  		{
  6539  			name: "TransactionDefinitionOptionsList",
  6540  			pos:  position{line: 2389, col: 1, offset: 68729},
  6541  			expr: &actionExpr{
  6542  				pos: position{line: 2389, col: 37, offset: 68765},
  6543  				run: (*parser).callonTransactionDefinitionOptionsList1,
  6544  				expr: &seqExpr{
  6545  					pos: position{line: 2389, col: 37, offset: 68765},
  6546  					exprs: []any{
  6547  						&labeledExpr{
  6548  							pos:   position{line: 2389, col: 37, offset: 68765},
  6549  							label: "first",
  6550  							expr: &ruleRefExpr{
  6551  								pos:  position{line: 2389, col: 43, offset: 68771},
  6552  								name: "TransactionDefinitionOption",
  6553  							},
  6554  						},
  6555  						&labeledExpr{
  6556  							pos:   position{line: 2389, col: 71, offset: 68799},
  6557  							label: "rest",
  6558  							expr: &zeroOrMoreExpr{
  6559  								pos: position{line: 2389, col: 76, offset: 68804},
  6560  								expr: &seqExpr{
  6561  									pos: position{line: 2389, col: 77, offset: 68805},
  6562  									exprs: []any{
  6563  										&ruleRefExpr{
  6564  											pos:  position{line: 2389, col: 77, offset: 68805},
  6565  											name: "SPACE",
  6566  										},
  6567  										&ruleRefExpr{
  6568  											pos:  position{line: 2389, col: 83, offset: 68811},
  6569  											name: "TransactionDefinitionOption",
  6570  										},
  6571  									},
  6572  								},
  6573  							},
  6574  						},
  6575  					},
  6576  				},
  6577  			},
  6578  		},
  6579  		{
  6580  			name: "TransactionDefinitionOption",
  6581  			pos:  position{line: 2424, col: 1, offset: 69800},
  6582  			expr: &actionExpr{
  6583  				pos: position{line: 2424, col: 32, offset: 69831},
  6584  				run: (*parser).callonTransactionDefinitionOption1,
  6585  				expr: &labeledExpr{
  6586  					pos:   position{line: 2424, col: 32, offset: 69831},
  6587  					label: "option",
  6588  					expr: &choiceExpr{
  6589  						pos: position{line: 2424, col: 40, offset: 69839},
  6590  						alternatives: []any{
  6591  							&ruleRefExpr{
  6592  								pos:  position{line: 2424, col: 40, offset: 69839},
  6593  								name: "SpaceSeparatedFieldNameList",
  6594  							},
  6595  							&ruleRefExpr{
  6596  								pos:  position{line: 2424, col: 70, offset: 69869},
  6597  								name: "StartsWithOption",
  6598  							},
  6599  							&ruleRefExpr{
  6600  								pos:  position{line: 2424, col: 89, offset: 69888},
  6601  								name: "EndsWithOption",
  6602  							},
  6603  						},
  6604  					},
  6605  				},
  6606  			},
  6607  		},
  6608  		{
  6609  			name: "SpaceSeparatedFieldNameList",
  6610  			pos:  position{line: 2430, col: 1, offset: 70034},
  6611  			expr: &actionExpr{
  6612  				pos: position{line: 2430, col: 32, offset: 70065},
  6613  				run: (*parser).callonSpaceSeparatedFieldNameList1,
  6614  				expr: &seqExpr{
  6615  					pos: position{line: 2430, col: 32, offset: 70065},
  6616  					exprs: []any{
  6617  						&labeledExpr{
  6618  							pos:   position{line: 2430, col: 32, offset: 70065},
  6619  							label: "first",
  6620  							expr: &ruleRefExpr{
  6621  								pos:  position{line: 2430, col: 38, offset: 70071},
  6622  								name: "FieldName",
  6623  							},
  6624  						},
  6625  						&notExpr{
  6626  							pos: position{line: 2430, col: 48, offset: 70081},
  6627  							expr: &ruleRefExpr{
  6628  								pos:  position{line: 2430, col: 50, offset: 70083},
  6629  								name: "EQUAL",
  6630  							},
  6631  						},
  6632  						&labeledExpr{
  6633  							pos:   position{line: 2430, col: 57, offset: 70090},
  6634  							label: "rest",
  6635  							expr: &zeroOrMoreExpr{
  6636  								pos: position{line: 2430, col: 62, offset: 70095},
  6637  								expr: &seqExpr{
  6638  									pos: position{line: 2430, col: 63, offset: 70096},
  6639  									exprs: []any{
  6640  										&ruleRefExpr{
  6641  											pos:  position{line: 2430, col: 63, offset: 70096},
  6642  											name: "SPACE",
  6643  										},
  6644  										&ruleRefExpr{
  6645  											pos:  position{line: 2430, col: 69, offset: 70102},
  6646  											name: "FieldName",
  6647  										},
  6648  										&notExpr{
  6649  											pos: position{line: 2430, col: 79, offset: 70112},
  6650  											expr: &ruleRefExpr{
  6651  												pos:  position{line: 2430, col: 81, offset: 70114},
  6652  												name: "EQUAL",
  6653  											},
  6654  										},
  6655  									},
  6656  								},
  6657  							},
  6658  						},
  6659  					},
  6660  				},
  6661  			},
  6662  		},
  6663  		{
  6664  			name: "StartsWithOption",
  6665  			pos:  position{line: 2448, col: 1, offset: 70538},
  6666  			expr: &actionExpr{
  6667  				pos: position{line: 2448, col: 21, offset: 70558},
  6668  				run: (*parser).callonStartsWithOption1,
  6669  				expr: &seqExpr{
  6670  					pos: position{line: 2448, col: 21, offset: 70558},
  6671  					exprs: []any{
  6672  						&litMatcher{
  6673  							pos:        position{line: 2448, col: 21, offset: 70558},
  6674  							val:        "startswith",
  6675  							ignoreCase: false,
  6676  							want:       "\"startswith\"",
  6677  						},
  6678  						&ruleRefExpr{
  6679  							pos:  position{line: 2448, col: 34, offset: 70571},
  6680  							name: "EQUAL",
  6681  						},
  6682  						&labeledExpr{
  6683  							pos:   position{line: 2448, col: 40, offset: 70577},
  6684  							label: "strExpr",
  6685  							expr: &ruleRefExpr{
  6686  								pos:  position{line: 2448, col: 48, offset: 70585},
  6687  								name: "TransactionFilterString",
  6688  							},
  6689  						},
  6690  					},
  6691  				},
  6692  			},
  6693  		},
  6694  		{
  6695  			name: "EndsWithOption",
  6696  			pos:  position{line: 2458, col: 1, offset: 70823},
  6697  			expr: &actionExpr{
  6698  				pos: position{line: 2458, col: 19, offset: 70841},
  6699  				run: (*parser).callonEndsWithOption1,
  6700  				expr: &seqExpr{
  6701  					pos: position{line: 2458, col: 19, offset: 70841},
  6702  					exprs: []any{
  6703  						&litMatcher{
  6704  							pos:        position{line: 2458, col: 19, offset: 70841},
  6705  							val:        "endswith",
  6706  							ignoreCase: false,
  6707  							want:       "\"endswith\"",
  6708  						},
  6709  						&ruleRefExpr{
  6710  							pos:  position{line: 2458, col: 30, offset: 70852},
  6711  							name: "EQUAL",
  6712  						},
  6713  						&labeledExpr{
  6714  							pos:   position{line: 2458, col: 36, offset: 70858},
  6715  							label: "strExpr",
  6716  							expr: &ruleRefExpr{
  6717  								pos:  position{line: 2458, col: 44, offset: 70866},
  6718  								name: "TransactionFilterString",
  6719  							},
  6720  						},
  6721  					},
  6722  				},
  6723  			},
  6724  		},
  6725  		{
  6726  			name: "TransactionFilterString",
  6727  			pos:  position{line: 2469, col: 1, offset: 71135},
  6728  			expr: &actionExpr{
  6729  				pos: position{line: 2469, col: 28, offset: 71162},
  6730  				run: (*parser).callonTransactionFilterString1,
  6731  				expr: &labeledExpr{
  6732  					pos:   position{line: 2469, col: 28, offset: 71162},
  6733  					label: "strExpr",
  6734  					expr: &choiceExpr{
  6735  						pos: position{line: 2469, col: 37, offset: 71171},
  6736  						alternatives: []any{
  6737  							&ruleRefExpr{
  6738  								pos:  position{line: 2469, col: 37, offset: 71171},
  6739  								name: "TransactionQuotedString",
  6740  							},
  6741  							&ruleRefExpr{
  6742  								pos:  position{line: 2469, col: 63, offset: 71197},
  6743  								name: "TransactionEval",
  6744  							},
  6745  							&ruleRefExpr{
  6746  								pos:  position{line: 2469, col: 81, offset: 71215},
  6747  								name: "TransactionSearch",
  6748  							},
  6749  						},
  6750  					},
  6751  				},
  6752  			},
  6753  		},
  6754  		{
  6755  			name: "TransactionQuotedString",
  6756  			pos:  position{line: 2473, col: 1, offset: 71263},
  6757  			expr: &actionExpr{
  6758  				pos: position{line: 2473, col: 28, offset: 71290},
  6759  				run: (*parser).callonTransactionQuotedString1,
  6760  				expr: &labeledExpr{
  6761  					pos:   position{line: 2473, col: 28, offset: 71290},
  6762  					label: "str",
  6763  					expr: &choiceExpr{
  6764  						pos: position{line: 2473, col: 33, offset: 71295},
  6765  						alternatives: []any{
  6766  							&ruleRefExpr{
  6767  								pos:  position{line: 2473, col: 33, offset: 71295},
  6768  								name: "TransactionQuotedStringValue",
  6769  							},
  6770  							&ruleRefExpr{
  6771  								pos:  position{line: 2473, col: 64, offset: 71326},
  6772  								name: "TransactionQuotedStringSearchExpr",
  6773  							},
  6774  						},
  6775  					},
  6776  				},
  6777  			},
  6778  		},
  6779  		{
  6780  			name: "TransactionQuotedStringSearchExpr",
  6781  			pos:  position{line: 2477, col: 1, offset: 71386},
  6782  			expr: &actionExpr{
  6783  				pos: position{line: 2477, col: 38, offset: 71423},
  6784  				run: (*parser).callonTransactionQuotedStringSearchExpr1,
  6785  				expr: &seqExpr{
  6786  					pos: position{line: 2477, col: 38, offset: 71423},
  6787  					exprs: []any{
  6788  						&litMatcher{
  6789  							pos:        position{line: 2477, col: 38, offset: 71423},
  6790  							val:        "\"",
  6791  							ignoreCase: false,
  6792  							want:       "\"\\\"\"",
  6793  						},
  6794  						&labeledExpr{
  6795  							pos:   position{line: 2477, col: 42, offset: 71427},
  6796  							label: "searchClause",
  6797  							expr: &ruleRefExpr{
  6798  								pos:  position{line: 2477, col: 55, offset: 71440},
  6799  								name: "ClauseLevel4",
  6800  							},
  6801  						},
  6802  						&litMatcher{
  6803  							pos:        position{line: 2477, col: 68, offset: 71453},
  6804  							val:        "\"",
  6805  							ignoreCase: false,
  6806  							want:       "\"\\\"\"",
  6807  						},
  6808  					},
  6809  				},
  6810  			},
  6811  		},
  6812  		{
  6813  			name: "QuotedStringNoOp",
  6814  			pos:  position{line: 2485, col: 1, offset: 71592},
  6815  			expr: &actionExpr{
  6816  				pos: position{line: 2485, col: 21, offset: 71612},
  6817  				run: (*parser).callonQuotedStringNoOp1,
  6818  				expr: &seqExpr{
  6819  					pos: position{line: 2485, col: 21, offset: 71612},
  6820  					exprs: []any{
  6821  						&litMatcher{
  6822  							pos:        position{line: 2485, col: 21, offset: 71612},
  6823  							val:        "\"",
  6824  							ignoreCase: false,
  6825  							want:       "\"\\\"\"",
  6826  						},
  6827  						&zeroOrMoreExpr{
  6828  							pos: position{line: 2485, col: 25, offset: 71616},
  6829  							expr: &charClassMatcher{
  6830  								pos:        position{line: 2485, col: 25, offset: 71616},
  6831  								val:        "[^\" !(OR / AND)]",
  6832  								chars:      []rune{'"', ' ', '!', '(', 'O', 'R', ' ', '/', ' ', 'A', 'N', 'D', ')'},
  6833  								ignoreCase: false,
  6834  								inverted:   true,
  6835  							},
  6836  						},
  6837  						&litMatcher{
  6838  							pos:        position{line: 2485, col: 44, offset: 71635},
  6839  							val:        "\"",
  6840  							ignoreCase: false,
  6841  							want:       "\"\\\"\"",
  6842  						},
  6843  					},
  6844  				},
  6845  			},
  6846  		},
  6847  		{
  6848  			name: "TransactionQuotedStringValue",
  6849  			pos:  position{line: 2490, col: 1, offset: 71746},
  6850  			expr: &actionExpr{
  6851  				pos: position{line: 2490, col: 33, offset: 71778},
  6852  				run: (*parser).callonTransactionQuotedStringValue1,
  6853  				expr: &labeledExpr{
  6854  					pos:   position{line: 2490, col: 33, offset: 71778},
  6855  					label: "str",
  6856  					expr: &ruleRefExpr{
  6857  						pos:  position{line: 2490, col: 37, offset: 71782},
  6858  						name: "QuotedStringNoOp",
  6859  					},
  6860  				},
  6861  			},
  6862  		},
  6863  		{
  6864  			name: "TransactionSearch",
  6865  			pos:  position{line: 2498, col: 1, offset: 71937},
  6866  			expr: &actionExpr{
  6867  				pos: position{line: 2498, col: 22, offset: 71958},
  6868  				run: (*parser).callonTransactionSearch1,
  6869  				expr: &labeledExpr{
  6870  					pos:   position{line: 2498, col: 22, offset: 71958},
  6871  					label: "expr",
  6872  					expr: &ruleRefExpr{
  6873  						pos:  position{line: 2498, col: 27, offset: 71963},
  6874  						name: "ClauseLevel1",
  6875  					},
  6876  				},
  6877  			},
  6878  		},
  6879  		{
  6880  			name: "TransactionEval",
  6881  			pos:  position{line: 2508, col: 1, offset: 72135},
  6882  			expr: &actionExpr{
  6883  				pos: position{line: 2508, col: 20, offset: 72154},
  6884  				run: (*parser).callonTransactionEval1,
  6885  				expr: &seqExpr{
  6886  					pos: position{line: 2508, col: 20, offset: 72154},
  6887  					exprs: []any{
  6888  						&litMatcher{
  6889  							pos:        position{line: 2508, col: 20, offset: 72154},
  6890  							val:        "eval",
  6891  							ignoreCase: false,
  6892  							want:       "\"eval\"",
  6893  						},
  6894  						&ruleRefExpr{
  6895  							pos:  position{line: 2508, col: 27, offset: 72161},
  6896  							name: "EMPTY_OR_SPACE",
  6897  						},
  6898  						&ruleRefExpr{
  6899  							pos:  position{line: 2508, col: 42, offset: 72176},
  6900  							name: "L_PAREN",
  6901  						},
  6902  						&labeledExpr{
  6903  							pos:   position{line: 2508, col: 50, offset: 72184},
  6904  							label: "condition",
  6905  							expr: &ruleRefExpr{
  6906  								pos:  position{line: 2508, col: 60, offset: 72194},
  6907  								name: "BoolExpr",
  6908  							},
  6909  						},
  6910  						&ruleRefExpr{
  6911  							pos:  position{line: 2508, col: 69, offset: 72203},
  6912  							name: "R_PAREN",
  6913  						},
  6914  					},
  6915  				},
  6916  			},
  6917  		},
  6918  		{
  6919  			name: "ALLCMD",
  6920  			pos:  position{line: 2518, col: 1, offset: 72384},
  6921  			expr: &choiceExpr{
  6922  				pos: position{line: 2518, col: 12, offset: 72395},
  6923  				alternatives: []any{
  6924  					&ruleRefExpr{
  6925  						pos:  position{line: 2518, col: 12, offset: 72395},
  6926  						name: "CMD_REGEX",
  6927  					},
  6928  					&ruleRefExpr{
  6929  						pos:  position{line: 2518, col: 24, offset: 72407},
  6930  						name: "CMD_STATS",
  6931  					},
  6932  					&ruleRefExpr{
  6933  						pos:  position{line: 2518, col: 36, offset: 72419},
  6934  						name: "CMD_FIELDS",
  6935  					},
  6936  					&ruleRefExpr{
  6937  						pos:  position{line: 2518, col: 49, offset: 72432},
  6938  						name: "CMD_WHERE",
  6939  					},
  6940  					&ruleRefExpr{
  6941  						pos:  position{line: 2518, col: 61, offset: 72444},
  6942  						name: "CMD_HEAD_NO_SPACE",
  6943  					},
  6944  					&ruleRefExpr{
  6945  						pos:  position{line: 2518, col: 81, offset: 72464},
  6946  						name: "CMD_HEAD",
  6947  					},
  6948  					&ruleRefExpr{
  6949  						pos:  position{line: 2518, col: 92, offset: 72475},
  6950  						name: "CMD_EVAL",
  6951  					},
  6952  					&ruleRefExpr{
  6953  						pos:  position{line: 2518, col: 103, offset: 72486},
  6954  						name: "CMD_REX",
  6955  					},
  6956  					&ruleRefExpr{
  6957  						pos:  position{line: 2518, col: 113, offset: 72496},
  6958  						name: "CMD_TOP",
  6959  					},
  6960  					&ruleRefExpr{
  6961  						pos:  position{line: 2518, col: 123, offset: 72506},
  6962  						name: "CMD_RARE",
  6963  					},
  6964  					&ruleRefExpr{
  6965  						pos:  position{line: 2518, col: 134, offset: 72517},
  6966  						name: "CMD_RENAME",
  6967  					},
  6968  					&ruleRefExpr{
  6969  						pos:  position{line: 2518, col: 147, offset: 72530},
  6970  						name: "CMD_TIMECHART",
  6971  					},
  6972  					&ruleRefExpr{
  6973  						pos:  position{line: 2518, col: 163, offset: 72546},
  6974  						name: "CMD_TRANSACTION",
  6975  					},
  6976  					&ruleRefExpr{
  6977  						pos:  position{line: 2518, col: 181, offset: 72564},
  6978  						name: "CMD_DEDUP",
  6979  					},
  6980  					&ruleRefExpr{
  6981  						pos:  position{line: 2518, col: 193, offset: 72576},
  6982  						name: "CMD_SORT",
  6983  					},
  6984  				},
  6985  			},
  6986  		},
  6987  		{
  6988  			name: "CMD_SEARCH",
  6989  			pos:  position{line: 2519, col: 1, offset: 72586},
  6990  			expr: &seqExpr{
  6991  				pos: position{line: 2519, col: 15, offset: 72600},
  6992  				exprs: []any{
  6993  					&litMatcher{
  6994  						pos:        position{line: 2519, col: 15, offset: 72600},
  6995  						val:        "search",
  6996  						ignoreCase: false,
  6997  						want:       "\"search\"",
  6998  					},
  6999  					&ruleRefExpr{
  7000  						pos:  position{line: 2519, col: 24, offset: 72609},
  7001  						name: "SPACE",
  7002  					},
  7003  				},
  7004  			},
  7005  		},
  7006  		{
  7007  			name: "CMD_REGEX",
  7008  			pos:  position{line: 2520, col: 1, offset: 72615},
  7009  			expr: &seqExpr{
  7010  				pos: position{line: 2520, col: 14, offset: 72628},
  7011  				exprs: []any{
  7012  					&litMatcher{
  7013  						pos:        position{line: 2520, col: 14, offset: 72628},
  7014  						val:        "regex",
  7015  						ignoreCase: false,
  7016  						want:       "\"regex\"",
  7017  					},
  7018  					&ruleRefExpr{
  7019  						pos:  position{line: 2520, col: 22, offset: 72636},
  7020  						name: "SPACE",
  7021  					},
  7022  				},
  7023  			},
  7024  		},
  7025  		{
  7026  			name: "CMD_STATS",
  7027  			pos:  position{line: 2521, col: 1, offset: 72642},
  7028  			expr: &seqExpr{
  7029  				pos: position{line: 2521, col: 14, offset: 72655},
  7030  				exprs: []any{
  7031  					&litMatcher{
  7032  						pos:        position{line: 2521, col: 14, offset: 72655},
  7033  						val:        "stats",
  7034  						ignoreCase: false,
  7035  						want:       "\"stats\"",
  7036  					},
  7037  					&ruleRefExpr{
  7038  						pos:  position{line: 2521, col: 22, offset: 72663},
  7039  						name: "SPACE",
  7040  					},
  7041  				},
  7042  			},
  7043  		},
  7044  		{
  7045  			name: "CMD_FIELDS",
  7046  			pos:  position{line: 2522, col: 1, offset: 72669},
  7047  			expr: &seqExpr{
  7048  				pos: position{line: 2522, col: 15, offset: 72683},
  7049  				exprs: []any{
  7050  					&litMatcher{
  7051  						pos:        position{line: 2522, col: 15, offset: 72683},
  7052  						val:        "fields",
  7053  						ignoreCase: false,
  7054  						want:       "\"fields\"",
  7055  					},
  7056  					&ruleRefExpr{
  7057  						pos:  position{line: 2522, col: 24, offset: 72692},
  7058  						name: "SPACE",
  7059  					},
  7060  				},
  7061  			},
  7062  		},
  7063  		{
  7064  			name: "CMD_WHERE",
  7065  			pos:  position{line: 2523, col: 1, offset: 72698},
  7066  			expr: &seqExpr{
  7067  				pos: position{line: 2523, col: 14, offset: 72711},
  7068  				exprs: []any{
  7069  					&litMatcher{
  7070  						pos:        position{line: 2523, col: 14, offset: 72711},
  7071  						val:        "where",
  7072  						ignoreCase: false,
  7073  						want:       "\"where\"",
  7074  					},
  7075  					&ruleRefExpr{
  7076  						pos:  position{line: 2523, col: 22, offset: 72719},
  7077  						name: "SPACE",
  7078  					},
  7079  				},
  7080  			},
  7081  		},
  7082  		{
  7083  			name: "CMD_HEAD_NO_SPACE",
  7084  			pos:  position{line: 2524, col: 1, offset: 72725},
  7085  			expr: &litMatcher{
  7086  				pos:        position{line: 2524, col: 22, offset: 72746},
  7087  				val:        "head",
  7088  				ignoreCase: false,
  7089  				want:       "\"head\"",
  7090  			},
  7091  		},
  7092  		{
  7093  			name: "CMD_HEAD",
  7094  			pos:  position{line: 2525, col: 1, offset: 72753},
  7095  			expr: &seqExpr{
  7096  				pos: position{line: 2525, col: 13, offset: 72765},
  7097  				exprs: []any{
  7098  					&ruleRefExpr{
  7099  						pos:  position{line: 2525, col: 13, offset: 72765},
  7100  						name: "CMD_HEAD_NO_SPACE",
  7101  					},
  7102  					&ruleRefExpr{
  7103  						pos:  position{line: 2525, col: 31, offset: 72783},
  7104  						name: "SPACE",
  7105  					},
  7106  				},
  7107  			},
  7108  		},
  7109  		{
  7110  			name: "CMD_EVAL",
  7111  			pos:  position{line: 2526, col: 1, offset: 72789},
  7112  			expr: &seqExpr{
  7113  				pos: position{line: 2526, col: 13, offset: 72801},
  7114  				exprs: []any{
  7115  					&litMatcher{
  7116  						pos:        position{line: 2526, col: 13, offset: 72801},
  7117  						val:        "eval",
  7118  						ignoreCase: false,
  7119  						want:       "\"eval\"",
  7120  					},
  7121  					&ruleRefExpr{
  7122  						pos:  position{line: 2526, col: 20, offset: 72808},
  7123  						name: "SPACE",
  7124  					},
  7125  				},
  7126  			},
  7127  		},
  7128  		{
  7129  			name: "CMD_REX",
  7130  			pos:  position{line: 2527, col: 1, offset: 72814},
  7131  			expr: &seqExpr{
  7132  				pos: position{line: 2527, col: 12, offset: 72825},
  7133  				exprs: []any{
  7134  					&litMatcher{
  7135  						pos:        position{line: 2527, col: 12, offset: 72825},
  7136  						val:        "rex",
  7137  						ignoreCase: false,
  7138  						want:       "\"rex\"",
  7139  					},
  7140  					&ruleRefExpr{
  7141  						pos:  position{line: 2527, col: 18, offset: 72831},
  7142  						name: "SPACE",
  7143  					},
  7144  				},
  7145  			},
  7146  		},
  7147  		{
  7148  			name: "CMD_SORT",
  7149  			pos:  position{line: 2528, col: 1, offset: 72837},
  7150  			expr: &seqExpr{
  7151  				pos: position{line: 2528, col: 13, offset: 72849},
  7152  				exprs: []any{
  7153  					&litMatcher{
  7154  						pos:        position{line: 2528, col: 13, offset: 72849},
  7155  						val:        "sort",
  7156  						ignoreCase: false,
  7157  						want:       "\"sort\"",
  7158  					},
  7159  					&ruleRefExpr{
  7160  						pos:  position{line: 2528, col: 20, offset: 72856},
  7161  						name: "SPACE",
  7162  					},
  7163  				},
  7164  			},
  7165  		},
  7166  		{
  7167  			name: "CMD_TOP",
  7168  			pos:  position{line: 2529, col: 1, offset: 72862},
  7169  			expr: &litMatcher{
  7170  				pos:        position{line: 2529, col: 12, offset: 72873},
  7171  				val:        "top",
  7172  				ignoreCase: false,
  7173  				want:       "\"top\"",
  7174  			},
  7175  		},
  7176  		{
  7177  			name: "CMD_RARE",
  7178  			pos:  position{line: 2530, col: 1, offset: 72879},
  7179  			expr: &litMatcher{
  7180  				pos:        position{line: 2530, col: 13, offset: 72891},
  7181  				val:        "rare",
  7182  				ignoreCase: false,
  7183  				want:       "\"rare\"",
  7184  			},
  7185  		},
  7186  		{
  7187  			name: "CMD_RENAME",
  7188  			pos:  position{line: 2531, col: 1, offset: 72898},
  7189  			expr: &seqExpr{
  7190  				pos: position{line: 2531, col: 15, offset: 72912},
  7191  				exprs: []any{
  7192  					&litMatcher{
  7193  						pos:        position{line: 2531, col: 15, offset: 72912},
  7194  						val:        "rename",
  7195  						ignoreCase: false,
  7196  						want:       "\"rename\"",
  7197  					},
  7198  					&ruleRefExpr{
  7199  						pos:  position{line: 2531, col: 24, offset: 72921},
  7200  						name: "SPACE",
  7201  					},
  7202  				},
  7203  			},
  7204  		},
  7205  		{
  7206  			name: "CMD_TIMECHART",
  7207  			pos:  position{line: 2532, col: 1, offset: 72927},
  7208  			expr: &seqExpr{
  7209  				pos: position{line: 2532, col: 18, offset: 72944},
  7210  				exprs: []any{
  7211  					&litMatcher{
  7212  						pos:        position{line: 2532, col: 18, offset: 72944},
  7213  						val:        "timechart",
  7214  						ignoreCase: false,
  7215  						want:       "\"timechart\"",
  7216  					},
  7217  					&ruleRefExpr{
  7218  						pos:  position{line: 2532, col: 30, offset: 72956},
  7219  						name: "SPACE",
  7220  					},
  7221  				},
  7222  			},
  7223  		},
  7224  		{
  7225  			name: "CMD_SPAN",
  7226  			pos:  position{line: 2533, col: 1, offset: 72962},
  7227  			expr: &litMatcher{
  7228  				pos:        position{line: 2533, col: 13, offset: 72974},
  7229  				val:        "span",
  7230  				ignoreCase: false,
  7231  				want:       "\"span\"",
  7232  			},
  7233  		},
  7234  		{
  7235  			name: "CMD_TRANSACTION",
  7236  			pos:  position{line: 2534, col: 1, offset: 72981},
  7237  			expr: &seqExpr{
  7238  				pos: position{line: 2534, col: 20, offset: 73000},
  7239  				exprs: []any{
  7240  					&litMatcher{
  7241  						pos:        position{line: 2534, col: 20, offset: 73000},
  7242  						val:        "transaction",
  7243  						ignoreCase: false,
  7244  						want:       "\"transaction\"",
  7245  					},
  7246  					&ruleRefExpr{
  7247  						pos:  position{line: 2534, col: 34, offset: 73014},
  7248  						name: "SPACE",
  7249  					},
  7250  				},
  7251  			},
  7252  		},
  7253  		{
  7254  			name: "CMD_DEDUP",
  7255  			pos:  position{line: 2535, col: 1, offset: 73020},
  7256  			expr: &litMatcher{
  7257  				pos:        position{line: 2535, col: 14, offset: 73033},
  7258  				val:        "dedup",
  7259  				ignoreCase: false,
  7260  				want:       "\"dedup\"",
  7261  			},
  7262  		},
  7263  		{
  7264  			name: "CMD_DEDUP_SORTBY",
  7265  			pos:  position{line: 2536, col: 1, offset: 73041},
  7266  			expr: &seqExpr{
  7267  				pos: position{line: 2536, col: 21, offset: 73061},
  7268  				exprs: []any{
  7269  					&ruleRefExpr{
  7270  						pos:  position{line: 2536, col: 21, offset: 73061},
  7271  						name: "SPACE",
  7272  					},
  7273  					&litMatcher{
  7274  						pos:        position{line: 2536, col: 27, offset: 73067},
  7275  						val:        "sortby",
  7276  						ignoreCase: false,
  7277  						want:       "\"sortby\"",
  7278  					},
  7279  					&ruleRefExpr{
  7280  						pos:  position{line: 2536, col: 36, offset: 73076},
  7281  						name: "SPACE",
  7282  					},
  7283  				},
  7284  			},
  7285  		},
  7286  		{
  7287  			name: "EVAL_CONCAT",
  7288  			pos:  position{line: 2537, col: 1, offset: 73082},
  7289  			expr: &seqExpr{
  7290  				pos: position{line: 2537, col: 16, offset: 73097},
  7291  				exprs: []any{
  7292  					&zeroOrOneExpr{
  7293  						pos: position{line: 2537, col: 16, offset: 73097},
  7294  						expr: &ruleRefExpr{
  7295  							pos:  position{line: 2537, col: 16, offset: 73097},
  7296  							name: "SPACE",
  7297  						},
  7298  					},
  7299  					&litMatcher{
  7300  						pos:        position{line: 2537, col: 23, offset: 73104},
  7301  						val:        ".",
  7302  						ignoreCase: false,
  7303  						want:       "\".\"",
  7304  					},
  7305  					&zeroOrOneExpr{
  7306  						pos: position{line: 2537, col: 27, offset: 73108},
  7307  						expr: &ruleRefExpr{
  7308  							pos:  position{line: 2537, col: 27, offset: 73108},
  7309  							name: "SPACE",
  7310  						},
  7311  					},
  7312  				},
  7313  			},
  7314  		},
  7315  		{
  7316  			name: "MAJOR_BREAK",
  7317  			pos:  position{line: 2540, col: 1, offset: 73219},
  7318  			expr: &choiceExpr{
  7319  				pos: position{line: 2540, col: 16, offset: 73234},
  7320  				alternatives: []any{
  7321  					&charClassMatcher{
  7322  						pos:        position{line: 2540, col: 16, offset: 73234},
  7323  						val:        "[[\\]<>(){}|!;,'\"*\\n\\r \\t&?+]",
  7324  						chars:      []rune{'[', ']', '<', '>', '(', ')', '{', '}', '|', '!', ';', ',', '\'', '"', '*', '\n', '\r', ' ', '\t', '&', '?', '+'},
  7325  						ignoreCase: false,
  7326  						inverted:   false,
  7327  					},
  7328  					&litMatcher{
  7329  						pos:        position{line: 2540, col: 47, offset: 73265},
  7330  						val:        "%21",
  7331  						ignoreCase: false,
  7332  						want:       "\"%21\"",
  7333  					},
  7334  					&litMatcher{
  7335  						pos:        position{line: 2540, col: 55, offset: 73273},
  7336  						val:        "%26",
  7337  						ignoreCase: false,
  7338  						want:       "\"%26\"",
  7339  					},
  7340  					&litMatcher{
  7341  						pos:        position{line: 2541, col: 16, offset: 73296},
  7342  						val:        "%2526",
  7343  						ignoreCase: false,
  7344  						want:       "\"%2526\"",
  7345  					},
  7346  					&litMatcher{
  7347  						pos:        position{line: 2541, col: 26, offset: 73306},
  7348  						val:        "%3B",
  7349  						ignoreCase: false,
  7350  						want:       "\"%3B\"",
  7351  					},
  7352  					&litMatcher{
  7353  						pos:        position{line: 2541, col: 34, offset: 73314},
  7354  						val:        "%7C",
  7355  						ignoreCase: false,
  7356  						want:       "\"%7C\"",
  7357  					},
  7358  					&litMatcher{
  7359  						pos:        position{line: 2541, col: 42, offset: 73322},
  7360  						val:        "%20",
  7361  						ignoreCase: false,
  7362  						want:       "\"%20\"",
  7363  					},
  7364  					&litMatcher{
  7365  						pos:        position{line: 2541, col: 50, offset: 73330},
  7366  						val:        "%2B",
  7367  						ignoreCase: false,
  7368  						want:       "\"%2B\"",
  7369  					},
  7370  					&litMatcher{
  7371  						pos:        position{line: 2541, col: 58, offset: 73338},
  7372  						val:        "%3D",
  7373  						ignoreCase: false,
  7374  						want:       "\"%3D\"",
  7375  					},
  7376  					&litMatcher{
  7377  						pos:        position{line: 2541, col: 66, offset: 73346},
  7378  						val:        "--",
  7379  						ignoreCase: false,
  7380  						want:       "\"--\"",
  7381  					},
  7382  					&litMatcher{
  7383  						pos:        position{line: 2542, col: 16, offset: 73368},
  7384  						val:        "%2520",
  7385  						ignoreCase: false,
  7386  						want:       "\"%2520\"",
  7387  					},
  7388  					&litMatcher{
  7389  						pos:        position{line: 2542, col: 26, offset: 73378},
  7390  						val:        "%5D",
  7391  						ignoreCase: false,
  7392  						want:       "\"%5D\"",
  7393  					},
  7394  					&litMatcher{
  7395  						pos:        position{line: 2542, col: 34, offset: 73386},
  7396  						val:        "%5B",
  7397  						ignoreCase: false,
  7398  						want:       "\"%5B\"",
  7399  					},
  7400  					&litMatcher{
  7401  						pos:        position{line: 2542, col: 42, offset: 73394},
  7402  						val:        "%3A",
  7403  						ignoreCase: false,
  7404  						want:       "\"%3A\"",
  7405  					},
  7406  					&litMatcher{
  7407  						pos:        position{line: 2542, col: 50, offset: 73402},
  7408  						val:        "%0A",
  7409  						ignoreCase: false,
  7410  						want:       "\"%0A\"",
  7411  					},
  7412  					&litMatcher{
  7413  						pos:        position{line: 2542, col: 58, offset: 73410},
  7414  						val:        "%2C",
  7415  						ignoreCase: false,
  7416  						want:       "\"%2C\"",
  7417  					},
  7418  					&litMatcher{
  7419  						pos:        position{line: 2542, col: 66, offset: 73418},
  7420  						val:        "%28",
  7421  						ignoreCase: false,
  7422  						want:       "\"%28\"",
  7423  					},
  7424  					&litMatcher{
  7425  						pos:        position{line: 2542, col: 74, offset: 73426},
  7426  						val:        "%29",
  7427  						ignoreCase: false,
  7428  						want:       "\"%29\"",
  7429  					},
  7430  				},
  7431  			},
  7432  		},
  7433  		{
  7434  			name: "MINOR_BREAK",
  7435  			pos:  position{line: 2543, col: 1, offset: 73432},
  7436  			expr: &choiceExpr{
  7437  				pos: position{line: 2543, col: 16, offset: 73447},
  7438  				alternatives: []any{
  7439  					&charClassMatcher{
  7440  						pos:        position{line: 2543, col: 16, offset: 73447},
  7441  						val:        "[/:=@.$#%_]",
  7442  						chars:      []rune{'/', ':', '=', '@', '.', '$', '#', '%', '_'},
  7443  						ignoreCase: false,
  7444  						inverted:   false,
  7445  					},
  7446  					&litMatcher{
  7447  						pos:        position{line: 2543, col: 30, offset: 73461},
  7448  						val:        "-",
  7449  						ignoreCase: false,
  7450  						want:       "\"-\"",
  7451  					},
  7452  					&litMatcher{
  7453  						pos:        position{line: 2543, col: 36, offset: 73467},
  7454  						val:        "\\",
  7455  						ignoreCase: false,
  7456  						want:       "\"\\\\\"",
  7457  					},
  7458  				},
  7459  			},
  7460  		},
  7461  		{
  7462  			name: "NOT",
  7463  			pos:  position{line: 2547, col: 1, offset: 73623},
  7464  			expr: &seqExpr{
  7465  				pos: position{line: 2547, col: 8, offset: 73630},
  7466  				exprs: []any{
  7467  					&litMatcher{
  7468  						pos:        position{line: 2547, col: 8, offset: 73630},
  7469  						val:        "NOT",
  7470  						ignoreCase: false,
  7471  						want:       "\"NOT\"",
  7472  					},
  7473  					&ruleRefExpr{
  7474  						pos:  position{line: 2547, col: 14, offset: 73636},
  7475  						name: "SPACE",
  7476  					},
  7477  				},
  7478  			},
  7479  		},
  7480  		{
  7481  			name: "OR",
  7482  			pos:  position{line: 2548, col: 1, offset: 73642},
  7483  			expr: &seqExpr{
  7484  				pos: position{line: 2548, col: 7, offset: 73648},
  7485  				exprs: []any{
  7486  					&ruleRefExpr{
  7487  						pos:  position{line: 2548, col: 7, offset: 73648},
  7488  						name: "SPACE",
  7489  					},
  7490  					&litMatcher{
  7491  						pos:        position{line: 2548, col: 13, offset: 73654},
  7492  						val:        "OR",
  7493  						ignoreCase: false,
  7494  						want:       "\"OR\"",
  7495  					},
  7496  					&ruleRefExpr{
  7497  						pos:  position{line: 2548, col: 18, offset: 73659},
  7498  						name: "SPACE",
  7499  					},
  7500  				},
  7501  			},
  7502  		},
  7503  		{
  7504  			name: "AND",
  7505  			pos:  position{line: 2549, col: 1, offset: 73665},
  7506  			expr: &seqExpr{
  7507  				pos: position{line: 2549, col: 8, offset: 73672},
  7508  				exprs: []any{
  7509  					&ruleRefExpr{
  7510  						pos:  position{line: 2549, col: 8, offset: 73672},
  7511  						name: "SPACE",
  7512  					},
  7513  					&litMatcher{
  7514  						pos:        position{line: 2549, col: 14, offset: 73678},
  7515  						val:        "AND",
  7516  						ignoreCase: false,
  7517  						want:       "\"AND\"",
  7518  					},
  7519  					&ruleRefExpr{
  7520  						pos:  position{line: 2549, col: 20, offset: 73684},
  7521  						name: "SPACE",
  7522  					},
  7523  				},
  7524  			},
  7525  		},
  7526  		{
  7527  			name: "PIPE",
  7528  			pos:  position{line: 2550, col: 1, offset: 73690},
  7529  			expr: &seqExpr{
  7530  				pos: position{line: 2550, col: 9, offset: 73698},
  7531  				exprs: []any{
  7532  					&ruleRefExpr{
  7533  						pos:  position{line: 2550, col: 9, offset: 73698},
  7534  						name: "EMPTY_OR_SPACE",
  7535  					},
  7536  					&litMatcher{
  7537  						pos:        position{line: 2550, col: 24, offset: 73713},
  7538  						val:        "|",
  7539  						ignoreCase: false,
  7540  						want:       "\"|\"",
  7541  					},
  7542  					&ruleRefExpr{
  7543  						pos:  position{line: 2550, col: 28, offset: 73717},
  7544  						name: "EMPTY_OR_SPACE",
  7545  					},
  7546  				},
  7547  			},
  7548  		},
  7549  		{
  7550  			name: "AS",
  7551  			pos:  position{line: 2551, col: 1, offset: 73732},
  7552  			expr: &seqExpr{
  7553  				pos: position{line: 2551, col: 7, offset: 73738},
  7554  				exprs: []any{
  7555  					&ruleRefExpr{
  7556  						pos:  position{line: 2551, col: 7, offset: 73738},
  7557  						name: "SPACE",
  7558  					},
  7559  					&litMatcher{
  7560  						pos:        position{line: 2551, col: 13, offset: 73744},
  7561  						val:        "as",
  7562  						ignoreCase: true,
  7563  						want:       "\"AS\"i",
  7564  					},
  7565  					&ruleRefExpr{
  7566  						pos:  position{line: 2551, col: 19, offset: 73750},
  7567  						name: "SPACE",
  7568  					},
  7569  				},
  7570  			},
  7571  		},
  7572  		{
  7573  			name: "BY",
  7574  			pos:  position{line: 2552, col: 1, offset: 73776},
  7575  			expr: &seqExpr{
  7576  				pos: position{line: 2552, col: 7, offset: 73782},
  7577  				exprs: []any{
  7578  					&ruleRefExpr{
  7579  						pos:  position{line: 2552, col: 7, offset: 73782},
  7580  						name: "SPACE",
  7581  					},
  7582  					&litMatcher{
  7583  						pos:        position{line: 2552, col: 13, offset: 73788},
  7584  						val:        "by",
  7585  						ignoreCase: true,
  7586  						want:       "\"BY\"i",
  7587  					},
  7588  					&ruleRefExpr{
  7589  						pos:  position{line: 2552, col: 19, offset: 73794},
  7590  						name: "SPACE",
  7591  					},
  7592  				},
  7593  			},
  7594  		},
  7595  		{
  7596  			name: "EQUAL",
  7597  			pos:  position{line: 2554, col: 1, offset: 73821},
  7598  			expr: &seqExpr{
  7599  				pos: position{line: 2554, col: 10, offset: 73830},
  7600  				exprs: []any{
  7601  					&ruleRefExpr{
  7602  						pos:  position{line: 2554, col: 10, offset: 73830},
  7603  						name: "EMPTY_OR_SPACE",
  7604  					},
  7605  					&litMatcher{
  7606  						pos:        position{line: 2554, col: 25, offset: 73845},
  7607  						val:        "=",
  7608  						ignoreCase: false,
  7609  						want:       "\"=\"",
  7610  					},
  7611  					&ruleRefExpr{
  7612  						pos:  position{line: 2554, col: 29, offset: 73849},
  7613  						name: "EMPTY_OR_SPACE",
  7614  					},
  7615  				},
  7616  			},
  7617  		},
  7618  		{
  7619  			name: "COMMA",
  7620  			pos:  position{line: 2555, col: 1, offset: 73864},
  7621  			expr: &seqExpr{
  7622  				pos: position{line: 2555, col: 10, offset: 73873},
  7623  				exprs: []any{
  7624  					&ruleRefExpr{
  7625  						pos:  position{line: 2555, col: 10, offset: 73873},
  7626  						name: "EMPTY_OR_SPACE",
  7627  					},
  7628  					&litMatcher{
  7629  						pos:        position{line: 2555, col: 25, offset: 73888},
  7630  						val:        ",",
  7631  						ignoreCase: false,
  7632  						want:       "\",\"",
  7633  					},
  7634  					&ruleRefExpr{
  7635  						pos:  position{line: 2555, col: 29, offset: 73892},
  7636  						name: "EMPTY_OR_SPACE",
  7637  					},
  7638  				},
  7639  			},
  7640  		},
  7641  		{
  7642  			name: "L_PAREN",
  7643  			pos:  position{line: 2556, col: 1, offset: 73907},
  7644  			expr: &seqExpr{
  7645  				pos: position{line: 2556, col: 12, offset: 73918},
  7646  				exprs: []any{
  7647  					&litMatcher{
  7648  						pos:        position{line: 2556, col: 12, offset: 73918},
  7649  						val:        "(",
  7650  						ignoreCase: false,
  7651  						want:       "\"(\"",
  7652  					},
  7653  					&ruleRefExpr{
  7654  						pos:  position{line: 2556, col: 16, offset: 73922},
  7655  						name: "EMPTY_OR_SPACE",
  7656  					},
  7657  				},
  7658  			},
  7659  		},
  7660  		{
  7661  			name: "R_PAREN",
  7662  			pos:  position{line: 2557, col: 1, offset: 73937},
  7663  			expr: &seqExpr{
  7664  				pos: position{line: 2557, col: 12, offset: 73948},
  7665  				exprs: []any{
  7666  					&ruleRefExpr{
  7667  						pos:  position{line: 2557, col: 12, offset: 73948},
  7668  						name: "EMPTY_OR_SPACE",
  7669  					},
  7670  					&litMatcher{
  7671  						pos:        position{line: 2557, col: 27, offset: 73963},
  7672  						val:        ")",
  7673  						ignoreCase: false,
  7674  						want:       "\")\"",
  7675  					},
  7676  				},
  7677  			},
  7678  		},
  7679  		{
  7680  			name: "EOF",
  7681  			pos:  position{line: 2559, col: 1, offset: 73968},
  7682  			expr: &notExpr{
  7683  				pos: position{line: 2559, col: 8, offset: 73975},
  7684  				expr: &anyMatcher{
  7685  					line: 2559, col: 9, offset: 73976,
  7686  				},
  7687  			},
  7688  		},
  7689  		{
  7690  			name: "SPACE",
  7691  			pos:  position{line: 2560, col: 1, offset: 73978},
  7692  			expr: &choiceExpr{
  7693  				pos: position{line: 2560, col: 10, offset: 73987},
  7694  				alternatives: []any{
  7695  					&seqExpr{
  7696  						pos: position{line: 2560, col: 11, offset: 73988},
  7697  						exprs: []any{
  7698  							&zeroOrOneExpr{
  7699  								pos: position{line: 2560, col: 11, offset: 73988},
  7700  								expr: &litMatcher{
  7701  									pos:        position{line: 2560, col: 11, offset: 73988},
  7702  									val:        " ",
  7703  									ignoreCase: false,
  7704  									want:       "\" \"",
  7705  								},
  7706  							},
  7707  							&ruleRefExpr{
  7708  								pos:  position{line: 2560, col: 16, offset: 73993},
  7709  								name: "COMMENT",
  7710  							},
  7711  							&zeroOrOneExpr{
  7712  								pos: position{line: 2560, col: 24, offset: 74001},
  7713  								expr: &litMatcher{
  7714  									pos:        position{line: 2560, col: 24, offset: 74001},
  7715  									val:        " ",
  7716  									ignoreCase: false,
  7717  									want:       "\" \"",
  7718  								},
  7719  							},
  7720  						},
  7721  					},
  7722  					&oneOrMoreExpr{
  7723  						pos: position{line: 2560, col: 32, offset: 74009},
  7724  						expr: &litMatcher{
  7725  							pos:        position{line: 2560, col: 32, offset: 74009},
  7726  							val:        " ",
  7727  							ignoreCase: false,
  7728  							want:       "\" \"",
  7729  						},
  7730  					},
  7731  				},
  7732  			},
  7733  		},
  7734  		{
  7735  			name: "COMMENT",
  7736  			pos:  position{line: 2561, col: 1, offset: 74014},
  7737  			expr: &seqExpr{
  7738  				pos: position{line: 2561, col: 12, offset: 74025},
  7739  				exprs: []any{
  7740  					&litMatcher{
  7741  						pos:        position{line: 2561, col: 12, offset: 74025},
  7742  						val:        "```",
  7743  						ignoreCase: false,
  7744  						want:       "\"```\"",
  7745  					},
  7746  					&zeroOrMoreExpr{
  7747  						pos: position{line: 2561, col: 18, offset: 74031},
  7748  						expr: &seqExpr{
  7749  							pos: position{line: 2561, col: 19, offset: 74032},
  7750  							exprs: []any{
  7751  								&notExpr{
  7752  									pos: position{line: 2561, col: 19, offset: 74032},
  7753  									expr: &litMatcher{
  7754  										pos:        position{line: 2561, col: 21, offset: 74034},
  7755  										val:        "```",
  7756  										ignoreCase: false,
  7757  										want:       "\"```\"",
  7758  									},
  7759  								},
  7760  								&anyMatcher{
  7761  									line: 2561, col: 28, offset: 74041,
  7762  								},
  7763  							},
  7764  						},
  7765  					},
  7766  					&litMatcher{
  7767  						pos:        position{line: 2561, col: 32, offset: 74045},
  7768  						val:        "```",
  7769  						ignoreCase: false,
  7770  						want:       "\"```\"",
  7771  					},
  7772  				},
  7773  			},
  7774  		},
  7775  		{
  7776  			name: "EMPTY_OR_SPACE",
  7777  			pos:  position{line: 2562, col: 1, offset: 74051},
  7778  			expr: &choiceExpr{
  7779  				pos: position{line: 2562, col: 20, offset: 74070},
  7780  				alternatives: []any{
  7781  					&ruleRefExpr{
  7782  						pos:  position{line: 2562, col: 20, offset: 74070},
  7783  						name: "SPACE",
  7784  					},
  7785  					&litMatcher{
  7786  						pos:        position{line: 2562, col: 28, offset: 74078},
  7787  						val:        "",
  7788  						ignoreCase: false,
  7789  						want:       "\"\"",
  7790  					},
  7791  				},
  7792  			},
  7793  		},
  7794  		{
  7795  			name: "EMPTY_OR_COMMA",
  7796  			pos:  position{line: 2563, col: 1, offset: 74081},
  7797  			expr: &choiceExpr{
  7798  				pos: position{line: 2563, col: 20, offset: 74100},
  7799  				alternatives: []any{
  7800  					&ruleRefExpr{
  7801  						pos:  position{line: 2563, col: 20, offset: 74100},
  7802  						name: "COMMA",
  7803  					},
  7804  					&ruleRefExpr{
  7805  						pos:  position{line: 2563, col: 28, offset: 74108},
  7806  						name: "EMPTY_OR_SPACE",
  7807  					},
  7808  				},
  7809  			},
  7810  		},
  7811  	},
  7812  }
  7813  
  7814  func (c *current) onStart1(initialSearch, filterBlocks, queryAggBlocks any) (any, error) {
  7815  	var q ast.QueryStruct
  7816  	q.SearchFilter = initialSearch.(*ast.Node)
  7817  
  7818  	// Join the InitialSearchBlock with the FilterBlocks with AND nodes. For a
  7819  	// search like "A | B | C | D" we should generate the node structure below
  7820  	// so that when we run the search it evaluates A first.
  7821  	//
  7822  	//      AND
  7823  	//     /   \
  7824  	//    A     AND
  7825  	//         /   \
  7826  	//        B     AND
  7827  	//             /   \
  7828  	//            C     D
  7829  
  7830  	filterBlocksSlice := filterBlocks.([]any)
  7831  	switch len(filterBlocksSlice) {
  7832  	case 0:
  7833  		q.SearchFilter = initialSearch.(*ast.Node)
  7834  	case 1:
  7835  		q.SearchFilter = &ast.Node{
  7836  			NodeType: ast.NodeAnd,
  7837  			Left:     initialSearch.(*ast.Node),
  7838  			Right:    filterBlocksSlice[0].(*ast.Node),
  7839  		}
  7840  	default: // len > 1
  7841  		// Iterate backwards so we build the node structure mentioned above.
  7842  		root := filterBlocksSlice[len(filterBlocksSlice)-1].(*ast.Node)
  7843  		for i := len(filterBlocksSlice) - 2; i > -1; i-- {
  7844  			newRoot := &ast.Node{
  7845  				NodeType: ast.NodeAnd,
  7846  				Left:     filterBlocksSlice[i].(*ast.Node),
  7847  				Right:    root,
  7848  			}
  7849  
  7850  			root = newRoot
  7851  		}
  7852  
  7853  		q.SearchFilter = &ast.Node{
  7854  			NodeType: ast.NodeAnd,
  7855  			Left:     initialSearch.(*ast.Node),
  7856  			Right:    root,
  7857  		}
  7858  	}
  7859  
  7860  	if queryAggBlocks != nil {
  7861  		queryAggSlice := queryAggBlocks.([]any)
  7862  
  7863  		if len(queryAggSlice) > 0 {
  7864  			// Chain together all QueryAggergators.
  7865  			q.PipeCommands = queryAggSlice[0].(*structs.QueryAggregators)
  7866  
  7867  			// Go to the end of the first chain.
  7868  			curQueryAgg := q.PipeCommands
  7869  			for ; curQueryAgg.Next != nil; curQueryAgg = curQueryAgg.Next {
  7870  			}
  7871  
  7872  			// Link the remaining chains.
  7873  			for i := range queryAggSlice[1:] {
  7874  				queryAgg := queryAggSlice[i+1].(*structs.QueryAggregators)
  7875  				curQueryAgg.Next = queryAgg
  7876  
  7877  				// Go to the end of this chain.
  7878  				for ; curQueryAgg.Next != nil; curQueryAgg = curQueryAgg.Next {
  7879  				}
  7880  			}
  7881  		}
  7882  	}
  7883  
  7884  	return q, nil
  7885  }
  7886  
  7887  func (p *parser) callonStart1() (any, error) {
  7888  	stack := p.vstack[len(p.vstack)-1]
  7889  	_ = stack
  7890  	return p.cur.onStart1(stack["initialSearch"], stack["filterBlocks"], stack["queryAggBlocks"])
  7891  }
  7892  
  7893  func (c *current) onInitialSearchBlock1(clause any) (any, error) {
  7894  	return clause, nil
  7895  }
  7896  
  7897  func (p *parser) callonInitialSearchBlock1() (any, error) {
  7898  	stack := p.vstack[len(p.vstack)-1]
  7899  	_ = stack
  7900  	return p.cur.onInitialSearchBlock1(stack["clause"])
  7901  }
  7902  
  7903  func (c *current) onSearchBlock1(clause any) (any, error) {
  7904  	return clause, nil
  7905  }
  7906  
  7907  func (p *parser) callonSearchBlock1() (any, error) {
  7908  	stack := p.vstack[len(p.vstack)-1]
  7909  	_ = stack
  7910  	return p.cur.onSearchBlock1(stack["clause"])
  7911  }
  7912  
  7913  func (c *current) onFilterBlock1(block any) (any, error) {
  7914  	return block, nil
  7915  }
  7916  
  7917  func (p *parser) callonFilterBlock1() (any, error) {
  7918  	stack := p.vstack[len(p.vstack)-1]
  7919  	_ = stack
  7920  	return p.cur.onFilterBlock1(stack["block"])
  7921  }
  7922  
  7923  func (c *current) onQueryAggergatorBlock1(block any) (any, error) {
  7924  	queryAgg := block.(*structs.QueryAggregators)
  7925  	return queryAgg, nil
  7926  }
  7927  
  7928  func (p *parser) callonQueryAggergatorBlock1() (any, error) {
  7929  	stack := p.vstack[len(p.vstack)-1]
  7930  	_ = stack
  7931  	return p.cur.onQueryAggergatorBlock1(stack["block"])
  7932  }
  7933  
  7934  func (c *current) onFieldSelectBlock1(op, fields any) (any, error) {
  7935  	columnsRequest := &structs.ColumnsRequest{}
  7936  	if op == nil || string(op.([]byte)) == "+" {
  7937  		columnsRequest.IncludeColumns = fields.([]string)
  7938  	} else {
  7939  		columnsRequest.ExcludeColumns = fields.([]string)
  7940  	}
  7941  
  7942  	queryAggregator := &structs.QueryAggregators{
  7943  		PipeCommandType: structs.OutputTransformType,
  7944  		OutputTransforms: &structs.OutputTransforms{
  7945  			OutputColumns: columnsRequest,
  7946  		},
  7947  	}
  7948  
  7949  	return queryAggregator, nil
  7950  }
  7951  
  7952  func (p *parser) callonFieldSelectBlock1() (any, error) {
  7953  	stack := p.vstack[len(p.vstack)-1]
  7954  	_ = stack
  7955  	return p.cur.onFieldSelectBlock1(stack["op"], stack["fields"])
  7956  }
  7957  
  7958  func (c *current) onAggregatorBlock1(aggs, byFields any) (any, error) {
  7959  	aggNode := &structs.QueryAggregators{}
  7960  
  7961  	// Extract the MeasureAggregators and check if any of the aggregation fields
  7962  	// need to be renamed.
  7963  	aggsSlice := aggs.([]*aggregator)
  7964  	measureAggs := make([]*structs.MeasureAggregator, len(aggsSlice))
  7965  	columnsRequest := &structs.ColumnsRequest{}
  7966  	columnsRequest.RenameAggregationColumns = make(map[string]string, 0)
  7967  
  7968  	for i, agg := range aggsSlice {
  7969  		measureAggs[i] = agg.measureAgg
  7970  
  7971  		if agg.renameOutputField {
  7972  			columnsRequest.RenameAggregationColumns[measureAggs[i].String()] = agg.outputFieldNewName
  7973  		}
  7974  	}
  7975  
  7976  	// If any agg field was renamed, make a QueryAggregators for all the renames.
  7977  	if len(columnsRequest.RenameAggregationColumns) > 0 {
  7978  		renameNode := &structs.QueryAggregators{
  7979  			PipeCommandType: structs.OutputTransformType,
  7980  			OutputTransforms: &structs.OutputTransforms{
  7981  				OutputColumns: columnsRequest,
  7982  			},
  7983  		}
  7984  
  7985  		aggNode.Next = renameNode
  7986  	}
  7987  
  7988  	if byFields == nil {
  7989  		aggNode.PipeCommandType = structs.MeasureAggsType
  7990  		aggNode.MeasureOperations = measureAggs
  7991  	} else {
  7992  		aggNode.PipeCommandType = structs.GroupByType
  7993  		aggNode.GroupByRequest = &structs.GroupByRequest{
  7994  			MeasureOperations: measureAggs,
  7995  			GroupByColumns:    byFields.([]string),
  7996  		}
  7997  		aggNode.BucketLimit = query.MAX_GRP_BUCKS
  7998  	}
  7999  
  8000  	return aggNode, nil
  8001  }
  8002  
  8003  func (p *parser) callonAggregatorBlock1() (any, error) {
  8004  	stack := p.vstack[len(p.vstack)-1]
  8005  	_ = stack
  8006  	return p.cur.onAggregatorBlock1(stack["aggs"], stack["byFields"])
  8007  }
  8008  
  8009  func (c *current) onGroupbyBlock1(fields any) (any, error) {
  8010  	// Wildcard fields are not allowed. See https://docs.splunk.com/Documentation/Splunk/9.1.0/SearchReference/Stats
  8011  	for _, field := range fields.([]string) {
  8012  		if strings.Contains(field, "*") {
  8013  			return nil, errors.New("BY clause cannot contain fields with wildcards")
  8014  		}
  8015  	}
  8016  
  8017  	return fields, nil
  8018  }
  8019  
  8020  func (p *parser) callonGroupbyBlock1() (any, error) {
  8021  	stack := p.vstack[len(p.vstack)-1]
  8022  	_ = stack
  8023  	return p.cur.onGroupbyBlock1(stack["fields"])
  8024  }
  8025  
  8026  func (c *current) onRegexBlock1(keyAndOp, str any) (any, error) {
  8027  	var key, op string
  8028  	if keyAndOp == nil {
  8029  		key = "*"
  8030  		op = "="
  8031  	} else {
  8032  		keyAndOpSlice := keyAndOp.([]any)
  8033  		key = keyAndOpSlice[0].(string)
  8034  		op = keyAndOpSlice[1].(string)
  8035  	}
  8036  
  8037  	// Remove the quotation marks.
  8038  	regex := str.(string)
  8039  	regex = regex[1 : len(regex)-1]
  8040  
  8041  	node := &ast.Node{
  8042  		NodeType: ast.NodeTerminal,
  8043  		Comparison: ast.Comparison{
  8044  			Op:           op,
  8045  			Field:        key,
  8046  			Values:       regex,
  8047  			ValueIsRegex: true,
  8048  		},
  8049  	}
  8050  
  8051  	return node, nil
  8052  }
  8053  
  8054  func (p *parser) callonRegexBlock1() (any, error) {
  8055  	stack := p.vstack[len(p.vstack)-1]
  8056  	_ = stack
  8057  	return p.cur.onRegexBlock1(stack["keyAndOp"], stack["str"])
  8058  }
  8059  
  8060  func (c *current) onClauseLevel41(first, rest any) (any, error) {
  8061  	if rest == nil {
  8062  		return first, nil
  8063  	}
  8064  
  8065  	cur := first.(*ast.Node)
  8066  	for _, v := range rest.([]any) {
  8067  		parts := v.([]any) // This will be [(AND / SPACE), ClauseLevel3].
  8068  		cur = &ast.Node{
  8069  			NodeType: ast.NodeAnd,
  8070  			Left:     cur,
  8071  			Right:    parts[1].(*ast.Node),
  8072  		}
  8073  	}
  8074  
  8075  	return cur, nil
  8076  }
  8077  
  8078  func (p *parser) callonClauseLevel41() (any, error) {
  8079  	stack := p.vstack[len(p.vstack)-1]
  8080  	_ = stack
  8081  	return p.cur.onClauseLevel41(stack["first"], stack["rest"])
  8082  }
  8083  
  8084  func (c *current) onClauseLevel31(first, rest any) (any, error) {
  8085  	if rest == nil {
  8086  		return first, nil
  8087  	}
  8088  
  8089  	cur := first.(*ast.Node)
  8090  	for _, v := range rest.([]any) {
  8091  		parts := v.([]any) // This will be [OR, ClauseLevel2].
  8092  		cur = &ast.Node{
  8093  			NodeType: ast.NodeOr,
  8094  			Left:     cur,
  8095  			Right:    parts[1].(*ast.Node),
  8096  		}
  8097  	}
  8098  
  8099  	return cur, nil
  8100  }
  8101  
  8102  func (p *parser) callonClauseLevel31() (any, error) {
  8103  	stack := p.vstack[len(p.vstack)-1]
  8104  	_ = stack
  8105  	return p.cur.onClauseLevel31(stack["first"], stack["rest"])
  8106  }
  8107  
  8108  func (c *current) onClauseLevel22(notList, first any) (any, error) {
  8109  	// There's an issue with how queries with AST Not nodes are run, so use
  8110  	// De Morgan's law to manipulate the expression.
  8111  	node := first.(*ast.Node)
  8112  	numNots := len(notList.([]any))
  8113  
  8114  	if numNots%2 == 1 {
  8115  		deMorgansLaw(node)
  8116  	}
  8117  
  8118  	return node, nil
  8119  }
  8120  
  8121  func (p *parser) callonClauseLevel22() (any, error) {
  8122  	stack := p.vstack[len(p.vstack)-1]
  8123  	_ = stack
  8124  	return p.cur.onClauseLevel22(stack["notList"], stack["first"])
  8125  }
  8126  
  8127  func (c *current) onClauseLevel29(clause any) (any, error) {
  8128  	return clause, nil
  8129  }
  8130  
  8131  func (p *parser) callonClauseLevel29() (any, error) {
  8132  	stack := p.vstack[len(p.vstack)-1]
  8133  	_ = stack
  8134  	return p.cur.onClauseLevel29(stack["clause"])
  8135  }
  8136  
  8137  func (c *current) onClauseLevel12(clause any) (any, error) {
  8138  	return clause, nil
  8139  }
  8140  
  8141  func (p *parser) callonClauseLevel12() (any, error) {
  8142  	stack := p.vstack[len(p.vstack)-1]
  8143  	_ = stack
  8144  	return p.cur.onClauseLevel12(stack["clause"])
  8145  }
  8146  
  8147  func (c *current) onClauseLevel18(term any) (any, error) {
  8148  	return term, nil
  8149  }
  8150  
  8151  func (p *parser) callonClauseLevel18() (any, error) {
  8152  	stack := p.vstack[len(p.vstack)-1]
  8153  	_ = stack
  8154  	return p.cur.onClauseLevel18(stack["term"])
  8155  }
  8156  
  8157  func (c *current) onSearchTerm1(term any) (any, error) {
  8158  	return term, nil
  8159  }
  8160  
  8161  func (p *parser) callonSearchTerm1() (any, error) {
  8162  	stack := p.vstack[len(p.vstack)-1]
  8163  	_ = stack
  8164  	return p.cur.onSearchTerm1(stack["term"])
  8165  }
  8166  
  8167  func (c *current) onTimechartBlock1(tcArgs, limitExpr any) (any, error) {
  8168  	aggNode := &structs.QueryAggregators{}
  8169  
  8170  	columnsRequest := &structs.ColumnsRequest{}
  8171  	columnsRequest.RenameAggregationColumns = make(map[string]string, 0)
  8172  	measureAggs := make([]*structs.MeasureAggregator, 0)
  8173  
  8174  	timechartExpr := &structs.TimechartExpr{}
  8175  	byField := ""
  8176  
  8177  	if tcArgs == nil {
  8178  		return nil, fmt.Errorf("spl peg: timechart: either single-agg or eval-expression by split-by-clause is required")
  8179  	}
  8180  
  8181  	timechartArgs := tcArgs.(*TimechartArgs)
  8182  
  8183  	// Todo: Should add || timechartArgs.evalExpr == nil
  8184  	if timechartArgs.singleAggExpr == nil {
  8185  		return nil, fmt.Errorf("spl peg: timechart: either single-agg or eval-expression by split-by-clause is required")
  8186  	}
  8187  
  8188  	var bOptions *structs.BinOptions
  8189  
  8190  	if timechartArgs.tcOptions != nil {
  8191  		if timechartArgs.tcOptions.BinOptions != nil {
  8192  			bOptions = timechartArgs.tcOptions.BinOptions
  8193  		}
  8194  	}
  8195  
  8196  	if timechartArgs.singleAggExpr != nil {
  8197  		singleAgg := &structs.SingleAgg{}
  8198  		aggTemp := timechartArgs.singleAggExpr
  8199  
  8200  		for i, agg := range aggTemp.aggregators {
  8201  			measureAggs = append(measureAggs, agg.measureAgg)
  8202  
  8203  			if agg.renameOutputField {
  8204  				measureAggs[i].StrEnc = agg.outputFieldNewName
  8205  			}
  8206  		}
  8207  
  8208  		singleAgg.MeasureOperations = measureAggs
  8209  		timechartExpr.SingleAgg = singleAgg
  8210  
  8211  		if aggTemp.SplitByClause != nil {
  8212  			byField = aggTemp.SplitByClause.Field
  8213  		}
  8214  	}
  8215  
  8216  	// TODO: if timechartArgs.evalExpr != nil {}
  8217  
  8218  	aggNode.PipeCommandType = structs.GroupByType
  8219  	aggNode.GroupByRequest = &structs.GroupByRequest{
  8220  		MeasureOperations: measureAggs,
  8221  		GroupByColumns:    []string{"timestamp"},
  8222  	}
  8223  	aggNode.BucketLimit = query.MAX_GRP_BUCKS
  8224  
  8225  	if bOptions == nil {
  8226  		bOptions = &structs.BinOptions{
  8227  			SpanOptions: &structs.SpanOptions{
  8228  				DefaultSettings: true,
  8229  				SpanLength: &structs.SpanLength{
  8230  					Num:       1,
  8231  					TimeScalr: utils.TMMinute,
  8232  				},
  8233  			},
  8234  		}
  8235  	}
  8236  
  8237  	var limitExprTmp *structs.LimitExpr
  8238  	if limitExpr != nil {
  8239  		limitExprTmp = limitExpr.(*structs.LimitExpr)
  8240  		if len(measureAggs) > 1 {
  8241  			limitExprTmp.LimitScoreMode = structs.LSMByFreq
  8242  		}
  8243  	}
  8244  
  8245  	timeBucket := aggregations.InitTimeBucket(bOptions.SpanOptions.SpanLength.Num, bOptions.SpanOptions.SpanLength.TimeScalr, byField, limitExprTmp, len(measureAggs))
  8246  	aggNode.TimeHistogram = timeBucket
  8247  
  8248  	return aggNode, nil
  8249  }
  8250  
  8251  func (p *parser) callonTimechartBlock1() (any, error) {
  8252  	stack := p.vstack[len(p.vstack)-1]
  8253  	_ = stack
  8254  	return p.cur.onTimechartBlock1(stack["tcArgs"], stack["limitExpr"])
  8255  }
  8256  
  8257  func (c *current) onTimechartArgumentsList1(first, rest any) (any, error) {
  8258  	restSlice := rest.([]any)
  8259  	timechartArgs := &TimechartArgs{}
  8260  
  8261  	numArgs := 1 + len(restSlice)
  8262  
  8263  	for i := 0; i < numArgs; i++ {
  8264  
  8265  		var numArg interface{}
  8266  
  8267  		if i == 0 {
  8268  			numArg = first
  8269  		} else {
  8270  			numArg = restSlice[i-1].([]any)[1]
  8271  		}
  8272  
  8273  		switch numArg.(type) {
  8274  		case *singleAggTemp:
  8275  			timechartArgs.singleAggExpr = numArg.(*singleAggTemp)
  8276  		case *structs.TcOptions:
  8277  			timechartArgs.tcOptions = numArg.(*structs.TcOptions)
  8278  		default:
  8279  			return nil, fmt.Errorf("Spl peg: Timechart: invalid timechart argument: %v", numArg)
  8280  		}
  8281  	}
  8282  
  8283  	return timechartArgs, nil
  8284  }
  8285  
  8286  func (p *parser) callonTimechartArgumentsList1() (any, error) {
  8287  	stack := p.vstack[len(p.vstack)-1]
  8288  	_ = stack
  8289  	return p.cur.onTimechartArgumentsList1(stack["first"], stack["rest"])
  8290  }
  8291  
  8292  func (c *current) onTimechartArgument1(tcArg any) (any, error) {
  8293  	return tcArg, nil
  8294  }
  8295  
  8296  func (p *parser) callonTimechartArgument1() (any, error) {
  8297  	stack := p.vstack[len(p.vstack)-1]
  8298  	_ = stack
  8299  	return p.cur.onTimechartArgument1(stack["tcArg"])
  8300  }
  8301  
  8302  func (c *current) onSingleAggExpr1(aggs, splitByClause any) (any, error) {
  8303  	singleAggExpr := &singleAggTemp{
  8304  		aggregators: aggs.([]*aggregator),
  8305  	}
  8306  
  8307  	if splitByClause != nil {
  8308  		singleAggExpr.SplitByClause = splitByClause.(*structs.SplitByClause)
  8309  	}
  8310  
  8311  	return singleAggExpr, nil
  8312  }
  8313  
  8314  func (p *parser) callonSingleAggExpr1() (any, error) {
  8315  	stack := p.vstack[len(p.vstack)-1]
  8316  	_ = stack
  8317  	return p.cur.onSingleAggExpr1(stack["aggs"], stack["splitByClause"])
  8318  }
  8319  
  8320  func (c *current) onSplitByClause1(field any) (any, error) {
  8321  	splitByClause := &structs.SplitByClause{
  8322  		Field: field.(string),
  8323  	}
  8324  
  8325  	return splitByClause, nil
  8326  }
  8327  
  8328  func (p *parser) callonSplitByClause1() (any, error) {
  8329  	stack := p.vstack[len(p.vstack)-1]
  8330  	_ = stack
  8331  	return p.cur.onSplitByClause1(stack["field"])
  8332  }
  8333  
  8334  func (c *current) onTcOptions1(option any) (any, error) {
  8335  	//Default value
  8336  	tcOptions := &structs.TcOptions{
  8337  		UseNull:  true,
  8338  		UseOther: true,
  8339  		NullStr:  "null",
  8340  		OtherStr: "other",
  8341  	}
  8342  	switch option.(type) {
  8343  	case *structs.BinOptions:
  8344  		tcOptions.BinOptions = option.(*structs.BinOptions)
  8345  	case [][]string:
  8346  		optionSlice := option.([]any)
  8347  		for _, opt := range optionSlice {
  8348  			optArr := opt.([]string)
  8349  			switch optArr[0] {
  8350  			case "usenull":
  8351  				useNullBool, err := strconv.ParseBool(optArr[1])
  8352  				if err != nil {
  8353  					return nil, fmt.Errorf("Spl peg: Timechart: TcOptions: %v", err)
  8354  				}
  8355  				tcOptions.UseNull = useNullBool
  8356  			case "useother":
  8357  				useOtherBool, err := strconv.ParseBool(optArr[1])
  8358  				if err != nil {
  8359  					return nil, fmt.Errorf("Spl peg: Timechart: TcOptions: %v", err)
  8360  				}
  8361  				tcOptions.UseOther = useOtherBool
  8362  			case "nullstr":
  8363  				tcOptions.OtherStr = optArr[1]
  8364  			case "otherstr":
  8365  				tcOptions.OtherStr = optArr[1]
  8366  			default:
  8367  				return nil, fmt.Errorf("Spl peg: Timechart: TcOptions: invalid option: %v", optArr[0])
  8368  			}
  8369  		}
  8370  	default:
  8371  		return nil, fmt.Errorf("Spl peg: Timechart: Invalid tcOptions %v", option)
  8372  	}
  8373  	return tcOptions, nil
  8374  }
  8375  
  8376  func (p *parser) callonTcOptions1() (any, error) {
  8377  	stack := p.vstack[len(p.vstack)-1]
  8378  	_ = stack
  8379  	return p.cur.onTcOptions1(stack["option"])
  8380  }
  8381  
  8382  func (c *current) onTcOption1(tcOptionCMD, val any) (any, error) {
  8383  	tcOptionArr := []string{tcOptionCMD.(string), val.(string)}
  8384  	return tcOptionArr, nil
  8385  }
  8386  
  8387  func (p *parser) callonTcOption1() (any, error) {
  8388  	stack := p.vstack[len(p.vstack)-1]
  8389  	_ = stack
  8390  	return p.cur.onTcOption1(stack["tcOptionCMD"], stack["val"])
  8391  }
  8392  
  8393  func (c *current) onTcOptionCMD1(option any) (any, error) {
  8394  	optionStr, err := transferUint8ToString(option)
  8395  	if err != nil {
  8396  		return nil, fmt.Errorf("Spl peg: Timechart: TcOptionCMD: %v", err)
  8397  	}
  8398  	return optionStr, nil
  8399  }
  8400  
  8401  func (p *parser) callonTcOptionCMD1() (any, error) {
  8402  	stack := p.vstack[len(p.vstack)-1]
  8403  	_ = stack
  8404  	return p.cur.onTcOptionCMD1(stack["option"])
  8405  }
  8406  
  8407  func (c *current) onBinOptions1(spanOptions any) (any, error) {
  8408  	binOptions := &structs.BinOptions{
  8409  		SpanOptions: spanOptions.(*structs.SpanOptions),
  8410  	}
  8411  	return binOptions, nil
  8412  }
  8413  
  8414  func (p *parser) callonBinOptions1() (any, error) {
  8415  	stack := p.vstack[len(p.vstack)-1]
  8416  	_ = stack
  8417  	return p.cur.onBinOptions1(stack["spanOptions"])
  8418  }
  8419  
  8420  func (c *current) onSpanOptions1(spanLength any) (any, error) {
  8421  	spanOptions := &structs.SpanOptions{
  8422  		SpanLength: spanLength.(*structs.SpanLength),
  8423  	}
  8424  	return spanOptions, nil
  8425  }
  8426  
  8427  func (p *parser) callonSpanOptions1() (any, error) {
  8428  	stack := p.vstack[len(p.vstack)-1]
  8429  	_ = stack
  8430  	return p.cur.onSpanOptions1(stack["spanLength"])
  8431  }
  8432  
  8433  func (c *current) onSpanLength1(intAsStr, timeScale any) (any, error) {
  8434  	num, err := strconv.Atoi(intAsStr.(string))
  8435  	if err != nil {
  8436  		return nil, fmt.Errorf("SpanLength: Invalid num (%v): %v", intAsStr.(string), err)
  8437  	}
  8438  
  8439  	spanLength := &structs.SpanLength{
  8440  		Num:       num,
  8441  		TimeScalr: timeScale.(utils.TimeUnit),
  8442  	}
  8443  	return spanLength, nil
  8444  }
  8445  
  8446  func (p *parser) callonSpanLength1() (any, error) {
  8447  	stack := p.vstack[len(p.vstack)-1]
  8448  	_ = stack
  8449  	return p.cur.onSpanLength1(stack["intAsStr"], stack["timeScale"])
  8450  }
  8451  
  8452  func (c *current) onTimeScale1(timeUnit any) (any, error) {
  8453  	return timeUnit, nil
  8454  }
  8455  
  8456  func (p *parser) callonTimeScale1() (any, error) {
  8457  	stack := p.vstack[len(p.vstack)-1]
  8458  	_ = stack
  8459  	return p.cur.onTimeScale1(stack["timeUnit"])
  8460  }
  8461  
  8462  func (c *current) onLimitExpr1(sortBy, intAsStr any) (any, error) {
  8463  	num, err := strconv.Atoi(intAsStr.(string))
  8464  	if err != nil {
  8465  		return nil, fmt.Errorf("SpanLength: Invalid num (%v): %v", intAsStr.(string), err)
  8466  	}
  8467  
  8468  	limitExpr := &structs.LimitExpr{
  8469  		IsTop: true, // Default Value
  8470  		Num:   num,
  8471  	}
  8472  
  8473  	if sortBy != nil {
  8474  		sortByStr, err := transferUint8ToString(sortBy)
  8475  		if err != nil {
  8476  			return nil, fmt.Errorf("Spl peg: Timechart: %v", err)
  8477  		}
  8478  		if sortByStr == "bottom" {
  8479  			limitExpr.IsTop = false
  8480  		}
  8481  	}
  8482  
  8483  	return limitExpr, nil
  8484  }
  8485  
  8486  func (p *parser) callonLimitExpr1() (any, error) {
  8487  	stack := p.vstack[len(p.vstack)-1]
  8488  	_ = stack
  8489  	return p.cur.onLimitExpr1(stack["sortBy"], stack["intAsStr"])
  8490  }
  8491  
  8492  func (c *current) onStatisticBlock1(statisticExpr any) (any, error) {
  8493  	letColReq := &structs.LetColumnsRequest{
  8494  		StatisticColRequest: statisticExpr.(*structs.StatisticExpr),
  8495  	}
  8496  
  8497  	root := &structs.QueryAggregators{
  8498  		PipeCommandType: structs.OutputTransformType,
  8499  		OutputTransforms: &structs.OutputTransforms{
  8500  			LetColumns: letColReq,
  8501  		},
  8502  	}
  8503  
  8504  	measureAgg := &structs.MeasureAggregator{
  8505  		MeasureCol:  "*",
  8506  		MeasureFunc: utils.Count,
  8507  	}
  8508  
  8509  	measureOperations := make([]*structs.MeasureAggregator, 1)
  8510  	measureOperations[0] = measureAgg
  8511  
  8512  	groupByColumns := append(statisticExpr.(*structs.StatisticExpr).FieldList, statisticExpr.(*structs.StatisticExpr).ByClause...)
  8513  
  8514  	aggNode := &structs.QueryAggregators{}
  8515  	aggNode.Next = root
  8516  	aggNode.PipeCommandType = structs.GroupByType
  8517  	aggNode.GroupByRequest = &structs.GroupByRequest{
  8518  		MeasureOperations: measureOperations,
  8519  		GroupByColumns:    groupByColumns,
  8520  	}
  8521  
  8522  	return aggNode, nil
  8523  }
  8524  
  8525  func (p *parser) callonStatisticBlock1() (any, error) {
  8526  	stack := p.vstack[len(p.vstack)-1]
  8527  	_ = stack
  8528  	return p.cur.onStatisticBlock1(stack["statisticExpr"])
  8529  }
  8530  
  8531  func (c *current) onStatisticExpr1(cmd, limit, fieldList, byClause, options any) (any, error) {
  8532  
  8533  	statisticExpr := &structs.StatisticExpr{
  8534  		FieldList: fieldList.([]interface{})[1].([]string),
  8535  	}
  8536  
  8537  	statisticCmd, err := transferUint8ToString(cmd)
  8538  	if err != nil {
  8539  		return nil, fmt.Errorf("Spl peg: StatisticExpr: %v", err)
  8540  	}
  8541  
  8542  	if statisticCmd == "top" {
  8543  		statisticExpr.StatisticFunctionMode = structs.SFMTop
  8544  	} else {
  8545  		statisticExpr.StatisticFunctionMode = structs.SFMRare
  8546  	}
  8547  
  8548  	if limit != nil {
  8549  		statisticExpr.Limit = limit.(string)
  8550  	}
  8551  
  8552  	if options != nil {
  8553  		statisticExpr.StatisticOptions = options.(*structs.StatisticOptions)
  8554  	} else {
  8555  		statisticExpr.StatisticOptions = &structs.StatisticOptions{
  8556  			ShowCount:    true,
  8557  			CountField:   "count",
  8558  			ShowPerc:     true,
  8559  			PercentField: "percent",
  8560  			UseOther:     false,
  8561  			OtherStr:     "Other",
  8562  		}
  8563  	}
  8564  
  8565  	if byClause != nil {
  8566  		statisticExpr.ByClause = byClause.([]string)
  8567  	}
  8568  
  8569  	return statisticExpr, nil
  8570  }
  8571  
  8572  func (p *parser) callonStatisticExpr1() (any, error) {
  8573  	stack := p.vstack[len(p.vstack)-1]
  8574  	_ = stack
  8575  	return p.cur.onStatisticExpr1(stack["cmd"], stack["limit"], stack["fieldList"], stack["byClause"], stack["options"])
  8576  }
  8577  
  8578  func (c *current) onStatisticLimit2(number any) (any, error) {
  8579  	return number.(string), nil
  8580  }
  8581  
  8582  func (p *parser) callonStatisticLimit2() (any, error) {
  8583  	stack := p.vstack[len(p.vstack)-1]
  8584  	_ = stack
  8585  	return p.cur.onStatisticLimit2(stack["number"])
  8586  }
  8587  
  8588  func (c *current) onStatisticLimit7(limit any) (any, error) {
  8589  	return limit.(string), nil
  8590  }
  8591  
  8592  func (p *parser) callonStatisticLimit7() (any, error) {
  8593  	stack := p.vstack[len(p.vstack)-1]
  8594  	_ = stack
  8595  	return p.cur.onStatisticLimit7(stack["limit"])
  8596  }
  8597  
  8598  func (c *current) onStatisticOptions1(option any) (any, error) {
  8599  	//Default value
  8600  	options := &structs.StatisticOptions{
  8601  		ShowCount:    true,
  8602  		CountField:   "count",
  8603  		ShowPerc:     true,
  8604  		PercentField: "percent",
  8605  		UseOther:     false,
  8606  		OtherStr:     "other",
  8607  	}
  8608  
  8609  	optionSlice := option.([]any)
  8610  	for _, opt := range optionSlice {
  8611  		optArr := opt.([]string)
  8612  		// Check for matching option types
  8613  		switch optArr[0] {
  8614  		case "showcount":
  8615  			showCountBool, err := strconv.ParseBool(optArr[1])
  8616  			if err != nil {
  8617  				return nil, fmt.Errorf("Spl peg: StatisticBlock: Options: %v", err)
  8618  			}
  8619  			options.ShowCount = showCountBool
  8620  		case "countfield":
  8621  			options.CountField = optArr[1]
  8622  		case "showperc":
  8623  			showPercBool, err := strconv.ParseBool(optArr[1])
  8624  			if err != nil {
  8625  				return nil, fmt.Errorf("Spl peg: StatisticBlock: Options: %v", err)
  8626  			}
  8627  			options.ShowPerc = showPercBool
  8628  		case "percentfield":
  8629  			options.PercentField = optArr[1]
  8630  		case "useother":
  8631  			useOtherBool, err := strconv.ParseBool(optArr[1])
  8632  			if err != nil {
  8633  				return nil, fmt.Errorf("Spl peg: StatisticBlock: Options: %v", err)
  8634  			}
  8635  			options.UseOther = useOtherBool
  8636  		case "otherstr":
  8637  			options.OtherStr = optArr[1]
  8638  		default:
  8639  			return nil, fmt.Errorf("Spl peg: StatisticBlock: Options: invalid option")
  8640  		}
  8641  	}
  8642  
  8643  	return options, nil
  8644  }
  8645  
  8646  func (p *parser) callonStatisticOptions1() (any, error) {
  8647  	stack := p.vstack[len(p.vstack)-1]
  8648  	_ = stack
  8649  	return p.cur.onStatisticOptions1(stack["option"])
  8650  }
  8651  
  8652  func (c *current) onStatisticOption1(optionCMD, field any) (any, error) {
  8653  	optionArr := []string{optionCMD.(string), field.(string)}
  8654  	return optionArr, nil
  8655  }
  8656  
  8657  func (p *parser) callonStatisticOption1() (any, error) {
  8658  	stack := p.vstack[len(p.vstack)-1]
  8659  	_ = stack
  8660  	return p.cur.onStatisticOption1(stack["optionCMD"], stack["field"])
  8661  }
  8662  
  8663  func (c *current) onStatisticOptionCMD1(option any) (any, error) {
  8664  	optionStr, err := transferUint8ToString(option)
  8665  	if err != nil {
  8666  		return nil, fmt.Errorf("Spl peg: StatisticExpr: %v", err)
  8667  	}
  8668  	return optionStr, nil
  8669  }
  8670  
  8671  func (p *parser) callonStatisticOptionCMD1() (any, error) {
  8672  	stack := p.vstack[len(p.vstack)-1]
  8673  	_ = stack
  8674  	return p.cur.onStatisticOptionCMD1(stack["option"])
  8675  }
  8676  
  8677  func (c *current) onByClause2(fieldList any) (any, error) {
  8678  	return fieldList.([]string), nil
  8679  }
  8680  
  8681  func (p *parser) callonByClause2() (any, error) {
  8682  	stack := p.vstack[len(p.vstack)-1]
  8683  	_ = stack
  8684  	return p.cur.onByClause2(stack["fieldList"])
  8685  }
  8686  
  8687  func (c *current) onByClause7(groupByBlock any) (any, error) {
  8688  	return groupByBlock.([]string), nil
  8689  }
  8690  
  8691  func (p *parser) callonByClause7() (any, error) {
  8692  	stack := p.vstack[len(p.vstack)-1]
  8693  	_ = stack
  8694  	return p.cur.onByClause7(stack["groupByBlock"])
  8695  }
  8696  
  8697  func (c *current) onDedupBlock1(dedupExpr any) (any, error) {
  8698  
  8699  	letColReq := &structs.LetColumnsRequest{
  8700  		DedupColRequest: dedupExpr.(*structs.DedupExpr),
  8701  	}
  8702  
  8703  	root := &structs.QueryAggregators{
  8704  		PipeCommandType: structs.OutputTransformType,
  8705  		OutputTransforms: &structs.OutputTransforms{
  8706  			LetColumns: letColReq,
  8707  		},
  8708  	}
  8709  
  8710  	return root, nil
  8711  }
  8712  
  8713  func (p *parser) callonDedupBlock1() (any, error) {
  8714  	stack := p.vstack[len(p.vstack)-1]
  8715  	_ = stack
  8716  	return p.cur.onDedupBlock1(stack["dedupExpr"])
  8717  }
  8718  
  8719  func (c *current) onDedupExpr1(limitArr, options1, fieldList, options2, sortByClause any) (any, error) {
  8720  	dedupExpr := &structs.DedupExpr{
  8721  		FieldList:         fieldList.([]string),
  8722  		Limit:             1,
  8723  		DedupCombinations: make(map[string]map[int][]structs.SortValue, 0),
  8724  		DedupRecords:      make(map[string]map[string]interface{}, 0),
  8725  	}
  8726  
  8727  	if limitArr != nil {
  8728  		limitStr := limitArr.([]interface{})[1].(string)
  8729  		limit, err := strconv.ParseUint(limitStr, 10, 64)
  8730  		if err != nil || limit == 0 {
  8731  			return nil, fmt.Errorf("Invalid limit (%v): %v", limitStr, err)
  8732  		}
  8733  		dedupExpr.Limit = limit
  8734  	}
  8735  
  8736  	dedupExpr.DedupOptions = &structs.DedupOptions{
  8737  		Consecutive: false,
  8738  		KeepEmpty:   false,
  8739  		KeepEvents:  false,
  8740  	}
  8741  
  8742  	if options1 != nil {
  8743  		dedupExpr.DedupOptions = options1.(*structs.DedupOptions)
  8744  	}
  8745  	if options2 != nil {
  8746  		options := options2.(*structs.DedupOptions)
  8747  
  8748  		if options.Consecutive {
  8749  			dedupExpr.DedupOptions.Consecutive = options.Consecutive
  8750  		}
  8751  		if options.KeepEmpty {
  8752  			dedupExpr.DedupOptions.KeepEmpty = options.KeepEmpty
  8753  		}
  8754  		if options.KeepEvents {
  8755  			dedupExpr.DedupOptions.KeepEvents = options.KeepEvents
  8756  		}
  8757  	}
  8758  
  8759  	if sortByClause != nil {
  8760  		dedupExpr.DedupSortEles = sortByClause.([]*structs.SortElement)
  8761  
  8762  		// Make the DedupSortAscending from the DedupSortEles.
  8763  		dedupExpr.DedupSortAscending = make([]int, len(dedupExpr.DedupSortEles))
  8764  		for i, ele := range dedupExpr.DedupSortEles {
  8765  			if ele.SortByAsc {
  8766  				dedupExpr.DedupSortAscending[i] = 1
  8767  			} else {
  8768  				dedupExpr.DedupSortAscending[i] = -1
  8769  			}
  8770  		}
  8771  	}
  8772  
  8773  	return dedupExpr, nil
  8774  }
  8775  
  8776  func (p *parser) callonDedupExpr1() (any, error) {
  8777  	stack := p.vstack[len(p.vstack)-1]
  8778  	_ = stack
  8779  	return p.cur.onDedupExpr1(stack["limitArr"], stack["options1"], stack["fieldList"], stack["options2"], stack["sortByClause"])
  8780  }
  8781  
  8782  func (c *current) onDedupFieldName1(field any) (any, error) {
  8783  	return field, nil
  8784  }
  8785  
  8786  func (p *parser) callonDedupFieldName1() (any, error) {
  8787  	stack := p.vstack[len(p.vstack)-1]
  8788  	_ = stack
  8789  	return p.cur.onDedupFieldName1(stack["field"])
  8790  }
  8791  
  8792  func (c *current) onDedupFieldList1(first, rest any) (any, error) {
  8793  	// Convert `rest` to a slice. Each element of the slice will be a 2-element
  8794  	// slice where the first element is " " and the second is a FieldName.
  8795  	restSlice := rest.([]any)
  8796  
  8797  	numFieldNames := 1 + len(restSlice)
  8798  	fields := make([]string, numFieldNames)
  8799  	fields[0] = first.(string)
  8800  
  8801  	for i := 1; i < numFieldNames; i++ {
  8802  		separatorAndField := restSlice[i-1].([]any)
  8803  		fields[i] = separatorAndField[1].(string)
  8804  	}
  8805  
  8806  	return fields, nil
  8807  }
  8808  
  8809  func (p *parser) callonDedupFieldList1() (any, error) {
  8810  	stack := p.vstack[len(p.vstack)-1]
  8811  	_ = stack
  8812  	return p.cur.onDedupFieldList1(stack["first"], stack["rest"])
  8813  }
  8814  
  8815  func (c *current) onDedupOptions1(option any) (any, error) {
  8816  	//Default value
  8817  	options := &structs.DedupOptions{
  8818  		Consecutive: false,
  8819  		KeepEmpty:   false,
  8820  		KeepEvents:  false,
  8821  	}
  8822  
  8823  	optionSlice := option.([]any)
  8824  	for _, opt := range optionSlice {
  8825  		optArr := opt.([]string)
  8826  		// Check for matching option types
  8827  		switch optArr[0] {
  8828  		case "consecutive":
  8829  			consecutiveBool, err := strconv.ParseBool(optArr[1])
  8830  			if err != nil {
  8831  				return nil, fmt.Errorf("Spl peg: DedupBlock: Options: %v", err)
  8832  			}
  8833  			options.Consecutive = consecutiveBool
  8834  		case "keepempty":
  8835  			keepEmptyBool, err := strconv.ParseBool(optArr[1])
  8836  			if err != nil {
  8837  				return nil, fmt.Errorf("Spl peg: DedupBlock: Options: %v", err)
  8838  			}
  8839  			options.KeepEmpty = keepEmptyBool
  8840  		case "keepevents":
  8841  			keepEventsBool, err := strconv.ParseBool(optArr[1])
  8842  			if err != nil {
  8843  				return nil, fmt.Errorf("Spl peg: DedupBlock: Options: %v", err)
  8844  			}
  8845  			options.KeepEvents = keepEventsBool
  8846  		default:
  8847  			return nil, fmt.Errorf("Spl peg: DedupBlock: Options: invalid option")
  8848  		}
  8849  	}
  8850  
  8851  	return options, nil
  8852  }
  8853  
  8854  func (p *parser) callonDedupOptions1() (any, error) {
  8855  	stack := p.vstack[len(p.vstack)-1]
  8856  	_ = stack
  8857  	return p.cur.onDedupOptions1(stack["option"])
  8858  }
  8859  
  8860  func (c *current) onDedupOption1(optionCMD, field any) (any, error) {
  8861  	optionArr := []string{optionCMD.(string), field.(string)}
  8862  	return optionArr, nil
  8863  }
  8864  
  8865  func (p *parser) callonDedupOption1() (any, error) {
  8866  	stack := p.vstack[len(p.vstack)-1]
  8867  	_ = stack
  8868  	return p.cur.onDedupOption1(stack["optionCMD"], stack["field"])
  8869  }
  8870  
  8871  func (c *current) onDedupOptionCMD1(option any) (any, error) {
  8872  	optionStr, err := transferUint8ToString(option)
  8873  	if err != nil {
  8874  		return nil, fmt.Errorf("Spl peg: DedupExpr: %v", err)
  8875  	}
  8876  	return optionStr, nil
  8877  }
  8878  
  8879  func (p *parser) callonDedupOptionCMD1() (any, error) {
  8880  	stack := p.vstack[len(p.vstack)-1]
  8881  	_ = stack
  8882  	return p.cur.onDedupOptionCMD1(stack["option"])
  8883  }
  8884  
  8885  func (c *current) onDedupSortByClause1(dedupSortEles any) (any, error) {
  8886  	return dedupSortEles, nil
  8887  }
  8888  
  8889  func (p *parser) callonDedupSortByClause1() (any, error) {
  8890  	stack := p.vstack[len(p.vstack)-1]
  8891  	_ = stack
  8892  	return p.cur.onDedupSortByClause1(stack["dedupSortEles"])
  8893  }
  8894  
  8895  func (c *current) onSortElements1(first, rest any) (any, error) {
  8896  	restSlice := rest.([]any)
  8897  
  8898  	length := 1 + len(restSlice)
  8899  	sortEles := make([]*structs.SortElement, length)
  8900  	sortEles[0] = first.(*structs.SortElement)
  8901  
  8902  	for i := 1; i < length; i++ {
  8903  		elements := restSlice[i-1].([]any)
  8904  		sortEles[i] = elements[1].(*structs.SortElement)
  8905  	}
  8906  
  8907  	return sortEles, nil
  8908  }
  8909  
  8910  func (p *parser) callonSortElements1() (any, error) {
  8911  	stack := p.vstack[len(p.vstack)-1]
  8912  	_ = stack
  8913  	return p.cur.onSortElements1(stack["first"], stack["rest"])
  8914  }
  8915  
  8916  func (c *current) onSingleSortElement1(element any) (any, error) {
  8917  	return element, nil
  8918  }
  8919  
  8920  func (p *parser) callonSingleSortElement1() (any, error) {
  8921  	stack := p.vstack[len(p.vstack)-1]
  8922  	_ = stack
  8923  	return p.cur.onSingleSortElement1(stack["element"])
  8924  }
  8925  
  8926  func (c *current) onSingleSortElementWithoutCast1(sortBySymbol, field any) (any, error) {
  8927  	sortByAsc := true
  8928  
  8929  	symbol := sortBySymbol.([]byte)
  8930  	if len(symbol) > 0 && symbol[0] == '-' {
  8931  		sortByAsc = false
  8932  	}
  8933  
  8934  	return &structs.SortElement{
  8935  		SortByAsc: sortByAsc,
  8936  		Op:        "",
  8937  		Field:     field.(string),
  8938  	}, nil
  8939  }
  8940  
  8941  func (p *parser) callonSingleSortElementWithoutCast1() (any, error) {
  8942  	stack := p.vstack[len(p.vstack)-1]
  8943  	_ = stack
  8944  	return p.cur.onSingleSortElementWithoutCast1(stack["sortBySymbol"], stack["field"])
  8945  }
  8946  
  8947  func (c *current) onSingleSortElementWithCast1(sortBySymbol, op, field any) (any, error) {
  8948  	sortByAsc := true
  8949  
  8950  	symbol := sortBySymbol.([]byte)
  8951  	if len(symbol) > 0 && symbol[0] == '-' {
  8952  		sortByAsc = false
  8953  	}
  8954  
  8955  	opStr, err := transferUint8ToString(op)
  8956  	if err != nil {
  8957  		return nil, fmt.Errorf("Spl peg: singleSortElementWithCast: %v", err)
  8958  	}
  8959  
  8960  	return &structs.SortElement{
  8961  		SortByAsc: sortByAsc,
  8962  		Op:        opStr,
  8963  		Field:     field.(string),
  8964  	}, nil
  8965  }
  8966  
  8967  func (p *parser) callonSingleSortElementWithCast1() (any, error) {
  8968  	stack := p.vstack[len(p.vstack)-1]
  8969  	_ = stack
  8970  	return p.cur.onSingleSortElementWithCast1(stack["sortBySymbol"], stack["op"], stack["field"])
  8971  }
  8972  
  8973  func (c *current) onRenameBlock1(renameExpr any) (any, error) {
  8974  	letColReq := &structs.LetColumnsRequest{
  8975  		RenameColRequest: renameExpr.(*structs.RenameExpr),
  8976  	}
  8977  
  8978  	root := &structs.QueryAggregators{
  8979  		PipeCommandType: structs.OutputTransformType,
  8980  		OutputTransforms: &structs.OutputTransforms{
  8981  			LetColumns: letColReq,
  8982  		},
  8983  	}
  8984  
  8985  	return root, nil
  8986  }
  8987  
  8988  func (p *parser) callonRenameBlock1() (any, error) {
  8989  	stack := p.vstack[len(p.vstack)-1]
  8990  	_ = stack
  8991  	return p.cur.onRenameBlock1(stack["renameExpr"])
  8992  }
  8993  
  8994  func (c *current) onRenameExpr2(originalPattern, newPattern any) (any, error) {
  8995  	renameExpr := &structs.RenameExpr{
  8996  		RenameExprMode:  structs.REMPhrase,
  8997  		OriginalPattern: originalPattern.(string),
  8998  		NewPattern:      removeQuotes(newPattern),
  8999  	}
  9000  
  9001  	return renameExpr, nil
  9002  }
  9003  
  9004  func (p *parser) callonRenameExpr2() (any, error) {
  9005  	stack := p.vstack[len(p.vstack)-1]
  9006  	_ = stack
  9007  	return p.cur.onRenameExpr2(stack["originalPattern"], stack["newPattern"])
  9008  }
  9009  
  9010  func (c *current) onRenameExpr9(originalPattern, newPattern any) (any, error) {
  9011  	isRegex, err := isRegexRename(originalPattern.(string), newPattern.(string))
  9012  	if err != nil {
  9013  		return nil, fmt.Errorf("Spl peg: RenameExpr: %v", err)
  9014  	}
  9015  
  9016  	var renameExprMode structs.RenameExprMode
  9017  	if isRegex {
  9018  		renameExprMode = structs.REMRegex
  9019  	} else {
  9020  		renameExprMode = structs.REMOverride
  9021  	}
  9022  
  9023  	renameExpr := &structs.RenameExpr{
  9024  		RenameExprMode:  renameExprMode,
  9025  		OriginalPattern: originalPattern.(string),
  9026  		NewPattern:      newPattern.(string),
  9027  	}
  9028  
  9029  	return renameExpr, nil
  9030  }
  9031  
  9032  func (p *parser) callonRenameExpr9() (any, error) {
  9033  	stack := p.vstack[len(p.vstack)-1]
  9034  	_ = stack
  9035  	return p.cur.onRenameExpr9(stack["originalPattern"], stack["newPattern"])
  9036  }
  9037  
  9038  func (c *current) onRexBlock1(field, str any) (any, error) {
  9039  	pattern := removeQuotes(str)
  9040  	rexColNames, err := getRexColNames(pattern)
  9041  	if err != nil {
  9042  		return nil, fmt.Errorf("Spl peg: RexBlock: %v", err)
  9043  	}
  9044  	rexExpr := &structs.RexExpr{
  9045  		FieldName:   field.(string),
  9046  		Pattern:     transferPCREToRE2(pattern),
  9047  		RexColNames: rexColNames,
  9048  	}
  9049  
  9050  	letColReq := &structs.LetColumnsRequest{
  9051  		RexColRequest: rexExpr,
  9052  	}
  9053  
  9054  	root := &structs.QueryAggregators{
  9055  		PipeCommandType: structs.OutputTransformType,
  9056  		OutputTransforms: &structs.OutputTransforms{
  9057  			LetColumns: letColReq,
  9058  		},
  9059  	}
  9060  
  9061  	return root, nil
  9062  }
  9063  
  9064  func (p *parser) callonRexBlock1() (any, error) {
  9065  	stack := p.vstack[len(p.vstack)-1]
  9066  	_ = stack
  9067  	return p.cur.onRexBlock1(stack["field"], stack["str"])
  9068  }
  9069  
  9070  func (c *current) onSortBlock1(sortByEles any) (any, error) {
  9071  
  9072  	sortExpr := &structs.SortExpr{
  9073  		SortEles:    sortByEles.([]*structs.SortElement),
  9074  		SortRecords: make(map[string]map[string]interface{}, 0),
  9075  	}
  9076  
  9077  	ascendingArr := make([]int, len(sortExpr.SortEles))
  9078  	for i, ele := range sortExpr.SortEles {
  9079  		if ele.SortByAsc {
  9080  			ascendingArr[i] = 1
  9081  		} else {
  9082  			ascendingArr[i] = -1
  9083  		}
  9084  	}
  9085  
  9086  	sortExpr.SortAscending = ascendingArr
  9087  
  9088  	letColReq := &structs.LetColumnsRequest{
  9089  		SortColRequest: sortExpr,
  9090  	}
  9091  
  9092  	root := &structs.QueryAggregators{
  9093  		PipeCommandType: structs.OutputTransformType,
  9094  		OutputTransforms: &structs.OutputTransforms{
  9095  			LetColumns: letColReq,
  9096  		},
  9097  	}
  9098  
  9099  	return root, nil
  9100  }
  9101  
  9102  func (p *parser) callonSortBlock1() (any, error) {
  9103  	stack := p.vstack[len(p.vstack)-1]
  9104  	_ = stack
  9105  	return p.cur.onSortBlock1(stack["sortByEles"])
  9106  }
  9107  
  9108  func (c *current) onEvalBlock1(first, rest any) (any, error) {
  9109  	root := &structs.QueryAggregators{
  9110  		PipeCommandType: structs.OutputTransformType,
  9111  		OutputTransforms: &structs.OutputTransforms{
  9112  			LetColumns: first.(*structs.LetColumnsRequest),
  9113  		},
  9114  	}
  9115  
  9116  	leafQueryAgg := root
  9117  	restSlice := rest.([]any)
  9118  	for i := range restSlice {
  9119  		CommaSpaceAndEval := restSlice[i].([]any)
  9120  		nextQueryAgg := &structs.QueryAggregators{
  9121  			PipeCommandType: structs.OutputTransformType,
  9122  			OutputTransforms: &structs.OutputTransforms{
  9123  				LetColumns: CommaSpaceAndEval[1].(*structs.LetColumnsRequest),
  9124  			},
  9125  		}
  9126  
  9127  		leafQueryAgg.Next = nextQueryAgg
  9128  		leafQueryAgg = leafQueryAgg.Next
  9129  	}
  9130  
  9131  	return root, nil
  9132  }
  9133  
  9134  func (p *parser) callonEvalBlock1() (any, error) {
  9135  	stack := p.vstack[len(p.vstack)-1]
  9136  	_ = stack
  9137  	return p.cur.onEvalBlock1(stack["first"], stack["rest"])
  9138  }
  9139  
  9140  func (c *current) onSingleEval1(field, expr any) (any, error) {
  9141  	fieldStr := field.(string)
  9142  	if strings.Contains(fieldStr, "*") {
  9143  		return nil, fmt.Errorf("New fields must not contain wildcards; invalid field: %v", field)
  9144  	}
  9145  
  9146  	letColumnsRequest := expr.(*structs.LetColumnsRequest)
  9147  	letColumnsRequest.NewColName = fieldStr
  9148  
  9149  	return letColumnsRequest, nil
  9150  }
  9151  
  9152  func (p *parser) callonSingleEval1() (any, error) {
  9153  	stack := p.vstack[len(p.vstack)-1]
  9154  	_ = stack
  9155  	return p.cur.onSingleEval1(stack["field"], stack["expr"])
  9156  }
  9157  
  9158  func (c *current) onEvalExpression1(value any) (any, error) {
  9159  	letColReq := &structs.LetColumnsRequest{
  9160  		ValueColRequest: value.(*structs.ValueExpr),
  9161  	}
  9162  
  9163  	return letColReq, nil
  9164  }
  9165  
  9166  func (p *parser) callonEvalExpression1() (any, error) {
  9167  	stack := p.vstack[len(p.vstack)-1]
  9168  	_ = stack
  9169  	return p.cur.onEvalExpression1(stack["value"])
  9170  }
  9171  
  9172  func (c *current) onConditionExpr1(condition, trueValue, falseValue any) (any, error) {
  9173  
  9174  	node := &structs.ConditionExpr{
  9175  		Op:         "if",
  9176  		BoolExpr:   condition.(*structs.BoolExpr),
  9177  		TrueValue:  trueValue.(*structs.ValueExpr),
  9178  		FalseValue: falseValue.(*structs.ValueExpr),
  9179  	}
  9180  
  9181  	return node, nil
  9182  }
  9183  
  9184  func (p *parser) callonConditionExpr1() (any, error) {
  9185  	stack := p.vstack[len(p.vstack)-1]
  9186  	_ = stack
  9187  	return p.cur.onConditionExpr1(stack["condition"], stack["trueValue"], stack["falseValue"])
  9188  }
  9189  
  9190  func (c *current) onTextExpr2(opName, stringExpr any) (any, error) {
  9191  	opNameStr, err := transferUint8ToString(opName)
  9192  	if err != nil {
  9193  		return nil, fmt.Errorf("Spl peg: TextExpr: %v", err)
  9194  	}
  9195  	node := &structs.TextExpr{
  9196  		Op:          opNameStr,
  9197  		Value:       stringExpr.(*structs.StringExpr),
  9198  		StrToRemove: "",
  9199  	}
  9200  
  9201  	return node, nil
  9202  }
  9203  
  9204  func (p *parser) callonTextExpr2() (any, error) {
  9205  	stack := p.vstack[len(p.vstack)-1]
  9206  	_ = stack
  9207  	return p.cur.onTextExpr2(stack["opName"], stack["stringExpr"])
  9208  }
  9209  
  9210  func (c *current) onTextExpr10(opName, firstVal, rest any) (any, error) {
  9211  	opNameStr, err := transferUint8ToString(opName)
  9212  	if err != nil {
  9213  		return nil, fmt.Errorf("Spl peg: TextExpr: %v", err)
  9214  	}
  9215  	if rest == nil {
  9216  		return firstVal, nil
  9217  	}
  9218  	restSlice := rest.([]any)
  9219  	values := make([]*structs.StringExpr, 1+len(restSlice))
  9220  	values[0] = firstVal.(*structs.StringExpr)
  9221  
  9222  	for i := range restSlice {
  9223  		stringAtom := restSlice[i].([]any)
  9224  		values[i+1] = stringAtom[1].(*structs.StringExpr)
  9225  	}
  9226  	node := &structs.TextExpr{
  9227  		Op:           opNameStr,
  9228  		MaxMinValues: values,
  9229  	}
  9230  	return node, nil
  9231  
  9232  }
  9233  
  9234  func (p *parser) callonTextExpr10() (any, error) {
  9235  	stack := p.vstack[len(p.vstack)-1]
  9236  	_ = stack
  9237  	return p.cur.onTextExpr10(stack["opName"], stack["firstVal"], stack["rest"])
  9238  }
  9239  
  9240  func (c *current) onTextExpr25(opName, url any) (any, error) {
  9241  	opNameStr, err := transferUint8ToString(opName)
  9242  	if err != nil {
  9243  		return nil, fmt.Errorf("Spl peg: TextExpr: %v", err)
  9244  	}
  9245  	node := &structs.TextExpr{
  9246  		Op:          opNameStr,
  9247  		Value:       url.(*structs.StringExpr),
  9248  		StrToRemove: "",
  9249  	}
  9250  	return node, nil
  9251  
  9252  }
  9253  
  9254  func (p *parser) callonTextExpr25() (any, error) {
  9255  	stack := p.vstack[len(p.vstack)-1]
  9256  	_ = stack
  9257  	return p.cur.onTextExpr25(stack["opName"], stack["url"])
  9258  }
  9259  
  9260  func (c *current) onTextExpr33(opName, stringExpr, delim any) (any, error) {
  9261  	opNameStr, err := transferUint8ToString(opName)
  9262  	if err != nil {
  9263  		return nil, fmt.Errorf("Spl peg: TextExpr: %v", err)
  9264  	}
  9265  	node := &structs.TextExpr{
  9266  		Op:        opNameStr,
  9267  		Value:     stringExpr.(*structs.StringExpr),
  9268  		Delimiter: delim.(*structs.StringExpr),
  9269  	}
  9270  	return node, nil
  9271  }
  9272  
  9273  func (p *parser) callonTextExpr33() (any, error) {
  9274  	stack := p.vstack[len(p.vstack)-1]
  9275  	_ = stack
  9276  	return p.cur.onTextExpr33(stack["opName"], stack["stringExpr"], stack["delim"])
  9277  }
  9278  
  9279  func (c *current) onTextExpr44(opName, stringExpr, startIndex, lengthParam any) (any, error) {
  9280  	opNameStr, err := transferUint8ToString(opName)
  9281  	if err != nil {
  9282  		return nil, fmt.Errorf("Spl peg: TextExpr: %v", err)
  9283  	}
  9284  	stringExprConverted, ok := stringExpr.(*structs.StringExpr)
  9285  	if !ok {
  9286  		return nil, fmt.Errorf("Spl peg: TextExpr: Failed to assert stringExpr as *structs.StringExpr")
  9287  	}
  9288  	startIndexConverted, ok := startIndex.(*structs.NumericExpr)
  9289  	if !ok {
  9290  		return nil, fmt.Errorf("Spl peg: TextExpr: Failed to assert startIndex as *structs.NumericExpr")
  9291  	}
  9292  	var lengthConverted *structs.NumericExpr
  9293  	if lengthParam != nil {
  9294  		lengthSlice, ok := lengthParam.([]interface{})
  9295  		if ok && len(lengthSlice) > 1 {
  9296  			length, ok := lengthSlice[1].(*structs.NumericExpr)
  9297  			if ok {
  9298  				lengthConverted = length
  9299  			} else {
  9300  				return nil, fmt.Errorf("Spl peg: TextExpr: Unable to assert length as *structs.NumericExpr")
  9301  			}
  9302  		}
  9303  	}
  9304  	node := &structs.TextExpr{
  9305  		Op:         opNameStr,
  9306  		Value:      stringExprConverted,
  9307  		StartIndex: startIndexConverted,
  9308  		LengthExpr: lengthConverted,
  9309  	}
  9310  	return node, nil
  9311  }
  9312  
  9313  func (p *parser) callonTextExpr44() (any, error) {
  9314  	stack := p.vstack[len(p.vstack)-1]
  9315  	_ = stack
  9316  	return p.cur.onTextExpr44(stack["opName"], stack["stringExpr"], stack["startIndex"], stack["lengthParam"])
  9317  }
  9318  
  9319  func (c *current) onTextExpr60(value, format any) (any, error) {
  9320  	var formatExpr *structs.StringExpr
  9321  	if format != nil {
  9322  		formatSlice := format.([]interface{})
  9323  		formatExpr, _ = formatSlice[1].(*structs.StringExpr)
  9324  	}
  9325  	return &structs.TextExpr{
  9326  		IsTerminal: false,
  9327  		Op:         "tostring",
  9328  		Val:        value.(*structs.ValueExpr),
  9329  		Format:     formatExpr,
  9330  	}, nil
  9331  }
  9332  
  9333  func (p *parser) callonTextExpr60() (any, error) {
  9334  	stack := p.vstack[len(p.vstack)-1]
  9335  	_ = stack
  9336  	return p.cur.onTextExpr60(stack["value"], stack["format"])
  9337  }
  9338  
  9339  func (c *current) onTextExpr72(opName, expr, strToRemoveExpr any) (any, error) {
  9340  	opNameStr, err := transferUint8ToString(opName)
  9341  	if err != nil {
  9342  		return nil, fmt.Errorf("Spl peg: TextExpr: %v", err)
  9343  	}
  9344  
  9345  	stringExpr, ok := expr.(*structs.StringExpr)
  9346  	if !ok {
  9347  		return nil, fmt.Errorf("Spl peg: TextExpr: Failed to assert expr as *structs.StringExpr: %v", err)
  9348  	}
  9349  
  9350  	strToRemove := " \t"
  9351  	if strToRemoveExpr != nil {
  9352  		strToRemove = strToRemoveExpr.(string)
  9353  	}
  9354  
  9355  	node := &structs.TextExpr{
  9356  		Op:          opNameStr,
  9357  		Value:       stringExpr,
  9358  		StrToRemove: removeQuotes(strToRemove),
  9359  	}
  9360  
  9361  	return node, nil
  9362  }
  9363  
  9364  func (p *parser) callonTextExpr72() (any, error) {
  9365  	stack := p.vstack[len(p.vstack)-1]
  9366  	_ = stack
  9367  	return p.cur.onTextExpr72(stack["opName"], stack["expr"], stack["strToRemoveExpr"])
  9368  }
  9369  
  9370  func (c *current) onStrToRemoveExpr1(strToRemove any) (any, error) {
  9371  	return strToRemove, nil
  9372  }
  9373  
  9374  func (p *parser) callonStrToRemoveExpr1() (any, error) {
  9375  	stack := p.vstack[len(p.vstack)-1]
  9376  	_ = stack
  9377  	return p.cur.onStrToRemoveExpr1(stack["strToRemove"])
  9378  }
  9379  
  9380  func (c *current) onEvalFieldToRead2() (any, error) {
  9381  	return string(c.text), nil
  9382  }
  9383  
  9384  func (p *parser) callonEvalFieldToRead2() (any, error) {
  9385  	stack := p.vstack[len(p.vstack)-1]
  9386  	_ = stack
  9387  	return p.cur.onEvalFieldToRead2()
  9388  }
  9389  
  9390  func (c *current) onEvalFieldToRead8(field any) (any, error) {
  9391  	return field, nil
  9392  }
  9393  
  9394  func (p *parser) callonEvalFieldToRead8() (any, error) {
  9395  	stack := p.vstack[len(p.vstack)-1]
  9396  	_ = stack
  9397  	return p.cur.onEvalFieldToRead8(stack["field"])
  9398  }
  9399  
  9400  func (c *current) onWhereBlock1(condition any) (any, error) {
  9401  	queryAgg := &structs.QueryAggregators{
  9402  		PipeCommandType: structs.OutputTransformType,
  9403  		OutputTransforms: &structs.OutputTransforms{
  9404  			FilterRows: condition.(*structs.BoolExpr),
  9405  		},
  9406  	}
  9407  
  9408  	return queryAgg, nil
  9409  }
  9410  
  9411  func (p *parser) callonWhereBlock1() (any, error) {
  9412  	stack := p.vstack[len(p.vstack)-1]
  9413  	_ = stack
  9414  	return p.cur.onWhereBlock1(stack["condition"])
  9415  }
  9416  
  9417  func (c *current) onBoolExpr1(expr any) (any, error) {
  9418  	return expr, nil
  9419  }
  9420  
  9421  func (p *parser) callonBoolExpr1() (any, error) {
  9422  	stack := p.vstack[len(p.vstack)-1]
  9423  	_ = stack
  9424  	return p.cur.onBoolExpr1(stack["expr"])
  9425  }
  9426  
  9427  func (c *current) onBoolExprLevel41(first, rest any) (any, error) {
  9428  	if rest == nil {
  9429  		return first, nil
  9430  	}
  9431  
  9432  	cur := first.(*structs.BoolExpr)
  9433  	for _, v := range rest.([]any) {
  9434  		opAndClause := v.([]any)
  9435  		cur = &structs.BoolExpr{
  9436  			IsTerminal: false,
  9437  			BoolOp:     structs.BoolOpOr,
  9438  			LeftBool:   cur,
  9439  			RightBool:  opAndClause[1].(*structs.BoolExpr),
  9440  		}
  9441  	}
  9442  
  9443  	return cur, nil
  9444  }
  9445  
  9446  func (p *parser) callonBoolExprLevel41() (any, error) {
  9447  	stack := p.vstack[len(p.vstack)-1]
  9448  	_ = stack
  9449  	return p.cur.onBoolExprLevel41(stack["first"], stack["rest"])
  9450  }
  9451  
  9452  func (c *current) onBoolExprLevel31(first, rest any) (any, error) {
  9453  	if rest == nil {
  9454  		return first, nil
  9455  	}
  9456  
  9457  	cur := first.(*structs.BoolExpr)
  9458  	for _, v := range rest.([]any) {
  9459  		opAndClause := v.([]any)
  9460  		cur = &structs.BoolExpr{
  9461  			IsTerminal: false,
  9462  			BoolOp:     structs.BoolOpAnd,
  9463  			LeftBool:   cur,
  9464  			RightBool:  opAndClause[1].(*structs.BoolExpr),
  9465  		}
  9466  	}
  9467  
  9468  	return cur, nil
  9469  }
  9470  
  9471  func (p *parser) callonBoolExprLevel31() (any, error) {
  9472  	stack := p.vstack[len(p.vstack)-1]
  9473  	_ = stack
  9474  	return p.cur.onBoolExprLevel31(stack["first"], stack["rest"])
  9475  }
  9476  
  9477  func (c *current) onBoolExprLevel22(first any) (any, error) {
  9478  	cur := &structs.BoolExpr{
  9479  		IsTerminal: false,
  9480  		BoolOp:     structs.BoolOpNot,
  9481  		LeftBool:   first.(*structs.BoolExpr),
  9482  		RightBool:  nil,
  9483  	}
  9484  
  9485  	return cur, nil
  9486  }
  9487  
  9488  func (p *parser) callonBoolExprLevel22() (any, error) {
  9489  	stack := p.vstack[len(p.vstack)-1]
  9490  	_ = stack
  9491  	return p.cur.onBoolExprLevel22(stack["first"])
  9492  }
  9493  
  9494  func (c *current) onBoolExprLevel29(first any) (any, error) {
  9495  	return first, nil
  9496  }
  9497  
  9498  func (p *parser) callonBoolExprLevel29() (any, error) {
  9499  	stack := p.vstack[len(p.vstack)-1]
  9500  	_ = stack
  9501  	return p.cur.onBoolExprLevel29(stack["first"])
  9502  }
  9503  
  9504  func (c *current) onBoolExprLevel12(first any) (any, error) {
  9505  	return first, nil
  9506  }
  9507  
  9508  func (p *parser) callonBoolExprLevel12() (any, error) {
  9509  	stack := p.vstack[len(p.vstack)-1]
  9510  	_ = stack
  9511  	return p.cur.onBoolExprLevel12(stack["first"])
  9512  }
  9513  
  9514  func (c *current) onBoolExprLevel18(op, value any) (any, error) {
  9515  	opNameStr, err := transferUint8ToString(op)
  9516  	if err != nil {
  9517  		return nil, fmt.Errorf("Spl peg: BoolExpr: %v", err)
  9518  	}
  9519  	expr := &structs.BoolExpr{
  9520  		IsTerminal: true,
  9521  		LeftValue:  value.(*structs.ValueExpr),
  9522  		RightValue: nil,
  9523  		ValueOp:    opNameStr,
  9524  	}
  9525  	return expr, nil
  9526  }
  9527  
  9528  func (p *parser) callonBoolExprLevel18() (any, error) {
  9529  	stack := p.vstack[len(p.vstack)-1]
  9530  	_ = stack
  9531  	return p.cur.onBoolExprLevel18(stack["op"], stack["value"])
  9532  }
  9533  
  9534  func (c *current) onBoolExprLevel120(likeExpr any) (any, error) {
  9535  	return likeExpr, nil
  9536  }
  9537  
  9538  func (p *parser) callonBoolExprLevel120() (any, error) {
  9539  	stack := p.vstack[len(p.vstack)-1]
  9540  	_ = stack
  9541  	return p.cur.onBoolExprLevel120(stack["likeExpr"])
  9542  }
  9543  
  9544  func (c *current) onLikeExpr2(left, right any) (any, error) {
  9545  	expr := &structs.BoolExpr{
  9546  		IsTerminal: true,
  9547  		LeftValue:  left.(*structs.ValueExpr),
  9548  		RightValue: right.(*structs.ValueExpr),
  9549  		ValueOp:    "like",
  9550  	}
  9551  	return expr, nil
  9552  }
  9553  
  9554  func (p *parser) callonLikeExpr2() (any, error) {
  9555  	stack := p.vstack[len(p.vstack)-1]
  9556  	_ = stack
  9557  	return p.cur.onLikeExpr2(stack["left"], stack["right"])
  9558  }
  9559  
  9560  func (c *current) onLikeExpr11(stringr, pattern any) (any, error) {
  9561  	expr := &structs.BoolExpr{
  9562  		IsTerminal: true,
  9563  		LeftValue:  stringr.(*structs.ValueExpr),
  9564  		RightValue: pattern.(*structs.ValueExpr),
  9565  		ValueOp:    "like",
  9566  	}
  9567  	return expr, nil
  9568  
  9569  }
  9570  
  9571  func (p *parser) callonLikeExpr11() (any, error) {
  9572  	stack := p.vstack[len(p.vstack)-1]
  9573  	_ = stack
  9574  	return p.cur.onLikeExpr11(stack["stringr"], stack["pattern"])
  9575  }
  9576  
  9577  func (c *current) onLikeExpr21(stringVal, pattern any) (any, error) {
  9578  	expr := &structs.BoolExpr{
  9579  		IsTerminal: true,
  9580  		LeftValue:  stringVal.(*structs.ValueExpr),
  9581  		RightValue: pattern.(*structs.ValueExpr),
  9582  		ValueOp:    "match",
  9583  	}
  9584  	return expr, nil
  9585  
  9586  }
  9587  
  9588  func (p *parser) callonLikeExpr21() (any, error) {
  9589  	stack := p.vstack[len(p.vstack)-1]
  9590  	_ = stack
  9591  	return p.cur.onLikeExpr21(stack["stringVal"], stack["pattern"])
  9592  }
  9593  
  9594  func (c *current) onLikeExpr31(cidr, ip any) (any, error) {
  9595  	expr := &structs.BoolExpr{
  9596  		IsTerminal: true,
  9597  		LeftValue:  cidr.(*structs.ValueExpr),
  9598  		RightValue: ip.(*structs.ValueExpr),
  9599  		ValueOp:    "cidrmatch",
  9600  	}
  9601  	return expr, nil
  9602  }
  9603  
  9604  func (p *parser) callonLikeExpr31() (any, error) {
  9605  	stack := p.vstack[len(p.vstack)-1]
  9606  	_ = stack
  9607  	return p.cur.onLikeExpr31(stack["cidr"], stack["ip"])
  9608  }
  9609  
  9610  func (c *current) onLikeExpr41(inExpr any) (any, error) {
  9611  	return inExpr, nil
  9612  }
  9613  
  9614  func (p *parser) callonLikeExpr41() (any, error) {
  9615  	stack := p.vstack[len(p.vstack)-1]
  9616  	_ = stack
  9617  	return p.cur.onLikeExpr41(stack["inExpr"])
  9618  }
  9619  
  9620  func (c *current) onLikeExpr44(boolComparisonExpr any) (any, error) {
  9621  	return boolComparisonExpr, nil
  9622  }
  9623  
  9624  func (p *parser) callonLikeExpr44() (any, error) {
  9625  	stack := p.vstack[len(p.vstack)-1]
  9626  	_ = stack
  9627  	return p.cur.onLikeExpr44(stack["boolComparisonExpr"])
  9628  }
  9629  
  9630  func (c *current) onBoolComparisonExpr1(left, op, right any) (any, error) {
  9631  	expr := &structs.BoolExpr{
  9632  		IsTerminal: true,
  9633  		LeftValue:  left.(*structs.ValueExpr),
  9634  		RightValue: right.(*structs.ValueExpr),
  9635  		ValueOp:    op.(string),
  9636  	}
  9637  
  9638  	return expr, nil
  9639  }
  9640  
  9641  func (p *parser) callonBoolComparisonExpr1() (any, error) {
  9642  	stack := p.vstack[len(p.vstack)-1]
  9643  	_ = stack
  9644  	return p.cur.onBoolComparisonExpr1(stack["left"], stack["op"], stack["right"])
  9645  }
  9646  
  9647  func (c *current) onInExpr2(left, valueToJudge, rest any) (any, error) {
  9648  	restSlice := rest.([]any)
  9649  	slice := make([]*structs.ValueExpr, 1+len(restSlice))
  9650  	slice[0] = valueToJudge.(*structs.ValueExpr)
  9651  
  9652  	for i := range restSlice {
  9653  		valueAtom := restSlice[i].([]any)
  9654  		slice[i+1] = valueAtom[1].(*structs.ValueExpr)
  9655  	}
  9656  
  9657  	expr := &structs.BoolExpr{
  9658  		IsTerminal: true,
  9659  		LeftValue:  left.(*structs.ValueExpr),
  9660  		ValueList:  slice,
  9661  		ValueOp:    "in",
  9662  	}
  9663  	return expr, nil
  9664  }
  9665  
  9666  func (p *parser) callonInExpr2() (any, error) {
  9667  	stack := p.vstack[len(p.vstack)-1]
  9668  	_ = stack
  9669  	return p.cur.onInExpr2(stack["left"], stack["valueToJudge"], stack["rest"])
  9670  }
  9671  
  9672  func (c *current) onInExpr17(valueToJudge, rest any) (any, error) {
  9673  	restSlice := rest.([]any)
  9674  	slice := make([]*structs.ValueExpr, len(restSlice))
  9675  
  9676  	for i := range restSlice {
  9677  		valueAtom := restSlice[i].([]any)
  9678  		slice[i] = valueAtom[1].(*structs.ValueExpr)
  9679  	}
  9680  
  9681  	expr := &structs.BoolExpr{
  9682  		IsTerminal: true,
  9683  		LeftValue:  valueToJudge.(*structs.ValueExpr),
  9684  		ValueList:  slice,
  9685  		ValueOp:    "in",
  9686  	}
  9687  	return expr, nil
  9688  }
  9689  
  9690  func (p *parser) callonInExpr17() (any, error) {
  9691  	stack := p.vstack[len(p.vstack)-1]
  9692  	_ = stack
  9693  	return p.cur.onInExpr17(stack["valueToJudge"], stack["rest"])
  9694  }
  9695  
  9696  func (c *current) onValueExpr2(condition any) (any, error) {
  9697  
  9698  	expr := &structs.ValueExpr{
  9699  		ValueExprMode: structs.VEMConditionExpr,
  9700  		ConditionExpr: condition.(*structs.ConditionExpr),
  9701  	}
  9702  
  9703  	return expr, nil
  9704  }
  9705  
  9706  func (p *parser) callonValueExpr2() (any, error) {
  9707  	stack := p.vstack[len(p.vstack)-1]
  9708  	_ = stack
  9709  	return p.cur.onValueExpr2(stack["condition"])
  9710  }
  9711  
  9712  func (c *current) onValueExpr5(condition any) (any, error) {
  9713  
  9714  	expr := &structs.ValueExpr{
  9715  		ValueExprMode: structs.VEMConditionExpr,
  9716  		ConditionExpr: condition.(*structs.ConditionExpr),
  9717  	}
  9718  
  9719  	return expr, nil
  9720  }
  9721  
  9722  func (p *parser) callonValueExpr5() (any, error) {
  9723  	stack := p.vstack[len(p.vstack)-1]
  9724  	_ = stack
  9725  	return p.cur.onValueExpr5(stack["condition"])
  9726  }
  9727  
  9728  func (c *current) onValueExpr11(numeric any) (any, error) {
  9729  
  9730  	expr := &structs.ValueExpr{
  9731  		ValueExprMode: structs.VEMNumericExpr,
  9732  		NumericExpr:   numeric.(*structs.NumericExpr),
  9733  	}
  9734  
  9735  	return expr, nil
  9736  }
  9737  
  9738  func (p *parser) callonValueExpr11() (any, error) {
  9739  	stack := p.vstack[len(p.vstack)-1]
  9740  	_ = stack
  9741  	return p.cur.onValueExpr11(stack["numeric"])
  9742  }
  9743  
  9744  func (c *current) onValueExpr14(str any) (any, error) {
  9745  
  9746  	expr := &structs.ValueExpr{
  9747  		ValueExprMode: structs.VEMStringExpr,
  9748  		StringExpr:    str.(*structs.StringExpr),
  9749  	}
  9750  
  9751  	return expr, nil
  9752  }
  9753  
  9754  func (p *parser) callonValueExpr14() (any, error) {
  9755  	stack := p.vstack[len(p.vstack)-1]
  9756  	_ = stack
  9757  	return p.cur.onValueExpr14(stack["str"])
  9758  }
  9759  
  9760  func (c *current) onValueExpr17(str any) (any, error) {
  9761  
  9762  	expr := &structs.ValueExpr{
  9763  		ValueExprMode: structs.VEMStringExpr,
  9764  		StringExpr:    str.(*structs.StringExpr),
  9765  	}
  9766  
  9767  	return expr, nil
  9768  }
  9769  
  9770  func (p *parser) callonValueExpr17() (any, error) {
  9771  	stack := p.vstack[len(p.vstack)-1]
  9772  	_ = stack
  9773  	return p.cur.onValueExpr17(stack["str"])
  9774  }
  9775  
  9776  func (c *current) onValueExpr23(boolean any) (any, error) {
  9777  
  9778  	expr := &structs.ValueExpr{
  9779  		ValueExprMode: structs.VEMBooleanExpr,
  9780  		BooleanExpr:   boolean.(*structs.BoolExpr),
  9781  	}
  9782  
  9783  	return expr, nil
  9784  }
  9785  
  9786  func (p *parser) callonValueExpr23() (any, error) {
  9787  	stack := p.vstack[len(p.vstack)-1]
  9788  	_ = stack
  9789  	return p.cur.onValueExpr23(stack["boolean"])
  9790  }
  9791  
  9792  func (c *current) onStringExpr2(text any) (any, error) {
  9793  	expr := &structs.StringExpr{
  9794  		StringExprMode: structs.SEMTextExpr,
  9795  		TextExpr:       text.(*structs.TextExpr),
  9796  	}
  9797  
  9798  	return expr, nil
  9799  }
  9800  
  9801  func (p *parser) callonStringExpr2() (any, error) {
  9802  	stack := p.vstack[len(p.vstack)-1]
  9803  	_ = stack
  9804  	return p.cur.onStringExpr2(stack["text"])
  9805  }
  9806  
  9807  func (c *current) onStringExpr8(str any) (any, error) {
  9808  	expr := &structs.StringExpr{
  9809  		StringExprMode: structs.SEMRawString,
  9810  		RawString:      removeQuotes(str),
  9811  	}
  9812  
  9813  	return expr, nil
  9814  }
  9815  
  9816  func (p *parser) callonStringExpr8() (any, error) {
  9817  	stack := p.vstack[len(p.vstack)-1]
  9818  	_ = stack
  9819  	return p.cur.onStringExpr8(stack["str"])
  9820  }
  9821  
  9822  func (c *current) onStringExpr14(field any) (any, error) {
  9823  	expr := &structs.StringExpr{
  9824  		StringExprMode: structs.SEMField,
  9825  		FieldName:      field.(string),
  9826  	}
  9827  
  9828  	return expr, nil
  9829  }
  9830  
  9831  func (p *parser) callonStringExpr14() (any, error) {
  9832  	stack := p.vstack[len(p.vstack)-1]
  9833  	_ = stack
  9834  	return p.cur.onStringExpr14(stack["field"])
  9835  }
  9836  
  9837  func (c *current) onStringExpr26(concat any) (any, error) {
  9838  	expr := &structs.StringExpr{
  9839  		StringExprMode: structs.SEMConcatExpr,
  9840  		ConcatExpr:     concat.(*structs.ConcatExpr),
  9841  	}
  9842  
  9843  	return expr, nil
  9844  }
  9845  
  9846  func (p *parser) callonStringExpr26() (any, error) {
  9847  	stack := p.vstack[len(p.vstack)-1]
  9848  	_ = stack
  9849  	return p.cur.onStringExpr26(stack["concat"])
  9850  }
  9851  
  9852  func (c *current) onConcatExpr1(first, rest any) (any, error) {
  9853  	restSlice := rest.([]any)
  9854  	slice := make([]*structs.ConcatAtom, 1+len(restSlice))
  9855  	slice[0] = first.(*structs.ConcatAtom)
  9856  
  9857  	for i := range restSlice {
  9858  		concatAndAtom := restSlice[i].([]any)
  9859  		slice[i+1] = concatAndAtom[1].(*structs.ConcatAtom)
  9860  	}
  9861  
  9862  	expr := &structs.ConcatExpr{
  9863  		Atoms: slice,
  9864  	}
  9865  
  9866  	return expr, nil
  9867  }
  9868  
  9869  func (p *parser) callonConcatExpr1() (any, error) {
  9870  	stack := p.vstack[len(p.vstack)-1]
  9871  	_ = stack
  9872  	return p.cur.onConcatExpr1(stack["first"], stack["rest"])
  9873  }
  9874  
  9875  func (c *current) onConcatAtom2(text any) (any, error) {
  9876  	atom := &structs.ConcatAtom{
  9877  		IsField:  false,
  9878  		Value:    "",
  9879  		TextExpr: text.(*structs.TextExpr),
  9880  	}
  9881  
  9882  	return atom, nil
  9883  }
  9884  
  9885  func (p *parser) callonConcatAtom2() (any, error) {
  9886  	stack := p.vstack[len(p.vstack)-1]
  9887  	_ = stack
  9888  	return p.cur.onConcatAtom2(stack["text"])
  9889  }
  9890  
  9891  func (c *current) onConcatAtom5(str any) (any, error) {
  9892  	atom := &structs.ConcatAtom{
  9893  		IsField: false,
  9894  		Value:   removeQuotes(str),
  9895  	}
  9896  
  9897  	return atom, nil
  9898  }
  9899  
  9900  func (p *parser) callonConcatAtom5() (any, error) {
  9901  	stack := p.vstack[len(p.vstack)-1]
  9902  	_ = stack
  9903  	return p.cur.onConcatAtom5(stack["str"])
  9904  }
  9905  
  9906  func (c *current) onConcatAtom8(number any) (any, error) {
  9907  	atom := &structs.ConcatAtom{
  9908  		IsField: false,
  9909  		Value:   number.(string),
  9910  	}
  9911  
  9912  	return atom, nil
  9913  }
  9914  
  9915  func (p *parser) callonConcatAtom8() (any, error) {
  9916  	stack := p.vstack[len(p.vstack)-1]
  9917  	_ = stack
  9918  	return p.cur.onConcatAtom8(stack["number"])
  9919  }
  9920  
  9921  func (c *current) onConcatAtom11(field any) (any, error) {
  9922  	atom := &structs.ConcatAtom{
  9923  		IsField: true,
  9924  		Value:   field.(string),
  9925  	}
  9926  
  9927  	return atom, nil
  9928  }
  9929  
  9930  func (p *parser) callonConcatAtom11() (any, error) {
  9931  	stack := p.vstack[len(p.vstack)-1]
  9932  	_ = stack
  9933  	return p.cur.onConcatAtom11(stack["field"])
  9934  }
  9935  
  9936  func (c *current) onNumericExpr1(expr any) (any, error) {
  9937  	return expr, nil
  9938  }
  9939  
  9940  func (p *parser) callonNumericExpr1() (any, error) {
  9941  	stack := p.vstack[len(p.vstack)-1]
  9942  	_ = stack
  9943  	return p.cur.onNumericExpr1(stack["expr"])
  9944  }
  9945  
  9946  func (c *current) onNumericExprLevel31(first, rest any) (any, error) {
  9947  	if rest == nil {
  9948  		return first, nil
  9949  	}
  9950  
  9951  	cur := first.(*structs.NumericExpr)
  9952  	for _, v := range rest.([]any) {
  9953  		opAndClause := v.([]any)
  9954  		cur = &structs.NumericExpr{
  9955  			IsTerminal:      false,
  9956  			Op:              opAndClause[0].(string),
  9957  			Left:            cur,
  9958  			Right:           opAndClause[1].(*structs.NumericExpr),
  9959  			NumericExprMode: structs.NEMNumericExpr,
  9960  		}
  9961  	}
  9962  
  9963  	return cur, nil
  9964  }
  9965  
  9966  func (p *parser) callonNumericExprLevel31() (any, error) {
  9967  	stack := p.vstack[len(p.vstack)-1]
  9968  	_ = stack
  9969  	return p.cur.onNumericExprLevel31(stack["first"], stack["rest"])
  9970  }
  9971  
  9972  func (c *current) onNumericExprLevel21(first, rest any) (any, error) {
  9973  	if rest == nil {
  9974  		return first, nil
  9975  	}
  9976  
  9977  	cur := first.(*structs.NumericExpr)
  9978  	for _, v := range rest.([]any) {
  9979  		opAndClause := v.([]any)
  9980  		cur = &structs.NumericExpr{
  9981  			IsTerminal:      false,
  9982  			Op:              opAndClause[0].(string),
  9983  			Left:            cur,
  9984  			Right:           opAndClause[1].(*structs.NumericExpr),
  9985  			NumericExprMode: structs.NEMNumericExpr,
  9986  		}
  9987  	}
  9988  
  9989  	return cur, nil
  9990  }
  9991  
  9992  func (p *parser) callonNumericExprLevel21() (any, error) {
  9993  	stack := p.vstack[len(p.vstack)-1]
  9994  	_ = stack
  9995  	return p.cur.onNumericExprLevel21(stack["first"], stack["rest"])
  9996  }
  9997  
  9998  func (c *current) onRoundPrecisionExpr1(expr any) (any, error) {
  9999  	rightNumericExpr, ok := expr.(*structs.NumericExpr)
 10000  	if !ok {
 10001  		return nil, fmt.Errorf("Failed to assert expr as *structs.NumericExpr")
 10002  	}
 10003  
 10004  	return rightNumericExpr, nil
 10005  }
 10006  
 10007  func (p *parser) callonRoundPrecisionExpr1() (any, error) {
 10008  	stack := p.vstack[len(p.vstack)-1]
 10009  	_ = stack
 10010  	return p.cur.onRoundPrecisionExpr1(stack["expr"])
 10011  }
 10012  
 10013  func (c *current) onNumericExprLevel12(expr any) (any, error) {
 10014  	return expr, nil
 10015  }
 10016  
 10017  func (p *parser) callonNumericExprLevel12() (any, error) {
 10018  	stack := p.vstack[len(p.vstack)-1]
 10019  	_ = stack
 10020  	return p.cur.onNumericExprLevel12(stack["expr"])
 10021  }
 10022  
 10023  func (c *current) onNumericExprLevel18(numericEvalExpr any) (any, error) {
 10024  	return numericEvalExpr, nil
 10025  }
 10026  
 10027  func (p *parser) callonNumericExprLevel18() (any, error) {
 10028  	stack := p.vstack[len(p.vstack)-1]
 10029  	_ = stack
 10030  	return p.cur.onNumericExprLevel18(stack["numericEvalExpr"])
 10031  }
 10032  
 10033  func (c *current) onNumericExprLevel111(field any) (any, error) {
 10034  	expr := &structs.NumericExpr{
 10035  		IsTerminal:      true,
 10036  		ValueIsField:    true,
 10037  		Value:           field.(string),
 10038  		NumericExprMode: structs.NEMNumberField,
 10039  	}
 10040  
 10041  	return expr, nil
 10042  }
 10043  
 10044  func (p *parser) callonNumericExprLevel111() (any, error) {
 10045  	stack := p.vstack[len(p.vstack)-1]
 10046  	_ = stack
 10047  	return p.cur.onNumericExprLevel111(stack["field"])
 10048  }
 10049  
 10050  func (c *current) onNumericExprLevel114(number any) (any, error) {
 10051  	expr := &structs.NumericExpr{
 10052  		IsTerminal:      true,
 10053  		ValueIsField:    false,
 10054  		Value:           number.(string),
 10055  		NumericExprMode: structs.NEMNumber,
 10056  	}
 10057  
 10058  	return expr, nil
 10059  }
 10060  
 10061  func (p *parser) callonNumericExprLevel114() (any, error) {
 10062  	stack := p.vstack[len(p.vstack)-1]
 10063  	_ = stack
 10064  	return p.cur.onNumericExprLevel114(stack["number"])
 10065  }
 10066  
 10067  func (c *current) onNumericEvalExpr2(opName, expr any) (any, error) {
 10068  	leftNumericExpr, ok := expr.(*structs.NumericExpr)
 10069  	if !ok {
 10070  		return nil, fmt.Errorf("Failed to assert expr as *structs.NumericExpr")
 10071  	}
 10072  
 10073  	//transfer []uint8 to string
 10074  	strData, ok := opName.([]byte)
 10075  	if !ok {
 10076  		return nil, fmt.Errorf("opName is not a []byte")
 10077  	}
 10078  
 10079  	opNameStr := string(strData)
 10080  	node, err := createNumericExpr(opNameStr, leftNumericExpr, nil, structs.NEMNumericExpr)
 10081  	if err != nil {
 10082  		return nil, err
 10083  	}
 10084  
 10085  	return node, nil
 10086  }
 10087  
 10088  func (p *parser) callonNumericEvalExpr2() (any, error) {
 10089  	stack := p.vstack[len(p.vstack)-1]
 10090  	_ = stack
 10091  	return p.cur.onNumericEvalExpr2(stack["opName"], stack["expr"])
 10092  }
 10093  
 10094  func (c *current) onNumericEvalExpr15(roundExpr, expr, roundPrecision any) (any, error) {
 10095  	leftNumericExpr, ok := expr.(*structs.NumericExpr)
 10096  	if !ok {
 10097  		return nil, fmt.Errorf("Failed to assert expr as *structs.NumericExpr")
 10098  	}
 10099  
 10100  	var rightNumericExpr *structs.NumericExpr
 10101  	if roundPrecision != nil {
 10102  		rightNumericExpr, ok = roundPrecision.(*structs.NumericExpr)
 10103  		if !ok {
 10104  			return nil, fmt.Errorf("Failed to assert roundPrecision as *structs.NumericExpr")
 10105  		}
 10106  	}
 10107  
 10108  	node, err := createNumericExpr("round", leftNumericExpr, rightNumericExpr, structs.NEMNumericExpr)
 10109  	if err != nil {
 10110  		return nil, err
 10111  	}
 10112  
 10113  	return node, nil
 10114  }
 10115  
 10116  func (p *parser) callonNumericEvalExpr15() (any, error) {
 10117  	stack := p.vstack[len(p.vstack)-1]
 10118  	_ = stack
 10119  	return p.cur.onNumericEvalExpr15(stack["roundExpr"], stack["expr"], stack["roundPrecision"])
 10120  }
 10121  
 10122  func (c *current) onNumericEvalExpr26() (any, error) {
 10123  	return &structs.NumericExpr{
 10124  		IsTerminal: true,
 10125  		Op:         "now",
 10126  	}, nil
 10127  }
 10128  
 10129  func (p *parser) callonNumericEvalExpr26() (any, error) {
 10130  	stack := p.vstack[len(p.vstack)-1]
 10131  	_ = stack
 10132  	return p.cur.onNumericEvalExpr26()
 10133  }
 10134  
 10135  func (c *current) onNumericEvalExpr30(stringExpr, baseExpr any) (any, error) {
 10136  	stringExprConverted, ok := stringExpr.(*structs.StringExpr)
 10137  	if !ok {
 10138  		return nil, fmt.Errorf("Failed to assert stringExpr as *structs.StringExpr")
 10139  	}
 10140  
 10141  	var baseExprConverted *structs.NumericExpr
 10142  	if baseExpr != nil {
 10143  		baseSlice, ok := baseExpr.([]interface{})
 10144  		if ok && len(baseSlice) > 1 {
 10145  			if base, ok := baseSlice[1].(*structs.NumericExpr); ok {
 10146  				baseExprConverted = base
 10147  			} else {
 10148  				return nil, fmt.Errorf("Failed to assert base as *structs.NumericExpr")
 10149  			}
 10150  		}
 10151  	}
 10152  
 10153  	node := &structs.NumericExpr{
 10154  		IsTerminal:      false,
 10155  		Op:              "tonumber",
 10156  		Left:            nil,
 10157  		Right:           baseExprConverted,
 10158  		Val:             stringExprConverted,
 10159  		NumericExprMode: structs.NEMNumericExpr,
 10160  	}
 10161  	return node, nil
 10162  }
 10163  
 10164  func (p *parser) callonNumericEvalExpr30() (any, error) {
 10165  	stack := p.vstack[len(p.vstack)-1]
 10166  	_ = stack
 10167  	return p.cur.onNumericEvalExpr30(stack["stringExpr"], stack["baseExpr"])
 10168  }
 10169  
 10170  func (c *current) onNumericEvalExpr42(lenExpr, expr any) (any, error) {
 10171  	return expr, nil
 10172  }
 10173  
 10174  func (p *parser) callonNumericEvalExpr42() (any, error) {
 10175  	stack := p.vstack[len(p.vstack)-1]
 10176  	_ = stack
 10177  	return p.cur.onNumericEvalExpr42(stack["lenExpr"], stack["expr"])
 10178  }
 10179  
 10180  func (c *current) onLenExpr2(str any) (any, error) {
 10181  
 10182  	leftNumericExpr := &structs.NumericExpr{
 10183  		IsTerminal:      true,
 10184  		ValueIsField:    false,
 10185  		Value:           str.(string),
 10186  		NumericExprMode: structs.NEMLenString,
 10187  	}
 10188  
 10189  	node, err := createNumericExpr("len", leftNumericExpr, nil, structs.NEMLenString)
 10190  	if err != nil {
 10191  		return nil, err
 10192  	}
 10193  
 10194  	return node, nil
 10195  }
 10196  
 10197  func (p *parser) callonLenExpr2() (any, error) {
 10198  	stack := p.vstack[len(p.vstack)-1]
 10199  	_ = stack
 10200  	return p.cur.onLenExpr2(stack["str"])
 10201  }
 10202  
 10203  func (c *current) onLenExpr8(field any) (any, error) {
 10204  
 10205  	leftNumericExpr := &structs.NumericExpr{
 10206  		IsTerminal:      true,
 10207  		ValueIsField:    true,
 10208  		Value:           field.(string),
 10209  		NumericExprMode: structs.NEMLenField,
 10210  	}
 10211  
 10212  	node, err := createNumericExpr("len", leftNumericExpr, nil, structs.NEMLenField)
 10213  	if err != nil {
 10214  		return nil, err
 10215  	}
 10216  
 10217  	return node, nil
 10218  }
 10219  
 10220  func (p *parser) callonLenExpr8() (any, error) {
 10221  	stack := p.vstack[len(p.vstack)-1]
 10222  	_ = stack
 10223  	return p.cur.onLenExpr8(stack["field"])
 10224  }
 10225  
 10226  func (c *current) onHeadBlock2(intAsStr any) (any, error) {
 10227  	limit, err := strconv.ParseUint(intAsStr.(string), 10, 64)
 10228  	if err != nil {
 10229  		return nil, fmt.Errorf("Invalid limit (%v): %v", intAsStr.(string), err)
 10230  	}
 10231  
 10232  	queryAgg := &structs.QueryAggregators{
 10233  		PipeCommandType: structs.OutputTransformType,
 10234  		OutputTransforms: &structs.OutputTransforms{
 10235  			MaxRows: limit,
 10236  		},
 10237  	}
 10238  
 10239  	return queryAgg, nil
 10240  }
 10241  
 10242  func (p *parser) callonHeadBlock2() (any, error) {
 10243  	stack := p.vstack[len(p.vstack)-1]
 10244  	_ = stack
 10245  	return p.cur.onHeadBlock2(stack["intAsStr"])
 10246  }
 10247  
 10248  func (c *current) onHeadBlock12() (any, error) {
 10249  	queryAgg := &structs.QueryAggregators{
 10250  		PipeCommandType: structs.OutputTransformType,
 10251  		OutputTransforms: &structs.OutputTransforms{
 10252  			MaxRows: uint64(10), // From https://docs.splunk.com/Documentation/Splunk/9.1.0/SearchReference/Head
 10253  		},
 10254  	}
 10255  
 10256  	return queryAgg, nil
 10257  }
 10258  
 10259  func (p *parser) callonHeadBlock12() (any, error) {
 10260  	stack := p.vstack[len(p.vstack)-1]
 10261  	_ = stack
 10262  	return p.cur.onHeadBlock12()
 10263  }
 10264  
 10265  func (c *current) onAggregationList1(first, rest any) (any, error) {
 10266  	// Convert `rest` to a slice. Each element of the slice will be a 2-element
 10267  	// slice where the first element is ", " and the second is an Aggregator.
 10268  	restSlice := rest.([]any)
 10269  
 10270  	numAggs := 1 + len(restSlice)
 10271  	aggsSlice := make([]*aggregator, numAggs)
 10272  	aggsSlice[0] = first.(*aggregator)
 10273  
 10274  	for i := 1; i < numAggs; i++ {
 10275  		separatorAndAgg := restSlice[i-1].([]any)
 10276  		aggsSlice[i] = separatorAndAgg[1].(*aggregator)
 10277  	}
 10278  
 10279  	return aggsSlice, nil
 10280  }
 10281  
 10282  func (p *parser) callonAggregationList1() (any, error) {
 10283  	stack := p.vstack[len(p.vstack)-1]
 10284  	_ = stack
 10285  	return p.cur.onAggregationList1(stack["first"], stack["rest"])
 10286  }
 10287  
 10288  func (c *current) onAggregator1(aggFunc, asField any) (any, error) {
 10289  	agg := &aggregator{}
 10290  	agg.measureAgg = aggFunc.(*structs.MeasureAggregator)
 10291  
 10292  	if asField != nil {
 10293  		agg.renameOutputField = true
 10294  		agg.outputFieldNewName = asField.(string)
 10295  	}
 10296  
 10297  	return agg, nil
 10298  }
 10299  
 10300  func (p *parser) callonAggregator1() (any, error) {
 10301  	stack := p.vstack[len(p.vstack)-1]
 10302  	_ = stack
 10303  	return p.cur.onAggregator1(stack["aggFunc"], stack["asField"])
 10304  }
 10305  
 10306  func (c *current) onAggFunction1(agg any) (any, error) {
 10307  	return agg, nil
 10308  }
 10309  
 10310  func (p *parser) callonAggFunction1() (any, error) {
 10311  	stack := p.vstack[len(p.vstack)-1]
 10312  	_ = stack
 10313  	return p.cur.onAggFunction1(stack["agg"])
 10314  }
 10315  
 10316  func (c *current) onAsField1(field any) (any, error) {
 10317  	fieldStr := field.(string)
 10318  
 10319  	if strings.Contains(fieldStr, "*") {
 10320  		return nil, errors.New("The field specified in `AS` cannot contain wildcards")
 10321  	}
 10322  
 10323  	if fieldStr[0] == '"' && fieldStr[len(fieldStr)-1] == '"' {
 10324  		fieldStr = fieldStr[1 : len(fieldStr)-1]
 10325  	}
 10326  
 10327  	return fieldStr, nil
 10328  }
 10329  
 10330  func (p *parser) callonAsField1() (any, error) {
 10331  	stack := p.vstack[len(p.vstack)-1]
 10332  	_ = stack
 10333  	return p.cur.onAsField1(stack["field"])
 10334  }
 10335  
 10336  func (c *current) onAggCount2(boolExpr any) (any, error) {
 10337  	valueExpr := &structs.ValueExpr{
 10338  		ValueExprMode: structs.VEMBooleanExpr,
 10339  		BooleanExpr:   boolExpr.(*structs.BoolExpr),
 10340  	}
 10341  
 10342  	agg := &structs.MeasureAggregator{
 10343  		MeasureCol:      "",
 10344  		MeasureFunc:     utils.Count,
 10345  		StrEnc:          string(c.text),
 10346  		ValueColRequest: valueExpr,
 10347  	}
 10348  
 10349  	return agg, nil
 10350  }
 10351  
 10352  func (p *parser) callonAggCount2() (any, error) {
 10353  	stack := p.vstack[len(p.vstack)-1]
 10354  	_ = stack
 10355  	return p.cur.onAggCount2(stack["boolExpr"])
 10356  }
 10357  
 10358  func (c *current) onAggCount12(field any) (any, error) {
 10359  	agg := &structs.MeasureAggregator{
 10360  		MeasureCol:  field.(string),
 10361  		MeasureFunc: utils.Count,
 10362  	}
 10363  
 10364  	return agg, nil
 10365  }
 10366  
 10367  func (p *parser) callonAggCount12() (any, error) {
 10368  	stack := p.vstack[len(p.vstack)-1]
 10369  	_ = stack
 10370  	return p.cur.onAggCount12(stack["field"])
 10371  }
 10372  
 10373  func (c *current) onAggCount21() (any, error) {
 10374  	agg := &structs.MeasureAggregator{
 10375  		MeasureCol:  "*",
 10376  		MeasureFunc: utils.Count,
 10377  	}
 10378  
 10379  	return agg, nil
 10380  }
 10381  
 10382  func (p *parser) callonAggCount21() (any, error) {
 10383  	stack := p.vstack[len(p.vstack)-1]
 10384  	_ = stack
 10385  	return p.cur.onAggCount21()
 10386  }
 10387  
 10388  func (c *current) onAggDistinctCount2(valueExpr any) (any, error) {
 10389  	agg := &structs.MeasureAggregator{
 10390  		MeasureCol:      "",
 10391  		MeasureFunc:     utils.Cardinality,
 10392  		StrEnc:          string(c.text),
 10393  		ValueColRequest: valueExpr.(*structs.ValueExpr),
 10394  	}
 10395  
 10396  	return agg, nil
 10397  }
 10398  
 10399  func (p *parser) callonAggDistinctCount2() (any, error) {
 10400  	stack := p.vstack[len(p.vstack)-1]
 10401  	_ = stack
 10402  	return p.cur.onAggDistinctCount2(stack["valueExpr"])
 10403  }
 10404  
 10405  func (c *current) onAggDistinctCount12(field any) (any, error) {
 10406  	agg := &structs.MeasureAggregator{
 10407  		MeasureCol:  field.(string),
 10408  		MeasureFunc: utils.Cardinality,
 10409  	}
 10410  
 10411  	return agg, nil
 10412  }
 10413  
 10414  func (p *parser) callonAggDistinctCount12() (any, error) {
 10415  	stack := p.vstack[len(p.vstack)-1]
 10416  	_ = stack
 10417  	return p.cur.onAggDistinctCount12(stack["field"])
 10418  }
 10419  
 10420  func (c *current) onAggAvg2(boolComparisonExpr any) (any, error) {
 10421  	valueExpr := &structs.ValueExpr{
 10422  		ValueExprMode: structs.VEMBooleanExpr,
 10423  		BooleanExpr:   boolComparisonExpr.(*structs.BoolExpr),
 10424  	}
 10425  
 10426  	agg := &structs.MeasureAggregator{
 10427  		MeasureCol:      "",
 10428  		MeasureFunc:     utils.Avg,
 10429  		StrEnc:          string(c.text),
 10430  		ValueColRequest: valueExpr,
 10431  	}
 10432  
 10433  	return agg, nil
 10434  }
 10435  
 10436  func (p *parser) callonAggAvg2() (any, error) {
 10437  	stack := p.vstack[len(p.vstack)-1]
 10438  	_ = stack
 10439  	return p.cur.onAggAvg2(stack["boolComparisonExpr"])
 10440  }
 10441  
 10442  func (c *current) onAggAvg12(field any) (any, error) {
 10443  	agg := &structs.MeasureAggregator{
 10444  		MeasureCol:  field.(string),
 10445  		MeasureFunc: utils.Avg,
 10446  	}
 10447  
 10448  	return agg, nil
 10449  }
 10450  
 10451  func (p *parser) callonAggAvg12() (any, error) {
 10452  	stack := p.vstack[len(p.vstack)-1]
 10453  	_ = stack
 10454  	return p.cur.onAggAvg12(stack["field"])
 10455  }
 10456  
 10457  func (c *current) onAggMin2(boolComparisonExpr any) (any, error) {
 10458  	valueExpr := &structs.ValueExpr{
 10459  		ValueExprMode: structs.VEMBooleanExpr,
 10460  		BooleanExpr:   boolComparisonExpr.(*structs.BoolExpr),
 10461  	}
 10462  
 10463  	agg := &structs.MeasureAggregator{
 10464  		MeasureCol:      "",
 10465  		MeasureFunc:     utils.Min,
 10466  		StrEnc:          string(c.text),
 10467  		ValueColRequest: valueExpr,
 10468  	}
 10469  
 10470  	return agg, nil
 10471  }
 10472  
 10473  func (p *parser) callonAggMin2() (any, error) {
 10474  	stack := p.vstack[len(p.vstack)-1]
 10475  	_ = stack
 10476  	return p.cur.onAggMin2(stack["boolComparisonExpr"])
 10477  }
 10478  
 10479  func (c *current) onAggMin12(field any) (any, error) {
 10480  	agg := &structs.MeasureAggregator{
 10481  		MeasureCol:  field.(string),
 10482  		MeasureFunc: utils.Min,
 10483  	}
 10484  
 10485  	return agg, nil
 10486  }
 10487  
 10488  func (p *parser) callonAggMin12() (any, error) {
 10489  	stack := p.vstack[len(p.vstack)-1]
 10490  	_ = stack
 10491  	return p.cur.onAggMin12(stack["field"])
 10492  }
 10493  
 10494  func (c *current) onAggMax2(boolComparisonExpr any) (any, error) {
 10495  	valueExpr := &structs.ValueExpr{
 10496  		ValueExprMode: structs.VEMBooleanExpr,
 10497  		BooleanExpr:   boolComparisonExpr.(*structs.BoolExpr),
 10498  	}
 10499  
 10500  	agg := &structs.MeasureAggregator{
 10501  		MeasureCol:      "",
 10502  		MeasureFunc:     utils.Max,
 10503  		StrEnc:          string(c.text),
 10504  		ValueColRequest: valueExpr,
 10505  	}
 10506  
 10507  	return agg, nil
 10508  }
 10509  
 10510  func (p *parser) callonAggMax2() (any, error) {
 10511  	stack := p.vstack[len(p.vstack)-1]
 10512  	_ = stack
 10513  	return p.cur.onAggMax2(stack["boolComparisonExpr"])
 10514  }
 10515  
 10516  func (c *current) onAggMax12(field any) (any, error) {
 10517  	agg := &structs.MeasureAggregator{
 10518  		MeasureCol:  field.(string),
 10519  		MeasureFunc: utils.Max,
 10520  	}
 10521  
 10522  	return agg, nil
 10523  }
 10524  
 10525  func (p *parser) callonAggMax12() (any, error) {
 10526  	stack := p.vstack[len(p.vstack)-1]
 10527  	_ = stack
 10528  	return p.cur.onAggMax12(stack["field"])
 10529  }
 10530  
 10531  func (c *current) onAggRange2(boolComparisonExpr any) (any, error) {
 10532  	valueExpr := &structs.ValueExpr{
 10533  		ValueExprMode: structs.VEMBooleanExpr,
 10534  		BooleanExpr:   boolComparisonExpr.(*structs.BoolExpr),
 10535  	}
 10536  
 10537  	agg := &structs.MeasureAggregator{
 10538  		MeasureCol:      "",
 10539  		MeasureFunc:     utils.Range,
 10540  		StrEnc:          string(c.text),
 10541  		ValueColRequest: valueExpr,
 10542  	}
 10543  
 10544  	return agg, nil
 10545  }
 10546  
 10547  func (p *parser) callonAggRange2() (any, error) {
 10548  	stack := p.vstack[len(p.vstack)-1]
 10549  	_ = stack
 10550  	return p.cur.onAggRange2(stack["boolComparisonExpr"])
 10551  }
 10552  
 10553  func (c *current) onAggRange12(field any) (any, error) {
 10554  	agg := &structs.MeasureAggregator{
 10555  		MeasureCol:  field.(string),
 10556  		MeasureFunc: utils.Range,
 10557  	}
 10558  
 10559  	return agg, nil
 10560  }
 10561  
 10562  func (p *parser) callonAggRange12() (any, error) {
 10563  	stack := p.vstack[len(p.vstack)-1]
 10564  	_ = stack
 10565  	return p.cur.onAggRange12(stack["field"])
 10566  }
 10567  
 10568  func (c *current) onAggSum2(boolComparisonExpr any) (any, error) {
 10569  	valueExpr := &structs.ValueExpr{
 10570  		ValueExprMode: structs.VEMBooleanExpr,
 10571  		BooleanExpr:   boolComparisonExpr.(*structs.BoolExpr),
 10572  	}
 10573  
 10574  	agg := &structs.MeasureAggregator{
 10575  		MeasureCol:      "",
 10576  		MeasureFunc:     utils.Sum,
 10577  		StrEnc:          string(c.text),
 10578  		ValueColRequest: valueExpr,
 10579  	}
 10580  
 10581  	return agg, nil
 10582  }
 10583  
 10584  func (p *parser) callonAggSum2() (any, error) {
 10585  	stack := p.vstack[len(p.vstack)-1]
 10586  	_ = stack
 10587  	return p.cur.onAggSum2(stack["boolComparisonExpr"])
 10588  }
 10589  
 10590  func (c *current) onAggSum12(field any) (any, error) {
 10591  	agg := &structs.MeasureAggregator{
 10592  		MeasureCol:  field.(string),
 10593  		MeasureFunc: utils.Sum,
 10594  	}
 10595  
 10596  	return agg, nil
 10597  }
 10598  
 10599  func (p *parser) callonAggSum12() (any, error) {
 10600  	stack := p.vstack[len(p.vstack)-1]
 10601  	_ = stack
 10602  	return p.cur.onAggSum12(stack["field"])
 10603  }
 10604  
 10605  func (c *current) onAggValues2(valueExpr any) (any, error) {
 10606  	agg := &structs.MeasureAggregator{
 10607  		MeasureCol:      "",
 10608  		MeasureFunc:     utils.Values,
 10609  		StrEnc:          string(c.text),
 10610  		ValueColRequest: valueExpr.(*structs.ValueExpr),
 10611  	}
 10612  
 10613  	return agg, nil
 10614  }
 10615  
 10616  func (p *parser) callonAggValues2() (any, error) {
 10617  	stack := p.vstack[len(p.vstack)-1]
 10618  	_ = stack
 10619  	return p.cur.onAggValues2(stack["valueExpr"])
 10620  }
 10621  
 10622  func (c *current) onAggValues10(field any) (any, error) {
 10623  	agg := &structs.MeasureAggregator{
 10624  		MeasureCol:  field.(string),
 10625  		MeasureFunc: utils.Values,
 10626  	}
 10627  
 10628  	return agg, nil
 10629  }
 10630  
 10631  func (p *parser) callonAggValues10() (any, error) {
 10632  	stack := p.vstack[len(p.vstack)-1]
 10633  	_ = stack
 10634  	return p.cur.onAggValues10(stack["field"])
 10635  }
 10636  
 10637  func (c *current) onFieldWithNumberValue1(keyValuePair any) (any, error) {
 10638  	return keyValuePair, nil
 10639  }
 10640  
 10641  func (p *parser) callonFieldWithNumberValue1() (any, error) {
 10642  	stack := p.vstack[len(p.vstack)-1]
 10643  	_ = stack
 10644  	return p.cur.onFieldWithNumberValue1(stack["keyValuePair"])
 10645  }
 10646  
 10647  func (c *current) onNamedFieldWithNumberValue1(key, op, value any) (any, error) {
 10648  	node := &ast.Node{
 10649  		NodeType: ast.NodeTerminal,
 10650  		Comparison: ast.Comparison{
 10651  			Op:     op.(string),
 10652  			Field:  key.(string),
 10653  			Values: value,
 10654  		},
 10655  	}
 10656  
 10657  	return node, nil
 10658  }
 10659  
 10660  func (p *parser) callonNamedFieldWithNumberValue1() (any, error) {
 10661  	stack := p.vstack[len(p.vstack)-1]
 10662  	_ = stack
 10663  	return p.cur.onNamedFieldWithNumberValue1(stack["key"], stack["op"], stack["value"])
 10664  }
 10665  
 10666  func (c *current) onUnnamedFieldWithNumberValue1(value any) (any, error) {
 10667  	node := &ast.Node{
 10668  		NodeType: ast.NodeTerminal,
 10669  		Comparison: ast.Comparison{
 10670  			Op:     "=",
 10671  			Field:  "*",
 10672  			Values: value,
 10673  		},
 10674  	}
 10675  
 10676  	return node, nil
 10677  }
 10678  
 10679  func (p *parser) callonUnnamedFieldWithNumberValue1() (any, error) {
 10680  	stack := p.vstack[len(p.vstack)-1]
 10681  	_ = stack
 10682  	return p.cur.onUnnamedFieldWithNumberValue1(stack["value"])
 10683  }
 10684  
 10685  func (c *current) onFieldWithBooleanValue1(key, op, value any) (any, error) {
 10686  	node := &ast.Node{
 10687  		NodeType: ast.NodeTerminal,
 10688  		Comparison: ast.Comparison{
 10689  			Op:     op.(string),
 10690  			Field:  key.(string),
 10691  			Values: value,
 10692  		},
 10693  	}
 10694  
 10695  	return node, nil
 10696  }
 10697  
 10698  func (p *parser) callonFieldWithBooleanValue1() (any, error) {
 10699  	stack := p.vstack[len(p.vstack)-1]
 10700  	_ = stack
 10701  	return p.cur.onFieldWithBooleanValue1(stack["key"], stack["op"], stack["value"])
 10702  }
 10703  
 10704  func (c *current) onFieldWithStringValue1(keyValuePair any) (any, error) {
 10705  	return keyValuePair, nil
 10706  }
 10707  
 10708  func (p *parser) callonFieldWithStringValue1() (any, error) {
 10709  	stack := p.vstack[len(p.vstack)-1]
 10710  	_ = stack
 10711  	return p.cur.onFieldWithStringValue1(stack["keyValuePair"])
 10712  }
 10713  
 10714  func (c *current) onNamedFieldWithStringValue1(key, op, value any) (any, error) {
 10715  	node := &ast.Node{
 10716  		NodeType: ast.NodeTerminal,
 10717  		Comparison: ast.Comparison{
 10718  			Op:     op.(string),
 10719  			Field:  key.(string),
 10720  			Values: value,
 10721  		},
 10722  	}
 10723  	return node, nil
 10724  }
 10725  
 10726  func (p *parser) callonNamedFieldWithStringValue1() (any, error) {
 10727  	stack := p.vstack[len(p.vstack)-1]
 10728  	_ = stack
 10729  	return p.cur.onNamedFieldWithStringValue1(stack["key"], stack["op"], stack["value"])
 10730  }
 10731  
 10732  func (c *current) onUnnamedFieldWithStringValue1(value any) (any, error) {
 10733  	node := &ast.Node{
 10734  		NodeType: ast.NodeTerminal,
 10735  		Comparison: ast.Comparison{
 10736  			Op:     "=",
 10737  			Field:  "*",
 10738  			Values: value,
 10739  		},
 10740  	}
 10741  	return node, nil
 10742  }
 10743  
 10744  func (p *parser) callonUnnamedFieldWithStringValue1() (any, error) {
 10745  	stack := p.vstack[len(p.vstack)-1]
 10746  	_ = stack
 10747  	return p.cur.onUnnamedFieldWithStringValue1(stack["value"])
 10748  }
 10749  
 10750  func (c *current) onFieldNameList1(first, rest any) (any, error) {
 10751  	// Convert `rest` to a slice. Each element of the slice will be a 2-element
 10752  	// slice where the first element is ", " and the second is a FieldName.
 10753  	restSlice := rest.([]any)
 10754  
 10755  	numFieldNames := 1 + len(restSlice)
 10756  	fields := make([]string, numFieldNames)
 10757  	fields[0] = first.(string)
 10758  
 10759  	for i := 1; i < numFieldNames; i++ {
 10760  		separatorAndField := restSlice[i-1].([]any)
 10761  		fields[i] = separatorAndField[1].(string)
 10762  	}
 10763  
 10764  	return fields, nil
 10765  }
 10766  
 10767  func (p *parser) callonFieldNameList1() (any, error) {
 10768  	stack := p.vstack[len(p.vstack)-1]
 10769  	_ = stack
 10770  	return p.cur.onFieldNameList1(stack["first"], stack["rest"])
 10771  }
 10772  
 10773  func (c *current) onFieldName1() (any, error) {
 10774  	return string(c.text), nil
 10775  }
 10776  
 10777  func (p *parser) callonFieldName1() (any, error) {
 10778  	stack := p.vstack[len(p.vstack)-1]
 10779  	_ = stack
 10780  	return p.cur.onFieldName1()
 10781  }
 10782  
 10783  func (c *current) onString1(str any) (any, error) {
 10784  	return str, nil
 10785  }
 10786  
 10787  func (p *parser) callonString1() (any, error) {
 10788  	stack := p.vstack[len(p.vstack)-1]
 10789  	_ = stack
 10790  	return p.cur.onString1(stack["str"])
 10791  }
 10792  
 10793  func (c *current) onQuotedString1() (any, error) {
 10794  	// The returned string has quotes as the first and last character.
 10795  	return string(c.text), nil
 10796  }
 10797  
 10798  func (p *parser) callonQuotedString1() (any, error) {
 10799  	stack := p.vstack[len(p.vstack)-1]
 10800  	_ = stack
 10801  	return p.cur.onQuotedString1()
 10802  }
 10803  
 10804  func (c *current) onBoolean1() (any, error) {
 10805  	boolValue, _ := strconv.ParseBool(string(c.text))
 10806  	return boolValue, nil
 10807  }
 10808  
 10809  func (p *parser) callonBoolean1() (any, error) {
 10810  	stack := p.vstack[len(p.vstack)-1]
 10811  	_ = stack
 10812  	return p.cur.onBoolean1()
 10813  }
 10814  
 10815  func (c *current) onUnquotedString1() (any, error) {
 10816  	// Return the string wrapped in quotes.
 10817  	str := "\"" + string(c.text) + "\""
 10818  	return str, nil
 10819  }
 10820  
 10821  func (p *parser) callonUnquotedString1() (any, error) {
 10822  	stack := p.vstack[len(p.vstack)-1]
 10823  	_ = stack
 10824  	return p.cur.onUnquotedString1()
 10825  }
 10826  
 10827  func (c *current) onRenamePattern1() (any, error) {
 10828  	return string(c.text), nil
 10829  }
 10830  
 10831  func (p *parser) callonRenamePattern1() (any, error) {
 10832  	stack := p.vstack[len(p.vstack)-1]
 10833  	_ = stack
 10834  	return p.cur.onRenamePattern1()
 10835  }
 10836  
 10837  func (c *current) onNumber1(number any) (any, error) {
 10838  	return json.Number(number.(string)), nil
 10839  }
 10840  
 10841  func (p *parser) callonNumber1() (any, error) {
 10842  	stack := p.vstack[len(p.vstack)-1]
 10843  	_ = stack
 10844  	return p.cur.onNumber1(stack["number"])
 10845  }
 10846  
 10847  func (c *current) onNumberAsString1(number any) (any, error) {
 10848  	return number, nil
 10849  }
 10850  
 10851  func (p *parser) callonNumberAsString1() (any, error) {
 10852  	stack := p.vstack[len(p.vstack)-1]
 10853  	_ = stack
 10854  	return p.cur.onNumberAsString1(stack["number"])
 10855  }
 10856  
 10857  func (c *current) onFloatAsString1() (any, error) {
 10858  	return string(c.text), nil
 10859  }
 10860  
 10861  func (p *parser) callonFloatAsString1() (any, error) {
 10862  	stack := p.vstack[len(p.vstack)-1]
 10863  	_ = stack
 10864  	return p.cur.onFloatAsString1()
 10865  }
 10866  
 10867  func (c *current) onIntegerAsString1() (any, error) {
 10868  	return string(c.text), nil
 10869  }
 10870  
 10871  func (p *parser) callonIntegerAsString1() (any, error) {
 10872  	stack := p.vstack[len(p.vstack)-1]
 10873  	_ = stack
 10874  	return p.cur.onIntegerAsString1()
 10875  }
 10876  
 10877  func (c *current) onEqualityOperator1(op any) (any, error) {
 10878  	opStr, err := transferUint8ToString(op)
 10879  	if err != nil {
 10880  		return nil, fmt.Errorf("Spl peg: EqualityOperator: %v", err)
 10881  	}
 10882  	return opStr, nil
 10883  }
 10884  
 10885  func (p *parser) callonEqualityOperator1() (any, error) {
 10886  	stack := p.vstack[len(p.vstack)-1]
 10887  	_ = stack
 10888  	return p.cur.onEqualityOperator1(stack["op"])
 10889  }
 10890  
 10891  func (c *current) onInequalityOperator1(op any) (any, error) {
 10892  	opStr, err := transferUint8ToString(op)
 10893  	if err != nil {
 10894  		return nil, fmt.Errorf("Spl peg: InequalityOperator: %v", err)
 10895  	}
 10896  	return opStr, nil
 10897  }
 10898  
 10899  func (p *parser) callonInequalityOperator1() (any, error) {
 10900  	stack := p.vstack[len(p.vstack)-1]
 10901  	_ = stack
 10902  	return p.cur.onInequalityOperator1(stack["op"])
 10903  }
 10904  
 10905  func (c *current) onEqualityOrInequality2(op any) (any, error) {
 10906  	return op, nil
 10907  }
 10908  
 10909  func (p *parser) callonEqualityOrInequality2() (any, error) {
 10910  	stack := p.vstack[len(p.vstack)-1]
 10911  	_ = stack
 10912  	return p.cur.onEqualityOrInequality2(stack["op"])
 10913  }
 10914  
 10915  func (c *current) onEqualityOrInequality5(op any) (any, error) {
 10916  	return op, nil
 10917  }
 10918  
 10919  func (p *parser) callonEqualityOrInequality5() (any, error) {
 10920  	stack := p.vstack[len(p.vstack)-1]
 10921  	_ = stack
 10922  	return p.cur.onEqualityOrInequality5(stack["op"])
 10923  }
 10924  
 10925  func (c *current) onOpPlus1() (any, error) {
 10926  	return "+", nil
 10927  }
 10928  
 10929  func (p *parser) callonOpPlus1() (any, error) {
 10930  	stack := p.vstack[len(p.vstack)-1]
 10931  	_ = stack
 10932  	return p.cur.onOpPlus1()
 10933  }
 10934  
 10935  func (c *current) onOpMinus1() (any, error) {
 10936  	return "-", nil
 10937  }
 10938  
 10939  func (p *parser) callonOpMinus1() (any, error) {
 10940  	stack := p.vstack[len(p.vstack)-1]
 10941  	_ = stack
 10942  	return p.cur.onOpMinus1()
 10943  }
 10944  
 10945  func (c *current) onOpMul1() (any, error) {
 10946  	return "*", nil
 10947  }
 10948  
 10949  func (p *parser) callonOpMul1() (any, error) {
 10950  	stack := p.vstack[len(p.vstack)-1]
 10951  	_ = stack
 10952  	return p.cur.onOpMul1()
 10953  }
 10954  
 10955  func (c *current) onOpDiv1() (any, error) {
 10956  	return "/", nil
 10957  }
 10958  
 10959  func (p *parser) callonOpDiv1() (any, error) {
 10960  	stack := p.vstack[len(p.vstack)-1]
 10961  	_ = stack
 10962  	return p.cur.onOpDiv1()
 10963  }
 10964  
 10965  func (c *current) onSecond1() (any, error) {
 10966  	return utils.TMSecond, nil
 10967  }
 10968  
 10969  func (p *parser) callonSecond1() (any, error) {
 10970  	stack := p.vstack[len(p.vstack)-1]
 10971  	_ = stack
 10972  	return p.cur.onSecond1()
 10973  }
 10974  
 10975  func (c *current) onMinute1() (any, error) {
 10976  	return utils.TMMinute, nil
 10977  }
 10978  
 10979  func (p *parser) callonMinute1() (any, error) {
 10980  	stack := p.vstack[len(p.vstack)-1]
 10981  	_ = stack
 10982  	return p.cur.onMinute1()
 10983  }
 10984  
 10985  func (c *current) onHour1() (any, error) {
 10986  	return utils.TMHour, nil
 10987  }
 10988  
 10989  func (p *parser) callonHour1() (any, error) {
 10990  	stack := p.vstack[len(p.vstack)-1]
 10991  	_ = stack
 10992  	return p.cur.onHour1()
 10993  }
 10994  
 10995  func (c *current) onDay1() (any, error) {
 10996  	return utils.TMDay, nil
 10997  }
 10998  
 10999  func (p *parser) callonDay1() (any, error) {
 11000  	stack := p.vstack[len(p.vstack)-1]
 11001  	_ = stack
 11002  	return p.cur.onDay1()
 11003  }
 11004  
 11005  func (c *current) onWeek1() (any, error) {
 11006  	return utils.TMWeek, nil
 11007  }
 11008  
 11009  func (p *parser) callonWeek1() (any, error) {
 11010  	stack := p.vstack[len(p.vstack)-1]
 11011  	_ = stack
 11012  	return p.cur.onWeek1()
 11013  }
 11014  
 11015  func (c *current) onMonth1() (any, error) {
 11016  	return utils.TMMonth, nil
 11017  }
 11018  
 11019  func (p *parser) callonMonth1() (any, error) {
 11020  	stack := p.vstack[len(p.vstack)-1]
 11021  	_ = stack
 11022  	return p.cur.onMonth1()
 11023  }
 11024  
 11025  func (c *current) onQuarter1() (any, error) {
 11026  	return utils.TMQuarter, nil
 11027  }
 11028  
 11029  func (p *parser) callonQuarter1() (any, error) {
 11030  	stack := p.vstack[len(p.vstack)-1]
 11031  	_ = stack
 11032  	return p.cur.onQuarter1()
 11033  }
 11034  
 11035  func (c *current) onSubseconds1() (any, error) {
 11036  	timeUnit, err := utils.ConvertSubseconds(string(c.text))
 11037  	if err != nil {
 11038  		return nil, fmt.Errorf("Spl peg: Subseconds: %v", err)
 11039  	}
 11040  	return timeUnit, nil
 11041  }
 11042  
 11043  func (p *parser) callonSubseconds1() (any, error) {
 11044  	stack := p.vstack[len(p.vstack)-1]
 11045  	_ = stack
 11046  	return p.cur.onSubseconds1()
 11047  }
 11048  
 11049  func (c *current) onTransactionBlock1(txnOptions any) (any, error) {
 11050  	queryAgg := &structs.QueryAggregators{
 11051  		PipeCommandType:      structs.TransactionType,
 11052  		TransactionArguments: txnOptions.(*structs.TransactionArguments),
 11053  	}
 11054  	return queryAgg, nil
 11055  }
 11056  
 11057  func (p *parser) callonTransactionBlock1() (any, error) {
 11058  	stack := p.vstack[len(p.vstack)-1]
 11059  	_ = stack
 11060  	return p.cur.onTransactionBlock1(stack["txnOptions"])
 11061  }
 11062  
 11063  func (c *current) onTransactionOptions1(txnOptions any) (any, error) {
 11064  
 11065  	transactionRequest := &structs.TransactionArguments{}
 11066  
 11067  	if txnOptions != nil {
 11068  		txnArgs := txnOptions.(*TxnArgs).arguments
 11069  		transactionRequest.Fields = txnArgs.Fields
 11070  		transactionRequest.StartsWith = txnArgs.StartsWith
 11071  		transactionRequest.EndsWith = txnArgs.EndsWith
 11072  	}
 11073  
 11074  	return transactionRequest, nil
 11075  }
 11076  
 11077  func (p *parser) callonTransactionOptions1() (any, error) {
 11078  	stack := p.vstack[len(p.vstack)-1]
 11079  	_ = stack
 11080  	return p.cur.onTransactionOptions1(stack["txnOptions"])
 11081  }
 11082  
 11083  func (c *current) onTransactionDefinitionOptionsList1(first, rest any) (any, error) {
 11084  
 11085  	restSlice := rest.([]any)
 11086  	txnArgs := &TxnArgs{
 11087  		argOption: "txn-definition",
 11088  		arguments: &structs.TransactionArguments{},
 11089  	}
 11090  
 11091  	numArgs := 1 + len(restSlice)
 11092  
 11093  	for i := 0; i < numArgs; i++ {
 11094  		var txnArg *TxnArgs
 11095  		if i == 0 {
 11096  			txnArg = first.(*TxnArgs)
 11097  		} else {
 11098  			separatorAndArg := restSlice[i-1].([]any)
 11099  			txnArg = separatorAndArg[1].(*TxnArgs)
 11100  		}
 11101  		argOption := txnArg.argOption
 11102  
 11103  		switch argOption {
 11104  		case "fields":
 11105  			txnArgs.arguments.Fields = txnArg.arguments.Fields
 11106  		case "startswith":
 11107  			txnArgs.arguments.StartsWith = txnArg.arguments.StartsWith
 11108  		case "endswith":
 11109  			txnArgs.arguments.EndsWith = txnArg.arguments.EndsWith
 11110  		default:
 11111  			return nil, fmt.Errorf("Not a Valid Transaction Argument option")
 11112  		}
 11113  	}
 11114  
 11115  	return txnArgs, nil
 11116  }
 11117  
 11118  func (p *parser) callonTransactionDefinitionOptionsList1() (any, error) {
 11119  	stack := p.vstack[len(p.vstack)-1]
 11120  	_ = stack
 11121  	return p.cur.onTransactionDefinitionOptionsList1(stack["first"], stack["rest"])
 11122  }
 11123  
 11124  func (c *current) onTransactionDefinitionOption1(option any) (any, error) {
 11125  	return option, nil
 11126  }
 11127  
 11128  func (p *parser) callonTransactionDefinitionOption1() (any, error) {
 11129  	stack := p.vstack[len(p.vstack)-1]
 11130  	_ = stack
 11131  	return p.cur.onTransactionDefinitionOption1(stack["option"])
 11132  }
 11133  
 11134  func (c *current) onSpaceSeparatedFieldNameList1(first, rest any) (any, error) {
 11135  	var fields []string
 11136  	fields = append(fields, first.(string))
 11137  	for _, r := range rest.([]any) {
 11138  		// Extracting the field name from the tuple (SPACE, FieldName)
 11139  		fields = append(fields, r.([]any)[1].(string))
 11140  	}
 11141  
 11142  	txnArg := &TxnArgs{
 11143  		argOption: "fields",
 11144  		arguments: &structs.TransactionArguments{
 11145  			Fields: fields,
 11146  		},
 11147  	}
 11148  
 11149  	return txnArg, nil
 11150  }
 11151  
 11152  func (p *parser) callonSpaceSeparatedFieldNameList1() (any, error) {
 11153  	stack := p.vstack[len(p.vstack)-1]
 11154  	_ = stack
 11155  	return p.cur.onSpaceSeparatedFieldNameList1(stack["first"], stack["rest"])
 11156  }
 11157  
 11158  func (c *current) onStartsWithOption1(strExpr any) (any, error) {
 11159  	txnArg := &TxnArgs{
 11160  		argOption: "startswith",
 11161  		arguments: &structs.TransactionArguments{
 11162  			StartsWith: strExpr.(*structs.FilterStringExpr),
 11163  		},
 11164  	}
 11165  	return txnArg, nil
 11166  }
 11167  
 11168  func (p *parser) callonStartsWithOption1() (any, error) {
 11169  	stack := p.vstack[len(p.vstack)-1]
 11170  	_ = stack
 11171  	return p.cur.onStartsWithOption1(stack["strExpr"])
 11172  }
 11173  
 11174  func (c *current) onEndsWithOption1(strExpr any) (any, error) {
 11175  	txnArg := &TxnArgs{
 11176  		argOption: "endswith",
 11177  		arguments: &structs.TransactionArguments{
 11178  			EndsWith: strExpr.(*structs.FilterStringExpr),
 11179  		},
 11180  	}
 11181  	return txnArg, nil
 11182  }
 11183  
 11184  func (p *parser) callonEndsWithOption1() (any, error) {
 11185  	stack := p.vstack[len(p.vstack)-1]
 11186  	_ = stack
 11187  	return p.cur.onEndsWithOption1(stack["strExpr"])
 11188  }
 11189  
 11190  func (c *current) onTransactionFilterString1(strExpr any) (any, error) {
 11191  	return strExpr, nil
 11192  }
 11193  
 11194  func (p *parser) callonTransactionFilterString1() (any, error) {
 11195  	stack := p.vstack[len(p.vstack)-1]
 11196  	_ = stack
 11197  	return p.cur.onTransactionFilterString1(stack["strExpr"])
 11198  }
 11199  
 11200  func (c *current) onTransactionQuotedString1(str any) (any, error) {
 11201  	return str, nil
 11202  }
 11203  
 11204  func (p *parser) callonTransactionQuotedString1() (any, error) {
 11205  	stack := p.vstack[len(p.vstack)-1]
 11206  	_ = stack
 11207  	return p.cur.onTransactionQuotedString1(stack["str"])
 11208  }
 11209  
 11210  func (c *current) onTransactionQuotedStringSearchExpr1(searchClause any) (any, error) {
 11211  	filterStrExpr := &structs.FilterStringExpr{
 11212  		SearchNode: searchClause.(*ast.Node),
 11213  	}
 11214  
 11215  	return filterStrExpr, nil
 11216  }
 11217  
 11218  func (p *parser) callonTransactionQuotedStringSearchExpr1() (any, error) {
 11219  	stack := p.vstack[len(p.vstack)-1]
 11220  	_ = stack
 11221  	return p.cur.onTransactionQuotedStringSearchExpr1(stack["searchClause"])
 11222  }
 11223  
 11224  func (c *current) onQuotedStringNoOp1() (any, error) {
 11225  	// The returned string has quotes as the first and last character.
 11226  	return string(c.text), nil
 11227  }
 11228  
 11229  func (p *parser) callonQuotedStringNoOp1() (any, error) {
 11230  	stack := p.vstack[len(p.vstack)-1]
 11231  	_ = stack
 11232  	return p.cur.onQuotedStringNoOp1()
 11233  }
 11234  
 11235  func (c *current) onTransactionQuotedStringValue1(str any) (any, error) {
 11236  	filterStrExpr := &structs.FilterStringExpr{
 11237  		StringValue: removeQuotes(str.(string)),
 11238  	}
 11239  
 11240  	return filterStrExpr, nil
 11241  }
 11242  
 11243  func (p *parser) callonTransactionQuotedStringValue1() (any, error) {
 11244  	stack := p.vstack[len(p.vstack)-1]
 11245  	_ = stack
 11246  	return p.cur.onTransactionQuotedStringValue1(stack["str"])
 11247  }
 11248  
 11249  func (c *current) onTransactionSearch1(expr any) (any, error) {
 11250  
 11251  	filterStrExpr := &structs.FilterStringExpr{
 11252  		SearchNode: expr.(*ast.Node),
 11253  	}
 11254  
 11255  	return filterStrExpr, nil
 11256  }
 11257  
 11258  func (p *parser) callonTransactionSearch1() (any, error) {
 11259  	stack := p.vstack[len(p.vstack)-1]
 11260  	_ = stack
 11261  	return p.cur.onTransactionSearch1(stack["expr"])
 11262  }
 11263  
 11264  func (c *current) onTransactionEval1(condition any) (any, error) {
 11265  	filterStrExpr := &structs.FilterStringExpr{
 11266  		EvalBoolExpr: condition.(*structs.BoolExpr),
 11267  	}
 11268  
 11269  	return filterStrExpr, nil
 11270  }
 11271  
 11272  func (p *parser) callonTransactionEval1() (any, error) {
 11273  	stack := p.vstack[len(p.vstack)-1]
 11274  	_ = stack
 11275  	return p.cur.onTransactionEval1(stack["condition"])
 11276  }
 11277  
 11278  var (
 11279  	// errNoRule is returned when the grammar to parse has no rule.
 11280  	errNoRule = errors.New("grammar has no rule")
 11281  
 11282  	// errInvalidEntrypoint is returned when the specified entrypoint rule
 11283  	// does not exit.
 11284  	errInvalidEntrypoint = errors.New("invalid entrypoint")
 11285  
 11286  	// errInvalidEncoding is returned when the source is not properly
 11287  	// utf8-encoded.
 11288  	errInvalidEncoding = errors.New("invalid encoding")
 11289  
 11290  	// errMaxExprCnt is used to signal that the maximum number of
 11291  	// expressions have been parsed.
 11292  	errMaxExprCnt = errors.New("max number of expresssions parsed")
 11293  )
 11294  
 11295  // Option is a function that can set an option on the parser. It returns
 11296  // the previous setting as an Option.
 11297  type Option func(*parser) Option
 11298  
 11299  // MaxExpressions creates an Option to stop parsing after the provided
 11300  // number of expressions have been parsed, if the value is 0 then the parser will
 11301  // parse for as many steps as needed (possibly an infinite number).
 11302  //
 11303  // The default for maxExprCnt is 0.
 11304  func MaxExpressions(maxExprCnt uint64) Option {
 11305  	return func(p *parser) Option {
 11306  		oldMaxExprCnt := p.maxExprCnt
 11307  		p.maxExprCnt = maxExprCnt
 11308  		return MaxExpressions(oldMaxExprCnt)
 11309  	}
 11310  }
 11311  
 11312  // Entrypoint creates an Option to set the rule name to use as entrypoint.
 11313  // The rule name must have been specified in the -alternate-entrypoints
 11314  // if generating the parser with the -optimize-grammar flag, otherwise
 11315  // it may have been optimized out. Passing an empty string sets the
 11316  // entrypoint to the first rule in the grammar.
 11317  //
 11318  // The default is to start parsing at the first rule in the grammar.
 11319  func Entrypoint(ruleName string) Option {
 11320  	return func(p *parser) Option {
 11321  		oldEntrypoint := p.entrypoint
 11322  		p.entrypoint = ruleName
 11323  		if ruleName == "" {
 11324  			p.entrypoint = g.rules[0].name
 11325  		}
 11326  		return Entrypoint(oldEntrypoint)
 11327  	}
 11328  }
 11329  
 11330  // Statistics adds a user provided Stats struct to the parser to allow
 11331  // the user to process the results after the parsing has finished.
 11332  // Also the key for the "no match" counter is set.
 11333  //
 11334  // Example usage:
 11335  //
 11336  //	input := "input"
 11337  //	stats := Stats{}
 11338  //	_, err := Parse("input-file", []byte(input), Statistics(&stats, "no match"))
 11339  //	if err != nil {
 11340  //	    log.Panicln(err)
 11341  //	}
 11342  //	b, err := json.MarshalIndent(stats.ChoiceAltCnt, "", "  ")
 11343  //	if err != nil {
 11344  //	    log.Panicln(err)
 11345  //	}
 11346  //	fmt.Println(string(b))
 11347  func Statistics(stats *Stats, choiceNoMatch string) Option {
 11348  	return func(p *parser) Option {
 11349  		oldStats := p.Stats
 11350  		p.Stats = stats
 11351  		oldChoiceNoMatch := p.choiceNoMatch
 11352  		p.choiceNoMatch = choiceNoMatch
 11353  		if p.Stats.ChoiceAltCnt == nil {
 11354  			p.Stats.ChoiceAltCnt = make(map[string]map[string]int)
 11355  		}
 11356  		return Statistics(oldStats, oldChoiceNoMatch)
 11357  	}
 11358  }
 11359  
 11360  // Debug creates an Option to set the debug flag to b. When set to true,
 11361  // debugging information is printed to stdout while parsing.
 11362  //
 11363  // The default is false.
 11364  func Debug(b bool) Option {
 11365  	return func(p *parser) Option {
 11366  		old := p.debug
 11367  		p.debug = b
 11368  		return Debug(old)
 11369  	}
 11370  }
 11371  
 11372  // Memoize creates an Option to set the memoize flag to b. When set to true,
 11373  // the parser will cache all results so each expression is evaluated only
 11374  // once. This guarantees linear parsing time even for pathological cases,
 11375  // at the expense of more memory and slower times for typical cases.
 11376  //
 11377  // The default is false.
 11378  func Memoize(b bool) Option {
 11379  	return func(p *parser) Option {
 11380  		old := p.memoize
 11381  		p.memoize = b
 11382  		return Memoize(old)
 11383  	}
 11384  }
 11385  
 11386  // AllowInvalidUTF8 creates an Option to allow invalid UTF-8 bytes.
 11387  // Every invalid UTF-8 byte is treated as a utf8.RuneError (U+FFFD)
 11388  // by character class matchers and is matched by the any matcher.
 11389  // The returned matched value, c.text and c.offset are NOT affected.
 11390  //
 11391  // The default is false.
 11392  func AllowInvalidUTF8(b bool) Option {
 11393  	return func(p *parser) Option {
 11394  		old := p.allowInvalidUTF8
 11395  		p.allowInvalidUTF8 = b
 11396  		return AllowInvalidUTF8(old)
 11397  	}
 11398  }
 11399  
 11400  // Recover creates an Option to set the recover flag to b. When set to
 11401  // true, this causes the parser to recover from panics and convert it
 11402  // to an error. Setting it to false can be useful while debugging to
 11403  // access the full stack trace.
 11404  //
 11405  // The default is true.
 11406  func Recover(b bool) Option {
 11407  	return func(p *parser) Option {
 11408  		old := p.recover
 11409  		p.recover = b
 11410  		return Recover(old)
 11411  	}
 11412  }
 11413  
 11414  // GlobalStore creates an Option to set a key to a certain value in
 11415  // the globalStore.
 11416  func GlobalStore(key string, value any) Option {
 11417  	return func(p *parser) Option {
 11418  		old := p.cur.globalStore[key]
 11419  		p.cur.globalStore[key] = value
 11420  		return GlobalStore(key, old)
 11421  	}
 11422  }
 11423  
 11424  // InitState creates an Option to set a key to a certain value in
 11425  // the global "state" store.
 11426  func InitState(key string, value any) Option {
 11427  	return func(p *parser) Option {
 11428  		old := p.cur.state[key]
 11429  		p.cur.state[key] = value
 11430  		return InitState(key, old)
 11431  	}
 11432  }
 11433  
 11434  // ParseFile parses the file identified by filename.
 11435  func ParseFile(filename string, opts ...Option) (i any, err error) {
 11436  	f, err := os.Open(filename)
 11437  	if err != nil {
 11438  		return nil, err
 11439  	}
 11440  	defer func() {
 11441  		if closeErr := f.Close(); closeErr != nil {
 11442  			err = closeErr
 11443  		}
 11444  	}()
 11445  	return ParseReader(filename, f, opts...)
 11446  }
 11447  
 11448  // ParseReader parses the data from r using filename as information in the
 11449  // error messages.
 11450  func ParseReader(filename string, r io.Reader, opts ...Option) (any, error) {
 11451  	b, err := io.ReadAll(r)
 11452  	if err != nil {
 11453  		return nil, err
 11454  	}
 11455  
 11456  	return Parse(filename, b, opts...)
 11457  }
 11458  
 11459  // Parse parses the data from b using filename as information in the
 11460  // error messages.
 11461  func Parse(filename string, b []byte, opts ...Option) (any, error) {
 11462  	return newParser(filename, b, opts...).parse(g)
 11463  }
 11464  
 11465  // position records a position in the text.
 11466  type position struct {
 11467  	line, col, offset int
 11468  }
 11469  
 11470  func (p position) String() string {
 11471  	return strconv.Itoa(p.line) + ":" + strconv.Itoa(p.col) + " [" + strconv.Itoa(p.offset) + "]"
 11472  }
 11473  
 11474  // savepoint stores all state required to go back to this point in the
 11475  // parser.
 11476  type savepoint struct {
 11477  	position
 11478  	rn rune
 11479  	w  int
 11480  }
 11481  
 11482  type current struct {
 11483  	pos  position // start position of the match
 11484  	text []byte   // raw text of the match
 11485  
 11486  	// state is a store for arbitrary key,value pairs that the user wants to be
 11487  	// tied to the backtracking of the parser.
 11488  	// This is always rolled back if a parsing rule fails.
 11489  	state storeDict
 11490  
 11491  	// globalStore is a general store for the user to store arbitrary key-value
 11492  	// pairs that they need to manage and that they do not want tied to the
 11493  	// backtracking of the parser. This is only modified by the user and never
 11494  	// rolled back by the parser. It is always up to the user to keep this in a
 11495  	// consistent state.
 11496  	globalStore storeDict
 11497  }
 11498  
 11499  type storeDict map[string]any
 11500  
 11501  // the AST types...
 11502  
 11503  type grammar struct {
 11504  	pos   position
 11505  	rules []*rule
 11506  }
 11507  
 11508  type rule struct {
 11509  	pos         position
 11510  	name        string
 11511  	displayName string
 11512  	expr        any
 11513  }
 11514  
 11515  type choiceExpr struct {
 11516  	pos          position
 11517  	alternatives []any
 11518  }
 11519  
 11520  type actionExpr struct {
 11521  	pos  position
 11522  	expr any
 11523  	run  func(*parser) (any, error)
 11524  }
 11525  
 11526  type recoveryExpr struct {
 11527  	pos          position
 11528  	expr         any
 11529  	recoverExpr  any
 11530  	failureLabel []string
 11531  }
 11532  
 11533  type seqExpr struct {
 11534  	pos   position
 11535  	exprs []any
 11536  }
 11537  
 11538  type throwExpr struct {
 11539  	pos   position
 11540  	label string
 11541  }
 11542  
 11543  type labeledExpr struct {
 11544  	pos   position
 11545  	label string
 11546  	expr  any
 11547  }
 11548  
 11549  type expr struct {
 11550  	pos  position
 11551  	expr any
 11552  }
 11553  
 11554  type (
 11555  	andExpr        expr
 11556  	notExpr        expr
 11557  	zeroOrOneExpr  expr
 11558  	zeroOrMoreExpr expr
 11559  	oneOrMoreExpr  expr
 11560  )
 11561  
 11562  type ruleRefExpr struct {
 11563  	pos  position
 11564  	name string
 11565  }
 11566  
 11567  type stateCodeExpr struct {
 11568  	pos position
 11569  	run func(*parser) error
 11570  }
 11571  
 11572  type andCodeExpr struct {
 11573  	pos position
 11574  	run func(*parser) (bool, error)
 11575  }
 11576  
 11577  type notCodeExpr struct {
 11578  	pos position
 11579  	run func(*parser) (bool, error)
 11580  }
 11581  
 11582  type litMatcher struct {
 11583  	pos        position
 11584  	val        string
 11585  	ignoreCase bool
 11586  	want       string
 11587  }
 11588  
 11589  type charClassMatcher struct {
 11590  	pos             position
 11591  	val             string
 11592  	basicLatinChars [128]bool
 11593  	chars           []rune
 11594  	ranges          []rune
 11595  	classes         []*unicode.RangeTable
 11596  	ignoreCase      bool
 11597  	inverted        bool
 11598  }
 11599  
 11600  type anyMatcher position
 11601  
 11602  // errList cumulates the errors found by the parser.
 11603  type errList []error
 11604  
 11605  func (e *errList) add(err error) {
 11606  	*e = append(*e, err)
 11607  }
 11608  
 11609  func (e errList) err() error {
 11610  	if len(e) == 0 {
 11611  		return nil
 11612  	}
 11613  	e.dedupe()
 11614  	return e
 11615  }
 11616  
 11617  func (e *errList) dedupe() {
 11618  	var cleaned []error
 11619  	set := make(map[string]bool)
 11620  	for _, err := range *e {
 11621  		if msg := err.Error(); !set[msg] {
 11622  			set[msg] = true
 11623  			cleaned = append(cleaned, err)
 11624  		}
 11625  	}
 11626  	*e = cleaned
 11627  }
 11628  
 11629  func (e errList) Error() string {
 11630  	switch len(e) {
 11631  	case 0:
 11632  		return ""
 11633  	case 1:
 11634  		return e[0].Error()
 11635  	default:
 11636  		var buf bytes.Buffer
 11637  
 11638  		for i, err := range e {
 11639  			if i > 0 {
 11640  				buf.WriteRune('\n')
 11641  			}
 11642  			buf.WriteString(err.Error())
 11643  		}
 11644  		return buf.String()
 11645  	}
 11646  }
 11647  
 11648  // parserError wraps an error with a prefix indicating the rule in which
 11649  // the error occurred. The original error is stored in the Inner field.
 11650  type parserError struct {
 11651  	Inner    error
 11652  	pos      position
 11653  	prefix   string
 11654  	expected []string
 11655  }
 11656  
 11657  // Error returns the error message.
 11658  func (p *parserError) Error() string {
 11659  	return p.prefix + ": " + p.Inner.Error()
 11660  }
 11661  
 11662  // newParser creates a parser with the specified input source and options.
 11663  func newParser(filename string, b []byte, opts ...Option) *parser {
 11664  	stats := Stats{
 11665  		ChoiceAltCnt: make(map[string]map[string]int),
 11666  	}
 11667  
 11668  	p := &parser{
 11669  		filename: filename,
 11670  		errs:     new(errList),
 11671  		data:     b,
 11672  		pt:       savepoint{position: position{line: 1}},
 11673  		recover:  true,
 11674  		cur: current{
 11675  			state:       make(storeDict),
 11676  			globalStore: make(storeDict),
 11677  		},
 11678  		maxFailPos:      position{col: 1, line: 1},
 11679  		maxFailExpected: make([]string, 0, 20),
 11680  		Stats:           &stats,
 11681  		// start rule is rule [0] unless an alternate entrypoint is specified
 11682  		entrypoint: g.rules[0].name,
 11683  	}
 11684  	p.setOptions(opts)
 11685  
 11686  	if p.maxExprCnt == 0 {
 11687  		p.maxExprCnt = math.MaxUint64
 11688  	}
 11689  
 11690  	return p
 11691  }
 11692  
 11693  // setOptions applies the options to the parser.
 11694  func (p *parser) setOptions(opts []Option) {
 11695  	for _, opt := range opts {
 11696  		opt(p)
 11697  	}
 11698  }
 11699  
 11700  type resultTuple struct {
 11701  	v   any
 11702  	b   bool
 11703  	end savepoint
 11704  }
 11705  
 11706  const choiceNoMatch = -1
 11707  
 11708  // Stats stores some statistics, gathered during parsing
 11709  type Stats struct {
 11710  	// ExprCnt counts the number of expressions processed during parsing
 11711  	// This value is compared to the maximum number of expressions allowed
 11712  	// (set by the MaxExpressions option).
 11713  	ExprCnt uint64
 11714  
 11715  	// ChoiceAltCnt is used to count for each ordered choice expression,
 11716  	// which alternative is used how may times.
 11717  	// These numbers allow to optimize the order of the ordered choice expression
 11718  	// to increase the performance of the parser
 11719  	//
 11720  	// The outer key of ChoiceAltCnt is composed of the name of the rule as well
 11721  	// as the line and the column of the ordered choice.
 11722  	// The inner key of ChoiceAltCnt is the number (one-based) of the matching alternative.
 11723  	// For each alternative the number of matches are counted. If an ordered choice does not
 11724  	// match, a special counter is incremented. The name of this counter is set with
 11725  	// the parser option Statistics.
 11726  	// For an alternative to be included in ChoiceAltCnt, it has to match at least once.
 11727  	ChoiceAltCnt map[string]map[string]int
 11728  }
 11729  
 11730  type parser struct {
 11731  	filename string
 11732  	pt       savepoint
 11733  	cur      current
 11734  
 11735  	data []byte
 11736  	errs *errList
 11737  
 11738  	depth   int
 11739  	recover bool
 11740  	debug   bool
 11741  
 11742  	memoize bool
 11743  	// memoization table for the packrat algorithm:
 11744  	// map[offset in source] map[expression or rule] {value, match}
 11745  	memo map[int]map[any]resultTuple
 11746  
 11747  	// rules table, maps the rule identifier to the rule node
 11748  	rules map[string]*rule
 11749  	// variables stack, map of label to value
 11750  	vstack []map[string]any
 11751  	// rule stack, allows identification of the current rule in errors
 11752  	rstack []*rule
 11753  
 11754  	// parse fail
 11755  	maxFailPos            position
 11756  	maxFailExpected       []string
 11757  	maxFailInvertExpected bool
 11758  
 11759  	// max number of expressions to be parsed
 11760  	maxExprCnt uint64
 11761  	// entrypoint for the parser
 11762  	entrypoint string
 11763  
 11764  	allowInvalidUTF8 bool
 11765  
 11766  	*Stats
 11767  
 11768  	choiceNoMatch string
 11769  	// recovery expression stack, keeps track of the currently available recovery expression, these are traversed in reverse
 11770  	recoveryStack []map[string]any
 11771  }
 11772  
 11773  // push a variable set on the vstack.
 11774  func (p *parser) pushV() {
 11775  	if cap(p.vstack) == len(p.vstack) {
 11776  		// create new empty slot in the stack
 11777  		p.vstack = append(p.vstack, nil)
 11778  	} else {
 11779  		// slice to 1 more
 11780  		p.vstack = p.vstack[:len(p.vstack)+1]
 11781  	}
 11782  
 11783  	// get the last args set
 11784  	m := p.vstack[len(p.vstack)-1]
 11785  	if m != nil && len(m) == 0 {
 11786  		// empty map, all good
 11787  		return
 11788  	}
 11789  
 11790  	m = make(map[string]any)
 11791  	p.vstack[len(p.vstack)-1] = m
 11792  }
 11793  
 11794  // pop a variable set from the vstack.
 11795  func (p *parser) popV() {
 11796  	// if the map is not empty, clear it
 11797  	m := p.vstack[len(p.vstack)-1]
 11798  	if len(m) > 0 {
 11799  		// GC that map
 11800  		p.vstack[len(p.vstack)-1] = nil
 11801  	}
 11802  	p.vstack = p.vstack[:len(p.vstack)-1]
 11803  }
 11804  
 11805  // push a recovery expression with its labels to the recoveryStack
 11806  func (p *parser) pushRecovery(labels []string, expr any) {
 11807  	if cap(p.recoveryStack) == len(p.recoveryStack) {
 11808  		// create new empty slot in the stack
 11809  		p.recoveryStack = append(p.recoveryStack, nil)
 11810  	} else {
 11811  		// slice to 1 more
 11812  		p.recoveryStack = p.recoveryStack[:len(p.recoveryStack)+1]
 11813  	}
 11814  
 11815  	m := make(map[string]any, len(labels))
 11816  	for _, fl := range labels {
 11817  		m[fl] = expr
 11818  	}
 11819  	p.recoveryStack[len(p.recoveryStack)-1] = m
 11820  }
 11821  
 11822  // pop a recovery expression from the recoveryStack
 11823  func (p *parser) popRecovery() {
 11824  	// GC that map
 11825  	p.recoveryStack[len(p.recoveryStack)-1] = nil
 11826  
 11827  	p.recoveryStack = p.recoveryStack[:len(p.recoveryStack)-1]
 11828  }
 11829  
 11830  func (p *parser) print(prefix, s string) string {
 11831  	if !p.debug {
 11832  		return s
 11833  	}
 11834  
 11835  	fmt.Printf("%s %d:%d:%d: %s [%#U]\n",
 11836  		prefix, p.pt.line, p.pt.col, p.pt.offset, s, p.pt.rn)
 11837  	return s
 11838  }
 11839  
 11840  func (p *parser) printIndent(mark string, s string) string {
 11841  	return p.print(strings.Repeat(" ", p.depth)+mark, s)
 11842  }
 11843  
 11844  func (p *parser) in(s string) string {
 11845  	res := p.printIndent(">", s)
 11846  	p.depth++
 11847  	return res
 11848  }
 11849  
 11850  func (p *parser) out(s string) string {
 11851  	p.depth--
 11852  	return p.printIndent("<", s)
 11853  }
 11854  
 11855  func (p *parser) addErr(err error) {
 11856  	p.addErrAt(err, p.pt.position, []string{})
 11857  }
 11858  
 11859  func (p *parser) addErrAt(err error, pos position, expected []string) {
 11860  	var buf bytes.Buffer
 11861  	if p.filename != "" {
 11862  		buf.WriteString(p.filename)
 11863  	}
 11864  	if buf.Len() > 0 {
 11865  		buf.WriteString(":")
 11866  	}
 11867  	buf.WriteString(fmt.Sprintf("%d:%d (%d)", pos.line, pos.col, pos.offset))
 11868  	if len(p.rstack) > 0 {
 11869  		if buf.Len() > 0 {
 11870  			buf.WriteString(": ")
 11871  		}
 11872  		rule := p.rstack[len(p.rstack)-1]
 11873  		if rule.displayName != "" {
 11874  			buf.WriteString("rule " + rule.displayName)
 11875  		} else {
 11876  			buf.WriteString("rule " + rule.name)
 11877  		}
 11878  	}
 11879  	pe := &parserError{Inner: err, pos: pos, prefix: buf.String(), expected: expected}
 11880  	p.errs.add(pe)
 11881  }
 11882  
 11883  func (p *parser) failAt(fail bool, pos position, want string) {
 11884  	// process fail if parsing fails and not inverted or parsing succeeds and invert is set
 11885  	if fail == p.maxFailInvertExpected {
 11886  		if pos.offset < p.maxFailPos.offset {
 11887  			return
 11888  		}
 11889  
 11890  		if pos.offset > p.maxFailPos.offset {
 11891  			p.maxFailPos = pos
 11892  			p.maxFailExpected = p.maxFailExpected[:0]
 11893  		}
 11894  
 11895  		if p.maxFailInvertExpected {
 11896  			want = "!" + want
 11897  		}
 11898  		p.maxFailExpected = append(p.maxFailExpected, want)
 11899  	}
 11900  }
 11901  
 11902  // read advances the parser to the next rune.
 11903  func (p *parser) read() {
 11904  	p.pt.offset += p.pt.w
 11905  	rn, n := utf8.DecodeRune(p.data[p.pt.offset:])
 11906  	p.pt.rn = rn
 11907  	p.pt.w = n
 11908  	p.pt.col++
 11909  	if rn == '\n' {
 11910  		p.pt.line++
 11911  		p.pt.col = 0
 11912  	}
 11913  
 11914  	if rn == utf8.RuneError && n == 1 { // see utf8.DecodeRune
 11915  		if !p.allowInvalidUTF8 {
 11916  			p.addErr(errInvalidEncoding)
 11917  		}
 11918  	}
 11919  }
 11920  
 11921  // restore parser position to the savepoint pt.
 11922  func (p *parser) restore(pt savepoint) {
 11923  	if p.debug {
 11924  		defer p.out(p.in("restore"))
 11925  	}
 11926  	if pt.offset == p.pt.offset {
 11927  		return
 11928  	}
 11929  	p.pt = pt
 11930  }
 11931  
 11932  // Cloner is implemented by any value that has a Clone method, which returns a
 11933  // copy of the value. This is mainly used for types which are not passed by
 11934  // value (e.g map, slice, chan) or structs that contain such types.
 11935  //
 11936  // This is used in conjunction with the global state feature to create proper
 11937  // copies of the state to allow the parser to properly restore the state in
 11938  // the case of backtracking.
 11939  type Cloner interface {
 11940  	Clone() any
 11941  }
 11942  
 11943  var statePool = &sync.Pool{
 11944  	New: func() any { return make(storeDict) },
 11945  }
 11946  
 11947  func (sd storeDict) Discard() {
 11948  	for k := range sd {
 11949  		delete(sd, k)
 11950  	}
 11951  	statePool.Put(sd)
 11952  }
 11953  
 11954  // clone and return parser current state.
 11955  func (p *parser) cloneState() storeDict {
 11956  	if p.debug {
 11957  		defer p.out(p.in("cloneState"))
 11958  	}
 11959  
 11960  	state := statePool.Get().(storeDict)
 11961  	for k, v := range p.cur.state {
 11962  		if c, ok := v.(Cloner); ok {
 11963  			state[k] = c.Clone()
 11964  		} else {
 11965  			state[k] = v
 11966  		}
 11967  	}
 11968  	return state
 11969  }
 11970  
 11971  // restore parser current state to the state storeDict.
 11972  // every restoreState should applied only one time for every cloned state
 11973  func (p *parser) restoreState(state storeDict) {
 11974  	if p.debug {
 11975  		defer p.out(p.in("restoreState"))
 11976  	}
 11977  	p.cur.state.Discard()
 11978  	p.cur.state = state
 11979  }
 11980  
 11981  // get the slice of bytes from the savepoint start to the current position.
 11982  func (p *parser) sliceFrom(start savepoint) []byte {
 11983  	return p.data[start.position.offset:p.pt.position.offset]
 11984  }
 11985  
 11986  func (p *parser) getMemoized(node any) (resultTuple, bool) {
 11987  	if len(p.memo) == 0 {
 11988  		return resultTuple{}, false
 11989  	}
 11990  	m := p.memo[p.pt.offset]
 11991  	if len(m) == 0 {
 11992  		return resultTuple{}, false
 11993  	}
 11994  	res, ok := m[node]
 11995  	return res, ok
 11996  }
 11997  
 11998  func (p *parser) setMemoized(pt savepoint, node any, tuple resultTuple) {
 11999  	if p.memo == nil {
 12000  		p.memo = make(map[int]map[any]resultTuple)
 12001  	}
 12002  	m := p.memo[pt.offset]
 12003  	if m == nil {
 12004  		m = make(map[any]resultTuple)
 12005  		p.memo[pt.offset] = m
 12006  	}
 12007  	m[node] = tuple
 12008  }
 12009  
 12010  func (p *parser) buildRulesTable(g *grammar) {
 12011  	p.rules = make(map[string]*rule, len(g.rules))
 12012  	for _, r := range g.rules {
 12013  		p.rules[r.name] = r
 12014  	}
 12015  }
 12016  
 12017  func (p *parser) parse(g *grammar) (val any, err error) {
 12018  	if len(g.rules) == 0 {
 12019  		p.addErr(errNoRule)
 12020  		return nil, p.errs.err()
 12021  	}
 12022  
 12023  	// TODO : not super critical but this could be generated
 12024  	p.buildRulesTable(g)
 12025  
 12026  	if p.recover {
 12027  		// panic can be used in action code to stop parsing immediately
 12028  		// and return the panic as an error.
 12029  		defer func() {
 12030  			if e := recover(); e != nil {
 12031  				if p.debug {
 12032  					defer p.out(p.in("panic handler"))
 12033  				}
 12034  				val = nil
 12035  				switch e := e.(type) {
 12036  				case error:
 12037  					p.addErr(e)
 12038  				default:
 12039  					p.addErr(fmt.Errorf("%v", e))
 12040  				}
 12041  				err = p.errs.err()
 12042  			}
 12043  		}()
 12044  	}
 12045  
 12046  	startRule, ok := p.rules[p.entrypoint]
 12047  	if !ok {
 12048  		p.addErr(errInvalidEntrypoint)
 12049  		return nil, p.errs.err()
 12050  	}
 12051  
 12052  	p.read() // advance to first rune
 12053  	val, ok = p.parseRuleWrap(startRule)
 12054  	if !ok {
 12055  		if len(*p.errs) == 0 {
 12056  			// If parsing fails, but no errors have been recorded, the expected values
 12057  			// for the farthest parser position are returned as error.
 12058  			maxFailExpectedMap := make(map[string]struct{}, len(p.maxFailExpected))
 12059  			for _, v := range p.maxFailExpected {
 12060  				maxFailExpectedMap[v] = struct{}{}
 12061  			}
 12062  			expected := make([]string, 0, len(maxFailExpectedMap))
 12063  			eof := false
 12064  			if _, ok := maxFailExpectedMap["!."]; ok {
 12065  				delete(maxFailExpectedMap, "!.")
 12066  				eof = true
 12067  			}
 12068  			for k := range maxFailExpectedMap {
 12069  				expected = append(expected, k)
 12070  			}
 12071  			sort.Strings(expected)
 12072  			if eof {
 12073  				expected = append(expected, "EOF")
 12074  			}
 12075  			p.addErrAt(errors.New("no match found, expected: "+listJoin(expected, ", ", "or")), p.maxFailPos, expected)
 12076  		}
 12077  
 12078  		return nil, p.errs.err()
 12079  	}
 12080  	return val, p.errs.err()
 12081  }
 12082  
 12083  func listJoin(list []string, sep string, lastSep string) string {
 12084  	switch len(list) {
 12085  	case 0:
 12086  		return ""
 12087  	case 1:
 12088  		return list[0]
 12089  	default:
 12090  		return strings.Join(list[:len(list)-1], sep) + " " + lastSep + " " + list[len(list)-1]
 12091  	}
 12092  }
 12093  
 12094  func (p *parser) parseRuleMemoize(rule *rule) (any, bool) {
 12095  	res, ok := p.getMemoized(rule)
 12096  	if ok {
 12097  		p.restore(res.end)
 12098  		return res.v, res.b
 12099  	}
 12100  
 12101  	startMark := p.pt
 12102  	val, ok := p.parseRule(rule)
 12103  	p.setMemoized(startMark, rule, resultTuple{val, ok, p.pt})
 12104  
 12105  	return val, ok
 12106  }
 12107  
 12108  func (p *parser) parseRuleWrap(rule *rule) (any, bool) {
 12109  	if p.debug {
 12110  		defer p.out(p.in("parseRule " + rule.name))
 12111  	}
 12112  	var (
 12113  		val       any
 12114  		ok        bool
 12115  		startMark = p.pt
 12116  	)
 12117  
 12118  	if p.memoize {
 12119  		val, ok = p.parseRuleMemoize(rule)
 12120  	} else {
 12121  		val, ok = p.parseRule(rule)
 12122  	}
 12123  
 12124  	if ok && p.debug {
 12125  		p.printIndent("MATCH", string(p.sliceFrom(startMark)))
 12126  	}
 12127  	return val, ok
 12128  }
 12129  
 12130  func (p *parser) parseRule(rule *rule) (any, bool) {
 12131  	p.rstack = append(p.rstack, rule)
 12132  	p.pushV()
 12133  	val, ok := p.parseExprWrap(rule.expr)
 12134  	p.popV()
 12135  	p.rstack = p.rstack[:len(p.rstack)-1]
 12136  	return val, ok
 12137  }
 12138  
 12139  func (p *parser) parseExprWrap(expr any) (any, bool) {
 12140  	var pt savepoint
 12141  
 12142  	if p.memoize {
 12143  		res, ok := p.getMemoized(expr)
 12144  		if ok {
 12145  			p.restore(res.end)
 12146  			return res.v, res.b
 12147  		}
 12148  		pt = p.pt
 12149  	}
 12150  
 12151  	val, ok := p.parseExpr(expr)
 12152  
 12153  	if p.memoize {
 12154  		p.setMemoized(pt, expr, resultTuple{val, ok, p.pt})
 12155  	}
 12156  	return val, ok
 12157  }
 12158  
 12159  func (p *parser) parseExpr(expr any) (any, bool) {
 12160  	p.ExprCnt++
 12161  	if p.ExprCnt > p.maxExprCnt {
 12162  		panic(errMaxExprCnt)
 12163  	}
 12164  
 12165  	var val any
 12166  	var ok bool
 12167  	switch expr := expr.(type) {
 12168  	case *actionExpr:
 12169  		val, ok = p.parseActionExpr(expr)
 12170  	case *andCodeExpr:
 12171  		val, ok = p.parseAndCodeExpr(expr)
 12172  	case *andExpr:
 12173  		val, ok = p.parseAndExpr(expr)
 12174  	case *anyMatcher:
 12175  		val, ok = p.parseAnyMatcher(expr)
 12176  	case *charClassMatcher:
 12177  		val, ok = p.parseCharClassMatcher(expr)
 12178  	case *choiceExpr:
 12179  		val, ok = p.parseChoiceExpr(expr)
 12180  	case *labeledExpr:
 12181  		val, ok = p.parseLabeledExpr(expr)
 12182  	case *litMatcher:
 12183  		val, ok = p.parseLitMatcher(expr)
 12184  	case *notCodeExpr:
 12185  		val, ok = p.parseNotCodeExpr(expr)
 12186  	case *notExpr:
 12187  		val, ok = p.parseNotExpr(expr)
 12188  	case *oneOrMoreExpr:
 12189  		val, ok = p.parseOneOrMoreExpr(expr)
 12190  	case *recoveryExpr:
 12191  		val, ok = p.parseRecoveryExpr(expr)
 12192  	case *ruleRefExpr:
 12193  		val, ok = p.parseRuleRefExpr(expr)
 12194  	case *seqExpr:
 12195  		val, ok = p.parseSeqExpr(expr)
 12196  	case *stateCodeExpr:
 12197  		val, ok = p.parseStateCodeExpr(expr)
 12198  	case *throwExpr:
 12199  		val, ok = p.parseThrowExpr(expr)
 12200  	case *zeroOrMoreExpr:
 12201  		val, ok = p.parseZeroOrMoreExpr(expr)
 12202  	case *zeroOrOneExpr:
 12203  		val, ok = p.parseZeroOrOneExpr(expr)
 12204  	default:
 12205  		panic(fmt.Sprintf("unknown expression type %T", expr))
 12206  	}
 12207  	return val, ok
 12208  }
 12209  
 12210  func (p *parser) parseActionExpr(act *actionExpr) (any, bool) {
 12211  	if p.debug {
 12212  		defer p.out(p.in("parseActionExpr"))
 12213  	}
 12214  
 12215  	start := p.pt
 12216  	val, ok := p.parseExprWrap(act.expr)
 12217  	if ok {
 12218  		p.cur.pos = start.position
 12219  		p.cur.text = p.sliceFrom(start)
 12220  		state := p.cloneState()
 12221  		actVal, err := act.run(p)
 12222  		if err != nil {
 12223  			p.addErrAt(err, start.position, []string{})
 12224  		}
 12225  		p.restoreState(state)
 12226  
 12227  		val = actVal
 12228  	}
 12229  	if ok && p.debug {
 12230  		p.printIndent("MATCH", string(p.sliceFrom(start)))
 12231  	}
 12232  	return val, ok
 12233  }
 12234  
 12235  func (p *parser) parseAndCodeExpr(and *andCodeExpr) (any, bool) {
 12236  	if p.debug {
 12237  		defer p.out(p.in("parseAndCodeExpr"))
 12238  	}
 12239  
 12240  	state := p.cloneState()
 12241  
 12242  	ok, err := and.run(p)
 12243  	if err != nil {
 12244  		p.addErr(err)
 12245  	}
 12246  	p.restoreState(state)
 12247  
 12248  	return nil, ok
 12249  }
 12250  
 12251  func (p *parser) parseAndExpr(and *andExpr) (any, bool) {
 12252  	if p.debug {
 12253  		defer p.out(p.in("parseAndExpr"))
 12254  	}
 12255  
 12256  	pt := p.pt
 12257  	state := p.cloneState()
 12258  	p.pushV()
 12259  	_, ok := p.parseExprWrap(and.expr)
 12260  	p.popV()
 12261  	p.restoreState(state)
 12262  	p.restore(pt)
 12263  
 12264  	return nil, ok
 12265  }
 12266  
 12267  func (p *parser) parseAnyMatcher(any *anyMatcher) (any, bool) {
 12268  	if p.debug {
 12269  		defer p.out(p.in("parseAnyMatcher"))
 12270  	}
 12271  
 12272  	if p.pt.rn == utf8.RuneError && p.pt.w == 0 {
 12273  		// EOF - see utf8.DecodeRune
 12274  		p.failAt(false, p.pt.position, ".")
 12275  		return nil, false
 12276  	}
 12277  	start := p.pt
 12278  	p.read()
 12279  	p.failAt(true, start.position, ".")
 12280  	return p.sliceFrom(start), true
 12281  }
 12282  
 12283  func (p *parser) parseCharClassMatcher(chr *charClassMatcher) (any, bool) {
 12284  	if p.debug {
 12285  		defer p.out(p.in("parseCharClassMatcher"))
 12286  	}
 12287  
 12288  	cur := p.pt.rn
 12289  	start := p.pt
 12290  
 12291  	// can't match EOF
 12292  	if cur == utf8.RuneError && p.pt.w == 0 { // see utf8.DecodeRune
 12293  		p.failAt(false, start.position, chr.val)
 12294  		return nil, false
 12295  	}
 12296  
 12297  	if chr.ignoreCase {
 12298  		cur = unicode.ToLower(cur)
 12299  	}
 12300  
 12301  	// try to match in the list of available chars
 12302  	for _, rn := range chr.chars {
 12303  		if rn == cur {
 12304  			if chr.inverted {
 12305  				p.failAt(false, start.position, chr.val)
 12306  				return nil, false
 12307  			}
 12308  			p.read()
 12309  			p.failAt(true, start.position, chr.val)
 12310  			return p.sliceFrom(start), true
 12311  		}
 12312  	}
 12313  
 12314  	// try to match in the list of ranges
 12315  	for i := 0; i < len(chr.ranges); i += 2 {
 12316  		if cur >= chr.ranges[i] && cur <= chr.ranges[i+1] {
 12317  			if chr.inverted {
 12318  				p.failAt(false, start.position, chr.val)
 12319  				return nil, false
 12320  			}
 12321  			p.read()
 12322  			p.failAt(true, start.position, chr.val)
 12323  			return p.sliceFrom(start), true
 12324  		}
 12325  	}
 12326  
 12327  	// try to match in the list of Unicode classes
 12328  	for _, cl := range chr.classes {
 12329  		if unicode.Is(cl, cur) {
 12330  			if chr.inverted {
 12331  				p.failAt(false, start.position, chr.val)
 12332  				return nil, false
 12333  			}
 12334  			p.read()
 12335  			p.failAt(true, start.position, chr.val)
 12336  			return p.sliceFrom(start), true
 12337  		}
 12338  	}
 12339  
 12340  	if chr.inverted {
 12341  		p.read()
 12342  		p.failAt(true, start.position, chr.val)
 12343  		return p.sliceFrom(start), true
 12344  	}
 12345  	p.failAt(false, start.position, chr.val)
 12346  	return nil, false
 12347  }
 12348  
 12349  func (p *parser) incChoiceAltCnt(ch *choiceExpr, altI int) {
 12350  	choiceIdent := fmt.Sprintf("%s %d:%d", p.rstack[len(p.rstack)-1].name, ch.pos.line, ch.pos.col)
 12351  	m := p.ChoiceAltCnt[choiceIdent]
 12352  	if m == nil {
 12353  		m = make(map[string]int)
 12354  		p.ChoiceAltCnt[choiceIdent] = m
 12355  	}
 12356  	// We increment altI by 1, so the keys do not start at 0
 12357  	alt := strconv.Itoa(altI + 1)
 12358  	if altI == choiceNoMatch {
 12359  		alt = p.choiceNoMatch
 12360  	}
 12361  	m[alt]++
 12362  }
 12363  
 12364  func (p *parser) parseChoiceExpr(ch *choiceExpr) (any, bool) {
 12365  	if p.debug {
 12366  		defer p.out(p.in("parseChoiceExpr"))
 12367  	}
 12368  
 12369  	for altI, alt := range ch.alternatives {
 12370  		// dummy assignment to prevent compile error if optimized
 12371  		_ = altI
 12372  
 12373  		state := p.cloneState()
 12374  
 12375  		p.pushV()
 12376  		val, ok := p.parseExprWrap(alt)
 12377  		p.popV()
 12378  		if ok {
 12379  			p.incChoiceAltCnt(ch, altI)
 12380  			return val, ok
 12381  		}
 12382  		p.restoreState(state)
 12383  	}
 12384  	p.incChoiceAltCnt(ch, choiceNoMatch)
 12385  	return nil, false
 12386  }
 12387  
 12388  func (p *parser) parseLabeledExpr(lab *labeledExpr) (any, bool) {
 12389  	if p.debug {
 12390  		defer p.out(p.in("parseLabeledExpr"))
 12391  	}
 12392  
 12393  	p.pushV()
 12394  	val, ok := p.parseExprWrap(lab.expr)
 12395  	p.popV()
 12396  	if ok && lab.label != "" {
 12397  		m := p.vstack[len(p.vstack)-1]
 12398  		m[lab.label] = val
 12399  	}
 12400  	return val, ok
 12401  }
 12402  
 12403  func (p *parser) parseLitMatcher(lit *litMatcher) (any, bool) {
 12404  	if p.debug {
 12405  		defer p.out(p.in("parseLitMatcher"))
 12406  	}
 12407  
 12408  	start := p.pt
 12409  	for _, want := range lit.val {
 12410  		cur := p.pt.rn
 12411  		if lit.ignoreCase {
 12412  			cur = unicode.ToLower(cur)
 12413  		}
 12414  		if cur != want {
 12415  			p.failAt(false, start.position, lit.want)
 12416  			p.restore(start)
 12417  			return nil, false
 12418  		}
 12419  		p.read()
 12420  	}
 12421  	p.failAt(true, start.position, lit.want)
 12422  	return p.sliceFrom(start), true
 12423  }
 12424  
 12425  func (p *parser) parseNotCodeExpr(not *notCodeExpr) (any, bool) {
 12426  	if p.debug {
 12427  		defer p.out(p.in("parseNotCodeExpr"))
 12428  	}
 12429  
 12430  	state := p.cloneState()
 12431  
 12432  	ok, err := not.run(p)
 12433  	if err != nil {
 12434  		p.addErr(err)
 12435  	}
 12436  	p.restoreState(state)
 12437  
 12438  	return nil, !ok
 12439  }
 12440  
 12441  func (p *parser) parseNotExpr(not *notExpr) (any, bool) {
 12442  	if p.debug {
 12443  		defer p.out(p.in("parseNotExpr"))
 12444  	}
 12445  
 12446  	pt := p.pt
 12447  	state := p.cloneState()
 12448  	p.pushV()
 12449  	p.maxFailInvertExpected = !p.maxFailInvertExpected
 12450  	_, ok := p.parseExprWrap(not.expr)
 12451  	p.maxFailInvertExpected = !p.maxFailInvertExpected
 12452  	p.popV()
 12453  	p.restoreState(state)
 12454  	p.restore(pt)
 12455  
 12456  	return nil, !ok
 12457  }
 12458  
 12459  func (p *parser) parseOneOrMoreExpr(expr *oneOrMoreExpr) (any, bool) {
 12460  	if p.debug {
 12461  		defer p.out(p.in("parseOneOrMoreExpr"))
 12462  	}
 12463  
 12464  	var vals []any
 12465  
 12466  	for {
 12467  		p.pushV()
 12468  		val, ok := p.parseExprWrap(expr.expr)
 12469  		p.popV()
 12470  		if !ok {
 12471  			if len(vals) == 0 {
 12472  				// did not match once, no match
 12473  				return nil, false
 12474  			}
 12475  			return vals, true
 12476  		}
 12477  		vals = append(vals, val)
 12478  	}
 12479  }
 12480  
 12481  func (p *parser) parseRecoveryExpr(recover *recoveryExpr) (any, bool) {
 12482  	if p.debug {
 12483  		defer p.out(p.in("parseRecoveryExpr (" + strings.Join(recover.failureLabel, ",") + ")"))
 12484  	}
 12485  
 12486  	p.pushRecovery(recover.failureLabel, recover.recoverExpr)
 12487  	val, ok := p.parseExprWrap(recover.expr)
 12488  	p.popRecovery()
 12489  
 12490  	return val, ok
 12491  }
 12492  
 12493  func (p *parser) parseRuleRefExpr(ref *ruleRefExpr) (any, bool) {
 12494  	if p.debug {
 12495  		defer p.out(p.in("parseRuleRefExpr " + ref.name))
 12496  	}
 12497  
 12498  	if ref.name == "" {
 12499  		panic(fmt.Sprintf("%s: invalid rule: missing name", ref.pos))
 12500  	}
 12501  
 12502  	rule := p.rules[ref.name]
 12503  	if rule == nil {
 12504  		p.addErr(fmt.Errorf("undefined rule: %s", ref.name))
 12505  		return nil, false
 12506  	}
 12507  	return p.parseRuleWrap(rule)
 12508  }
 12509  
 12510  func (p *parser) parseSeqExpr(seq *seqExpr) (any, bool) {
 12511  	if p.debug {
 12512  		defer p.out(p.in("parseSeqExpr"))
 12513  	}
 12514  
 12515  	vals := make([]any, 0, len(seq.exprs))
 12516  
 12517  	pt := p.pt
 12518  	state := p.cloneState()
 12519  	for _, expr := range seq.exprs {
 12520  		val, ok := p.parseExprWrap(expr)
 12521  		if !ok {
 12522  			p.restoreState(state)
 12523  			p.restore(pt)
 12524  			return nil, false
 12525  		}
 12526  		vals = append(vals, val)
 12527  	}
 12528  	return vals, true
 12529  }
 12530  
 12531  func (p *parser) parseStateCodeExpr(state *stateCodeExpr) (any, bool) {
 12532  	if p.debug {
 12533  		defer p.out(p.in("parseStateCodeExpr"))
 12534  	}
 12535  
 12536  	err := state.run(p)
 12537  	if err != nil {
 12538  		p.addErr(err)
 12539  	}
 12540  	return nil, true
 12541  }
 12542  
 12543  func (p *parser) parseThrowExpr(expr *throwExpr) (any, bool) {
 12544  	if p.debug {
 12545  		defer p.out(p.in("parseThrowExpr"))
 12546  	}
 12547  
 12548  	for i := len(p.recoveryStack) - 1; i >= 0; i-- {
 12549  		if recoverExpr, ok := p.recoveryStack[i][expr.label]; ok {
 12550  			if val, ok := p.parseExprWrap(recoverExpr); ok {
 12551  				return val, ok
 12552  			}
 12553  		}
 12554  	}
 12555  
 12556  	return nil, false
 12557  }
 12558  
 12559  func (p *parser) parseZeroOrMoreExpr(expr *zeroOrMoreExpr) (any, bool) {
 12560  	if p.debug {
 12561  		defer p.out(p.in("parseZeroOrMoreExpr"))
 12562  	}
 12563  
 12564  	var vals []any
 12565  
 12566  	for {
 12567  		p.pushV()
 12568  		val, ok := p.parseExprWrap(expr.expr)
 12569  		p.popV()
 12570  		if !ok {
 12571  			return vals, true
 12572  		}
 12573  		vals = append(vals, val)
 12574  	}
 12575  }
 12576  
 12577  func (p *parser) parseZeroOrOneExpr(expr *zeroOrOneExpr) (any, bool) {
 12578  	if p.debug {
 12579  		defer p.out(p.in("parseZeroOrOneExpr"))
 12580  	}
 12581  
 12582  	p.pushV()
 12583  	val, _ := p.parseExprWrap(expr.expr)
 12584  	p.popV()
 12585  	// whether it matched or not, consider it a match
 12586  	return val, true
 12587  }