Move option parsing code out of main() into getOptions().

Added fields to struct Lexer to hold additional options state.