You want to execute commands in the order that they arrive except for the special "stop" command that jumps the queue?
I'm thinking that perhaps a button would be better than a command.
Is this G-code? I see some G's. There are a number of good G-code programs available for the Arduino. Start with one of them. They might seem complex to start with but you're creating your own spaghetti code that will be more complex by the time you finish.