diff --git a/src/parsers/command-fixed.lisp b/src/parsers/command-fixed.lisp index ef3e22e..d0ea611 100644 --- a/src/parsers/command-fixed.lisp +++ b/src/parsers/command-fixed.lisp @@ -19,10 +19,10 @@ (defrule number (or hex-number dec-number)) (defrule field-start-position (and (? kw-from) ignore-whitespace number) - (:destructure (from ws pos) (declare (ignore from ws)) pos)) + (:function third)) (defrule fixed-field-length (and (? kw-for) ignore-whitespace number) - (:destructure (for ws len) (declare (ignore for ws)) len)) + (:function third)) (defrule fixed-source-field (and csv-field-name field-start-position fixed-field-length diff --git a/src/sources/mssql/mssql-index-filters.lisp b/src/sources/mssql/mssql-index-filters.lisp index 3ef244f..863a83c 100644 --- a/src/sources/mssql/mssql-index-filters.lisp +++ b/src/sources/mssql/mssql-index-filters.lisp @@ -102,16 +102,16 @@ (defrule mssql-operator (and (? whitespace) (or = <> <= < >= > !=)) (:lambda (op) (second op))) -(defrule number (+ (digit-char-p character)) (:text t)) +(defrule digits (+ (digit-char-p character)) (:text t)) (defrule quoted (and "'" (+ (not "'")) "'") (:lambda (q) (text (second q)))) (defrule mssql-constant-parens (and (? whitespace) "(" - (or number quoted) + (or digits quoted) ")") (:function third)) -(defrule mssql-constant-no-parens (and (? whitespace) (or number quoted)) +(defrule mssql-constant-no-parens (and (? whitespace) (or digits quoted)) (:function second)) (defrule mssql-constant (or mssql-constant-parens mssql-constant-no-parens))