1 #ifndef GGL_CHEM_MOLECULECOMPONENT_GML_GRAMMAR_HH_
2 #define GGL_CHEM_MOLECULECOMPONENT_GML_GRAMMAR_HH_
11 #if HAVE_UNORDERED_MAP > 0
12 #include <unordered_map>
13 #elif HAVE_TR1_UNORDERED_MAP > 0
14 #include <tr1/unordered_map>
15 #elif HAVE_GNU_HASH_MAP > 0
16 #include <ext/hash_map>
22 #if !defined(BOOST_SPIRIT_CLOSURE_LIMIT)
23 #define BOOST_SPIRIT_CLOSURE_LIMIT 5
24 #elif BOOST_SPIRIT_CLOSURE_LIMIT < 5
25 #error "GGL_CHEM_MOLECULECOMPONENT_GML_GRAMMAR : BOOST_SPIRIT_CLOSURE_LIMIT too low, has to be at least 5"
29 #if !defined(PHOENIX_LIMIT)
30 #define PHOENIX_LIMIT 5
31 #elif PHOENIX_LIMIT < 5
32 #error "GGL_CHEM_MOLECULECOMPONENT_GML_GRAMMAR : PHOENIX_LIMIT too low, has to be at least 5"
35 #include <boost/version.hpp>
36 #if BOOST_VERSION >= 103800
37 #include <boost/spirit/include/classic.hpp>
38 #include <boost/spirit/include/phoenix1.hpp>
39 #include <boost/spirit/include/classic_actor.hpp>
40 #define NS_BOOSTSPIRIT boost::spirit::classic
42 #include <boost/spirit.hpp>
43 #include <boost/spirit/phoenix.hpp>
44 #include <boost/spirit/actor.hpp>
45 #define NS_BOOSTSPIRIT boost::spirit
95 :
public NS_BOOSTSPIRIT::grammar< MoleculeComponent_GML_grammar >
102 #if HAVE_UNORDERED_MAP > 0
103 std::unordered_map<int, size_t>
104 #elif HAVE_TR1_UNORDERED_MAP > 0
105 std::tr1::unordered_map<int, size_t>
107 std::map<int, size_t>
134 std::pair< MoleculeComponent, int >
135 parseGML(
const std::string & GML_string )
throw (std::invalid_argument);
139 template <
typename ScannerT>
150 NS_BOOSTSPIRIT::rule<ScannerT>
const&
160 boost::property_map< MoleculeComponent::PatternGraph, PropNodeLabel>::type
164 boost::property_map< MoleculeComponent::PatternGraph, PropEdgeLabel>::type
215 void store_node(
void) throw (std::invalid_argument);
221 void store_edge(
void) throw (std::invalid_argument);
249 #include "ggl/chem/MoleculeComponent_GML_grammar.icc"