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 59313fbc7fea54139dc42ca3246dc80816ecc3d0 Author: Ben Browning <[email protected]> Date: Wed Sep 24 13:39:32 2014 -0400 Fix quantifier and non-capturing group interaction under JavaScript Multiple quantifiers for the same token are not allowed in JavaScript. However, our check was too broad for this before and it was throwing an error when a non-capturing group ended in a repeat and there was a repeat immediately following the non-capturing group. This fixes that behavior by respecting the boolean group flag to know whether we're dealing with a non-capturing group or not. --- src/org/joni/Parser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/joni/Parser.java b/src/org/joni/Parser.java index 62208a7..419993f 100644 --- a/src/org/joni/Parser.java +++ b/src/org/joni/Parser.java @@ -890,7 +890,7 @@ class Parser extends Lexer { while (token.type == TokenType.OP_REPEAT || token.type == TokenType.INTERVAL) { // repeat: if (target.isInvalidQuantifier()) newSyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_INVALID); - if (syntax.op2OptionECMAScript() && target.getType() == NodeType.QTFR) { + if (!group && syntax.op2OptionECMAScript() && target.getType() == NodeType.QTFR) { newSyntaxException(ERR_NESTED_REPEAT_NOT_ALLOWED); } QuantifierNode qtfr = new QuantifierNode(token.getRepeatLower(), -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

