diff --git a/src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj b/src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj old mode 100755 new mode 100644 index caae78ad1..09b4b8ee9 --- a/src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj +++ b/src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj @@ -193,8 +193,6 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */ | | | -| -| | | | @@ -1285,27 +1283,13 @@ Expression Condition(): } { (LOOKAHEAD(SQLCondition()) result=SQLCondition() - | result=FunctionCondition() - | result=RegularCondition() + | LOOKAHEAD(RegularCondition()) result=RegularCondition() + | result=Function() ) { return result; } } -Expression FunctionCondition(): -{ - Function result; - ExpressionList parameters; -} -{ - { result = new Function(); result.setName("REGEXP_LIKE"); } - "(" - parameters=SimpleExpressionList() { result.setParameters(parameters); } - ")" - - { return result; } -} - Expression RegularCondition(): { Expression result = null; diff --git a/src/test/java/net/sf/jsqlparser/test/select/SelectTest.java b/src/test/java/net/sf/jsqlparser/test/select/SelectTest.java old mode 100755 new mode 100644 index 48616e320..156526536 --- a/src/test/java/net/sf/jsqlparser/test/select/SelectTest.java +++ b/src/test/java/net/sf/jsqlparser/test/select/SelectTest.java @@ -1051,5 +1051,10 @@ public void testRegexpLike2() throws JSQLParserException { String stmt = "SELECT CASE WHEN REGEXP_LIKE(first_name, '^Ste(v|ph)en$') THEN 1 ELSE 2 END FROM mytable"; assertSqlCanBeParsedAndDeparsed(stmt); } + + public void testBooleanFunction1() throws JSQLParserException { + String stmt = "SELECT * FROM mytable WHERE test_func(col1)"; + assertSqlCanBeParsedAndDeparsed(stmt); + } }