implemented A() B() C() and lex()