1
Fork 0

add support for odbc symbols: {} in lexer

This commit is contained in:
Jake Wheat 2016-02-15 20:33:37 +02:00
parent 9adce162e5
commit a4d91b3e44
5 changed files with 31 additions and 16 deletions
tools/Language/SQL/SimpleSQL

View file

@ -303,10 +303,11 @@ the + or -.
> odbcLexerTests :: TestItem
> odbcLexerTests = Group "odbcLexTests" $
> [ LexTest sqlserver {- {odbc = True} -} s t | (s,t) <-
> [--("{}", [Symbol "{", Symbol "}"])
> ]
> ]
> [ LexTest sqlserver {allowOdbc = True} s t | (s,t) <-
> [("{}", [Symbol "{", Symbol "}"])
> ]]
> ++ [LexFails sqlserver "{"
> ,LexFails sqlserver "}"]
> combos :: [a] -> Int -> [[a]]
> combos _ 0 = [[]]

View file

@ -4,7 +4,8 @@ Tests.lhs module for the 'interpreter'.
> module Language.SQL.SimpleSQL.TestTypes
> (TestItem(..)
> ,ansi2011,mysql,postgres,oracle,sqlserver) where
> ,ansi2011,mysql,postgres,oracle,sqlserver
> ,allowOdbc) where
> import Language.SQL.SimpleSQL.Syntax
> import Language.SQL.SimpleSQL.Lex (Token)