This program forms a parse tree from an input string that follows a pre-defined grammar using backtracking.