Boost logo

Boost Users :

From: GIE (gie_at_[hidden])
Date: 2003-10-27 18:20:49

Hello, Hartmut!
You wrote to "'Boost Users mailing list'" <boost-users_at_[hidden]> :

??>> What is "proper way" of implementing result value of parser,
??>> have i implement new parser or can (and how?) i use grammar
??>> construct with user defined result value that can be passed
??>> to attached action (for ex. matched GUID returning)?
HK> Grammars may have return values! By convention the first member of a
HK> closure associated with the grammar is used as its return value. See
HK> the docs for details.

Thanks. Found that. But, because of mine little knowledge of FP i
got many new problems.

I have struct member declared something like that: 'unsigned char Data4[
8 ];' and 'bind(&GUID::Data4[0])(self.val) = arg1' in action call produces
compile time error :(

And it seams that i can't apply 'bind(&GUID::Data1)(self.val) = arg1' in
subrules, got compiler error.

??>> What is performance penalty for using vectors (they need
??>> realloc, don't they) in ast trees?

HK> Not known so far. Try it out and report it to the list. I'm sure this
HK> would be interesting to know for many of us.

As soon as i can go throught the 'hell' of C++ MP&FP and finally write
parser :)

??>> And is there anyway to store scanner defined result in tree,
??>> besides using user-specified value in node_val_data and type
??>> casting it to specific type depending of node id?
HK> What do you mean with 'scanner defined result'?

My mistake, should be 'parser defined result'.

With best regards, GIE.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at