func tokstr(tok Token, lit string) string {
	if lit != "" {
		return lit
	}
	return tok.String()
}
tokstr returns a literal if provided, otherwise returns the token string.
package conditions
type Token int
const (
	ILLEGAL Token = iota
	EOF
	literalBegin
	IDENT   
	NUMBER  
	STRING  
	ARRAY   
	TRUE    
	FALSE   
	literalEnd
	operatorBegin
	AND          
	OR           
	EQ           
	NEQ          
	LT           
	LTE          
	GT           
	GTE          
	NAND         
	XOR          
	EREG         
	NEREG        
	IN           
	NOTIN        
	CONTAINS     
	NOTCONTAINS  
	operatorEnd
	LPAREN  
	RPAREN  
)
var tokens = []string{
	ILLEGAL: "ILLEGAL",
	EOF:     "EOF",
	IDENT:  "IDENT",
	NUMBER: "NUMBER",
	STRING: "STRING",
	ARRAY:  "ARRAY",
	TRUE:   "TRUE",
	FALSE:  "FALSE",
	AND: "AND",
	OR:  "OR",
	EQ:  "==",
	NEQ: "!=",
	LT:  "<",
	LTE: "<=",
	GT:  ">",
	GTE: ">=",
	NAND:        "NAND",
	XOR:         "XOR",
	EREG:        "=~",
	NEREG:       "!~",
	IN:          "IN",
	NOTIN:       "NOT IN",
	CONTAINS:    "CONTAINS",
	NOTCONTAINS: "NOT CONTAINS",
	LPAREN: "(",
	RPAREN: ")",
}
func (tok Token) String() string {
	if tok >= 0 && tok < Token(len(tokens)) {
		return tokens[tok]
	}
	return ""
}
func (tok Token) Precedence() int {
	switch tok {
	case OR, XOR:
		return 1
	case AND, NAND:
		return 2
	case EQ, NEQ, LT, LTE, GT, GTE, IN, NOTIN, EREG, NEREG, CONTAINS, NOTCONTAINS:
		return 3
	}
	return 0
}
func (tok Token) isOperator() bool { return tok > operatorBegin && tok < operatorEnd }