tools/SimpleSqlParserTool.lhs fix
This commit is contained in:
parent
cef4205293
commit
9e24a308e7
|
@ -17,9 +17,9 @@ indent: parse then pretty print sql
|
|||
> import Control.Applicative
|
||||
|
||||
> import Language.SQL.SimpleSQL.Pretty
|
||||
> import Language.SQL.SimpleSQL.Parser
|
||||
> import Language.SQL.SimpleSQL.Parse
|
||||
> import Language.SQL.SimpleSQL.Syntax
|
||||
> import Language.SQL.SimpleSQL.Lexer
|
||||
> import Language.SQL.SimpleSQL.Lex
|
||||
|
||||
|
||||
> main :: IO ()
|
||||
|
@ -68,7 +68,7 @@ indent: parse then pretty print sql
|
|||
> (f,src) <- getInput args
|
||||
> either (error . peFormattedError)
|
||||
> (putStrLn . ppShow)
|
||||
> $ parseStatements SQL2011 f Nothing src
|
||||
> $ parseStatements ansi2011 f Nothing src
|
||||
> )
|
||||
|
||||
> lexCommand :: (String,[String] -> IO ())
|
||||
|
@ -78,7 +78,7 @@ indent: parse then pretty print sql
|
|||
> (f,src) <- getInput args
|
||||
> either (error . peFormattedError)
|
||||
> (putStrLn . intercalate ",\n" . map show)
|
||||
> $ lexSQL SQL2011 f Nothing src
|
||||
> $ lexSQL ansi2011 f Nothing src
|
||||
> )
|
||||
|
||||
|
||||
|
@ -88,7 +88,7 @@ indent: parse then pretty print sql
|
|||
> ,\args -> do
|
||||
> (f,src) <- getInput args
|
||||
> either (error . peFormattedError)
|
||||
> (putStrLn . prettyStatements SQL2011)
|
||||
> $ parseStatements SQL2011 f Nothing src
|
||||
> (putStrLn . prettyStatements ansi2011)
|
||||
> $ parseStatements ansi2011 f Nothing src
|
||||
|
||||
> )
|
||||
|
|
Loading…
Reference in a new issue