Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27679/adobe/source Added Files: adam.cpp adam_evaluate.cpp adam_parser.cpp array.cpp dictionary.cpp eve.cpp eve_engine.cpp eve_evaluate.cpp eve_parser.cpp expression_parser.cpp expression_parser.hpp istream.cpp lex_stream.cpp lex_stream.hpp lex_stream_fwd.hpp metrowerks_mach_o.hpp name.cpp parse.cpp parse_pdf.cpp parser_shared.cpp parser_shared.hpp rectangle.cpp string_pool.cpp string_pool.hpp test_configuration.cpp token.cpp token.hpp typeinfo.cpp value.cpp virtual_machine.cpp xstr.cpp Log Message: SO SORRY for the large qty of emails -- creating a branch for Adobe Begin refactoring. --- NEW FILE: xstr.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <adobe/xstr.hpp> #include <adobe/config.hpp> #include <adobe/name.hpp> #include <adobe/dictionary.hpp> #include <adobe/once.hpp> #include <adobe/algorithm.hpp> #include <adobe/functional.hpp> #include <vector> #include <map> [...1015 lines suppressed...] node_t::attribute_set_t::const_iterator first(default_context_g->begin()); node_t::attribute_set_t::const_iterator last(default_context_g->end()); for (; first != last; ++first) dict[first->first] = adobe::value_t(first->second); } return result; } /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ ADOBE_ONCE_DEFINITION(xstr_once, init_xstr_once) /*************************************************************************************************/ --- NEW FILE: adam_parser.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <utility> #include <istream> #include <sstream> #include <iomanip> #include <cassert> #include <boost/bind.hpp> #include <boost/array.hpp> #include <adobe/once.hpp> #include <adobe/array.hpp> #include <adobe/name.hpp> #include <adobe/value.hpp> #include <adobe/dictionary.hpp> #include <adobe/algorithm.hpp> #include <adobe/source/token.hpp> #include <adobe/adam_parser.hpp> #include <adobe/source/expression_parser.hpp> #include <adobe/adam.hpp> /*************************************************************************************************/ /* TODO (sparent) : Changes to grammar - * 1. input/output qualifiers go away - auto-detect qualification. * 2. State cells go away. * 3. non_reversible goes away (need to add some kind of idempotent check). 4. Add relate clause * 5. Question: Does "relation_set" go away? What are they for? 6. The current relation sets should be renamed if they stay - what is in relate is a relation set. 7. Need to add some way to declare validity predicate. * 8. Question: Do "when" and "after" conditionals only apply to relate clauses? For optional items ensure that if present - the following items are required. after is currently not connected. */ /*************************************************************************************************/ namespace { void init_keyword_table(); } ADOBE_ONCE_DECLARATION(adobe_adam_parser) ADOBE_ONCE_DEFINITION(adobe_adam_parser, init_keyword_table) /*************************************************************************************************/ namespace { /*************************************************************************************************/ typedef boost::array<adobe::name_t, 10> keyword_table_t; /*************************************************************************************************/ /* WARNING (sparent) : Initialization of these once_name_t items is defered until adam_parser::adam_parser(). */ keyword_table_t* keyword_table_g; const adobe::once_name_t input_k; const adobe::once_name_t output_k; const adobe::once_name_t interface_k; const adobe::once_name_t logic_k; const adobe::once_name_t constant_k; const adobe::once_name_t invariant_k; const adobe::once_name_t sheet_k; const adobe::once_name_t unlink_k; const adobe::once_name_t when_k; const adobe::once_name_t relate_k; /*************************************************************************************************/ void init_keyword_table() { adobe::remove_const(input_k) = adobe::static_name_t("input"); adobe::remove_const(output_k) = adobe::static_name_t("output"); adobe::remove_const(interface_k) = adobe::static_name_t("interface"); adobe::remove_const(logic_k) = adobe::static_name_t("logic"); adobe::remove_const(constant_k) = adobe::static_name_t("constant"); adobe::remove_const(invariant_k) = adobe::static_name_t("invariant"); adobe::remove_const(sheet_k) = adobe::static_name_t("sheet"); adobe::remove_const(unlink_k) = adobe::static_name_t("unlink"); adobe::remove_const(when_k) = adobe::static_name_t("when"); adobe::remove_const(relate_k) = adobe::static_name_t("relate"); static keyword_table_t keyword_table_s = {{ input_k, output_k, interface_k, logic_k, constant_k, invariant_k, sheet_k, unlink_k, when_k, relate_k }}; adobe::sort(keyword_table_s); keyword_table_g = &keyword_table_s; } /*************************************************************************************************/ bool keyword_lookup(const adobe::name_t& name) { keyword_table_t::const_iterator iter(adobe::lower_bound(*keyword_table_g, name)); return (iter != keyword_table_g->end() && *iter == name); } void once_instance() { ADOBE_ONCE_INSTANCE(adobe_adam_parser); } /*************************************************************************************************/ } // namespace /*************************************************************************************************/ /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ /*! \page adam_grammar Adam Grammar \code translation_unit = { sheet_specifier }. sheet_specifier = [lead_comment] "sheet" identifier "{" { qualified_cell_decl } "}" [trail_comment]. qualified_cell_decl = interface_set_decl | input_set_decl | output_set_decl | constant_set_decl | logic_set_decl | invariant_set_decl. interface_set_decl = "interface" ":" { [lead_comment] interface_cell_decl }. input_set_decl = "input" ":" { [lead_comment] input_cell_decl }. output_set_decl = "output" ":" { [lead_comment] output_cell_decl }. constant_set_decl = "constant" ":" { [lead_comment] constant_cell_decl }. logic_set_decl = "logic" ":" { [lead_comment] logic_cell_decl }. invariant_set_decl = "invariant" ":" { [lead_comment] invariant_cell_decl }. interface_cell_decl = ["unlink"] identifier [initializer] [define_expression] end_statement. input_cell_decl = identifier [initializer] end_statement. output_cell_decl = named_decl. constant_cell_decl = identifier initializer end_statement. logic_cell_decl = named_decl | relate_decl. invariant_cell_decl = named_decl. relate_decl = [conditional] "relate" "{" relate_expression relate_expression { relate_expression } "}" [trail_comment]. relate_expression = [lead_comment] named_decl. named_decl = identifier define_expression end_statement. initializer = ":" expression. conditional = "when" "(" expression ")". define_expression = "<==" expression. end_statement = ";" [trail_comment]. \endcode */ /*************************************************************************************************/ class adam_parser : private expression_parser { public: adam_parser(std::istream& in, const line_position_t& position, const adam_callback_suite_t& callbacks); using expression_parser::require_expression; // Export is_expression for client // translation_unit = { sheet_specifier }. void parse(); private: typedef adam_callback_suite_t::relation_t relation_t; typedef std::vector<relation_t> relation_set_t; adam_callback_suite_t adam_callback_suite_m; // sheet_specifier = [lead_comment] "sheet" identifier "{" { qualified_cell_decl } "}" [trail_comment]. bool is_sheet_specifier(); // qualified_cell_decl = interface_set_decl | input_set_decl | output_set_decl // | constant_set_decl | logic_set_decl | invariant_set_decl. bool is_qualified_cell_decl(); // interface_set_decl = "interface" ":" { [lead_comment] interface_cell_decl }. bool is_interface_set_decl(); // input_set_decl = "input" ":" { [lead_comment] input_cell_decl }. bool is_input_set_decl(); // output_set_decl = "output" ":" { [lead_comment] output_cell_decl }. bool is_output_set_decl(); // constant_set_decl = "constant" ":" { [lead_comment] constant_cell_decl }. bool is_constant_set_decl(); // logic_set_decl = "logic" ":" { [lead_comment] logic_cell_decl }. bool is_logic_set_decl(); // invariant_set_decl = "invariant" ":" { [lead_comment] invariant_cell_decl }. bool is_invariant_set_decl(); // interface_cell_decl = ["unlink"] identifier [initializer] [define_expression] end_statement. bool is_interface_cell_decl(const std::string& detailed); // input_cell_decl = identifier [initializer] end_statement. bool is_input_cell_decl(const std::string& detailed); // output_cell_decl = named_decl. bool is_output_cell_decl(const std::string& detailed); // constant_cell_decl = identifier initializer end_statement. bool is_constant_cell_decl(const std::string& detailed); // logic_cell_decl = named_decl | relate_decl. bool is_logic_cell_decl(const std::string& detailed); // invariant_cell_decl = named_decl. bool is_invariant_cell_decl(const std::string& detailed); // relate_decl = [conditional] "relate" "{" relate_expression relate_expression { relate_expression } "}" [trail_comment]. bool is_relate_decl(line_position_t& position, array_t& expression, relation_set_t&, std::string&); // relate_expression = [lead_comment] named_decl. bool is_relate_expression_decl(relation_t&); // named_decl = identifier define_expression end_statement. bool is_named_decl(name_t& cell_name, line_position_t& position, array_t& expression, std::string&); // initializer = ":" expression. bool is_initializer(line_position_t&, array_t& initializer); // conditional = "when" "(" expression ")". bool is_conditional(line_position_t& position, array_t& expression); // define_expression = "<==" expression. bool is_define_expression(line_position_t&, array_t&); // end_statement = ";" [trail_comment]. void require_end_statement(std::string& brief); typedef void (sheet_t::*sheet_add_t)(name_t, const relation_t&); typedef bool (adam_parser::*set_decl_t)(const std::string& detailed); bool is_logic_or_invariant_cell_decl(sheet_add_t); bool is_set_decl(name_t, set_decl_t); }; /*************************************************************************************************/ adam_parser::adam_parser(std::istream& in, const line_position_t& position, const adam_callback_suite_t& callbacks) : expression_parser(in, position), adam_callback_suite_m(callbacks) { once_instance(); set_keyword_extension_lookup(boost::bind(&keyword_lookup, _1)); assert(adam_callback_suite_m.add_cell_proc_m); // all callbacks are required. assert(adam_callback_suite_m.add_relation_proc_m); assert(adam_callback_suite_m.add_interface_proc_m); } /*************************************************************************************************/ void parse(std::istream& stream, const line_position_t& position, const adam_callback_suite_t& callbacks) { adam_parser(stream, position, callbacks).parse(); } /*************************************************************************************************/ 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; } /*************************************************************************************************/ /* REVISIT (sparent) : sheets need to become copy-on-write and then this should return a list of sheets. */ void adam_parser::parse() { while (is_sheet_specifier()) ; require_token(eof_k); } /*************************************************************************************************/ // sheet_specifier = [lead_comment] "sheet" identifier "{" { qualified_cell_decl } "}" [trail_comment]. bool adam_parser::is_sheet_specifier() { is_token(lead_comment_k); if (!is_token(sheet_k)) return false; require_token(identifier_k); require_token(open_brace_k); while (is_qualified_cell_decl()) { } require_token(close_brace_k); is_token(trail_comment_k); return true; } /*************************************************************************************************/ // qualified_cell_decl = interface_set_decl | input_set_decl | output_set_decl // | constant_set_decl | logic_set_decl | invariant_set_decl. bool adam_parser::is_qualified_cell_decl() { if ( is_interface_set_decl() || is_input_set_decl() || is_output_set_decl() || is_constant_set_decl() || is_logic_set_decl() || is_invariant_set_decl()) { return true; } return false; } /*************************************************************************************************/ // interface_set_decl = "interface" ":" { [lead_comment] interface_cell_decl }. bool adam_parser::is_interface_set_decl() { return is_set_decl(interface_k, &adam_parser::is_interface_cell_decl); } /*************************************************************************************************/ // input_set_decl = "input" ":" { [lead_comment] input_cell_decl }. bool adam_parser::is_input_set_decl() { return is_set_decl(input_k, &adam_parser::is_input_cell_decl); } /*************************************************************************************************/ // output_set_decl = "output" ":" { [lead_comment] output_cell_decl }. bool adam_parser::is_output_set_decl() { return is_set_decl(output_k, &adam_parser::is_output_cell_decl); } /*************************************************************************************************/ // constant_set_decl = "constant" ":" { [lead_comment] constant_cell_decl }. bool adam_parser::is_constant_set_decl() { return is_set_decl(constant_k, &adam_parser::is_constant_cell_decl); } /*************************************************************************************************/ // logic_set_decl = "logic" ":" { [lead_comment] logic_cell_decl }. bool adam_parser::is_logic_set_decl() { return is_set_decl(logic_k, &adam_parser::is_logic_cell_decl); } /*************************************************************************************************/ // invariant_set_decl = "invariant" ":" { [lead_comment] invariant_cell_decl }. bool adam_parser::is_invariant_set_decl() { return is_set_decl(invariant_k, &adam_parser::is_invariant_cell_decl); } /*************************************************************************************************/ // interface_cell_decl = ["unlink"] identifier [initializer] [define_expression] end_statement. bool adam_parser::is_interface_cell_decl(const std::string& detailed) { name_t cell_name; array_t initializer, expression; line_position_t initializer_position, expression_position; std::string brief; bool linked (!is_token(unlink_k)); if (!is_identifier(cell_name)) return false; (void)is_initializer(initializer_position, initializer); (void)is_define_expression(expression_position, expression); require_end_statement(brief); adam_callback_suite_m.add_interface_proc_m (cell_name, linked, initializer_position, initializer, expression_position, expression, brief, detailed); return true; } /*************************************************************************************************/ // input_cell_decl = identifier [initializer] end_statement. bool adam_parser::is_input_cell_decl(const std::string& detailed) { name_t cell_name; array_t initializer; line_position_t position; std::string brief; if (!is_identifier(cell_name)) return false; (void)is_initializer(position, initializer); require_end_statement(brief); adam_callback_suite_m.add_cell_proc_m(adam_callback_suite_t::input_k, cell_name, position, initializer, brief, detailed); return true; } /*************************************************************************************************/ // output_cell_decl = named_decl. bool adam_parser::is_output_cell_decl(const std::string& detailed) { name_t cell_name; line_position_t position; array_t expression; std::string brief; // REVISIT (fbreret) do something with me if (!is_named_decl(cell_name, position, expression, brief)) return false; adam_callback_suite_m.add_cell_proc_m(adam_callback_suite_t::output_k, cell_name, position, expression, brief, detailed); return true; } /*************************************************************************************************/ // constant_cell_decl = identifier initializer end_statement. bool adam_parser::is_constant_cell_decl(const std::string& detailed) { name_t cell_name; line_position_t position; array_t initializer; std::string brief; if (!is_identifier(cell_name)) return false; if (!is_initializer(position, initializer)) throw_exception("initializer required"); require_end_statement(brief); adam_callback_suite_m.add_cell_proc_m(adam_callback_suite_t::constant_k, cell_name, position, initializer, brief, detailed); return true; } /*************************************************************************************************/ // logic_cell_decl = named_decl | relate_decl. bool adam_parser::is_logic_cell_decl(const std::string& detailed) { name_t cell_name; line_position_t position; array_t expression; std::string brief; relation_set_t relations; if (is_named_decl(cell_name, position, expression, brief)) { adam_callback_suite_m.add_cell_proc_m(adam_callback_suite_t::logic_k, cell_name, position, expression, brief, detailed); return true; } else if (is_relate_decl(position, expression, relations, brief)) { adam_callback_suite_m.add_relation_proc_m( position, expression, &relations.front(), &relations.front() + relations.size(), brief, detailed); return true; } return false; } /*************************************************************************************************/ // invariant_cell_decl = named_decl. bool adam_parser::is_invariant_cell_decl(const std::string& detailed) { name_t cell_name; line_position_t position; array_t expression; std::string brief; if (!is_named_decl(cell_name, position, expression, brief)) return false; adam_callback_suite_m.add_cell_proc_m(adam_callback_suite_t::invariant_k, cell_name, position, expression, brief, detailed); return true; } /*************************************************************************************************/ // relate_decl = [conditional] "relate" "{" relate_expression relate_expression { relate_expression } "}" [trail_comment] bool adam_parser::is_relate_decl(line_position_t& position, array_t& expression, relation_set_t& relation_set, std::string& brief) { if (is_conditional(position, expression)) require_token(relate_k); else if (!is_token(relate_k)) return false; require_token(open_brace_k); relation_t relation_1; relation_t relation_2; if (!is_relate_expression_decl(relation_1) || !is_relate_expression_decl(relation_2)) { throw_exception("minimum two relate_expression required"); } relation_set.push_back(relation_1); relation_set.push_back(relation_2); relation_1.expression_m.clear(); while (is_relate_expression_decl(relation_1)) { relation_set.push_back(relation_1); relation_1.expression_m.clear(); } require_token(close_brace_k); (void)is_trail_comment(brief); return true; } /*************************************************************************************************/ // relate_expression = [lead_comment] named_decl. bool adam_parser::is_relate_expression_decl(relation_t& relation) { (void)is_lead_comment(relation.detailed_m); return is_named_decl(relation.name_m, relation.position_m, relation.expression_m, relation.brief_m); } /*************************************************************************************************/ // named_decl = identifier define_expression end_statement. bool adam_parser::is_named_decl(name_t& cell_name, line_position_t& position, array_t& expression, std::string& brief) { if (!is_identifier(cell_name)) return false; if (!is_define_expression(position, expression)) throw_exception("define_expression required"); require_end_statement(brief); return true; } /*************************************************************************************************/ // initializer = ":" expression. bool adam_parser::is_initializer(line_position_t& position, array_t& expression) { if (!is_token(colon_k)) return false; position = next_position(); require_expression(expression); return true; } /*************************************************************************************************/ // define_expression = "<==" expression. bool adam_parser::is_define_expression(line_position_t& position, array_t& expression) { if (!is_token(is_k)) return false; position = next_position(); require_expression(expression); return true; } /*************************************************************************************************/ // conditional = "when" "(" expression ")". bool adam_parser::is_conditional(line_position_t& position, array_t& expression) { if (!is_token(when_k)) return false; require_token(open_parenthesis_k); position = next_position(); require_expression(expression); require_token(close_parenthesis_k); return true; } /*************************************************************************************************/ // end_statement = ";" [trail_comment]. void adam_parser::require_end_statement(std::string& brief) { require_token(semicolon_k); (void)is_trail_comment(brief); } /*************************************************************************************************/ bool adam_parser::is_set_decl(name_t token, set_decl_t set_decl) { if (!is_token(token)) return false; require_token(colon_k); while (true) { std::string detailed; (void)is_lead_comment(detailed); if (!(this->*set_decl)(detailed)) break; } return true; } /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ --- NEW FILE: name.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <adobe/name.hpp> #include <set> #include <adobe/once.hpp> #include <adobe/source/string_pool.hpp> #if defined(ADOBE_SERIALIZATION) #include <ostream> #endif /*************************************************************************************************/ ADOBE_GLOBAL_MUTEX_DEFINITION(name_t) /*************************************************************************************************/ namespace { /*************************************************************************************************/ struct str_less { bool operator () (const char* x, const char* y) const { return std::strcmp(x, y) < 0; } }; /*************************************************************************************************/ // Precondition: length only need be non-zero if not copying // Precondition: if string_name is null - length must be zero const char* unique_string(const char* string_name, std::size_t length, bool copy) { typedef std::set<const char*, str_less> name_store_t; static const char* empty_string_s = ""; if (length == 0) return empty_string_s; ADOBE_GLOBAL_MUTEX_INSTANCE(name_t); static name_store_t name_store_s; static adobe::string_pool string_pool_s; name_store_t::iterator iter = name_store_s.find(string_name); if (iter == name_store_s.end()) { if (copy) string_name = string_pool_s.add(string_name, length); iter = name_store_s.insert(string_name).first; } return *iter; } /*************************************************************************************************/ } // namespace /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ name_t::name_t (const char* string_name) { std::size_t length = (string_name && *string_name) ? std::strlen(string_name) : 0; name_m = unique_string(string_name, length, true); } /*************************************************************************************************/ name_t::name_t (const char* string_name, std::size_t length) { name_m = unique_string(string_name, length, true); } /*************************************************************************************************/ name_t::name_t (const char* string_name, dont_copy_t) { // length only needs to be non-zero since we aren't copying std::size_t length = (string_name && *string_name) ? std::size_t(1) : 0; name_m = unique_string(string_name, length, false); } /*************************************************************************************************/ #if defined(ADOBE_SERIALIZATION) std::ostream& operator << (std::ostream& os, const adobe::name_t& t) { os << t.get(); return os; } #endif /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ --- NEW FILE: eve_engine.cpp --- --- NEW FILE: parser_shared.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #ifndef ADOBE_PARSER_SHARED_HPP #define ADOBE_PARSER_SHARED_HPP /*************************************************************************************************/ #include <adobe/istream_fwd.hpp> #include <adobe/name_fwd.hpp> /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ void throw_parser_exception(const char* errorString, const adobe::line_position_t& position); void throw_parser_exception(adobe::name_t expected, adobe::name_t found, const adobe::line_position_t& position); /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ #endif // ADOBE_PARSER_SHARED_HPP /*************************************************************************************************/ --- NEW FILE: token.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <adobe/name_fwd.hpp> #include <adobe/once.hpp> /*************************************************************************************************/ ADOBE_ONCE_DECLARATION(adobe_token) ADOBE_ONCE_STATIC_INSTANCE(adobe_token) /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ extern const once_name_t ifelse_k; extern const once_name_t number_k; extern const once_name_t identifier_k; extern const once_name_t string_k; extern const once_name_t lead_comment_k; extern const once_name_t trail_comment_k; extern const once_name_t semicolon_k; extern const once_name_t comma_k; extern const once_name_t assign_k; extern const once_name_t question_k; extern const once_name_t colon_k; extern const once_name_t open_brace_k; extern const once_name_t close_brace_k; extern const once_name_t open_parenthesis_k; extern const once_name_t close_parenthesis_k; extern const once_name_t dot_k; extern const once_name_t open_bracket_k; extern const once_name_t close_bracket_k; extern const once_name_t at_k; extern const once_name_t is_k; extern const once_name_t add_k; extern const once_name_t subtract_k; extern const once_name_t multiply_k; extern const once_name_t divide_k; extern const once_name_t modulus_k; extern const once_name_t not_k; extern const once_name_t unary_negate_k; extern const once_name_t less_k; extern const once_name_t greater_k; extern const once_name_t and_k; extern const once_name_t or_k; extern const once_name_t less_equal_k; extern const once_name_t greater_equal_k; extern const once_name_t not_equal_k; extern const once_name_t equal_k; extern const once_name_t empty_k; extern const once_name_t true_k; extern const once_name_t false_k; extern const once_name_t function_k; extern const once_name_t variable_k; extern const once_name_t index_k; extern const once_name_t array_k; extern const once_name_t dictionary_k; extern const once_name_t eof_k; /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ --- NEW FILE: lex_stream.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #ifndef ADOBE_LEX_STREAM_HPP #define ADOBE_LEX_STREAM_HPP /*************************************************************************************************/ #include <adobe/source/lex_stream_fwd.hpp> #include <adobe/istream.hpp> #include <boost/array.hpp> #include <iosfwd> /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ class lex_stream_t; /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ void swap(adobe::lex_stream_t&, adobe::lex_stream_t&); /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ class lex_stream_t { public: lex_stream_t(std::istream& in, const line_position_t& position); #if !defined(ADOBE_NO_DOCUMENTATION) lex_stream_t(const lex_stream_t& rhs); ~lex_stream_t(); lex_stream_t& operator = (const lex_stream_t& rhs); #endif // !defined(ADOBE_NO_DOCUMENTATION) const token_value_t& get(); void putback(); const line_position_t& next_position(); void set_keyword_extension_lookup(const keyword_extension_lookup_proc_t& proc); #if !defined(ADOBE_NO_DOCUMENTATION) private: friend void ::swap(adobe::lex_stream_t&, adobe::lex_stream_t&); struct implementation_t; implementation_t* object_m; #endif // !defined(ADOBE_NO_DOCUMENTATION) }; /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ inline void swap(adobe::lex_stream_t& x, adobe::lex_stream_t& y) { std::swap(x.object_m, y.object_m); } /*************************************************************************************************/ #endif // ADOBE_LEX_STREAM_HPP /*************************************************************************************************/ --- NEW FILE: parse_pdf.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <adobe/parse_pdf.hpp> #include <adobe/array.hpp> #include <adobe/iomanip.hpp> #include <adobe/dictionary.hpp> #include <iostream> #include <cstdlib> /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ parser_pdf::parser_pdf() { doc = *( seq[&parser_pdf::s_handle_seq] | bag[&parser_pdf::s_handle_bag] | comment[&parser_pdf::s_handle_comment] | str[&parser_pdf::s_handle_str] | boost::spirit::space_p ); comment = '%' >> *(boost::spirit::print_p - boost::spirit::eol_p) >> boost::spirit::eol_p; key = "/" >> *(boost::spirit::alnum_p | '_'); num = boost::spirit::real_p | boost::spirit::int_p; element = str[&parser_pdf::s_handle_str] | seq[&parser_pdf::s_handle_seq] | bag[&parser_pdf::s_handle_bag] | num[&parser_pdf::s_handle_num] | key[&parser_pdf::s_handle_key]; array_elements = element % *boost::spirit::space_p; bag_elements = ( key[&parser_pdf::s_handle_key] >> +boost::spirit::space_p >> element ) % *boost::spirit::space_p; str = '(' >> *(boost::spirit::print_p - ')') >> ')' >> *boost::spirit::eol_p; seq = '[' >> *boost::spirit::space_p >> !array_elements >> *boost::spirit::space_p >> ']' >> *boost::spirit::space_p; bag = "<<" >> *boost::spirit::space_p >> !bag_elements >> *boost::spirit::space_p >> ">>" >> *boost::spirit::space_p; BOOST_SPIRIT_DEBUG_RULE(doc); BOOST_SPIRIT_DEBUG_RULE(comment); BOOST_SPIRIT_DEBUG_RULE(seq); BOOST_SPIRIT_DEBUG_RULE(bag); BOOST_SPIRIT_DEBUG_RULE(array_elements); BOOST_SPIRIT_DEBUG_RULE(bag_elements); BOOST_SPIRIT_DEBUG_RULE(element); BOOST_SPIRIT_DEBUG_RULE(key); BOOST_SPIRIT_DEBUG_RULE(str); BOOST_SPIRIT_DEBUG_RULE(num); } /*************************************************************************************************/ bool parser_pdf::do_parse(const char* in_string) { boost::spirit::parse_info<> result(boost::spirit::parse(in_string, doc[&parser_pdf::s_handle_doc])); //std::cout << "hit:\t" << std::boolalpha << result.hit << "\n"; //std::cout << "full:\t" << std::boolalpha << result.full << "\n"; //std::cout << "length:\t" << result.length << "\n"; //std::cout << "stop:\t" << result.stop << "\n"; //std::cout << "eval stack height: " << height() << "\n"; return result.full; } /*************************************************************************************************/ void parser_pdf::handle_str(const char* first, const char* last) { push(parse_stack::node_t(first, last, adobe::value(std::string(first + 1, last - 1)))); //std::cout << "String: " << stack_top_value() << "\n"; } void parser_pdf::handle_seq(const char* first, const char* last) { parse_stack::node_t temp_node(first, last); std::list<value> temp_arr; std::size_t count(0); while (stack_top().contained_by(temp_node)) { temp_arr.push_front(stack_top_value()); pop(); ++count; } array new_arr(temp_arr.begin(), temp_arr.end()); push(parse_stack::node_t(first, last, adobe::value(new_arr))); //std::cout << "Sequence of " << count << " items pushed.\n"; } void parser_pdf::handle_comment(const char* /*first*/, const char* /*last*/) { //std::cout << "Comment: " << std::string(first, last) << "\n"; } void parser_pdf::handle_bag(const char* first, const char* last) { parse_stack::node_t temp_node(first, last); dictionary new_dict; std::size_t count(0); while (stack_top().contained_by(temp_node)) { value temp_value(stack_top_value()); pop(); name temp_name(stack_top_value().get<name>()); pop(); new_dict.write()[temp_name] = temp_value; ++count; } push(parse_stack::node_t(first, last, adobe::value(new_dict))); //std::cout << "Bag of " << count << " items pushed.\n"; } void parser_pdf::handle_num(const char* first, const char* last) { double temp(std::atof(std::string(first, last).c_str())); push(parse_stack::node_t(first, last, adobe::value(temp))); //std::cout << "Num: " << stack_top_value() << "\n"; } void parser_pdf::handle_key(const char* first, const char* last) { name temp(std::string(first + 1, last).c_str()); push(parse_stack::node_t(first, last, adobe::value(temp))); //std::cout << "Key: " << stack_top_value() << "\n"; } void parser_pdf::handle_doc(const char* first, const char* last) { handle_seq(first, last); //std::cout << "Doc Pushed!\n"; } /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ --- NEW FILE: value.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <adobe/value.hpp> #include <adobe/empty.hpp> #include <adobe/once.hpp> #if defined(ADOBE_SERIALIZATION) #include <ostream> #endif /*************************************************************************************************/ namespace { /*************************************************************************************************/ adobe::value_t* value_g; /*************************************************************************************************/ void init_once() { static adobe::value_t sValue; value_g = &sValue; } /*************************************************************************************************/ } // namespace /*************************************************************************************************/ ADOBE_ONCE_DECLARATION(adobe_value) ADOBE_ONCE_DEFINITION(adobe_value, init_once) /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ value_t::implementation_t::~implementation_t() { } /************************************************************************************************/ #ifdef __MWERKS__ #pragma mark - #endif /*************************************************************************************************/ const value_t& value_empty() { ADOBE_ONCE_INSTANCE(adobe_value); return *value_g; } /*************************************************************************************************/ #if !defined(ADOBE_NO_DOCUMENTATION) value_t::value_t() : object_m (make_instance(empty_t())) { } value_t::value_t(const value_t& x) : object_m(x.object_m->copy()) { } value_t& value_t::operator = (const value_t& x) { if (object_m == x.object_m) return *this; if (x.type() == type()) object_m->assign(*x.object_m); else { implementation_t* temp = x.object_m->copy(); delete object_m; object_m = temp; } return *this; } value_t::~value_t() { delete object_m; } #endif // !defined(ADOBE_NO_DOCUMENTATION) /*************************************************************************************************/ const std::type_info& value_t::type() const { return object_m->type(); } bool value_t::equal(const value_t& x) const { return object_m->equal(*x.object_m); } /*************************************************************************************************/ bool operator == (const value_t& x, const value_t& y) { return (x.type() == y.type()) && x.equal(y); } #if defined(ADOBE_SERIALIZATION) void value_t::stream_out(std::ostream& stream) const { object_m->stream_out(stream); } std::ostream& operator << (std::ostream& stream, const value_t& x) { x.stream_out(stream); return stream; } #endif /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ --- NEW FILE: metrowerks_mach_o.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ /* These are the switches required to build using the MSL C header for a Mach-O target. */ #pragma c99 on #define _MSL_USING_MW_C_HEADERS 1 /* These defines allow <Carbon/Carbon.h> to build */ #ifndef __NOEXTENSIONS__ #define __NOEXTENSIONS__ #endif #ifndef __CF_USE_FRAMEWORK_INCLUDES__ #define __CF_USE_FRAMEWORK_INCLUDES__ #endif /*************************************************************************************************/ --- NEW FILE: token.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <adobe/name.hpp> #include <adobe/source/token.hpp> /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ const once_name_t ifelse_k; const once_name_t number_k; const once_name_t identifier_k; const once_name_t string_k; const once_name_t lead_comment_k; const once_name_t trail_comment_k; const once_name_t semicolon_k; const once_name_t comma_k; const once_name_t assign_k; const once_name_t question_k; const once_name_t colon_k; const once_name_t open_brace_k; const once_name_t close_brace_k; const once_name_t open_parenthesis_k; const once_name_t close_parenthesis_k; const once_name_t dot_k; const once_name_t open_bracket_k; const once_name_t close_bracket_k; const once_name_t at_k; const once_name_t is_k; const once_name_t add_k; const once_name_t subtract_k; const once_name_t multiply_k; const once_name_t divide_k; const once_name_t modulus_k; const once_name_t not_k; const once_name_t unary_negate_k; const once_name_t less_k; const once_name_t greater_k; const once_name_t and_k; const once_name_t or_k; const once_name_t less_equal_k; const once_name_t greater_equal_k; const once_name_t not_equal_k; const once_name_t equal_k; const once_name_t empty_k; const once_name_t true_k; const once_name_t false_k; const once_name_t function_k; const once_name_t variable_k; const once_name_t index_k; const once_name_t array_k; const once_name_t dictionary_k; const once_name_t eof_k; /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ namespace { /*************************************************************************************************/ void init_once() { using namespace adobe; remove_const(ifelse_k) = static_name_t(".ifelse"); remove_const(number_k) = static_name_t("number"); remove_const(identifier_k) = static_name_t("identifier"); remove_const(string_k) = static_name_t("string"); remove_const(lead_comment_k) = static_name_t("lead_comment"); remove_const(trail_comment_k) = static_name_t("trail_comment"); remove_const(semicolon_k) = static_name_t("semicolon"); remove_const(comma_k) = static_name_t("comma"); remove_const(assign_k) = static_name_t("assign"); remove_const(question_k) = static_name_t("question"); remove_const(colon_k) = static_name_t("colon"); remove_const(open_brace_k) = static_name_t("open_brace"); remove_const(close_brace_k) = static_name_t("close_brace"); remove_const(open_parenthesis_k) = static_name_t("open_parenthesis"); remove_const(close_parenthesis_k) = static_name_t("close_parenthesis"); remove_const(dot_k) = static_name_t("dot"); remove_const(open_bracket_k) = static_name_t("open_bracket"); remove_const(close_bracket_k) = static_name_t("close_bracket"); remove_const(at_k) = static_name_t(".at"); remove_const(is_k) = static_name_t(".is"); remove_const(add_k) = static_name_t(".add"); remove_const(subtract_k) = static_name_t(".subtract"); remove_const(multiply_k) = static_name_t(".multiply"); remove_const(divide_k) = static_name_t(".divide"); remove_const(modulus_k) = static_name_t(".modulus"); remove_const(not_k) = static_name_t(".not"); remove_const(unary_negate_k) = static_name_t(".unary_negate"); remove_const(less_k) = static_name_t(".less"); remove_const(greater_k) = static_name_t(".greater"); remove_const(and_k) = static_name_t(".and"); remove_const(or_k) = static_name_t(".or"); remove_const(less_equal_k) = static_name_t(".less_equal"); remove_const(greater_equal_k) = static_name_t(".greater_equal"); remove_const(not_equal_k) = static_name_t(".not_equal"); remove_const(equal_k) = static_name_t(".equal"); remove_const(empty_k) = static_name_t("empty"); remove_const(true_k) = static_name_t("true"); remove_const(false_k) = static_name_t("false"); remove_const(function_k) = static_name_t(".function"); remove_const(variable_k) = static_name_t(".variable"); remove_const(index_k) = static_name_t(".index"); remove_const(array_k) = static_name_t(".array"); remove_const(dictionary_k) = static_name_t(".dictionary"); remove_const(eof_k) = static_name_t("eof"); } /*************************************************************************************************/ } // namespace /*************************************************************************************************/ ADOBE_ONCE_DEFINITION(adobe_token, init_once) /*************************************************************************************************/ --- NEW FILE: adam.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <adobe/adam.hpp> #include <deque> #include <boost/bind.hpp> #include <boost/function.hpp> #include <adobe/array.hpp> #include <adobe/dictionary.hpp> #include <adobe/name.hpp> #include <adobe/value.hpp> [...1344 lines suppressed...] cell_t& cell(*cell_ptr); if (cell.specifier_m == access_output) get_stack_m.push_back(variable_name); // REVISIT (sparent) : paired call should be ctor/dtor try { cell.calculate(); } catch (...) { if (cell.specifier_m == access_output) get_stack_m.pop_back(); throw; } if (cell.specifier_m == access_output) get_stack_m.pop_back(); return cell.state_m; } /*************************************************************************************************/ --- NEW FILE: string_pool.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #include <cstddef> #include <list> /*************************************************************************************************/ namespace adobe { /**************************************************************************************************/ class string_pool { public: explicit string_pool(std::size_t pool_size = 1024 * 4) : fPoolSize(pool_size), fNext(NULL), fEnd(NULL) { } ~string_pool(); const char* add(const char* ident); // Precondition: ident || !length const char* add(const char* ident, std::size_t length); private: string_pool (const string_pool&); string_pool& operator = (const string_pool&); std::size_t fPoolSize; std::list<char*> fPool; char* fNext; char* fEnd; }; /**************************************************************************************************/ } // namespace adobe /**************************************************************************************************/ --- NEW FILE: rectangle.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #include <adobe/rectangle.hpp> #include <adobe/algorithm.hpp> #if defined(ADOBE_SERIALIZATION) #include <adobe/future/iomanip.hpp> #include <adobe/name.hpp> #include <iostream> #endif /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ bool operator == (const adobe::rectangle_t& x, const adobe::rectangle_t& y) { return x.slice_m[adobe::rectangle_slices_t::vertical] == y.slice_m[adobe::rectangle_slices_t::vertical] && x.slice_m[adobe::rectangle_slices_t::horizontal] == y.slice_m[adobe::rectangle_slices_t::horizontal]; } /****************************************************************************************************/ #if defined(ADOBE_SERIALIZATION) std::ostream& operator << (std::ostream& s, const adobe::rectangle_t& x) { static adobe::value_t key_vertical (adobe::static_name_t("vertical")); static adobe::value_t key_horizontal (adobe::static_name_t("horizontal")); s << adobe::begin_bag("[0]"); s << adobe::begin_sequence; s << adobe::format(key_vertical); s << adobe::format(x.slice_m[adobe::rectangle_slices_t::vertical]); s << adobe::end_sequence; s << adobe::begin_sequence; s << adobe::format(key_horizontal); s << adobe::format(x.slice_m[adobe::rectangle_slices_t::horizontal]); s << adobe::end_sequence; s << adobe::end_bag; return s; } #endif /****************************************************************************************************/ bool operator == (const adobe::rectangle_t::slice_t& x, const adobe::rectangle_t::slice_t& y) { return x.length_m == y.length_m && x.outset_m == y.outset_m && x.frame_m == y.frame_m && x.inset_m == y.inset_m && x.poi_m.size() == y.poi_m.size() && adobe::equal(x.poi_m, y.poi_m.begin()); } /****************************************************************************************************/ #if defined(ADOBE_SERIALIZATION) std::ostream& operator << (std::ostream& s, const adobe::rectangle_t::slice_t& x) { static adobe::value_t key_length (adobe::static_name_t("length")); static adobe::value_t key_outset (adobe::static_name_t("outset")); static adobe::value_t key_frame (adobe::static_name_t("frame")); static adobe::value_t key_inset (adobe::static_name_t("inset")); static adobe::value_t key_poi_set (adobe::static_name_t("poi_set")); adobe::points_of_interest_t::const_iterator first(x.poi_m.begin()); adobe::points_of_interest_t::const_iterator last(x.poi_m.end()); adobe::points_of_interest_t::const_iterator back(last - 1); s << adobe::begin_bag("[0]") << adobe::begin_sequence << adobe::format(key_length) << adobe::format(x.length_m) << adobe::end_sequence << adobe::begin_sequence << adobe::format(key_outset) << adobe::begin_sequence << adobe::format(x.outset_m.first) << adobe::format(x.outset_m.second) << adobe::end_sequence << adobe::end_sequence << adobe::begin_sequence << adobe::format(key_frame) << adobe::begin_sequence << adobe::format(x.frame_m.first) << adobe::format(x.frame_m.second) << adobe::end_sequence << adobe::end_sequence << adobe::begin_sequence << adobe::format(key_inset) << adobe::begin_sequence << adobe::format(x.inset_m.first) << adobe::format(x.inset_m.second) << adobe::end_sequence << adobe::end_sequence << adobe::begin_sequence << adobe::format(key_poi_set) << adobe::begin_sequence; for (; first != last; ++first) s << adobe::format(*first); s << adobe::end_sequence << adobe::end_sequence << adobe::end_bag; return s; } #endif /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ --- NEW FILE: expression_parser.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #pragma once #include <adobe/istream.hpp> #include <adobe/dictionary_fwd.hpp> #include <adobe/source/lex_stream_fwd.hpp> #include <boost/noncopyable.hpp> /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ /*! \page expression_language Expression Language Underlying the language for Adam and Eve is a common, simple, expression language. The language supports \code expression = or_expression ["?" expression ":" expression]. or_expression = and_expression { "||" and_expression }. and_expression = equality_expression { "&&" equality_expression }. equality_expression = relational_expression { ("==" | "!=") relational_expression }. relational_expression = additive_expression { ("<" | ">" | "<=" | ">=") additive_expression }. additive_expression = multiplicative_expression { ("+" | "-") multiplicative_expression }. multiplicative_expression = unary_expression { ("*" | "/" | "%") unary_expression }. unary_expression = postfix_expression | (unary_operator unary_expression). unary_operator = "+" | "-" | "!". postfix_expression = primary_expression { ("[" expression "]") | ("." identifier) }. primary_expression = name | number | boolean | string | "empty" | array | dictionary | variable_or_fuction | ( "(" expression ")" ). variable_or_function = identifier ["(" [argument_expression_list] ")"]. array = "[" [argument_list] "]". dictionary = "{" named_argument_list "}". argument_expression_list = named_argument_list | argument_list. argument_list = expression { "," expression }. named_argument_list = named_argument { "," named_argument }. named_argument = identifier ":" expression. name = "@" identifier. boolean = "true" | "false". \endcode */ /*************************************************************************************************/ class expression_parser : public boost::noncopyable { public: expression_parser(std::istream& in, const line_position_t& position); ~expression_parser(); const line_position_t& next_position(); void set_keyword_extension_lookup(const keyword_extension_lookup_proc_t& proc); // expression = or_expression ["?" expression ":" expression]. bool is_expression(array_t&); void require_expression(array_t&); // or_expression = and_expression { "||" and_expression }. bool is_or_expression(array_t&); // and_expression = equality_expression { "&&" equality_expression }. bool is_and_expression(array_t&); // equality_expression = relational_expression { ("==" | "!=") relational_expression }. bool is_equality_expression(array_t&); // relational_expression = additive_expression { relational_operator additive_expression }. bool is_relational_expression(array_t&); // additive_expression = multiplicative_expression { ("+" | "-") multiplicative_expression }. bool is_additive_expression(array_t&); bool is_additive_operator(name_t&); // multiplicative_expression = unary_expression { ("*" | "/" | "%" | "div") unary_expression }. bool is_multiplicative_expression(array_t&); bool is_multiplicative_operator(name_t&); // unary_expression = postfix_expression | (unary_operator unary_expression). bool is_unary_expression(array_t&); // unary_operator = "+" | "-" | "!". bool is_unary_operator(name_t&); // postfix_expression = primary_expression { ("[" expression "]") | ("." identifier) }. bool is_postfix_expression(array_t&); // primary_expression = name | number | boolean | string | "empty" | array | dictionary // | variable_or_fuction | ( "(" expression ")" ). bool is_primary_expression(array_t&); // variable_or_fuctiontion = identifier ["(" [argument_expression_list] ")"]. bool is_variable_or_function(array_t&); // argument_expression_list = named_argument_list | argument_list. bool is_argument_expression_list(array_t&); // array = "[" [argument_list] "]". bool is_array(array_t&); // dictionary = "{" named_argument_list "}". bool is_dictionary(array_t&); // argument_list = expression { "," expression }. bool is_argument_list(array_t&); // named_argument_list = named_argument { "," named_argument }. bool is_named_argument_list(array_t&); // named_argument = ident ":" expression. bool is_named_argument(array_t&); // name = "@" identifier. bool is_name(value_t&); // boolean = "true" | "false". bool is_boolean(value_t&); // relational_operator = "<" | ">" | "<=" | ">=". bool is_relational_operator(name_t&); // lexical tokens: bool is_identifier(name_t&); bool is_lead_comment(std::string&); bool is_trail_comment(std::string&); /* REVISIT (sparent) : We should provide a protected call to get the token stream and allow subclasses to access it directly - but for now we'll stick with the law of Demiter. */ protected: const token_value_t& get_token(); void putback(); bool is_token (name_t tokenName, value_t& tokenValue); bool is_token (name_t tokenName); void require_token (name_t tokenName, value_t& tokenValue); void require_token (name_t tokenName); void throw_exception (const char* errorString); void throw_exception (const name_t& found, const name_t& expected); private: class implementation; implementation* object; }; } // namespace adobe /*************************************************************************************************/ --- NEW FILE: eve.cpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #ifndef NDEBUG #include <iostream> #ifdef ADOBE_SERIALIZATION #include <adobe/future/iomanip_pdf.hpp> #endif #endif // NDEBUG #include <iterator> #include <boost/iterator/indirect_iterator.hpp> [...1583 lines suppre... [truncated message content] |