title: Creating a parse tree for a SQL statement
body: <p>Given the following statement and ignoring any grammar concerns, what might be the most 'pure' way to parse the following <code>SQL</code> statement?</p>
  <pre><code>SELECT a, b AS x FROM tbl AS z
  </code></pre>
  <p>My thinking is something along the following:</p>
  <pre><code>               selectStatement
                       |
                    SELECT
                    /     \
              selectList  FROM
                /   \          \
       selectItem   selectItem  tableExpression
            |          /  \         |
            a         b   AS       tableItem
                           |     /     \
                           x  tbl      AS
                                        \
                                         z
  </code></pre>
  <p>Is that a more or less accurate representation of this? If not, where could it be improved? Sometimes I have a difficult time determining whether a keyword should be a parse node or not (for example should <code>AS</code> be a separate node, or should there just be some sort of label on the alias node, and are 'labels' valid in a parse tree?).</p>