Merge lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental

Proposed by Matthias Brantner
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/jsoniq
Merge into: lp:~zorba-coders/zorba/zorba-experimental
Diff against target: 136791 lines (+69603/-27542)
995 files modified
CMakeConfiguration.txt (+3/-4)
CMakeLists.txt (+29/-7)
CPackSourceConfig.cmake.in (+1/-1)
ChangeLog (+86/-12)
NOTICE.txt (+0/-740)
bin/CMakeLists.txt (+58/-19)
bin/debug_client/debug_command.cpp (+0/-99)
bin/debug_client/event_handler_init.cpp.in (+0/-41)
bin/debug_client/lock_free_queue.cpp (+0/-16)
bin/debug_client/message-handler.xq (+0/-165)
bin/debugger/command.h (+164/-211)
bin/debugger/command_arg.h (+237/-0)
bin/debugger/command_line_handler.cpp (+364/-204)
bin/debugger/command_line_handler.h (+116/-58)
bin/debugger/command_prompt.cpp (+287/-0)
bin/debugger/command_prompt.h (+72/-0)
bin/debugger/config.h.cmake (+24/-0)
bin/debugger/event_handler.cpp (+81/-76)
bin/debugger/event_handler.h (+25/-12)
bin/debugger/lock_free_queue.h (+10/-2)
bin/debugger/main.cpp (+340/-18)
bin/debugger/process_listener.cpp (+105/-0)
bin/debugger/process_listener.h (+75/-0)
bin/debugger/tuple.h (+6/-0)
bin/debugger/xqdb_client.cpp (+63/-0)
bin/debugger/xqdb_client.h (+51/-0)
bin/path_util.cpp (+60/-45)
bin/path_util.h (+9/-24)
bin/zorbacmd.cpp (+87/-50)
bin/zorbacmdproperties.cpp (+14/-5)
bin/zorbacmdproperties.h (+7/-1)
bin/zorbacmdproperties.txt (+3/-1)
bin/zorbacmdproperties_base.h (+19/-3)
cmake_modules/FindLibedit.cmake (+46/-0)
cmake_modules/FindPHP5.cmake (+5/-0)
cmake_modules/ZorbaModule.cmake (+57/-29)
config/CMakeLists.txt (+5/-5)
config/ZorbaConfig.cmake.in (+7/-4)
doc/cxx/examples/errors.cpp (+4/-4)
doc/cxx/examples/simple.cpp (+17/-10)
doc/php/CMakeLists.txt (+1/-1)
doc/php/examples/CMakeLists.txt (+14/-4)
doc/php/examples/php.ini.in (+1/-0)
doc/php/examples/simple.php.in (+2/-2)
doc/php/examples/test.php.in (+120/-0)
doc/php/examples/zorba_api.php (+1/-1)
doc/zorba/commandline.dox (+7/-1)
doc/zorba/external_functions.dox (+2/-2)
doc/zorba/ft_thesaurus.dox (+34/-33)
doc/zorba/impl_dep_features.dox (+2/-2)
doc/zorba/modules_authoring.dox (+2/-3)
doc/zorba/modules_authoring_2.dox (+4/-3)
doc/zorba/modules_building_in.dox (+1/-1)
doc/zorba/options.dox (+233/-54)
doc/zorba/uriresolvers.dox (+120/-38)
doc/zorba/xqddf.dox (+206/-153)
doc/zorba/xqdoc/templates/main.html (+36/-24)
include/zorba/config.h.cmake (+13/-10)
include/zorba/debugger_client.h (+14/-2)
include/zorba/diagnostic.h (+4/-1)
include/zorba/dynamic_context.h (+14/-1)
include/zorba/identtypes.h (+16/-4)
include/zorba/internal/type_traits.h (+3/-1)
include/zorba/internal/unique_ptr.h (+2/-2)
include/zorba/item.h (+29/-3)
include/zorba/item_factory.h (+60/-1)
include/zorba/options.h (+23/-5)
include/zorba/pregenerated/diagnostic_list.h (+50/-4)
include/zorba/static_collection_manager.h (+66/-3)
include/zorba/static_context.h (+619/-529)
include/zorba/store_consts.h (+46/-8)
include/zorba/thesaurus.h (+24/-28)
include/zorba/typeident.h (+44/-34)
include/zorba/uri_resolvers.h (+18/-3)
include/zorba/xquery.h (+19/-1)
include/zorba/zorba.h (+1/-0)
modules/ExternalModules.conf (+14/-13)
modules/com/zorba-xquery/www/modules/CMakeLists.txt (+14/-1)
modules/com/zorba-xquery/www/modules/converters/json-options.xsd (+47/-0)
modules/com/zorba-xquery/www/modules/converters/json.xq (+231/-0)
modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq (+277/-0)
modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_handler.cpp (+4/-4)
modules/com/zorba-xquery/www/modules/node-position.xq (+524/-0)
modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+93/-9)
modules/com/zorba-xquery/www/modules/pregenerated/warnings.xq (+20/-1)
modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq (+187/-60)
modules/com/zorba-xquery/www/modules/string.xq (+21/-1)
modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq (+20/-13)
modules/org/CMakeLists.txt (+2/-0)
modules/org/jsoniq/CMakeLists.txt (+15/-0)
modules/org/jsoniq/www/CMakeLists.txt (+19/-0)
modules/org/jsoniq/www/functions.xq (+76/-0)
src/annotations/annotations.cpp (+324/-292)
src/annotations/annotations.h (+101/-60)
src/api/annotationimpl.cpp (+1/-1)
src/api/collectionimpl.cpp (+4/-9)
src/api/dynamiccontextimpl.cpp (+35/-1)
src/api/dynamiccontextimpl.h (+7/-0)
src/api/functionimpl.cpp (+1/-1)
src/api/item.cpp (+26/-0)
src/api/itemfactoryimpl.cpp (+61/-4)
src/api/itemfactoryimpl.h (+25/-3)
src/api/options.cpp (+30/-12)
src/api/serialization/serializer.cpp (+276/-56)
src/api/serialization/serializer.h (+33/-5)
src/api/serializerimpl.cpp (+5/-0)
src/api/staticcollectionmanagerimpl.cpp (+287/-0)
src/api/staticcollectionmanagerimpl.h (+37/-0)
src/api/staticcontextimpl.cpp (+207/-80)
src/api/staticcontextimpl.h (+26/-23)
src/api/thesaurus.cpp (+0/-4)
src/api/typeidentimpl.cpp (+61/-7)
src/api/uri_resolver_wrappers.cpp (+66/-30)
src/api/uri_resolver_wrappers.h (+6/-6)
src/api/uriresolverimpl.cpp (+5/-0)
src/api/uriresolverimpl.h (+2/-0)
src/api/xmldatamanagerimpl.cpp (+5/-6)
src/api/xqueryimpl.cpp (+118/-4)
src/api/xqueryimpl.h (+6/-0)
src/api/zorbaimpl.cpp (+1/-1)
src/compiler/api/compiler_api.cpp (+19/-13)
src/compiler/api/compiler_api.h (+3/-2)
src/compiler/api/compilercb.cpp (+4/-0)
src/compiler/api/compilercb.h (+12/-2)
src/compiler/codegen/plan_visitor.cpp (+222/-85)
src/compiler/expression/CMakeLists.txt (+1/-0)
src/compiler/expression/abstract_expr_visitor.h (+10/-2)
src/compiler/expression/expr.cpp (+53/-58)
src/compiler/expression/expr.h (+103/-55)
src/compiler/expression/expr_annotations.cpp (+0/-129)
src/compiler/expression/expr_annotations.h (+0/-54)
src/compiler/expression/expr_base.cpp (+124/-26)
src/compiler/expression/expr_base.h (+72/-26)
src/compiler/expression/expr_classes.h (+7/-0)
src/compiler/expression/expr_iter.cpp (+51/-2)
src/compiler/expression/expr_put.cpp (+98/-40)
src/compiler/expression/expr_type.cpp (+81/-80)
src/compiler/expression/expr_visitor.h (+7/-0)
src/compiler/expression/flwor_expr.cpp (+42/-17)
src/compiler/expression/flwor_expr.h (+41/-18)
src/compiler/expression/fo_expr.cpp (+4/-17)
src/compiler/expression/fo_expr.h (+5/-5)
src/compiler/expression/ft_expr.h (+2/-1)
src/compiler/expression/json_exprs.cpp (+189/-0)
src/compiler/expression/json_exprs.h (+148/-0)
src/compiler/expression/path_expr.h (+5/-5)
src/compiler/expression/script_exprs.cpp (+163/-17)
src/compiler/expression/script_exprs.h (+101/-26)
src/compiler/expression/update_exprs.cpp (+60/-73)
src/compiler/expression/update_exprs.h (+51/-50)
src/compiler/expression/var_expr.cpp (+55/-1)
src/compiler/expression/var_expr.h (+110/-32)
src/compiler/parser/xquery_parser.cpp (+7930/-7283)
src/compiler/parser/xquery_parser.hpp (+28/-24)
src/compiler/parser/xquery_parser.y (+246/-50)
src/compiler/parser/xquery_scanner.cpp (+3211/-3127)
src/compiler/parser/xquery_scanner.l (+34/-12)
src/compiler/parsetree/parsenode_print_dot_visitor.h (+6/-0)
src/compiler/parsetree/parsenode_print_xml_visitor.cpp (+83/-27)
src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+9/-3)
src/compiler/parsetree/parsenode_print_xquery_visitor.cpp (+13/-6)
src/compiler/parsetree/parsenode_visitor.h (+7/-0)
src/compiler/parsetree/parsenodes.cpp (+107/-0)
src/compiler/parsetree/parsenodes.h (+103/-1)
src/compiler/rewriter/framework/rewriter_context.h (+59/-31)
src/compiler/rewriter/rewriters/default_optimizer.cpp (+10/-0)
src/compiler/rewriter/rules/flwor_rules.cpp (+4/-9)
src/compiler/rewriter/rules/fold_rules.cpp (+4/-9)
src/compiler/rewriter/rules/hoist_rules.cpp (+2/-4)
src/compiler/rewriter/rules/index_join_rule.cpp (+3/-3)
src/compiler/rewriter/rules/nodeid_rules.cpp (+870/-38)
src/compiler/rewriter/rules/path_rules.cpp (+4/-4)
src/compiler/rewriter/rules/rule_base.h (+1/-0)
src/compiler/rewriter/rules/ruleset.h (+52/-5)
src/compiler/rewriter/rules/type_rules.cpp (+53/-42)
src/compiler/rewriter/tools/dataflow_annotations.cpp (+557/-8)
src/compiler/rewriter/tools/dataflow_annotations.h (+37/-1)
src/compiler/rewriter/tools/expr_tools.cpp (+536/-6)
src/compiler/rewriter/tools/udf_graph.cpp (+6/-4)
src/compiler/translator/translator.cpp (+650/-294)
src/compiler/xqddf/value_index.cpp (+35/-22)
src/compiler/xqddf/value_index.h (+53/-27)
src/context/default_uri_mappers.cpp (+2/-2)
src/context/default_uri_mappers.h (+6/-6)
src/context/default_url_resolvers.cpp (+5/-5)
src/context/default_url_resolvers.h (+19/-5)
src/context/dynamic_context.cpp (+45/-22)
src/context/dynamic_context.h (+30/-19)
src/context/dynamic_loader.cpp (+8/-17)
src/context/dynamic_loader.h (+2/-3)
src/context/namespace_context.cpp (+4/-2)
src/context/namespace_context.h (+5/-1)
src/context/root_static_context.cpp (+86/-45)
src/context/root_static_context.h (+5/-3)
src/context/root_static_context_init.cpp.in (+9/-2)
src/context/static_context.cpp (+448/-393)
src/context/static_context.h (+106/-123)
src/context/static_context_consts.h (+1/-34)
src/context/thesaurus_wrappers.cpp (+0/-21)
src/context/thesaurus_wrappers.h (+0/-10)
src/context/uri_resolver.cpp (+32/-12)
src/context/uri_resolver.h (+34/-8)
src/debugger/debugger_client.cpp (+0/-2)
src/debugger/debugger_clientimpl.cpp (+549/-453)
src/debugger/debugger_clientimpl.h (+17/-10)
src/debugger/debugger_common.h (+3/-10)
src/debugger/debugger_commons.cpp (+128/-25)
src/debugger/debugger_commons.h (+11/-15)
src/debugger/debugger_communicator.cpp (+12/-9)
src/debugger/debugger_communicator.h (+4/-4)
src/debugger/debugger_protocol.cpp (+40/-16)
src/debugger/debugger_protocol.h (+3/-0)
src/debugger/debugger_runtime.cpp (+330/-104)
src/debugger/debugger_runtime.h (+37/-20)
src/debugger/debugger_server.cpp (+292/-90)
src/debugger/debugger_server.h (+24/-1)
src/debugger/socket_streambuf.cpp (+68/-55)
src/debugger/socket_streambuf.h (+20/-9)
src/diagnostics/diagnostic.cpp (+3/-0)
src/diagnostics/diagnostic_en.xml (+204/-42)
src/diagnostics/dict_XX_cpp.xq (+1/-0)
src/diagnostics/pregenerated/diagnostic_list.cpp (+75/-6)
src/diagnostics/pregenerated/dict_en.cpp (+45/-7)
src/diagnostics/qname.cpp (+6/-0)
src/functions/CMakeLists.txt (+7/-0)
src/functions/external_function.cpp (+85/-5)
src/functions/external_function.h (+5/-1)
src/functions/func_accessors_impl.cpp (+81/-61)
src/functions/func_accessors_impl.h (+5/-0)
src/functions/func_apply.cpp (+1/-1)
src/functions/func_arithmetic.cpp (+24/-21)
src/functions/func_booleans_impl.cpp (+60/-39)
src/functions/func_collections_impl.cpp (+44/-2)
src/functions/func_durations_dates_times_impl.cpp (+2/-2)
src/functions/func_enclosed.cpp (+63/-20)
src/functions/func_errors_and_diagnostics_impl.cpp (+11/-2)
src/functions/func_eval.cpp (+4/-4)
src/functions/func_hoist.cpp (+40/-34)
src/functions/func_index_ddl.cpp (+1/-1)
src/functions/func_index_ddl.h (+11/-11)
src/functions/func_jsoniq_functions_impl.cpp (+76/-0)
src/functions/func_node_sort_distinct.cpp (+48/-13)
src/functions/func_node_sort_distinct.h (+8/-6)
src/functions/func_numerics_impl.cpp (+152/-152)
src/functions/func_reflection.cpp (+7/-4)
src/functions/func_sequences_impl.cpp (+279/-210)
src/functions/func_sequences_impl.h (+97/-56)
src/functions/func_serialize_impl.cpp (+38/-0)
src/functions/func_strings_impl.cpp (+21/-2)
src/functions/func_var_decl.cpp (+6/-64)
src/functions/function.cpp (+60/-23)
src/functions/function.h (+15/-13)
src/functions/function_consts.h (+5/-6)
src/functions/library.cpp (+12/-0)
src/functions/pregenerated/func_accessors.cpp (+0/-20)
src/functions/pregenerated/func_accessors.h (+70/-58)
src/functions/pregenerated/func_any_uri.h (+4/-2)
src/functions/pregenerated/func_base64.h (+8/-4)
src/functions/pregenerated/func_booleans.h (+21/-9)
src/functions/pregenerated/func_collections.h (+171/-65)
src/functions/pregenerated/func_context.h (+32/-16)
src/functions/pregenerated/func_documents.h (+22/-10)
src/functions/pregenerated/func_durations_dates_times.h (+84/-42)
src/functions/pregenerated/func_errors_and_diagnostics.h (+21/-11)
src/functions/pregenerated/func_fetch.h (+8/-4)
src/functions/pregenerated/func_fnput.h (+6/-2)
src/functions/pregenerated/func_function_item_iter.h (+12/-6)
src/functions/pregenerated/func_ic_ddl.h (+12/-6)
src/functions/pregenerated/func_json.cpp (+87/-0)
src/functions/pregenerated/func_json.h (+79/-0)
src/functions/pregenerated/func_jsoniq_functions.cpp (+353/-0)
src/functions/pregenerated/func_jsoniq_functions.h (+291/-0)
src/functions/pregenerated/func_maps.h (+32/-16)
src/functions/pregenerated/func_maths.h (+104/-52)
src/functions/pregenerated/func_node_position.cpp (+584/-0)
src/functions/pregenerated/func_node_position.h (+409/-0)
src/functions/pregenerated/func_nodes.h (+128/-54)
src/functions/pregenerated/func_numerics.h (+35/-21)
src/functions/pregenerated/func_other_diagnostics.h (+8/-4)
src/functions/pregenerated/func_parse_fragment.h (+4/-2)
src/functions/pregenerated/func_parsing_and_serializing.h (+10/-4)
src/functions/pregenerated/func_qnames.h (+41/-19)
src/functions/pregenerated/func_random.h (+12/-6)
src/functions/pregenerated/func_schema.h (+27/-11)
src/functions/pregenerated/func_sctx.h (+100/-50)
src/functions/pregenerated/func_sequences.h (+255/-185)
src/functions/pregenerated/func_strings.cpp (+60/-0)
src/functions/pregenerated/func_strings.h (+154/-63)
src/functions/pregenerated/func_xqdoc.h (+8/-4)
src/functions/pregenerated/function_enum.h (+41/-1)
src/functions/signature.cpp (+92/-62)
src/functions/signature.h (+9/-1)
src/functions/udf.cpp (+218/-11)
src/functions/udf.h (+47/-4)
src/precompiled/stdafx.h (+1/-1)
src/runtime/CMakeLists.txt (+2/-0)
src/runtime/base/plan_iterator.h (+4/-0)
src/runtime/booleans/BooleanImpl.cpp (+176/-197)
src/runtime/booleans/BooleanImpl.h (+1/-1)
src/runtime/collections/collections_impl.cpp (+21/-21)
src/runtime/core/arithmetic_impl.cpp (+45/-45)
src/runtime/core/arithmetic_impl.h (+18/-15)
src/runtime/core/constructors.cpp (+90/-88)
src/runtime/core/constructors.h (+27/-44)
src/runtime/core/flwor_iterator.cpp (+27/-30)
src/runtime/core/flwor_iterator.h (+1/-0)
src/runtime/core/fncall_iterator.cpp (+171/-25)
src/runtime/core/fncall_iterator.h (+39/-6)
src/runtime/core/gflwor/common.cpp (+45/-27)
src/runtime/core/gflwor/common.h (+4/-2)
src/runtime/core/gflwor/groupby_iterator.cpp (+9/-14)
src/runtime/core/gflwor/window_iterator.cpp (+3/-5)
src/runtime/core/path_iterators.cpp (+39/-33)
src/runtime/core/path_iterators.h (+3/-3)
src/runtime/core/sequencetypes.cpp (+39/-56)
src/runtime/core/trycatch.cpp (+1/-1)
src/runtime/core/var_iterators.cpp (+67/-90)
src/runtime/core/var_iterators.h (+13/-13)
src/runtime/eval/eval.cpp (+71/-35)
src/runtime/eval/eval.h (+18/-9)
src/runtime/fetch/fetch_impl.cpp (+11/-9)
src/runtime/full_text/apply.cpp (+19/-12)
src/runtime/full_text/ft_stop_words_set.cpp (+4/-4)
src/runtime/full_text/icu_tokenizer.cpp (+44/-24)
src/runtime/full_text/icu_tokenizer.h (+2/-2)
src/runtime/full_text/thesauri/wn_synset.cpp (+4/-2)
src/runtime/full_text/thesaurus.cpp (+22/-27)
src/runtime/full_text/thesaurus.h (+2/-27)
src/runtime/indexing/index_ddl.cpp (+52/-15)
src/runtime/indexing/index_ddl.h (+37/-30)
src/runtime/introspection/sctx_impl.cpp (+1/-1)
src/runtime/json/jansson_wrapper.cpp (+729/-0)
src/runtime/json/jansson_wrapper.h (+56/-0)
src/runtime/json/json_constructors.cpp (+270/-0)
src/runtime/json/json_constructors.h (+135/-0)
src/runtime/json/json_impl.cpp (+527/-0)
src/runtime/json/jsoniq_functions_impl.cpp (+470/-0)
src/runtime/json/pregenerated/json.cpp (+94/-0)
src/runtime/json/pregenerated/json.h (+114/-0)
src/runtime/json/pregenerated/jsoniq_functions.cpp (+401/-0)
src/runtime/json/pregenerated/jsoniq_functions.h (+504/-0)
src/runtime/misc/materialize.cpp (+1/-1)
src/runtime/nodes/node_position_impl.cpp (+756/-0)
src/runtime/nodes/pregenerated/node_position.cpp (+710/-0)
src/runtime/nodes/pregenerated/node_position.h (+858/-0)
src/runtime/numerics/NumericsImpl.cpp (+76/-76)
src/runtime/numerics/NumericsImpl.h (+2/-2)
src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp (+13/-6)
src/runtime/parsing_and_serializing/pregenerated/parsing_and_serializing.h (+2/-0)
src/runtime/qnames/qnames_impl.cpp (+41/-48)
src/runtime/scripting/scripting.cpp (+7/-8)
src/runtime/sequences/sequences_impl.cpp (+12/-12)
src/runtime/spec/accessors/accessors.xml (+48/-14)
src/runtime/spec/booleans/booleans.xml (+28/-15)
src/runtime/spec/codegen-cpp.xq (+8/-5)
src/runtime/spec/codegen-h.xq (+49/-12)
src/runtime/spec/collections/collections.xml (+22/-0)
src/runtime/spec/errors_and_diagnostics/errors_and_diagnostics.xml (+3/-0)
src/runtime/spec/fnput/fnput.xml (+2/-1)
src/runtime/spec/json/json.xml (+52/-0)
src/runtime/spec/json/jsoniq_functions.xml (+314/-0)
src/runtime/spec/mappings.xml (+17/-1)
src/runtime/spec/nodes/node_position.xml (+439/-0)
src/runtime/spec/nodes/nodes.xml (+320/-236)
src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml (+5/-0)
src/runtime/spec/plan_iter_visitor_h.xq (+4/-4)
src/runtime/spec/printer_visitor_cpp.xq (+2/-2)
src/runtime/spec/printer_visitor_h.xq (+1/-1)
src/runtime/spec/qnames/qnames.xml (+17/-0)
src/runtime/spec/schema/schema.xml (+19/-0)
src/runtime/spec/sequences/sequences.xml (+17/-0)
src/runtime/spec/store/documents.xml (+1/-0)
src/runtime/spec/strings/strings.xml (+61/-7)
src/runtime/store/maps_impl.cpp (+16/-3)
src/runtime/strings/pregenerated/strings.cpp (+70/-0)
src/runtime/strings/pregenerated/strings.h (+89/-0)
src/runtime/strings/strings_impl.cpp (+428/-101)
src/runtime/update/update.cpp (+2/-1)
src/runtime/visitors/planiter_visitor_impl_code.h (+58/-51)
src/runtime/visitors/planiter_visitor_impl_include.h (+12/-6)
src/runtime/visitors/pregenerated/planiter_visitor.h (+218/-1)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+560/-0)
src/runtime/visitors/pregenerated/printer_visitor.h (+139/-0)
src/runtime/visitors/printer_visitor_impl.cpp (+241/-171)
src/runtime/visitors/printer_visitor_impl.h (+61/-51)
src/runtime/xqdoc/xqdoc_impl.cpp (+4/-4)
src/store/api/annotation.h (+17/-15)
src/store/api/index.h (+60/-22)
src/store/api/item.h (+203/-38)
src/store/api/item_factory.h (+25/-145)
src/store/api/shared_types.h (+3/-0)
src/store/api/store.h (+42/-13)
src/store/api/temp_seq.h (+47/-47)
src/store/api/update_consts.h (+1/-1)
src/store/api/xs_type_codes.h (+96/-0)
src/store/naive/CMakeLists.txt (+8/-0)
src/store/naive/atomic_items.cpp (+857/-100)
src/store/naive/atomic_items.h (+247/-67)
src/store/naive/item.cpp (+302/-27)
src/store/naive/json_items.cpp (+315/-0)
src/store/naive/json_items.h (+388/-0)
src/store/naive/json_loader.cpp (+312/-0)
src/store/naive/json_loader.h (+72/-0)
src/store/naive/loader_dtd.cpp (+92/-56)
src/store/naive/loader_fast.cpp (+31/-36)
src/store/naive/node_factory.cpp (+2/-2)
src/store/naive/node_factory.h (+2/-2)
src/store/naive/node_items.cpp (+635/-266)
src/store/naive/node_items.h (+175/-73)
src/store/naive/node_iterators.cpp (+35/-9)
src/store/naive/node_iterators.h (+63/-9)
src/store/naive/node_updates.cpp (+10/-10)
src/store/naive/nsbindings.cpp (+3/-3)
src/store/naive/nsbindings.h (+3/-2)
src/store/naive/ordpath.cpp (+94/-0)
src/store/naive/ordpath.h (+11/-4)
src/store/naive/pul_primitives.cpp (+25/-26)
src/store/naive/pul_primitives.h (+5/-1)
src/store/naive/qname_pool.cpp (+2/-2)
src/store/naive/qname_pool.h (+1/-1)
src/store/naive/shared_types.h (+25/-0)
src/store/naive/simple_collection.cpp (+4/-2)
src/store/naive/simple_collection.h (+2/-3)
src/store/naive/simple_index.cpp (+312/-302)
src/store/naive/simple_index.h (+163/-204)
src/store/naive/simple_index_general.cpp (+1560/-2172)
src/store/naive/simple_index_general.h (+313/-174)
src/store/naive/simple_index_value.cpp (+187/-51)
src/store/naive/simple_index_value.h (+84/-39)
src/store/naive/simple_item_factory.cpp (+174/-4)
src/store/naive/simple_item_factory.h (+45/-0)
src/store/naive/simple_lazy_temp_seq.cpp (+158/-96)
src/store/naive/simple_lazy_temp_seq.h (+29/-144)
src/store/naive/simple_pul.cpp (+7/-7)
src/store/naive/simple_store.cpp (+262/-181)
src/store/naive/simple_store.h (+93/-48)
src/store/naive/simple_temp_seq.cpp (+166/-219)
src/store/naive/simple_temp_seq.h (+42/-43)
src/store/naive/store_defs.h (+0/-78)
src/store/naive/store_properties.h (+36/-17)
src/system/globalenv.cpp (+73/-25)
src/system/globalenv.h (+41/-22)
src/system/zorba_properties.h (+50/-12)
src/system/zorba_properties.txt (+4/-2)
src/types/casting.cpp (+544/-282)
src/types/casting.h (+39/-17)
src/types/root_typemanager.cpp (+263/-169)
src/types/root_typemanager.h (+78/-39)
src/types/schema/EventSchemaValidator.cpp (+3/-1)
src/types/schema/revalidateUtils.cpp (+6/-5)
src/types/schema/schema.cpp (+7/-7)
src/types/schema/schema.h (+2/-2)
src/types/schema/validate.cpp (+5/-2)
src/types/typeconstants.h (+1/-51)
src/types/typeimpl.cpp (+415/-60)
src/types/typeimpl.h (+258/-180)
src/types/typemanager.h (+30/-19)
src/types/typemanagerimpl.cpp (+138/-101)
src/types/typemanagerimpl.h (+32/-24)
src/types/typeops.cpp (+691/-512)
src/types/typeops.h (+21/-44)
src/unit_tests/CMakeLists.txt (+1/-6)
src/unit_tests/json_parser.cpp (+636/-0)
src/unit_tests/json_parser.cpp.moved (+623/-0)
src/unit_tests/test_debugger_protocol.cpp (+0/-414)
src/unit_tests/unit_test_list.h (+1/-0)
src/unit_tests/unit_tests.cpp (+1/-0)
src/util/CMakeLists.txt (+1/-0)
src/util/http_util.cpp (+2/-2)
src/util/json_parser.cpp (+634/-0)
src/util/json_parser.h (+553/-0)
src/util/stl_util.h (+2/-0)
src/util/string_util.h (+6/-0)
src/util/unicode_util.h (+4/-0)
src/util/utf8_util.cpp (+17/-0)
src/util/utf8_util_base.h (+27/-0)
src/zorbamisc/ns_consts.h (+6/-5)
src/zorbaserialization/zorba_class_serializer.cpp (+1/-0)
src/zorbatypes/URI.cpp (+0/-3)
src/zorbautils/hashmap_itemh.h (+112/-0)
swig/CMakeLists.txt (+2/-7)
swig/ItemFactory.h (+69/-0)
swig/ItemFactory.i (+192/-0)
swig/StaticContext.h (+69/-0)
swig/StaticContext.i (+43/-107)
swig/XQuery.i (+14/-0)
swig/Zorba.i (+28/-1)
swig/java/CMakeLists.txt (+2/-0)
swig/php/CMakeLists.txt (+23/-6)
swig/php/XQueryProcessor.php (+397/-0)
swig/php/generate_proxy.php.in (+7/-4)
swig/php/test.xq (+1/-0)
swig/php/zorba_api.i (+7/-1)
swig/python/CMakeLists.txt (+2/-0)
swig/ruby/CMakeLists.txt (+10/-0)
swig/zorba_api.i (+4/-1)
test/apitest.cpp (+21/-6)
test/rbkt/ExpCompilerResults/IterPlan/iterscript.cmake (+14/-10)
test/rbkt/ExpCompilerResults/IterPlan/zorba/error/trace1.iter (+8/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx4.iter (+24/-22)
test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter (+1/-1)
test/rbkt/ExpCompilerResults/IterPlan/zorba/misc/hoist4.iter (+7/-7)
test/rbkt/ExpCompilerResults/IterPlan/zorba/misc/inline_var1.iter (+2/-2)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-c.iter (+375/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-nc.iter (+375/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide2-c.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide2-nc.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dblp-q0.iter (+182/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9065.iter (+62/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9198.iter (+75/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9199.iter (+75/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9212.iter (+83/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9389.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9390.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9392.iter (+71/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-gary1.iter (+227/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx1.iter (+105/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx4.iter (+170/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-q8.iter (+102/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/path17.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q1.iter (+49/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q10.iter (+246/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q11.iter (+103/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q12.iter (+115/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q13.iter (+45/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q14.iter (+39/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q15.iter (+50/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q16.iter (+65/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q17.iter (+47/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q18.iter (+38/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q19.iter (+56/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q2.iter (+43/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q20.iter (+192/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q3.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q4.iter (+126/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q5.iter (+41/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q6.iter (+29/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q7.iter (+39/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q8.iter (+107/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q9.iter (+169/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/udfs1.iter (+58/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/paths/pred_order.iter (+2/-2)
test/rbkt/ExpCompilerResults/IterPlan/zorba/string/SubstringFunc/SubstringFunc2.iter (+10/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/string/SubstringFunc/SubstringFunc3.iter (+14/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf-fib-rec.iter (+42/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf1.iter (+5/-5)
test/rbkt/ExpQueryResults/zorba/debugger/dmh/break_response.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/debugger/dmh/break_response_no_info.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/error/trace1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/eval/eval9.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/eval/invoke1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-same-sentence-false-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/index/auctions1.xml.res (+3/-3)
test/rbkt/ExpQueryResults/zorba/index/numbers.xml.res (+21/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-02.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-03.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-04.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-05.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-object-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-object-02.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-snelson.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/json/json-serialize-array-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_01.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_02.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_15.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_16.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_17.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_18.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_21.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_210.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_211.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_212.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_213.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_22.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_23.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_24.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_25.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_26.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_27.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_28.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_29.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_7.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_4_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_4_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_4_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_5_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_5_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_6_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_6_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/flatten_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/fn_boolean_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/member_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/names_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/names_02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/pair_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/value_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/values_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/misc/baseuri.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide-c.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide-nc.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide2-c.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide2-nc.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dblp-q0.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9198.xml.res (+19/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9199.xml.res (+19/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9212.xml.res (+49/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9389.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9390.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9392.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-gary1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-idx1.xml.res (+254/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-idx4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-q8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/parser_test.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/path17.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q13.xml.res (+18/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q17.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q18.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q19.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q20.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q7.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q9.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/udfs1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_1_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_2.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_2_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_3.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_3_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_4.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_4_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_err.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/schemas/validate_xqdoc_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/validate_xqdoc_02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/udf/udf-fib-rec-BIG_INTEGER.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/udf/udf-fib-rec.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding06.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding13.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling08.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling24.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling26.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling27.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling28.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling29.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling30.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling32.xml.res (+12/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling33.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling34.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling35.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling36.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling38.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling39.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling40.xml.res (+24/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling41.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling45.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling46.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling47.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling48.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/windowing12.xml.res (+1/-0)
test/rbkt/Queries/CMakeLists.txt (+37/-17)
test/rbkt/Queries/w3c_known_failures.txt (+2/-0)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq (+10/-6)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq (+9/-6)
test/rbkt/Queries/zorba/debugger/dmh/break_response.xq (+5/-0)
test/rbkt/Queries/zorba/debugger/dmh/break_response_no_info.xq (+7/-0)
test/rbkt/Queries/zorba/error/trace1.xq (+6/-0)
test/rbkt/Queries/zorba/eval/eval9.xq (+6/-0)
test/rbkt/Queries/zorba/eval/invoke1.xq (+5/-0)
test/rbkt/Queries/zorba/eval/invoke1_1.xqlib (+10/-0)
test/rbkt/Queries/zorba/eval/invoke1_2.xqlib (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-false-2.xq (+2/-0)
test/rbkt/Queries/zorba/index/auctions1.xml (+1/-0)
test/rbkt/Queries/zorba/index/auctions1.xq (+1/-1)
test/rbkt/Queries/zorba/index/numbers.xml (+10/-0)
test/rbkt/Queries/zorba/index/numbers.xq (+75/-0)
test/rbkt/Queries/zorba/index/numbers.xqlib (+28/-0)
test/rbkt/Queries/zorba/json/json-parse-array-01.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-02.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-03.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-04.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-05.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-object-01.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-object-02.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-snelson.xq (+20/-0)
test/rbkt/Queries/zorba/json/json-serialize-array-01.xq (+8/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_01.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_02.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_03.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_14.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_15.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_16.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_17.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_18.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_21.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_210.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_211.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_212.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_213.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_22.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_23.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_24.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_25.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_26.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_27.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_28.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_29.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_1.xq (+11/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_2.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_3.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_4.xq (+14/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_5.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_6.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_7.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_4_1.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_4_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_4_3.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_5_1.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_5_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_6_1.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_6_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_6_3.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_1.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_3.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_4.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_5.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_6.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/flatten_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/fn_boolean_01.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/member_01.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/names_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/names_02.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/obj_constr_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/pair_01.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/parser_01.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/parser_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/value_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/values_01.xq (+5/-0)
test/rbkt/Queries/zorba/misc/baseuri.xml (+1/-0)
test/rbkt/Queries/zorba/misc/baseuri.xq (+2/-0)
test/rbkt/Queries/zorba/modules/libraryModule15.xqlib (+8/-3)
test/rbkt/Queries/zorba/no-copy/auction.xml (+2182/-0)
test/rbkt/Queries/zorba/no-copy/books.xml (+25/-0)
test/rbkt/Queries/zorba/no-copy/dataguide-c.xq (+87/-0)
test/rbkt/Queries/zorba/no-copy/dataguide-nc.xq (+91/-0)
test/rbkt/Queries/zorba/no-copy/dataguide2-c.xq (+33/-0)
test/rbkt/Queries/zorba/no-copy/dataguide2-nc.xq (+38/-0)
test/rbkt/Queries/zorba/no-copy/dblp-q0.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/dblp-q0.xq (+32/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9065.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9198.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9199.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9212.xq (+15/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9389.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9390.xq (+15/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9392.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-gary1.xq (+42/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-idx1.xq (+12/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-idx4.xq (+33/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-q8.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/parser_test.xq (+3/-0)
test/rbkt/Queries/zorba/no-copy/path17.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/path17.xq (+12/-0)
test/rbkt/Queries/zorba/no-copy/q1.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q1.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/q10.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q10.xq (+36/-0)
test/rbkt/Queries/zorba/no-copy/q11.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q11.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q12.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q12.xq (+16/-0)
test/rbkt/Queries/zorba/no-copy/q13.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q13.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/q14.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q14.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/q15.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q15.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q16.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q16.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/q17.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q17.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q18.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q18.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/q19.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q19.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q2.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q2.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q20.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q20.xq (+34/-0)
test/rbkt/Queries/zorba/no-copy/q3.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q3.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q4.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q4.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q5.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q5.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q6.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q6.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q7.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q7.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/q8.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q8.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q9.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q9.xq (+20/-0)
test/rbkt/Queries/zorba/no-copy/simple_parser.xqlib (+2207/-0)
test/rbkt/Queries/zorba/no-copy/test1.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/udfs1.xq (+31/-0)
test/rbkt/Queries/zorba/no-copy/udfs2.xq (+31/-0)
test/rbkt/Queries/zorba/nodes/position.xml (+15/-0)
test/rbkt/Queries/zorba/nodes/position_1.xq (+97/-0)
test/rbkt/Queries/zorba/nodes/position_1_parsed.xq (+98/-0)
test/rbkt/Queries/zorba/nodes/position_2.xq (+157/-0)
test/rbkt/Queries/zorba/nodes/position_2_parsed.xq (+156/-0)
test/rbkt/Queries/zorba/nodes/position_3.xq (+32/-0)
test/rbkt/Queries/zorba/nodes/position_3_parsed.xq (+34/-0)
test/rbkt/Queries/zorba/nodes/position_4.xq (+84/-0)
test/rbkt/Queries/zorba/nodes/position_4_parsed.xq (+81/-0)
test/rbkt/Queries/zorba/nodes/position_err.xq (+60/-0)
test/rbkt/Queries/zorba/schemas/validate_xqdoc_01.xq (+4/-0)
test/rbkt/Queries/zorba/schemas/validate_xqdoc_02.xq (+4/-0)
test/rbkt/Queries/zorba/store/documents.xq (+1/-0)
test/rbkt/Queries/zorba/string/Regex/regex_a4.xq (+1/-0)
test/rbkt/Queries/zorba/string/token01.txt (+1/-0)
test/rbkt/Queries/zorba/string/token02.txt (+1/-0)
test/rbkt/Queries/zorba/string/token03.txt (+1/-0)
test/rbkt/Queries/zorba/string/token04.txt (+1/-0)
test/rbkt/Queries/zorba/string/tokenize01.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize02.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize03.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize04.xq (+5/-0)
test/rbkt/Queries/zorba/udf/udf-fib-rec.spec (+1/-0)
test/rbkt/Queries/zorba/udf/udf-fib-rec.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/sliding01.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding02.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding03.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding04.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding05.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding06.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/sliding07.xq (+10/-0)
test/rbkt/Queries/zorba/windowing/sliding08.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/sliding08.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding09.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding10.xq (+18/-0)
test/rbkt/Queries/zorba/windowing/sliding11.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding12.xq (+7/-0)
test/rbkt/Queries/zorba/windowing/sliding13.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding14.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/tumbling01.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling02.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling04.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling05.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling06.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling07.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling08.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling09.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling10.xq (+10/-0)
test/rbkt/Queries/zorba/windowing/tumbling11.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling11.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling14.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling14.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling15.spec (+2/-0)
test/rbkt/Queries/zorba/windowing/tumbling15.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling16.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling16.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling17.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling17.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling18.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling18.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling19.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling19.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling20.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling20.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling21.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling21.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling22.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling22.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling24.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling25.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling26.xq (+3/-0)
test/rbkt/Queries/zorba/windowing/tumbling27.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling28.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling29.xq (+17/-0)
test/rbkt/Queries/zorba/windowing/tumbling31.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling31.xq (+3/-0)
test/rbkt/Queries/zorba/windowing/tumbling32.xq (+19/-0)
test/rbkt/Queries/zorba/windowing/tumbling33.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling34.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling35.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling36.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling37.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling37.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling38.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling39.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/tumbling40.xq (+27/-0)
test/rbkt/Queries/zorba/windowing/tumbling41.xq (+9/-0)
test/rbkt/Queries/zorba/windowing/tumbling42.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling42.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling43.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling43.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling44.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling44.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling45.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling46.xq (+17/-0)
test/rbkt/Queries/zorba/windowing/tumbling47.xq (+20/-0)
test/rbkt/Queries/zorba/windowing/tumbling48.xq (+18/-0)
test/rbkt/Queries/zorba/windowing/tumbling49.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/windowing12.xq (+9/-0)
test/rbkt/Queries/zorba/windowing/windowing13.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/windowing13.xq (+4/-0)
test/rbkt/Queries/zorba/xmark/q10.xq (+8/-4)
test/rbkt/Queries/zorba/xqddf/test-node-reference.xq (+2/-0)
test/rbkt/Scripts/w3c/Readme.txt (+15/-6)
test/rbkt/Scripts/w3c/Submit_xqts.cmake (+19/-8)
test/rbkt/Scripts/w3c/generate-submission-xqftts.xq (+4/-4)
test/rbkt/Scripts/w3c/generate-submission-xqts.xq (+1/-6)
test/rbkt/itertest.xq.in (+58/-44)
test/rbkt/specification.h (+1/-1)
test/rbkt/testdriver_common.cpp (+14/-3)
test/rbkt/testdriver_mt.cpp (+31/-4)
test/unit/CMakeLists.txt (+24/-0)
test/unit/context_item.cpp (+158/-0)
test/unit/context_item1.xq (+4/-0)
test/unit/context_item2.xq (+6/-0)
test/unit/cxx_api_ch1.xq (+26/-0)
test/unit/cxx_api_ch2.xq (+17/-0)
test/unit/cxx_api_ch3.xq (+20/-0)
test/unit/cxx_api_ch4.xq (+19/-0)
test/unit/cxx_api_changes.cpp (+345/-0)
test/unit/datetime.cpp (+2/-0)
test/unit/ext_main3.xq (+21/-0)
test/unit/ext_mod2.xq (+19/-0)
test/unit/external_function.cpp (+59/-1)
test/unit/guestbook.xq (+9/-0)
test/unit/guestbook_main.xq (+1/-1)
test/unit/main_invoke.xq (+9/-0)
test/unit/module2.xq (+6/-0)
test/unit/module4.xq (+6/-0)
test/unit/static_context.cpp (+75/-0)
test/unit/staticcollectionmanager.cpp (+65/-2)
test/unit/testGetExtVarA.xq (+13/-0)
test/unit/testGetExtVarB.xq (+6/-0)
test/unit/thesaurus.cpp (+9/-13)
test/update/CMakeLists.txt (+1/-1)
test/update/Queries/zorba/store/sc3.spec (+0/-2)
test/update/Scripts/Readme.txt (+1/-1)
test/update/Scripts/generate-submission-xquts.xq (+1/-0)
test/zperf/src/start.xq (+154/-100)
To merge this branch: bzr merge lp:~zorba-coders/zorba/jsoniq
Reviewer Review Type Date Requested Status
Zorba Coders Pending
Review via email: mp+90136@code.launchpad.net

This proposal has been superseded by a proposal from 2012-01-27.

Commit message

create web interface for jsoniq

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:zorba/3.0 into lp:~zorba-coders/zorba/zorba-experimental failed. Below is the output from the failed tests.

experimental build started for lp:zorba/3.0. Check out http://3.0.zorba-xquery.com/ in half an hour or so. Logfile at http://zorbatest.lambda.nu:8080/remotequeue/experimental/3.0.log .

lp:~zorba-coders/zorba/jsoniq updated
10588. By Markos Zaharioudakis

exteneded no-copy rule to json constructor exprs

10589. By Markos Zaharioudakis

added pair-or-member-accessor internal function + fixed bugs in constructors

10590. By Matthias Brantner

enable JSON by default

10591. By Markos Zaharioudakis

fixed bug #922432

10592. By Matthias Brantner

skeletons for updating functions

10593. By Matthias Brantner

implemented the j:null() function to create null items

10594. By Matthias Brantner

implemented copy for object pairs and removed obsolete container member

10595. By Matthias Brantner

Implemented copy for JSONObjects and JSONArrays.
Fixed misleading name in SimpleJSONArrays.

10596. By Matthias Brantner

added more complex test

10597. By Matthias Brantner

fix for object lookup

10598. By Matthias Brantner

implemented equals and hash for json null

10599. By Matthias Brantner

fixed build without json

10600. By Markos Zaharioudakis

cosmetic

10601. By Markos Zaharioudakis

merge from trunk

10602. By Till Westmann

moved JSONiq errors to the http://www.jsoniq.org/errors namespace

10603. By Chris Hillery

Check out HEAD of data-converters module rather than head, so we don't have
the old Jansson-based JSON module.

10604. By Matthias Brantner

- typed value for null and pairs
- return pairs in order of insertion
- most of the delete UP (no errors or undo, yet)

10605. By Chris Hillery

More serialization method changes:
1. Re-introduced json_emitter which only outputs JSON ("json" output method
will explicitly use this)
2. Introduce new jsoniq_emitter which detects whether first item is JDM or
XDM and uses an xml_emitter or json_emitter accordingly ("jsoniq" output
method will use this, and is the default)

10606. By Markos Zaharioudakis

work on jsoniq collections

10607. By Matthias Brantner

error checking and fixes for json:delete

10608. By Till Westmann

added support for the serialization method "JSONiq" in the testdriver

10609. By Till Westmann

introduced diagnostic categories JSONIQ_CORE and JSONIQ_UPDATE

10610. By Till Westmann

fixed expeted error for jsoniq/insert02

10611. By Markos Zaharioudakis

work on jsoniq collections

10612. By Matthias Brantner

array inserting updates

10613. By Matthias Brantner

fix generation of the jsoniq error module

10614. By Matthias Brantner

- manual maintenance of reference count for array members
- cleanup json puls

10615. By Markos Zaharioudakis

implemented ddl module for dynamic jsoniq collections + fixed bug #924595 + added syntax for structured-item() type test

10616. By Markos Zaharioudakis

work on jsoniq collections + fixed a bug in SimpleJSONArray::copy

10617. By Markos Zaharioudakis

work on jsoniq collections

10618. By Matthias Brantner

- upd:rename
- upd:replace-value
- improved upd:delete (with type promotion)
- fixed implementation of delete by using the position of an array in apply

10619. By Markos Zaharioudakis

finished DML module for dynamic jsoniq collections + fixed memory problem in root_typemanager

10620. By Paul J. Lucas

Merge from trunk.

10621. By Matthias Brantner

bugfix to report errors for duplicate keys in an object

10622. By Matthias Brantner

fixed the build without ZORBA_WITH_JSON

10623. By Matthias Brantner

fixed error messages

10624. By Matthias Brantner

empty member accessor

10625. By Chris Hillery

Support all atomic types when serializing, including those serialized as
"JSONiq value".

10626. By Matthias Brantner

- objects and pairs don't have a string value
- better error for fn:data on objects and arrays
- fixed return type for j:size()

10627. By Matthias Brantner

- fixed copy-transform to also allow json-items
- fixed flatten for json pairs
- added all queries from the use case document as tests

10628. By Matthias Brantner

better error for member accessor with wrong arg type

10629. By Chris Hillery

Add serialization of nested XML. Escape all strings appropriately.

10630. By Markos Zaharioudakis

fixed bug in implicit invocation of json item accessor functions

10631. By Chris Hillery

Added Item API methods for JSONiq.

10632. By Matthias Brantner

undo fix for type-promotion wrapping. this is fixed by normalize_fo

10633. By Matthias Brantner

raise an error if json:values is called with a pair

10634. By Matthias Brantner

hack for allowing true, false, and null in the content of a pair

10635. By Matthias Brantner

hack to treat a block whose expression returns only pairs as an object constructor

this means that the top-level sequential top-level program can never return pairs (only an object)

10636. By Matthias Brantner

fixed fn:boolean for json pairs and json:null

- fn:boolean(json:null()) => false
- fn:boolean(pair) => fn:boolean(value(pair))
- fn:booelean(pair*) => error

10637. By Matthias Brantner

merge

10638. By Matthias Brantner

fixed test case such that fn:data and explicit unboxing and flattening is not needed anymore

10639. By Matthias Brantner

changed semantics of the member selector to automatically do iteration

10640. By Matthias Brantner

implicit iteration for member selectors

10641. By Matthias Brantner

allow true, false, and null everywhere

10642. By Matthias Brantner

support for pairs with colon operator (removed direct and computed object and array constructors)

10643. By Chris Hillery

Fix serialization of control sequences.

10644. By Chris Hillery

Ignore standard "build" directory, and CMakeLists.txt.user (which is a
project file created by the QtCreator IDE).

10645. By Chris Hillery

Adding documentation for all functions.

10646. By Chris Hillery

Merge from trunk.

10647. By Chris Hillery

Added ItemFactory methods to create JSON items, along with test cases.

10648. By Markos Zaharioudakis

predeclared jn prefix

10649. By Markos Zaharioudakis

predeclared jn prefix (2nd try)

10650. By Matthias Brantner

commit the pre-generated parser files

10651. By Matthias Brantner

fixed jsoniq namespace + always process the jsoniq module because it contains udfs

10652. By Matthias Brantner

build fixes for without json

10653. By Matthias Brantner

added two tutorials as html. also temporarily removed the json module declaration
in order to make xqdoc work

10654. By Matthias Brantner

merge with trunk

10655. By Matthias Brantner

always indent by default in the swig bindings (this is a hack to get a nicer output in the web interface)

10656. By Matthias Brantner

fixed output of JSON_Test in xqdoc (e.g. array())

10657. By Chris Hillery

Allow "jsoniq" serialization method to serve for SAX output.

10658. By Chris Hillery

There are now 6 built-in namespace bindings (including jn: ).

10659. By Chris Hillery

Use Store::populateJSONArray() in ItemFactory.

10660. By Matthias Brantner

updated namespace prefix in the jsoniq module to jn

10661. By Matthias Brantner

- revert rev. 10655
- in execute, make the default indent + no xml decl

10662. By Matthias Brantner

updated jsoniq tutorials to latest drafts

10663. By Nicolae Brinza

Implementation of the new Cloudscript grammar.

10664. By Markos Zaharioudakis

removed pairs from type system and compiler

10665. By Markos Zaharioudakis

merge from trunk

10666. By Markos Zaharioudakis

forbid json items in xml constructors

10667. By Markos Zaharioudakis

translation of json constructor exprs

10668. By Markos Zaharioudakis

re-implemented json constructors

10669. By Markos Zaharioudakis

fixed EBV for jsoniq

10670. By Markos Zaharioudakis

work on jsoniq functions

10671. By Markos Zaharioudakis

fixed error codes and tests

10672. By Markos Zaharioudakis

implemented values( as object()) function

10673. By Markos Zaharioudakis

implemented accumulating object constructor

10674. By Markos Zaharioudakis

implemented the project function

10675. By Markos Zaharioudakis

implemented object insertions

10676. By Markos Zaharioudakis

more work on jsoniq updates

10677. By Markos Zaharioudakis

more work on jsoniq updates

10678. By Chris Hillery

Add Cloudscript-defined serialization parameters (boilerplate; not all
features implemented fully yet). Enable setting of serialization
parameters via .spec files.

10679. By Chris Hillery

Added CloudScript serialization error codes, and implementation checks to
throw them when appropriate. Several test cases.

10680. By Markos Zaharioudakis

done with object updates

10681. By Markos Zaharioudakis

fixed tests failing due to serialization changes

10682. By Markos Zaharioudakis

more work on array updates

10683. By Markos Zaharioudakis

done with array updates

10684. By Markos Zaharioudakis

renamed jn:names to jn:keys + removed 0-arity navigation

10685. By Markos Zaharioudakis

removed array(ItemType) type

10686. By Markos Zaharioudakis

introduced JNTY0002 error

10687. By Markos Zaharioudakis

merge from trunk + work on static and dynamic collection modules

10688. By Markos Zaharioudakis

merged with trunk

10689. By Markos Zaharioudakis

fixed no-copy rule omission

10690. By Chris Hillery

Re-enable support for "old-style" Serialization: .spec file options
(should be deprecated, but still used by some non-core modules)

10691. By Chris Hillery

Remove public API methods that are specific to Object Pairs (no longer part
of the JSONiq spec).

10692. By Ghislain Fourny

Merged jsoniq-plan_serialization branch.

10693. By Ghislain Fourny

Merged trunk back.

10694. By Ghislain Fourny

Fixed flwor expression clause getter.

10695. By Ghislain Fourny

Now compiles and links.

10696. By Ghislain Fourny

Merged trunk back (10838).

10697. By Ghislain Fourny

Fixed some tests.

10698. By Chris Hillery

Additional fixes to handle old-style --method Serialization args correctly.

10699. By Ghislain Fourny

Copied pregenerated scanner and parser files.

10700. By Ghislain Fourny

Merged changes from child branch.

10701. By Ghislain Fourny

Merged trunk back.

10702. By Ghislain Fourny

Added curly braces in JSON insert expressions.

10703. By Ghislain Fourny

Extended update syntax to general FilterExprs.

10704. By Ghislain Fourny

Solved memory leak.

10705. By Ghislain Fourny

Adding tests.

10706. By Ghislain Fourny

Collection functions now work with general items.

10707. By Ghislain Fourny

Began removing pairs in the implementation. Still build errors.

10708. By Ghislain Fourny

Now compiles, but does not link yet.

10709. By Ghislain Fourny

Now links.

10710. By Ghislain Fourny

All JSONiq tests now pass.

10711. By Ghislain Fourny

Renamed cloudscript-extensions to jsoniq-extensions

10712. By Ghislain Fourny

Renamed cloudscript to jsoniq.

10713. By Ghislain Fourny

Renamed cloudscript to jsoniq.

10714. By Ghislain Fourny

Renamed cloudscript to jsoniq.

10715. By Ghislain Fourny

Now outputs INF upon positive infinity.

10716. By Ghislain Fourny

Using the pre-imported jn: prefix in some tests.

10717. By Ghislain Fourny

JSON items are now pointing to the root of their tree.

10718. By Ghislain Fourny

Indices should now work.

10719. By Ghislain Fourny

Index creation and probe should now work.

10720. By Ghislain Fourny

Reverted rename.

10721. By Ghislain Fourny

Reverted renaming.

10722. By Ghislain Fourny

Merged trunk back.

10723. By Ghislain Fourny

Merged jsoniq-deactivated back.

10724. By Ghislain Fourny

Fixed index maintenance.

10725. By Ghislain Fourny

Fixed tests.

10726. By Ghislain Fourny

Merged trunk back.

10727. By Ghislain Fourny

Synced error codes.

10728. By Ghislain Fourny

Added guards.

10729. By Ghislain Fourny

Deactivating JSON for merge proposal and one more fix.

10730. By Ghislain Fourny

Synced error codes.

10731. By Ghislain Fourny

Solved bug 918151 by allowing mixed items if a flag is set.

10732. By Ghislain Fourny

Removed useless and obsolete code that still contained JSON Pairs.

10733. By Ghislain Fourny

Fixed comment.

10734. By Ghislain Fourny

Added files.

10735. By Markos Zaharioudakis

small cosmetic changes

10736. By Ghislain Fourny

Implemented Markos' comments 1 through 5.

10737. By Ghislain Fourny

Implemented Markos' comments 7, 8 and 9.

10738. By Ghislain Fourny

Changed signature of getArraySize() to xs_integer.

10739. By Ghislain Fourny

Corrected bug and reverted mappings.xml to JSONiq deactivated version.

10740. By Ghislain Fourny

Adding tests.

10741. By Ghislain Fourny

Updated pregenerated parser files.

10742. By Ghislain Fourny

Generating preprocessor guards for STRUCTURED_ITEM.

10743. By Ghislain Fourny

Fixed emit_end().

10744. By Ghislain Fourny

Updated updating error code and adding wrappers.

10745. By Ghislain Fourny

Now back to original order when outputting keys.

10746. By Ghislain Fourny

Optimized JSON root management system.

10747. By Ghislain Fourny

Optimized JSON item value memory management.

10748. By Ghislain Fourny

Using items instead of zstrings as keys in JSON objects.

10749. By Ghislain Fourny

Replaced dynamic casts with static casts and added dynamic cast assertions for debug mode.

10750. By Ghislain Fourny

Merged trunk back.

10751. By Markos Zaharioudakis

compilation fixes

10752. By Markos Zaharioudakis

compilation fixes

10753. By Markos Zaharioudakis

added all variants of getStringValue() for JSONNull + cosmetic

10754. By Markos Zaharioudakis

merge from trunk

10755. By Ghislain Fourny

Implemented Markos' comments, except 10.

10756. By Ghislain Fourny

Merged trunk back.

10757. By Ghislain Fourny

Fixed tests.

10758. By Ghislain Fourny

Merged trunk back.

10759. By Ghislain Fourny

Implemented more efficient data structure on objects.

10760. By Ghislain Fourny

Changed parameter of getObjectValue() to an item.

10761. By Ghislain Fourny

Removed free list.

10762. By Ghislain Fourny

changed 1st param of setJSONRoot() to Item* to save some ref counting + eliminated some compiler warnings

10763. By Ghislain Fourny

Fixed compilation error on Windows.

10764. By Ghislain Fourny

Improved efficiency of removing an object pair.

10765. By Markos Zaharioudakis

a better implementation for SimpleJSONObject::remove()

10766. By Markos Zaharioudakis

small optimizations + cosmetic

10767. By Markos Zaharioudakis

commented out ZORBA_TEST_PLAN_SERIALIZATION flag in testdriver.cpp

10768. By Markos Zaharioudakis

fixed compiler warnings

10769. By Markos Zaharioudakis

fixed print out of jsoniq errors

10770. By Markos Zaharioudakis

added missing <value> to a couple of jsoniq errors

10771. By Ghislain Fourny

Deactivated invariant assertions for the moment.

10772. By Ghislain Fourny

Merged trunk back.

10773. By Ghislain Fourny

Regenerated files.

10774. By Ghislain Fourny

A small fix (already in trunk).

Unmerged revisions

10774. By Ghislain Fourny

A small fix (already in trunk).

10773. By Ghislain Fourny

Regenerated files.

10772. By Ghislain Fourny

Merged trunk back.

10771. By Ghislain Fourny

Deactivated invariant assertions for the moment.

10770. By Markos Zaharioudakis

added missing <value> to a couple of jsoniq errors

10769. By Markos Zaharioudakis

fixed print out of jsoniq errors

10768. By Markos Zaharioudakis

fixed compiler warnings

10767. By Markos Zaharioudakis

commented out ZORBA_TEST_PLAN_SERIALIZATION flag in testdriver.cpp

10766. By Markos Zaharioudakis

small optimizations + cosmetic

10765. By Markos Zaharioudakis

a better implementation for SimpleJSONObject::remove()

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeConfiguration.txt'
--- CMakeConfiguration.txt 2011-09-16 19:55:59 +0000
+++ CMakeConfiguration.txt 2012-01-27 05:33:27 +0000
@@ -70,10 +70,6 @@
70SET(ZORBA_FOR_ONE_THREAD_ONLY OFF CACHE BOOL "compile zorba for single threaded use")70SET(ZORBA_FOR_ONE_THREAD_ONLY OFF CACHE BOOL "compile zorba for single threaded use")
71MESSAGE(STATUS "ZORBA_FOR_ONE_THREAD_ONLY: " ${ZORBA_FOR_ONE_THREAD_ONLY})71MESSAGE(STATUS "ZORBA_FOR_ONE_THREAD_ONLY: " ${ZORBA_FOR_ONE_THREAD_ONLY})
7272
73# by default the zorba command line client is deactivated until it gets to a more stable and userfriendly state
74SET(ZORBA_WITH_DEBUGGER_CLIENT OFF CACHE BOOL "build and install zorbas command line debugger client")
75MESSAGE(STATUS "ZORBA_WITH_DEBUGGER_CLIENT: " ${ZORBA_WITH_DEBUGGER_CLIENT})
76
77IF (DEFINED UNIX)73IF (DEFINED UNIX)
78 IF (NOT DEFINED ZORBA_HAVE_PTHREAD_H AND NOT DEFINED ZORBA_FOR_ONE_THREAD_ONLY)74 IF (NOT DEFINED ZORBA_HAVE_PTHREAD_H AND NOT DEFINED ZORBA_FOR_ONE_THREAD_ONLY)
79 MESSAGE(FATAL_ERROR "pthread is not available")75 MESSAGE(FATAL_ERROR "pthread is not available")
@@ -156,6 +152,9 @@
156SET(ZORBA_WITH_BIG_INTEGER OFF CACHE BOOL "enable arbitrary precision integers")152SET(ZORBA_WITH_BIG_INTEGER OFF CACHE BOOL "enable arbitrary precision integers")
157MESSAGE(STATUS "ZORBA_WITH_BIG_INTEGER: " ${ZORBA_WITH_BIG_INTEGER})153MESSAGE(STATUS "ZORBA_WITH_BIG_INTEGER: " ${ZORBA_WITH_BIG_INTEGER})
158154
155SET(ZORBA_WITH_JSON ON CACHE BOOL "enable integrated JSON support")
156MESSAGE(STATUS "ZORBA_WITH_JSON: " ${ZORBA_WITH_JSON})
157
159IF (ZORBA_SUPPRESS_SWIG)158IF (ZORBA_SUPPRESS_SWIG)
160 SET (no_swig ON)159 SET (no_swig ON)
161ELSE (ZORBA_SUPPRESS_SWIG)160ELSE (ZORBA_SUPPRESS_SWIG)
162161
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2011-10-09 13:56:39 +0000
+++ CMakeLists.txt 2012-01-27 05:33:27 +0000
@@ -417,13 +417,35 @@
417417
418# zorba versioning418# zorba versioning
419SET(ZORBA_MAJOR_NUMBER "2")419SET(ZORBA_MAJOR_NUMBER "2")
420SET(ZORBA_MINOR_NUMBER "0")420SET(ZORBA_MINOR_NUMBER "1")
421SET(ZORBA_PATCH_NUMBER "1")421SET(ZORBA_PATCH_NUMBER "0")
422SET(ZORBA_VERSION ${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER})422SET(ZORBA_VERSION ${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER})
423MESSAGE(STATUS "Zorba version number: ${ZORBA_VERSION}")423MESSAGE(STATUS "Zorba version number: ${ZORBA_VERSION}")
424SET(ZORBA_MODULES_INSTALL_DIR "share/zorba-${ZORBA_VERSION}/modules"424
425 CACHE STRING "Path (relative to installdir) to modules" FORCE)425SET(ZORBA_LIB_DIRNAME "lib" CACHE STRING
426MARK_AS_ADVANCED(ZORBA_MODULES_INSTALL_DIR)426 "directory name for libs (may want to set to 'lib64' on 64-bit Linux platforms)")
427
428# Directories for modules and schemas. "Core" are those which are
429# shipped with Zorba and must be present for correct Zorba
430# functionality. "Non-core" are developed independently of Zorba and
431# have different version lifecycles.
432#
433# URI dir is for things resolved by URI - specifically modules (.xq
434# files) and schemas (.xsd files) - which are platform-
435# independent. Lib dir is for platform-specific files, specifically
436# shared libraries for module external functions.
437SET(ZORBA_NONCORE_URI_DIR "share/zorba/uris"
438 CACHE STRING "Path (relative to installdir) to non-core modules/schemas")
439MARK_AS_ADVANCED(ZORBA_NONCORE_URI_DIR)
440SET(ZORBA_CORE_URI_DIR "${ZORBA_NONCORE_URI_DIR}/core/${ZORBA_VERSION}"
441 CACHE STRING "Path (relative to installdir) to core modules/schemas")
442MARK_AS_ADVANCED(ZORBA_CORE_URI_DIR)
443SET(ZORBA_NONCORE_LIB_DIR "${ZORBA_LIB_DIRNAME}/zorba"
444 CACHE STRING "Path (relative to installdir) to non-core libraries")
445MARK_AS_ADVANCED(ZORBA_NONCORE_LIB_DIR)
446SET(ZORBA_CORE_LIB_DIR "${ZORBA_NONCORE_LIB_DIR}/core/${ZORBA_VERSION}"
447 CACHE STRING "Path (relative to installdir) to core libraries")
448MARK_AS_ADVANCED(ZORBA_CORE_LIB_DIR)
427449
428# add compiler variables450# add compiler variables
429ADD_DEFINITIONS(${DEFINITIONS})451ADD_DEFINITIONS(${DEFINITIONS})
@@ -460,7 +482,7 @@
460 SET(ZORBA_CMAKE_DIR "cmake" CACHE STRING482 SET(ZORBA_CMAKE_DIR "cmake" CACHE STRING
461 "Relative path to CMake files in Zorba installation")483 "Relative path to CMake files in Zorba installation")
462ELSE (WIN32)484ELSE (WIN32)
463 SET(ZORBA_CMAKE_DIR "share/zorba-${ZORBA_VERSION}/cmake" CACHE STRING485 SET(ZORBA_CMAKE_DIR "share/cmake/zorba-${ZORBA_VERSION}" CACHE STRING
464 "Relative path to CMake files in Zorba installation")486 "Relative path to CMake files in Zorba installation")
465ENDIF (WIN32)487ENDIF (WIN32)
466488
@@ -534,4 +556,4 @@
534# This dependency is zorba-only related, which is why it's added here556# This dependency is zorba-only related, which is why it's added here
535# and not within zorba-modules, which is for general use in other557# and not within zorba-modules, which is for general use in other
536# non-zorba modules.558# non-zorba modules.
537ADD_DEPENDENCIES(check_uris gen_diag_modules)559ADD_DEPENDENCIES(check_core_uris gen_diag_modules)
538560
=== modified file 'CPackSourceConfig.cmake.in'
--- CPackSourceConfig.cmake.in 2009-10-30 16:24:51 +0000
+++ CPackSourceConfig.cmake.in 2012-01-27 05:33:27 +0000
@@ -19,7 +19,7 @@
1919
20SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")20SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
21SET(CPACK_GENERATOR "TGZ;TZ")21SET(CPACK_GENERATOR "TGZ;TZ")
22SET(CPACK_IGNORE_FILES "test/coverity/;dist/;_CPack_Packages/;build/;build./;CVS/;/\\.svn/;\\.swp$;\\.#;/#")22SET(CPACK_IGNORE_FILES "test/coverity/;dist/;_CPack_Packages/;build/;build./;CVS/;/\\.svn/;\\.swp$;\\.#;/#;\\.bzr/")
23SET(CPACK_INSTALLED_DIRECTORIES "@CMAKE_SOURCE_DIR@;/")23SET(CPACK_INSTALLED_DIRECTORIES "@CMAKE_SOURCE_DIR@;/")
24SET(CPACK_INSTALL_CMAKE_PROJECTS "")24SET(CPACK_INSTALL_CMAKE_PROJECTS "")
25SET(CPACK_MODULE_PATH "")25SET(CPACK_MODULE_PATH "")
2626
=== modified file 'ChangeLog'
--- ChangeLog 2011-10-20 23:05:55 +0000
+++ ChangeLog 2012-01-27 05:33:27 +0000
@@ -1,13 +1,59 @@
1Zorba - The XQuery Processor1Zorba - The XQuery Processor
22
3version 2.x3version 2.2
44
5 * Custom Full-text thesaurus.5 * No-copy optimization: avoids copying nodes during node-constructor expressions.
6 * Fixed bug #3401971 (node-by-reference on dynamic collections)6 * Added external function annotations %ann:propagates-input-nodes and
7 %ann:must-copy-input-nodes to be used by the no-copy optimization.
8 * Caching of results for recursive functions with atomic parameter and return types.
9 * Added %ann:cache and %ann:no-cache to enable or disable caching of results of functions with atomic parameter and return types.
10 * Fixed bug 917923 (bug in copying outer var values into the eval dynamic context)
11 * Fixed bug 909126 (bug in cloning of var_expr)
12 * Fixed bug in destruction of exit_catcher_expr
13 * Types-related optimization for the comparison operators
14 * Fixed bug #911585 (management of variables during eval)
15 * Fixed bug #866423 (fn:empty and fn:exists iterators must reset their input in
16 case of early-out)
17 * Added index management function to the C++ api's StaticCollectionManager.
18 * Fixed bug #905041 (allow for the default element and function namespaces to be
19 set multiple times via the c++ api).
20 * Fixed bug #907872 (segfault when returning an input ItemSequence from an external function).
21 * Fixed bug #905050 (setting and getting the context item type via the c++ api).
22 * Added createDayTimeDuration, createYearMonthDuration, createDocumentNode, createCommentNode, createPiNode to api's ItemFactory.
23 * Added split function to the string module that allows for streamable tokenization but doesn't have regular expression
24 support.
25 * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
26 * Add new XQuery interface for the PHP bindings.
27 * Added API method Item::getNamespaceBindings().
28 * Added API method StaticContext::getNamespaceBindings() (see bug #905035)
29 * Deprecated StaticContext:getNamespaceURIByPrefix()
30
31
32version 2.1
33
34New Features:
35 * New node-position module. This module allows to obtain a representation of a node position, which
36 can be used to assess structural relationships with other nodes.
37 * New node-reference module. References can be obtained for any node, and
38 different nodes cannot have the same identifier.
39 * Custom Full-text thesaurus using Zorba URI resolver mechanism.
40 * Modified C++ API to add isSequential, getExternalVariables, isBoundContextItem and
41 isBoundExternalVariable Functions
42 * Collection allows to retrieve information about the type
43 and the annotations of a static collection.
44 * Implemented the probe-index-range-value for general indexes
45 * Added ExternalFunctionParameter class to be registered in the DynamicContext
46 * New module for compiling and executing XQueries from XQuery (xqxq)
47 * External functions are allowed to be updating (i.e. return a pending update list)
48
49Optimization:
7 * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a50 * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a
8 sequence of integers)51 sequence of integers)
9 * documentation improvements52 * Optimization for count(collection()) expressions
10 * installer improvements53 * Optimization of the fn:substring function in the case when its $start and $length arguments
54 are integers
55
56Bug Fixes/Other Changes:
11 * Fixed bug #3403291 (build for Fedora 15)57 * Fixed bug #3403291 (build for Fedora 15)
12 * Fixed bug #3397293 (Incorrect XQueryX error message)58 * Fixed bug #3397293 (Incorrect XQueryX error message)
13 * Fixed bug #3398637 (Nested element constructors cause loss of namespace bindings)59 * Fixed bug #3398637 (Nested element constructors cause loss of namespace bindings)
@@ -15,20 +61,19 @@
15 * Fixed bug #3404689 (assignment problem in flwor)61 * Fixed bug #3404689 (assignment problem in flwor)
16 * Fix for bug #3404450 (testdriver_mt problem: caching and validation of docs)62 * Fix for bug #3404450 (testdriver_mt problem: caching and validation of docs)
17 * Fixed installation bug to not install the .so for test modules63 * Fixed installation bug to not install the .so for test modules
18 * Fix for running ctest on Windows
19 * Fixed bug #3390410 (Adding a node to a collection causes out of bound in vector)64 * Fixed bug #3390410 (Adding a node to a collection causes out of bound in vector)
20 * Fixed bug #3406200 (node types were not being moved to new tree during node detach)65 * Fixed bug #3406200 (node types were not being moved to new tree during node detach)
21 * Fixed bug #3406191 (Namespace bindings lost after update due to bug in node detach)66 * Fixed bug #3406191 (Namespace bindings lost after update due to bug in node detach)
22 * Fixed bug #3290122 (ZDST0003 needs collection name)67 * Fixed bug #3290122 (ZDST0003 needs collection name)
23 * Collection allows to retrieve information about the type
24 and the annotations of a static collection.
25 * Fixed bug #3406272 (merging of adjacent text nodes must be done after all68 * Fixed bug #3406272 (merging of adjacent text nodes must be done after all
26 updates have been applied).69 updates have been applied).
70 * Don't raise warnings for unknown annotations.
27 * Fixed bug #3409344 (during detach, if the node being detached is the root of71 * Fixed bug #3409344 (during detach, if the node being detached is the root of
28 its tree, it should be detached from the tree as well; otherwise memory72 its tree, it should be detached from the tree as well; otherwise memory
29 corruption will occur)73 corruption will occur)
30 * Fixed bug # (Should not destroy the parent of a node that is being detached74 * Fixed bug # (Should not destroy the parent of a node that is being detached
31 before the detach is done).75 before the detach is done).
76 * Added const qualifier to StaticContext::getAuditEvent()
32 * Fixed bug #3408181 (available-collection() returns undeclared collections)77 * Fixed bug #3408181 (available-collection() returns undeclared collections)
33 * Fixed bug #859465 (Fatal error if a PUL contains two deactivate IC primitives)78 * Fixed bug #859465 (Fatal error if a PUL contains two deactivate IC primitives)
34 * Fixed bug #859467 (Fatal error if a PUL contains two activate Foreign Key primitives)79 * Fixed bug #859467 (Fatal error if a PUL contains two activate Foreign Key primitives)
@@ -36,11 +81,10 @@
36 * Fixed bug #859522 (Fatal error if a PUL contains two delete document primitives)81 * Fixed bug #859522 (Fatal error if a PUL contains two delete document primitives)
37 * Fixed bug #859968 (Using put on an attribute produces an invalid XDM instance and may cause segmentation faults)82 * Fixed bug #859968 (Using put on an attribute produces an invalid XDM instance and may cause segmentation faults)
38 * Fixed bug #855314 (should not fold a constant expr that returns an error item)83 * Fixed bug #855314 (should not fold a constant expr that returns an error item)
39 * Added ExternalFunctionParameter class to be registered in the DynamicContext84 * Fixed bug when parsing a document with a base-uri attribute.
40 * Fixed bug #863320 (Sentence is incorrectly incremented when token characters end without sentence terminator)85 * Fixed bug #863320 (Sentence is incorrectly incremented when token characters end without sentence terminator)
41 * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012)86 * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012)
42 * Implemented the probe-index-range-value for general indexes87 * Removed ZSTR0005 and ZSTR0006 error codes
43 * Fixed bug #867662 ("nullptr" warning)
44 * Fixed bug #868258 (Assertion failure with two delete collection)88 * Fixed bug #868258 (Assertion failure with two delete collection)
45 * Fixed bug #871623 and #871629 (assertion failures with insertions in dynamic collections)89 * Fixed bug #871623 and #871629 (assertion failures with insertions in dynamic collections)
46 * Fixed bug #867262 (allow reuse of iterator over ExtFuncArgItemSequence)90 * Fixed bug #867262 (allow reuse of iterator over ExtFuncArgItemSequence)
@@ -54,6 +98,36 @@
54 * Fixed bug #872796 (validate-in-place can interfere with other update primitives)98 * Fixed bug #872796 (validate-in-place can interfere with other update primitives)
55 * Fixed bug #872799 (validate-in-place can set incorrect types)99 * Fixed bug #872799 (validate-in-place can set incorrect types)
56 * Fixed bug #855715 (Invalid escaped characters in regex not caught)100 * Fixed bug #855715 (Invalid escaped characters in regex not caught)
101 * Fixed bug #868325 (fn:analyze-string fails with some recursive subgroups)
102 * Fixed bug #872697 (segmentation fault with validation of NMTOKENS)
103 * General index cannot be declared as unique if the type of its key is
104 xs:anyAtomicType or xs:untypedAtomic.
105 * Added undo for node revalidation
106 * Optimization for count(collection()) expressions
107 * Fixed bug #867133 (SWIG PHP build failure on Mac OSX)
108 * Fixed bug #872796 (validate-in-place can interfere with other update primitives)
109 * Fixed bug #872799 (validate-in-place can set incorrect types)
110 * Fixed bug #872850 (Serialization of Tumbling Window For fails)
111 * Fixed bug #855715 (Invalid escaped characters in regex not caught)
112 * Fixed bug #862089 (Split binary/xq install directories for modules) by
113 splitting "module path" into separate URI and Library paths
114 * Fixed bug #872502 (validation of the JSON module xqdoc fails)
115 * Fixed bug #897619 (testdriver_mt can not run the XQueryX tests)
116 * Fixed bug #867107 (xqdoc dependency to zorba is wrong)
117 * Fixed bug #897616 (Fix the generation of the XQFTTS report results for
118 W3C)
119
120version 2.0.3
121 * Fixed bug #867662 ("nullptr" warning)
122 * documentation improvements
123
124version 2.0.2
125 * Fixed bug #3401971 (node-by-reference on dynamic collections)
126 * documentation improvements
127 * installer improvements
128 * Fixed bug #3403291 (build for Fedora 15)
129 * Don't install the .so for test modules
130 * Fix for running ctest on Windows
57131
58version 2.0.1132version 2.0.1
59133
60134
=== added file 'NOTICE.txt'
--- NOTICE.txt 1970-01-01 00:00:00 +0000
+++ NOTICE.txt 2012-01-27 05:33:27 +0000
@@ -0,0 +1,740 @@
1-----------
2Zorba 2.1.0
3-----------
4
5(Note: This file is generated automatically from NOTICE.xml.
6Please do not modify this file directly.)
7
8
9
10
11Apache 2
12
13 Copyright 2006-2011 The FLWOR Foundation
14
15 See LICENSE.txt for license information.
16
17 ------------------------
18 This product includes software developed at
19 The FLWOR Foundation (http://www.flworfound.org/).
20
21 ------------------------
22 Portions of this software were developed at the Systems
23 Group of the ETH Zurich, Switzerland.
24
25
26Other files used by this project:
27----------------------------------------------------
28
29src/zorbatypes/m_apm.h
30src/zorbatypes/mapm/
31
32Copyright: 1999-2007 Michael C. Ring
33Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
34
35 This software is Freeware.
36
37 Permission to use, copy, and distribute this software and its
38 documentation for any purpose with or without fee is hereby granted,
39 provided that the above copyright notice appear in all copies and
40 that both that copyright notice and this permission notice appear
41 in supporting documentation.
42
43 Permission to modify the software is granted. Permission to distribute
44 the modified code is granted. Modifications are to be distributed by
45 using the file 'license.txt' as a template to modify the file header.
46 'license.txt' is available in the official MAPM distribution.
47
48 To distribute modified source code, insert the file 'license.txt'
49 at the top of all modified source code files and edit accordingly.
50
51 This software is provided "as is" without express or implied warranty.
52
53----------------------------------------------------
54
55src/zorbamisc/config/stdint.h
56
57Copyright: 2006 Alexander Chemeris
58
59
60 Redistribution and use in source and binary forms, with or without
61 modification, are permitted provided that the following conditions are met:
62
63 1. Redistributions of source code must retain the above copyright notice,
64 this list of conditions and the following disclaimer.
65
66 2. Redistributions in binary form must reproduce the above copyright
67 notice, this list of conditions and the following disclaimer in the
68 documentation and/or other materials provided with the distribution.
69
70 3. The name of the author may be used to endorse or promote products
71 derived from this software without specific prior written permission.
72
73 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
74 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
75 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
76 EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
77 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
78 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
79 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
80 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
81 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
82 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83
84----------------------------------------------------
85
86src/zorbautils/stemmer/
87
88Copyright: 2001 Dr. Martin Porter
89
90
91 All the software given out on this Snowball site is covered by the BSD
92 License (see http://www.opensource.org/licenses/bsd-license.html), with
93 Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
94 Copyright (c) 2002, Richard Boulton.
95
96 Essentially, all this means is that you can do what you like with the code,
97 except claim another Copyright for it, or claim that it is issued under a
98 different license. The software is also issued without warranties, which
99 means that if anyone suffers through its use, they cannot come back and sue
100 you. You also have to alert anyone to whom you give the Snowball software to
101 the fact that it is covered by the BSD license.
102
103 We have not bothered to insert the licensing arrangement into the text of
104 the Snowball software.
105
106----------------------------------------------------
107
108src/util/less.h
109
110Copyright: 1998 Paul J. Lucas
111
112
113 Redistribution and use in source and binary forms, with or without
114 modification, are permitted provided that the following conditions are met:
115
116 o Redistributions of source code must retain the above copyright notice,
117 this list of conditions and the following disclaimer.
118
119 o Redistributions in binary form must reproduce the above copyright
120 notice, this list of conditions and the following disclaimer in the
121 documentation and/or other materials provided with the distribution.
122
123 o The name of the author may not be used to endorse or promote products
124 derived from this software without specific prior written permission.
125
126 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
127 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
128 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
129 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
130 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
131 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
132 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
133 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
134 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
135 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
136 POSSIBILITY OF SUCH DAMAGE.
137
138----------------------------------------------------
139
140src/util/auto_vector.h (has been modified)
141
142Copyright: 2003 Reliable Software
143
144
145 Redistribution and use in source and binary forms, with or without
146 modification, are permitted provided that the following conditions are met:
147
148 o Redistributions of source code must retain the above copyright notice,
149 this list of conditions and the following disclaimer.
150
151 o Redistributions in binary form must reproduce the above copyright
152 notice, this list of conditions and the following disclaimer in the
153 documentation and/or other materials provided with the distribution.
154
155 o The name of the author may not be used to endorse or promote products
156 derived from this software without specific prior written permission.
157
158 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
159 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
160 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
161 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
162 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
163 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
164 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
165 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
166 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
167 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
168 POSSIBILITY OF SUCH DAMAGE.
169
170----------------------------------------------------
171
172cmake_modules/FindBoost.cmake
173
174Copyright:
175 2006-2008 Andreas Schneider <mail@cynapses.org>
176 2007 Wengo
177 2007 Mike Jackson
178 2008 Andreas Pakulat <apaku@gmx.de>
179
180
181
182 Redistribution AND use is allowed according to the terms of the New BSD license.
183 For details see the accompanying COPYING-CMAKE-SCRIPTS file.
184
185----------------------------------------------------
186
187cmake_modules/FindJNI.cmake
188cmake_modules/FindPythonLibs.cmake
189cmake_modules/FindSWIG.cmake
190
191Copyright: 2001-2009 Kitware, Inc.
192
193
194 Distributed under the OSI-approved BSD License (the "License");
195 see accompanying file Copyright.txt for details.
196
197 This software is distributed WITHOUT ANY WARRANTY; without even the
198 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
199 See the License for more information.
200
201 CMake - Cross Platform Makefile Generator
202 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
203 All rights reserved.
204
205 Redistribution and use in source and binary forms, with or without
206 modification, are permitted provided that the following conditions
207 are met:
208
209 * Redistributions of source code must retain the above copyright
210 notice, this list of conditions and the following disclaimer.
211
212 * Redistributions in binary form must reproduce the above copyright
213 notice, this list of conditions and the following disclaimer in the
214 documentation and/or other materials provided with the distribution.
215
216 * Neither the names of Kitware, Inc., the Insight Software Consortium,
217 nor the names of their contributors may be used to endorse or promote
218 products derived from this software without specific prior written
219 permission.
220
221 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
222 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
223 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
224 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
225 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
226 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
228 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
229 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
230 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
231 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
232
233 ------------------------------------------------------------------------------
234
235 The above copyright and license notice applies to distributions of
236 CMake in source and binary form. Some source files contain additional
237 notices of original copyright by their contributors; see each source
238 for details. Third-party software packages supplied with CMake under
239 compatible licenses provide their own copyright notices documented in
240 corresponding subdirectories.
241
242 ------------------------------------------------------------------------------
243
244 CMake was initially developed by Kitware with the following sponsorship:
245
246 * National Library of Medicine at the National Institutes of Health
247 as part of the Insight Segmentation and Registration Toolkit (ITK).
248
249 * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
250 Visualization Initiative.
251
252 * National Alliance for Medical Image Computing (NAMIC) is funded by the
253 National Institutes of Health through the NIH Roadmap for Medical Research,
254 Grant U54 EB005149.
255
256 * Kitware, Inc.
257
258----------------------------------------------------
259
260/xml.xsd
261
262Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
263
264
265 All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
266
267 W3C Software Notice and License
268
269 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
270
271 License
272
273 By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
274
275 Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
276 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
277 •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
278 •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
279
280 Disclaimers
281
282 THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
283
284 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
285
286 The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
287
288----------------------------------------------------
289
290schemas/xslt-xquery-serialization.xsd
291
292Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
293
294
295 All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
296
297 W3C Software Notice and License
298
299 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
300
301 License
302
303 By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
304
305 Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
306 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
307 •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
308 •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
309
310 Disclaimers
311
312 THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
313
314 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
315
316 The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
317
318----------------------------------------------------
319
320modules/w3c/xpath-functions.xsd
321
322Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
323
324
325 All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
326
327 W3C Software Notice and License
328
329 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
330
331 License
332
333 By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
334
335 Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
336 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
337 •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
338 •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
339
340 Disclaimers
341
342 THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
343
344 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
345
346 The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
347
348----------------------------------------------------
349
350include/xqc.h
351
352Copyright: 2008, Matthias Brantner, John Snelson
353
354
355 * All rights reserved.
356 *
357 * Redistribution and use in source and binary forms, with or without
358 * modification, are permitted provided that the following conditions are met:
359 *
360 * * Redistributions of source code must retain the above copyright notice,
361 * this list of conditions and the following disclaimer.
362 * * Redistributions in binary form must reproduce the above copyright
363 * notice, this list of conditions and the following disclaimer in the
364 * documentation and/or other materials provided with the distribution.
365 * * Neither the name of the developers nor the names of contributors may be
366 * used to endorse or promote products derived from this software without
367 * specific prior written permission.
368 *
369 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
370 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
371 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
372 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
373 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
374 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
375 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
376 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
377 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
378 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
379 * POSSIBILITY OF SUCH DAMAGE.
380
381----------------------------------------------------
382
383modules/functx/functx.xq
384
385Copyright: 2007 Datypic
386
387
388 : This library is free software; you can redistribute it and/or
389 : modify it under the terms of the GNU Lesser General Public
390 : License as published by the Free Software Foundation; either
391 : version 2.1 of the License.
392
393 : This library is distributed in the hope that it will be useful,
394 : but WITHOUT ANY WARRANTY; without even the implied warranty of
395 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
396 : Lesser General Public License for more details.
397
398 : You should have received a copy of the GNU Lesser General Public
399 : License along with this library; if not, write to the Free Software
400 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
401
402----------------------------------------------------
403
404src/compiler/parser/FlexLexer.h
405
406Copyright: 1993 The Regents of the University of California
407
408
409 // All rights reserved.
410 //
411 // This code is derived from software contributed to Berkeley by
412 // Kent Williams and Tom Epperly.
413 //
414 // Redistribution and use in source and binary forms, with or without
415 // modification, are permitted provided that the following conditions
416 // are met:
417
418 // 1. Redistributions of source code must retain the above copyright
419 // notice, this list of conditions and the following disclaimer.
420 // 2. Redistributions in binary form must reproduce the above copyright
421 // notice, this list of conditions and the following disclaimer in the
422 // documentation and/or other materials provided with the distribution.
423
424 // Neither the name of the University nor the names of its contributors
425 // may be used to endorse or promote products derived from this software
426 // without specific prior written permission.
427
428 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
429 // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
430 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
431 // PURPOSE.
432
433----------------------------------------------------
434
435src/diagnostics/StackWalker.cpp
436src/diagnostics/StackWalker.h
437
438Copyright: 2005 Jochen Kalmbach
439
440
441 Under BSD License: http://www.opensource.org/licenses/bsd-license.php
442
443----------------------------------------------------
444
445src/util/singleton.h
446src/util/threads.h
447
448Copyright: 2001 Andrei Alexandrescu
449
450
451 This code accompanies the book:
452 Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
453 Patterns Applied". Copyright (c) 2001. Addison-Wesley.
454 Permission to use, copy, modify, distribute and sell this software for any
455 purpose is hereby granted without fee, provided that the above copyright
456 notice appear in all copies and that both that copyright notice and this
457 permission notice appear in supporting documentation.
458 The author or Addison-Wesley Longman make no representations about the
459 suitability of this software for any purpose. It is provided "as is"
460 without express or implied warranty.
461
462
463External libraries used by this project:
464----------------------------------------------------
465
466Name: LIBXML2
467Preferred version: 2.2.16 or higher
468Is mandatory: true
469Website: http://xmlsoft.org/
470License: MIT
471Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
472External notice:
473
474 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
475
476 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
477
478 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
479
480 Except as contained in this notice, the name of Daniel Veillard shall not
481 be used in advertising or otherwise to promote the sale, use or other deal-
482 ings in this Software without prior written authorization from him.
483
484----------------------------------------------------
485
486Name: LIBXSLT
487Preferred version: 1.1.26
488Is mandatory: false
489Website: http://xmlsoft.org/XSLT/
490License: MIT
491Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
492External notice:
493
494 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
495
496 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
497
498 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
499
500
501 Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from him.
502
503
504----------------------------------------------------
505
506Name: ICU4C
507Preferred version: 3.6 or higher
508Is mandatory: true
509Website: http://www.icu-project.org/
510License: ICU License
511Copyright: 1995-2011 International Business Machines Corporation and others
512External notice:
513
514 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
515
516 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
517
518 Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
519
520----------------------------------------------------
521
522Name: CURL
523Preferred version: above 7.12
524Is mandatory: false
525Website: http://curl.haxx.se/
526License: MIT/X derivate license
527Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
528External notice:
529
530 All rights reserved.
531
532 Permission to use, copy, modify, and distribute this software for any purpose
533 with or without fee is hereby granted, provided that the above copyright
534 notice and this permission notice appear in all copies.
535
536 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
537 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
538 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
539 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
540 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
541 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
542 OR OTHER DEALINGS IN THE SOFTWARE.
543
544 Except as contained in this notice, the name of a copyright holder shall not
545 be used in advertising or otherwise to promote the sale, use or other dealings
546 in this Software without prior written authorization of the copyright holder.
547
548----------------------------------------------------
549
550Name: ICONV
551Preferred version: above 1.12
552Is mandatory: true
553Website: http://www.gnu.org/software/libiconv/
554License: LGPL
555Copyright: 1998, 2010 Free Software Foundation, Inc.
556External notice:
557
558----------------------------------------------------
559
560Name: ZLIB
561Preferred version: 1.2.5
562Is mandatory: true
563Website: http://www.zlib.net/
564Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
565External notice:
566
567 This software is provided 'as-is', without any express or implied
568 warranty. In no event will the authors be held liable for any damages
569 arising from the use of this software.
570
571 Permission is granted to anyone to use this software for any purpose,
572 including commercial applications, and to alter it and redistribute it
573 freely, subject to the following restrictions:
574
575 1. The origin of this software must not be misrepresented; you must not
576 claim that you wrote the original software. If you use this software
577 in a product, an acknowledgment in the product documentation would be
578 appreciated but is not required.
579 2. Altered source versions must be plainly marked as such, and must not be
580 misrepresented as being the original software.
581 3. This notice may not be removed or altered from any source distribution.
582
583 Jean-loup Gailly jloup@gzip.org
584 Mark Adler madler@alumni.caltech.edu
585
586----------------------------------------------------
587
588Name: XERCES
589Preferred version: 2.8.0 or higher
590Is mandatory: true
591Website: http://xerces.apache.org/xerces-c/
592License: Apache 2
593Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
594External notice:
595
596 http://www.apache.org/licenses/LICENSE-2.0
597
598----------------------------------------------------
599
600Name: BOOST (boost_filesystem)
601Preferred version: 1.32 or higher
602Is mandatory: false
603Website: http://www.boost.org/
604License: Boost Software License v1.0
605Copyright:
606 Beman Dawes, David Abrahams, 1998-2005.
607 Rene Rivera 2004-2007
608
609External notice:
610
611 Permission is hereby granted, free of charge, to any person or organization
612 obtaining a copy of the software and accompanying documentation covered by
613 this license (the "Software") to use, reproduce, display, distribute,
614 execute, and transmit the Software, and to prepare derivative works of the
615 Software, and to permit third-parties to whom the Software is furnished to
616 do so, all subject to the following:
617
618 The copyright notices in the Software and this entire statement, including
619 the above license grant, this restriction and the following disclaimer,
620 must be included in all copies of the Software, in whole or in part, and
621 all derivative works of the Software, unless such copies or derivative
622 works are solely in the form of machine-executable object code generated by
623 a source language processor.
624
625 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
626 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
627 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
628 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
629 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
630 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
631 DEALINGS IN THE SOFTWARE.
632
633
634External applications used by this project:
635----------------------------------------------------
636
637Name: FLEX
638Preferred version: 2.5.33
639Is mandatory: false
640Website: http://flex.sourceforge.net/
641Copyright:
642 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
643 1990, 1997 The Regents of the University of California. All rights reserved.
644
645External notice:
646
647 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
648
649 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
650 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
651
652 Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
653
654 THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
655
656----------------------------------------------------
657
658Name: BISON
659Preferred version: 2.4 or higher
660Is mandatory: false
661Website: http://www.gnu.org/software/bison/
662License: GPL
663Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
664External notice:
665
666----------------------------------------------------
667
668Name: DOXYGEN
669Preferred version: v1.7.4
670Is mandatory: false
671Website: www.doxygen.org
672License: GPL
673Copyright: 1997-2011 by Dimitri van Heesch
674External notice:
675
676 Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
677 No representations are made about the suitability of this software for any purpose.
678 It is provided "as is" without express or implied warranty.
679 See the GNU General Public License for more details.
680
681 Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
682
683----------------------------------------------------
684
685Name: CMAKE
686Preferred version: 2.8.4
687Is mandatory: true
688Website: http://www.cmake.org/
689License: Creative Commons Attribution-NoDerivs 3.0 Unported License
690Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
691External notice:
692
693 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
694
695 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
696
697 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
698
699 Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
700
701 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
702
703----------------------------------------------------
704
705Name: SWIG
706Preferred version: 2.0.4 or above
707Is mandatory: false
708Website: http://www.swig.org/
709License: GPL
710Copyright:
711 1995-2011 The SWIG Developers
712 2005-2006 Arizona Board of Regents (University of Arizona).
713 1998-2005 University of Chicago.
714 1995-1998 The University of Utah and the Regents of the University of California
715
716External notice:
717
718 SWIG is free software: you can redistribute it and/or modify it
719 under the terms of the GNU General Public License as published by
720 the Free Software Foundation, either version 3 of the License, or
721 (at your option) any later version. See the LICENSE-GPL file for
722 the full terms of the GNU General Public license version 3.
723
724 Portions of SWIG are also licensed under the terms of the licenses
725 in the file LICENSE-UNIVERSITIES. You must observe the terms of
726 these licenses, as well as the terms of the GNU General Public License,
727 when you distribute SWIG.
728
729 The SWIG library and examples, under the Lib and Examples top level
730 directories, are distributed under the following terms:
731
732 You may copy, modify, distribute, and make derivative works based on
733 this software, in source code or object code form, without
734 restriction. If you distribute the software to others, you may do
735 so according to the terms of your choice. This software is offered as
736 is, without warranty of any kind.
737
738 See the COPYRIGHT file for a list of contributors to SWIG and their
739 copyright notices.
740
0\ No newline at end of file741\ No newline at end of file
1742
=== removed file 'NOTICE.txt'
--- NOTICE.txt 2011-10-19 15:28:51 +0000
+++ NOTICE.txt 1970-01-01 00:00:00 +0000
@@ -1,740 +0,0 @@
1-----------
2Zorba 2.0.1
3-----------
4
5(Note: This file is generated automatically from NOTICE.xml.
6Please do not modify this file directly.)
7
8
9
10
11Apache 2
12
13 Copyright 2006-2011 The FLWOR Foundation
14
15 See LICENSE.txt for license information.
16
17 ------------------------
18 This product includes software developed at
19 The FLWOR Foundation (http://www.flworfound.org/).
20
21 ------------------------
22 Portions of this software were developed at the Systems
23 Group of the ETH Zurich, Switzerland.
24
25
26Other files used by this project:
27----------------------------------------------------
28
29src/zorbatypes/m_apm.h
30src/zorbatypes/mapm/
31
32Copyright: 1999-2007 Michael C. Ring
33Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
34
35 This software is Freeware.
36
37 Permission to use, copy, and distribute this software and its
38 documentation for any purpose with or without fee is hereby granted,
39 provided that the above copyright notice appear in all copies and
40 that both that copyright notice and this permission notice appear
41 in supporting documentation.
42
43 Permission to modify the software is granted. Permission to distribute
44 the modified code is granted. Modifications are to be distributed by
45 using the file 'license.txt' as a template to modify the file header.
46 'license.txt' is available in the official MAPM distribution.
47
48 To distribute modified source code, insert the file 'license.txt'
49 at the top of all modified source code files and edit accordingly.
50
51 This software is provided "as is" without express or implied warranty.
52
53----------------------------------------------------
54
55src/zorbamisc/config/stdint.h
56
57Copyright: 2006 Alexander Chemeris
58
59
60 Redistribution and use in source and binary forms, with or without
61 modification, are permitted provided that the following conditions are met:
62
63 1. Redistributions of source code must retain the above copyright notice,
64 this list of conditions and the following disclaimer.
65
66 2. Redistributions in binary form must reproduce the above copyright
67 notice, this list of conditions and the following disclaimer in the
68 documentation and/or other materials provided with the distribution.
69
70 3. The name of the author may be used to endorse or promote products
71 derived from this software without specific prior written permission.
72
73 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
74 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
75 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
76 EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
77 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
78 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
79 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
80 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
81 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
82 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83
84----------------------------------------------------
85
86src/zorbautils/stemmer/
87
88Copyright: 2001 Dr. Martin Porter
89
90
91 All the software given out on this Snowball site is covered by the BSD
92 License (see http://www.opensource.org/licenses/bsd-license.html), with
93 Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
94 Copyright (c) 2002, Richard Boulton.
95
96 Essentially, all this means is that you can do what you like with the code,
97 except claim another Copyright for it, or claim that it is issued under a
98 different license. The software is also issued without warranties, which
99 means that if anyone suffers through its use, they cannot come back and sue
100 you. You also have to alert anyone to whom you give the Snowball software to
101 the fact that it is covered by the BSD license.
102
103 We have not bothered to insert the licensing arrangement into the text of
104 the Snowball software.
105
106----------------------------------------------------
107
108src/util/less.h
109
110Copyright: 1998 Paul J. Lucas
111
112
113 Redistribution and use in source and binary forms, with or without
114 modification, are permitted provided that the following conditions are met:
115
116 o Redistributions of source code must retain the above copyright notice,
117 this list of conditions and the following disclaimer.
118
119 o Redistributions in binary form must reproduce the above copyright
120 notice, this list of conditions and the following disclaimer in the
121 documentation and/or other materials provided with the distribution.
122
123 o The name of the author may not be used to endorse or promote products
124 derived from this software without specific prior written permission.
125
126 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
127 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
128 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
129 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
130 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
131 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
132 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
133 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
134 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
135 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
136 POSSIBILITY OF SUCH DAMAGE.
137
138----------------------------------------------------
139
140src/util/auto_vector.h (has been modified)
141
142Copyright: 2003 Reliable Software
143
144
145 Redistribution and use in source and binary forms, with or without
146 modification, are permitted provided that the following conditions are met:
147
148 o Redistributions of source code must retain the above copyright notice,
149 this list of conditions and the following disclaimer.
150
151 o Redistributions in binary form must reproduce the above copyright
152 notice, this list of conditions and the following disclaimer in the
153 documentation and/or other materials provided with the distribution.
154
155 o The name of the author may not be used to endorse or promote products
156 derived from this software without specific prior written permission.
157
158 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
159 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
160 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
161 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
162 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
163 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
164 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
165 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
166 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
167 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
168 POSSIBILITY OF SUCH DAMAGE.
169
170----------------------------------------------------
171
172cmake_modules/FindBoost.cmake
173
174Copyright:
175 2006-2008 Andreas Schneider <mail@cynapses.org>
176 2007 Wengo
177 2007 Mike Jackson
178 2008 Andreas Pakulat <apaku@gmx.de>
179
180
181
182 Redistribution AND use is allowed according to the terms of the New BSD license.
183 For details see the accompanying COPYING-CMAKE-SCRIPTS file.
184
185----------------------------------------------------
186
187cmake_modules/FindJNI.cmake
188cmake_modules/FindPythonLibs.cmake
189cmake_modules/FindSWIG.cmake
190
191Copyright: 2001-2009 Kitware, Inc.
192
193
194 Distributed under the OSI-approved BSD License (the "License");
195 see accompanying file Copyright.txt for details.
196
197 This software is distributed WITHOUT ANY WARRANTY; without even the
198 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
199 See the License for more information.
200
201 CMake - Cross Platform Makefile Generator
202 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
203 All rights reserved.
204
205 Redistribution and use in source and binary forms, with or without
206 modification, are permitted provided that the following conditions
207 are met:
208
209 * Redistributions of source code must retain the above copyright
210 notice, this list of conditions and the following disclaimer.
211
212 * Redistributions in binary form must reproduce the above copyright
213 notice, this list of conditions and the following disclaimer in the
214 documentation and/or other materials provided with the distribution.
215
216 * Neither the names of Kitware, Inc., the Insight Software Consortium,
217 nor the names of their contributors may be used to endorse or promote
218 products derived from this software without specific prior written
219 permission.
220
221 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
222 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
223 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
224 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
225 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
226 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
228 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
229 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
230 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
231 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
232
233 ------------------------------------------------------------------------------
234
235 The above copyright and license notice applies to distributions of
236 CMake in source and binary form. Some source files contain additional
237 notices of original copyright by their contributors; see each source
238 for details. Third-party software packages supplied with CMake under
239 compatible licenses provide their own copyright notices documented in
240 corresponding subdirectories.
241
242 ------------------------------------------------------------------------------
243
244 CMake was initially developed by Kitware with the following sponsorship:
245
246 * National Library of Medicine at the National Institutes of Health
247 as part of the Insight Segmentation and Registration Toolkit (ITK).
248
249 * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
250 Visualization Initiative.
251
252 * National Alliance for Medical Image Computing (NAMIC) is funded by the
253 National Institutes of Health through the NIH Roadmap for Medical Research,
254 Grant U54 EB005149.
255
256 * Kitware, Inc.
257
258----------------------------------------------------
259
260/xml.xsd
261
262Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
263
264
265 All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
266
267 W3C Software Notice and License
268
269 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
270
271 License
272
273 By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
274
275 Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
276 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
277 •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
278 •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
279
280 Disclaimers
281
282 THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
283
284 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
285
286 The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
287
288----------------------------------------------------
289
290schemas/xslt-xquery-serialization.xsd
291
292Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
293
294
295 All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
296
297 W3C Software Notice and License
298
299 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
300
301 License
302
303 By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
304
305 Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
306 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
307 •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
308 •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
309
310 Disclaimers
311
312 THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
313
314 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
315
316 The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
317
318----------------------------------------------------
319
320modules/w3c/xpath-functions.xsd
321
322Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
323
324
325 All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
326
327 W3C Software Notice and License
328
329 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
330
331 License
332
333 By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
334
335 Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
336 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
337 •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
338 •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
339
340 Disclaimers
341
342 THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
343
344 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
345
346 The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
347
348----------------------------------------------------
349
350include/xqc.h
351
352Copyright: 2008, Matthias Brantner, John Snelson
353
354
355 * All rights reserved.
356 *
357 * Redistribution and use in source and binary forms, with or without
358 * modification, are permitted provided that the following conditions are met:
359 *
360 * * Redistributions of source code must retain the above copyright notice,
361 * this list of conditions and the following disclaimer.
362 * * Redistributions in binary form must reproduce the above copyright
363 * notice, this list of conditions and the following disclaimer in the
364 * documentation and/or other materials provided with the distribution.
365 * * Neither the name of the developers nor the names of contributors may be
366 * used to endorse or promote products derived from this software without
367 * specific prior written permission.
368 *
369 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
370 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
371 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
372 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
373 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
374 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
375 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
376 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
377 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
378 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
379 * POSSIBILITY OF SUCH DAMAGE.
380
381----------------------------------------------------
382
383modules/functx/functx.xq
384
385Copyright: 2007 Datypic
386
387
388 : This library is free software; you can redistribute it and/or
389 : modify it under the terms of the GNU Lesser General Public
390 : License as published by the Free Software Foundation; either
391 : version 2.1 of the License.
392
393 : This library is distributed in the hope that it will be useful,
394 : but WITHOUT ANY WARRANTY; without even the implied warranty of
395 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
396 : Lesser General Public License for more details.
397
398 : You should have received a copy of the GNU Lesser General Public
399 : License along with this library; if not, write to the Free Software
400 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
401
402----------------------------------------------------
403
404src/compiler/parser/FlexLexer.h
405
406Copyright: 1993 The Regents of the University of California
407
408
409 // All rights reserved.
410 //
411 // This code is derived from software contributed to Berkeley by
412 // Kent Williams and Tom Epperly.
413 //
414 // Redistribution and use in source and binary forms, with or without
415 // modification, are permitted provided that the following conditions
416 // are met:
417
418 // 1. Redistributions of source code must retain the above copyright
419 // notice, this list of conditions and the following disclaimer.
420 // 2. Redistributions in binary form must reproduce the above copyright
421 // notice, this list of conditions and the following disclaimer in the
422 // documentation and/or other materials provided with the distribution.
423
424 // Neither the name of the University nor the names of its contributors
425 // may be used to endorse or promote products derived from this software
426 // without specific prior written permission.
427
428 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
429 // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
430 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
431 // PURPOSE.
432
433----------------------------------------------------
434
435src/diagnostics/StackWalker.cpp
436src/diagnostics/StackWalker.h
437
438Copyright: 2005 Jochen Kalmbach
439
440
441 Under BSD License: http://www.opensource.org/licenses/bsd-license.php
442
443----------------------------------------------------
444
445src/util/singleton.h
446src/util/threads.h
447
448Copyright: 2001 Andrei Alexandrescu
449
450
451 This code accompanies the book:
452 Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
453 Patterns Applied". Copyright (c) 2001. Addison-Wesley.
454 Permission to use, copy, modify, distribute and sell this software for any
455 purpose is hereby granted without fee, provided that the above copyright
456 notice appear in all copies and that both that copyright notice and this
457 permission notice appear in supporting documentation.
458 The author or Addison-Wesley Longman make no representations about the
459 suitability of this software for any purpose. It is provided "as is"
460 without express or implied warranty.
461
462
463External libraries used by this project:
464----------------------------------------------------
465
466Name: LIBXML2
467Preferred version: 2.2.16 or higher
468Is mandatory: true
469Website: http://xmlsoft.org/
470License: MIT
471Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
472External notice:
473
474 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
475
476 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
477
478 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
479
480 Except as contained in this notice, the name of Daniel Veillard shall not
481 be used in advertising or otherwise to promote the sale, use or other deal-
482 ings in this Software without prior written authorization from him.
483
484----------------------------------------------------
485
486Name: LIBXSLT
487Preferred version: 1.1.26
488Is mandatory: false
489Website: http://xmlsoft.org/XSLT/
490License: MIT
491Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
492External notice:
493
494 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
495
496 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
497
498 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
499
500
501 Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from him.
502
503
504----------------------------------------------------
505
506Name: ICU4C
507Preferred version: 3.6 or higher
508Is mandatory: true
509Website: http://www.icu-project.org/
510License: ICU License
511Copyright: 1995-2011 International Business Machines Corporation and others
512External notice:
513
514 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
515
516 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
517
518 Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
519
520----------------------------------------------------
521
522Name: CURL
523Preferred version: above 7.12
524Is mandatory: false
525Website: http://curl.haxx.se/
526License: MIT/X derivate license
527Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
528External notice:
529
530 All rights reserved.
531
532 Permission to use, copy, modify, and distribute this software for any purpose
533 with or without fee is hereby granted, provided that the above copyright
534 notice and this permission notice appear in all copies.
535
536 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
537 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
538 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
539 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
540 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
541 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
542 OR OTHER DEALINGS IN THE SOFTWARE.
543
544 Except as contained in this notice, the name of a copyright holder shall not
545 be used in advertising or otherwise to promote the sale, use or other dealings
546 in this Software without prior written authorization of the copyright holder.
547
548----------------------------------------------------
549
550Name: ICONV
551Preferred version: above 1.12
552Is mandatory: true
553Website: http://www.gnu.org/software/libiconv/
554License: LGPL
555Copyright: 1998, 2010 Free Software Foundation, Inc.
556External notice:
557
558----------------------------------------------------
559
560Name: ZLIB
561Preferred version: 1.2.5
562Is mandatory: true
563Website: http://www.zlib.net/
564Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
565External notice:
566
567 This software is provided 'as-is', without any express or implied
568 warranty. In no event will the authors be held liable for any damages
569 arising from the use of this software.
570
571 Permission is granted to anyone to use this software for any purpose,
572 including commercial applications, and to alter it and redistribute it
573 freely, subject to the following restrictions:
574
575 1. The origin of this software must not be misrepresented; you must not
576 claim that you wrote the original software. If you use this software
577 in a product, an acknowledgment in the product documentation would be
578 appreciated but is not required.
579 2. Altered source versions must be plainly marked as such, and must not be
580 misrepresented as being the original software.
581 3. This notice may not be removed or altered from any source distribution.
582
583 Jean-loup Gailly jloup@gzip.org
584 Mark Adler madler@alumni.caltech.edu
585
586----------------------------------------------------
587
588Name: XERCES
589Preferred version: 2.8.0 or higher
590Is mandatory: true
591Website: http://xerces.apache.org/xerces-c/
592License: Apache 2
593Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
594External notice:
595
596 http://www.apache.org/licenses/LICENSE-2.0
597
598----------------------------------------------------
599
600Name: BOOST (boost_filesystem)
601Preferred version: 1.32 or higher
602Is mandatory: false
603Website: http://www.boost.org/
604License: Boost Software License v1.0
605Copyright:
606 Beman Dawes, David Abrahams, 1998-2005.
607 Rene Rivera 2004-2007
608
609External notice:
610
611 Permission is hereby granted, free of charge, to any person or organization
612 obtaining a copy of the software and accompanying documentation covered by
613 this license (the "Software") to use, reproduce, display, distribute,
614 execute, and transmit the Software, and to prepare derivative works of the
615 Software, and to permit third-parties to whom the Software is furnished to
616 do so, all subject to the following:
617
618 The copyright notices in the Software and this entire statement, including
619 the above license grant, this restriction and the following disclaimer,
620 must be included in all copies of the Software, in whole or in part, and
621 all derivative works of the Software, unless such copies or derivative
622 works are solely in the form of machine-executable object code generated by
623 a source language processor.
624
625 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
626 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
627 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
628 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
629 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
630 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
631 DEALINGS IN THE SOFTWARE.
632
633
634External applications used by this project:
635----------------------------------------------------
636
637Name: FLEX
638Preferred version: 2.5.33
639Is mandatory: false
640Website: http://flex.sourceforge.net/
641Copyright:
642 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
643 1990, 1997 The Regents of the University of California. All rights reserved.
644
645External notice:
646
647 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
648
649 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
650 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
651
652 Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
653
654 THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
655
656----------------------------------------------------
657
658Name: BISON
659Preferred version: 2.4 or higher
660Is mandatory: false
661Website: http://www.gnu.org/software/bison/
662License: GPL
663Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
664External notice:
665
666----------------------------------------------------
667
668Name: DOXYGEN
669Preferred version: v1.7.4
670Is mandatory: false
671Website: www.doxygen.org
672License: GPL
673Copyright: 1997-2011 by Dimitri van Heesch
674External notice:
675
676 Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
677 No representations are made about the suitability of this software for any purpose.
678 It is provided "as is" without express or implied warranty.
679 See the GNU General Public License for more details.
680
681 Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
682
683----------------------------------------------------
684
685Name: CMAKE
686Preferred version: 2.8.4
687Is mandatory: true
688Website: http://www.cmake.org/
689License: Creative Commons Attribution-NoDerivs 3.0 Unported License
690Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
691External notice:
692
693 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
694
695 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
696
697 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
698
699 Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
700
701 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
702
703----------------------------------------------------
704
705Name: SWIG
706Preferred version: 2.0.4 or above
707Is mandatory: false
708Website: http://www.swig.org/
709License: GPL
710Copyright:
711 1995-2011 The SWIG Developers
712 2005-2006 Arizona Board of Regents (University of Arizona).
713 1998-2005 University of Chicago.
714 1995-1998 The University of Utah and the Regents of the University of California
715
716External notice:
717
718 SWIG is free software: you can redistribute it and/or modify it
719 under the terms of the GNU General Public License as published by
720 the Free Software Foundation, either version 3 of the License, or
721 (at your option) any later version. See the LICENSE-GPL file for
722 the full terms of the GNU General Public license version 3.
723
724 Portions of SWIG are also licensed under the terms of the licenses
725 in the file LICENSE-UNIVERSITIES. You must observe the terms of
726 these licenses, as well as the terms of the GNU General Public License,
727 when you distribute SWIG.
728
729 The SWIG library and examples, under the Lib and Examples top level
730 directories, are distributed under the following terms:
731
732 You may copy, modify, distribute, and make derivative works based on
733 this software, in source code or object code form, without
734 restriction. If you distribute the software to others, you may do
735 so according to the terms of your choice. This software is offered as
736 is, without warranty of any kind.
737
738 See the COPYRIGHT file for a list of contributors to SWIG and their
739 copyright notices.
740
741\ No newline at end of file0\ No newline at end of file
7421
=== modified file 'bin/CMakeLists.txt'
--- bin/CMakeLists.txt 2011-08-05 02:21:55 +0000
+++ bin/CMakeLists.txt 2012-01-27 05:33:27 +0000
@@ -15,33 +15,38 @@
15INCLUDE_DIRECTORIES(AFTER ${CMAKE_SOURCE_DIR}/src/)15INCLUDE_DIRECTORIES(AFTER ${CMAKE_SOURCE_DIR}/src/)
16INCLUDE_DIRECTORIES(AFTER ${CMAKE_CURRENT_SOURCE_DIR})16INCLUDE_DIRECTORIES(AFTER ${CMAKE_CURRENT_SOURCE_DIR})
1717
18IF(ZORBA_WITH_DEBUGGER_CLIENT)18IF (ZORBA_WITH_DEBUGGER)
19 CONFIGURE_FILE (debug_client/event_handler_init.cpp.in debug_client/event_handler_init.cpp)19 IF (NOT WIN32)
20 20 FIND_PACKAGE (Libedit)
21 SET(DEBUG_CLIENT_SRCS21 IF (LIBEDIT_FOUND)
22 debug_client/tuple.h22 INCLUDE_DIRECTORIES (${LIBEDIT_INCLUDE_DIRS})
23 debug_client/main.cpp23 SET (LIBEDIT_LIBS ${LIBEDIT_LIBRARIES})
24 debug_client/debug_command.h24 SET (ZORBA_HAVE_LIBEDIT_H ${LIBEDIT_FOUND})
25 debug_client/debug_command.cpp25 ENDIF (LIBEDIT_FOUND)
26 debug_client/command_line_handler.h26 ENDIF (NOT WIN32)
27 debug_client/command_line_handler.cpp27
28 debug_client/lock_free_queue.h28 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/debugger/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/debugger/config.h)
29 debug_client/event_handler.h29 MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/debugger/config.h.cmake --> ${CMAKE_CURRENT_BINARY_DIR}/debugger/config.h")
30 debug_client/event_handler.cpp30 INCLUDE_DIRECTORIES (BEFORE ${CMAKE_CURRENT_BINARY_DIR}/debugger)
31 ${CMAKE_CURRENT_BINARY_DIR}/debug_client/event_handler_init.cpp31
32 SET (DEBUG_CLIENT_SRCS
33 debugger/main.cpp
34 debugger/xqdb_client.cpp
35 debugger/process_listener.cpp
36 debugger/command_prompt.cpp
37 debugger/command_line_handler.cpp
38 debugger/event_handler.cpp
32 )39 )
33 40
34 CONFIGURE_FILE (debug_client/message-handler.xq message-handler.xq)41 ZORBA_GENERATE_EXE ("xqdb" "${DEBUG_CLIENT_SRCS}" "${LIBEDIT_LIBS}" "xqdb" "bin")
35 42ENDIF (ZORBA_WITH_DEBUGGER)
36 ZORBA_GENERATE_EXE("debuggercmd" "${DEBUG_CLIENT_SRCS}" "" "debugger" "bin")
37ENDIF(ZORBA_WITH_DEBUGGER_CLIENT)
3843
39SET(SRCS44SET(SRCS
40 zorbacmd.cpp45 zorbacmd.cpp
41 zorbacmdproperties.cpp46 zorbacmdproperties.cpp
42 error_printer.cpp47 error_printer.cpp
43 util.cpp48 util.cpp
44 module_path.cpp49 path_util.cpp
45)50)
4651
47INCLUDE("${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake")52INCLUDE("${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake")
@@ -84,3 +89,37 @@
84# test the --option option to set an option in the static context89# test the --option option to set an option in the static context
85ZORBA_ADD_TEST(bin/zorba_option zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/test/option.xq" -f --option "{http://www.zorba-xquery.com}option=value")90ZORBA_ADD_TEST(bin/zorba_option zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/test/option.xq" -f --option "{http://www.zorba-xquery.com}option=value")
86ZORBA_SET_TEST_PROPERTY(bin/zorba_option PASS_REGULAR_EXPRESSION "value")91ZORBA_SET_TEST_PROPERTY(bin/zorba_option PASS_REGULAR_EXPRESSION "value")
92
93# test the --uri-path, --lib-path, and --module-path args.
94# Use the versioning tests as they utilize test modules already.
95SET (_testdir
96 "${CMAKE_CURRENT_SOURCE_DIR}/../test/rbkt/Queries/zorba/versioning")
97SET (_uridir "${CMAKE_BINARY_DIR}/TEST_URI_PATH")
98SET (_libdir "${CMAKE_BINARY_DIR}/TEST_LIB_PATH")
99ZORBA_ADD_TEST(bin/zorba_uri_path_1 zorbacmd -f -q "${_testdir}/import1.xq"
100 --uri-path "${_uridir}")
101ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_1
102 PASS_REGULAR_EXPRESSION "hello, v2")
103
104ZORBA_ADD_TEST(bin/zorba_uri_path_2 zorbacmd -f -q "${_testdir}/external1.xq"
105 --uri-path "${_uridir}")
106ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_2
107 PASS_REGULAR_EXPRESSION "ZXQP0008")
108
109ZORBA_ADD_TEST(bin/zorba_uri_path_3 zorbacmd -f -q "${_testdir}/external1.xq"
110 --uri-path "${_uridir}" --lib-path "${_libdir}")
111ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_3
112 PASS_REGULAR_EXPRESSION "hello, v2")
113
114IF(WIN32)
115 SET(PATH_SEP ";")
116ELSE(WIN32)
117 SET(PATH_SEP ":")
118ENDIF(WIN32)
119ZORBA_ADD_TEST(bin/zorba_module_path_1 zorbacmd -f -q "${_testdir}/external1.xq"
120 --module-path "${_libdir}${PATH_SEP}${_uridir}")
121ZORBA_SET_TEST_PROPERTY(bin/zorba_module_path_1
122 PASS_REGULAR_EXPRESSION "hello, v2")
123
124# test compilation of the perf script
125ZORBA_ADD_TEST(bin/zorba_compilechk4 zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/../test/zperf/src/start.xq" -f --compile-only)
87126
=== removed file 'bin/debug_client/debug_command.cpp'
--- bin/debug_client/debug_command.cpp 2011-07-01 01:53:24 +0000
+++ bin/debug_client/debug_command.cpp 1970-01-01 00:00:00 +0000
@@ -1,99 +0,0 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include <iostream>
17#include "debug_client/debug_command.h"
18
19namespace zorba { namespace debugclient {
20
21
22 void CommandLine::execute()
23 {
24 for (;;) {
25 std::cout << "zdb>> ";
26 std::string command;
27 std::getline(std::cin, command);
28 std::vector<std::string> args;
29 args << command;
30 std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.find(args[0]);
31 if (lIter == theCommands.end()) {
32 std::cout << args[0] << ": Command not found" << std::endl;
33 continue;
34 }
35 if (!lIter->second->execute(args))
36 continue;
37 return;
38 }
39 }
40
41
42 CommandLine::~CommandLine()
43 {
44 for (std::map<std::string, UntypedCommand*>::iterator i = theCommands.begin();
45 i != theCommands.end(); ++i)
46 {
47 delete i->second;
48 }
49 }
50
51 CommandLine& CommandLine::operator<<(UntypedCommand *aCommand)
52 {
53 theCommands.insert(std::make_pair(aCommand->get_name(), aCommand));
54 return *this;
55 }
56}}
57
58namespace std {
59 vector<string>& operator<< (vector<string>& vec, const string& str)
60 {
61 string::size_type before = 0;
62 string::size_type pos = str.find(" ", 0);
63 while (pos != str.npos) {
64 std::string lSub = str.substr(before, pos - before);
65 if (lSub[0] == '"') {
66 std::string::size_type lBeforeCopy = before;
67 do {
68 lBeforeCopy = str.find("\"", lBeforeCopy + 1);
69 } while (pos != str.npos && str.size() > pos + 1 && str[pos + 1] == '\\');
70 pos = lBeforeCopy;
71 lSub = str.substr(before + 1, pos - before - 1);
72 }
73 vec.push_back(lSub);
74 before = pos + 1;
75 pos = str.find(" ", before);
76 }
77 std::string lSub = str.substr(before);
78 if (lSub[0] == '"') {
79 pos = str.find("\"", before + 1);
80 lSub = str.substr(before + 1, pos - before - 1);
81 }
82 vec.push_back(lSub);
83 return vec;
84 }
85
86 set<string>& operator<< (set<string>& vec, const string& str)
87 {
88 string::size_type before = 0;
89 string::size_type pos = str.find(" ", 0);
90 while (pos != str.npos) {
91 vec.insert(str.substr(before, pos));
92 before = pos + 1;
93 pos = str.find(" ", before);
94 }
95 vec.insert(str.substr(before));
96 return vec;
97 }
98
99}
1000
=== removed file 'bin/debug_client/event_handler_init.cpp.in'
--- bin/debug_client/event_handler_init.cpp.in 2011-07-01 01:53:24 +0000
+++ bin/debug_client/event_handler_init.cpp.in 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include <fstream>
17#include "debug_client/event_handler.h"
18
19namespace zorba { namespace debugclient {
20
21 std::istream* EventHandler::getCurrentDirectory() {
22 const char* build_dir = "@CMAKE_BINARY_DIR@/bin/message-handler.xq";
23 const char* install_dir =
24#ifndef WIN32
25 "@CMAKE_INSTALL_PREFIX@/bin/";
26#else
27 "C:/Program Files/Zorba XQuery Processor @ZORBA_MAJOR_NUMBER@.@ZORBA_MINOR_NUMBER@.@ZORBA_PATCH_NUMBER@/bin/";
28#endif
29 std::auto_ptr<std::ifstream> stream(new std::ifstream(build_dir));
30 if (stream->good()) {
31 return stream.release();
32 }
33 stream.reset(new std::ifstream(install_dir));
34 if (stream->good()) {
35 return stream.release();
36 }
37 return 0;
38 }
39
40}} // end of namespace zorba::debugclient
41
420
=== removed file 'bin/debug_client/lock_free_queue.cpp'
--- bin/debug_client/lock_free_queue.cpp 2011-07-01 01:53:24 +0000
+++ bin/debug_client/lock_free_queue.cpp 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include "lock_free_queue.h"
170
=== removed file 'bin/debug_client/message-handler.xq'
--- bin/debug_client/message-handler.xq 2011-08-26 23:36:24 +0000
+++ bin/debug_client/message-handler.xq 1970-01-01 00:00:00 +0000
@@ -1,165 +0,0 @@
1(:
2 : Copyright 2006-2009 The FLWOR Foundation.
3 :
4 : Licensed under the Apache License, Version 2.0 (the "License");
5 : you may not use this file except in compliance with the License.
6 : You may obtain a copy of the License at
7 :
8 : http://www.apache.org/licenses/LICENSE-2.0
9 :
10 : Unless required by applicable law or agreed to in writing, software
11 : distributed under the License is distributed on an "AS IS" BASIS,
12 : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 : See the License for the specific language governing permissions and
14 : limitations under the License.
15:)
16
17import module namespace refl = 'http://www.zorba-xquery.com/modules/reflection';
18import module namespace sctx = "http://www.zorba-xquery.com/modules/introspection/sctx";
19import module namespace base64 = "http://www.zorba-xquery.com/modules/converters/base64";
20
21
22declare variable $local:localns as xs:string := 'http://www.w3.org/2005/xquery-local-functions';
23
24
25declare variable $local:endl as xs:string := '
26';
27
28declare function local:has-to-stop($resp as element())
29{
30 fn:not(($resp/@command/data(.) eq "stop" and $resp/@reason/data(.) eq "ok")
31 or ($resp/@status/data(.) eq "stopped")
32 or ($resp/@status/data(.) eq "stopping"))
33};
34
35declare function local:status($resp as element())
36{
37 fn:concat(
38 "Status: ", $resp/@status/data(.), $local:endl,
39 "Reason: ", $resp/@reason/data(.), $local:endl,
40 let $msg := $resp/text()
41 return
42 if (fn:empty($msg) or $msg eq "") then
43 ""
44 else
45 fn:concat($msg, $local:endl)
46 )
47};
48
49
50declare function local:run($resp as element()) {
51 if ($resp/@status/data(.) eq "starting") then
52 "Starting query"
53 else
54 local:status($resp)
55};
56
57declare function local:stop($resp as element())
58{
59 local:status($resp)
60};
61
62declare function local:breakpoint_set($resp as element())
63{
64 if ($resp/error) then
65 fn:concat("Error when setting a breakpoint: ", if ($resp/error/message) then $resp/error/message/text() else concat(" errcode: ", data($resp/error/@code)))
66 else
67 fn:concat("set breakpoint with id ", data($resp/@id), " and state ", data($resp/@state))
68};
69
70declare function local:breakpoint_list($resp as element())
71{
72 string-join(
73 for $b in $resp/breakpoint
74 return concat("Breakpoint ", data($b/@id), " at ", data($b/@filename), ":", data($b/@lineno), " ", data($b/@state)),
75 $local:endl
76 )
77};
78
79declare function local:breakpoint_remove($resp as element())
80{
81 "Breakpoint removed"
82};
83
84declare function local:stack_depth($resp as element())
85{
86 concat("Depth: ", data($resp/@depth))
87};
88
89declare function local:stack_get($resp as element())
90{
91 string-join(
92 for $s in $resp/stack
93 return concat("Level ", data($s/@level), " at ", data($s/@filename), ":", data($s/@lineno)),
94 $local:endl
95 )
96};
97
98
99declare function local:context_names($resp as element())
100{
101 string-join(
102 for $c in $resp/context
103 return concat("Context: ", data($c/@name), " id: ", data($c/@id)),
104 $local:endl
105 )
106};
107
108declare function local:context_get($resp as element())
109{
110 string-join(
111 for $p in $resp/property
112 return concat(data($p/@fullname), ": [", data($p/@type), "]",
113 if ($p/text() ne "") then concat(": ", base64:decode($p/text())) else ""),
114 $local:endl
115 )
116};
117
118declare function local:eval($resp as element())
119{
120 if (data($resp/@success) eq "1") then
121 local:context_get($resp)
122 else
123 concat("Eval failed", ":", $resp/error/message/text())
124};
125
126declare function local:process-response($resp as element())
127{
128 if (data($resp/@command) eq "") then
129 (fn:true(), $resp/@transaction_id/data(.), local:status($resp))
130 else
131 let $fun-cont-name := fn:QName($local:localns, concat("local:", $resp/@command/data(.), "-cont"))
132 let $fun-msg-name := fn:QName($local:localns, concat("local:", $resp/@command/data(.)))
133 return (
134 if (sctx:function-arguments-count($fun-cont-name) = 1) then
135 refl:invoke($fun-cont-name, $resp)
136 else
137 local:has-to-stop($resp),
138 $resp/@transaction_id/data(.),
139 if (sctx:function-arguments-count($fun-msg-name) = 1) then
140 refl:invoke($fun-msg-name, $resp)
141 else
142 "Recieved a message - command not implemented"
143 )
144};
145
146declare function local:process-init($init as element())
147{
148 fn:true(),
149 0,
150 fn:concat(fn:string-join(
151 ('Established connection with', $init/@language/data(.), 'client', $init/@appid/data(.)), ' '), '
152')
153};
154
155declare function local:main($response as element()) {
156 let $process-fun as xs:QName := fn:QName($local:localns, concat("local:process-", node-name($response)))
157 return
158 if (sctx:function-arguments-count($process-fun) = 1) then
159 refl:invoke($process-fun, $response)
160 else (
161 true(),
162 ($response/@transaction_id, 0)[1]/data(.),
163 "ERROR: Recieved unknown node from client"
164 )
165};
1660
=== renamed directory 'bin/debug_client' => 'bin/debugger'
=== renamed file 'bin/debug_client/debug_command.h' => 'bin/debugger/command.h'
--- bin/debug_client/debug_command.h 2011-07-04 08:05:46 +0000
+++ bin/debugger/command.h 2012-01-27 05:33:27 +0000
@@ -14,7 +14,9 @@
14 * limitations under the License.14 * limitations under the License.
15 */15 */
16#pragma once16#pragma once
17#include <zorba/config.h>17#ifndef ZORBA_DEBUGGER_COMMAND_H
18#define ZORBA_DEBUGGER_COMMAND_H
19
18#include <string>20#include <string>
19#include <vector>21#include <vector>
20#include <iostream>22#include <iostream>
@@ -23,151 +25,18 @@
23#include <sstream>25#include <sstream>
24#include <memory>26#include <memory>
25#include <typeinfo>27#include <typeinfo>
26#include "debug_client/tuple.h"28
2729#include <zorba/config.h>
28namespace zorba { namespace debugclient {30
31#include "command_arg.h"
32#include "tuple.h"
33
34
35namespace zorba { namespace debugger {
29 36
30 class DebugClientParseException : public std::exception {37 class DebugClientParseException : public std::exception {
31 };38 };
32 39
33 template<typename Tuple>
34 class CommandArg;
35
36 template<typename Tuple>
37 class CommandArgInstance {
38 public:
39 virtual int get_index() const = 0;
40 virtual const CommandArg<Tuple>* get_arg() const = 0;
41 virtual void insertValue(Tuple& t) = 0;
42 virtual bool isSet(Tuple& t) const = 0;
43 };
44
45 template<typename T, int Idx, typename Tuple>
46 class TypedCommandArgInstance : public CommandArgInstance<Tuple>
47 {
48 public:
49 TypedCommandArgInstance(T aValue, const CommandArg<Tuple>* aArg)
50 : theValue(aValue), theArg(aArg) {}
51 virtual int get_index() const { return Idx; }
52 virtual const CommandArg<Tuple>* get_arg() const { return theArg; }
53 virtual void insertValue(Tuple& t)
54 {
55 ZORBA_TR1_NS::get<Idx>(t).first = true;
56 ZORBA_TR1_NS::get<Idx>(t).second = theValue;
57 }
58 virtual bool isSet(Tuple& t) const
59 {
60 return ZORBA_TR1_NS::get<Idx>(t).first;
61 }
62 private:
63 T theValue;
64 const CommandArg<Tuple>* theArg;
65 };
66
67 template<typename Tuple>
68 class CommandArgType {
69 public:
70 virtual CommandArgInstance<Tuple>* parse(const std::string& str,
71 const CommandArg<Tuple>* arg) = 0;
72 virtual bool isVoid() const = 0;
73 virtual bool isSet(Tuple& t) const = 0;
74 virtual ~CommandArgType() {}
75 };
76
77 template<typename T, int Idx, typename Tuple>
78 class TypedCommandArgType : public CommandArgType<Tuple> {
79 public:
80 typedef T Type;
81 public: // implementation
82 TypedCommandArgType(bool aIsVoid) : theIsVoid(aIsVoid) {}
83 TypedCommandArgType(const T& aValue,
84 bool aIsVoid)
85 : theDefault(aValue), theIsVoid(aIsVoid) {}
86 virtual CommandArgInstance<Tuple>* parse(const std::string& str,
87 const CommandArg<Tuple>* arg)
88 {
89 T aValue;
90 std::stringstream stream(str);
91 stream >> aValue;
92 if (stream.fail()) {
93 std::cerr << "Could not parse argument of type "
94 << typeid(T).name()
95 << std::endl;
96 return 0;
97 }
98 return new TypedCommandArgInstance<T, Idx, Tuple>(aValue, arg);
99 }
100 virtual bool isVoid() const { return theIsVoid; }
101 virtual bool isSet(Tuple& t) const
102 {
103 return ZORBA_TR1_NS::get<Idx>(t).first;
104 }
105 private:
106 TypedCommandArgType<T, Idx, Tuple>() {}
107 T theDefault;
108 bool theIsVoid;
109 };
110
111 template<typename Tuple>
112 class CommandArg {
113 public:
114 CommandArg(unsigned aId,
115 CommandArgType<Tuple>* aType,
116 const std::set<std::string>& aFlags,
117 const std::string& aDescription,
118 bool aIsRequired)
119 : theId(aId),
120 theType(aType),
121 theFlags(aFlags),
122 theDescription(aDescription),
123 theIsRequired(aIsRequired)
124 {
125 }
126 ~CommandArg() { delete theType; }
127 unsigned get_id() const { return theId; }
128 bool canHandle(const std::string& arg) const
129 {
130 if (theFlags.find(arg) != theFlags.end()) {
131 return true;
132 }
133 return false;
134 }
135 CommandArgInstance<Tuple>* parse(const std::string& str) const
136 {
137 return theType->parse(str, this);
138 }
139 bool isVoid() const {
140 return theType->isVoid();
141 }
142 bool isRequired() const { return theIsRequired; }
143 std::string get_name() const {
144 return *(theFlags.begin());
145 }
146 bool isSet(Tuple& t) const
147 {
148 return theType->isSet(t);
149 }
150 private:
151 unsigned theId;
152 CommandArgType<Tuple>* theType;
153 std::set<std::string> theFlags;
154 std::string theDescription;
155 bool theIsRequired;
156 };
157}} // end namespace zorba
158
159namespace std {
160
161 /**
162 * This is a helper split function
163 */
164 vector<string>& operator<< (vector<string>& vec, const string& str);
165
166 set<string>& operator<< (set<string>& vec, const string& str);
167} //end namespace std
168
169namespace zorba { namespace debugclient {
170
171 template<typename Func, typename Tuple, int CommandIdx>40 template<typename Func, typename Tuple, int CommandIdx>
172 class CommandInstance41 class CommandInstance
173 {42 {
@@ -188,8 +57,10 @@
188 57
189 class UntypedCommand {58 class UntypedCommand {
190 public:59 public:
191 virtual std::string get_name() const = 0;60 virtual std::string getName() const = 0;
192 virtual std::string get_description() const = 0;61 virtual std::set<std::string> getAliases() const = 0;
62 virtual std::string getDescription() const = 0;
63 virtual void printHelp() const = 0;
193 virtual bool execute(const std::vector<std::string>& args) = 0;64 virtual bool execute(const std::vector<std::string>& args) = 0;
194 };65 };
195 66
@@ -197,77 +68,141 @@
197 class Command : public UntypedCommand {68 class Command : public UntypedCommand {
198 public:69 public:
199 Command(const std::string& aName, Func& aFunction, const std::string& aDescription)70 Command(const std::string& aName, Func& aFunction, const std::string& aDescription)
200 : theName(aName), theFunction(aFunction), theDescription(aDescription) {}71 : theName(aName), theFunction(aFunction), theDescription(aDescription)
72 {}
73
74 Command(const std::string& aName, const std::set<std::string> aAliases, Func& aFunction, const std::string& aDescription)
75 : theName(aName), theAliases(aAliases), theFunction(aFunction), theDescription(aDescription)
76 {}
77
201 ~Command();78 ~Command();
79
202 public:80 public:
203 Command& operator() (unsigned aId,81
204 const std::string& aFlags,82 void
205 CommandArgType<Tuple>* aType,83 addArgument(
206 const std::string& aDescription = "",84 unsigned aId,
207 bool isRequired = false);85 const std::string& aFlags,
208 virtual std::string get_name() const { return theName; }86 CommandArgType<Tuple>* aType,
209 virtual std::string get_description() const { return theDescription; }87 const std::string& aDescription = "",
88 bool isRequired = false);
89
90 static void
91 splitNames(
92 const std::string& names,
93 std::set<std::string>& set);
94
95 virtual std::string
96 getName() const
97 {
98 return theName;
99 }
100
101 virtual std::set<std::string> getAliases() const
102 {
103 return theAliases;
104 }
105
106 virtual std::string
107 getDescription() const
108 {
109 return theDescription;
110 }
111
112 virtual void
113 printHelp() const;
114
210 virtual bool execute(const std::vector<std::string>& args)115 virtual bool execute(const std::vector<std::string>& args)
211 {116 {
212 CommandInstance<Func, Tuple, CommandIdx> instance(theFunction, theTuple);117 CommandInstance<Func, Tuple, CommandIdx> instance(theFunction, theTuple);
213 if (instance.parseArguments(args, theArgs))118 if (instance.parseArguments(args, theArgs)) {
214 instance.execute();119 instance.execute();
215 else120 return true;
216 return false;121 }
217 return true;122 return false;
218 }123 }
219 private:124 private:
220 std::string theName;125 std::string theName;
126 std::set<std::string> theAliases;
221 Func& theFunction;127 Func& theFunction;
222 Tuple theTuple;128 Tuple theTuple;
223 std::string theDescription;129 std::string theDescription;
224 std::map<std::string, CommandArg<Tuple>* > theArgs;130 std::map<std::string, CommandArg<Tuple>*> theArgs;
225 };131 };
226 132
227 class CommandLine {133/*****************************************************************************/
228 public:134/*****************************************************************************/
229 ~CommandLine();135
230 public:136template<typename Func, typename Tuple, int CommandIdx>
231 void execute();137Command<Func, Tuple, CommandIdx>::~Command()
232 CommandLine& operator<< (UntypedCommand* aCommand);138{
233 private:139 typedef std::map<std::string, CommandArg<Tuple>*> ArgType;
234 std::map<std::string, UntypedCommand*> theCommands;140 for (typename ArgType::iterator i = theArgs.begin(); i != theArgs.end(); ++i) {
235 };141 delete i->second;
236 142 }
237 template<typename Func, typename Tuple, int CommandIdx>143}
238 Command<Func, Tuple, CommandIdx>::~Command()144
239 {145template<typename Func, typename Tuple, int CommandIdx>
240 typedef std::map<std::string, CommandArg<Tuple>* > ArgType;146void
241 for (typename ArgType::iterator i = theArgs.begin(); i != theArgs.end(); ++i) {147Command<Func, Tuple, CommandIdx>::printHelp() const
242 delete i->second;148{
243 }149 std::cout << "Purpose: " << getDescription() << std::endl;
244 }150
245 151 typename std::map<std::string, CommandArg<Tuple>*>::const_iterator lIter = theArgs.begin();
246 152 if (lIter == theArgs.end()) {
247 template<typename Func, typename Tuple, int CommandIdx>153 std::cout << "This command has no arguments." << std::endl;
248 Command<Func, Tuple, CommandIdx>& 154 std::cout << std::endl;
249 Command<Func, Tuple, CommandIdx>::operator() (unsigned aId,155 return;
250 const std::string& aFlags,156 }
251 CommandArgType<Tuple>* aType,157
252 const std::string& aDescription,158 std::cout << "Arguments:" << std::endl << std::endl;
253 bool isRequired)159 for (; lIter != theArgs.end(); ++lIter) {
254 {160 std::cout << " " << lIter->first << "\t" << lIter->second->getDescription() << std::endl;
255 std::set<std::string> args;161 }
256 args << aFlags;162 std::cout << std::endl;
257 for (std::set<std::string>::iterator i = args.begin(); i != args.end(); ++i) {163}
258 std::string toAdd = (i->size() == 1) ? "-" + *i : "--" + *i;164
259 theArgs.insert(std::make_pair(toAdd,165template<typename Func, typename Tuple, int CommandIdx>
260 new CommandArg<Tuple>(aId,166void
261 aType,167Command<Func, Tuple, CommandIdx>::splitNames(const std::string& aNames, std::set<std::string>& aSet)
262 args,168{
263 aDescription,169 std::string::size_type before = 0;
264 isRequired)170 std::string::size_type pos = aNames.find(" ", 0);
265 )171 while (pos != aNames.npos) {
266 );172 std::string lName = aNames.substr(before, pos);
267 }173 if (lName != "") {
268 return *this;174 aSet.insert(lName);
269 }175 }
270 176 before = pos + 1;
177 pos = aNames.find(" ", before);
178 }
179 std::string lName = aNames.substr(before);
180 if (lName != "") {
181 aSet.insert(lName);
182 }
183}
184
185template<typename Func, typename Tuple, int CommandIdx>
186void
187Command<Func, Tuple, CommandIdx>::addArgument(
188 unsigned aId,
189 const std::string& aFlags,
190 CommandArgType<Tuple>* aType,
191 const std::string& aDescription,
192 bool isRequired)
193{
194 std::set<std::string> lNames;
195 splitNames(aFlags, lNames);
196
197 for (std::set<std::string>::iterator i = lNames.begin(); i != lNames.end(); ++i) {
198 std::string toAdd = (i->size() == 1) ? "-" + *i : "--" + *i;
199 CommandArg<Tuple>* lArg = new CommandArg<Tuple>(aId, aType, lNames, aDescription, isRequired);
200 theArgs.insert(std::make_pair(toAdd, lArg));
201 }
202}
203
204/*****************************************************************************/
205
271 template<typename Tuple, typename T, int Idx>206 template<typename Tuple, typename T, int Idx>
272 CommandArgType<Tuple>* createArgType(Tuple t)207 CommandArgType<Tuple>* createArgType(Tuple t)
273 {208 {
@@ -290,6 +225,16 @@
290 return new Command<Func, Tuple, CommandIdx>(aName, aFunction, aDescription);225 return new Command<Func, Tuple, CommandIdx>(aName, aFunction, aDescription);
291 }226 }
292 227
228 template<int CommandIdx, typename Tuple, typename Func>
229 Command<Func, Tuple, CommandIdx>* createCommand(Tuple t,
230 const std::string& aName,
231 const std::set<std::string>& aAliases,
232 Func& aFunction,
233 const std::string& aDescription)
234 {
235 return new Command<Func, Tuple, CommandIdx>(aName, aAliases, aFunction, aDescription);
236 }
237
293 template<typename Func, typename Tuple, int CommandIdx>238 template<typename Func, typename Tuple, int CommandIdx>
294 bool CommandInstance<Func, Tuple, CommandIdx>::239 bool CommandInstance<Func, Tuple, CommandIdx>::
295 parseArguments(const std::vector<std::string>& args,240 parseArguments(const std::vector<std::string>& args,
@@ -301,29 +246,34 @@
301 for (ArgType::size_type i = 1; i < size; ++i) {246 for (ArgType::size_type i = 1; i < size; ++i) {
302 typename CArgType::const_iterator pos = aCommandArgs.find(args[i]);247 typename CArgType::const_iterator pos = aCommandArgs.find(args[i]);
303 if (pos == aCommandArgs.end()) {248 if (pos == aCommandArgs.end()) {
304 std::cerr << "Error: Unknown Argument " << args[i] << std::endl;249 std::cerr << "Error: Unknown option " << args[i] << std::endl;
305 parseError = true;250 parseError = true;
306 return false;251 return false;
307 }252 }
308 const CommandArg<Tuple>& arg = *(pos->second);253 const CommandArg<Tuple>& arg = *(pos->second);
309 if (!arg.isVoid() && args[++i][0] == '-') {
310 std::cerr << "Did not expect parameter for option " << args[i] << std::endl;
311 return false;
312 }
313 std::auto_ptr<CommandArgInstance<Tuple> > instance;254 std::auto_ptr<CommandArgInstance<Tuple> > instance;
314 if (arg.isVoid()) {255 if (arg.isVoid()) {
315 instance.reset(arg.parse("1"));256 instance.reset(arg.parse("1"));
316 } else {257 } else {
258 ++i;
259 if (i >= size) {
260 std::cerr << "Error: Missing value for argument " << args[i - 1] << std::endl;
261 parseError = true;
262 allSet = false;
263 return false;
264 }
317 instance.reset(arg.parse(args[i]));265 instance.reset(arg.parse(args[i]));
318 }266 }
319 instance->insertValue(theTuple);267 if (instance.get()) {
268 instance->insertValue(theTuple);
269 }
320 }270 }
321 bool allSet = true;271 bool allSet = true;
322 for (typename CArgType::const_iterator i = aCommandArgs.begin();272 for (typename CArgType::const_iterator i = aCommandArgs.begin();
323 i != aCommandArgs.end(); ++i)273 i != aCommandArgs.end(); ++i)
324 {274 {
325 if (i->second->isRequired() && !i->second->isSet(theTuple)) {275 if (i->second->isRequired() && !i->second->isSet(theTuple)) {
326 std::cerr << "Error: Argument " << i->second->get_name() << " not set" << std::endl;276 std::cerr << "Error: Argument -" << i->second->getName() << " not set" << std::endl;
327 allSet = false;277 allSet = false;
328 }278 }
329 }279 }
@@ -336,4 +286,7 @@
336 theFunction.template handle<CommandIdx>(this->theTuple);286 theFunction.template handle<CommandIdx>(this->theTuple);
337 }287 }
338288
339}} // end of namespace zorba::debugclient289} // namespace zorba
290} // namespace debugger
291
292#endif // ZORBA_DEBUGGER_COMMAND_H
340293
=== added file 'bin/debugger/command_arg.h'
--- bin/debugger/command_arg.h 1970-01-01 00:00:00 +0000
+++ bin/debugger/command_arg.h 2012-01-27 05:33:27 +0000
@@ -0,0 +1,237 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17#ifndef ZORBA_DEBUGGER_COMMAND_ARG_H
18#define ZORBA_DEBUGGER_COMMAND_ARG_H
19
20#include <string>
21#include <iostream>
22#include <set>
23#include <sstream>
24
25#include "tuple.h"
26
27
28namespace zorba { namespace debugger {
29
30template<typename Tuple>
31class CommandArg;
32
33template<typename Tuple>
34class CommandArgInstance {
35 public:
36 virtual int get_index() const = 0;
37 virtual const CommandArg<Tuple>* get_arg() const = 0;
38 virtual void insertValue(Tuple& t) = 0;
39 virtual bool isSet(Tuple& t) const = 0;
40};
41
42template<typename T, int Idx, typename Tuple>
43class TypedCommandArgInstance : public CommandArgInstance<Tuple>
44{
45 public:
46 TypedCommandArgInstance(T aValue, const CommandArg<Tuple>* aArg)
47 : theValue(aValue), theArg(aArg)
48 {
49 }
50
51 virtual int
52 get_index() const
53 {
54 return Idx;
55 }
56
57 virtual const CommandArg<Tuple>*
58 get_arg() const
59 {
60 return theArg;
61 }
62
63 virtual void
64 insertValue(Tuple& t)
65 {
66 ZORBA_TR1_NS::get<Idx>(t).first = true;
67 ZORBA_TR1_NS::get<Idx>(t).second = theValue;
68 }
69
70 virtual bool isSet(Tuple& t) const
71 {
72 return ZORBA_TR1_NS::get<Idx>(t).first;
73 }
74
75 private:
76
77 T theValue;
78 const CommandArg<Tuple>* theArg;
79};
80
81template<typename Tuple>
82class CommandArgType
83{
84 public:
85 virtual CommandArgInstance<Tuple>*
86 parse(
87 const std::string& str,
88 const CommandArg<Tuple>* arg) = 0;
89
90 virtual bool
91 isVoid() const = 0;
92
93 virtual bool
94 isSet(Tuple& t) const = 0;
95
96 virtual ~CommandArgType() {}
97};
98
99 template<typename T, int Idx, typename Tuple>
100 class TypedCommandArgType : public CommandArgType<Tuple> {
101 public:
102 typedef T Type;
103 public: // implementation
104 TypedCommandArgType(bool aIsVoid) : theIsVoid(aIsVoid) {}
105 TypedCommandArgType(const T& aValue,
106 bool aIsVoid)
107 : theDefault(aValue), theIsVoid(aIsVoid) {}
108 virtual CommandArgInstance<Tuple>* parse(const std::string& str,
109 const CommandArg<Tuple>* arg)
110 {
111 T aValue;
112
113 // special treatment for strings
114 // this is a double hack:
115 // - we check the type name if this starts with: class std::basic_string
116 // - we use void* in readEntireString to workaround the template type T
117 // which would otherwise complain during compilation if types and
118 // operators do not match
119 // TOSO: probably someone can find a more elegant solution
120 std::string lTypeName(typeid(T).name());
121 if (lTypeName.find("class std::basic_string") == 0) {
122 readEntireString(str, &aValue);
123 } else {
124 std::stringstream stream(str);
125 std::stringstream out;
126 stream >> aValue;
127 if (stream.fail()) {
128 std::cerr << "Error: Could not parse value \"" << str << "\" as type "
129 << typeid(T).name()
130 << std::endl;
131 return 0;
132 }
133 }
134
135 return new TypedCommandArgInstance<T, Idx, Tuple>(aValue, arg);
136 }
137 virtual bool isVoid() const { return theIsVoid; }
138 virtual bool isSet(Tuple& t) const
139 {
140 return ZORBA_TR1_NS::get<Idx>(t).first;
141 }
142 private:
143 void readEntireString(std::string aIn, void* aValue)
144 {
145 *((std::string*)aValue) = aIn;
146 }
147
148 TypedCommandArgType<T, Idx, Tuple>() {}
149 T theDefault;
150 bool theIsVoid;
151 };
152
153 template<typename Tuple>
154 class CommandArg {
155 public:
156 CommandArg(unsigned aId,
157 CommandArgType<Tuple>* aType,
158 const std::set<std::string>& aNames,
159 const std::string& aDescription,
160 bool aIsRequired)
161 : theId(aId),
162 theType(aType),
163 theNames(aNames),
164 theDescription(aDescription),
165 theIsRequired(aIsRequired)
166 {
167 }
168
169 ~CommandArg()
170 {
171 delete theType;
172 }
173
174 unsigned
175 get_id() const
176 {
177 return theId;
178 }
179
180 bool
181 canHandle(const std::string& arg) const
182 {
183 if (theNames.find(arg) != theNames.end()) {
184 return true;
185 }
186 return false;
187 }
188
189 CommandArgInstance<Tuple>*
190 parse(const std::string& str) const
191 {
192 return theType->parse(str, this);
193 }
194
195 bool
196 isVoid() const
197 {
198 return theType->isVoid();
199 }
200
201 bool
202 isRequired() const
203 {
204 return theIsRequired;
205 }
206
207 std::string
208 getName() const
209 {
210 return *(theNames.begin());
211 }
212
213 std::string
214 getDescription() const
215 {
216 return theDescription;
217 }
218
219 bool
220 isSet(Tuple& t) const
221 {
222 return theType->isSet(t);
223 }
224
225 private:
226
227 unsigned theId;
228 CommandArgType<Tuple>* theType;
229 std::set<std::string> theNames;
230 std::string theDescription;
231 bool theIsRequired;
232 };
233
234} // namespace zorba
235} // namespace debugger
236
237#endif // ZORBA_DEBUGGER_COMMAND_ARG_H
0238
=== modified file 'bin/debugger/command_line_handler.cpp'
--- bin/debug_client/command_line_handler.cpp 2011-07-01 01:53:24 +0000
+++ bin/debugger/command_line_handler.cpp 2012-01-27 05:33:27 +0000
@@ -1,4 +1,4 @@
1/*1 /*
2 * Copyright 2006-2008 The FLWOR Foundation.2 * Copyright 2006-2008 The FLWOR Foundation.
3 *3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");4 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,225 +23,385 @@
23# define msleep Sleep23# define msleep Sleep
24#endif24#endif
2525
26namespace zorba { namespace debugclient {26#include "command_prompt.h"
27
28
29namespace zorba { namespace debugger {
27 30
28 using namespace ::std;
29 using namespace ::ZORBA_TR1_NS;31 using namespace ::ZORBA_TR1_NS;
30 32
31 CommandLineHandler::CommandLineHandler(unsigned short port,33CommandLineHandler::CommandLineHandler(
32 LockFreeConsumer<std::size_t>& aConsumer,34 unsigned short port,
33 LockFreeConsumer<bool>& aContinueQueue,35 LockFreeConsumer<std::size_t>& aConsumer,
34 EventHandler& aHandler,36 LockFreeConsumer<bool>& aContinueQueue,
35 CommandLine& aCommandLine)37 EventHandler* aHandler,
38 CommandPrompt* aCommandPrompt)
36 : theConsumer(aConsumer),39 : theConsumer(aConsumer),
37 theContinueQueue(aContinueQueue),40 theContinueQueue(aContinueQueue),
38 theClient(DebuggerClient::createDebuggerClient(&aHandler, port, "localhost")),41 theClient(DebuggerClient::createDebuggerClient(aHandler, port, "localhost")),
39 theCommandLine(aCommandLine),42 theCommandLine(aCommandPrompt),
40 theQuit(false), theContinue(false), theWaitFor(0)43 theQuit(false), theTerminated(true), theContinue(false), theWaitFor(0)
41 {44 {
42 addCommands();45 addCommands();
43 }46 }
44 47
45 CommandLineHandler::~CommandLineHandler()48CommandLineHandler::~CommandLineHandler()
46 {49{
47 }50}
48 51
49 void CommandLineHandler::execute()52void
50 {53CommandLineHandler::execute()
51 theClient->accept();54{
52 std::set<std::size_t> lIdList;55 theClient->accept();
53 do {56 std::set<std::size_t> lIdList;
57 do {
58 getNextId(lIdList);
59 while (lIdList.find(theWaitFor) == lIdList.end()) {
54 getNextId(lIdList);60 getNextId(lIdList);
55 while (!theQuit && lIdList.find(theWaitFor) == lIdList.end()) {61 msleep(20);
56 getNextId(lIdList);62 }
57 msleep(20);63 bool lCanQuit;
58 }64 while (!theContinueQueue.consume(lCanQuit)) {
59 while (!theContinueQueue.consume(theQuit)) {65 msleep(20);
60 msleep(20);66 }
61 }67 if (lCanQuit) {
62 theQuit = !theQuit;68 theTerminated = true;
63 if (!theQuit) {69 }
64 theCommandLine.execute();70 theCommandLine->execute();
65 while (theContinue) {71 while (theContinue) {
66 theContinue = false;72 theContinue = false;
67 theCommandLine.execute();73 theCommandLine->execute();
68 }74 }
69 }75 } while (!theQuit);
70 } while (!theQuit);76}
71 }77
72 78void
73 void CommandLineHandler::getNextId(std::set<std::size_t>& aIdList)79CommandLineHandler::getNextId(std::set<std::size_t>& aIdList)
74 {80{
75 std::size_t result;81 std::size_t result;
76 if (theConsumer.consume(result)) {82 if (theConsumer.consume(result)) {
77 aIdList.insert(result);83 aIdList.insert(result);
78 }84 }
79 }85}
80 86
81 template<>87template<>
82 void CommandLineHandler::handle<Status>(ZORBA_TR1_NS::tuple<> &t)88void
83 {89CommandLineHandler::handle<Status>(ZORBA_TR1_NS::tuple<> &t)
84 theWaitFor = theClient->status();90{
85 }91 theWaitFor = theClient->status();
86 92}
87 template<>93
88 void CommandLineHandler::handle<Quit>(ZORBA_TR1_NS::tuple<> &t)94template<>
89 {95void
96CommandLineHandler::handle<Variables>(ZORBA_TR1_NS::tuple<> &t)
97{
98 theWaitFor = theClient->variables();
99}
100
101template<>
102void
103CommandLineHandler::handle<Quit>(ZORBA_TR1_NS::tuple<> &t)
104{
105 if (!theTerminated) {
90 bool answered = false;106 bool answered = false;
91 while (!answered) {107 while (!answered) {
92 std::cout << "Do you really want to stop debugging and exit? (y/n) ";108 std::cout << "Do you really want to stop debugging and exit? (y/n) ";
93 char answer;109 std::string lAnswer;
94 std::cin >> answer;110 std::getline(std::cin, lAnswer);
95 std::cout << std::endl;111 if (lAnswer == "y" || lAnswer == "yes") {
96 if (answer == 'y') {
97 answered = true;112 answered = true;
98 } else if (answered == 'n') {113 } else if (lAnswer == "n" || lAnswer == "no") {
99 theContinue = true;114 theContinue = true;
100 return;115 return;
101 }116 }
102 }117 }
103 theWaitFor = theClient->stop();118 }
104 theClient->quit();119 theWaitFor = theClient->stop(true);
105 }120 theClient->quit();
106 121 theQuit = true;
107 template<>122}
108 void CommandLineHandler::handle<Run>(ZORBA_TR1_NS::tuple<> &t)123
109 {124template<>
110 theWaitFor = theClient->run();125void
111 }126CommandLineHandler::handle<Run>(ZORBA_TR1_NS::tuple<> &t)
112 127{
113 template<>128 theTerminated = false;
114 void CommandLineHandler::handle<BreakpointSet>(std::tr1::tuple<bstring, bstring, bint> &t)129 theWaitFor = theClient->run();
115 {130}
116 DebuggerClient::BreakpointType lType = DebuggerClient::Line;131
117 bool lEnabled = true;132template<>
118 if (get<0>(t).first) {133void
119 if (get<0>(t).second == "disabled") {134CommandLineHandler::handle<Stop>(ZORBA_TR1_NS::tuple<> &t)
120 lEnabled = false;135{
121 }136 theWaitFor = theClient->stop(false);
122 }137}
123 theWaitFor = theClient->breakpoint_set(lType,138
124 lEnabled,139template<>
125 get<1>(t).second,140void
126 get<2>(t).second);141CommandLineHandler::handle<BreakpointSet>(std::tr1::tuple<bstring, bstring, bint> &aTuple)
127 }142{
128 143 DebuggerClient::BreakpointType lType = DebuggerClient::Line;
129 template<>144 bool lEnabled = true;
130 void CommandLineHandler::handle<BreakpointGet>(tuple<bint> &aTuple)145 if (get<0>(aTuple).first) {
131 {146 if (get<0>(aTuple).second == "disabled") {
132 theWaitFor = theClient->breakpoint_get(get<0>(aTuple).second);147 lEnabled = false;
133 }148 }
134 149 }
135 template<>150 theWaitFor = theClient->breakpoint_set(lType,
136 void CommandLineHandler::handle<BreakpointDel>(tuple<bint> &aTuple)151 lEnabled,
137 {152 get<1>(aTuple).second,
138 theWaitFor = theClient->breakpoint_remove(get<0>(aTuple).second);153 get<2>(aTuple).second);
139 }154}
140 155
141 template<>156template<>
142 void CommandLineHandler::handle<BreakpointList>(tuple<> &t)157void
143 {158CommandLineHandler::handle<BreakpointGet>(tuple<bint> &aTuple)
144 theWaitFor = theClient->breakpoint_list();159{
145 }160 theWaitFor = theClient->breakpoint_get(get<0>(aTuple).second);
146 161}
147 template<>162
148 void CommandLineHandler::handle<StackDepth>(tuple<> &t)163template<>
149 {164void
150 theWaitFor = theClient->stack_depth();165CommandLineHandler::handle<BreakpointRemove>(tuple<bint> &aTuple)
151 }166{
152 167 theWaitFor = theClient->breakpoint_remove(get<0>(aTuple).second);
153 template<>168}
154 void CommandLineHandler::handle<StackGet>(tuple<bint> &aTuple)169
155 {170template<>
156 if (get<0>(aTuple).first) {171void
157 theWaitFor = theClient->stack_get(get<0>(aTuple).second);172CommandLineHandler::handle<BreakpointList>(tuple<> &aTuple)
158 } else {173{
159 theWaitFor = theClient->stack_get();174 theWaitFor = theClient->breakpoint_list();
160 }175}
161 }176
162 177template<>
163 template<>178void
164 void CommandLineHandler::handle<ContextNames>(tuple<>& aTuple)179CommandLineHandler::handle<StackDepth>(tuple<> &aTuple)
165 {180{
166 theWaitFor = theClient->context_names();181 theWaitFor = theClient->stack_depth();
167 }182}
168 183
169 template<>184template<>
170 void CommandLineHandler::handle<ContextGet>(tuple<bint> &aTuple)185void
171 {186CommandLineHandler::handle<StackGet>(tuple<bint> &aTuple)
172 if (get<0>(aTuple).first)187{
173 theWaitFor = theClient->context_get(get<0>(aTuple).second);188 if (get<0>(aTuple).first) {
174 else189 theWaitFor = theClient->stack_get(get<0>(aTuple).second);
175 theWaitFor = theClient->context_get();190 } else {
176 }191 theWaitFor = theClient->stack_get();
177 192 }
178 template<>193}
179 void CommandLineHandler::handle<Eval>(tuple<bstring>& aTuple)194
180 {195template<>
181 theWaitFor = theClient->eval(get<0>(aTuple).second);196void
182 }197CommandLineHandler::handle<ContextNames>(tuple<>& aTuple)
183 198{
184 void CommandLineHandler::addCommands()199 theWaitFor = theClient->context_names();
185 {200}
186 theCommandLine << createCommand<Status>(tuple<>(), "status", *this,201
187 "Gets the status of the server");202template<>
188 theCommandLine << createCommand<Quit>(tuple<>(), "quit", *this,203void CommandLineHandler::handle<ContextGet>(tuple<bint, bint> &aTuple)
189 "Stops debugging and quits the client");204{
190 theCommandLine << createCommand<Run>(tuple<>(), "run", *this, "Run the Query");205 int lDepth = -1;
191 {206 int lContext = -1;
192 Command<CommandLineHandler, tuple<bstring, bstring, bint>, BreakpointSet>* lCommand =207
193 createCommand<BreakpointSet>(tuple<bstring, bstring, bint>(), "break", *this, "Set a breakpoint");208 if (get<0>(aTuple).first) {
194 (*lCommand)(0, "s", createArgType<tuple<bstring, bstring, bint>, std::string, 0>(tuple<bstring, bstring, bint>()),209 lDepth = get<0>(aTuple).second;
195 "breakpoint state (enabled or disabled - default: enabled)", false);210 }
196 (*lCommand)(1, "f", createArgType<tuple<bstring, bstring, bint>, std::string, 1>(tuple<bstring, bstring, bint>()),211 if (get<1>(aTuple).first) {
197 "The name of the file where to stop", true);212 lContext = get<1>(aTuple).second;
198 (*lCommand)(2, "l", createArgType<tuple<bstring, bstring, bint>, int, 2>(tuple<bstring, bstring, bint>()),213 }
199 "The line number", true);214 theWaitFor = theClient->context_get(lDepth, lContext);
200 215}
201 theCommandLine << lCommand;216
202 }217template<>
203 {218void CommandLineHandler::handle<Source>(tuple<bint, bint, bstring> &aTuple)
204 Command<CommandLineHandler, tuple<bint>, BreakpointGet>* lCommand219{
205 = createCommand<BreakpointGet>(tuple<bint>(), "binfo", *this, 220 theWaitFor = theClient->source(
206 "Get information about a given breakpoint");221 get<2>(aTuple).second,
207 (*lCommand)(0, "i", createArgType<tuple<bint>, int, 0>(tuple<bint>()),222 get<0>(aTuple).second,
208 "The id of the breakpoint", true);223 get<1>(aTuple).second);
209 224}
210 theCommandLine << lCommand;225
211 }226template<>
212 {227void CommandLineHandler::handle<Eval>(tuple<bstring>& aTuple)
213 Command<CommandLineHandler, tuple<bint>, BreakpointDel>* lCommand228{
214 = createCommand<BreakpointDel>(tuple<bint>(), "bdel", *this, "Delete a breakpoint with a given id");229 theWaitFor = theClient->eval(get<0>(aTuple).second);
215 (*lCommand)(0, "i", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The id of the breakpoint", true);230}
216 231
217 theCommandLine << lCommand;232template<>
218 }233void
219 theCommandLine << createCommand<BreakpointList>(tuple<>(), "blist", *this, "List all set breakpoints");234CommandLineHandler::handle<StepIn>(ZORBA_TR1_NS::tuple<> &t)
220 theCommandLine << createCommand<StackDepth>(tuple<>(), "sdepth", *this, "Get the depth of the stack");235{
221 {236 theTerminated = false;
222 Command<CommandLineHandler, tuple<bint>, StackGet>* lCommand237 theWaitFor = theClient->step_into();
223 = createCommand<StackGet>(tuple<bint>(), "sget", *this, "Get information about one or all stack frames");238}
224 (*lCommand)(0, "d", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The stack entry two show (show all if not provided)", false);239
225 theCommandLine << lCommand;240template<>
226 }241void
227 theCommandLine << createCommand<ContextNames>(tuple<>(), "cnames", *this, "Get the names of the avilable contexts");242CommandLineHandler::handle<StepOut>(ZORBA_TR1_NS::tuple<> &t)
228 {243{
229 Command<CommandLineHandler, tuple<bint>, ContextGet>* lCommand244 theWaitFor = theClient->step_out();
230 = createCommand<ContextGet>(tuple<bint>(), "cget", *this, "Get a context");245}
231 246
232 (*lCommand)(0, "c", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The id of the context", false);247template<>
233 248void
234 theCommandLine << lCommand;249CommandLineHandler::handle<StepOver>(ZORBA_TR1_NS::tuple<> &t)
235 }250{
236 {251 theTerminated = false;
237 Command<CommandLineHandler, tuple<bstring>, Eval>* lCommand252 theWaitFor = theClient->step_over();
238 = createCommand<Eval>(tuple<bstring>(), "eval", *this, "Evaluate a function");253}
239 254
240 (*lCommand)(0, "c", createArgType<tuple<bstring>, std::string, 0>(tuple<bstring>()), "The command to evaluate", true);255void
241 256CommandLineHandler::addCommands()
242 theCommandLine << lCommand;257{
243 }258 typedef tuple<> TUPLE;
244 }259 typedef tuple<bint> TUPLE_INT;
245 260 typedef tuple<bstring> TUPLE_STR;
246}} // namespace zorba::debugclient261 typedef tuple<bint, bint> TUPLE_INT_INT;
247262 typedef tuple<bstring, bstring, bint> TUPLE_STR_STR_INT;
263 typedef tuple<bint, bint, bstring> TUPLE_INT_INT_STR;
264
265 // DBGP: status
266 *theCommandLine << createCommand<Status>(TUPLE(), "status", *this, "Gets the status of the server");
267
268 // ALIAS: variables (context_get -c -1)
269 {
270 std::set<std::string> lAliases;
271 lAliases.insert("vars");
272 *theCommandLine << createCommand<Variables>(TUPLE(), "variables", lAliases, *this, "Gets the variables visible in the current scope");
273 }
274
275 // META: quit
276 *theCommandLine << createCommand<Quit>(TUPLE(), "quit", *this, "Stops debugging and quits the client");
277
278 // DBGP: run
279 *theCommandLine << createCommand<Run>(TUPLE(), "run", *this, "Run the query");
280
281 // DBGP: stop
282 *theCommandLine << createCommand<Stop>(TUPLE(), "stop", *this, "Stop the query");
283
284 // DBGP: breakpoint_set
285 {
286 std::set<std::string> lAliases;
287 lAliases.insert("break");
288 Command<CommandLineHandler, TUPLE_STR_STR_INT, BreakpointSet>* lCommand =
289 createCommand<BreakpointSet>(TUPLE_STR_STR_INT(), "bset", lAliases, *this, "Set a breakpoint");
290
291 lCommand->addArgument(0, "s", createArgType<TUPLE_STR_STR_INT, std::string, 0>(TUPLE_STR_STR_INT()), "breakpoint state (optional, 'enabled' or 'disabled', default: enabled)", false);
292 lCommand->addArgument(1, "f", createArgType<TUPLE_STR_STR_INT, std::string, 1>(TUPLE_STR_STR_INT()), "name of the file where to stop", true);
293 lCommand->addArgument(2, "l", createArgType<TUPLE_STR_STR_INT, int, 2>(TUPLE_STR_STR_INT()), "line number", true);
294
295 *theCommandLine << lCommand;
296 }
297
298 // DBGP: breakpoint_get
299 {
300 Command<CommandLineHandler, TUPLE_INT, BreakpointGet>* lCommand =
301 createCommand<BreakpointGet>(TUPLE_INT(), "bget", *this, "Get information about a given breakpoint");
302
303 lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "breakpoint ID", true);
304
305 *theCommandLine << lCommand;
306 }
307
308 // DBGP: breakpoint_remove
309 {
310 std::set<std::string> lAliases;
311 lAliases.insert("clear");
312 lAliases.insert("delete");
313 Command<CommandLineHandler, TUPLE_INT, BreakpointRemove>* lCommand =
314 createCommand<BreakpointRemove>(TUPLE_INT(), "bremove", lAliases, *this, "Delete a breakpoint");
315
316 lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "breakpoint ID", true);
317
318 *theCommandLine << lCommand;
319 }
320
321 // DBGP: breakpoint_list
322 *theCommandLine << createCommand<BreakpointList>(TUPLE(), "blist", *this, "List all set breakpoints");
323
324 // DBGP: stack_depth
325 *theCommandLine << createCommand<StackDepth>(TUPLE(), "sdepth", *this, "Get the depth of the stack");
326
327 // DBGP: stack_get
328 {
329 Command<CommandLineHandler, TUPLE_INT, StackGet>* lCommand =
330 createCommand<StackGet>(TUPLE_INT(), "sget", *this, "Get information about one or all stack frames");
331
332 lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "stack frame to show: 0 for current stack frame, N for the main module (optional, all frames are shown if not provided)", false);
333
334 *theCommandLine << lCommand;
335 }
336
337 // DBGP: context_names
338 *theCommandLine << createCommand<ContextNames>(tuple<>(), "cnames", *this, "Get the names of the avilable contexts");
339 // the DBGP -d arguments for this command is omitted since we always have/return: 0 - Local, 1 - Global
340
341 // DBGP: context_get
342 {
343 Command<CommandLineHandler, TUPLE_INT_INT, ContextGet>* lCommand =
344 createCommand<ContextGet>(TUPLE_INT_INT(), "cget", *this, "Get a context (list variables in this context)");
345
346 lCommand->addArgument(0, "d", createArgType<TUPLE_INT_INT, int, 0>(TUPLE_INT_INT()), "stack depth (optional, default: 0)", false);
347 lCommand->addArgument(0, "c", createArgType<TUPLE_INT_INT, int, 1>(TUPLE_INT_INT()), "context ID: 0 for Local, 1 for Global (optional, default: 0)", false);
348
349 *theCommandLine << lCommand;
350 }
351
352 // DBGP: source
353 {
354 std::set<std::string> lAliases;
355 lAliases.insert("list");
356 Command<CommandLineHandler, TUPLE_INT_INT_STR, Source>* lCommand =
357 createCommand<Source>(TUPLE_INT_INT_STR(), "source", lAliases, *this, "List source code");
358
359 lCommand->addArgument(0, "b", createArgType<TUPLE_INT_INT_STR, int, 0>(TUPLE_INT_INT_STR()), "begin line (optional, default: first line)", false);
360 lCommand->addArgument(1, "e", createArgType<TUPLE_INT_INT_STR, int, 1>(TUPLE_INT_INT_STR()), "end line (optional, default: last line)", false);
361 lCommand->addArgument(2, "f", createArgType<TUPLE_INT_INT_STR, std::string, 2>(TUPLE_INT_INT_STR()), "file URI (optional, default: the file in the top-most stack frame during execution, main module otherwise)", false);
362
363 *theCommandLine << lCommand;
364 }
365
366 // DBGP: eval
367 {
368 std::set<std::string> lAliases;
369 lAliases.insert("print");
370 Command<CommandLineHandler, TUPLE_STR, Eval>* lCommand =
371 createCommand<Eval>(TUPLE_STR(), "eval", lAliases, *this, "Evaluate an expression");
372
373 // TODO: this argument should not be here at all. Eval has the form: eval -i transaction_id -- {DATA}
374 // Eval should be called with a command like: eval 1 + 3
375 // - no need for an argument name
376 // - everything following the fist contiguous set of whitespaces are sent as string
377 lCommand->addArgument(0, "c", createArgType<TUPLE_STR, std::string, 0>(TUPLE_STR()), "expression to evaluate", true);
378
379 *theCommandLine << lCommand;
380 }
381
382 // DBGP: step_in
383 {
384 std::set<std::string> lAliases;
385 lAliases.insert("step");
386 lAliases.insert("s");
387 *theCommandLine << createCommand<StepIn>(TUPLE(), "in", lAliases, *this, "Step in");
388 }
389
390 // DBGP: step_out
391 {
392 std::set<std::string> lAliases;
393 lAliases.insert("finish");
394 *theCommandLine << createCommand<StepOut>(TUPLE(), "out", lAliases, *this, "Step out");
395 }
396
397 // DBGP: step_over
398 {
399 std::set<std::string> lAliases;
400 lAliases.insert("next");
401 lAliases.insert("n");
402 *theCommandLine << createCommand<StepOver>(TUPLE(), "over", lAliases, *this, "Step over");
403 }
404}
405
406} // namespace zorba
407} // namespace debugger
248408
=== modified file 'bin/debugger/command_line_handler.h'
--- bin/debug_client/command_line_handler.h 2011-07-01 01:53:24 +0000
+++ bin/debugger/command_line_handler.h 2012-01-27 05:33:27 +0000
@@ -14,46 +14,71 @@
14 * limitations under the License.14 * limitations under the License.
15 */15 */
16#pragma once16#pragma once
17#ifndef ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
18#define ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
1719
18#include <set>20#include <set>
19#include <cassert>21#include <cassert>
22
20#include <zorba/debugger_client.h>23#include <zorba/debugger_client.h>
21#include "debug_command.h"24
25#include "command.h"
22#include "event_handler.h"26#include "event_handler.h"
2327
24namespace zorba { namespace debugclient {28
25 29namespace zorba { namespace debugger {
30
31 class CommandPrompt;
32
26 enum Commands {33 enum Commands {
27 Status,34 Status,
35 Variables,
36 Quit,
28 Run,37 Run,
38 Stop,
29 BreakpointSet,39 BreakpointSet,
30 BreakpointGet,40 BreakpointGet,
31 BreakpointDel,41 BreakpointRemove,
32 BreakpointList,42 BreakpointList,
33 StackDepth,43 StackDepth,
34 StackGet,44 StackGet,
35 ContextNames,45 ContextNames,
36 ContextGet,46 ContextGet,
47 Source,
37 Eval,48 Eval,
38 Quit49 StepIn,
50 StepOut,
51 StepOver
39 };52 };
40 53
41 class CommandLineHandler {54class CommandLineHandler
55{
42 private:56 private:
57
43 typedef std::pair<bool, std::string> bstring;58 typedef std::pair<bool, std::string> bstring;
44 typedef std::pair<bool, int> bint;59 typedef std::pair<bool, int> bint;
60
45 public:61 public:
46 CommandLineHandler(unsigned short port,62
47 LockFreeConsumer<std::size_t>& aConsumer,63 CommandLineHandler(
48 LockFreeConsumer<bool>& aContinueQueue,64 unsigned short port,
49 EventHandler& aHandler,65 LockFreeConsumer<std::size_t>& aConsumer,
50 CommandLine& aCommandLine);66 LockFreeConsumer<bool>& aContinueQueue,
67 EventHandler* aHandler,
68 CommandPrompt* aCommandPrompt);
69
51 ~CommandLineHandler();70 ~CommandLineHandler();
71
52 public:72 public:
53 void execute();73 void execute();
74
54 public: // Handlers75 public: // Handlers
76
55 template<int>77 template<int>
56 void handle(ZORBA_TR1_NS::tuple<>& aTuple) { assert(false); }78 void handle(ZORBA_TR1_NS::tuple<>& aTuple)
79 {
80 assert(false);
81 }
57 82
58 template<int>83 template<int>
59 void handle(ZORBA_TR1_NS::tuple<bstring, bstring, bint>& t)84 void handle(ZORBA_TR1_NS::tuple<bstring, bstring, bint>& t)
@@ -62,63 +87,96 @@
62 }87 }
63 88
64 template<int>89 template<int>
90 void handle(ZORBA_TR1_NS::tuple<bint, bint, bstring>& t)
91 {
92 assert(false);
93 }
94
95 template<int>
65 void handle(ZORBA_TR1_NS::tuple<bint>& aTuple)96 void handle(ZORBA_TR1_NS::tuple<bint>& aTuple)
66 {97 {
67 assert(false);98 assert(false);
68 }99 }
69 100
70 template<int>101 template<int>
102 void handle(ZORBA_TR1_NS::tuple<bint, bint>& aTuple)
103 {
104 assert(false);
105 }
106
107 template<int>
71 void handle(ZORBA_TR1_NS::tuple<bstring>& aTuple)108 void handle(ZORBA_TR1_NS::tuple<bstring>& aTuple)
72 {109 {
73 assert(false);110 assert(false);
74 }111 }
112
75 private:113 private:
76 LockFreeConsumer<std::size_t>& theConsumer;114 LockFreeConsumer<std::size_t>& theConsumer;
77 LockFreeConsumer<bool>& theContinueQueue;115 LockFreeConsumer<bool>& theContinueQueue;
78 DebuggerClient* theClient;116 DebuggerClient* theClient;
79 CommandLine& theCommandLine;117 CommandPrompt* theCommandLine;
80 bool theQuit;118 bool theQuit;
81 bool theContinue;119 bool theTerminated;
82 std::size_t theWaitFor;120 bool theContinue;
121 std::size_t theWaitFor;
122
83 private:123 private:
84 void getNextId(std::set<std::size_t>& aIdList);124 void getNextId(std::set<std::size_t>& aIdList);
85 void addCommands();125 void addCommands();
86 };126};
87 127
88 template<>128template<>
89 void CommandLineHandler::handle<Status> (ZORBA_TR1_NS::tuple<>& t);129void CommandLineHandler::handle<Status> (ZORBA_TR1_NS::tuple<>& t);
90 130
91 template<>131template<>
92 void CommandLineHandler::handle<Quit> (ZORBA_TR1_NS::tuple<>& t);132void CommandLineHandler::handle<Quit> (ZORBA_TR1_NS::tuple<>& t);
93 133
94 template<>134template<>
95 void CommandLineHandler::handle<Run> (ZORBA_TR1_NS::tuple<> &t);135void CommandLineHandler::handle<Run> (ZORBA_TR1_NS::tuple<> &t);
96 136
97 template<>137template<>
98 void CommandLineHandler::handle<StackDepth> (ZORBA_TR1_NS::tuple<>& t);138void CommandLineHandler::handle<Stop> (ZORBA_TR1_NS::tuple<> &t);
99 139
100 template<>140template<>
101 void CommandLineHandler::handle<BreakpointList> (ZORBA_TR1_NS::tuple<>& aTuple);141void CommandLineHandler::handle<StackDepth> (ZORBA_TR1_NS::tuple<>& t);
102 142
103 template<>143template<>
104 void CommandLineHandler::handle<BreakpointSet> (ZORBA_TR1_NS::tuple<bstring, bstring, bint> &t);144void CommandLineHandler::handle<BreakpointList> (ZORBA_TR1_NS::tuple<>& aTuple);
105 145
106 template<>146template<>
107 void CommandLineHandler::handle<BreakpointGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);147void CommandLineHandler::handle<BreakpointSet> (ZORBA_TR1_NS::tuple<bstring, bstring, bint> &t);
108 148
109 template<>149template<>
110 void CommandLineHandler::handle<BreakpointDel>(ZORBA_TR1_NS::tuple<bint> &aTuple);150void CommandLineHandler::handle<BreakpointGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
111 151
112 template<>152template<>
113 void CommandLineHandler::handle<StackGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);153void CommandLineHandler::handle<BreakpointRemove>(ZORBA_TR1_NS::tuple<bint> &aTuple);
114 154
115 template<>155template<>
116 void CommandLineHandler::handle<ContextNames>(ZORBA_TR1_NS::tuple<> &aTuple);156void CommandLineHandler::handle<StackGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
117 157
118 template<>158template<>
119 void CommandLineHandler::handle<ContextGet>(ZORBA_TR1_NS::tuple<bint> &aTuple);159void CommandLineHandler::handle<ContextNames>(ZORBA_TR1_NS::tuple<> &aTuple);
120 160
121 template<>161template<>
122 void CommandLineHandler::handle<Eval>(ZORBA_TR1_NS::tuple<bstring>& aTuple);162void CommandLineHandler::handle<ContextGet>(ZORBA_TR1_NS::tuple<bint, bint> &aTuple);
123 163
124}} // close namespaces zorba::debugclient164template<>
165void CommandLineHandler::handle<Source>(ZORBA_TR1_NS::tuple<bint, bint, bstring> &aTuple);
166
167template<>
168void CommandLineHandler::handle<Eval>(ZORBA_TR1_NS::tuple<bstring>& aTuple);
169
170template<>
171void CommandLineHandler::handle<StepIn> (ZORBA_TR1_NS::tuple<> &t);
172
173template<>
174void CommandLineHandler::handle<StepOut> (ZORBA_TR1_NS::tuple<> &t);
175
176template<>
177void CommandLineHandler::handle<StepOver> (ZORBA_TR1_NS::tuple<> &t);
178
179} // namespace zorba
180} // namespace debugger
181
182#endif // ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
125183
=== added file 'bin/debugger/command_prompt.cpp'
--- bin/debugger/command_prompt.cpp 1970-01-01 00:00:00 +0000
+++ bin/debugger/command_prompt.cpp 2012-01-27 05:33:27 +0000
@@ -0,0 +1,287 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include "command_prompt.h"
17
18#include <string>
19#include <vector>
20#include <map>
21#include <iostream>
22
23#include "command.h"
24
25
26namespace zorba { namespace debugger {
27
28#ifdef ZORBA_HAVE_LIBEDIT_H
29const char*
30prompt(EditLine* aEl) {
31 return "(xqdb) ";
32}
33#endif
34
35CommandPrompt::CommandPrompt()
36{
37#ifdef ZORBA_HAVE_LIBEDIT_H
38 theEditLine = el_init("xqdb", stdin, stdout, stderr);
39 theHistory = history_init();
40 HistEvent lHistoryEvent;
41 history(theHistory, &lHistoryEvent, H_SETSIZE, 100);
42
43 el_set(theEditLine, EL_PROMPT, prompt);
44
45 el_set(theEditLine, EL_HIST, history, theHistory);
46 el_set(theEditLine, EL_EDITOR, "emacs");
47#endif
48}
49
50CommandPrompt::~CommandPrompt()
51{
52#ifdef ZORBA_HAVE_LIBEDIT_H
53 history_end(theHistory);
54 el_end(theEditLine);
55#endif
56
57 std::map<std::string, UntypedCommand*>::iterator lIter;
58 for (lIter = theCommands.begin(); lIter != theCommands.end(); ++lIter) {
59 delete lIter->second;
60 }
61}
62
63void
64CommandPrompt::printHelp(UntypedCommand* aCommand)
65{
66 // if no command is provided, print all the available commands
67 if (!aCommand) {
68 std::cout << "Available commands:" << std::endl;
69
70 // print the names of all commands
71 std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.begin();
72 while (lIter != theCommands.end()) {
73 std::cout << " " << (*lIter).first;
74 std::set<std::string> lAliases = (*lIter).second->getAliases();
75 std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
76 while (lAliasIter != lAliases.end()) {
77 std::cout << ", " << *lAliasIter;
78 lAliasIter++;
79 }
80 std::cout << std::endl;
81 lIter++;
82 }
83
84 // some hints for detailed help
85 std::cout << std::endl;
86 std::cout << "Type help <command> to get more information about one command." << std::endl;
87 std::cout << std::endl;
88 } else {
89 // ok, so we have a command; then print the help
90 aCommand->printHelp();
91 }
92}
93
94void
95CommandPrompt::execute()
96{
97 bool lWithOutput = true;
98
99 for (;;) {
100#ifdef ZORBA_HAVE_LIBEDIT_H
101 const char* lBuf;
102 int lCharsRead = -1;
103 lBuf = el_gets(theEditLine, &lCharsRead);
104 std::string lCommandLine(lBuf, lCharsRead - 1);
105#else
106 if (lWithOutput) {
107 std::cout << "(xqdb) ";
108 }
109 lWithOutput = true;
110 std::string lCommandLine;
111 std::getline(std::cin, lCommandLine);
112 if (std::cin.fail()) {
113 lWithOutput = false;
114 std::cin.clear();
115 continue;
116 }
117#endif
118
119 std::vector<std::string> lArgs;
120
121 // split the command into arguments
122 parseLine(lCommandLine, lArgs);
123 std::string::size_type lSize = lArgs.size();
124
125 // empty command? do nothing!
126 if (lSize == 0) {
127 lArgs = theLastArgs;
128 if (lArgs.size() == 0) {
129 continue;
130 }
131 }
132#ifdef ZORBA_HAVE_LIBEDIT_H
133 else {
134 HistEvent lHistoryEvent;
135 history(theHistory, &lHistoryEvent, H_ENTER, lCommandLine.c_str());
136 }
137#endif
138 theLastArgs = lArgs;
139
140 UntypedCommand* lCommand = NULL;
141
142 // help is not a command but a hook here
143 if (lArgs.at(0) == "h" || lArgs.at(0) == "help") {
144 std::string lCmd = "";
145
146 // if the user needs the help for a specific command
147 if (lSize > 1) {
148 // do nothing if we don't have a command starting with this prefix?
149 // findCommand will print the appropriate errors
150 if (!findCommand(lArgs[1], lCommand)) {
151 continue;
152 }
153 }
154 printHelp(lCommand);
155 continue;
156 }
157 if (findCommand(lArgs[0], lCommand) && lCommand->execute(lArgs)) {
158 return;
159 }
160 continue;
161 }
162}
163
164CommandPrompt&
165CommandPrompt::operator<<(UntypedCommand *aCommand)
166{
167 theCommands.insert(std::make_pair(aCommand->getName(), aCommand));
168 return *this;
169}
170
171bool
172CommandPrompt::findCommand(const std::string& aPrefix, UntypedCommand*& aCommand)
173{
174 std::vector<UntypedCommand*> lFoundCommands;
175
176 std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.begin();
177 while (lIter != theCommands.end()) {
178 // if a command name is equal with the prefix, this is the command we want
179 if ((*lIter).first == aPrefix) {
180 aCommand = (*lIter).second;
181 return true;
182 }
183
184 bool lIsCandidate = false;
185
186 // add this command to candidate commands if the prefix matches
187 if ((*lIter).first.find(aPrefix) == 0) {
188 lFoundCommands.push_back((*lIter).second);
189 lIsCandidate = true;
190 }
191
192 // now process the aliases
193 std::set<std::string> lAliases = (*lIter).second->getAliases();
194 std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
195 while (lAliasIter != lAliases.end()) {
196 // if a command alias is equal with the prefix, this is the command we want
197 if (*lAliasIter == aPrefix) {
198 aCommand = (*lIter).second;
199 return true;
200 }
201
202 // add this command to candidate commands if the prefix matches one alias
203 // and if the command is not already added
204 if (!lIsCandidate && (*lAliasIter).find(aPrefix) == 0) {
205 lFoundCommands.push_back((*lIter).second);
206 break;
207 }
208 lAliasIter++;
209 }
210
211 lIter++;
212 }
213
214 if (lFoundCommands.empty()) {
215 std::cout << "Command not found: " << aPrefix << std::endl;
216 return false;
217 }
218
219 if (lFoundCommands.size() > 1) {
220 std::cout << "Ambigous command: " << aPrefix << std::endl;
221 // show all possible commands that start with this prefix
222 for (std::string::size_type i = 0; i < lFoundCommands.size(); i++) {
223 UntypedCommand* lCommand = lFoundCommands.at(i);
224
225 // commands
226 if (lCommand->getName().find(aPrefix) == 0) {
227 std::cout << " " << lCommand->getName() << std::endl;
228 }
229
230 // and aliases
231 std::set<std::string> lAliases = lCommand->getAliases();
232 std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
233 while (lAliasIter != lAliases.end()) {
234 if ((*lAliasIter).find(aPrefix) == 0) {
235 std::cout << " " << *lAliasIter << std::endl;
236 }
237 lAliasIter++;
238 }
239 }
240 return false;
241 }
242
243 aCommand = lFoundCommands[0];
244 return true;
245}
246
247void
248CommandPrompt::parseLine(const std::string& aLine, std::vector<std::string>& aVector)
249{
250 std::string::size_type lBefore = 0;
251 std::string::size_type lPos = aLine.find_first_of(" \t", 0);
252
253 while (lPos != aLine.npos) {
254 std::string lSub = aLine.substr(lBefore, lPos - lBefore);
255
256 // if two consecutive spaces, you get an empty string here
257 if (lSub != "") {
258 if (lSub[0] == '"') {
259 std::string::size_type lBeforeCopy = lBefore;
260 do {
261 lBeforeCopy = aLine.find("\"", lBeforeCopy + 1);
262 } while (lPos != aLine.npos && aLine.size() > lPos + 1 && aLine[lPos + 1] == '\\');
263 lPos = lBeforeCopy;
264 lSub = aLine.substr(lBefore + 1, lPos - lBefore - 1);
265 }
266 aVector.push_back(lSub);
267 }
268
269 lBefore = lPos + 1;
270 lPos = aLine.find_first_of(" \t", lBefore);
271 }
272 std::string lSub = aLine.substr(lBefore);
273
274 // catching the case when the command ends with a space
275 if (lSub == "") {
276 return;
277 }
278
279 if (lSub[0] == '"') {
280 lPos = aLine.find("\"", lBefore + 1);
281 lSub = aLine.substr(lBefore + 1, lPos - lBefore - 1);
282 }
283 aVector.push_back(lSub);
284}
285
286} // namespace zorba
287} // namespace debugger
0288
=== added file 'bin/debugger/command_prompt.h'
--- bin/debugger/command_prompt.h 1970-01-01 00:00:00 +0000
+++ bin/debugger/command_prompt.h 2012-01-27 05:33:27 +0000
@@ -0,0 +1,72 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17#ifndef ZORBA_DEBUGGER_COMMAND_PROMPT_H
18#define ZORBA_DEBUGGER_COMMAND_PROMPT_H
19
20#include <string>
21#include <map>
22#include <vector>
23
24#include "config.h"
25
26#ifdef ZORBA_HAVE_LIBEDIT_H
27# include <histedit.h>
28#endif
29
30
31namespace zorba { namespace debugger {
32
33class UntypedCommand;
34
35class CommandPrompt
36{
37 public:
38 CommandPrompt();
39 ~CommandPrompt();
40
41 public:
42
43 void execute();
44
45 CommandPrompt& operator<< (UntypedCommand* command);
46
47 private:
48
49 void
50 printHelp(UntypedCommand* command);
51
52 bool
53 findCommand(const std::string& prefix, UntypedCommand*& command);
54
55 void
56 parseLine(const std::string& line, std::vector<std::string>& vector);
57
58 private:
59 std::map<std::string, UntypedCommand*> theCommands;
60 std::vector<std::string> theLastArgs;
61
62#ifdef ZORBA_HAVE_LIBEDIT_H
63 EditLine* theEditLine;
64 History* theHistory;
65#endif
66};
67
68
69} // namespace zorba
70} // namespace debugger
71
72#endif // ZORBA_DEBUGGER_COMMAND_PROMPT_H
073
=== added file 'bin/debugger/config.h.cmake'
--- bin/debugger/config.h.cmake 1970-01-01 00:00:00 +0000
+++ bin/debugger/config.h.cmake 2012-01-27 05:33:27 +0000
@@ -0,0 +1,24 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// This header is configured by Zorba's build process -- DO NOT EDIT!
18
19#ifndef ZORBA_DEBUGGER_CONFIG_H
20#define ZORBA_DEBUGGER_CONFIG_H
21
22#cmakedefine ZORBA_HAVE_LIBEDIT_H
23
24#endif /* ZORBA_DEBUGGER_CONFIG_H */
025
=== modified file 'bin/debugger/event_handler.cpp'
--- bin/debug_client/event_handler.cpp 2011-07-01 01:53:24 +0000
+++ bin/debugger/event_handler.cpp 2012-01-27 05:33:27 +0000
@@ -13,88 +13,93 @@
13 * See the License for the specific language governing permissions and13 * See the License for the specific language governing permissions and
14 * limitations under the License.14 * limitations under the License.
15 */15 */
16
17#include "event_handler.h"
18
19#include <sstream>
20
16#include <zorba/zorba.h>21#include <zorba/zorba.h>
17#include <zorba/store_manager.h>22#include <zorba/store_manager.h>
18#include <zorba/iterator.h>23#include <zorba/iterator.h>
19#include <sstream>
20#include "debug_client/event_handler.h"
2124
22namespace zorba { namespace debugclient {25namespace zorba { namespace debugger {
23 26
24 EventHandler::EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContProducer)27EventHandler::EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContProducer)
25 : theIdQueue(aQueue), theContinueProducer(aContProducer),28 : theIdQueue(aQueue), theContinueProducer(aContProducer),
26 theStore(StoreManager::getStore()),29 theStore(StoreManager::getStore()),
27 theZorbaInstance(Zorba::getInstance(theStore)),30 theZorbaInstance(Zorba::getInstance(theStore)),
28 theStaticContext(theZorbaInstance->createStaticContext())31 theStaticContext(theZorbaInstance->createStaticContext())
29 32{
30 {33}
31 try {34
32 Zorba_CompilerHints_t lHints;35EventHandler::~EventHandler()
33 lHints.opt_level = ZORBA_OPT_LEVEL_O1;36{
34 std::auto_ptr<std::istream> stream(getCurrentDirectory());37 theStaticContext = 0;
35 zorba::String query;38 theZorbaInstance->shutdown();
36 char buffer[1024];39 StoreManager::shutdownStore(theStore);
37 std::string::size_type s;40}
38 while ((s = stream->readsome(buffer, 1024))) {41
39 query.append(std::string(buffer, s));42void
40 }43EventHandler::init()
41 theStaticContext->loadProlog(query, lHints);44{
42 } catch (zorba::ZorbaException& e) {45 try {
43 std::cerr << "Exception: I was not able to load the query file:" << std::endl;46 Zorba_CompilerHints_t lHints;
44 std::cerr << e.what() << std::endl;47 lHints.opt_level = ZORBA_OPT_LEVEL_O1;
45 throw;48 zorba::String lProlog("import module namespace dmh = 'http://www.zorba-xquery.com/modules/debugger/dbgp-message-handler';");
46 }49 theStaticContext->loadProlog(lProlog, lHints);
47 }50 } catch (zorba::ZorbaException& e) {
48 51 std::cerr << "Exception: I was not able to load the query file:" << std::endl;
49 EventHandler::~EventHandler()52 std::cerr << e.what() << std::endl;
50 {53 throw;
51 theStaticContext = 0;54 }
52 theZorbaInstance->shutdown();55}
53 StoreManager::shutdownStore(theStore);56
54 }57void
55 58EventHandler::parseMessage(const std::string &aMessage)
56 void EventHandler::parseMessage(const std::string &aMessage)59{
57 {60 try {
58 try {61#ifndef NDEBUG
59 zorba::String queryString = "local:main(";62 // uncomment this to see the raw messages received by the event handler
60 queryString += aMessage + ")";63 //std::cout << "Processing response: " << aMessage << std::endl;
61 XQuery_t query = theZorbaInstance->compileQuery(queryString, theStaticContext);64#endif
62 Iterator_t lIter = query->iterator();65 // the query to process the response
63 Item item;66 std::stringstream lQueryStream;
64 lIter->open();67 lQueryStream << "dmh:process(" << aMessage << ")";
65 bool doContinue = false;68 XQuery_t lQuery = theZorbaInstance->compileQuery(lQueryStream.str(), theStaticContext);
66 lIter->next(item);69
67 {70 // get the query result sequrence:
68 const std::string& continueString = item.getStringValue().str();71 // 1. a message
69 if (continueString == "true") {72 Iterator_t lIter = lQuery->iterator();
70 doContinue = true;73 Item lItem;
71 } else if (continueString == "false") {74 lIter->open();
72 doContinue = false;75 lIter->next(lItem);
73 } else {76 std::size_t lId;
74 std::stringstream stream(continueString);77 std::stringstream lStream(lItem.getStringValue().c_str());
75 stream >> doContinue;78 lStream >> lId;
76 }79
77 }80 // 2. an "idle" flag (to disable quit confirmation)
78 lIter->next(item);81 bool lCanQuit = false;
79 std::size_t lId;82 if (lIter->next(lItem)) {
80 {83 String lMessage = lItem.getStringValue();
81 std::stringstream stream(item.getStringValue().c_str());84 lCanQuit = lMessage == "idle";
82 stream >> lId;85 std::cout << std::endl << lItem.getStringValue() << std::endl;
83 }86 }
84 lIter->next(item);87 theContinueProducer.produce(lCanQuit);
85 std::cout << item.getStringValue() << std::endl;88
86 theContinueProducer.produce(doContinue);89 // go and solve the event with this id
87 theIdQueue.produce(lId);90 theIdQueue.produce(lId);
88 } catch (ZorbaException& e) {91 } catch (ZorbaException& e) {
89 std::cerr << "FATAL: could not execute query: " << std::endl;92 std::cerr << "FATAL: could not execute query: " << std::endl;
90 std::cerr << e << std::endl;93 std::cerr << e << std::endl;
91 std::cerr << "This is a bug, please report to zorba-users@lists.sourceforge.net" << std::endl;94 std::cerr << "This is a bug, please report it at http://bugs.launchpad.net/zorba" << std::endl;
92 theContinueProducer.produce(false);95 }
93 }96}
94 }97
95 98void
96 void EventHandler::error(unsigned int errcode, const std::string &msg)99EventHandler::error(unsigned int errcode, const std::string &msg)
97 {100{
98 std::cerr << "Error " << errcode << ": " << msg << std::endl;101 std::cerr << "Error " << errcode << ": " << msg << std::endl;
99 }102}
100}}103
104} // namespace zorba
105} // namespace debugger
101106
=== modified file 'bin/debugger/event_handler.h'
--- bin/debug_client/event_handler.h 2011-07-01 01:53:24 +0000
+++ bin/debugger/event_handler.h 2012-01-27 05:33:27 +0000
@@ -14,33 +14,46 @@
14 * limitations under the License.14 * limitations under the License.
15 */15 */
16#pragma once16#pragma once
17#ifndef ZORBA_DEBUGGER_EVENT_HANDLER_H
18#define ZORBA_DEBUGGER_EVENT_HANDLER_H
19
17#include <string>20#include <string>
18#include <iostream>21#include <iostream>
22
19#include <zorba/debugger_event_handler.h>23#include <zorba/debugger_event_handler.h>
20#include <zorba/static_context.h>24#include <zorba/static_context.h>
25
21#include "lock_free_queue.h"26#include "lock_free_queue.h"
2227
23namespace zorba {28
24 class Zorba;29namespace zorba { namespace debugger {
25}30
2631class EventHandler : public zorba::DebuggerEventHandler
27namespace zorba { namespace debugclient {32{
28
29 class EventHandler : public zorba::DebuggerEventHandler
30 {
31 public:33 public:
32 EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContQueue);34 EventHandler(
35 LockFreeProducer<std::size_t>& aQueue,
36 LockFreeProducer<bool>& aContQueue);
37
33 ~EventHandler();38 ~EventHandler();
39
34 public:40 public:
35 virtual void parseMessage(const std::string& aMessage);41 virtual void parseMessage(const std::string& aMessage);
42
36 virtual void error(unsigned int errcode, const std::string& msg);43 virtual void error(unsigned int errcode, const std::string& msg);
44
45 virtual void init();
46
37 private:47 private:
38 static std::istream* getCurrentDirectory();
39 LockFreeProducer<std::size_t>& theIdQueue;48 LockFreeProducer<std::size_t>& theIdQueue;
40 LockFreeProducer<bool>& theContinueProducer;49 LockFreeProducer<bool>& theContinueProducer;
41 void* theStore;50 void* theStore;
42 Zorba* theZorbaInstance;51 Zorba* theZorbaInstance;
43 StaticContext_t theStaticContext;52 StaticContext_t theStaticContext;
44 };53
54};
45 55
46}} // end of namespace zorba::debugclient56} // namespace zorba
57} // namespace debugger
58
59#endif // ZORBA_DEBUGGER_EVENT_HANDLER_H
4760
=== modified file 'bin/debugger/lock_free_queue.h'
--- bin/debug_client/lock_free_queue.h 2011-07-01 01:53:24 +0000
+++ bin/debugger/lock_free_queue.h 2012-01-27 05:33:27 +0000
@@ -14,10 +14,14 @@
14 * limitations under the License.14 * limitations under the License.
15 */15 */
16#pragma once16#pragma once
17#ifndef ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
18#define ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
19
17#include <iostream>20#include <iostream>
18#include <list>21#include <list>
1922
20namespace zorba { namespace debugclient {23
24namespace zorba { namespace debugger {
2125
22template<typename T>26template<typename T>
23class LockFreeProducer27class LockFreeProducer
@@ -80,4 +84,8 @@
80 }84 }
81 return false;85 return false;
82}86}
83}} // namespace zorba::debugclient87
88} // namespace zorba
89} // namespace debugger
90
91#endif // ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
8492
=== modified file 'bin/debugger/main.cpp'
--- bin/debug_client/main.cpp 2011-07-01 01:53:24 +0000
+++ bin/debugger/main.cpp 2012-01-27 05:33:27 +0000
@@ -13,12 +13,286 @@
13 * See the License for the specific language governing permissions and13 * See the License for the specific language governing permissions and
14 * limitations under the License.14 * limitations under the License.
15 */15 */
16
17#ifdef WIN32
18# include <windows.h>
19# include <string.h>
20# include <strsafe.h>
21#endif
22
23#include <vector>
24
16#include <zorba/config.h>25#include <zorba/config.h>
17#include "debug_command.h"26
18#include "command_line_handler.h"27#include "xqdb_client.h"
28#include "process_listener.h"
29
1930
20using namespace zorba;31using namespace zorba;
21using namespace zorba::debugclient;32using namespace zorba::debugger;
33
34
35std::auto_ptr<XqdbClient> theClient;
36
37// this will make sure the xqdb process will not quit when Ctrl-C is pressed
38#ifdef WIN32
39BOOL WINAPI
40ctrlC_Handler(DWORD aCtrlType)
41{
42 if (CTRL_C_EVENT == aCtrlType) {
43 return true;
44 }
45 return false;
46}
47#else
48void
49ctrlC_Handler(int lParam)
50{
51 // an empty sugnal handler on Linux should do the job
52}
53#endif
54
55
56// this handler function is passed the the zorba process listener and will
57// the client if the zorba process terminates
58void
59onExitProcess(ExitCode aExitCode) {
60 std::cout << std::endl << "Terminating debugger client." << std::endl;
61
62#ifndef WIN32
63 XqdbClient* lClient = theClient.release();
64 if (lClient) {
65 delete lClient;
66 }
67#endif
68
69 exit(aExitCode);
70}
71
72
73int
74startZorba(std::string& aExec, std::vector<std::string>& aArgs, std::auto_ptr<ProcessListener>& aProcessListener)
75{
76#ifdef WIN32
77 // **************************
78 // start a process on Windows
79
80 DWORD iReturnVal = 0;
81
82 std::wstring lExec;
83 std::wstring lArgs;
84
85 lExec.assign(aExec.begin(), aExec.end());
86
87 // the executable must be the first in the list of arguments
88 lArgs.append(L"\"");
89 lArgs.append(lExec);
90 lArgs.append(L"\"");
91
92 for (std::vector<std::string>::size_type j = 0; j < aArgs.size(); j++) {
93 std::string lArg(aArgs.at(j));
94 std::wstring lArgW;
95 lArgW.assign(lArg.begin(), lArg.end());
96 lArgs.append(L" ");
97 lArgs.append(lArgW);
98 }
99
100 // CreateProcessW can modify Parameters thus we allocate needed memory
101 wchar_t * pwszParam = new wchar_t[lArgs.size() + 1];
102 if (pwszParam == 0) {
103 return 1;
104 }
105 const wchar_t* pchrTemp = lArgs.c_str();
106 wcscpy_s(pwszParam, lArgs.size() + 1, pchrTemp);
107
108 // CreateProcess API initialization
109 STARTUPINFOW siStartupInfo;
110 PROCESS_INFORMATION piProcessInfo;
111 memset(&siStartupInfo, 0, sizeof(siStartupInfo));
112 memset(&piProcessInfo, 0, sizeof(piProcessInfo));
113 siStartupInfo.cb = sizeof(siStartupInfo);
114
115 BOOL lResult = CreateProcessW(
116 const_cast<LPCWSTR>(lExec.c_str()),
117 pwszParam, 0, 0, false,
118 CREATE_DEFAULT_ERROR_MODE, 0, 0,
119 &siStartupInfo, &piProcessInfo);
120
121 if (lResult) {
122 // Watch the process
123 aProcessListener.reset(new ProcessListener(piProcessInfo.dwProcessId, &onExitProcess));
124 }
125 else {
126 // CreateProcess failed
127 iReturnVal = GetLastError();
128 LPVOID lpMsgBuf;
129 LPVOID lpDisplayBuf;
130
131 FormatMessage(
132 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
133 NULL,
134 iReturnVal,
135 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
136 (LPTSTR) &lpMsgBuf,
137 0, NULL);
138
139 // Display the error message and exit the process
140
141 lpDisplayBuf = (LPVOID)LocalAlloc(
142 LMEM_ZEROINIT,
143 (lstrlen((LPCTSTR)lpMsgBuf) + 40) * sizeof(TCHAR));
144
145 StringCchPrintf(
146 (LPTSTR)lpDisplayBuf,
147 LocalSize(lpDisplayBuf) / sizeof(TCHAR),
148 TEXT("Error (%d) when starting zorba: %s"),
149 iReturnVal,
150 lpMsgBuf);
151
152 std::wstring lErrorW((wchar_t*)lpDisplayBuf);
153 std::string lError;
154 lError.assign(lErrorW.begin(), lErrorW.end());
155 std::cout << lError << std::endl;
156
157 LocalFree(lpMsgBuf);
158 LocalFree(lpDisplayBuf);
159 }
160
161 // Free memory
162 delete[]pwszParam;
163 pwszParam = 0;
164
165 // Release handles
166 CloseHandle(piProcessInfo.hProcess);
167 CloseHandle(piProcessInfo.hThread);
168
169 return iReturnVal;
170
171#else
172 // ************************
173 // start a process on Linux
174
175 pid_t pID = fork();
176 if (pID == 0) {
177 // Code only executed by child process
178 std::stringstream lCommand;
179 lCommand << aExec;
180 for (std::vector<std::string>::size_type j = 0; j < aArgs.size(); j++) {
181 lCommand << " " << aArgs.at(j);
182 }
183
184 int lRes = system(lCommand.str().c_str());
185 exit(lRes);
186 }
187 else {
188 // Code only executed by parent process
189 if (pID < 0) {
190 std::cerr << "Failed to fork Zorba" << std::endl;
191 return pID;
192 }
193
194 // Watch the process
195 aProcessListener.reset(new ProcessListener(pID, &onExitProcess));
196
197 return 0;
198 }
199#endif
200}
201
202void printUsage(std::string& aProgram)
203{
204 std::cerr << "Usage:" << std::endl
205 << " " << aProgram << " <zorba_arguments>" << std::endl
206 << " this will start a debugger command line and a zorba process with the given arguments" << std::endl;
207}
208
209bool
210processArguments(
211 int argc,
212 char* argv[],
213 std::string& aProgram,
214 bool& aStandalone,
215 std::string& aZorba,
216 unsigned int& aPort,
217 std::vector<std::string>& aZorbaArgs)
218{
219 aPort = 28028;
220
221 // find the path to Zorba and this executable name
222 aProgram = argv[0];
223
224#ifdef WIN32
225 char lSep = '\\';
226#else
227 char lSep = '/';
228#endif
229 std::string::size_type lPos = aProgram.find_last_of(lSep);
230
231 std::stringstream lZs;
232
233 if (lPos == aProgram.npos) {
234 lZs << "." << lSep;
235 } else {
236 lZs << aProgram.substr(0, lPos + 1);
237 aProgram = aProgram.substr(lPos + 1);
238 }
239 lZs << "zorba";
240#ifdef WIN32
241 lZs << ".exe";
242#endif
243 aZorba = lZs.str();
244
245
246 bool lHasFileArg = false;
247 bool lHasQueryArg = false;
248 bool lHasQueryVal = false;
249
250 // find if the user asked for help or specified a specific port
251 for (int i = 1; i < argc; i++) {
252 std::string lArg = argv[i];
253 if (lArg == "-h" || lArg == "--help") {
254 return false;
255 }
256 else if (lArg == "-p" || lArg == "--debug-port") {
257 // if there is one more argument
258 if (i < argc - 1) {
259 // get the port value
260 int lPort;
261 std::stringstream lStream(argv[i + 1]);
262 lStream >> lPort;
263 if (!lStream.fail()) {
264 aPort = lPort;
265 }
266 }
267 }
268 else if (lArg == "-f") {
269 lHasFileArg = true;
270 }
271 else if (lArg == "-q") {
272 lHasQueryArg = true;
273 if (++i < argc) {
274 lHasQueryVal = true;
275 }
276 }
277 }
278
279 if (!lHasFileArg || !lHasQueryArg || !lHasQueryVal) {
280 std::cout << "Not enough arguments to start Zorba." << std::endl;
281 std::cout << "Running the standalone XQuery debugger client on port: " << aPort << std::endl;
282 return true;
283 }
284
285 // zorba will need the -d flag
286 aZorbaArgs.push_back("-d");
287
288 // gather all arguments (excepting the program name)
289 for (int i = 1; i < argc; i++) {
290 aZorbaArgs.push_back(argv[i]);
291 }
292
293 aStandalone = false;
294 return true;
295}
22296
23#ifndef _WIN32_WCE297#ifndef _WIN32_WCE
24int298int
@@ -28,24 +302,72 @@
28_tmain(int argc, _TCHAR* argv[])302_tmain(int argc, _TCHAR* argv[])
29#endif303#endif
30{304{
31 int port = 28028;305#ifdef WIN32
32 if (argv[1]) {306 SetConsoleCtrlHandler(ctrlC_Handler, TRUE);
33 std::stringstream stream(argv[1]);307#else
34 stream >> port;308 signal(SIGINT, ctrlC_Handler);
35 if (stream.fail() || argv[2]) {309#endif
36 std::cerr << "Unknown argument. USAGE: " << argv[0] << " [PORT]" << std::endl;310
37 return 2;311 // **************************************************************************
312 // processing arguments
313
314 std::string lProgram, lZorbaExec;
315 unsigned int lPort = 28028;
316 std::vector<std::string> lZorbaArgs;
317
318 bool lStandalone = true;
319 if (!processArguments(argc, argv, lProgram, lStandalone, lZorbaExec, lPort, lZorbaArgs)) {
320 printUsage(lProgram);
321 return 1;
322 }
323
324#ifndef NDEBUG
325 // **************************************************************************
326 // debug reporting
327
328 if (!lStandalone) {
329 std::cout << "Communication port: " << lPort << std::endl;
330 std::cout << "Zorba executable: " << lZorbaExec << std::endl;
331 std::cout << "Zorba arguments: ";
332 for (std::vector<std::string>::size_type j = 0; j < lZorbaArgs.size(); j++) {
333 std::cout << lZorbaArgs.at(j) << " ";
38 }334 }
335 std::cout << std::endl;
39 }336 }
337#endif
338
40 try {339 try {
41 LockFreeQueue<std::size_t> lQueue;340 // **************************************************************************
42 LockFreeQueue<bool> lContEvent;341 // start a zorba
43 EventHandler lHandler(lQueue, lContEvent);342
44 CommandLine cli;343 // This is a process listener used to watch the Zorba process termination.
45 CommandLineHandler handler(port, lQueue, lContEvent, lHandler, cli);344 std::auto_ptr<ProcessListener> lProcessListener;
46 handler.execute();345
346 if (!lStandalone) {
347 int lResult = startZorba(lZorbaExec, lZorbaArgs, lProcessListener);
348 if (lResult) {
349 return lResult;
350 }
351 } else {
352 std::cout << "Listening for an incomming Zorba connection on port " << lPort << "..." << std::endl;
353 }
354
355 // **************************************************************************
356 // start the debugger command line
357
358 theClient.reset(new XqdbClient(lPort));
359 theClient->start();
360
47 } catch (...) {361 } catch (...) {
48 return 4;362 return -1;
49 }363 }
364
365#ifndef WIN32
366 XqdbClient* lClient = theClient.release();
367 if (lClient) {
368 delete lClient;
369 }
370#endif
371
50 return 0;372 return 0;
51}373}
52374
=== added file 'bin/debugger/process_listener.cpp'
--- bin/debugger/process_listener.cpp 1970-01-01 00:00:00 +0000
+++ bin/debugger/process_listener.cpp 2012-01-27 05:33:27 +0000
@@ -0,0 +1,105 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "process_listener.h"
18
19#include <iostream>
20
21#ifdef ZORBA_HAVE_PTHREAD_H
22# include <cassert>
23#endif
24
25
26namespace zorba { namespace debugger {
27
28ProcessListener::ProcessListener(ProcessId aProcessID, ExitCallbackType aCallback)
29 : theProcessID(aProcessID), theCallback(aCallback)
30{
31#ifdef WIN32
32 theThread = CreateThread(NULL, 0, &run, (void*) this, 0, &theThreadId);
33#else
34 if (pthread_create(&theThread, NULL, &run, (void*) this)) {
35 assert(false);
36 }
37#endif
38}
39
40ProcessListener::~ProcessListener()
41{
42}
43
44ProcessId
45ProcessListener::getProcessID()
46{
47 return theProcessID;
48}
49
50ExitCallbackType
51ProcessListener::getCallback()
52{
53 return theCallback;
54}
55
56
57ZORBA_THREAD_RETURN
58ProcessListener::run(void* params)
59{
60 ProcessListener* lThis = static_cast<ProcessListener*>(params);
61 ExitCode lExitCode = -1;
62 ProcessId lPid = lThis->getProcessID();
63
64#ifdef WIN32
65 HANDLE lProcessHandle = OpenProcess(SYNCHRONIZE, false, lPid);
66 if (lProcessHandle != NULL) {
67 // wait for the process to exit
68 DWORD lResult = WaitForSingleObject(lProcessHandle, INFINITE);
69
70 // find out the process exit code if possible
71 if (!GetExitCodeProcess(lProcessHandle, &lExitCode)) {
72 lExitCode = -1;
73 }
74 DWORD dw = GetLastError();
75
76 // wait a little for zorba to dump the garbage
77 Sleep(1000);
78 }
79#else
80 int lChildExitStatus;
81
82 // wait for the process to exit
83 waitpid(lPid, &lChildExitStatus, 0);
84
85 // find out the process exit code if possible
86 if (WIFEXITED(lChildExitStatus)) {
87 lExitCode = WEXITSTATUS(lChildExitStatus);
88 }
89
90 // wait a little for zorba to dump the garbage
91 sleep(1);
92#endif
93
94 // and call the callback when this happened
95 ExitCallbackType lCallback = lThis->getCallback();
96 lCallback(lExitCode);
97
98 for (int i = 0; i < 10; i++) {
99 std::cout << i << std::endl;
100 }
101 return NULL;
102}
103
104} // namespace zorba
105} // namespace debugger
0106
=== added file 'bin/debugger/process_listener.h'
--- bin/debugger/process_listener.h 1970-01-01 00:00:00 +0000
+++ bin/debugger/process_listener.h 2012-01-27 05:33:27 +0000
@@ -0,0 +1,75 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17#ifndef ZORBA_DEBUGGER_PROCESS_LISTENER_H
18#define ZORBA_DEBUGGER_PROCESS_LISTENER_H
19
20#include <zorba/config.h>
21
22#ifdef ZORBA_HAVE_PTHREAD_H
23# include <pthread.h>
24# include <sys/wait.h>
25 typedef pthread_t ThreadId;
26 typedef pid_t ProcessId;
27 typedef int ExitCode;
28# define ZORBA_THREAD_RETURN void *
29#else
30# include <windows.h>
31 typedef DWORD ThreadId;
32 typedef DWORD ProcessId;
33 typedef DWORD ExitCode;
34# define ZORBA_THREAD_RETURN DWORD WINAPI
35#endif
36
37typedef void (*ExitCallbackType)(ExitCode);
38
39
40namespace zorba { namespace debugger {
41
42class ProcessListener
43{
44 public:
45 ProcessListener(ProcessId processID, ExitCallbackType callback);
46
47 ~ProcessListener();
48
49 ProcessId
50 getProcessID();
51
52 ExitCallbackType
53 getCallback();
54
55 private:
56
57 static ZORBA_THREAD_RETURN run(void* params);
58
59 private:
60
61#ifdef ZORBA_HAVE_PTHREAD_H
62 pthread_t theThread;
63#else
64 ThreadId theThreadId;
65 HANDLE theThread;
66#endif
67
68 ProcessId theProcessID;
69 ExitCallbackType theCallback;
70};
71
72} // namespace zorba
73} // namespace debugger
74
75#endif // ZORBA_DEBUGGER_PROCESS_LISTENER_H
076
=== modified file 'bin/debugger/tuple.h'
--- bin/debug_client/tuple.h 2011-07-04 08:05:46 +0000
+++ bin/debugger/tuple.h 2012-01-27 05:33:27 +0000
@@ -14,9 +14,15 @@
14 * limitations under the License.14 * limitations under the License.
15 */15 */
16#pragma once16#pragma once
17#ifndef ZORBA_DEBUGGER_TUPLE_H
18#define ZORBA_DEBUGGER_TUPLE_H
19
17#include <zorba/config.h>20#include <zorba/config.h>
21
18#if ZORBA_TR1_IN_TR1_SUBDIRECTORY22#if ZORBA_TR1_IN_TR1_SUBDIRECTORY
19# include <tr1/tuple>23# include <tr1/tuple>
20#else24#else
21# include <tuple>25# include <tuple>
22#endif26#endif
27
28#endif // ZORBA_DEBUGGER_TUPLE_H
2329
=== added file 'bin/debugger/xqdb_client.cpp'
--- bin/debugger/xqdb_client.cpp 1970-01-01 00:00:00 +0000
+++ bin/debugger/xqdb_client.cpp 2012-01-27 05:33:27 +0000
@@ -0,0 +1,63 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "xqdb_client.h"
18
19#include <iostream>
20
21#ifdef ZORBA_HAVE_PTHREAD_H
22# include <cassert>
23#endif
24
25
26namespace zorba { namespace debugger {
27
28XqdbClient::XqdbClient(unsigned int aPort)
29{
30 theIdQueue = new LockFreeQueue<std::size_t>();
31 theQuitQueue = new LockFreeQueue<bool>();
32 theEventHandler = new EventHandler(*theIdQueue, *theQuitQueue);
33 theEventHandler->init();
34
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: