mirror of
https://github.com/correl/mercenary.git
synced 2024-11-23 11:09:50 +00:00
Correcting includes and namespaces for Boost Spirit Classic
This commit is contained in:
parent
4c4f54bfc6
commit
17e73fa9dc
2 changed files with 8 additions and 8 deletions
|
@ -11,10 +11,10 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/spirit/core.hpp>
|
#include <boost/spirit/include/classic_core.hpp>
|
||||||
#include <boost/spirit/utility/confix.hpp>
|
#include <boost/spirit/include/classic_confix.hpp>
|
||||||
#include <boost/spirit/dynamic/if.hpp>
|
#include <boost/spirit/include/classic_if.hpp>
|
||||||
#include <boost/spirit/iterator/position_iterator.hpp>
|
#include <boost/spirit/include/classic_position_iterator.hpp>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -26,7 +26,7 @@ class MIRCScriptManager;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace boost;
|
using namespace boost;
|
||||||
using namespace boost::spirit;
|
using namespace boost::spirit::classic;
|
||||||
|
|
||||||
typedef QMap<QString, QString> mirc_variables;
|
typedef QMap<QString, QString> mirc_variables;
|
||||||
typedef position_iterator<char const*> iterator_t;
|
typedef position_iterator<char const*> iterator_t;
|
||||||
|
|
|
@ -20,7 +20,7 @@ bool MIRCScript::load(QString filename) {
|
||||||
|
|
||||||
bool MIRCScript::parse(QString code) {
|
bool MIRCScript::parse(QString code) {
|
||||||
const char* _code = code.toLatin1();
|
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;
|
loaded = info.full;
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
script = interpreter->script.code;
|
script = interpreter->script.code;
|
||||||
|
@ -41,9 +41,9 @@ bool MIRCScript::run() {
|
||||||
const char* _code = (const char*)script.toLatin1();
|
const char* _code = (const char*)script.toLatin1();
|
||||||
begin = new iterator_t(_code, _code+strlen(_code));
|
begin = new iterator_t(_code, _code+strlen(_code));
|
||||||
end = new iterator_t();
|
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) {
|
if (info.full) {
|
||||||
_variables = interpreter->vars;
|
_variables = interpreter->vars;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue