eve_parser.hpp
Go to the documentation of this file.
00001 /* 00002 Copyright 2005-2007 Adobe Systems Incorporated 00003 Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt 00004 or a copy at http://stlab.adobe.com/licenses.html) 00005 */ 00006 00007 /*************************************************************************************************/ 00008 00009 #ifndef ADOBE_EVE_PARSER_HPP 00010 #define ADOBE_EVE_PARSER_HPP 00011 00012 #include <adobe/config.hpp> 00013 00014 #include <string> 00015 00016 #include <boost/any.hpp> 00017 #include <boost/function.hpp> 00018 00019 #include <adobe/array.hpp> 00020 #include <adobe/string.hpp> 00021 #include <adobe/istream.hpp> 00022 #include <adobe/name_fwd.hpp> 00023 #include <adobe/vector.hpp> 00024 00025 /*************************************************************************************************/ 00026 00151 /*************************************************************************************************/ 00152 00153 namespace adobe { 00154 00155 /*************************************************************************************************/ 00156 00157 struct eve_callback_suite_t 00158 { 00159 enum cell_type_t 00160 { 00161 constant_k, 00162 logic_k, 00163 interface_k 00164 }; 00165 00166 struct relation_t 00167 { 00168 vector<name_t> name_set_m; 00169 line_position_t position_m; 00170 array_t expression_m; 00171 string_t detailed_m; 00172 string_t brief_m; 00173 }; 00174 00175 typedef boost::any position_t; 00176 00177 typedef boost::function<position_t ( const position_t& parent, 00178 const line_position_t& parse_location, 00179 name_t name, 00180 const array_t& parameters, 00181 const string_t& brief, 00182 const string_t& detailed)> add_view_proc_t; 00183 00184 typedef boost::function<void ( cell_type_t type, 00185 name_t name, 00186 const line_position_t& position, 00187 const array_t& initializer, 00188 const string_t& brief, 00189 const string_t& detailed)> add_cell_proc_t; 00190 00191 typedef boost::function<void ( const line_position_t& position, 00192 const array_t& conditional, 00193 const relation_t* first, 00194 const relation_t* last, 00195 const string_t& brief, 00196 const string_t& detailed)> add_relation_proc_t; 00197 00198 typedef boost::function<void ( name_t cell_name, 00199 bool linked, 00200 const line_position_t& position1, 00201 const array_t& initializer, 00202 const line_position_t& position2, 00203 const array_t& expression, 00204 const string_t& brief, 00205 const string_t& detailed)> add_interface_proc_t; 00206 00207 typedef boost::function<void()> finalize_sheet_proc_t; 00208 00209 00210 add_view_proc_t add_view_proc_m; 00211 add_cell_proc_t add_cell_proc_m; 00212 finalize_sheet_proc_t finalize_sheet_proc_m; 00213 add_relation_proc_t add_relation_proc_m; 00214 add_interface_proc_t add_interface_proc_m; 00215 }; 00216 00217 line_position_t parse(std::istream& in, const line_position_t&, 00218 const eve_callback_suite_t::position_t&, const eve_callback_suite_t&); 00219 00220 /*************************************************************************************************/ 00221 00222 } // namespace adobe 00223 00224 /*************************************************************************************************/ 00225 00226 #endif // ADOBE_EVE_PARSER_HPP 00227 00228 /*************************************************************************************************/ |