func NewStringTokenizerWithDialect(dialect dialect.Dialect, sql string) *Tokenizer {
	buf := []byte(sql)
	return &Tokenizer{
		buf:     buf,
		bufSize: len(buf),
		dialect: dialect,
	}
}
NewStringTokenizerWithDialect create Tokenizer for string with specific dialect
package sqlparser
import (
	"bytes"
	"errors"
	"fmt"
	"github.com/cossacklabs/acra/sqlparser/dialect"
	"github.com/cossacklabs/acra/sqlparser/dialect/mysql"
	"github.com/cossacklabs/acra/sqlparser/dialect/postgresql"
	"io"
	"github.com/cossacklabs/acra/sqlparser/dependency/bytes2"
	"github.com/cossacklabs/acra/sqlparser/dependency/sqltypes"
)
const (
	defaultBufSize = 4096
	eofChar        = 0x100
)
var stringTokenType = map[uint16]int{
	'\'': SINGLE_QUOTE_STRING,
	'"':  DOUBLE_QUOTE_STRING,
	'`':  BACK_QUOTE_STRING,
}
const (
	DialectMySQL = iota
	DialectPostgreSQL
)
var defaultDialect dialect.Dialect = mysql.NewMySQLDialect()
func SetDefaultDialect(dialect dialect.Dialect) {
	defaultDialect = dialect
}
type Tokenizer struct {
	InStream       io.Reader
	AllowComments  bool
	ForceEOF       bool
	lastChar       uint16
	Position       int
	lastToken      []byte
	LastError      error
	posVarIndex    int
	ParseTree      Statement
	partialDDL     *DDL
	nesting        int
	multi          bool
	specialComment *Tokenizer
	buf     []byte
	bufPos  int
	bufSize int
	dialect dialect.Dialect
}
func NewStringTokenizer(sql string) *Tokenizer {
	buf := []byte(sql)
	return &Tokenizer{
		buf:     buf,
		bufSize: len(buf),
		dialect: defaultDialect,
	}
}