use a 'range' property in parser events rather than 'linelength' and 'absposition' (#346)