Browse Source

Merge pull request #212 from programmerTim/develop

Fixed MSVC compile errors (but missing functionality in LLL parser)
cl-refactor
Gav Wood 11 years ago
parent
commit
d6052f5c91
  1. 9
      liblll/Parser.cpp
  2. 4
      neth/main.cpp

9
liblll/Parser.cpp

@ -87,9 +87,16 @@ void eth::parseTreeLLL(string const& _s, sp::utree& o_out)
qi::rule<it, qi::ascii::space_type, sp::utree::list_type()> sload = qi::lit("@@") > element;
qi::rule<it, qi::ascii::space_type, sp::utree::list_type()> mstore = '[' > element > ']' > -qi::lit(":") > element;
qi::rule<it, qi::ascii::space_type, sp::utree::list_type()> sstore = qi::lit("[[") > element > qi::lit("]]") > -qi::lit(":") > element;
qi::rule<it, qi::ascii::space_type, sp::utree()> extra = sload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 2)] | mload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 1)] | sstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 4)] | mstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 3)] | seq[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 5)];
qi::rule<it, qi::ascii::space_type, sp::utree::list_type()> list = '(' > *element > ')';
// todo: fix compound compile errors in this line for Visual Studio 2013
#ifndef _MSC_VER
qi::rule<it, qi::ascii::space_type, sp::utree()> extra = sload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 2)] | mload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 1)] | sstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 4)] | mstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 3)] | seq[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 5)];
element = atom | list | extra;
#else
element = atom | list/* | extra*/;
#endif
string s;
s.reserve(_s.size());

4
neth/main.cpp

@ -1022,7 +1022,7 @@ vector<string> form_dialog(vector<string> _sv, vector<string> _lv, vector<string
int _lfields = _lv.size();
int _bfields = _bv.size();
int maxfields = _sfields + _lfields + _bfields;
FIELD *field[maxfields];
vector<FIELD*> field(maxfields);
int ch;
int starty = 6;
@ -1061,7 +1061,7 @@ vector<string> form_dialog(vector<string> _sv, vector<string> _lv, vector<string
field[maxfields] = NULL;
// Create the form and post it
FORM *form = new_form(field);
FORM *form = new_form(field.data());
// Calculate the area required for the form
scale_form(form, &_rows, &_cols);

Loading…
Cancel
Save