Just finished up a new command parser for any interface that uses Print::write (e.g. Serial). The goal of the project was to have something that is simple to use to get quick debug commands up and running when starting a new project. The project uses a LUA like pattern matching lib (similar to regexp) available here:
http://www.gammon.com.au/forum/?id=11063.
It's not the most efficient piece of code from a size or speed standpoint, but that isn't the intention at this point. It's really just supposed to be easy to get running and have a flexible syntax. Using the pattern matching lib allows for this and extraction of parameters. So you can match input strings from a serial port like:
set foo 24
with the pattern:
"^set foo (%d+)$"
and easily get to the '24' argument in the callback (this is called a capture).
To use it, import the lib into your project (and the regexp lib above). Then just define a set of patterns to look for in the data and a callback that is activated when a match is found (one callback per match string).
You can get the code here: GitHub - delsauce/YASP: Serial command processor for Arduino that uses LUA-like pattern matching (similar to Regexp)
Happy to hear from others on suggestions for improving its usefulness.