Boost logo

Boost :

From: Anand Narayan (anand_narayanan1977_at_[hidden])
Date: 2003-04-16 11:17:45

I am trying to parse the following strings

"*IDN?" , "*SRE?" and "*SRE number" (eg : *SRE 121)

I wrote the following grammar

IeeeMessage = longest_d
[ (IdnQuery) [&PrintIdnQuery]
| (SreQuery) [&PrintSreQuery]
| (SreCommand) [&PrintSreCommand]

IdnQuery = as_lower_d["*idn?"];
SreQuery = SreKeyWord >> '?';
SreCommand = SreKeyWord >> blank_p >> real_p;
SreKeyWord = ch_p('*') >> as_lower_d ["sre"];

I call the parse method using the skip parser space_p.

For some reason when I send in *sre 123 it fails. When
I remove the blank_p in the rule SreCommand, it works
with *sre123. Can anyone tell me what I am doing

Thanks a ton,

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo

Boost list run by bdawes at, gregod at, cpdaniel at, john at