fixed off-by-one check in parser (exception on source ending with dot)