Author: fguillaume
Date: Wed Jan 20 19:13:00 2010
New Revision: 901334
URL: http://svn.apache.org/viewvc?rev=901334&view=rev
Log:
Allow parsing of SCORE() in queries
Modified:
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
Modified:
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
URL:
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g?rev=901334&r1=901333&r2=901334&view=diff
==============================================================================
---
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
(original)
+++
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
Wed Jan 20 19:13:00 2010
@@ -96,19 +96,11 @@
{
$value = $column_reference.value;
}
- | ^(FUNC func_name arg*)
+ | ^(FUNC SCORE)
{
- int func = $func_name.start.getType();
- switch (func) {
- case SCORE:
- $value = Double.valueOf(1);
- break;
- // case ID:
- // TODO provide extension points for other functions
- default:
- throw new UnwantedTokenException(Token.INVALID_TOKEN_TYPE,
input);
- }
+ $value = Double.valueOf(1);
}
+ // TODO provide extension points for other functions
;
column_reference returns [Object value]:
@@ -245,9 +237,6 @@
bin_op:
EQ | NEQ | LT | GT | LTEQ | GTEQ | LIKE | NOT_LIKE;
-func_name:
- SCORE | ID;
-
bool_func_name:
IN_FOLDER | IN_TREE | CONTAINS | ID;