influxdb/influxdb — pull request #1159 by benbjohnson (2014-11-22 04:19:29+00:00)
Title: Parser

## Overview

This pull request adds an InfluxQL parser. The `Parser` provides several methods to parse different types of query nodes:

```
func (p *Parser) ParseQuery() (Query, error)
func (p *Parser) ParseStatement() (Statement, error)
func (p *Parser) ParseExpr() (Expr, error)
```

Statements are parsed into different types according to the initial tokens in the statement.

### TODO

_Note: This is a partial implementation of the parser, however, all the hard parts are done._ :dancer:

- [x] `Parser.ParseStatement()`
- [x] `Parser.ParseExpr()`
- [ ] `Parser.ParseQuery()`
- [ ] `MERGE` & `INNER JOIN`
- [ ] `DELETE FROM`
- [ ] `LIST SERIES`
- [ ] `DROP SERIES`
- [ ] `LIST CONTINUOUS QUERIES`
- [ ] `DROP CONTINUOUS QUERY`
- [ ] `SELECT ... INTO ...`