By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,192 Members | 855 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,192 IT Pros & Developers. It's quick & easy.

Recommendation for simple command parser

P: n/a
Hi,

I'm searching for a portable library, providing some sort of
parsing functionality. The library should help to encode and
decodes command phrases. Commands are plain text C-strings,
consisting of a command name and parameters (defined by parameter
name and value); e.g.:

command{param1{123}param2{ghij}param3{1.234}param4 {param5{param6{x}param7{0}}}}

where
- command is the command name
- paramX are parameter names
- parameters may consist of other parameters

Background:
I need such parser for the communication between a host based library
and an embedded system, which interacts with the host via a
stream-based communication channel (TCP/IP, USB or memory mapped).

Thanks in advance,
Ratbert
Mar 13 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ratbert ,comp.lang.c++:
I'm searching for a portable library, providing some sort of
parsing functionality. The library should help to encode and
decodes command phrases. Commands are plain text C-strings,
consisting of a command name and parameters (defined by parameter
name and value); e.g.:

command{param1{123}param2{ghij}param3{1.234}param4 {param5{param6{x}param7{0}}}}
You can have a look at Boost.Spirit: http://spirit.sourceforge.net/

Or you could use something like lex/yacc.
Mar 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.