func (tok Token) IsOperator() bool {
	return operator_beg <= tok && tok <= operator_end
}
IsOperator returns true for tokens corresponding to operators and
delimiters; it returns false otherwise.
package token
import (
	"go/token"
	"strconv"
)
type Token int
const (
	ILLEGAL Token = iota
	EOF
	COMMENT
	literal_beg
	IDENT   
	INT     
	FLOAT   
	IMAG    
	CHAR    
	STRING  
	literal_end
	operator_beg
	ADD  
	SUB  
	MUL  
	QUO  
	REM  
	AND      
	OR       
	XOR      
	SHL      
	SHR      
	AND_NOT  
	ADD_ASSIGN  
	SUB_ASSIGN  
	MUL_ASSIGN  
	QUO_ASSIGN  
	REM_ASSIGN  
	AND_ASSIGN      
	OR_ASSIGN       
	XOR_ASSIGN      
	SHL_ASSIGN      
	SHR_ASSIGN      
	AND_NOT_ASSIGN  
	LAND   
	LOR    
	ARROW  
	INC    
	DEC    
	EQL     
	LSS     
	GTR     
	ASSIGN  
	NOT     
	NEQ       
	LEQ       
	GEQ       
	DEFINE    
	ELLIPSIS  
	LPAREN  
	LBRACK  
	LBRACE  
	COMMA   
	PERIOD  
	RPAREN     
	RBRACK     
	RBRACE     
	SEMICOLON  
	COLON      
	operator_end
	keyword_beg
	BREAK
	CASE
	CHAN
	CONST
	CONTINUE
	DEFAULT
	DEFER
	ELSE
	FALLTHROUGH
	FOR
	FUNC
	GO
	GOTO
	IF
	IMPORT
	INTERFACE
	MAP
	PACKAGE
	RANGE
	RETURN
	SELECT
	STRUCT
	SWITCH
	TYPE
	VAR
	keyword_end
	RAT      = literal_end   
	RARROW   = operator_beg  
	QUESTION = operator_end  
)
var tokens = [...]string{
	ILLEGAL: "ILLEGAL",
	EOF:     "EOF",
	COMMENT: "COMMENT",
	IDENT:  "IDENT",
	INT:    "INT",
	FLOAT:  "FLOAT",
	IMAG:   "IMAG",
	CHAR:   "CHAR",
	STRING: "STRING",
	RAT:    "RAT",
	ADD: "+",
	SUB: "-",
	MUL: "*",
	QUO: "/",
	REM: "%",
	AND:     "&",
	OR:      "|",
	XOR:     "^",
	SHL:     "<<",
	SHR:     ">>",
	AND_NOT: "&^",
	ADD_ASSIGN: "+=",
	SUB_ASSIGN: "-=",
	MUL_ASSIGN: "*=",
	QUO_ASSIGN: "/=",
	REM_ASSIGN: "%=",
	AND_ASSIGN:     "&=",
	OR_ASSIGN:      "|=",
	XOR_ASSIGN:     "^=",
	SHL_ASSIGN:     "<<=",
	SHR_ASSIGN:     ">>=",
	AND_NOT_ASSIGN: "&^=",
	LAND:  "&&",
	LOR:   "||",
	ARROW: "<-",
	INC:   "++",
	DEC:   "--",
	EQL:    "==",
	LSS:    "<",
	GTR:    ">",
	ASSIGN: "=",
	NOT:    "!",
	NEQ:      "!=",
	LEQ:      "<=",
	GEQ:      ">=",
	DEFINE:   ":=",
	ELLIPSIS: "...",
	LPAREN: "(",
	LBRACK: "[",
	LBRACE: "{",
	COMMA:  ",",
	PERIOD: ".",
	RPAREN:    ")",
	RBRACK:    "]",
	RBRACE:    "}",
	SEMICOLON: ";",
	COLON:     ":",
	QUESTION:  "?",
	RARROW:    "=>",
	BREAK:    "break",
	CASE:     "case",
	CHAN:     "chan",
	CONST:    "const",
	CONTINUE: "continue",
	DEFAULT:     "default",
	DEFER:       "defer",
	ELSE:        "else",
	FALLTHROUGH: "fallthrough",
	FOR:         "for",
	FUNC:   "func",
	GO:     "go",
	GOTO:   "goto",
	IF:     "if",
	IMPORT: "import",
	INTERFACE: "interface",
	MAP:       "map",
	PACKAGE:   "package",
	RANGE:     "range",
	RETURN:    "return",
	SELECT: "select",
	STRUCT: "struct",
	SWITCH: "switch",
	TYPE:   "type",
	VAR:    "var",
}
func (tok Token) String() string {
	s := ""
	if 0 <= tok && tok < Token(len(tokens)) {
		s = tokens[tok]
	}
	if s == "" {
		s = "token(" + strconv.Itoa(int(tok)) + ")"
	}
	return s
}
const (
	LowestPrec  = 0  
	UnaryPrec   = 6
	HighestPrec = 7
)
func (op Token) Precedence() int {
	switch op {
	case LOR:
		return 1
	case LAND:
		return 2
	case EQL, NEQ, LSS, LEQ, GTR, GEQ:
		return 3
	case ADD, SUB, OR, XOR:
		return 4
	case MUL, QUO, REM, SHL, SHR, AND, AND_NOT:
		return 5
	}
	return LowestPrec
}
var keywords map[string]Token
func init() {
	keywords = make(map[string]Token)
	for i := keyword_beg + 1; i < keyword_end; i++ {
		keywords[tokens[i]] = i
	}
}
func Lookup(ident string) Token {
	if tok, is_keyword := keywords[ident]; is_keyword {
		return tok
	}
	return IDENT
}
func (tok Token) IsLiteral() bool {
	return literal_beg < tok && tok <= literal_end
}