Gmane
Picon
From: Jascha Wetzel <jw <at> mainia.de>
Subject: gen_pt_node_d/gen_ast_node_d patch
Newsgroups: gmane.comp.parsers.spirit.general
Date: 2005-05-19 20:22:28 GMT (3 years, 8 weeks, 4 days, 15 hours and 46 minutes ago)
Hi,

i tried to write a grammar with ast tree generation and had problems using
the gen_pt_node_d directive. It turned out that i had to patch
spirit/core/scanner/scanner.hpp to get it working.

This is the grammar i'm writing:
http://www.threedeevee.com/VRMLGrammar.h

I changed one initializer of a constructor of template-class
scanner_policies in spirit/core/scanner/scanner.hpp of spirit v1.8.1 (v1.8.2
has the same declaration).

This is the old declaration:

template <typename ScannerPoliciesT>
scanner_policies(ScannerPoliciesT const& policies)
: IterationPolicyT(policies)
, MatchPolicyT(policies)
, ActionPolicyT(policies) {}

changing the MatchPolicyT initiatlizer makes the above grammar work:

, MatchPolicyT()

I found this by just tracing error messages, I don't have enough insight
into the code to tell whether there is a better solution. It would be nice
if someone could either tell me that this wasn't necessary, or maybe add
this patch to the code base if useful.

Regards,
Jascha

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click