Commit a77aa3c3 authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Make a better parser for node index lists. Negative numbers are allowed

in index lists AND in ranges.  Here is how negative numbers work in
ranges:

 If both numbers in a range are of the same sign (both positive, or both
 negative), then the range counts directly from the first number to the
 second number; it will not wrap around the "end" of the node list.

 If the numbers in a range differ in sign, the range wraps around the
 end of the list of nodes.

 Examples: Given a node allocation of foo[1-16]:

	-2-3  (negative 2 to positive 3) becomes foo[15-16,1-4]
	3--2  (positive 3 to negative 2) becomes foo[4,3,2,1,16,15]
	-3--2 becomes foo[14-15]
	-2--3 becomes foo[15,14]
	2-3   becomes foo[3-4]
	3-2   becomes foo[4,3]
parent 7c2bdd67
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment