final version of part 2 (lex + yacc)