lexical and grammar analysis