Implement lexing and parsing