# HG changeset patch # User Yuya Nishihara # Date 2015-07-05 12:11:19 # Node ID e5b794063fd4e361c014a81cc9aaff41b6e29fd7 # Parent 19578bb847310e32eae3d44466b51a698ced5b95 parser: remove unused binding parameter from suffix action Because a suffix action never takes subsequent tokens, it should have no binding strength nor closing character. I've tried if this value could be used to resolve infix/suffix ambiguity of x^:y, but it appears not. So I decided to resend this patch. diff --git a/mercurial/parser.py b/mercurial/parser.py --- a/mercurial/parser.py +++ b/mercurial/parser.py @@ -65,7 +65,7 @@ class parser(object): # handle infix rules, take as suffix if unambiguous infix, suffix = self._elements[token][3:] if suffix and not (infix and self._hasnewterm()): - expr = (suffix[0], expr) + expr = (suffix, expr) elif infix: expr = (infix[0], expr, self._parseoperand(*infix[1:])) else: diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -149,18 +149,16 @@ elements = { "(": (21, None, ("group", 1, ")"), ("func", 1, ")"), None), "##": (20, None, None, ("_concat", 20), None), "~": (18, None, None, ("ancestor", 18), None), - "^": (18, None, None, ("parent", 18), ("parentpost", 18)), + "^": (18, None, None, ("parent", 18), "parentpost"), "-": (5, None, ("negate", 19), ("minus", 5), None), - "::": (17, None, ("dagrangepre", 17), ("dagrange", 17), - ("dagrangepost", 17)), - "..": (17, None, ("dagrangepre", 17), ("dagrange", 17), - ("dagrangepost", 17)), - ":": (15, "rangeall", ("rangepre", 15), ("range", 15), ("rangepost", 15)), + "::": (17, None, ("dagrangepre", 17), ("dagrange", 17), "dagrangepost"), + "..": (17, None, ("dagrangepre", 17), ("dagrange", 17), "dagrangepost"), + ":": (15, "rangeall", ("rangepre", 15), ("range", 15), "rangepost"), "not": (10, None, ("not", 10), None, None), "!": (10, None, ("not", 10), None, None), "and": (5, None, None, ("and", 5), None), "&": (5, None, None, ("and", 5), None), - "%": (5, None, None, ("only", 5), ("onlypost", 5)), + "%": (5, None, None, ("only", 5), "onlypost"), "or": (4, None, None, ("or", 4), None), "|": (4, None, None, ("or", 4), None), "+": (4, None, None, ("or", 4), None),