sqlcop now has 248 unit tests that supply documentation and executable confirmation that it can recognize the following:

  • Selecting from a table
  • Selecting from one of the following rowset function:
    • CONTAINSTABLE
    • FREETEXTTABLE
    • OPENDATASOURCE
    • OPENQUERY
    • OPENROWSET
    • OPENXML
  • Selecting from a user-defined function
  • Selecting columns
  • Selecting star
  • Selecting derived columns
  • Limiting selections with
    • ALL
    • DISTINCT
    • TOP
    • TOP PERCENT
    • WITH TIES

The lexer definition is pretty crowded because I chose not to perform case-insensitive parsing which, now, I rue.

The parser file is starting to get a little ungainly. I need to figure out a way to better organize it. Also, the parser has no Shift/Reduce or Reduce/Reduce conflicts! YAY!