lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [07/58] lucenenet git commit: WIP on QueryParsers.Flexible
Date Tue, 06 Dec 2016 15:11:42 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs
new file mode 100644
index 0000000..5a41c35
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs
@@ -0,0 +1,438 @@
+using Lucene.Net.QueryParsers.Flexible.Core.Messages;
+using Lucene.Net.QueryParsers.Flexible.Core.Parser;
+using Lucene.Net.QueryParsers.Flexible.Core.Util;
+using Lucene.Net.QueryParsers.Flexible.Messages;
+using Lucene.Net.Support;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
+{
+    /// <summary>
+    /// Implementation of {@link EscapeQuerySyntax} for the standard lucene
+    /// syntax.
+    /// </summary>
+    public class EscapeQuerySyntaxImpl : IEscapeQuerySyntax
+    {
+        private static readonly char[] wildcardChars = { '*', '?' };
+
+        private static readonly string[] escapableTermExtraFirstChars = { "+", "-", "@" };
+
+        private static readonly string[] escapableTermChars = { "\"", "<", ">", "=",
+            "!", "(", ")", "^", "[", "{", ":", "]", "}", "~", "/" };
+
+        // TODO: check what to do with these "*", "?", "\\"
+        private static readonly string[] escapableQuotedChars = { "\"" };
+        private static readonly string[] escapableWhiteChars = { " ", "\t", "\n", "\r",
+            "\f", "\b", "\u3000" };
+        private static readonly string[] escapableWordTokens = { "AND", "OR", "NOT",
+            "TO", "WITHIN", "SENTENCE", "PARAGRAPH", "INORDER" };
+
+        // LUCENENET specific overload for string
+        private static string EscapeChar(string str, CultureInfo locale)
+        {
+            if (str == null || str.Length == 0)
+                return str;
+
+            string buffer = str;
+
+            // regular escapable Char for terms
+            for (int i = 0; i < escapableTermChars.Length; i++)
+            {
+                buffer = ReplaceIgnoreCase(buffer, escapableTermChars[i].ToLower(locale),
+                    "\\", locale);
+            }
+
+            // First Character of a term as more escaping chars
+            for (int i = 0; i < escapableTermExtraFirstChars.Length; i++)
+            {
+                if (buffer[0] == escapableTermExtraFirstChars[i][0])
+                {
+                    buffer = "\\" + buffer[0]
+                        + buffer.Substring(1, buffer.Length - 1);
+                    break;
+                }
+            }
+
+            return buffer;
+        }
+
+        private static ICharSequence EscapeChar(ICharSequence str, CultureInfo locale)
+        {
+            if (str == null || str.Length == 0)
+                return str;
+
+            ICharSequence buffer = str;
+
+            // regular escapable Char for terms
+            for (int i = 0; i < escapableTermChars.Length; i++)
+            {
+                buffer = ReplaceIgnoreCase(buffer, escapableTermChars[i].ToLower(locale),
+                    "\\", locale);
+            }
+
+            // First Character of a term as more escaping chars
+            for (int i = 0; i < escapableTermExtraFirstChars.Length; i++)
+            {
+                if (buffer[0] == escapableTermExtraFirstChars[i][0])
+                {
+                    buffer = new StringCharSequenceWrapper("\\" + buffer[0]
+                        + buffer.SubSequence(1, buffer.Length).ToString());
+                    break;
+                }
+            }
+
+            return buffer;
+        }
+
+        // LUCENENET specific overload for string
+        private string EscapeQuoted(string str, CultureInfo locale)
+        {
+            if (str == null || str.Length == 0)
+                return str;
+
+            string buffer = str;
+
+            for (int i = 0; i < escapableQuotedChars.Length; i++)
+            {
+                buffer = ReplaceIgnoreCase(buffer, escapableTermChars[i].ToLower(locale),
+                    "\\", locale);
+            }
+            return buffer;
+        }
+
+        private ICharSequence EscapeQuoted(ICharSequence str, CultureInfo locale)
+        {
+            if (str == null || str.Length == 0)
+                return str;
+
+            ICharSequence buffer = str;
+
+            for (int i = 0; i < escapableQuotedChars.Length; i++)
+            {
+                buffer = ReplaceIgnoreCase(buffer, escapableTermChars[i].ToLower(locale),
+                    "\\", locale);
+            }
+            return buffer;
+        }
+
+        // LUCENENET specific overload for string
+        private static string EscapeTerm(string term, CultureInfo locale)
+        {
+            if (term == null)
+                return term;
+
+            // Escape single Chars
+            term = EscapeChar(term, locale);
+            term = EscapeWhiteChar(term, locale);
+
+            // Escape Parser Words
+            for (int i = 0; i < escapableWordTokens.Length; i++)
+            {
+                if (escapableWordTokens[i].Equals(term.ToString(), StringComparison.OrdinalIgnoreCase))
+                    return "\\" + term;
+            }
+            return term;
+        }
+
+        private static ICharSequence EscapeTerm(ICharSequence term, CultureInfo locale)
+        {
+            if (term == null)
+                return term;
+
+            // Escape single Chars
+            term = EscapeChar(term, locale);
+            term = EscapeWhiteChar(term, locale);
+
+            // Escape Parser Words
+            for (int i = 0; i < escapableWordTokens.Length; i++)
+            {
+                if (escapableWordTokens[i].Equals(term.ToString(), StringComparison.OrdinalIgnoreCase))
+                    return new StringCharSequenceWrapper("\\" + term);
+            }
+            return term;
+        }
+
+        /**
+         * replace with ignore case
+         * 
+         * @param string
+         *          string to get replaced
+         * @param sequence1
+         *          the old character sequence in lowercase
+         * @param escapeChar
+         *          the new character to prefix sequence1 in return string.
+         * @return the new String
+         */
+        // LUCENENET specific overload for string
+        private static string ReplaceIgnoreCase(string @string,
+            string sequence1, string escapeChar, CultureInfo locale)
+        {
+            if (escapeChar == null || sequence1 == null || @string == null)
+                throw new NullReferenceException(); // LUCNENET TODO: ArgumentException...
+
+            // empty string case
+            int count = @string.Length;
+            int sequence1Length = sequence1.Length;
+            if (sequence1Length == 0)
+            {
+                StringBuilder result2 = new StringBuilder((count + 1)
+                    * escapeChar.Length);
+                result2.Append(escapeChar);
+                for (int i = 0; i < count; i++)
+                {
+                    result2.Append(@string[i]);
+                    result2.Append(escapeChar);
+                }
+                return result2.ToString();
+            }
+
+            // normal case
+            StringBuilder result = new StringBuilder();
+            char first = sequence1[0];
+            int start = 0, copyStart = 0, firstIndex;
+            while (start < count)
+            {
+                if ((firstIndex = @string.ToString().ToLower(locale).IndexOf(first,
+                    start)) == -1)
+                    break;
+                bool found = true;
+                if (sequence1.Length > 1)
+                {
+                    if (firstIndex + sequence1Length > count)
+                        break;
+                    for (int i = 1; i < sequence1Length; i++)
+                    {
+                        if (@string.ToString().ToLower(locale)[firstIndex + i] != sequence1[i])
+                        {
+                            found = false;
+                            break;
+                        }
+                    }
+                }
+                if (found)
+                {
+                    result.Append(@string.ToString().Substring(copyStart, firstIndex - copyStart));
+                    result.Append(escapeChar);
+                    result.Append(@string.ToString().Substring(firstIndex,
+                        (firstIndex + sequence1Length) - firstIndex));
+                    copyStart = start = firstIndex + sequence1Length;
+                }
+                else
+                {
+                    start = firstIndex + 1;
+                }
+            }
+            if (result.Length == 0 && copyStart == 0)
+                return @string;
+            result.Append(@string.ToString().Substring(copyStart));
+            return result.ToString();
+        }
+
+        private static ICharSequence ReplaceIgnoreCase(ICharSequence @string,
+           string sequence1, string escapeChar, CultureInfo locale)
+        {
+            if (escapeChar == null || sequence1 == null || @string == null)
+                throw new NullReferenceException(); // LUCNENET TODO: ArgumentException...
+
+            return new StringCharSequenceWrapper(
+                ReplaceIgnoreCase(@string.ToString(), sequence1, escapeChar, locale));
+        }
+
+        /**
+         * escape all tokens that are part of the parser syntax on a given string
+         * 
+         * @param str
+         *          string to get replaced
+         * @param locale
+         *          locale to be used when performing string compares
+         * @return the new String
+         */
+        // LUCENENET specific overload for string
+        private static string EscapeWhiteChar(string str,
+            CultureInfo locale)
+        {
+            if (str == null || str.Length == 0)
+                return str;
+
+            string buffer = str;
+
+            for (int i = 0; i < escapableWhiteChars.Length; i++)
+            {
+                buffer = ReplaceIgnoreCase(buffer, escapableWhiteChars[i].ToLower(locale),
+                    "\\", locale);
+            }
+            return buffer;
+        }
+
+        /**
+         * escape all tokens that are part of the parser syntax on a given string
+         * 
+         * @param str
+         *          string to get replaced
+         * @param locale
+         *          locale to be used when performing string compares
+         * @return the new String
+         */
+        private static ICharSequence EscapeWhiteChar(ICharSequence str,
+            CultureInfo locale)
+        {
+            if (str == null || str.Length == 0)
+                return str;
+
+            ICharSequence buffer = str;
+
+            for (int i = 0; i < escapableWhiteChars.Length; i++)
+            {
+                buffer = ReplaceIgnoreCase(buffer, escapableWhiteChars[i].ToLower(locale),
+                    "\\", locale);
+            }
+            return buffer;
+        }
+
+        // LUCENENET TODO: Add overload for string
+        public virtual ICharSequence Escape(ICharSequence text, CultureInfo locale, EscapeQuerySyntax.Type type)  
+        {
+            if (text == null || text.Length == 0)
+                return text;
+
+            // escape wildcards and the escape char (this has to be perform before
+            // anything else)
+            // since we need to preserve the UnescapedCharSequence and escape the
+            // original escape chars
+            if (text is UnescapedCharSequence)
+            {
+                text = ((UnescapedCharSequence)text).ToStringEscaped(wildcardChars);
+            }
+            else
+            {
+                text = new UnescapedCharSequence(text).ToStringEscaped(wildcardChars);
+            }
+
+            if (type == EscapeQuerySyntax.Type.STRING)
+            {
+                return EscapeQuoted(text, locale);
+            }
+            else
+            {
+                return EscapeTerm(text, locale);
+            }
+        }
+
+        /**
+         * Returns a String where the escape char has been removed, or kept only once
+         * if there was a double escape.
+         * 
+         * Supports escaped unicode characters, e. g. translates <code>A</code> to
+         * <code>A</code>.
+         * 
+         */
+        public static UnescapedCharSequence DiscardEscapeChar(string input)
+        {
+            // Create char array to hold unescaped char sequence
+            char[] output = new char[input.Length];
+            bool[] wasEscaped = new bool[input.Length];
+
+            // The length of the output can be less than the input
+            // due to discarded escape chars. This variable holds
+            // the actual length of the output
+            int length = 0;
+
+            // We remember whether the last processed character was
+            // an escape character
+            bool lastCharWasEscapeChar = false;
+
+            // The multiplier the current unicode digit must be multiplied with.
+            // E. g. the first digit must be multiplied with 16^3, the second with
+            // 16^2...
+            int codePointMultiplier = 0;
+
+            // Used to calculate the codepoint of the escaped unicode character
+            int codePoint = 0;
+
+            for (int i = 0; i < input.Length; i++)
+            {
+                char curChar = input[i];
+                if (codePointMultiplier > 0)
+                {
+                    codePoint += HexToInt(curChar) * codePointMultiplier;
+                    codePointMultiplier = (int)((uint)codePointMultiplier >> 4);
+                    if (codePointMultiplier == 0)
+                    {
+                        output[length++] = (char)codePoint;
+                        codePoint = 0;
+                    }
+                }
+                else if (lastCharWasEscapeChar)
+                {
+                    if (curChar == 'u')
+                    {
+                        // found an escaped unicode character
+                        codePointMultiplier = 16 * 16 * 16;
+                    }
+                    else
+                    {
+                        // this character was escaped
+                        output[length] = curChar;
+                        wasEscaped[length] = true;
+                        length++;
+                    }
+                    lastCharWasEscapeChar = false;
+                }
+                else
+                {
+                    if (curChar == '\\')
+                    {
+                        lastCharWasEscapeChar = true;
+                    }
+                    else
+                    {
+                        output[length] = curChar;
+                        length++;
+                    }
+                }
+            }
+
+            if (codePointMultiplier > 0)
+            {
+                throw new ParseException(new MessageImpl(
+                    QueryParserMessages.INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION));
+            }
+
+            if (lastCharWasEscapeChar)
+            {
+                throw new ParseException(new MessageImpl(
+                    QueryParserMessages.INVALID_SYNTAX_ESCAPE_CHARACTER));
+            }
+
+            return new UnescapedCharSequence(output, wasEscaped, 0, length);
+        }
+
+        /** Returns the numeric value of the hexadecimal character */
+        private static int HexToInt(char c)
+        {
+            if ('0' <= c && c <= '9')
+            {
+                return c - '0';
+            }
+            else if ('a' <= c && c <= 'f')
+            {
+                return c - 'a' + 10;
+            }
+            else if ('A' <= c && c <= 'F')
+            {
+                return c - 'A' + 10;
+            }
+            else
+            {
+                throw new ParseException(new MessageImpl(
+                    QueryParserMessages.INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE, c));
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/FastCharStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/FastCharStream.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/FastCharStream.cs
new file mode 100644
index 0000000..d384076
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/FastCharStream.cs
@@ -0,0 +1,140 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
+{
+    /// <summary>
+    /// An efficient implementation of JavaCC's CharStream interface.  <p>Note that
+    /// this does not do line-number counting, but instead keeps track of the
+    /// character position of the token in the input, as required by Lucene's {@link
+    /// org.apache.lucene.analysis.Token} API. 
+    /// </summary>
+    public sealed class FastCharStream : ICharStream
+    {
+        char[] buffer = null;
+
+        int bufferLength = 0;          // end of valid chars
+        int bufferPosition = 0;        // next char to read
+
+        int tokenStart = 0;          // offset in buffer
+        int bufferStart = 0;          // position in file of buffer
+
+        TextReader input;            // source of chars
+
+        /** Constructs from a Reader. */
+        public FastCharStream(TextReader r)
+        {
+            input = r;
+        }
+
+
+        public char ReadChar()
+        {
+            if (bufferPosition >= bufferLength)
+                Refill();
+            return buffer[bufferPosition++];
+        }
+
+        private void Refill()
+        {
+            int newPosition = bufferLength - tokenStart;
+
+            if (tokenStart == 0)
+            {        // token won't fit in buffer
+                if (buffer == null)
+                {        // first time: alloc buffer
+                    buffer = new char[2048];
+                }
+                else if (bufferLength == buffer.Length)
+                { // grow buffer
+                    char[] newBuffer = new char[buffer.Length * 2];
+                    System.Array.Copy(buffer, 0, newBuffer, 0, bufferLength);
+                    buffer = newBuffer;
+                }
+            }
+            else
+            {            // shift token to front
+                System.Array.Copy(buffer, tokenStart, buffer, 0, newPosition);
+            }
+
+            bufferLength = newPosition;        // update state
+            bufferPosition = newPosition;
+            bufferStart += tokenStart;
+            tokenStart = 0;
+
+            int charsRead =          // fill space in buffer
+              input.Read(buffer, newPosition, buffer.Length - newPosition);
+            if (charsRead <= 0)
+                throw new IOException("read past eof");
+            else
+                bufferLength += charsRead;
+        }
+
+        public char BeginToken()
+        {
+            tokenStart = bufferPosition;
+            return ReadChar();
+        }
+
+
+        public void BackUp(int amount)
+        {
+            bufferPosition -= amount;
+        }
+
+        public string GetImage()
+        {
+            return new string(buffer, tokenStart, bufferPosition - tokenStart);
+        }
+
+
+        public char[] GetSuffix(int len)
+        {
+            char[] value = new char[len];
+            System.Array.Copy(buffer, bufferPosition - len, value, 0, len);
+            return value;
+        }
+
+        public void Done()
+        {
+            try
+            {
+                input.Dispose();
+            }
+            catch (IOException e)
+            {
+            }
+        }
+
+        public int GetColumn()
+        {
+            return bufferStart + bufferPosition;
+        }
+        public int GetLine()
+        {
+            return 1;
+        }
+        public int GetEndColumn()
+        {
+            return bufferStart + bufferPosition;
+        }
+        public int GetEndLine()
+        {
+            return 1;
+        }
+
+        public int GetBeginColumn()
+        {
+            return bufferStart + tokenStart;
+        }
+
+        public int GetBeginLine()
+        {
+            return 1;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs
new file mode 100644
index 0000000..9b0ad90
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/ParseException.cs
@@ -0,0 +1,212 @@
+using Lucene.Net.QueryParsers.Flexible.Core;
+using Lucene.Net.QueryParsers.Flexible.Core.Messages;
+using Lucene.Net.QueryParsers.Flexible.Messages;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
+{
+    /// <summary>
+    /// This exception is thrown when parse errors are encountered.
+    /// You can explicitly create objects of this exception type by
+    /// calling the method generateParseException in the generated
+    /// parser.
+    /// 
+    /// You can modify this class to customize your error reporting
+    /// mechanisms so long as you retain the public fields.
+    /// </summary>
+    public class ParseException : QueryNodeParseException
+    {
+        /**
+   * The version identifier for this Serializable class.
+   * Increment only if the <i>serialized</i> form of the
+   * class changes.
+   */
+        private static readonly long serialVersionUID = 1L;
+
+        /**
+         * This constructor is used by the method "generateParseException"
+         * in the generated parser.  Calling this constructor generates
+         * a new object of this type with the fields "currentToken",
+         * "expectedTokenSequences", and "tokenImage" set.
+         */
+        public ParseException(Token currentTokenVal,
+           int[][] expectedTokenSequencesVal, string[] tokenImageVal)
+            : base(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, Initialize(
+            currentTokenVal, expectedTokenSequencesVal, tokenImageVal)))
+        {
+            this.currentToken = currentTokenVal;
+            this.expectedTokenSequences = expectedTokenSequencesVal;
+            this.tokenImage = tokenImageVal;
+        }
+
+        /**
+         * The following constructors are for use by you for whatever
+         * purpose you can think of.  Constructing the exception in this
+         * manner makes the exception behave in the normal way - i.e., as
+         * documented in the class "Throwable".  The fields "errorToken",
+         * "expectedTokenSequences", and "tokenImage" do not contain
+         * relevant information.  The JavaCC generated code does not use
+         * these constructors.
+         */
+
+        public ParseException()
+            : base(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error"))
+        {
+        }
+
+        /** Constructor with message. */
+        public ParseException(IMessage message)
+            : base(message)
+        {
+        }
+
+
+        /**
+         * This is the last token that has been consumed successfully.  If
+         * this object has been created due to a parse error, the token
+         * followng this token will (therefore) be the first error token.
+         */
+        public Token currentToken;
+
+        /**
+         * Each entry in this array is an array of integers.  Each array
+         * of integers represents a sequence of tokens (by their ordinal
+         * values) that is expected at this point of the parse.
+         */
+        public int[][] expectedTokenSequences;
+
+        /**
+         * This is a reference to the "tokenImage" array of the generated
+         * parser within which the parse error occurred.  This array is
+         * defined in the generated ...Constants interface.
+         */
+        public string[] tokenImage;
+
+        /**
+         * It uses "currentToken" and "expectedTokenSequences" to generate a parse
+         * error message and returns it.  If this object has been created
+         * due to a parse error, and you do not catch it (it gets thrown
+         * from the parser) the correct error message
+         * gets displayed.
+         */
+        private static string Initialize(Token currentToken,
+                                 int[][] expectedTokenSequences,
+                                 string[] tokenImage)
+        {
+            //String eol = System.getProperty("line.separator", "\n");
+            string eol = Environment.NewLine;
+            StringBuilder expected = new StringBuilder();
+            int maxSize = 0;
+            for (int i = 0; i < expectedTokenSequences.Length; i++)
+            {
+                if (maxSize < expectedTokenSequences[i].Length)
+                {
+                    maxSize = expectedTokenSequences[i].Length;
+                }
+                for (int j = 0; j < expectedTokenSequences[i].Length; j++)
+                {
+                    expected.Append(tokenImage[expectedTokenSequences[i][j]]).Append(' ');
+                }
+                if (expectedTokenSequences[i][expectedTokenSequences[i].Length - 1] != 0)
+                {
+                    expected.Append("...");
+                }
+                expected.Append(eol).Append("    ");
+            }
+            string retval = "Encountered \"";
+            Token tok = currentToken.next;
+            for (int i = 0; i < maxSize; i++)
+            {
+                if (i != 0) retval += " ";
+                if (tok.kind == 0)
+                {
+                    retval += tokenImage[0];
+                    break;
+                }
+                retval += " " + tokenImage[tok.kind];
+                retval += " \"";
+                retval += Add_Escapes(tok.image);
+                retval += " \"";
+                tok = tok.next;
+            }
+            retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
+            retval += "." + eol;
+            if (expectedTokenSequences.Length == 1)
+            {
+                retval += "Was expecting:" + eol + "    ";
+            }
+            else
+            {
+                retval += "Was expecting one of:" + eol + "    ";
+            }
+            retval += expected.ToString();
+            return retval;
+        }
+
+        /**
+         * The end of line string for this machine.
+         */
+        //protected String eol = System.getProperty("line.separator", "\n");
+        protected string eol = Environment.NewLine;
+
+        /**
+         * Used to convert raw characters to their escaped version
+         * when these raw version cannot be used as part of an ASCII
+         * string literal.
+         */
+        static string Add_Escapes(string str)
+        {
+            StringBuilder retval = new StringBuilder();
+            char ch;
+            for (int i = 0; i < str.Length; i++)
+            {
+                switch (str[i])
+                {
+                    case (char)0:
+                        continue;
+                    case '\b':
+                        retval.Append("\\b");
+                        continue;
+                    case '\t':
+                        retval.Append("\\t");
+                        continue;
+                    case '\n':
+                        retval.Append("\\n");
+                        continue;
+                    case '\f':
+                        retval.Append("\\f");
+                        continue;
+                    case '\r':
+                        retval.Append("\\r");
+                        continue;
+                    case '\"':
+                        retval.Append("\\\"");
+                        continue;
+                    case '\'':
+                        retval.Append("\\\'");
+                        continue;
+                    case '\\':
+                        retval.Append("\\\\");
+                        continue;
+                    default:
+                        if ((ch = str[i]) < 0x20 || ch > 0x7e)
+                        {
+                            //string s = "0000" + Integer.toString(ch, 16);
+                            string s = "0000" + Convert.ToString(ch, 16);
+                            retval.Append("\\u" + s.Substring(s.Length - 4, s.Length - (s.Length - 4)));
+                        }
+                        else
+                        {
+                            retval.Append(ch);
+                        }
+                        continue;
+                }
+            }
+            return retval.ToString();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParser.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParser.cs
new file mode 100644
index 0000000..6324ca1
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParser.cs
@@ -0,0 +1,1250 @@
+using Lucene.Net.QueryParsers.Flexible.Core;
+using Lucene.Net.QueryParsers.Flexible.Core.Messages;
+using Lucene.Net.QueryParsers.Flexible.Core.Nodes;
+using Lucene.Net.QueryParsers.Flexible.Core.Parser;
+using Lucene.Net.QueryParsers.Flexible.Messages;
+using Lucene.Net.QueryParsers.Flexible.Standard.Nodes;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
+{
+    /// <summary>
+    /// Parser for the standard Lucene syntax
+    /// </summary>
+    public class StandardSyntaxParser : ISyntaxParser /*, StandardSyntaxParserConstants*/
+    {
+        private static readonly int CONJ_NONE = 0;
+        private static readonly int CONJ_AND = 2;
+        private static readonly int CONJ_OR = 2;
+
+
+        // syntax parser constructor
+        public StandardSyntaxParser()
+            : this(new FastCharStream(new StringReader("")))
+        {
+        }
+        /** Parses a query string, returning a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}.
+        *  @param query  the query string to be parsed.
+        *  @throws ParseException if the parsing fails
+        */
+        public IQueryNode Parse(string query, string field)
+        {
+            ReInit(new FastCharStream(new StringReader(query)));
+            try
+            {
+                // TopLevelQuery is a Query followed by the end-of-input (EOF)
+                IQueryNode querynode = TopLevelQuery(field);
+                return querynode;
+            }
+            catch (ParseException tme)
+            {
+                tme.SetQuery(query);
+                throw tme;
+            }
+            catch (Exception tme)
+            {
+                IMessage message = new MessageImpl(QueryParserMessages.INVALID_SYNTAX_CANNOT_PARSE, query, tme.Message);
+                QueryNodeParseException e = new QueryNodeParseException(tme);
+                e.SetQuery(query);
+                e.SetNonLocalizedMessage(message);
+                throw e;
+            }
+        }
+
+        // *   Query  ::= ( Clause )*
+        // *   Clause ::= ["+", "-"] [<TERM> ":"] ( <TERM> | "(" Query ")" )
+        public int Conjunction()
+        {
+            int ret = CONJ_NONE;
+            switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+            {
+                case RegexpToken.AND:
+                case RegexpToken.OR:
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.AND:
+                            jj_consume_token(RegexpToken.AND);
+                            ret = CONJ_AND;
+                            break;
+                        case RegexpToken.OR:
+                            jj_consume_token(RegexpToken.OR);
+                            ret = CONJ_OR;
+                            break;
+                        default:
+                            jj_la1[0] = jj_gen;
+                            jj_consume_token(-1);
+                            throw new ParseException();
+                    }
+                    break;
+                default:
+                    jj_la1[1] = jj_gen;
+                    break;
+            }
+            { if (true) return ret; }
+            throw new Exception("Missing return statement in function");
+        }
+
+        public Modifier Modifiers()
+        {
+            Modifier ret = Modifier.MOD_NONE;
+            switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+            {
+                case RegexpToken.NOT:
+                case RegexpToken.PLUS:
+                case RegexpToken.MINUS:
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.PLUS:
+                            jj_consume_token(RegexpToken.PLUS);
+                            ret = Modifier.MOD_REQ;
+                            break;
+                        case RegexpToken.MINUS:
+                            jj_consume_token(RegexpToken.MINUS);
+                            ret = Modifier.MOD_NOT;
+                            break;
+                        case RegexpToken.NOT:
+                            jj_consume_token(RegexpToken.NOT);
+                            ret = Modifier.MOD_NOT;
+                            break;
+                        default:
+                            jj_la1[2] = jj_gen;
+                            jj_consume_token(-1);
+                            throw new ParseException();
+                    }
+                    break;
+                default:
+                    jj_la1[3] = jj_gen;
+                    break;
+            }
+            { if (true) return ret; }
+            throw new Exception("Missing return statement in function");
+        }
+
+        // This makes sure that there is no garbage after the query string
+        public IQueryNode TopLevelQuery(string field)
+        {
+            IQueryNode q;
+            q = Query(field);
+            jj_consume_token(0);
+            { if (true) return q; }
+            throw new Exception("Missing return statement in function");
+        }
+
+        // These changes were made to introduce operator precedence:
+        // - Clause() now returns a QueryNode. 
+        // - The modifiers are consumed by Clause() and returned as part of the QueryNode Object
+        // - Query does not consume conjunctions (AND, OR) anymore. 
+        // - This is now done by two new non-terminals: ConjClause and DisjClause
+        // The parse tree looks similar to this:
+        //       Query ::= DisjQuery ( DisjQuery )*
+        //   DisjQuery ::= ConjQuery ( OR ConjQuery )* 
+        //   ConjQuery ::= Clause ( AND Clause )*
+        //      Clause ::= [ Modifier ] ... 
+        public IQueryNode Query(string field)
+        {
+            List<IQueryNode> clauses = null;
+            IQueryNode c, first = null;
+            first = DisjQuery(field);
+            
+            while (true)
+            {
+                switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                {
+                    case RegexpToken.NOT:
+                    case RegexpToken.PLUS:
+                    case RegexpToken.MINUS:
+                    case RegexpToken.LPAREN:
+                    case RegexpToken.QUOTED:
+                    case RegexpToken.TERM:
+                    case RegexpToken.REGEXPTERM:
+                    case RegexpToken.RANGEIN_START:
+                    case RegexpToken.RANGEEX_START:
+                    case RegexpToken.NUMBER:
+                        ;
+                        break;
+                    default:
+                        jj_la1[4] = jj_gen;
+                        goto label_1_break;
+                }
+                c = DisjQuery(field);
+                if (clauses == null)
+                {
+                    clauses = new List<IQueryNode>();
+                    clauses.Add(first);
+                }
+                clauses.Add(c);
+            }
+            label_1_break:
+            if (clauses != null)
+            {
+                { if (true) return new BooleanQueryNode(clauses); }
+            }
+            else
+            {
+                { if (true) return first; }
+            }
+            throw new Exception("Missing return statement in function");
+        }
+
+        public IQueryNode DisjQuery(string field)
+        {
+            IQueryNode first, c;
+            List<IQueryNode> clauses = null;
+            first = ConjQuery(field);
+            
+            while (true)
+            {
+                switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                {
+                    case RegexpToken.OR:
+                        ;
+                        break;
+                    default:
+                        jj_la1[5] = jj_gen;
+                        goto label_2_break;
+                }
+                jj_consume_token(RegexpToken.OR);
+                c = ConjQuery(field);
+                if (clauses == null)
+                {
+                    clauses = new List<IQueryNode>();
+                    clauses.Add(first);
+                }
+                clauses.Add(c);
+            }
+            label_2_break:
+            if (clauses != null)
+            {
+                { if (true) return new OrQueryNode(clauses); }
+            }
+            else
+            {
+                { if (true) return first; }
+            }
+            throw new Exception("Missing return statement in function");
+        }
+
+        public IQueryNode ConjQuery(string field)
+        {
+            IQueryNode first, c;
+            List<IQueryNode> clauses = null;
+            first = ModClause(field);
+            
+            while (true)
+            {
+                switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                {
+                    case RegexpToken.AND:
+                        ;
+                        break;
+                    default:
+                        jj_la1[6] = jj_gen;
+                        goto label_3_break;
+                }
+                jj_consume_token(RegexpToken.AND);
+                c = ModClause(field);
+                if (clauses == null)
+                {
+                    clauses = new List<IQueryNode>();
+                    clauses.Add(first);
+                }
+                clauses.Add(c);
+            }
+            label_3_break:
+            if (clauses != null)
+            {
+                { if (true) return new AndQueryNode(clauses); }
+            }
+            else
+            {
+                { if (true) return first; }
+            }
+            throw new Exception("Missing return statement in function");
+        }
+
+        // QueryNode Query(CharSequence field) :
+        // {
+        // List clauses = new ArrayList();
+        //   List modifiers = new ArrayList();
+        //   QueryNode q, firstQuery=null;
+        //   ModifierQueryNode.Modifier mods;
+        //   int conj;
+        // }
+        // {
+        //   mods=Modifiers() q=Clause(field)
+        //   {
+        //     if (mods == ModifierQueryNode.Modifier.MOD_NONE) firstQuery=q;
+        //     
+        //     // do not create modifier nodes with MOD_NONE
+        //      if (mods != ModifierQueryNode.Modifier.MOD_NONE) {
+        //        q = new ModifierQueryNode(q, mods);
+        //      }
+        //      clauses.add(q);
+        //   }
+        //   (
+        //     conj=Conjunction() mods=Modifiers() q=Clause(field)
+        //     { 
+        //       // do not create modifier nodes with MOD_NONE
+        //        if (mods != ModifierQueryNode.Modifier.MOD_NONE) {
+        //          q = new ModifierQueryNode(q, mods);
+        //        }
+        //        clauses.add(q);
+        //        //TODO: figure out what to do with AND and ORs
+        //   }
+        //   )*
+        //     {
+        //      if (clauses.size() == 1 && firstQuery != null)
+        //         return firstQuery;
+        //       else {
+        //       return new BooleanQueryNode(clauses);
+        //       }
+        //     }
+        // }
+        public IQueryNode ModClause(string field)
+        {
+            IQueryNode q;
+            Modifier mods;
+            mods = Modifiers();
+            q = Clause(field);
+            if (mods != Modifier.MOD_NONE)
+            {
+                q = new ModifierQueryNode(q, mods);
+            }
+            { if (true) return q; }
+            throw new Exception("Missing return statement in function");
+        }
+
+        public IQueryNode Clause(string field)
+        {
+            IQueryNode q;
+            Token fieldToken = null, boost = null, @operator = null, term = null;
+            FieldQueryNode qLower, qUpper;
+            bool lowerInclusive, upperInclusive;
+
+            bool group = false;
+            if (jj_2_2(3))
+            {
+                fieldToken = jj_consume_token(RegexpToken.TERM);
+                switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                {
+                    case RegexpToken.OP_COLON:
+                    case RegexpToken.OP_EQUAL:
+                        switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                        {
+                            case RegexpToken.OP_COLON:
+                                jj_consume_token(RegexpToken.OP_COLON);
+                                break;
+                            case RegexpToken.OP_EQUAL:
+                                jj_consume_token(RegexpToken.OP_EQUAL);
+                                break;
+                            default:
+                                jj_la1[7] = jj_gen;
+                                jj_consume_token(-1);
+                                throw new ParseException();
+                        }
+                        field = EscapeQuerySyntaxImpl.DiscardEscapeChar(fieldToken.image).ToString();
+                        q = Term(field);
+                        break;
+                    case RegexpToken.OP_LESSTHAN:
+                    case RegexpToken.OP_LESSTHANEQ:
+                    case RegexpToken.OP_MORETHAN:
+                    case RegexpToken.OP_MORETHANEQ:
+                        switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                        {
+                            case RegexpToken.OP_LESSTHAN:
+                                @operator = jj_consume_token(RegexpToken.OP_LESSTHAN);
+                                break;
+                            case RegexpToken.OP_LESSTHANEQ:
+                                @operator = jj_consume_token(RegexpToken.OP_LESSTHANEQ);
+                                break;
+                            case RegexpToken.OP_MORETHAN:
+                                @operator = jj_consume_token(RegexpToken.OP_MORETHAN);
+                                break;
+                            case RegexpToken.OP_MORETHANEQ:
+                                @operator = jj_consume_token(RegexpToken.OP_MORETHANEQ);
+                                break;
+                            default:
+                                jj_la1[8] = jj_gen;
+                                jj_consume_token(-1);
+                                throw new ParseException();
+                        }
+                        field = EscapeQuerySyntaxImpl.DiscardEscapeChar(fieldToken.image).ToString();
+                        switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                        {
+                            case RegexpToken.TERM:
+                                term = jj_consume_token(RegexpToken.TERM);
+                                break;
+                            case RegexpToken.QUOTED:
+                                term = jj_consume_token(RegexpToken.QUOTED);
+                                break;
+                            case RegexpToken.NUMBER:
+                                term = jj_consume_token(RegexpToken.NUMBER);
+                                break;
+                            default:
+                                jj_la1[9] = jj_gen;
+                                jj_consume_token(-1);
+                                throw new ParseException();
+                        }
+                        if (term.kind == RegexpToken.QUOTED)
+                        {
+                            term.image = term.image.Substring(1, (term.image.Length - 1) - 1);
+                        }
+                        switch (@operator.kind)
+                        {
+                            case RegexpToken.OP_LESSTHAN:
+                                lowerInclusive = true;
+                                upperInclusive = false;
+
+                                qLower = new FieldQueryNode(field,
+                                                           "*", term.beginColumn, term.endColumn);
+                                qUpper = new FieldQueryNode(field,
+                                                     EscapeQuerySyntaxImpl.DiscardEscapeChar(term.image), term.beginColumn, term.endColumn);
+
+                                break;
+                            case RegexpToken.OP_LESSTHANEQ:
+                                lowerInclusive = true;
+                                upperInclusive = true;
+
+                                qLower = new FieldQueryNode(field,
+                                                         "*", term.beginColumn, term.endColumn);
+                                qUpper = new FieldQueryNode(field,
+                                                         EscapeQuerySyntaxImpl.DiscardEscapeChar(term.image), term.beginColumn, term.endColumn);
+                                break;
+                            case RegexpToken.OP_MORETHAN:
+                                lowerInclusive = false;
+                                upperInclusive = true;
+
+                                qLower = new FieldQueryNode(field,
+                                                         EscapeQuerySyntaxImpl.DiscardEscapeChar(term.image), term.beginColumn, term.endColumn);
+                                qUpper = new FieldQueryNode(field,
+                                                         "*", term.beginColumn, term.endColumn);
+                                break;
+                            case RegexpToken.OP_MORETHANEQ:
+                                lowerInclusive = true;
+                                upperInclusive = true;
+
+                                qLower = new FieldQueryNode(field,
+                                                         EscapeQuerySyntaxImpl.DiscardEscapeChar(term.image), term.beginColumn, term.endColumn);
+                                qUpper = new FieldQueryNode(field,
+                                                         "*", term.beginColumn, term.endColumn);
+                                break;
+                            default:
+                                { if (true) throw new Exception("Unhandled case: operator=" + @operator.ToString()); }
+                        }
+                        q = new TermRangeQueryNode(qLower, qUpper, lowerInclusive, upperInclusive);
+                        break;
+                    default:
+                        jj_la1[10] = jj_gen;
+                        jj_consume_token(-1);
+                        throw new ParseException();
+                }
+            }
+            else
+            {
+                switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                {
+                    case RegexpToken.LPAREN:
+                    case RegexpToken.QUOTED:
+                    case RegexpToken.TERM:
+                    case RegexpToken.REGEXPTERM:
+                    case RegexpToken.RANGEIN_START:
+                    case RegexpToken.RANGEEX_START:
+                    case RegexpToken.NUMBER:
+                        if (jj_2_1(2))
+                        {
+                            fieldToken = jj_consume_token(RegexpToken.TERM);
+                            switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                            {
+                                case RegexpToken.OP_COLON:
+                                    jj_consume_token(RegexpToken.OP_COLON);
+                                    break;
+                                case RegexpToken.OP_EQUAL:
+                                    jj_consume_token(RegexpToken.OP_EQUAL);
+                                    break;
+                                default:
+                                    jj_la1[11] = jj_gen;
+                                    jj_consume_token(-1);
+                                    throw new ParseException();
+                            }
+                            field = EscapeQuerySyntaxImpl.DiscardEscapeChar(fieldToken.image).ToString();
+                        }
+                        else
+                        {
+                            ;
+                        }
+                        switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                        {
+                            case RegexpToken.QUOTED:
+                            case RegexpToken.TERM:
+                            case RegexpToken.REGEXPTERM:
+                            case RegexpToken.RANGEIN_START:
+                            case RegexpToken.RANGEEX_START:
+                            case RegexpToken.NUMBER:
+                                q = Term(field);
+                                break;
+                            case RegexpToken.LPAREN:
+                                jj_consume_token(RegexpToken.LPAREN);
+                                q = Query(field);
+                                jj_consume_token(RegexpToken.RPAREN);
+                                switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                                {
+                                    case RegexpToken.CARAT:
+                                        jj_consume_token(RegexpToken.CARAT);
+                                        boost = jj_consume_token(RegexpToken.NUMBER);
+                                        break;
+                                    default:
+                                        jj_la1[12] = jj_gen;
+                                        break;
+                                }
+                                group = true;
+                                break;
+                            default:
+                                jj_la1[13] = jj_gen;
+                                jj_consume_token(-1);
+                                throw new ParseException();
+                        }
+                        break;
+                    default:
+                        jj_la1[14] = jj_gen;
+                        jj_consume_token(-1);
+                        throw new ParseException();
+                }
+            }
+            if (boost != null)
+            {
+                float f = (float)1.0;
+                try
+                {
+                    f = Convert.ToSingle(boost.image, CultureInfo.InvariantCulture);
+                    // avoid boosting null queries, such as those caused by stop words
+                    if (q != null)
+                    {
+                        q = new BoostQueryNode(q, f);
+                    }
+                }
+                catch (Exception ignored)
+                {
+                    /* Should this be handled somehow? (defaults to "no boost", if
+                         * boost number is invalid)
+                         */
+                }
+            }
+            if (group) { q = new GroupQueryNode(q); }
+            { if (true) return q; }
+            throw new Exception("Missing return statement in function");
+        }
+
+        public IQueryNode Term(string field)
+        {
+            Token term, boost = null, fuzzySlop = null, goop1, goop2;
+            bool fuzzy = false;
+            bool regexp = false;
+            bool startInc = false;
+            bool endInc = false;
+            IQueryNode q = null;
+            FieldQueryNode qLower, qUpper;
+            float defaultMinSimilarity = Search.FuzzyQuery.DefaultMinSimilarity;
+            switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+            {
+                case RegexpToken.TERM:
+                case RegexpToken.REGEXPTERM:
+                case RegexpToken.NUMBER:
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.TERM:
+                            term = jj_consume_token(RegexpToken.TERM);
+                            q = new FieldQueryNode(field, EscapeQuerySyntaxImpl.DiscardEscapeChar(term.image), term.beginColumn, term.endColumn);
+                            break;
+                        case RegexpToken.REGEXPTERM:
+                            term = jj_consume_token(RegexpToken.REGEXPTERM);
+                            regexp = true;
+                            break;
+                        case RegexpToken.NUMBER:
+                            term = jj_consume_token(RegexpToken.NUMBER);
+                            break;
+                        default:
+                            jj_la1[15] = jj_gen;
+                            jj_consume_token(-1);
+                            throw new ParseException();
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.FUZZY_SLOP:
+                            fuzzySlop = jj_consume_token(RegexpToken.FUZZY_SLOP);
+                            fuzzy = true;
+                            break;
+                        default:
+                            jj_la1[16] = jj_gen;
+                            break;
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.CARAT:
+                            jj_consume_token(RegexpToken.CARAT);
+                            boost = jj_consume_token(RegexpToken.NUMBER);
+                            switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                            {
+                                case RegexpToken.FUZZY_SLOP:
+                                    fuzzySlop = jj_consume_token(RegexpToken.FUZZY_SLOP);
+                                    fuzzy = true;
+                                    break;
+                                default:
+                                    jj_la1[17] = jj_gen;
+                                    break;
+                            }
+                            break;
+                        default:
+                            jj_la1[18] = jj_gen;
+                            break;
+                    }
+                    if (fuzzy)
+                    {
+                        float fms = defaultMinSimilarity;
+                        try
+                        {
+                            fms = Convert.ToSingle(fuzzySlop.image.Substring(1), CultureInfo.InvariantCulture);
+                        }
+                        catch (Exception ignored) { }
+                        if (fms < 0.0f)
+                        {
+                            { if (true) throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_FUZZY_LIMITS)); }
+                        }
+                        else if (fms >= 1.0f && fms != (int)fms)
+                        {
+                            { if (true) throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_FUZZY_EDITS)); }
+                        }
+                        q = new FuzzyQueryNode(field, EscapeQuerySyntaxImpl.DiscardEscapeChar(term.image), fms, term.beginColumn, term.endColumn);
+                    }
+                    else if (regexp)
+                    {
+                        string re = term.image.Substring(1, (term.image.Length - 1) - 1);
+                        q = new RegexpQueryNode(field, re, 0, re.Length);
+                    }
+                    break;
+                case RegexpToken.RANGEIN_START:
+                case RegexpToken.RANGEEX_START:
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.RANGEIN_START:
+                            jj_consume_token(RegexpToken.RANGEIN_START);
+                            startInc = true;
+                            break;
+                        case RegexpToken.RANGEEX_START:
+                            jj_consume_token(RegexpToken.RANGEEX_START);
+                            break;
+                        default:
+                            jj_la1[19] = jj_gen;
+                            jj_consume_token(-1);
+                            throw new ParseException();
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.RANGE_GOOP:
+                            goop1 = jj_consume_token(RegexpToken.RANGE_GOOP);
+                            break;
+                        case RegexpToken.RANGE_QUOTED:
+                            goop1 = jj_consume_token(RegexpToken.RANGE_QUOTED);
+                            break;
+                        default:
+                            jj_la1[20] = jj_gen;
+                            jj_consume_token(-1);
+                            throw new ParseException();
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.RANGE_TO:
+                            jj_consume_token(RegexpToken.RANGE_TO);
+                            break;
+                        default:
+                            jj_la1[21] = jj_gen;
+                            break;
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.RANGE_GOOP:
+                            goop2 = jj_consume_token(RegexpToken.RANGE_GOOP);
+                            break;
+                        case RegexpToken.RANGE_QUOTED:
+                            goop2 = jj_consume_token(RegexpToken.RANGE_QUOTED);
+                            break;
+                        default:
+                            jj_la1[22] = jj_gen;
+                            jj_consume_token(-1);
+                            throw new ParseException();
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.RANGEIN_END:
+                            jj_consume_token(RegexpToken.RANGEIN_END);
+                            endInc = true;
+                            break;
+                        case RegexpToken.RANGEEX_END:
+                            jj_consume_token(RegexpToken.RANGEEX_END);
+                            break;
+                        default:
+                            jj_la1[23] = jj_gen;
+                            jj_consume_token(-1);
+                            throw new ParseException();
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.CARAT:
+                            jj_consume_token(RegexpToken.CARAT);
+                            boost = jj_consume_token(RegexpToken.NUMBER);
+                            break;
+                        default:
+                            jj_la1[24] = jj_gen;
+                            break;
+                    }
+                    if (goop1.kind == RegexpToken.RANGE_QUOTED)
+                    {
+                        goop1.image = goop1.image.Substring(1, (goop1.image.Length - 1) - 1);
+                    }
+                    if (goop2.kind == RegexpToken.RANGE_QUOTED)
+                    {
+                        goop2.image = goop2.image.Substring(1, (goop2.image.Length - 1) - 1);
+                    }
+
+                    qLower = new FieldQueryNode(field,
+                                             EscapeQuerySyntaxImpl.DiscardEscapeChar(goop1.image), goop1.beginColumn, goop1.endColumn);
+                    qUpper = new FieldQueryNode(field,
+                                                 EscapeQuerySyntaxImpl.DiscardEscapeChar(goop2.image), goop2.beginColumn, goop2.endColumn);
+                    q = new TermRangeQueryNode(qLower, qUpper, startInc ? true : false, endInc ? true : false);
+                    break;
+                case RegexpToken.QUOTED:
+                    term = jj_consume_token(RegexpToken.QUOTED);
+                    q = new QuotedFieldQueryNode(field, EscapeQuerySyntaxImpl.DiscardEscapeChar(term.image.Substring(1, (term.image.Length - 1) - 1)), term.beginColumn + 1, term.endColumn - 1);
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.FUZZY_SLOP:
+                            fuzzySlop = jj_consume_token(RegexpToken.FUZZY_SLOP);
+                            break;
+                        default:
+                            jj_la1[25] = jj_gen;
+                            break;
+                    }
+                    switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
+                    {
+                        case RegexpToken.CARAT:
+                            jj_consume_token(RegexpToken.CARAT);
+                            boost = jj_consume_token(RegexpToken.NUMBER);
+                            break;
+                        default:
+                            jj_la1[26] = jj_gen;
+                            break;
+                    }
+                    int phraseSlop = 0;
+
+                    if (fuzzySlop != null)
+                    {
+                        try
+                        {
+                            phraseSlop = (int)Convert.ToSingle(fuzzySlop.image.Substring(1), CultureInfo.InvariantCulture);
+                            q = new SlopQueryNode(q, phraseSlop);
+                        }
+                        catch (Exception ignored)
+                        {
+                            /* Should this be handled somehow? (defaults to "no PhraseSlop", if
+                           * slop number is invalid)
+                           */
+                        }
+                    }
+                    break;
+                default:
+                    jj_la1[27] = jj_gen;
+                    jj_consume_token(-1);
+                    throw new ParseException();
+            }
+            if (boost != null)
+            {
+                float f = (float)1.0;
+                try
+                {
+                    f = Convert.ToSingle(boost.image, CultureInfo.InvariantCulture);
+                    // avoid boosting null queries, such as those caused by stop words
+                    if (q != null)
+                    {
+                        q = new BoostQueryNode(q, f);
+                    }
+                }
+                catch (Exception ignored)
+                {
+                    /* Should this be handled somehow? (defaults to "no boost", if
+                       * boost number is invalid)
+                       */
+                }
+            }
+            { if (true) return q; }
+            throw new Exception("Missing return statement in function");
+        }
+
+        private bool jj_2_1(int xla)
+        {
+            jj_la = xla; jj_lastpos = jj_scanpos = token;
+            try { return !jj_3_1(); }
+            catch (LookaheadSuccess ls) { return true; }
+            finally { jj_save(0, xla); }
+        }
+
+        private bool jj_2_2(int xla)
+        {
+            jj_la = xla; jj_lastpos = jj_scanpos = token;
+            try { return !jj_3_2(); }
+            catch (LookaheadSuccess ls) { return true; }
+            finally { jj_save(1, xla); }
+        }
+
+        private bool jj_3_2()
+        {
+            if (jj_scan_token(RegexpToken.TERM)) return true;
+            Token xsp;
+            xsp = jj_scanpos;
+            if (jj_3R_4())
+            {
+                jj_scanpos = xsp;
+                if (jj_3R_5()) return true;
+            }
+            return false;
+        }
+
+        private bool jj_3R_12()
+        {
+            if (jj_scan_token(RegexpToken.RANGEIN_START)) return true;
+            return false;
+        }
+
+        private bool jj_3R_11()
+        {
+            if (jj_scan_token(RegexpToken.REGEXPTERM)) return true;
+            return false;
+        }
+
+        private bool jj_3_1()
+        {
+            if (jj_scan_token(RegexpToken.TERM)) return true;
+            Token xsp;
+            xsp = jj_scanpos;
+            if (jj_scan_token(15))
+            {
+                jj_scanpos = xsp;
+                if (jj_scan_token(16)) return true;
+            }
+            return false;
+        }
+
+        private bool jj_3R_8()
+        {
+            Token xsp;
+            xsp = jj_scanpos;
+            if (jj_3R_12())
+            {
+                jj_scanpos = xsp;
+                if (jj_scan_token(27)) return true;
+            }
+            return false;
+        }
+
+        private bool jj_3R_10()
+        {
+            if (jj_scan_token(RegexpToken.TERM)) return true;
+            return false;
+        }
+
+        private bool jj_3R_7()
+        {
+            Token xsp;
+            xsp = jj_scanpos;
+            if (jj_3R_10())
+            {
+                jj_scanpos = xsp;
+                if (jj_3R_11())
+                {
+                    jj_scanpos = xsp;
+                    if (jj_scan_token(28)) return true;
+                }
+            }
+            return false;
+        }
+
+        private bool jj_3R_9()
+        {
+            if (jj_scan_token(RegexpToken.QUOTED)) return true;
+            return false;
+        }
+
+        private bool jj_3R_5()
+        {
+            Token xsp;
+            xsp = jj_scanpos;
+            if (jj_scan_token(17))
+            {
+                jj_scanpos = xsp;
+                if (jj_scan_token(18))
+                {
+                    jj_scanpos = xsp;
+                    if (jj_scan_token(19))
+                    {
+                        jj_scanpos = xsp;
+                        if (jj_scan_token(20)) return true;
+                    }
+                }
+            }
+            xsp = jj_scanpos;
+            if (jj_scan_token(23))
+            {
+                jj_scanpos = xsp;
+                if (jj_scan_token(22))
+                {
+                    jj_scanpos = xsp;
+                    if (jj_scan_token(28)) return true;
+                }
+            }
+            return false;
+        }
+
+        private bool jj_3R_4()
+        {
+            Token xsp;
+            xsp = jj_scanpos;
+            if (jj_scan_token(15))
+            {
+                jj_scanpos = xsp;
+                if (jj_scan_token(16)) return true;
+            }
+            if (jj_3R_6()) return true;
+            return false;
+        }
+
+        private bool jj_3R_6()
+        {
+            Token xsp;
+            xsp = jj_scanpos;
+            if (jj_3R_7())
+            {
+                jj_scanpos = xsp;
+                if (jj_3R_8())
+                {
+                    jj_scanpos = xsp;
+                    if (jj_3R_9()) return true;
+                }
+            }
+            return false;
+        }
+
+        /** Generated Token Manager. */
+        public StandardSyntaxParserTokenManager token_source;
+        /** Current token. */
+        public Token token;
+        /** Next token. */
+        public Token jj_nt;
+        private int jj_ntk;
+        private Token jj_scanpos, jj_lastpos;
+        private int jj_la;
+        private int jj_gen;
+        readonly private int[] jj_la1 = new int[28];
+        static private uint[] jj_la1_0;
+        static private int[] jj_la1_1;
+        static StandardSyntaxParser()
+        {
+            jj_la1_init_0();
+            jj_la1_init_1();
+        }
+        private static void jj_la1_init_0()
+        {
+            jj_la1_0 = new uint[] { 0x300, 0x300, 0x1c00, 0x1c00, 0x1ec03c00, 0x200, 0x100, 0x18000, 0x1e0000, 0x10c00000, 0x1f8000, 0x18000, 0x200000, 0x1ec02000, 0x1ec02000, 0x12800000, 0x1000000, 0x1000000, 0x200000, 0xc000000, 0x0, 0x20000000, 0x0, 0xc0000000, 0x200000, 0x1000000, 0x200000, 0x1ec00000, };
+        }
+        private static void jj_la1_init_1()
+        {
+            jj_la1_1 = new int[] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, };
+        }
+        readonly private JJCalls[] jj_2_rtns = new JJCalls[2];
+        private bool jj_rescan = false;
+        private int jj_gc = 0;
+
+        /** Constructor with user supplied CharStream. */
+        public StandardSyntaxParser(ICharStream stream)
+        {
+            token_source = new StandardSyntaxParserTokenManager(stream);
+            token = new Token();
+            jj_ntk = -1;
+            jj_gen = 0;
+            for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+            for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
+        }
+
+        /** Reinitialise. */
+        public void ReInit(ICharStream stream)
+        {
+            token_source.ReInit(stream);
+            token = new Token();
+            jj_ntk = -1;
+            jj_gen = 0;
+            for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+            for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
+        }
+
+        /** Constructor with generated Token Manager. */
+        public StandardSyntaxParser(StandardSyntaxParserTokenManager tm)
+        {
+            token_source = tm;
+            token = new Token();
+            jj_ntk = -1;
+            jj_gen = 0;
+            for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+            for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
+        }
+
+        /** Reinitialise. */
+        public void ReInit(StandardSyntaxParserTokenManager tm)
+        {
+            token_source = tm;
+            token = new Token();
+            jj_ntk = -1;
+            jj_gen = 0;
+            for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+            for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
+        }
+
+        private Token jj_consume_token(int kind)
+        {
+            Token oldToken;
+            if ((oldToken = token).next != null) token = token.next;
+            else token = token.next = token_source.getNextToken();
+            jj_ntk = -1;
+            if (token.kind == kind)
+            {
+                jj_gen++;
+                if (++jj_gc > 100)
+                {
+                    jj_gc = 0;
+                    for (int i = 0; i < jj_2_rtns.Length; i++)
+                    {
+                        JJCalls c = jj_2_rtns[i];
+                        while (c != null)
+                        {
+                            if (c.gen < jj_gen) c.first = null;
+                            c = c.next;
+                        }
+                    }
+                }
+                return token;
+            }
+            token = oldToken;
+            jj_kind = kind;
+            throw generateParseException();
+        }
+
+        internal sealed class LookaheadSuccess : Exception { }
+        readonly private LookaheadSuccess jj_ls = new LookaheadSuccess();
+        private bool jj_scan_token(int kind)
+        {
+            if (jj_scanpos == jj_lastpos)
+            {
+                jj_la--;
+                if (jj_scanpos.next == null)
+                {
+                    jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
+                }
+                else
+                {
+                    jj_lastpos = jj_scanpos = jj_scanpos.next;
+                }
+            }
+            else
+            {
+                jj_scanpos = jj_scanpos.next;
+            }
+            if (jj_rescan)
+            {
+                int i = 0; Token tok = token;
+                while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
+                if (tok != null) jj_add_error_token(kind, i);
+            }
+            if (jj_scanpos.kind != kind) return true;
+            if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
+            return false;
+        }
+
+
+        /** Get the next Token. */
+        public Token getNextToken()
+        {
+            if (token.next != null) token = token.next;
+            else token = token.next = token_source.getNextToken();
+            jj_ntk = -1;
+            jj_gen++;
+            return token;
+        }
+
+        /** Get the specific Token. */
+        public Token getToken(int index)
+        {
+            Token t = token;
+            for (int i = 0; i < index; i++)
+            {
+                if (t.next != null) t = t.next;
+                else t = t.next = token_source.getNextToken();
+            }
+            return t;
+        }
+
+        private int Jj_ntk()
+        {
+            if ((jj_nt = token.next) == null)
+                return (jj_ntk = (token.next = token_source.getNextToken()).kind);
+            else
+                return (jj_ntk = jj_nt.kind);
+        }
+
+        private List<int[]> jj_expentries = new List<int[]>();
+        private int[] jj_expentry;
+        private int jj_kind = -1;
+        private int[] jj_lasttokens = new int[100];
+        private int jj_endpos;
+
+        private void jj_add_error_token(int kind, int pos)
+        {
+            if (pos >= 100) return;
+            if (pos == jj_endpos + 1)
+            {
+                jj_lasttokens[jj_endpos++] = kind;
+            }
+            else if (jj_endpos != 0)
+            {
+                jj_expentry = new int[jj_endpos];
+                for (int i = 0; i < jj_endpos; i++)
+                {
+                    jj_expentry[i] = jj_lasttokens[i];
+                }
+                 for (var it = jj_expentries.GetEnumerator(); it.MoveNext();)
+                {
+                    int[] oldentry = (int[])(it.Current);
+                    if (oldentry.Length == jj_expentry.Length)
+                    {
+                        for (int i = 0; i < jj_expentry.Length; i++)
+                        {
+                            if (oldentry[i] != jj_expentry[i])
+                            {
+                                goto jj_entries_loop_continue;
+                            }
+                        }
+                        jj_expentries.Add(jj_expentry);
+                        goto jj_entries_loop_break;
+                    }
+                    jj_entries_loop_continue: { }
+                }
+                jj_entries_loop_break:
+                if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
+            }
+        }
+
+        /** Generate ParseException. */
+        public ParseException generateParseException()
+        {
+            jj_expentries.Clear();
+            bool[] la1tokens = new bool[34];
+            if (jj_kind >= 0)
+            {
+                la1tokens[jj_kind] = true;
+                jj_kind = -1;
+            }
+            for (int i = 0; i < 28; i++)
+            {
+                if (jj_la1[i] == jj_gen)
+                {
+                    for (int j = 0; j < 32; j++)
+                    {
+                        if ((jj_la1_0[i] & (1 << j)) != 0)
+                        {
+                            la1tokens[j] = true;
+                        }
+                        if ((jj_la1_1[i] & (1 << j)) != 0)
+                        {
+                            la1tokens[32 + j] = true;
+                        }
+                    }
+                }
+            }
+            for (int i = 0; i < 34; i++)
+            {
+                if (la1tokens[i])
+                {
+                    jj_expentry = new int[1];
+                    jj_expentry[0] = i;
+                    jj_expentries.Add(jj_expentry);
+                }
+            }
+            jj_endpos = 0;
+            jj_rescan_token();
+            jj_add_error_token(0, 0);
+            int[][] exptokseq = new int[jj_expentries.Count][];
+            for (int i = 0; i < jj_expentries.Count; i++)
+            {
+                exptokseq[i] = jj_expentries[i];
+            }
+            return new ParseException(token, exptokseq, StandardSyntaxParserConstants.TokenImage);
+        }
+
+        /** Enable tracing. */
+        public void enable_tracing()
+        {
+        }
+
+        /** Disable tracing. */
+        public void disable_tracing()
+        {
+        }
+
+        private void jj_rescan_token()
+        {
+            jj_rescan = true;
+            for (int i = 0; i < 2; i++)
+            {
+                try
+                {
+                    JJCalls p = jj_2_rtns[i];
+                    do
+                    {
+                        if (p.gen > jj_gen)
+                        {
+                            jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
+                            switch (i)
+                            {
+                                case 0: jj_3_1(); break;
+                                case 1: jj_3_2(); break;
+                            }
+                        }
+                        p = p.next;
+                    } while (p != null);
+                }
+                catch (LookaheadSuccess ls) { }
+            }
+            jj_rescan = false;
+        }
+
+        private void jj_save(int index, int xla)
+        {
+            JJCalls p = jj_2_rtns[index];
+            while (p.gen > jj_gen)
+            {
+                if (p.next == null) { p = p.next = new JJCalls(); break; }
+                p = p.next;
+            }
+            p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
+        }
+
+        internal sealed class JJCalls
+        {
+            internal int gen;
+            internal Token first;
+            internal int arg;
+            internal JJCalls next;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParserConstants.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParserConstants.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParserConstants.cs
new file mode 100644
index 0000000..c1d4beb
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParserConstants.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
+{
+    public static class RegexpToken
+    {
+        /// <summary>End of File. </summary>
+        public const int EOF = 0;
+        /// <summary>RegularExpression Id. </summary>
+        public const int _NUM_CHAR = 1;
+        /// <summary>RegularExpression Id. </summary>
+        public const int _ESCAPED_CHAR = 2;
+        /// <summary>RegularExpression Id. </summary>
+        public const int _TERM_START_CHAR = 3;
+        /// <summary>RegularExpression Id. </summary>
+        public const int _TERM_CHAR = 4;
+        /// <summary>RegularExpression Id. </summary>
+        public const int _WHITESPACE = 5;
+        /// <summary>RegularExpression Id. </summary>
+        public const int _QUOTED_CHAR = 6;
+        /// <summary>RegularExpression Id. </summary>
+        public const int AND = 8;
+        /// <summary>RegularExpression Id. </summary>
+        public const int OR = 9;
+        /// <summary>RegularExpression Id. </summary>
+        public const int NOT = 10;
+        /// <summary>RegularExpression Id. </summary>
+        public const int PLUS = 11;
+        /// <summary>RegularExpression Id. </summary>
+        public const int MINUS = 12;
+        /// <summary>RegularExpression Id. </summary>
+        public const int LPAREN = 13;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RPAREN = 14;
+        /// <summary>RegularExpression Id. </summary>
+        public const int OP_COLON = 15;
+        /// <summary>RegularExpression Id. </summary>
+        public const int OP_EQUAL = 16;
+        /// <summary>RegularExpression Id. </summary>
+        public const int OP_LESSTHAN = 17;
+        /// <summary>RegularExpression Id. </summary>
+        public const int OP_LESSTHANEQ = 18;
+        /// <summary>RegularExpression Id. </summary>
+        public const int OP_MORETHAN = 19;
+        /// <summary>RegularExpression Id. </summary>
+        public const int OP_MORETHANEQ = 20;
+        /// <summary>RegularExpression Id. </summary>
+        public const int CARAT = 21;
+        /// <summary>RegularExpression Id. </summary>
+        public const int QUOTED = 22;
+        /// <summary>RegularExpression Id. </summary>
+        public const int TERM = 23;
+        /// <summary>RegularExpression Id. </summary>
+        public const int FUZZY_SLOP = 24;
+        /// <summary>RegularExpression Id. </summary>
+        public const int REGEXPTERM = 25;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RANGEIN_START = 26;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RANGEEX_START = 27;
+        /// <summary>RegularExpression Id. </summary>
+        public const int NUMBER = 28;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RANGE_TO = 29;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RANGEIN_END = 30;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RANGEEX_END = 31;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RANGE_QUOTED = 32;
+        /// <summary>RegularExpression Id. </summary>
+        public const int RANGE_GOOP = 33;
+    }
+
+    public static class LexicalToken
+    {
+        /// <summary>Lexical state.</summary>
+        public const int Boost = 0;
+        /// <summary>Lexical state.</summary>
+        public const int Range = 1;
+        /// <summary>Lexical state.</summary>
+        public const int DEFAULT = 2;
+    }
+
+    public static class StandardSyntaxParserConstants
+    {
+        /// <summary>Literal token values.</summary>
+        public static string[] TokenImage = new string[] {
+            "<EOF>",
+            "<_NUM_CHAR>",
+            "<_ESCAPED_CHAR>",
+            "<_TERM_START_CHAR>",
+            "<_TERM_CHAR>",
+            "<_WHITESPACE>",
+            "<_QUOTED_CHAR>",
+            "<token of kind 7>",
+            "<AND>",
+            "<OR>",
+            "<NOT>",
+            "\"+\"",
+            "\"-\"",
+            "\"(\"",
+            "\")\"",
+            "\":\"",
+            "\"=\"",
+            "\"<\"",
+            "\"<=\"",
+            "\">\"",
+            "\">=\"",
+            "\"^\"",
+            "<QUOTED>",
+            "<TERM>",
+            "<FUZZY_SLOP>",
+            "<REGEXPTERM>",
+            "\"[\"",
+            "\"{\"",
+            "<NUMBER>",
+            "\"TO\"",
+            "\"]\"",
+            "\"}\"",
+            "<RANGE_QUOTED>",
+            "<RANGE_GOOP>",
+        };
+    }
+}


Mime
View raw message