Wrote a grammar that recognizes the statements described below and generated its lexical analyzer and parser. After obtaining the lexical analyzer and the parser, all the action routines needed to evaluate a given python code were written.