lexer: add more documentation.
lexer: fix sample in documentation.