I need to write a program that will input a series of 'if else statements' and the code needs to validate the statements based on grammar rules defined.
Now I realise this program is easy and maybe I am overthinking stuff but I just want to verify my strategy before I start.

Basically I figure that I need to define the rules according to the tokens; then input the statements as string; break it into tokens; test each token to see if it is a valid token; and then check the syntax of the statement and if it is in the format of the main rule which defines an if statement.

Am I correct? This was assigned and it seemed to sounded too easy initially.