You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/05/15 18:29:10 UTC

[GitHub] [lucene-solr] mikemccand commented on a change in pull request #1521: Lucene-9371: Allow external access to RegExp's parsed structure

mikemccand commented on a change in pull request #1521:
URL: https://github.com/apache/lucene-solr/pull/1521#discussion_r425975833



##########
File path: lucene/core/src/java/org/apache/lucene/util/automaton/RegExp.java
##########
@@ -468,6 +519,37 @@ public RegExp(String s, int syntax_flags) throws IllegalArgumentException {
     from = e.from;
     to = e.to;
   }
+  
+  RegExp(Kind kind, RegExp exp1, RegExp exp2, String s, int c, int min, int max, int digits, int from, int to){    
+    this.originalString = null;
+    this.kind = kind;
+    this.flags = 0;
+    this.exp1=exp1;

Review comment:
       Can we be consistent about the spaces around `=`?

##########
File path: lucene/core/src/java/org/apache/lucene/util/automaton/RegExp.java
##########
@@ -365,8 +365,43 @@
  */
 public class RegExp {
   
-  enum Kind {
-    REGEXP_UNION, REGEXP_CONCATENATION, REGEXP_INTERSECTION, REGEXP_OPTIONAL, REGEXP_REPEAT, REGEXP_REPEAT_MIN, REGEXP_REPEAT_MINMAX, REGEXP_COMPLEMENT, REGEXP_CHAR, REGEXP_CHAR_RANGE, REGEXP_ANYCHAR, REGEXP_EMPTY, REGEXP_STRING, REGEXP_ANYSTRING, REGEXP_AUTOMATON, REGEXP_INTERVAL,
+  /**
+   * The type of expression represented by a RegExp node.

Review comment:
       Can we add `@lucene.experimental` or `@lucene.internal`?
   
   Ahh, nevermind -- the class level javadocs say so already.

##########
File path: lucene/core/src/java/org/apache/lucene/util/automaton/RegExp.java
##########
@@ -468,6 +519,37 @@ public RegExp(String s, int syntax_flags) throws IllegalArgumentException {
     from = e.from;
     to = e.to;
   }
+  
+  RegExp(Kind kind, RegExp exp1, RegExp exp2, String s, int c, int min, int max, int digits, int from, int to){    
+    this.originalString = null;
+    this.kind = kind;
+    this.flags = 0;
+    this.exp1=exp1;
+    this.exp2=exp2;
+    this.s = s;
+    this.c = c;
+    this.min =min;

Review comment:
       Hmm also here.  Still looking for the last permutation ...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org