Parser: added getStats() method (almost complete)