small tidyups
This commit is contained in:
parent
3fa7086a48
commit
3f0ff9aec0
|
@ -312,7 +312,6 @@ keyword.
|
|||
> binOpMultiKeywordNames :: [[String]]
|
||||
> binOpMultiKeywordNames = map words
|
||||
> ["not like"
|
||||
> ,"not similar"
|
||||
> ,"is similar to"
|
||||
> ,"is not similar to"
|
||||
> ,"is distinct from"
|
||||
|
@ -353,6 +352,10 @@ The parsers:
|
|||
> opSymbol = choice (map (try . symbol) prefixUnOpSymbolNames
|
||||
> ++ map (try . keyword) prefixUnOpKeywordNames)
|
||||
|
||||
TODO: the handling of multikeyword args is different in
|
||||
postfixopsuffix and binaryoperatorsuffix. It should be the same in
|
||||
both cases
|
||||
|
||||
> postfixOpSuffix :: ScalarExpr -> P ScalarExpr
|
||||
> postfixOpSuffix e =
|
||||
> try $ choice $ map makeOp opPairs
|
||||
|
@ -463,9 +466,6 @@ expression tree (for efficiency and code clarity).
|
|||
|
||||
= query expressions
|
||||
|
||||
TODO: maybe refactor all the parsers. A parser wouldn't usually be
|
||||
optional or use try itself. The caller could do this.
|
||||
|
||||
== select lists
|
||||
|
||||
> selectItem :: P (Maybe String, ScalarExpr)
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
|
||||
This is the pretty printer code which takes AST values and turns them
|
||||
back into SQL source text. It attempts to format the output nicely.
|
||||
|
||||
> -- | These is the pretty printing functions, which produce SQL
|
||||
> -- source from ASTs. The code attempts to format the output in a
|
||||
> -- readable way.
|
||||
|
|
2
README
2
README
|
@ -1,5 +1,5 @@
|
|||
A parser for SQL queries in Haskell.
|
||||
|
||||
Homepage: https://github.com/JakeWheat/simple_sql_parser
|
||||
Homepage: http://jakewheat.github.io/simple_sql_parser/
|
||||
|
||||
Contact: jakewheatmail@gmail.com
|
9
TODO
9
TODO
|
@ -2,15 +2,16 @@
|
|||
first release:
|
||||
|
||||
add automated tests to cabal
|
||||
check the order of exports, imports and functions/cases in the files
|
||||
fix up the import namespaces/explicit names nicely
|
||||
do some tests for parse errors?
|
||||
website with haddock and table of parsing tests
|
||||
|
||||
----
|
||||
|
||||
Later general tasks:
|
||||
|
||||
check the order of exports, imports and functions/cases in the files
|
||||
fix up the import namespaces/explicit names nicely
|
||||
|
||||
do some tests for parse errors?
|
||||
|
||||
dialect switching
|
||||
|
||||
left factor parsing code in remaining places
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
> module Tests (testData, runTests) where
|
||||
> module Tests (testData, TestItem(..), runTests) where
|
||||
|
||||
> import Language.SQL.SimpleSQL.Syntax
|
||||
> import Language.SQL.SimpleSQL.Pretty
|
||||
|
|
|
@ -2,10 +2,6 @@ name: simple-sql-parser
|
|||
version: 0.1.0.0
|
||||
synopsis: A parser for SQL queries
|
||||
|
||||
description: A parser for SQL queries, using Parsec. Also includes
|
||||
pretty printer. Aims to support most of SQL:2003
|
||||
queries plus other SQL dialects.
|
||||
|
||||
homepage: https://github.com/JakeWheat/simple_sql_parser
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
|
|
Loading…
Reference in a new issue