rudimentary lexer/parser