Lexer and Parser with test cases