diff --git a/Language/SQL/SimpleSQL/Lex.lhs b/Language/SQL/SimpleSQL/Lex.lhs index 9e82665..af56ee9 100644 --- a/Language/SQL/SimpleSQL/Lex.lhs +++ b/Language/SQL/SimpleSQL/Lex.lhs @@ -16,7 +16,7 @@ have a relatively high assurance of the low level of bugs. This is much more difficult to get parity with when testing the syntax parser directly without the separately testing lexing stage. -> -- | This is the module contains a Lexer for SQL. +> -- | Lexer for SQL. > {-# LANGUAGE TupleSections #-} > module Language.SQL.SimpleSQL.Lex > (Token(..) @@ -52,7 +52,7 @@ directly without the separately testing lexing stage. > data Token > -- | A symbol (in ansi dialect) is one of the following > -- -> -- * multi char symbols <> <= >= != || +> -- * multi char symbols <> \<= \>= != || > -- * single char symbols: * + - < > ^ / % ~ & | ? ( ) [ ] , ; ( ) > -- > = Symbol String diff --git a/TODO b/TODO index 7384bb1..a6cdce7 100644 --- a/TODO +++ b/TODO @@ -6,8 +6,8 @@ fixed these https://github.com/JakeWheat/simple-sql-parser/issues/18 this one is fixed now, need postgres dialect atm https://github.com/JakeWheat/simple-sql-parser/issues/15 -update changelog test with different ghcs +update changelog do release diff --git a/tools/SimpleSQLParserExample.hs b/tools/SimpleSQLParserExample.hs index 7af92ad..e612dbe 100644 --- a/tools/SimpleSQLParserExample.hs +++ b/tools/SimpleSQLParserExample.hs @@ -5,9 +5,12 @@ import System.Environment import Text.Show.Pretty import System.IO -import Language.SQL.SimpleSQL.Parse (parseStatements,peFormattedError) +import Language.SQL.SimpleSQL.Parse + (parseStatements + ,ParseError + ,peFormattedError) -import Language.SQL.SimpleSQL.Syntax (ansi2011) +import Language.SQL.SimpleSQL.Syntax (ansi2011, Statement) main :: IO () @@ -37,7 +40,8 @@ main = do doIt :: String -> IO () doIt src = do - let parsed = parseStatements ansi2011 "" Nothing src + let parsed :: Either ParseError [Statement] + parsed = parseStatements ansi2011 "" Nothing src either (error . peFormattedError) (putStrLn . ppShow) parsed diff --git a/website/index.asciidoc b/website/index.asciidoc index da46b57..905e066 100644 --- a/website/index.asciidoc +++ b/website/index.asciidoc @@ -298,9 +298,12 @@ import System.Environment import Text.Show.Pretty import System.IO -import Language.SQL.SimpleSQL.Parse (parseStatements,peFormattedError) +import Language.SQL.SimpleSQL.Parse + (parseStatements + ,ParseError + ,peFormattedError) -import Language.SQL.SimpleSQL.Syntax (ansi2011) +import Language.SQL.SimpleSQL.Syntax (ansi2011, Statement) main :: IO () @@ -330,10 +333,12 @@ main = do doIt :: String -> IO () doIt src = do - let parsed = parseStatements ansi2011 "" Nothing src + let parsed :: Either ParseError [Statement] + parsed = parseStatements ansi2011 "" Nothing src either (error . peFormattedError) (putStrLn . ppShow) parsed + ---- diff --git a/website/make_website.sh b/website/make_website.sh index d7c3556..08e1372 100755 --- a/website/make_website.sh +++ b/website/make_website.sh @@ -33,4 +33,4 @@ rm build/test_cases.asciidoc cabal v2-haddock rm -Rf build/haddock mkdir build/haddock/ -cp -R dist/doc/html/simple-sql-parser/* build/haddock/ +cp -R dist-newstyle/build/x86_64-linux/ghc-8.6.5/simple-sql-parser-0.5.0/doc/html/simple-sql-parser/* build/haddock/ diff --git a/website/supported_sql.asciidoc b/website/supported_sql.asciidoc index e476a63..778a317 100644 --- a/website/supported_sql.asciidoc +++ b/website/supported_sql.asciidoc @@ -22,7 +22,7 @@ additional pass over the ast can be made if you want to carefully prohibit everything that the standard doesn't allow. Apart from this permissiveness, some work has been put into trying to -get the best parser error messages possible. +get good parser error messages. == Queries