CONTRIB-4149 Improve define/defined handling

This avoids zillions of unnecesary findNext() calls, that
for big files have a very negative impact. Instead, let's
handle it progresively (current token).
Merge pull request #6 from stronk7/CONTRIB-4149

CONTRIB-4149 Improve define/defined handling