37 #ifndef PARSER_TYPES_HPP 38 #define PARSER_TYPES_HPP 42 #include <boost/version.hpp> 44 #if BOOST_VERSION >= 103800 45 #include <boost/spirit/include/classic.hpp> 46 #include <boost/spirit/include/classic_dynamic.hpp> 47 namespace boost_spirit = boost::spirit::classic;
49 #include <boost/spirit.hpp> 50 namespace boost_spirit = boost::spirit;
52 #include "../base/ActionInterface.hpp" 55 #undef interface // To avoid name clash with namespace interface and Windows SDK objbase.h included through boost/spirit 58 {
namespace scripting {
60 using namespace boost_spirit;
75 #pragma optimize( "", off) 96 template <
typename ScannerT>
98 operator()(ScannerT
const& scan, result_t& result)
const {
99 if (scan.at_end() || skipeol == false )
104 if ( *scan ==
'\r') {
109 if ( !scan.at_end() && *scan ==
'\n') {
122 #pragma optimize( "", on) 128 # define SKIP_PARSER \ 129 ( comment_p( "#" ) | comment_p( "//" ) | \ 130 comment_p( "" ) | (space_p - eol_p) | functor_parser<eol_skip_functor>( eol_skip_functor(skipref) ) ) 140 typedef boost_spirit::alternative<boost_spirit::alternative<boost_spirit::alternative<boost_spirit::alternative<boost_spirit::confix_parser<boost_spirit::impl::string_as_parser::type,boost_spirit::kleene_star<boost_spirit::anychar_parser>,boost_spirit::alternative<boost_spirit::eol_parser,boost_spirit::end_parser>,boost_spirit::unary_parser_category,boost_spirit::non_nested,boost_spirit::is_lexeme>,boost_spirit::confix_parser<boost_spirit::impl::string_as_parser::type,boost_spirit::kleene_star<boost_spirit::anychar_parser>,boost_spirit::alternative<boost_spirit::eol_parser,boost_spirit::end_parser>,boost_spirit::unary_parser_category,boost_spirit::non_nested,boost_spirit::is_lexeme> >,boost_spirit::confix_parser<boost_spirit::impl::string_as_parser::type,boost_spirit::kleene_star<boost_spirit::anychar_parser>,boost_spirit::impl::string_as_parser::type,boost_spirit::unary_parser_category,boost_spirit::non_nested,boost_spirit::is_lexeme> >,boost_spirit::difference<boost_spirit::space_parser,boost_spirit::eol_parser> >,boost_spirit::functor_parser<eol_skip_functor> >
skip_parser_t;
163 # define SKIP_PARSER \ 164 ( comment_p( "#" ) | comment_p( "//" ) | \ 165 comment_p( "" ) | (space_p - eol_p) ) 170 typedef skip_parser_iteration_policy<skip_parser_t>
iter_pol_t;
our_buffer_t::iterator our_iterator_t
#define SKIP_PARSER
When using this macro, you must have a boolean variable skipref defined.
std::ptrdiff_t operator()(ScannerT const &scan, result_t &result) const
#define RTT_SCRIPTING_API
eol_skip_functor(eol_skip_functor const &orig)
scanner< iter_t, scanner_pol_t > scanner_t
position_iterator< our_iterator_t > our_pos_iter_t
skip_parser_iteration_policy< skip_parser_t > iter_pol_t
boost_spirit::alternative< boost_spirit::alternative< boost_spirit::alternative< boost_spirit::alternative< boost_spirit::confix_parser< boost_spirit::impl::string_as_parser::type, boost_spirit::kleene_star< boost_spirit::anychar_parser >, boost_spirit::alternative< boost_spirit::eol_parser, boost_spirit::end_parser >, boost_spirit::unary_parser_category, boost_spirit::non_nested, boost_spirit::is_lexeme >, boost_spirit::confix_parser< boost_spirit::impl::string_as_parser::type, boost_spirit::kleene_star< boost_spirit::anychar_parser >, boost_spirit::alternative< boost_spirit::eol_parser, boost_spirit::end_parser >, boost_spirit::unary_parser_category, boost_spirit::non_nested, boost_spirit::is_lexeme > >, boost_spirit::confix_parser< boost_spirit::impl::string_as_parser::type, boost_spirit::kleene_star< boost_spirit::anychar_parser >, boost_spirit::impl::string_as_parser::type, boost_spirit::unary_parser_category, boost_spirit::non_nested, boost_spirit::is_lexeme > >, boost_spirit::difference< boost_spirit::space_parser, boost_spirit::eol_parser > >, boost_spirit::functor_parser< eol_skip_functor > > skip_parser_t
stored_rule< scanner_t > stored_rule_t
Due to a bug in MSVC 2005, the operator() ends up with a null reference of the skipeol member Tried s...
rule< lexeme_scanner< scanner_t >::type > lexeme_rule_t
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
eol_skip_functor(bool &skipref)
By default, eol are skipped.
scanner_policies< iter_pol_t > scanner_pol_t