You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/26 11:12:16 UTC

[03/11] lucenenet git commit: Lucene.Net.Expressions: usings and license headers

Lucene.Net.Expressions: usings and license headers


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/fa4ab1b1
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/fa4ab1b1
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/fa4ab1b1

Branch: refs/heads/api-work
Commit: fa4ab1b13077f23bb3c245703511f16068bdfe11
Parents: 0d5490e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Jan 26 14:45:52 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Jan 26 14:45:52 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Expressions/Bindings.cs          | 35 +++++++++---
 src/Lucene.Net.Expressions/Expression.cs        | 59 +++++++++++++-------
 .../ExpressionComparator.cs                     | 25 +++++++--
 .../ExpressionFunctionValues.cs                 | 33 ++++++++---
 .../ExpressionRescorer.cs                       | 21 ++++++-
 .../ExpressionSortField.cs                      | 33 ++++++++---
 .../ExpressionValueSource.cs                    | 45 ++++++++++-----
 .../JS/JavascriptCompiler.cs                    | 44 +++++++--------
 .../JS/JavascriptLexer.cs                       |  3 +-
 .../JS/JavascriptParser.cs                      | 22 ++++----
 .../ScoreFunctionValues.cs                      | 22 +++++++-
 src/Lucene.Net.Expressions/ScoreValueSource.cs  | 45 ++++++++++-----
 src/Lucene.Net.Expressions/SimpleBindings.cs    | 21 ++++++-
 13 files changed, 289 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/Bindings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/Bindings.cs b/src/Lucene.Net.Expressions/Bindings.cs
index 59f12de..4cfdcdc 100644
--- a/src/Lucene.Net.Expressions/Bindings.cs
+++ b/src/Lucene.Net.Expressions/Bindings.cs
@@ -2,15 +2,32 @@ using Lucene.Net.Queries.Function;
 
 namespace Lucene.Net.Expressions
 {
-	/// <summary>Binds variable names in expressions to actual data.</summary>
-	/// <remarks>
-	/// Binds variable names in expressions to actual data.
-	/// <p>
-	/// These are typically DocValues fields/FieldCache, the document's
-	/// relevance score, or other ValueSources.
-	/// </remarks>
-	/// <lucene.experimental></lucene.experimental>
-	public abstract class Bindings
+    /*
+     * 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.
+     */
+
+    /// <summary>Binds variable names in expressions to actual data.</summary>
+    /// <remarks>
+    /// Binds variable names in expressions to actual data.
+    /// <p>
+    /// These are typically DocValues fields/FieldCache, the document's
+    /// relevance score, or other ValueSources.
+    /// </remarks>
+    /// <lucene.experimental></lucene.experimental>
+    public abstract class Bindings
 	{
 		/// <summary>Sole constructor.</summary>
 		/// <remarks>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/Expression.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/Expression.cs b/src/Lucene.Net.Expressions/Expression.cs
index 3c40f4c..5eadc60 100644
--- a/src/Lucene.Net.Expressions/Expression.cs
+++ b/src/Lucene.Net.Expressions/Expression.cs
@@ -3,27 +3,44 @@ using Lucene.Net.Search;
 
 namespace Lucene.Net.Expressions
 {
-	/// <summary>Base class that computes the value of an expression for a document.</summary>
-	/// <remarks>
-	/// Base class that computes the value of an expression for a document.
-	/// <p>
-	/// Example usage:
-	/// <pre class="prettyprint">
-	/// // compile an expression:
-	/// Expression expr = JavascriptCompiler.compile("sqrt(_score) + ln(popularity)");
-	/// // SimpleBindings just maps variables to SortField instances
-	/// SimpleBindings bindings = new SimpleBindings();
-	/// bindings.add(new SortField("_score", SortField.Type.SCORE));
-	/// bindings.add(new SortField("popularity", SortField.Type.INT));
-	/// // create a sort field and sort by it (reverse order)
-	/// Sort sort = new Sort(expr.getSortField(bindings, true));
-	/// Query query = new TermQuery(new Term("body", "contents"));
-	/// searcher.search(query, null, 10, sort);
-	/// </pre>
-	/// </remarks>
-	/// <seealso cref="Lucene.Net.Expressions.JS.JavascriptCompiler.Compile(string)">Lucene.Net.Expressions.JS.JavascriptCompiler.Compile(string)</seealso>
-	/// <lucene.experimental></lucene.experimental>
-	public abstract class Expression
+    /*
+     * 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.
+     */
+
+    /// <summary>Base class that computes the value of an expression for a document.</summary>
+    /// <remarks>
+    /// Base class that computes the value of an expression for a document.
+    /// <p>
+    /// Example usage:
+    /// <pre class="prettyprint">
+    /// // compile an expression:
+    /// Expression expr = JavascriptCompiler.compile("sqrt(_score) + ln(popularity)");
+    /// // SimpleBindings just maps variables to SortField instances
+    /// SimpleBindings bindings = new SimpleBindings();
+    /// bindings.add(new SortField("_score", SortField.Type.SCORE));
+    /// bindings.add(new SortField("popularity", SortField.Type.INT));
+    /// // create a sort field and sort by it (reverse order)
+    /// Sort sort = new Sort(expr.getSortField(bindings, true));
+    /// Query query = new TermQuery(new Term("body", "contents"));
+    /// searcher.search(query, null, 10, sort);
+    /// </pre>
+    /// </remarks>
+    /// <seealso cref="Lucene.Net.Expressions.JS.JavascriptCompiler.Compile(string)">Lucene.Net.Expressions.JS.JavascriptCompiler.Compile(string)</seealso>
+    /// <lucene.experimental></lucene.experimental>
+    public abstract class Expression
 	{
 		/// <summary>The original source text</summary>
 		public readonly string sourceText; // LUCENENET TODO: Make property

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/ExpressionComparator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ExpressionComparator.cs b/src/Lucene.Net.Expressions/ExpressionComparator.cs
index 2b22f76..56f98ab 100644
--- a/src/Lucene.Net.Expressions/ExpressionComparator.cs
+++ b/src/Lucene.Net.Expressions/ExpressionComparator.cs
@@ -1,14 +1,29 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
 using Lucene.Net.Index;
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
-using Lucene.Net.Support;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.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.
+     */
+
     /// <summary>A custom comparer for sorting documents by an expression</summary>
     internal class ExpressionComparer : FieldComparer<double>
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/ExpressionFunctionValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ExpressionFunctionValues.cs b/src/Lucene.Net.Expressions/ExpressionFunctionValues.cs
index 93adf84..b6de614 100644
--- a/src/Lucene.Net.Expressions/ExpressionFunctionValues.cs
+++ b/src/Lucene.Net.Expressions/ExpressionFunctionValues.cs
@@ -1,16 +1,33 @@
-using System;
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Queries.Function.DocValues;
+using System;
 
 namespace Lucene.Net.Expressions
 {
-	/// <summary>
-	/// A
-	/// <see cref="Lucene.Net.Queries.Function.FunctionValues">Lucene.Net.Queries.Function.FunctionValues
-	/// 	</see>
-	/// which evaluates an expression
-	/// </summary>
-	internal class ExpressionFunctionValues : DoubleDocValues
+    /*
+     * 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.
+     */
+
+    /// <summary>
+    /// A
+    /// <see cref="Lucene.Net.Queries.Function.FunctionValues">Lucene.Net.Queries.Function.FunctionValues
+    /// 	</see>
+    /// which evaluates an expression
+    /// </summary>
+    internal class ExpressionFunctionValues : DoubleDocValues
 	{
 		internal readonly Expression expression;
 		internal readonly FunctionValues[] functionValues;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/ExpressionRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ExpressionRescorer.cs b/src/Lucene.Net.Expressions/ExpressionRescorer.cs
index aa8b249..78ef4f5 100644
--- a/src/Lucene.Net.Expressions/ExpressionRescorer.cs
+++ b/src/Lucene.Net.Expressions/ExpressionRescorer.cs
@@ -1,10 +1,27 @@
-using System;
-using System.Collections.Generic;
 using Lucene.Net.Index;
 using Lucene.Net.Search;
+using System;
+using System.Collections.Generic;
 
 namespace Lucene.Net.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.
+     */
+
     /// <summary>
     /// A
     /// <see cref="Lucene.Net.Search.Rescorer">Lucene.Net.Search.Rescorer</see>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/ExpressionSortField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ExpressionSortField.cs b/src/Lucene.Net.Expressions/ExpressionSortField.cs
index 0f1da11..d09bcfd 100644
--- a/src/Lucene.Net.Expressions/ExpressionSortField.cs
+++ b/src/Lucene.Net.Expressions/ExpressionSortField.cs
@@ -1,15 +1,32 @@
-using System.Text;
 using Lucene.Net.Search;
+using System.Text;
 
 namespace Lucene.Net.Expressions
 {
-	/// <summary>
-	/// A
-	/// <see cref="Lucene.Net.Search.SortField">Lucene.Net.Search.SortField
-	/// 	</see>
-	/// which sorts documents by the evaluated value of an expression for each document
-	/// </summary>
-	internal class ExpressionSortField : SortField
+    /*
+     * 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.
+     */
+
+    /// <summary>
+    /// A
+    /// <see cref="Lucene.Net.Search.SortField">Lucene.Net.Search.SortField
+    /// 	</see>
+    /// which sorts documents by the evaluated value of an expression for each document
+    /// </summary>
+    internal class ExpressionSortField : SortField
 	{
 		private readonly ExpressionValueSource source;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/ExpressionValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ExpressionValueSource.cs b/src/Lucene.Net.Expressions/ExpressionValueSource.cs
index 87d7d7c..254ec77 100644
--- a/src/Lucene.Net.Expressions/ExpressionValueSource.cs
+++ b/src/Lucene.Net.Expressions/ExpressionValueSource.cs
@@ -1,24 +1,41 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
 using Lucene.Net.Index;
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
 using Lucene.Net.Support;
+using System;
+using System.Collections;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Expressions
 {
-	/// <summary>
-	/// A
-	/// <see cref="Lucene.Net.Queries.Function.ValueSource">Lucene.Net.Queries.Function.ValueSource
-	/// 	</see>
-	/// which evaluates a
-	/// <see cref="Expression">Expression</see>
-	/// given the context of an
-	/// <see cref="Bindings">Bindings</see>
-	/// .
-	/// </summary>
-	internal sealed class ExpressionValueSource : ValueSource
+    /*
+     * 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.
+     */
+
+    /// <summary>
+    /// A
+    /// <see cref="Lucene.Net.Queries.Function.ValueSource">Lucene.Net.Queries.Function.ValueSource
+    /// 	</see>
+    /// which evaluates a
+    /// <see cref="Expression">Expression</see>
+    /// given the context of an
+    /// <see cref="Bindings">Bindings</see>
+    /// .
+    /// </summary>
+    internal sealed class ExpressionValueSource : ValueSource
 	{
 		internal readonly ValueSource[] variables;
 		internal readonly Expression expression;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs b/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
index f173ca9..7706baa 100644
--- a/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
+++ b/src/Lucene.Net.Expressions/JS/JavascriptCompiler.cs
@@ -1,40 +1,40 @@
-/*
- * 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.
- */
-
+using Antlr.Runtime;
+using Antlr.Runtime.Tree;
+using Lucene.Net.Queries.Function;
+using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
 using System.Reflection.Emit;
-using Antlr.Runtime;
-using Antlr.Runtime.Tree;
-using Lucene.Net.Queries.Function;
-using Lucene.Net.Support;
 
 #if NETSTANDARD
-using System.IO;
 using Lucene.Net.Support.Configuration;
 using Microsoft.Extensions.Configuration;
+using System.IO;
 #else
 using System.Configuration;
 #endif
 
 namespace Lucene.Net.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.
+     */
+
     /// <summary>An expression compiler for javascript expressions.</summary>
     /// <remarks>
     /// An expression compiler for javascript expressions.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/JS/JavascriptLexer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/JS/JavascriptLexer.cs b/src/Lucene.Net.Expressions/JS/JavascriptLexer.cs
index cab1627..606100d 100644
--- a/src/Lucene.Net.Expressions/JS/JavascriptLexer.cs
+++ b/src/Lucene.Net.Expressions/JS/JavascriptLexer.cs
@@ -1,3 +1,5 @@
+// ANTLR GENERATED CODE: DO NOT EDIT (LUCENENET: Not really auto generated in the port)
+
 using System;
 using Antlr.Runtime;
 
@@ -87,7 +89,6 @@ namespace Lucene.Net.Expressions.JS
 
 		public const int WS = 43;
 
-		// ANTLR GENERATED CODE: DO NOT EDIT
 		public override void DisplayRecognitionError(string[] tokenNames, RecognitionException re)
 		{
 			string message = " unexpected character '" + (char)re.Character + "' at position (" + re.CharPositionInLine + ").";

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/JS/JavascriptParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/JS/JavascriptParser.cs b/src/Lucene.Net.Expressions/JS/JavascriptParser.cs
index 518168f..eedd1de 100644
--- a/src/Lucene.Net.Expressions/JS/JavascriptParser.cs
+++ b/src/Lucene.Net.Expressions/JS/JavascriptParser.cs
@@ -1,21 +1,24 @@
+// ANTLR GENERATED CODE: DO NOT EDIT (LUCENENET: Not really auto generated in the port)
+
 using System;
 using Antlr.Runtime;
 using Antlr.Runtime.Tree;
 
-
 namespace Lucene.Net.Expressions.JS
 {
     internal class JavascriptParser : Parser
     {
         public static readonly string[] tokenNames =
-		{ "<invalid>", "<EOR>", 
-		    "<DOWN>", "<UP>", "AT_ADD", "AT_BIT_AND", "AT_BIT_NOT", "AT_BIT_OR", "AT_BIT_SHL"
-		    , "AT_BIT_SHR", "AT_BIT_SHU", "AT_BIT_XOR", "AT_BOOL_AND", "AT_BOOL_NOT", "AT_BOOL_OR"
-		    , "AT_CALL", "AT_COLON", "AT_COMMA", "AT_COMP_EQ", "AT_COMP_GT", "AT_COMP_GTE", 
-		    "AT_COMP_LT", "AT_COMP_LTE", "AT_COMP_NEQ", "AT_COND_QUE", "AT_DIVIDE", "AT_DOT"
-		    , "AT_LPAREN", "AT_MODULO", "AT_MULTIPLY", "AT_NEGATE", "AT_RPAREN", "AT_SUBTRACT"
-		    , "DECIMAL", "DECIMALDIGIT", "DECIMALINTEGER", "EXPONENT", "HEX", "HEXDIGIT", "ID"
-		    , "NAMESPACE_ID", "OCTAL", "OCTALDIGIT", "WS" };
+		{
+            "<invalid>", "<EOR>", "<DOWN>", "<UP>", "AT_ADD", "AT_BIT_AND", "AT_BIT_NOT",
+            "AT_BIT_OR", "AT_BIT_SHL", "AT_BIT_SHR", "AT_BIT_SHU", "AT_BIT_XOR", "AT_BOOL_AND",
+            "AT_BOOL_NOT", "AT_BOOL_OR", "AT_CALL", "AT_COLON", "AT_COMMA", "AT_COMP_EQ",
+            "AT_COMP_GT", "AT_COMP_GTE", "AT_COMP_LT", "AT_COMP_LTE", "AT_COMP_NEQ",
+            "AT_COND_QUE", "AT_DIVIDE", "AT_DOT", "AT_LPAREN", "AT_MODULO", "AT_MULTIPLY",
+            "AT_NEGATE", "AT_RPAREN", "AT_SUBTRACT", "DECIMAL", "DECIMALDIGIT", "DECIMALINTEGER",
+            "EXPONENT", "HEX", "HEXDIGIT", "ID", "NAMESPACE_ID", "OCTAL", "OCTALDIGIT",
+            "WS"
+        };
 
         public const int EOF = -1;
 
@@ -99,7 +102,6 @@ namespace Lucene.Net.Expressions.JS
 
         public const int WS = 43;
 
-        // ANTLR GENERATED CODE: DO NOT EDIT
         // delegates
         public virtual Parser[] GetDelegates()
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/ScoreFunctionValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ScoreFunctionValues.cs b/src/Lucene.Net.Expressions/ScoreFunctionValues.cs
index 50dc769..331bebb 100644
--- a/src/Lucene.Net.Expressions/ScoreFunctionValues.cs
+++ b/src/Lucene.Net.Expressions/ScoreFunctionValues.cs
@@ -1,12 +1,28 @@
-using System;
-using System.Diagnostics;
-using System.IO;
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Queries.Function.DocValues;
 using Lucene.Net.Search;
+using System;
+using System.Diagnostics;
 
 namespace Lucene.Net.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.
+     */
+
     /// <summary>
     /// A utility class to allow expressions to access the score as a
     /// <see cref="Lucene.Net.Queries.Function.FunctionValues">Lucene.Net.Queries.Function.FunctionValues

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/ScoreValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ScoreValueSource.cs b/src/Lucene.Net.Expressions/ScoreValueSource.cs
index 5a14e94..2b06093 100644
--- a/src/Lucene.Net.Expressions/ScoreValueSource.cs
+++ b/src/Lucene.Net.Expressions/ScoreValueSource.cs
@@ -1,23 +1,40 @@
-using System;
-using System.Collections;
 using Lucene.Net.Index;
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
+using System;
+using System.Collections;
 
 namespace Lucene.Net.Expressions
 {
-	/// <summary>
-	/// A
-	/// <see cref="Lucene.Net.Queries.Function.ValueSource">Lucene.Net.Queries.Function.ValueSource
-	/// 	</see>
-	/// which uses the
-	/// <see cref="Lucene.Net.Search.Scorer">Lucene.Net.Search.Scorer</see>
-	/// passed through
-	/// the context map by
-	/// <see cref="ExpressionComparer">ExpressionComparer</see>
-	/// .
-	/// </summary>
-	internal class ScoreValueSource : ValueSource
+    /*
+     * 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.
+     */
+
+    /// <summary>
+    /// A
+    /// <see cref="Lucene.Net.Queries.Function.ValueSource">Lucene.Net.Queries.Function.ValueSource
+    /// 	</see>
+    /// which uses the
+    /// <see cref="Lucene.Net.Search.Scorer">Lucene.Net.Search.Scorer</see>
+    /// passed through
+    /// the context map by
+    /// <see cref="ExpressionComparer">ExpressionComparer</see>
+    /// .
+    /// </summary>
+    internal class ScoreValueSource : ValueSource
 	{
 	    /// <summary>
 		/// <code>context</code> must contain a key "scorer" which is a

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fa4ab1b1/src/Lucene.Net.Expressions/SimpleBindings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/SimpleBindings.cs b/src/Lucene.Net.Expressions/SimpleBindings.cs
index 99e9bac..af06d6f 100644
--- a/src/Lucene.Net.Expressions/SimpleBindings.cs
+++ b/src/Lucene.Net.Expressions/SimpleBindings.cs
@@ -1,11 +1,28 @@
-using System;
-using System.Collections.Generic;
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Queries.Function.ValueSources;
 using Lucene.Net.Search;
+using System;
+using System.Collections.Generic;
 
 namespace Lucene.Net.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.
+     */
+
     /// <summary>
     /// Simple class that binds expression variable names to
     /// <see cref="Lucene.Net.Search.SortField">Lucene.Net.Search.SortField