func (p Parser) parseToken(tokens []*Token, initialCursor uint, t Token) (*Token, uint, bool) {
	cursor := initialCursor
	if cursor >= uint(len(tokens)) {
		return nil, initialCursor, false
	}
	if p := tokens[cursor]; t.equals(p) {
		return p, cursor + 1, true
	}
	return nil, initialCursor, false
}
parseToken looks for a Token the same as passed in (ignoring Token
location)
package gosql
import (
	"errors"
	"fmt"
)
func tokenFromKeyword(k Keyword) Token {
	return Token{
		Kind:  KeywordKind,
		Value: string(k),
	}
}
func tokenFromSymbol(s Symbol) Token {
	return Token{
		Kind:  SymbolKind,
		Value: string(s),
	}
}
type Parser struct {
	HelpMessagesDisabled bool
}
func (p Parser) helpMessage(tokens []*Token, cursor uint, msg string) {
	if p.HelpMessagesDisabled {
		return
	}
	var c *Token
	if cursor+1 < uint(len(tokens)) {
		c = tokens[cursor+1]
	} else {
		c = tokens[cursor]
	}
	fmt.Printf("[%d,%d]: %s, near: %s\n", c.Loc.Line, c.Loc.Col, msg, c.Value)
}
func (p Parser) parseTokenKind(tokens []*Token, initialCursor uint, kind TokenKind) (*Token, uint, bool) {
	cursor := initialCursor
	if cursor >= uint(len(tokens)) {
		return nil, initialCursor, false
	}
	current := tokens[cursor]
	if current.Kind == kind {
		return current, cursor + 1, true
	}
	return nil, initialCursor, false
}