You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/09/13 05:11:18 UTC

svn commit: r1522767 [5/5] - in /lucene/dev/branches/lucene5207: dev-tools/scripts/ lucene/ lucene/core/src/java/org/apache/lucene/util/ lucene/core/src/test/org/apache/lucene/util/ lucene/expressions/ lucene/expressions/src/ lucene/expressions/src/jav...

Added: lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/TestExpressionValidation.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/TestExpressionValidation.java?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/TestExpressionValidation.java (added)
+++ lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/TestExpressionValidation.java Fri Sep 13 03:11:17 2013
@@ -0,0 +1,127 @@
+package org.apache.lucene.expressions;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.lucene.expressions.js.JavascriptCompiler;
+import org.apache.lucene.search.SortField;
+import org.apache.lucene.util.LuceneTestCase;
+
+/** Tests validation of bindings */
+public class TestExpressionValidation extends LuceneTestCase {
+
+  public void testValidExternals() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add(new SortField("valid0", SortField.Type.INT));
+    bindings.add(new SortField("valid1", SortField.Type.INT));
+    bindings.add(new SortField("valid2", SortField.Type.INT));
+    bindings.add(new SortField("_score", SortField.Type.SCORE));
+    bindings.add("valide0", JavascriptCompiler.compile("valid0 - valid1 + valid2 + _score"));
+    bindings.validate();
+    bindings.add("valide1", JavascriptCompiler.compile("valide0 + valid0"));
+    bindings.validate();
+    bindings.add("valide2", JavascriptCompiler.compile("valide0 * valide1"));
+    bindings.validate();
+  }
+  
+  public void testInvalidExternal() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add(new SortField("valid", SortField.Type.INT));
+    bindings.add("invalid", JavascriptCompiler.compile("badreference"));
+    try {
+      bindings.validate();
+      fail("didn't get expected exception");
+    } catch (IllegalArgumentException expected) {
+      assertTrue(expected.getMessage().contains("Invalid reference"));
+    }
+  }
+  
+  public void testInvalidExternal2() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add(new SortField("valid", SortField.Type.INT));
+    bindings.add("invalid", JavascriptCompiler.compile("valid + badreference"));
+    try {
+      bindings.validate();
+      fail("didn't get expected exception");
+    } catch (IllegalArgumentException expected) {
+      assertTrue(expected.getMessage().contains("Invalid reference"));
+    }
+  }
+  
+  public void testSelfRecursion() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add("cycle0", JavascriptCompiler.compile("cycle0"));
+    try {
+      bindings.validate();
+      fail("didn't get expected exception");
+    } catch (IllegalArgumentException expected) {
+      assertTrue(expected.getMessage().contains("Cycle detected"));
+    }
+  }
+  
+  public void testCoRecursion() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add("cycle0", JavascriptCompiler.compile("cycle1"));
+    bindings.add("cycle1", JavascriptCompiler.compile("cycle0"));
+    try {
+      bindings.validate();
+      fail("didn't get expected exception");
+    } catch (IllegalArgumentException expected) {
+      assertTrue(expected.getMessage().contains("Cycle detected"));
+    }
+  }
+  
+  public void testCoRecursion2() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add("cycle0", JavascriptCompiler.compile("cycle1"));
+    bindings.add("cycle1", JavascriptCompiler.compile("cycle2"));
+    bindings.add("cycle2", JavascriptCompiler.compile("cycle0"));
+    try {
+      bindings.validate();
+      fail("didn't get expected exception");
+    } catch (IllegalArgumentException expected) {
+      assertTrue(expected.getMessage().contains("Cycle detected"));
+    }
+  }
+  
+  public void testCoRecursion3() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add("cycle0", JavascriptCompiler.compile("100"));
+    bindings.add("cycle1", JavascriptCompiler.compile("cycle0 + cycle2"));
+    bindings.add("cycle2", JavascriptCompiler.compile("cycle0 + cycle1"));
+    try {
+      bindings.validate();
+      fail("didn't get expected exception");
+    } catch (IllegalArgumentException expected) {
+      assertTrue(expected.getMessage().contains("Cycle detected"));
+    }
+  }
+  
+  public void testCoRecursion4() throws Exception {
+    SimpleBindings bindings = new SimpleBindings();
+    bindings.add("cycle0", JavascriptCompiler.compile("100"));
+    bindings.add("cycle1", JavascriptCompiler.compile("100"));
+    bindings.add("cycle2", JavascriptCompiler.compile("cycle1 + cycle0 + cycle3"));
+    bindings.add("cycle3", JavascriptCompiler.compile("cycle0 + cycle1 + cycle2"));
+    try {
+      bindings.validate();
+      fail("didn't get expected exception");
+    } catch (IllegalArgumentException expected) {
+      assertTrue(expected.getMessage().contains("Cycle detected"));
+    }
+  }
+}

Added: lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptCompiler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptCompiler.java?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptCompiler.java (added)
+++ lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptCompiler.java Fri Sep 13 03:11:17 2013
@@ -0,0 +1,46 @@
+package org.apache.lucene.expressions.js;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.text.ParseException;
+
+import org.apache.lucene.util.LuceneTestCase;
+
+public class TestJavascriptCompiler extends LuceneTestCase {
+  
+  public void testValidCompiles() throws Exception {
+    assertNotNull(JavascriptCompiler.compile("100"));
+    assertNotNull(JavascriptCompiler.compile("valid0+100"));
+    assertNotNull(JavascriptCompiler.compile("logn(2, 20+10-5.0)"));
+  }
+  
+  public void testInvalidCompiles() throws Exception {
+    try {
+      JavascriptCompiler.compile("100 100");
+      fail();
+    } catch (ParseException expected) {
+      // expected exception
+    }
+    
+    try {
+      JavascriptCompiler.compile("7*/-8");
+      fail();
+    } catch (ParseException expected) {
+      // expected exception
+    }
+  }
+}

Added: lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptFunction.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptFunction.java?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptFunction.java (added)
+++ lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptFunction.java Fri Sep 13 03:11:17 2013
@@ -0,0 +1,255 @@
+package org.apache.lucene.expressions.js;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.lucene.expressions.Expression;
+import org.apache.lucene.util.LuceneTestCase;
+
+public class TestJavascriptFunction extends LuceneTestCase {
+  private static double DELTA = 0.0000001;
+  
+  private void testComputedExpressionEvaluation(String name, String expression, double expected) throws Exception {
+    Expression evaluator = JavascriptCompiler.compile(expression);
+    double actual = evaluator.evaluate(0, null);
+    assertEquals(name, expected, actual, DELTA);
+  }
+  
+  public void testAbsMethod() throws Exception {
+    testComputedExpressionEvaluation("abs0", "abs(0)", 0);
+    testComputedExpressionEvaluation("abs1", "abs(119)", 119);
+    testComputedExpressionEvaluation("abs2", "abs(119)", 119);
+    testComputedExpressionEvaluation("abs3", "abs(1)", 1);
+    testComputedExpressionEvaluation("abs4", "abs(-1)", 1);
+  }
+  
+  public void testAcosMethod() throws Exception {
+    testComputedExpressionEvaluation("acos0", "acos(-1)", Math.PI);
+    testComputedExpressionEvaluation("acos1", "acos(-0.8660254)", Math.PI*5/6);
+    testComputedExpressionEvaluation("acos3", "acos(-0.7071068)", Math.PI*3/4);
+    testComputedExpressionEvaluation("acos4", "acos(-0.5)", Math.PI*2/3);
+    testComputedExpressionEvaluation("acos5", "acos(0)", Math.PI/2);
+    testComputedExpressionEvaluation("acos6", "acos(0.5)", Math.PI/3);
+    testComputedExpressionEvaluation("acos7", "acos(0.7071068)", Math.PI/4);
+    testComputedExpressionEvaluation("acos8", "acos(0.8660254)", Math.PI/6);
+    testComputedExpressionEvaluation("acos9", "acos(1)", 0);
+  }
+  
+  public void testAcoshMethod() throws Exception {
+    testComputedExpressionEvaluation("acosh0", "acosh(1)", 0);
+    testComputedExpressionEvaluation("acosh1", "acosh(2.5)", 1.5667992369724109);
+    testComputedExpressionEvaluation("acosh2", "acosh(1234567.89)", 14.719378760739708);
+  }
+  
+  public void testAsinMethod() throws Exception {
+    testComputedExpressionEvaluation("asin0", "asin(-1)", -Math.PI/2);
+    testComputedExpressionEvaluation("asin1", "asin(-0.8660254)", -Math.PI/3);
+    testComputedExpressionEvaluation("asin3", "asin(-0.7071068)", -Math.PI/4);
+    testComputedExpressionEvaluation("asin4", "asin(-0.5)", -Math.PI/6);
+    testComputedExpressionEvaluation("asin5", "asin(0)", 0);
+    testComputedExpressionEvaluation("asin6", "asin(0.5)", Math.PI/6);
+    testComputedExpressionEvaluation("asin7", "asin(0.7071068)", Math.PI/4);
+    testComputedExpressionEvaluation("asin8", "asin(0.8660254)", Math.PI/3);
+    testComputedExpressionEvaluation("asin9", "asin(1)", Math.PI/2);
+  }
+  
+  public void testAsinhMethod() throws Exception {
+    testComputedExpressionEvaluation("asinh0", "asinh(-1234567.89)", -14.719378760740035);
+    testComputedExpressionEvaluation("asinh1", "asinh(-2.5)", -1.6472311463710958);
+    testComputedExpressionEvaluation("asinh2", "asinh(-1)", -0.8813735870195429);
+    testComputedExpressionEvaluation("asinh3", "asinh(0)", 0);
+    testComputedExpressionEvaluation("asinh4", "asinh(1)", 0.8813735870195429);
+    testComputedExpressionEvaluation("asinh5", "asinh(2.5)", 1.6472311463710958);
+    testComputedExpressionEvaluation("asinh6", "asinh(1234567.89)", 14.719378760740035);
+  }
+  
+  public void testAtanMethod() throws Exception {
+    testComputedExpressionEvaluation("atan0", "atan(-1.732050808)", -Math.PI/3);
+    testComputedExpressionEvaluation("atan1", "atan(-1)", -Math.PI/4);
+    testComputedExpressionEvaluation("atan3", "atan(-0.577350269)", -Math.PI/6);
+    testComputedExpressionEvaluation("atan4", "atan(0)", 0);
+    testComputedExpressionEvaluation("atan5", "atan(0.577350269)", Math.PI/6);
+    testComputedExpressionEvaluation("atan6", "atan(1)", Math.PI/4);
+    testComputedExpressionEvaluation("atan7", "atan(1.732050808)", Math.PI/3);
+  }
+  
+  public void testAtanhMethod() throws Exception {
+    testComputedExpressionEvaluation("atanh0", "atanh(-1)", Double.NEGATIVE_INFINITY);
+    testComputedExpressionEvaluation("atanh1", "atanh(-0.5)", -0.5493061443340549);
+    testComputedExpressionEvaluation("atanh2", "atanh(0)", 0);
+    testComputedExpressionEvaluation("atanh3", "atanh(0.5)", 0.5493061443340549);
+    testComputedExpressionEvaluation("atanh4", "atanh(1)", Double.POSITIVE_INFINITY);
+  }
+  
+  public void testCeilMethod() throws Exception {
+    testComputedExpressionEvaluation("ceil0", "ceil(0)", 0);
+    testComputedExpressionEvaluation("ceil1", "ceil(0.1)", 1);
+    testComputedExpressionEvaluation("ceil2", "ceil(0.9)", 1);
+    testComputedExpressionEvaluation("ceil3", "ceil(25.2)", 26);
+    testComputedExpressionEvaluation("ceil4", "ceil(-0.1)", 0);
+    testComputedExpressionEvaluation("ceil5", "ceil(-0.9)", 0);
+    testComputedExpressionEvaluation("ceil6", "ceil(-1.1)", -1);
+  }
+  
+  public void testCosMethod() throws Exception {
+    testComputedExpressionEvaluation("cos0", "cos(0)", 1);
+    testComputedExpressionEvaluation("cos1", "cos(" + Math.PI/2 + ")", 0);
+    testComputedExpressionEvaluation("cos2", "cos(" + -Math.PI/2 + ")", 0);
+    testComputedExpressionEvaluation("cos3", "cos(" + Math.PI/4 + ")", 0.7071068);
+    testComputedExpressionEvaluation("cos4", "cos(" + -Math.PI/4 + ")", 0.7071068);
+    testComputedExpressionEvaluation("cos5", "cos(" + Math.PI*2/3 + ")",-0.5);
+    testComputedExpressionEvaluation("cos6", "cos(" + -Math.PI*2/3 + ")", -0.5);
+    testComputedExpressionEvaluation("cos7", "cos(" + Math.PI/6 + ")", 0.8660254);
+    testComputedExpressionEvaluation("cos8", "cos(" + -Math.PI/6 + ")", 0.8660254);
+  }
+  
+  public void testCoshMethod() throws Exception {
+    testComputedExpressionEvaluation("cosh0", "cosh(0)", 1);
+    testComputedExpressionEvaluation("cosh1", "cosh(-1)", 1.5430806348152437);
+    testComputedExpressionEvaluation("cosh2", "cosh(1)", 1.5430806348152437);
+    testComputedExpressionEvaluation("cosh3", "cosh(-0.5)", 1.1276259652063807);
+    testComputedExpressionEvaluation("cosh4", "cosh(0.5)", 1.1276259652063807);
+    testComputedExpressionEvaluation("cosh5", "cosh(-12.3456789)", 114982.09728671524);
+    testComputedExpressionEvaluation("cosh6", "cosh(12.3456789)", 114982.09728671524);
+  }
+  
+  public void testExpMethod() throws Exception {
+    testComputedExpressionEvaluation("exp0", "exp(0)", 1);
+    testComputedExpressionEvaluation("exp1", "exp(-1)", 0.36787944117);
+    testComputedExpressionEvaluation("exp2", "exp(1)", 2.71828182846);
+    testComputedExpressionEvaluation("exp3", "exp(-0.5)", 0.60653065971);
+    testComputedExpressionEvaluation("exp4", "exp(0.5)", 1.6487212707);
+    testComputedExpressionEvaluation("exp5", "exp(-12.3456789)", 0.0000043485);
+    testComputedExpressionEvaluation("exp6", "exp(12.3456789)", 229964.194569);
+  }
+  
+  public void testFloorMethod() throws Exception {
+    testComputedExpressionEvaluation("floor0", "floor(0)", 0);
+    testComputedExpressionEvaluation("floor1", "floor(0.1)", 0);
+    testComputedExpressionEvaluation("floor2", "floor(0.9)", 0);
+    testComputedExpressionEvaluation("floor3", "floor(25.2)", 25);
+    testComputedExpressionEvaluation("floor4", "floor(-0.1)", -1);
+    testComputedExpressionEvaluation("floor5", "floor(-0.9)", -1);
+    testComputedExpressionEvaluation("floor6", "floor(-1.1)", -2);
+  }
+  
+  public void testLnMethod() throws Exception {
+    testComputedExpressionEvaluation("ln0", "ln(0)", Double.NEGATIVE_INFINITY);
+    testComputedExpressionEvaluation("ln1", "ln(" + Math.E + ")", 1);
+    testComputedExpressionEvaluation("ln2", "ln(-1)", Double.NaN);
+    testComputedExpressionEvaluation("ln3", "ln(1)", 0);
+    testComputedExpressionEvaluation("ln4", "ln(0.5)", -0.69314718056);
+    testComputedExpressionEvaluation("ln5", "ln(12.3456789)", 2.51330611521);
+  }
+  
+  public void testLog10Method() throws Exception {
+    testComputedExpressionEvaluation("log100", "log10(0)", Double.NEGATIVE_INFINITY);
+    testComputedExpressionEvaluation("log101", "log10(1)", 0);
+    testComputedExpressionEvaluation("log102", "log10(-1)", Double.NaN);
+    testComputedExpressionEvaluation("log103", "log10(0.5)", -0.3010299956639812);
+    testComputedExpressionEvaluation("log104", "log10(12.3456789)", 1.0915149771692705);
+  }
+  
+  public void testLognMethod() throws Exception {
+    testComputedExpressionEvaluation("logn0", "logn(2, 0)", Double.NEGATIVE_INFINITY);
+    testComputedExpressionEvaluation("logn1", "logn(2, 1)", 0);
+    testComputedExpressionEvaluation("logn2", "logn(2, -1)", Double.NaN);
+    testComputedExpressionEvaluation("logn3", "logn(2, 0.5)", -1);
+    testComputedExpressionEvaluation("logn4", "logn(2, 12.3456789)", 3.6259342686489378);
+    testComputedExpressionEvaluation("logn5", "logn(2.5, 0)", Double.NEGATIVE_INFINITY);
+    testComputedExpressionEvaluation("logn6", "logn(2.5, 1)", 0);
+    testComputedExpressionEvaluation("logn7", "logn(2.5, -1)", Double.NaN);
+    testComputedExpressionEvaluation("logn8", "logn(2.5, 0.5)", -0.75647079736603);
+    testComputedExpressionEvaluation("logn9", "logn(2.5, 12.3456789)", 2.7429133874016745);
+  }
+  
+  public void testMaxMethod() throws Exception {
+    testComputedExpressionEvaluation("max0", "max(0, 0)", 0);
+    testComputedExpressionEvaluation("max1", "max(1, 0)", 1);
+    testComputedExpressionEvaluation("max2", "max(0, -1)", 0);
+    testComputedExpressionEvaluation("max3", "max(-1, 0)", 0);
+    testComputedExpressionEvaluation("max4", "max(25, 23)", 25);
+  }
+  
+  public void testMinMethod() throws Exception {
+    testComputedExpressionEvaluation("min0", "min(0, 0)", 0);
+    testComputedExpressionEvaluation("min1", "min(1, 0)", 0);
+    testComputedExpressionEvaluation("min2", "min(0, -1)", -1);
+    testComputedExpressionEvaluation("min3", "min(-1, 0)", -1);
+    testComputedExpressionEvaluation("min4", "min(25, 23)", 23);
+  }
+  
+  public void testPowMethod() throws Exception {
+    testComputedExpressionEvaluation("pow0", "pow(0, 0)", 1);
+    testComputedExpressionEvaluation("pow1", "pow(0.1, 2)", 0.01);
+    testComputedExpressionEvaluation("pow2", "pow(0.9, -1)", 1.1111111111111112);
+    testComputedExpressionEvaluation("pow3", "pow(2.2, -2.5)", 0.13929749224447147);
+    testComputedExpressionEvaluation("pow4", "pow(5, 3)", 125);
+    testComputedExpressionEvaluation("pow5", "pow(-0.9, 5)", -0.59049);
+    testComputedExpressionEvaluation("pow6", "pow(-1.1, 2)", 1.21);
+  }
+  
+  public void testSinMethod() throws Exception {
+    testComputedExpressionEvaluation("sin0", "sin(0)", 0);
+    testComputedExpressionEvaluation("sin1", "sin(" + Math.PI/2 + ")", 1);
+    testComputedExpressionEvaluation("sin2", "sin(" + -Math.PI/2 + ")", -1);
+    testComputedExpressionEvaluation("sin3", "sin(" + Math.PI/4 + ")", 0.7071068);
+    testComputedExpressionEvaluation("sin4", "sin(" + -Math.PI/4 + ")", -0.7071068);
+    testComputedExpressionEvaluation("sin5", "sin(" + Math.PI*2/3 + ")", 0.8660254);
+    testComputedExpressionEvaluation("sin6", "sin(" + -Math.PI*2/3 + ")", -0.8660254);
+    testComputedExpressionEvaluation("sin7", "sin(" + Math.PI/6 + ")", 0.5);
+    testComputedExpressionEvaluation("sin8", "sin(" + -Math.PI/6 + ")", -0.5);
+  }
+  
+  public void testSinhMethod() throws Exception {
+    testComputedExpressionEvaluation("sinh0", "sinh(0)", 0);
+    testComputedExpressionEvaluation("sinh1", "sinh(-1)", -1.1752011936438014);
+    testComputedExpressionEvaluation("sinh2", "sinh(1)", 1.1752011936438014);
+    testComputedExpressionEvaluation("sinh3", "sinh(-0.5)", -0.52109530549);
+    testComputedExpressionEvaluation("sinh4", "sinh(0.5)", 0.52109530549);
+    testComputedExpressionEvaluation("sinh5", "sinh(-12.3456789)", -114982.09728236674);
+    testComputedExpressionEvaluation("sinh6", "sinh(12.3456789)", 114982.09728236674);
+  }
+  
+  public void testSqrtMethod() throws Exception {
+    testComputedExpressionEvaluation("sqrt0", "sqrt(0)", 0);
+    testComputedExpressionEvaluation("sqrt1", "sqrt(-1)", Double.NaN);
+    testComputedExpressionEvaluation("sqrt2", "sqrt(0.49)", 0.7);
+    testComputedExpressionEvaluation("sqrt3", "sqrt(49)", 7);
+  }
+  
+  public void testTanMethod() throws Exception {
+    testComputedExpressionEvaluation("tan0", "tan(0)", 0);
+    testComputedExpressionEvaluation("tan1", "tan(-1)", -1.55740772465);
+    testComputedExpressionEvaluation("tan2", "tan(1)", 1.55740772465);
+    testComputedExpressionEvaluation("tan3", "tan(-0.5)", -0.54630248984);
+    testComputedExpressionEvaluation("tan4", "tan(0.5)", 0.54630248984);
+    testComputedExpressionEvaluation("tan1", "tan(-1.3)", -3.60210244797);
+    testComputedExpressionEvaluation("tan2", "tan(1.3)", 3.60210244797);
+  }
+  
+  public void testTanhMethod() throws Exception {
+    testComputedExpressionEvaluation("tanh0", "tanh(0)", 0);
+    testComputedExpressionEvaluation("tanh1", "tanh(-1)", -0.76159415595);
+    testComputedExpressionEvaluation("tanh2", "tanh(1)", 0.76159415595);
+    testComputedExpressionEvaluation("tanh3", "tanh(-0.5)", -0.46211715726);
+    testComputedExpressionEvaluation("tanh4", "tanh(0.5)", 0.46211715726);
+    testComputedExpressionEvaluation("tanh5", "tanh(-12.3456789)", -0.99999999996);
+    testComputedExpressionEvaluation("tanh6", "tanh(12.3456789)", 0.99999999996);
+  }
+  
+  
+}

Added: lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptOperations.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptOperations.java?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptOperations.java (added)
+++ lucene/dev/branches/lucene5207/lucene/expressions/src/test/org/apache/lucene/expressions/js/TestJavascriptOperations.java Fri Sep 13 03:11:17 2013
@@ -0,0 +1,313 @@
+package org.apache.lucene.expressions.js;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.lucene.expressions.Expression;
+import org.apache.lucene.util.LuceneTestCase;
+
+public class TestJavascriptOperations extends LuceneTestCase {
+  private void testComputedExpression(String name, String expression, long expected) throws Exception {
+    Expression evaluator = JavascriptCompiler.compile(expression);
+    long actual = (long)evaluator.evaluate(0, null);
+    assertEquals(name, expected, actual);
+  }
+  
+  public void testNegationOperation() throws Exception {
+    testComputedExpression("negate0", "-1", -1);
+    testComputedExpression("negate1", "--1", 1);
+    testComputedExpression("negate1", "-(-1)", 1);
+    testComputedExpression("negate2", "-0", 0);
+    testComputedExpression("negate3", "--0", 0);
+  }
+  
+  public void testAddOperation() throws Exception {
+    testComputedExpression("add0", "1+1", 2);
+    testComputedExpression("add1", "1+0.5+0.5", 2);
+    testComputedExpression("add2", "5+10", 15);
+    testComputedExpression("add3", "1+1+2", 4);
+    testComputedExpression("add4", "(1+1)+2", 4);
+    testComputedExpression("add5", "1+(1+2)", 4);
+    testComputedExpression("add6", "0+1", 1);
+    testComputedExpression("add7", "1+0", 1);
+    testComputedExpression("add8", "0+0", 0);
+  }
+  
+  public void testSubtractOperation() throws Exception {
+    testComputedExpression("subtract0", "1-1", 0);
+    testComputedExpression("subtract1", "5-10", -5);
+    testComputedExpression("subtract2", "1-0.5-0.5", 0);
+    testComputedExpression("subtract3", "1-1-2", -2);
+    testComputedExpression("subtract4", "(1-1)-2", -2);
+    testComputedExpression("subtract5", "1-(1-2)", 2);
+    testComputedExpression("subtract6", "0-1", -1);
+    testComputedExpression("subtract6", "1-0", 1);
+    testComputedExpression("subtract6", "0-0", 0);
+  }
+  
+  public void testMultiplyOperation() throws Exception {
+    testComputedExpression("multiply0", "1*1", 1);
+    testComputedExpression("multiply1", "5*10", 50);
+    testComputedExpression("multiply2", "50*0.1", 5);
+    testComputedExpression("multiply4", "1*1*2", 2);
+    testComputedExpression("multiply4", "(1*1)*2", 2);
+    testComputedExpression("multiply5", "1*(1*2)", 2);
+    testComputedExpression("multiply6", "10*0", 0);
+    testComputedExpression("multiply6", "0*0", 0);
+  }
+  
+  public void testDivisionOperation() throws Exception {
+    testComputedExpression("division0", "1*1", 1);
+    testComputedExpression("division1", "10/5", 2);
+    testComputedExpression("division2", "10/0.5", 20);
+    testComputedExpression("division3", "10/5/2", 1);
+    testComputedExpression("division4", "(27/9)/3", 1);
+    testComputedExpression("division5", "27/(9/3)", 9);
+    testComputedExpression("division6", "1/0", 9223372036854775807L);
+  }
+  
+  public void testModuloOperation() throws Exception {
+    testComputedExpression("modulo0", "1%1", 0);
+    testComputedExpression("modulo1", "10%3", 1);
+    testComputedExpression("modulo2", "10%3%2", 1);
+    testComputedExpression("modulo3", "(27%10)%4", 3);
+    testComputedExpression("modulo4", "27%(9%5)", 3);
+  }
+  
+  public void testLessThanOperation() throws Exception {
+    testComputedExpression("lessthan0", "1 < 1", 0);
+    testComputedExpression("lessthan1", "2 < 1", 0);
+    testComputedExpression("lessthan2", "1 < 2", 1);
+    testComputedExpression("lessthan3", "2 < 1 < 3", 1);
+    testComputedExpression("lessthan4", "2 < (1 < 3)", 0);
+    testComputedExpression("lessthan5", "(2 < 1) < 1", 1);
+    testComputedExpression("lessthan6", "-1 < -2", 0);
+    testComputedExpression("lessthan7", "-1 < 0", 1);
+  }
+  
+  public void testLessThanEqualsOperation() throws Exception {
+    testComputedExpression("lessthanequals0", "1 <= 1", 1);
+    testComputedExpression("lessthanequals1", "2 <= 1", 0);
+    testComputedExpression("lessthanequals2", "1 <= 2", 1);
+    testComputedExpression("lessthanequals3", "1 <= 1 <= 0", 0);
+    testComputedExpression("lessthanequals4", "-1 <= -1", 1);
+    testComputedExpression("lessthanequals5", "-1 <= 0", 1);
+    testComputedExpression("lessthanequals6", "-1 <= -2", 0);
+    testComputedExpression("lessthanequals7", "-1 <= 0", 1);
+  }
+  
+  public void testGreaterThanOperation() throws Exception {
+    testComputedExpression("greaterthan0", "1 > 1", 0);
+    testComputedExpression("greaterthan1", "2 > 1", 1);
+    testComputedExpression("greaterthan2", "1 > 2", 0);
+    testComputedExpression("greaterthan3", "2 > 1 > 3", 0);
+    testComputedExpression("greaterthan4", "2 > (1 > 3)", 1);
+    testComputedExpression("greaterthan5", "(2 > 1) > 1", 0);
+    testComputedExpression("greaterthan6", "-1 > -2", 1);
+    testComputedExpression("greaterthan7", "-1 > 0", 0);
+  }
+  
+  public void testGreaterThanEqualsOperation() throws Exception {
+    testComputedExpression("greaterthanequals0", "1 >= 1", 1);
+    testComputedExpression("greaterthanequals1", "2 >= 1", 1);
+    testComputedExpression("greaterthanequals2", "1 >= 2", 0);
+    testComputedExpression("greaterthanequals3", "1 >= 1 >= 0", 1);
+    testComputedExpression("greaterthanequals4", "-1 >= -1", 1);
+    testComputedExpression("greaterthanequals5", "-1 >= 0", 0);
+    testComputedExpression("greaterthanequals6", "-1 >= -2", 1);
+    testComputedExpression("greaterthanequals7", "-1 >= 0", 0);
+  }
+  
+  public void testEqualsOperation() throws Exception {
+    testComputedExpression("equals0", "1 == 1", 1);
+    testComputedExpression("equals1", "0 == 0", 1);
+    testComputedExpression("equals2", "-1 == -1", 1);
+    testComputedExpression("equals3", "1.1 == 1.1", 1);
+    testComputedExpression("equals4", "0.9 == 0.9", 1);
+    testComputedExpression("equals5", "-0 == 0", 1);
+    testComputedExpression("equals6", "0 == 1", 0);
+    testComputedExpression("equals7", "1 == 2", 0);
+    testComputedExpression("equals8", "-1 == 1", 0);
+    testComputedExpression("equals9", "-1 == 0", 0);
+    testComputedExpression("equals10", "-2 == 1", 0);
+    testComputedExpression("equals11", "-2 == -1", 0);
+  }
+  
+  public void testNotEqualsOperation() throws Exception {
+    testComputedExpression("notequals0", "1 != 1", 0);
+    testComputedExpression("notequals1", "0 != 0", 0);
+    testComputedExpression("notequals2", "-1 != -1", 0);
+    testComputedExpression("notequals3", "1.1 != 1.1", 0);
+    testComputedExpression("notequals4", "0.9 != 0.9", 0);
+    testComputedExpression("notequals5", "-0 != 0", 0);
+    testComputedExpression("notequals6", "0 != 1", 1);
+    testComputedExpression("notequals7", "1 != 2", 1);
+    testComputedExpression("notequals8", "-1 != 1", 1);
+    testComputedExpression("notequals9", "-1 != 0", 1);
+    testComputedExpression("notequals10", "-2 != 1", 1);
+    testComputedExpression("notequals11", "-2 != -1", 1);
+  }
+  
+  public void testBoolNotOperation() throws Exception {
+    testComputedExpression("boolnot0", "!1", 0);
+    testComputedExpression("boolnot0", "!!1", 1);
+    testComputedExpression("boolnot0", "!0", 1);
+    testComputedExpression("boolnot0", "!!0", 0);
+    testComputedExpression("boolnot0", "!-1", 0);
+    testComputedExpression("boolnot0", "!2", 0);
+    testComputedExpression("boolnot0", "!-2", 0);
+  }
+  
+  public void testBoolAndOperation() throws Exception {
+    testComputedExpression("booland0", "1 && 1", 1);
+    testComputedExpression("booland1", "1 && 0", 0);
+    testComputedExpression("booland2", "0 && 1", 0);
+    testComputedExpression("booland3", "0 && 0", 0);
+    testComputedExpression("booland4", "-1 && -1", 1);
+    testComputedExpression("booland5", "-1 && 0", 0);
+    testComputedExpression("booland6", "0 && -1", 0);
+    testComputedExpression("booland7", "-0 && -0", 0);
+  }
+  
+  public void testBoolOrOperation() throws Exception {
+    testComputedExpression("boolor0", "1 || 1", 1);
+    testComputedExpression("boolor1", "1 || 0", 1);
+    testComputedExpression("boolor2", "0 || 1", 1);
+    testComputedExpression("boolor3", "0 || 0", 0);
+    testComputedExpression("boolor4", "-1 || -1", 1);
+    testComputedExpression("boolor5", "-1 || 0", 1);
+    testComputedExpression("boolor6", "0 || -1", 1);
+    testComputedExpression("boolor7", "-0 || -0", 0);
+  }
+  
+  public void testConditionalOperation() throws Exception {
+    testComputedExpression("conditional0", "1 ? 2 : 3", 2);
+    testComputedExpression("conditional1", "-1 ? 2 : 3", 2);
+    testComputedExpression("conditional2", "0 ? 2 : 3", 3);
+    testComputedExpression("conditional3", "1 ? 2 ? 3 : 4 : 5", 3);
+    testComputedExpression("conditional4", "0 ? 2 ? 3 : 4 : 5", 5);
+    testComputedExpression("conditional5", "1 ? 0 ? 3 : 4 : 5", 4);
+    testComputedExpression("conditional6", "1 ? 2 : 3 ? 4 : 5", 2);
+    testComputedExpression("conditional7", "0 ? 2 : 3 ? 4 : 5", 4);
+    testComputedExpression("conditional8", "0 ? 2 : 0 ? 4 : 5", 5);
+    testComputedExpression("conditional9", "(1 ? 1 : 0) ? 3 : 4", 3);
+    testComputedExpression("conditional10", "(0 ? 1 : 0) ? 3 : 4", 4);
+  }
+  
+  public void testBitShiftLeft() throws Exception {
+    testComputedExpression("bitshiftleft0", "1 << 1", 2);
+    testComputedExpression("bitshiftleft1", "2 << 1", 4);
+    testComputedExpression("bitshiftleft2", "-1 << 31", -2147483648);
+    testComputedExpression("bitshiftleft3", "3 << 5", 96);
+    testComputedExpression("bitshiftleft4", "-5 << 3", -40);
+    testComputedExpression("bitshiftleft5", "4195 << 7", 536960);
+    testComputedExpression("bitshiftleft6", "4195 << 66", 16780);
+    testComputedExpression("bitshiftleft7", "4195 << 6", 268480);
+    testComputedExpression("bitshiftleft8", "4195 << 70", 268480);
+    testComputedExpression("bitshiftleft9", "-4195 << 70", -268480);
+    testComputedExpression("bitshiftleft10", "-15 << 62", 4611686018427387904L);
+  }
+  
+  public void testBitShiftRight() throws Exception {
+    testComputedExpression("bitshiftright0", "1 >> 1", 0);
+    testComputedExpression("bitshiftright1", "2 >> 1", 1);
+    testComputedExpression("bitshiftright2", "-1 >> 5", -1);
+    testComputedExpression("bitshiftright3", "-2 >> 30", -1);
+    testComputedExpression("bitshiftright4", "-5 >> 1", -3);
+    testComputedExpression("bitshiftright5", "536960 >> 7", 4195);
+    testComputedExpression("bitshiftright6", "16780 >> 66", 4195);
+    testComputedExpression("bitshiftright7", "268480 >> 6", 4195);
+    testComputedExpression("bitshiftright8", "268480 >> 70", 4195);
+    testComputedExpression("bitshiftright9", "-268480 >> 70", -4195);
+    testComputedExpression("bitshiftright10", "-2147483646 >> 1", -1073741823);
+  }
+  
+  public void testBitShiftRightUnsigned() throws Exception {
+    testComputedExpression("bitshiftrightunsigned0", "1 >>> 1", 0);
+    testComputedExpression("bitshiftrightunsigned1", "2 >>> 1", 1);
+    testComputedExpression("bitshiftrightunsigned2", "-1 >>> 37", 134217727);
+    testComputedExpression("bitshiftrightunsigned3", "-2 >>> 62", 3);
+    testComputedExpression("bitshiftrightunsigned4", "-5 >>> 33", 2147483647);
+    testComputedExpression("bitshiftrightunsigned5", "536960 >>> 7", 4195);
+    testComputedExpression("bitshiftrightunsigned6", "16780 >>> 66", 4195);
+    testComputedExpression("bitshiftrightunsigned7", "268480 >>> 6", 4195);
+    testComputedExpression("bitshiftrightunsigned8", "268480 >>> 70", 4195);
+    testComputedExpression("bitshiftrightunsigned9", "-268480 >>> 102", 67108863);
+    testComputedExpression("bitshiftrightunsigned10", "2147483648 >>> 1", 1073741824);
+  }
+  
+  public void testBitwiseAnd() throws Exception {
+    testComputedExpression("bitwiseand0", "4 & 4", 4);
+    testComputedExpression("bitwiseand1", "3 & 2", 2);
+    testComputedExpression("bitwiseand2", "7 & 3", 3);
+    testComputedExpression("bitwiseand3", "-1 & -1", -1);
+    testComputedExpression("bitwiseand4", "-1 & 25", 25);
+    testComputedExpression("bitwiseand5", "3 & 7", 3);
+    testComputedExpression("bitwiseand6", "0 & 1", 0);
+    testComputedExpression("bitwiseand7", "1 & 0", 0);
+  }
+  
+  public void testBitwiseOr() throws Exception {
+    testComputedExpression("bitwiseor0", "4 | 4", 4);
+    testComputedExpression("bitwiseor1", "5 | 2", 7);
+    testComputedExpression("bitwiseor2", "7 | 3", 7);
+    testComputedExpression("bitwiseor3", "-1 | -5", -1);
+    testComputedExpression("bitwiseor4", "-1 | 25", -1);
+    testComputedExpression("bitwiseor5", "-100 | 15", -97);
+    testComputedExpression("bitwiseor6", "0 | 1", 1);
+    testComputedExpression("bitwiseor7", "1 | 0", 1);
+  }
+  
+  public void testBitwiseXor() throws Exception {
+    testComputedExpression("bitwisexor0", "4 ^ 4", 0);
+    testComputedExpression("bitwisexor1", "5 ^ 2", 7);
+    testComputedExpression("bitwisexor2", "15 ^ 3", 12);
+    testComputedExpression("bitwisexor3", "-1 ^ -5", 4);
+    testComputedExpression("bitwisexor4", "-1 ^ 25", -26);
+    testComputedExpression("bitwisexor5", "-100 ^ 15", -109);
+    testComputedExpression("bitwisexor6", "0 ^ 1", 1);
+    testComputedExpression("bitwisexor7", "1 ^ 0", 1);
+    testComputedExpression("bitwisexor8", "0 ^ 0", 0);
+  }
+  
+  public void testBitwiseNot() throws Exception {
+    testComputedExpression("bitwisenot0", "~-5", 4);
+    testComputedExpression("bitwisenot1", "~25", -26);
+    testComputedExpression("bitwisenot2", "~0", -1);
+    testComputedExpression("bitwisenot3", "~-1", 0);
+  }
+  
+  public void testDecimalConst() throws Exception {
+    testComputedExpression("decimalconst0", "0", 0);
+    testComputedExpression("decimalconst1", "1", 1);
+    testComputedExpression("decimalconst2", "123456789", 123456789);
+    testComputedExpression("decimalconst3", "5.6E2", 560);
+  }
+  
+  public void testHexConst() throws Exception {
+    testComputedExpression("hexconst0", "0x0", 0);
+    testComputedExpression("hexconst1", "0x1", 1);
+    testComputedExpression("hexconst2", "0xF", 15);
+    testComputedExpression("hexconst3", "0x1234ABCDEF", 78193085935L);
+  }
+  
+  public void testOctalConst() throws Exception {
+    testComputedExpression("octalconst0", "00", 0);
+    testComputedExpression("octalconst1", "01", 1);
+    testComputedExpression("octalconst2", "010", 8);
+    testComputedExpression("octalconst3", "0123456777", 21913087);
+  }
+}

Added: lucene/dev/branches/lucene5207/lucene/licenses/antlr-3.4.jar.sha1
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/licenses/antlr-3.4.jar.sha1?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/licenses/antlr-3.4.jar.sha1 (added)
+++ lucene/dev/branches/lucene5207/lucene/licenses/antlr-3.4.jar.sha1 Fri Sep 13 03:11:17 2013
@@ -0,0 +1 @@
+7797e70e3f5cb4229695f08ff50333266cf81125

Added: lucene/dev/branches/lucene5207/lucene/licenses/antlr-LICENSE-BSD_LIKE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/licenses/antlr-LICENSE-BSD_LIKE.txt?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/licenses/antlr-LICENSE-BSD_LIKE.txt (added)
+++ lucene/dev/branches/lucene5207/lucene/licenses/antlr-LICENSE-BSD_LIKE.txt Fri Sep 13 03:11:17 2013
@@ -0,0 +1,7 @@
+Copyright (c) 2012 Terence Parr and Sam Harwell
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Added: lucene/dev/branches/lucene5207/lucene/licenses/antlr-NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/licenses/antlr-NOTICE.txt?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/licenses/antlr-NOTICE.txt (added)
+++ lucene/dev/branches/lucene5207/lucene/licenses/antlr-NOTICE.txt Fri Sep 13 03:11:17 2013
@@ -0,0 +1 @@
+ 

Added: lucene/dev/branches/lucene5207/lucene/licenses/asm-4.1.jar.sha1
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/licenses/asm-4.1.jar.sha1?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/licenses/asm-4.1.jar.sha1 (added)
+++ lucene/dev/branches/lucene5207/lucene/licenses/asm-4.1.jar.sha1 Fri Sep 13 03:11:17 2013
@@ -0,0 +1 @@
+ad568238ee36a820bd6c6806807e8a14ea34684d

Added: lucene/dev/branches/lucene5207/lucene/licenses/asm-LICENSE-BSD_LIKE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/licenses/asm-LICENSE-BSD_LIKE.txt?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/licenses/asm-LICENSE-BSD_LIKE.txt (added)
+++ lucene/dev/branches/lucene5207/lucene/licenses/asm-LICENSE-BSD_LIKE.txt Fri Sep 13 03:11:17 2013
@@ -0,0 +1,26 @@
+Copyright (c) 2012 France Télécom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.

Added: lucene/dev/branches/lucene5207/lucene/licenses/asm-NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/licenses/asm-NOTICE.txt?rev=1522767&view=auto
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/licenses/asm-NOTICE.txt (added)
+++ lucene/dev/branches/lucene5207/lucene/licenses/asm-NOTICE.txt Fri Sep 13 03:11:17 2013
@@ -0,0 +1 @@
+ 

Modified: lucene/dev/branches/lucene5207/lucene/module-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/lucene/module-build.xml?rev=1522767&r1=1522766&r2=1522767&view=diff
==============================================================================
--- lucene/dev/branches/lucene5207/lucene/module-build.xml (original)
+++ lucene/dev/branches/lucene5207/lucene/module-build.xml Fri Sep 13 03:11:17 2013
@@ -433,6 +433,28 @@
     <property name="codecs-javadocs.uptodate" value="true"/>
   </target>
 
+  <property name="expressions.jar" value="${common.dir}/build/expressions/lucene-expressions-${version}.jar"/>
+  <target name="check-expressions-uptodate" unless="expressions.uptodate">
+    <module-uptodate name="expressions" jarfile="${expressions.jar}" property="expressions.uptodate"/>
+  </target>
+  <target name="jar-expressions" unless="expressions.uptodate" depends="check-expressions-uptodate">
+    <ant dir="${common.dir}/expressions" target="jar-core" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="expressions.uptodate" value="true"/>
+  </target>
+
+  <property name="expressions-javadoc.jar" value="${common.dir}/build/expressions/lucene-expressions-${version}-javadoc.jar"/>
+  <target name="check-expressions-javadocs-uptodate" unless="expressions-javadocs.uptodate">
+    <module-uptodate name="expressions" jarfile="${expressions-javadoc.jar}" property="expressions-javadocs.uptodate"/>
+  </target>
+  <target name="javadocs-expressions" unless="expressions-javadocs.uptodate" depends="check-expressions-javadocs-uptodate">
+    <ant dir="${common.dir}/expressions" target="javadocs" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="expressions-javadocs.uptodate" value="true"/>
+  </target>
+
   <property name="grouping.jar" value="${common.dir}/build/grouping/lucene-grouping-${version}.jar"/>
   <target name="check-grouping-uptodate" unless="grouping.uptodate">
     <module-uptodate name="grouping" jarfile="${grouping.jar}" property="grouping.uptodate"/>