Show More
@@ -65,7 +65,7 b' class parser(object):' | |||||
65 | # handle infix rules, take as suffix if unambiguous |
|
65 | # handle infix rules, take as suffix if unambiguous | |
66 | infix, suffix = self._elements[token][3:] |
|
66 | infix, suffix = self._elements[token][3:] | |
67 | if suffix and not (infix and self._hasnewterm()): |
|
67 | if suffix and not (infix and self._hasnewterm()): | |
68 |
expr = (suffix |
|
68 | expr = (suffix, expr) | |
69 | elif infix: |
|
69 | elif infix: | |
70 | expr = (infix[0], expr, self._parseoperand(*infix[1:])) |
|
70 | expr = (infix[0], expr, self._parseoperand(*infix[1:])) | |
71 | else: |
|
71 | else: |
@@ -149,18 +149,16 b' elements = {' | |||||
149 | "(": (21, None, ("group", 1, ")"), ("func", 1, ")"), None), |
|
149 | "(": (21, None, ("group", 1, ")"), ("func", 1, ")"), None), | |
150 | "##": (20, None, None, ("_concat", 20), None), |
|
150 | "##": (20, None, None, ("_concat", 20), None), | |
151 | "~": (18, None, None, ("ancestor", 18), None), |
|
151 | "~": (18, None, None, ("ancestor", 18), None), | |
152 |
"^": (18, None, None, ("parent", 18), |
|
152 | "^": (18, None, None, ("parent", 18), "parentpost"), | |
153 | "-": (5, None, ("negate", 19), ("minus", 5), None), |
|
153 | "-": (5, None, ("negate", 19), ("minus", 5), None), | |
154 | "::": (17, None, ("dagrangepre", 17), ("dagrange", 17), |
|
154 | "::": (17, None, ("dagrangepre", 17), ("dagrange", 17), "dagrangepost"), | |
155 | ("dagrangepost", 17)), |
|
155 | "..": (17, None, ("dagrangepre", 17), ("dagrange", 17), "dagrangepost"), | |
156 |
" |
|
156 | ":": (15, "rangeall", ("rangepre", 15), ("range", 15), "rangepost"), | |
157 | ("dagrangepost", 17)), |
|
|||
158 | ":": (15, "rangeall", ("rangepre", 15), ("range", 15), ("rangepost", 15)), |
|
|||
159 | "not": (10, None, ("not", 10), None, None), |
|
157 | "not": (10, None, ("not", 10), None, None), | |
160 | "!": (10, None, ("not", 10), None, None), |
|
158 | "!": (10, None, ("not", 10), None, None), | |
161 | "and": (5, None, None, ("and", 5), None), |
|
159 | "and": (5, None, None, ("and", 5), None), | |
162 | "&": (5, None, None, ("and", 5), None), |
|
160 | "&": (5, None, None, ("and", 5), None), | |
163 |
"%": (5, None, None, ("only", 5), |
|
161 | "%": (5, None, None, ("only", 5), "onlypost"), | |
164 | "or": (4, None, None, ("or", 4), None), |
|
162 | "or": (4, None, None, ("or", 4), None), | |
165 | "|": (4, None, None, ("or", 4), None), |
|
163 | "|": (4, None, None, ("or", 4), None), | |
166 | "+": (4, None, None, ("or", 4), None), |
|
164 | "+": (4, None, None, ("or", 4), None), |
General Comments 0
You need to be logged in to leave comments.
Login now