array_t parse_eve_expression(const std::string& str_expression) { std::stringstream expression_stream(str_expression); expression_parser parser(expression_stream, line_position_t("expression")); parser.set_keyword_extension_lookup(boost::bind(&eve_keyword_lookup, _1)); array_t expression; parser.require_expression(expression); return expression; }
inline void parse_xml_fragment(uchar_ptr_t fragment, std::size_t n, O output) { const implementation::context_frame_t& context(implementation::top_frame()); make_xml_parser( fragment, fragment + n, line_position_t("parse_xml_fragment"), always_true<token_range_t>(), boost::bind(&implementation::context_frame_t::element_handler, boost::cref(context), _1, _2, _3, _4), output) .parse_content(); // REVISIT (fbrereto) : More or less legible than having it after the above declaration? }
array_t parse_adam_expression(const std::string& str_expression) { once_instance(); std::stringstream expression_stream(str_expression); adobe::expression_parser parser(expression_stream, line_position_t("expression")); parser.set_keyword_extension_lookup(boost::bind(&keyword_lookup, _1)); adobe::array_t expression; parser.require_expression(expression); return expression; }
xstring_context_t( const char* parse_first, const char* parse_last, const line_position_t& parse_info = line_position_t("xstring_context_t")) : back_frame_m(implementation::top_frame()) // save snapshot of stack { implementation::context_frame_t& context(implementation::top_frame()); context.slurp_m.first = reinterpret_cast<uchar_ptr_t>(parse_first); context.slurp_m.second = reinterpret_cast<uchar_ptr_t>(parse_last); context.parse_info_m = parse_info; context.parsed_m = false; glossary_parse(); }
xstring_context_t( I first_attribute, I last_attribute, const unsigned char* parse_first, const unsigned char* parse_last, const line_position_t& parse_info = line_position_t("xstring_context_t")) : back_frame_m(implementation::top_frame()) // save snapshot of stack { implementation::context_frame_t& context(implementation::top_frame()); context.attribute_set_m.insert(first_attribute, last_attribute); context.slurp_m.first = parse_first; context.slurp_m.second = parse_last; context.parse_info_m = parse_info; context.parsed_m = false; glossary_parse(); }
std::unique_ptr<eve_client_holder> make_view(name_t file_path, const line_position_t::getline_proc_t& getline_proc, std::istream& stream, sheet_t& sheet, behavior_t& root_behavior, const button_notifier_t& notifier, size_enum_t dialog_size, const widget_factory_proc_t& proc, platform_display_type display_root) { std::unique_ptr<eve_client_holder> result{new eve_client_holder(root_behavior)}; factory_token_t token{sheet, *(result.get()), notifier}; vm_lookup_t lookup; lookup.attach_to(result->layout_sheet_m.machine_m); /* We set the initial parent to be the root of the main display, an empty eve iterator and the given dialog size. */ get_main_display().set_root(display_root); result->layout_sheet_m.machine_m.set_variable_lookup(boost::bind(&adobe::layout_variables, boost::ref(result->layout_sheet_m), _1)); parse(stream, line_position_t(file_path, getline_proc), widget_node_t(dialog_size, eve_t::iterator(), get_main_display().root(), keyboard_t::iterator()), bind_layout(boost::bind(&client_assembler, boost::ref(token), _1, _2, _3, boost::cref(proc)), result->layout_sheet_m, result->layout_sheet_m.machine_m)); result->contributing_m = sheet.contributing(); return result; }