[jruby-joni] 109/279: Anchor in disable map.
Hideki Yamane
henrich at moszumanska.debian.org
Mon Nov 16 11:27:05 UTC 2015
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to branch debian/sid
in repository jruby-joni.
commit e52ed432ae849156223c2c5a5f2834ab516cb4c6
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Sun Feb 19 03:25:24 2012 +0100
Anchor in disable map.
---
src/org/joni/Analyser.java | 20 +++++++++++++++-----
test/org/joni/test/TestA.java | 2 +-
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/org/joni/Analyser.java b/src/org/joni/Analyser.java
index 9086abf..634773c 100644
--- a/src/org/joni/Analyser.java
+++ b/src/org/joni/Analyser.java
@@ -220,6 +220,17 @@ final class Analyser extends Parser {
}
break;
+ case NodeType.ANCHOR:
+ AnchorNode an = (AnchorNode)node;
+ switch (an.type) {
+ case AnchorNode.PREC_READ:
+ case AnchorNode.PREC_READ_NOT:
+ case AnchorNode.LOOK_BEHIND:
+ case AnchorNode.LOOK_BEHIND_NOT:
+ an.setTarget(noNameDisableMap(an.target, map, counter));
+ }
+ break;
+
default:
break;
} // switch
@@ -716,7 +727,7 @@ final class Analyser extends Parser {
Node tmp;
// !retry:!
- retry:while(true) {
+ retry: while(true) {
int yType = y.getType();
@@ -860,7 +871,7 @@ final class Analyser extends Parser {
} // switch
break;
- } // retry:while
+ } // retry: while
return false;
}
@@ -1698,8 +1709,7 @@ final class Analyser extends Parser {
6. expand repeated string.
*/
protected final void setupTree(Node node, int state) {
- restart:
- while (true) {
+ restart: while (true) {
switch (node.getType()) {
case NodeType.LIST:
ConsAltNode lin = (ConsAltNode)node;
@@ -1870,7 +1880,7 @@ final class Analyser extends Parser {
} // switch
return;
- } // while
+ } // restart: while
}
private static final int MAX_NODE_OPT_INFO_REF_COUNT = 5;
diff --git a/test/org/joni/test/TestA.java b/test/org/joni/test/TestA.java
index f32135f..b5170c7 100644
--- a/test/org/joni/test/TestA.java
+++ b/test/org/joni/test/TestA.java
@@ -484,7 +484,7 @@ public class TestA extends Test {
x2s("\\80", "80", 0, 2);
x2s("\\90", "90", 0, 2);
- ns("(?<!b|aa)c", "", Option.IGNORECASE);
+ ns("(?<!b|aa)c", "Aac", Option.IGNORECASE);
x2s("(?<!b|aa)", "Aac", 0, 0, Option.IGNORECASE);
x2s("(?<=b|aa)c", "Aac", 2, 3, Option.IGNORECASE);
x2s("(?<=b|aa)", "Aac", 2, 2, Option.IGNORECASE);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git
More information about the pkg-java-commits
mailing list