Currently, appendChild() extends tokens only to the right, so this produces the wrong result:
NLMORE($$, $2); $$->apppendChild($1);
Instead of separate setBegin() + setEnd() operations, just always extend both sides of the range if applicable. This reduces NLMORE to NMORE and removes the pitfall from the codebase.
(I retained NEXTEND() because I think it makes the code a little more clear.)