parser: compute location for all nodes