code: func (p *Parser) parsePrivilege() (Privilege, error) {
  	tok, pos, lit := p.ScanIgnoreWhitespace()
  	switch tok {
  	case READ:
  		return ReadPrivilege, nil
  	case WRITE:
  		return WritePrivilege, nil
  	case ALL:
  		// Consume optional PRIVILEGES token
  		tok, pos, lit = p.ScanIgnoreWhitespace()
  		if tok != PRIVILEGES {
  			p.Unscan()
  		}
  		return AllPrivileges, nil
  	}
  	return 0, newParseError(tokstr(tok, lit), []string{"READ", "WRITE", "ALL [PRIVILEGES]"}, pos)
  }
docs: // parsePrivilege parses a string and returns a Privilege.