lexical analysis function realization and function test