well carry on as the teacher instruct you
but if you are interested you can find material on parsing and context free grammars easily on net
here i can give you some idea how things works
any equation follows a particular syntax for example if I say in my system all equations are of type
"operand operator operand"
and lets say operator means + and *, and operand is any number
now for example the input comes 2 + 2 it follows the above rule
and if input comes 3 * 5 it follows the above rule
in short the above rule defines a grammar and all equations of above type follows that grammar
now what i need to do is write a program that can parse the grammar "operand operator operand" and I am able to parse all equations of this type weather its 10 + 9 or its 100 * 300 whatever
its a really interesting subject building grammars, parsers, compilers ...