lexical analyzer for class