renamed "isInverted" to "is_inverted"

This commit is contained in:
Erik Krogh Kristensen
2020-09-04 11:52:09 +02:00
parent fbcd3dd893
commit 9a1a439c76
7 changed files with 16 additions and 9 deletions

View File

@@ -333,7 +333,7 @@ public class RegExpExtractor {
@Override
public void visit(CharacterClass nd) {
Label lbl = extractTerm(nd, parent, idx);
if (nd.isInverted()) trapwriter.addTuple("isInverted", lbl);
if (nd.isInverted()) trapwriter.addTuple("is_inverted", lbl);
int i = 0;
for (RegExpTerm element : nd.getElements()) visit(element, lbl, i++);
}

View File

@@ -1604,7 +1604,7 @@ regexpterm(#20522,23,#20521,0,"[^a-z]")
regexpterm(#20522,23,#20521,0,"[^a-z]")
#20523=@"loc,{#10000},35,2,35,7"
locations_default(#20523,#10000,35,2,35,7)
hasLocation(#20522,#20523)
hasLocation(#20522,#20523)
is_inverted(#20522)
#20524=*
regexpterm(#20524,24,#20522,0,"a-z")
@@ -1843,7 +1843,7 @@ regexpterm(#20592,23,#20591,0,"[^]")
regexpterm(#20592,23,#20591,0,"[^]")
#20593=@"loc,{#10000},43,2,43,4"
locations_default(#20593,#10000,43,2,43,4)
hasLocation(#20592,#20593)
hasLocation(#20592,#20593)
is_inverted(#20592)
#20594=*
stmts(#20594,2,#20001,43,"/<tpl\b ... /tpl>/;")
@@ -1881,7 +1881,7 @@ regexpterm(#20604,23,#20602,0,"[^>]")
regexpterm(#20604,23,#20602,0,"[^>]")
#20605=@"loc,{#10000},44,8,44,11"
locations_default(#20605,#10000,44,8,44,11)
hasLocation(#20604,#20605)
hasLocation(#20604,#20605)
is_inverted(#20604)
#20606=*
regexpterm(#20606,14,#20604,0,">")
@@ -1942,7 +1942,7 @@ regexpterm(#20626,23,#20624,0,"[^<]")
regexpterm(#20626,23,#20624,0,"[^<]")
#20627=@"loc,{#10000},44,22,44,25"
locations_default(#20627,#10000,44,22,44,25)
hasLocation(#20626,#20627)
hasLocation(#20626,#20627)
is_inverted(#20626)
#20628=*
regexpterm(#20628,14,#20626,0,"<")
@@ -1998,7 +1998,7 @@ regexpterm(#20646,23,#20644,0,"[^>]")
regexpterm(#20646,23,#20644,0,"[^>]")
#20647=@"loc,{#10000},44,41,44,44"
locations_default(#20647,#10000,44,41,44,44)
hasLocation(#20646,#20647)
hasLocation(#20646,#20647)
is_inverted(#20646)
#20648=*
regexpterm(#20648,14,#20646,0,">")

View File

@@ -250,3 +250,8 @@ deprecated predicate isCapture(RegExpGroup id, int number) { is_capture(id, numb
* Use `RegExpGroup#isNamed()` instead.
*/
deprecated predicate isNamedCapture(RegExpGroup id, string name) { is_named_capture(id, name) }
/**
* Alias for the predicate `is_inverted` defined in the .dbscheme.
* Use `RegExpCharacterClass#isInverted()` instead.
*/
deprecated predicate isInverted(RegExpCharacterClass id) { is_inverted(id) }

View File

@@ -771,7 +771,7 @@ class RegExpBackRef extends RegExpTerm, @regexp_backref {
*/
class RegExpCharacterClass extends RegExpTerm, @regexp_char_class {
/** Holds if this is an inverted character class, that is, a term of the form `[^...]`. */
predicate isInverted() { isInverted(this) }
predicate isInverted() { is_inverted(this) }
override predicate isNullable() { none() }

View File

@@ -882,7 +882,7 @@ range_quantifier_lower_bound (unique int id: @regexp_range ref, int lo: int ref)
range_quantifier_upper_bound (unique int id: @regexp_range ref, int hi: int ref);
is_capture (unique int id: @regexp_group ref, int number: int ref);
is_named_capture (unique int id: @regexp_group ref, string name: string ref);
isInverted (int id: @regexp_char_class ref);
is_inverted (int id: @regexp_char_class ref);
regexpConstValue (unique int id: @regexp_constant ref, varchar(1) value: string ref);
charClassEscape (unique int id: @regexp_char_class_escape ref, varchar(1) value: string ref);
backref (unique int id: @regexp_backref ref, int value: int ref);

View File

@@ -20436,7 +20436,7 @@
</dependencies>
</relation>
<relation>
<name>isInverted</name>
<name>is_inverted</name>
<cardinality>458</cardinality>
<columnsizes>
<e>

View File

@@ -74,3 +74,5 @@ is_capture.rel: reorder isCapture.rel(int id, int number) id number
isCapture.rel: delete
is_named_capture.rel: reorder isNamedCapture.rel(int id, string name) id name
isNamedCapture.rel: delete
is_inverted.rel: reorder isInverted.rel(int id) id
isInverted.rel: delete