func Lit2Token(lit string) (tok uint) {
	return rtokens[lit]
}
Lit2Token - literal => token
package tpl
import (
	"strconv"
)
const (
	ILLEGAL uint = iota
	EOF
	COMMENT
	IDENT   
	INT     
	FLOAT   
	IMAG    
	CHAR    
	STRING  
	ADD = '+'
	SUB = '-'
	MUL = '*'
	QUO = '/'
	REM = '%'
	AND = '&'
	OR  = '|'
	XOR = '^'
	LT     = '<'
	GT     = '>'
	ASSIGN = '='
	NOT    = '!'
	LPAREN = '('
	LBRACK = '['
	LBRACE = '{'
	COMMA  = ','
	PERIOD = '.'
	RPAREN    = ')'
	RBRACK    = ']'
	RBRACE    = '}'
	SEMICOLON = ';'
	COLON     = ':'
	QUESTION  = '?'
	TILDE     = '~'
	AT        = '@'
)
const (
	operator_beg uint = 0x80 + iota
	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    
	EQ        
	NE        
	LE        
	GE        
	DEFINE    
	ELLIPSIS  
	USER_TOKEN_BEGIN uint = 0xb0
)
var tokens = [...]string{
	ILLEGAL: "ILLEGAL",
	EOF:     "EOF",
	COMMENT: "COMMENT",
	IDENT:  "IDENT",
	INT:    "INT",
	FLOAT:  "FLOAT",
	IMAG:   "IMAG",
	CHAR:   "CHAR",
	STRING: "STRING",
	ADD: "'+'",
	SUB: "'-'",
	MUL: "'*'",
	QUO: "'/'",
	REM: "'%'",
	AND: "'&'",
	OR:  "'|'",
	XOR: "'^'",
	LT:     "'<'",
	GT:     "'>'",
	ASSIGN: "'='",
	NOT:    "'!'",
	LPAREN: "'('",
	LBRACK: "'['",
	LBRACE: "'{'",
	COMMA:  "','",
	PERIOD: "'.'",
	RPAREN:    "')'",
	RBRACK:    "']'",
	RBRACE:    "'}'",
	SEMICOLON: "';'",
	COLON:     "':'",
	QUESTION:  "'?'",
	TILDE:     "'~'",
	AT:        "'@'",
	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:   "\"--\"",
	EQ:       "\"==\"",
	NE:       "\"!=\"",
	LE:       "\"<=\"",
	GE:       "\">=\"",
	DEFINE:   "\":=\"",
	ELLIPSIS: "\"...\"",
}
func TokenLen(tok uint) int {
	if tok > ' ' && tok <= uint(len(tokens)) {
		return len(tokens[tok]) - 2
	}
	return 0
}
func Token2Lit(tok uint) (s string) {
	if tok < uint(len(tokens)) {
		s = tokens[tok]
	} else {
		panic("unknown token: " + strconv.Itoa(int(tok)))
	}
	return
}
var rtokens map[string]uint
func init() {
	rtokens = make(map[string]uint, 64)
	for i, s := range tokens {
		if s != "" {
			rtokens[s] = uint(i)
		}
	}
}