Correcting includes and namespaces for Boost Spirit Classic

This commit is contained in:
Correl Roush 2010-06-04 16:23:20 -04:00
parent 4c4f54bfc6
commit 17e73fa9dc
2 changed files with 8 additions and 8 deletions

View file

@ -11,10 +11,10 @@
#include <string.h>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/spirit/core.hpp>
#include <boost/spirit/utility/confix.hpp>
#include <boost/spirit/dynamic/if.hpp>
#include <boost/spirit/iterator/position_iterator.hpp>
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_confix.hpp>
#include <boost/spirit/include/classic_if.hpp>
#include <boost/spirit/include/classic_position_iterator.hpp>
#include <QObject>
#include <QString>
@ -26,7 +26,7 @@ class MIRCScriptManager;
using namespace std;
using namespace boost;
using namespace boost::spirit;
using namespace boost::spirit::classic;
typedef QMap<QString, QString> mirc_variables;
typedef position_iterator<char const*> iterator_t;

View file

@ -20,7 +20,7 @@ bool MIRCScript::load(QString filename) {
bool MIRCScript::parse(QString code) {
const char* _code = code.toLatin1();
parse_info<> info = boost::spirit::parse((const char*)code.toLatin1(), *parser);
parse_info<> info = boost::spirit::classic::parse((const char*)code.toLatin1(), *parser);
loaded = info.full;
if (loaded) {
script = interpreter->script.code;
@ -41,9 +41,9 @@ bool MIRCScript::run() {
const char* _code = (const char*)script.toLatin1();
begin = new iterator_t(_code, _code+strlen(_code));
end = new iterator_t();
parse_info<iterator_t> info = boost::spirit::parse(*begin, *end, *parser);
parse_info<iterator_t> info = boost::spirit::classic::parse(*begin, *end, *parser);
*/
parse_info<> info = boost::spirit::parse((const char*)script.toLatin1(), *parser);
parse_info<> info = boost::spirit::classic::parse((const char*)script.toLatin1(), *parser);
if (info.full) {
_variables = interpreter->vars;
}