lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [12/15] lucenenet git commit: Lucene.Net.QueryParser (Classic + Flexible.Standard.Parser + Surround.Parser) TokenMgrError refactor: changed parameter from EOFSeen > eofSeen (convention)
Date Wed, 01 Feb 2017 05:19:11 GMT
Lucene.Net.QueryParser (Classic + Flexible.Standard.Parser + Surround.Parser) TokenMgrError
refactor: changed parameter from EOFSeen > eofSeen (convention)


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

Branch: refs/heads/api-work
Commit: 7667d56c1296229d4a633bff5156421ddd0530ad
Parents: ad3db5a
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 1 10:48:26 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 1 10:50:01 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.QueryParser/Classic/TokenMgrError.cs     | 12 ++++++------
 .../Flexible/Standard/Parser/TokenMgrError.cs           | 12 ++++++------
 .../Surround/Parser/TokenMgrError.cs                    |  6 +++---
 3 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7667d56c/src/Lucene.Net.QueryParser/Classic/TokenMgrError.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Classic/TokenMgrError.cs b/src/Lucene.Net.QueryParser/Classic/TokenMgrError.cs
index 989e0fa..38e75f0 100644
--- a/src/Lucene.Net.QueryParser/Classic/TokenMgrError.cs
+++ b/src/Lucene.Net.QueryParser/Classic/TokenMgrError.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.QueryParsers.Classic
         /// Replaces unprintable characters by their escaped (or unicode escaped)
         /// equivalents in the given string
         /// </summary>
-        protected internal static string AddEscapes(string str)
+        protected static string AddEscapes(string str)
         {
             StringBuilder retval = new StringBuilder();
             char ch;
@@ -117,19 +117,19 @@ namespace Lucene.Net.QueryParsers.Classic
         /// token manager to indicate a lexical error.
         /// </summary>
         /// <remarks>You can customize the lexical error message by modifying this
method.</remarks>
-        /// <param name="EOFSeen">indicates if EOF caused the lexical error</param>
+        /// <param name="eofSeen">indicates if EOF caused the lexical error</param>
         /// <param name="lexState">lexical state in which this error occurred</param>
         /// <param name="errorLine">line number when the error occurred</param>
         /// <param name="errorColumn">column number when the error occurred</param>
         /// <param name="errorAfter">prefix that was seen before this error occurred</param>
         /// <param name="curChar">the offending character</param>
         /// <returns>Detailed error message</returns>
-        protected internal static string LexicalError(bool EOFSeen, int lexState, int errorLine,
int errorColumn, string errorAfter, char curChar)
+        protected internal static string LexicalError(bool eofSeen, int lexState, int errorLine,
int errorColumn, string errorAfter, char curChar)
         {
             return ("Lexical error at line " +
                 errorLine + ", column " +
                 errorColumn + ".  Encountered: " +
-                (EOFSeen ? "<EOF> " : ("\"" + AddEscapes(Convert.ToString(curChar))
+ "\"") + " (" + (int)curChar + "), ") +
+                (eofSeen ? "<EOF> " : ("\"" + AddEscapes(Convert.ToString(curChar))
+ "\"") + " (" + (int)curChar + "), ") +
                 "after : \"" + AddEscapes(errorAfter) + "\"");
         }
 
@@ -164,8 +164,8 @@ namespace Lucene.Net.QueryParsers.Classic
 		}
 		
 		/// <summary>Full Constructor. </summary>
-		public TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, string
errorAfter, char curChar, int reason)
-            : this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
reason)
+		public TokenMgrError(bool eofSeen, int lexState, int errorLine, int errorColumn, string
errorAfter, char curChar, int reason)
+            : this(LexicalError(eofSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
reason)
 		{
 		}
 	}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7667d56c/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/TokenMgrError.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/TokenMgrError.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/TokenMgrError.cs
index 494a6b9..6767b28 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/TokenMgrError.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/TokenMgrError.cs
@@ -115,19 +115,19 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
         /// Returns a detailed message for the Error when it is thrown by the
         /// token manager to indicate a lexical error.
         /// </summary>
-        /// <param name="EOFSeen">indicates if EOF caused the lexical error</param>
+        /// <param name="eofSeen">indicates if EOF caused the lexical error</param>
         /// <param name="lexState">lexical state in which this error occurred</param>
         /// <param name="errorLine">line number when the error occurred</param>
         /// <param name="errorColumn">column number when the error occurred</param>
         /// <param name="errorAfter">prefix that was seen before this error occurred</param>
         /// <param name="curChar">the offending character</param>
         /// <remarks>Note: You can customize the lexical error message by modifying
this method.</remarks>
-        protected static string LexicalError(bool EOFSeen, int lexState, int errorLine, int
errorColumn, string errorAfter, char curChar)
+        protected static string LexicalError(bool eofSeen, int lexState, int errorLine, int
errorColumn, string errorAfter, char curChar)
         {
             return ("Lexical error at line " +
                   errorLine + ", column " +
                   errorColumn + ".  Encountered: " +
-                  (EOFSeen ? "<EOF> " : ("\"" + AddEscapes(curChar.ToString()) + "\"")
+ " (" + (int)curChar + "), ") +
+                  (eofSeen ? "<EOF> " : ("\"" + AddEscapes(curChar.ToString()) + "\"")
+ " (" + (int)curChar + "), ") +
                   "after : \"" + AddEscapes(errorAfter) + "\"");
         }
 
@@ -160,15 +160,15 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
         }
 
         /// <summary>Full Constructor.</summary>
-        /// <param name="EOFSeen">indicates if EOF caused the lexical error</param>
+        /// <param name="eofSeen">indicates if EOF caused the lexical error</param>
         /// <param name="lexState">lexical state in which this error occurred</param>
         /// <param name="errorLine">line number when the error occurred</param>
         /// <param name="errorColumn">column number when the error occurred</param>
         /// <param name="errorAfter">prefix that was seen before this error occurred</param>
         /// <param name="curChar">the offending character</param>
         /// <param name="reason"></param>
-        public TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn,
string errorAfter, char curChar, int reason)
-            : this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
reason)
+        public TokenMgrError(bool eofSeen, int lexState, int errorLine, int errorColumn,
string errorAfter, char curChar, int reason)
+            : this(LexicalError(eofSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
reason)
         {
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7667d56c/src/Lucene.Net.QueryParser/Surround/Parser/TokenMgrError.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Surround/Parser/TokenMgrError.cs b/src/Lucene.Net.QueryParser/Surround/Parser/TokenMgrError.cs
index 5f539e1..6384395 100644
--- a/src/Lucene.Net.QueryParser/Surround/Parser/TokenMgrError.cs
+++ b/src/Lucene.Net.QueryParser/Surround/Parser/TokenMgrError.cs
@@ -117,19 +117,19 @@ namespace Lucene.Net.QueryParsers.Surround.Parser
         /// token manager to indicate a lexical error.
         /// </summary>
         /// <remarks>You can customize the lexical error message by modifying this
method.</remarks>
-        /// <param name="EOFSeen">indicates if EOF caused the lexical error</param>
+        /// <param name="eofSeen">indicates if EOF caused the lexical error</param>
         /// <param name="lexState">lexical state in which this error occurred</param>
         /// <param name="errorLine">line number when the error occurred</param>
         /// <param name="errorColumn">column number when the error occurred</param>
         /// <param name="errorAfter">prefix that was seen before this error occurred</param>
         /// <param name="curChar">the offending character</param>
         /// <returns>Detailed error message</returns>
-        protected internal static string LexicalError(bool EOFSeen, int lexState, int errorLine,
int errorColumn, string errorAfter, char curChar)
+        protected internal static string LexicalError(bool eofSeen, int lexState, int errorLine,
int errorColumn, string errorAfter, char curChar)
         {
             return ("Lexical error at line " +
                 errorLine + ", column " +
                 errorColumn + ".  Encountered: " +
-                (EOFSeen ? "<EOF> " : ("\"" + AddEscapes(Convert.ToString(curChar))
+ "\"") + " (" + (int)curChar + "), ") +
+                (eofSeen ? "<EOF> " : ("\"" + AddEscapes(Convert.ToString(curChar))
+ "\"") + " (" + (int)curChar + "), ") +
                 "after : \"" + AddEscapes(errorAfter) + "\"");
         }
 


Mime
View raw message