diff --git a/Language/SQL/SimpleSQL/Parser.lhs b/Language/SQL/SimpleSQL/Parser.lhs index 5a82efb..5811ecc 100644 --- a/Language/SQL/SimpleSQL/Parser.lhs +++ b/Language/SQL/SimpleSQL/Parser.lhs @@ -322,8 +322,10 @@ keyword. > binOpSymbolNames :: [String] > binOpSymbolNames = > ["=", "<=", ">=", "!=", "<>", "<", ">" -> ,"*", "/", "+", "-" -> ,"||", "."] +> ,"*", "/", "+", "-", "%" +> ,"||", "." +> ,"^", "|", "&" +> ] > binOpKeywordNames :: [String] > binOpKeywordNames = ["and", "or", "like", "overlaps"] @@ -347,7 +349,7 @@ There aren't any multi keyword prefix operators currently supported. > prefixUnOpKeywordNames = ["not"] > prefixUnOpSymbolNames :: [String] -> prefixUnOpSymbolNames = ["+", "-"] +> prefixUnOpSymbolNames = ["+", "-", "~"] There aren't any single keyword postfix operators currently supported. Maybe all these 'is's can be left factored? @@ -408,7 +410,7 @@ associativity. This is fixed with a separate pass over the AST. > ++ postfixOpKeywords > -- these are the ops with the highest precedence in order > highPrec = [infixl_ ["."] -> ,infixl_ ["*","/"] +> ,infixl_ ["*","/", "%"] > ,infixl_ ["+", "-"] > ,infixl_ ["<=",">=","!=","<>","||","like"] > ] diff --git a/TODO b/TODO index 1c114f2..00d1d2e 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ next release: - more symbolic operators, array access a[5]? don't think this is standard sql, if not, leave for now. There is something about arrays in sql:2008 @@ -9,11 +8,9 @@ more symbolic operators, array access a[5]? don't think this is row ctor: row(a,b) is fine, but also when there is 2 or more elements, the word row can be omitted: (a,b) - fix lateral binding issue - -window frames and named windows +window frames review tests to copy from hssqlppp @@ -60,6 +57,8 @@ Later general tasks: sql server top syntax +named windows + extended string literals, escapes and other flavours (like pg and oracle custom delimiters)