I have a language that consists of instructions for movement on a 2D-plane. You start at coordinate [0,0]
DOWN 1 UP 10 LEFT 5 RIGHT 1
means you will move to coordinate [9,-4].
There is also the REP command which means you perform the instructions inside the REP X times.
REP 2 "DOWN 1 FORWARD 10 LEFT 5 RIGHT 1"
means you will move to coordinate [18,-8].
I came up with this grammar
Instruction --> DOWN Num | UP Num | LEFT Num | Right Num | REP Num " Sequence " Sequence --> Instruction Sequence | Instruction
Which works to some extent. However I want to be able to parse the grammar using recursive descent and if I am not not mistaken you can't do that with grammars that use left recursion.
Any ideas on how I could alter my grammar to make it suitable for recursive descent?