I am working on an embedded system project. It is on ARM M3-Cortex platform. The equipment I am working with, is a measurement controller. It can be connected to a PC and takes some commands. I try to design the command parser but have seen totally different approaches on internet. There are more than 30 commands. Each command can have different arguments: e.g. command Date:? will ask for the date, so the device LCD should show the date, but command Date:2012,05,30 should set the date. Some commands are even more complex and have different types of arguments, i.e., the algorithm and the data structure should be intelligently designed. 
Do you have any clue or recommendation. Thanks buddies :)