Improvement to lexer internals.
Added tests for AbstractNode.