Splitting code into lexer and parser for abstraction.