lex() should not destroy argument

This fixes Issue #1
Merge pull request #2 from aocole/patch-1

lex() should not destroy argument