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: 158508 lines (+81767/-31173)
1109 files modified
CMakeConfiguration.txt (+3/-4)
CMakeLists.txt (+29/-7)
CPackSourceConfig.cmake.in (+1/-1)
ChangeLog (+91/-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 (+63/-30)
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/conformance.dox (+4/-4)
doc/zorba/conformanceXQFTTS.dox (+74/-74)
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 (+9/-1)
include/zorba/dynamic_context.h (+14/-1)
include/zorba/error.h (+7/-0)
include/zorba/identtypes.h (+16/-4)
include/zorba/internal/qname.h (+40/-0)
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 (+24/-5)
include/zorba/pregenerated/diagnostic_list.h (+74/-4)
include/zorba/static_collection_manager.h (+66/-3)
include/zorba/static_context.h (+619/-529)
include/zorba/store_consts.h (+42/-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 (+19/-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 (+89/-9)
modules/com/zorba-xquery/www/modules/pregenerated/warnings.xq (+20/-1)
modules/com/zorba-xquery/www/modules/store/jsoniq/dynamic/collections/ddl.xq (+122/-0)
modules/com/zorba-xquery/www/modules/store/jsoniq/dynamic/collections/dml.xq (+354/-0)
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 (+21/-0)
modules/org/jsoniq/www/functions.xq (+272/-0)
modules/org/jsoniq/www/pregenerated/errors.xq (+89/-0)
scripts/sanity_checks/README.txt (+2/-2)
scripts/sanity_checks/conformance_xqftts.xqi (+4/-5)
scripts/sanity_checks/conformance_xqts.xqi (+3/-3)
src/annotations/annotations.cpp (+324/-292)
src/annotations/annotations.h (+101/-60)
src/api/annotationimpl.cpp (+1/-1)
src/api/collectionimpl.cpp (+15/-15)
src/api/dynamiccontextimpl.cpp (+35/-1)
src/api/dynamiccontextimpl.h (+7/-0)
src/api/functionimpl.cpp (+1/-1)
src/api/item.cpp (+33/-1)
src/api/itemfactoryimpl.cpp (+61/-4)
src/api/itemfactoryimpl.h (+25/-3)
src/api/options.cpp (+38/-13)
src/api/serialization/serializer.cpp (+378/-62)
src/api/serialization/serializer.h (+106/-23)
src/api/serializerimpl.cpp (+18/-3)
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 (+85/-86)
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 (+5/-19)
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 (+253/-51)
src/compiler/parser/xquery_scanner.cpp (+3211/-3127)
src/compiler/parser/xquery_scanner.l (+35/-12)
src/compiler/parsetree/parsenode_print_dot_visitor.h (+6/-0)
src/compiler/parsetree/parsenode_print_xml_visitor.cpp (+84/-27)
src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+10/-3)
src/compiler/parsetree/parsenode_print_xquery_visitor.cpp (+31/-13)
src/compiler/parsetree/parsenode_visitor.h (+8/-0)
src/compiler/parsetree/parsenodes.cpp (+114/-0)
src/compiler/parsetree/parsenodes.h (+118/-4)
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 (+5/-10)
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 (+694/-316)
src/compiler/xqddf/value_index.cpp (+36/-23)
src/compiler/xqddf/value_index.h (+53/-27)
src/compiler/xqueryx/xqueryx_to_xquery.cpp (+4/-1)
src/compiler/xqueryx/xqueryx_xslt.cpp (+578/-86)
src/compiler/xqueryx/xqueryx_xslt.h (+2/-1)
src/context/default_uri_mappers.cpp (+2/-2)
src/context/default_uri_mappers.h (+6/-6)
src/context/default_url_resolvers.cpp (+6/-6)
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 (+475/-393)
src/context/static_context.h (+112/-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/CMakeLists.txt (+22/-3)
src/diagnostics/diagnostic.cpp (+8/-0)
src/diagnostics/diagnostic_en.xml (+262/-44)
src/diagnostics/diagnostic_list_cpp.xq (+1/-0)
src/diagnostics/diagnostic_list_h.xq (+1/-0)
src/diagnostics/diagnostic_list_xq.xq (+3/-1)
src/diagnostics/dict_XX_cpp.xq (+1/-0)
src/diagnostics/pregenerated/diagnostic_list.cpp (+108/-6)
src/diagnostics/pregenerated/dict_en.cpp (+79/-9)
src/diagnostics/qname.cpp (+41/-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/-40)
src/functions/func_collections_impl.cpp (+655/-293)
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 (+282/-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.cpp (+515/-249)
src/functions/pregenerated/func_collections.h (+451/-345)
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 (+651/-0)
src/functions/pregenerated/func_jsoniq_functions.h (+483/-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 (+119/-47)
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 (+7/-0)
src/runtime/accessors/accessors_impl.cpp (+22/-22)
src/runtime/base/plan_iterator.h (+4/-0)
src/runtime/booleans/BooleanImpl.cpp (+206/-220)
src/runtime/booleans/BooleanImpl.h (+1/-1)
src/runtime/collections/collections_base.cpp (+25/-18)
src/runtime/collections/collections_base.h (+45/-56)
src/runtime/collections/collections_impl.cpp (+529/-681)
src/runtime/collections/collections_impl.h (+12/-3)
src/runtime/collections/pregenerated/collections.h (+137/-84)
src/runtime/core/arithmetic_impl.cpp (+50/-52)
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 (+214/-166)
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 (+956/-0)
src/runtime/json/pregenerated/json.cpp (+94/-0)
src/runtime/json/pregenerated/json.h (+114/-0)
src/runtime/json/pregenerated/jsoniq_functions.cpp (+621/-0)
src/runtime/json/pregenerated/jsoniq_functions.h (+843/-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 (+99/-113)
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 (+456/-316)
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 (+586/-0)
src/runtime/spec/mappings.xml (+40/-16)
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 (+281/-1)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+695/-0)
src/runtime/visitors/pregenerated/printer_visitor.h (+184/-0)
src/runtime/visitors/printer_visitor_impl.cpp (+242/-173)
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/collection.h (+7/-4)
src/store/api/index.h (+60/-22)
src/store/api/item.h (+204/-39)
src/store/api/item_factory.h (+25/-145)
src/store/api/pul.h (+66/-8)
src/store/api/shared_types.h (+3/-0)
src/store/api/store.h (+45/-15)
src/store/api/temp_seq.h (+47/-47)
src/store/api/update_consts.h (+22/-1)
src/store/api/xs_type_codes.h (+96/-0)
src/store/naive/CMakeLists.txt (+8/-0)
src/store/naive/atomic_items.cpp (+915/-247)
src/store/naive/atomic_items.h (+267/-89)
src/store/naive/collection_set.cpp (+41/-25)
src/store/naive/collection_set.h (+86/-85)
src/store/naive/item.cpp (+307/-35)
src/store/naive/json_items.cpp (+623/-0)
src/store/naive/json_items.h (+461/-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/name_iterator.h (+68/-62)
src/store/naive/node_factory.cpp (+2/-2)
src/store/naive/node_factory.h (+2/-2)
src/store/naive/node_items.cpp (+641/-274)
src/store/naive/node_items.h (+179/-77)
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_primitive_factory.cpp (+245/-169)
src/store/naive/pul_primitive_factory.h (+74/-8)
src/store/naive/pul_primitives.cpp (+390/-94)
src/store/naive/pul_primitives.h (+202/-28)
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 (+266/-150)
src/store/naive/simple_collection.h (+32/-41)
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 (+379/-85)
src/store/naive/simple_pul.h (+88/-9)
src/store/naive/simple_store.cpp (+288/-203)
src/store/naive/simple_store.h (+100/-52)
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 (+595/-315)
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 (+417/-60)
src/types/typeimpl.h (+258/-180)
src/types/typemanager.h (+30/-19)
src/types/typemanagerimpl.cpp (+143/-101)
src/types/typemanagerimpl.h (+32/-24)
src/types/typeops.cpp (+693/-513)
src/types/typeops.h (+21/-44)
src/unit_tests/CMakeLists.txt (+14/-0)
src/unit_tests/json_parser.cpp (+636/-0)
src/unit_tests/json_parser.cpp.moved (+623/-0)
src/unit_tests/stemmer.cpp (+8/-1)
src/unit_tests/string.cpp (+10/-1)
src/unit_tests/string_instantiate.cpp (+8/-1)
src/unit_tests/test_debugger_protocol.cpp (+0/-414)
src/unit_tests/thesaurus.cpp (+17/-14)
src/unit_tests/tokenizer.cpp (+8/-1)
src/unit_tests/unique_ptr.cpp (+7/-1)
src/unit_tests/unit_test_list.h (+9/-3)
src/unit_tests/unit_tests.cpp (+10/-1)
src/util/CMakeLists.txt (+1/-0)
src/util/ascii_util.h (+1/-6)
src/util/http_util.cpp (+2/-2)
src/util/json_parser.cpp (+634/-0)
src/util/json_parser.h (+553/-0)
src/util/regex.h (+2/-2)
src/util/regex_ascii.h (+0/-2)
src/util/stl_util.h (+2/-0)
src/util/string_util.h (+6/-2)
src/util/unicode_util.h (+4/-9)
src/util/uri_util.h (+2/-2)
src/util/utf8_util.cpp (+17/-0)
src/util/utf8_util.h (+0/-5)
src/util/utf8_util_base.h (+27/-12)
src/util/xml_util.h (+0/-1)
src/zorbamisc/ns_consts.h (+10/-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/parser/parsertestdriver.cpp (+2/-0)
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/groupby/posvar.xml.res (+2/-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/coll_dyn_01.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/coll_dyn_03.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/delete01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/delete02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/delete10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/delete11.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/insert01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/insert03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/insert04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/insert05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/insert06.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/null01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/null02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/null03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/object_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/object_02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/pair_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/rename01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/replace01.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 (+279/-18)
test/rbkt/Queries/w3c_known_failures.txt (+49/-90)
test/rbkt/Queries/w3c_known_failures_XQueryX.txt (+88/-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/groupby/posvar.xq (+17/-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/coll_dyn_01.xq (+57/-0)
test/rbkt/Queries/zorba/jsoniq/coll_dyn_02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/coll_dyn_02.xq (+16/-0)
test/rbkt/Queries/zorba/jsoniq/coll_dyn_03.xq (+56/-0)
test/rbkt/Queries/zorba/jsoniq/delete01.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/delete02.xq (+8/-0)
test/rbkt/Queries/zorba/jsoniq/delete03.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/delete03.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/delete04.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/delete04.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/delete05.spec (+2/-0)
test/rbkt/Queries/zorba/jsoniq/delete05.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/delete06.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/delete06.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/delete07.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/delete07.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/delete08.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/delete08.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/delete09.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/delete09.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/delete10.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/delete11.xq (+11/-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/insert01.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/insert02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/insert02.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/insert03.xq (+8/-0)
test/rbkt/Queries/zorba/jsoniq/insert04.xq (+12/-0)
test/rbkt/Queries/zorba/jsoniq/insert05.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/insert06.xq (+27/-0)
test/rbkt/Queries/zorba/jsoniq/insert07.spec (+2/-0)
test/rbkt/Queries/zorba/jsoniq/insert07.xq (+9/-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/null01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/null02.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/null03.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/obj_constr_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/object_01.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/object_02.xq (+16/-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/rename01.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/rename02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/rename02.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/rename03.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/rename03.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/replace01.xq (+8/-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/daniel/i1.xq (+3/-1)
test/rbkt/Queries/zorba/xqddf/test-node-reference.xq (+2/-0)
test/rbkt/Scripts/w3c/Readme.txt (+17/-7)
test/rbkt/Scripts/w3c/Submit_xqts.cmake (+23/-9)
test/rbkt/Scripts/w3c/generate-submission-xqftts.xq (+4/-4)
test/rbkt/Scripts/w3c/generate-submission-xqts.xq (+4/-9)
test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh (+1/-1)
test/rbkt/Scripts/w3c/import_w3c_testsuite.sh (+1/-1)
test/rbkt/itertest.xq.in (+58/-44)
test/rbkt/specification.h (+8/-2)
test/rbkt/testdriver.cpp (+5/-0)
test/rbkt/testdriver_common.cpp (+14/-3)
test/rbkt/testdriver_mt.cpp (+32/-5)
test/unit/CMakeLists.txt (+33/-10)
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/update/CMakeLists.txt (+1/-1)
test/update/Queries/zorba/store/sc3.spec (+0/-2)
test/update/Scripts/Readme.txt (+8/-5)
test/update/Scripts/XQUTS.xml (+1/-1)
test/update/Scripts/generate-submission-xquts.xq (+11/-4)
test/update/Scripts/import_w3c_update_testsuite.sh (+1/-1)
test/update/Scripts/zorba-xquts-submission.xml (+858/-0)
test/update/Scripts/zorba-xqutsx-submission.xml (+858/-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+90824@code.launchpad.net

This proposal supersedes a proposal from 2012-01-31.

This proposal has been superseded by a proposal from 2012-02-02.

Commit message

...

Description of the change

...

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

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 .

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

retry building the web interface with jsoniq support

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

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 .

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

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 .

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

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 .

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
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
1=== modified file 'CMakeConfiguration.txt'
2--- CMakeConfiguration.txt 2011-09-16 19:55:59 +0000
3+++ CMakeConfiguration.txt 2012-02-02 04:30:26 +0000
4@@ -70,10 +70,6 @@
5 SET(ZORBA_FOR_ONE_THREAD_ONLY OFF CACHE BOOL "compile zorba for single threaded use")
6 MESSAGE(STATUS "ZORBA_FOR_ONE_THREAD_ONLY: " ${ZORBA_FOR_ONE_THREAD_ONLY})
7
8-# by default the zorba command line client is deactivated until it gets to a more stable and userfriendly state
9-SET(ZORBA_WITH_DEBUGGER_CLIENT OFF CACHE BOOL "build and install zorbas command line debugger client")
10-MESSAGE(STATUS "ZORBA_WITH_DEBUGGER_CLIENT: " ${ZORBA_WITH_DEBUGGER_CLIENT})
11-
12 IF (DEFINED UNIX)
13 IF (NOT DEFINED ZORBA_HAVE_PTHREAD_H AND NOT DEFINED ZORBA_FOR_ONE_THREAD_ONLY)
14 MESSAGE(FATAL_ERROR "pthread is not available")
15@@ -156,6 +152,9 @@
16 SET(ZORBA_WITH_BIG_INTEGER OFF CACHE BOOL "enable arbitrary precision integers")
17 MESSAGE(STATUS "ZORBA_WITH_BIG_INTEGER: " ${ZORBA_WITH_BIG_INTEGER})
18
19+SET(ZORBA_WITH_JSON ON CACHE BOOL "enable integrated JSON support")
20+MESSAGE(STATUS "ZORBA_WITH_JSON: " ${ZORBA_WITH_JSON})
21+
22 IF (ZORBA_SUPPRESS_SWIG)
23 SET (no_swig ON)
24 ELSE (ZORBA_SUPPRESS_SWIG)
25
26=== modified file 'CMakeLists.txt'
27--- CMakeLists.txt 2011-10-09 13:56:39 +0000
28+++ CMakeLists.txt 2012-02-02 04:30:26 +0000
29@@ -417,13 +417,35 @@
30
31 # zorba versioning
32 SET(ZORBA_MAJOR_NUMBER "2")
33-SET(ZORBA_MINOR_NUMBER "0")
34-SET(ZORBA_PATCH_NUMBER "1")
35+SET(ZORBA_MINOR_NUMBER "1")
36+SET(ZORBA_PATCH_NUMBER "0")
37 SET(ZORBA_VERSION ${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER})
38 MESSAGE(STATUS "Zorba version number: ${ZORBA_VERSION}")
39-SET(ZORBA_MODULES_INSTALL_DIR "share/zorba-${ZORBA_VERSION}/modules"
40- CACHE STRING "Path (relative to installdir) to modules" FORCE)
41-MARK_AS_ADVANCED(ZORBA_MODULES_INSTALL_DIR)
42+
43+SET(ZORBA_LIB_DIRNAME "lib" CACHE STRING
44+ "directory name for libs (may want to set to 'lib64' on 64-bit Linux platforms)")
45+
46+# Directories for modules and schemas. "Core" are those which are
47+# shipped with Zorba and must be present for correct Zorba
48+# functionality. "Non-core" are developed independently of Zorba and
49+# have different version lifecycles.
50+#
51+# URI dir is for things resolved by URI - specifically modules (.xq
52+# files) and schemas (.xsd files) - which are platform-
53+# independent. Lib dir is for platform-specific files, specifically
54+# shared libraries for module external functions.
55+SET(ZORBA_NONCORE_URI_DIR "share/zorba/uris"
56+ CACHE STRING "Path (relative to installdir) to non-core modules/schemas")
57+MARK_AS_ADVANCED(ZORBA_NONCORE_URI_DIR)
58+SET(ZORBA_CORE_URI_DIR "${ZORBA_NONCORE_URI_DIR}/core/${ZORBA_VERSION}"
59+ CACHE STRING "Path (relative to installdir) to core modules/schemas")
60+MARK_AS_ADVANCED(ZORBA_CORE_URI_DIR)
61+SET(ZORBA_NONCORE_LIB_DIR "${ZORBA_LIB_DIRNAME}/zorba"
62+ CACHE STRING "Path (relative to installdir) to non-core libraries")
63+MARK_AS_ADVANCED(ZORBA_NONCORE_LIB_DIR)
64+SET(ZORBA_CORE_LIB_DIR "${ZORBA_NONCORE_LIB_DIR}/core/${ZORBA_VERSION}"
65+ CACHE STRING "Path (relative to installdir) to core libraries")
66+MARK_AS_ADVANCED(ZORBA_CORE_LIB_DIR)
67
68 # add compiler variables
69 ADD_DEFINITIONS(${DEFINITIONS})
70@@ -460,7 +482,7 @@
71 SET(ZORBA_CMAKE_DIR "cmake" CACHE STRING
72 "Relative path to CMake files in Zorba installation")
73 ELSE (WIN32)
74- SET(ZORBA_CMAKE_DIR "share/zorba-${ZORBA_VERSION}/cmake" CACHE STRING
75+ SET(ZORBA_CMAKE_DIR "share/cmake/zorba-${ZORBA_VERSION}" CACHE STRING
76 "Relative path to CMake files in Zorba installation")
77 ENDIF (WIN32)
78
79@@ -534,4 +556,4 @@
80 # This dependency is zorba-only related, which is why it's added here
81 # and not within zorba-modules, which is for general use in other
82 # non-zorba modules.
83-ADD_DEPENDENCIES(check_uris gen_diag_modules)
84+ADD_DEPENDENCIES(check_core_uris gen_diag_modules)
85
86=== modified file 'CPackSourceConfig.cmake.in'
87--- CPackSourceConfig.cmake.in 2009-10-30 16:24:51 +0000
88+++ CPackSourceConfig.cmake.in 2012-02-02 04:30:26 +0000
89@@ -19,7 +19,7 @@
90
91 SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
92 SET(CPACK_GENERATOR "TGZ;TZ")
93-SET(CPACK_IGNORE_FILES "test/coverity/;dist/;_CPack_Packages/;build/;build./;CVS/;/\\.svn/;\\.swp$;\\.#;/#")
94+SET(CPACK_IGNORE_FILES "test/coverity/;dist/;_CPack_Packages/;build/;build./;CVS/;/\\.svn/;\\.swp$;\\.#;/#;\\.bzr/")
95 SET(CPACK_INSTALLED_DIRECTORIES "@CMAKE_SOURCE_DIR@;/")
96 SET(CPACK_INSTALL_CMAKE_PROJECTS "")
97 SET(CPACK_MODULE_PATH "")
98
99=== modified file 'ChangeLog'
100--- ChangeLog 2011-10-20 23:05:55 +0000
101+++ ChangeLog 2012-02-02 04:30:26 +0000
102@@ -1,13 +1,64 @@
103 Zorba - The XQuery Processor
104
105-version 2.x
106-
107- * Custom Full-text thesaurus.
108- * Fixed bug #3401971 (node-by-reference on dynamic collections)
109+version 2.2
110+
111+ * No-copy optimization: avoids copying nodes during node-constructor expressions.
112+ * Added external function annotations %ann:propagates-input-nodes and
113+ %ann:must-copy-input-nodes to be used by the no-copy optimization.
114+ * Caching of results for recursive functions with atomic parameter and return types.
115+ * Added %ann:cache and %ann:no-cache to enable or disable caching of results of functions with atomic parameter and return types.
116+ * Fixed bug 917923 (bug in copying outer var values into the eval dynamic context)
117+ * Fixed bug 909126 (bug in cloning of var_expr)
118+ * Fixed bug in destruction of exit_catcher_expr
119+ * Types-related optimizations for runtime operators (comparisons, FnBoolean, Or, And,
120+ Compare, instance-of, cast, castable, treat, promote).
121+ * Fixed bug #911585 (management of variables during eval)
122+ * Fixed bug #866423 (fn:empty and fn:exists iterators must reset their input in
123+ case of early-out)
124+ * Added index management function to the C++ api's StaticCollectionManager.
125+ * Fixed bug #905041 (allow for the default element and function namespaces to be
126+ set multiple times via the c++ api).
127+ * Fixed bug #907872 (segfault when returning an input ItemSequence from an external function).
128+ * Fixed bug #905050 (setting and getting the context item type via the c++ api).
129+ * Added createDayTimeDuration, createYearMonthDuration, createDocumentNode, createCommentNode, createPiNode to api's ItemFactory.
130+ * Added split function to the string module that allows for streamable tokenization but doesn't have regular expression
131+ support.
132+ * Fixed bug involving positional var and groupby
133+ * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
134+ * Add new XQuery interface for the PHP bindings.
135+ * Added API method Item::getNamespaceBindings().
136+ * Added API method StaticContext::getNamespaceBindings() (see bug #905035)
137+ * Deprecated StaticContext:getNamespaceURIByPrefix()
138+ * Fixed bug #918211 (xqueryx fulltext w3c conformance generation)
139+ * Fixed bug #918157 (Add XQFTTS to validation queue)
140+ * Fixed bug with unversioned modules with C++ external functions
141+
142+
143+version 2.1
144+
145+New Features:
146+ * New node-position module. This module allows to obtain a representation of a node position, which
147+ can be used to assess structural relationships with other nodes.
148+ * New node-reference module. References can be obtained for any node, and
149+ different nodes cannot have the same identifier.
150+ * Custom Full-text thesaurus using Zorba URI resolver mechanism.
151+ * Modified C++ API to add isSequential, getExternalVariables, isBoundContextItem and
152+ isBoundExternalVariable Functions
153+ * Collection allows to retrieve information about the type
154+ and the annotations of a static collection.
155+ * Implemented the probe-index-range-value for general indexes
156+ * Added ExternalFunctionParameter class to be registered in the DynamicContext
157+ * New module for compiling and executing XQueries from XQuery (xqxq)
158+ * External functions are allowed to be updating (i.e. return a pending update list)
159+
160+Optimization:
161 * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a
162 sequence of integers)
163- * documentation improvements
164- * installer improvements
165+ * Optimization for count(collection()) expressions
166+ * Optimization of the fn:substring function in the case when its $start and $length arguments
167+ are integers
168+
169+Bug Fixes/Other Changes:
170 * Fixed bug #3403291 (build for Fedora 15)
171 * Fixed bug #3397293 (Incorrect XQueryX error message)
172 * Fixed bug #3398637 (Nested element constructors cause loss of namespace bindings)
173@@ -15,20 +66,19 @@
174 * Fixed bug #3404689 (assignment problem in flwor)
175 * Fix for bug #3404450 (testdriver_mt problem: caching and validation of docs)
176 * Fixed installation bug to not install the .so for test modules
177- * Fix for running ctest on Windows
178 * Fixed bug #3390410 (Adding a node to a collection causes out of bound in vector)
179 * Fixed bug #3406200 (node types were not being moved to new tree during node detach)
180 * Fixed bug #3406191 (Namespace bindings lost after update due to bug in node detach)
181 * Fixed bug #3290122 (ZDST0003 needs collection name)
182- * Collection allows to retrieve information about the type
183- and the annotations of a static collection.
184 * Fixed bug #3406272 (merging of adjacent text nodes must be done after all
185 updates have been applied).
186+ * Don't raise warnings for unknown annotations.
187 * Fixed bug #3409344 (during detach, if the node being detached is the root of
188 its tree, it should be detached from the tree as well; otherwise memory
189 corruption will occur)
190 * Fixed bug # (Should not destroy the parent of a node that is being detached
191 before the detach is done).
192+ * Added const qualifier to StaticContext::getAuditEvent()
193 * Fixed bug #3408181 (available-collection() returns undeclared collections)
194 * Fixed bug #859465 (Fatal error if a PUL contains two deactivate IC primitives)
195 * Fixed bug #859467 (Fatal error if a PUL contains two activate Foreign Key primitives)
196@@ -36,11 +86,10 @@
197 * Fixed bug #859522 (Fatal error if a PUL contains two delete document primitives)
198 * Fixed bug #859968 (Using put on an attribute produces an invalid XDM instance and may cause segmentation faults)
199 * Fixed bug #855314 (should not fold a constant expr that returns an error item)
200- * Added ExternalFunctionParameter class to be registered in the DynamicContext
201+ * Fixed bug when parsing a document with a base-uri attribute.
202 * Fixed bug #863320 (Sentence is incorrectly incremented when token characters end without sentence terminator)
203 * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012)
204- * Implemented the probe-index-range-value for general indexes
205- * Fixed bug #867662 ("nullptr" warning)
206+ * Removed ZSTR0005 and ZSTR0006 error codes
207 * Fixed bug #868258 (Assertion failure with two delete collection)
208 * Fixed bug #871623 and #871629 (assertion failures with insertions in dynamic collections)
209 * Fixed bug #867262 (allow reuse of iterator over ExtFuncArgItemSequence)
210@@ -54,6 +103,36 @@
211 * Fixed bug #872796 (validate-in-place can interfere with other update primitives)
212 * Fixed bug #872799 (validate-in-place can set incorrect types)
213 * Fixed bug #855715 (Invalid escaped characters in regex not caught)
214+ * Fixed bug #868325 (fn:analyze-string fails with some recursive subgroups)
215+ * Fixed bug #872697 (segmentation fault with validation of NMTOKENS)
216+ * General index cannot be declared as unique if the type of its key is
217+ xs:anyAtomicType or xs:untypedAtomic.
218+ * Added undo for node revalidation
219+ * Optimization for count(collection()) expressions
220+ * Fixed bug #867133 (SWIG PHP build failure on Mac OSX)
221+ * Fixed bug #872796 (validate-in-place can interfere with other update primitives)
222+ * Fixed bug #872799 (validate-in-place can set incorrect types)
223+ * Fixed bug #872850 (Serialization of Tumbling Window For fails)
224+ * Fixed bug #855715 (Invalid escaped characters in regex not caught)
225+ * Fixed bug #862089 (Split binary/xq install directories for modules) by
226+ splitting "module path" into separate URI and Library paths
227+ * Fixed bug #872502 (validation of the JSON module xqdoc fails)
228+ * Fixed bug #897619 (testdriver_mt can not run the XQueryX tests)
229+ * Fixed bug #867107 (xqdoc dependency to zorba is wrong)
230+ * Fixed bug #897616 (Fix the generation of the XQFTTS report results for
231+ W3C)
232+
233+version 2.0.3
234+ * Fixed bug #867662 ("nullptr" warning)
235+ * documentation improvements
236+
237+version 2.0.2
238+ * Fixed bug #3401971 (node-by-reference on dynamic collections)
239+ * documentation improvements
240+ * installer improvements
241+ * Fixed bug #3403291 (build for Fedora 15)
242+ * Don't install the .so for test modules
243+ * Fix for running ctest on Windows
244
245 version 2.0.1
246
247
248=== added file 'NOTICE.txt'
249--- NOTICE.txt 1970-01-01 00:00:00 +0000
250+++ NOTICE.txt 2012-02-02 04:30:26 +0000
251@@ -0,0 +1,740 @@
252+-----------
253+Zorba 2.1.0
254+-----------
255+
256+(Note: This file is generated automatically from NOTICE.xml.
257+Please do not modify this file directly.)
258+
259+
260+
261+
262+Apache 2
263+
264+ Copyright 2006-2011 The FLWOR Foundation
265+
266+ See LICENSE.txt for license information.
267+
268+ ------------------------
269+ This product includes software developed at
270+ The FLWOR Foundation (http://www.flworfound.org/).
271+
272+ ------------------------
273+ Portions of this software were developed at the Systems
274+ Group of the ETH Zurich, Switzerland.
275+
276+
277+Other files used by this project:
278+----------------------------------------------------
279+
280+src/zorbatypes/m_apm.h
281+src/zorbatypes/mapm/
282+
283+Copyright: 1999-2007 Michael C. Ring
284+Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
285+
286+ This software is Freeware.
287+
288+ Permission to use, copy, and distribute this software and its
289+ documentation for any purpose with or without fee is hereby granted,
290+ provided that the above copyright notice appear in all copies and
291+ that both that copyright notice and this permission notice appear
292+ in supporting documentation.
293+
294+ Permission to modify the software is granted. Permission to distribute
295+ the modified code is granted. Modifications are to be distributed by
296+ using the file 'license.txt' as a template to modify the file header.
297+ 'license.txt' is available in the official MAPM distribution.
298+
299+ To distribute modified source code, insert the file 'license.txt'
300+ at the top of all modified source code files and edit accordingly.
301+
302+ This software is provided "as is" without express or implied warranty.
303+
304+----------------------------------------------------
305+
306+src/zorbamisc/config/stdint.h
307+
308+Copyright: 2006 Alexander Chemeris
309+
310+
311+ Redistribution and use in source and binary forms, with or without
312+ modification, are permitted provided that the following conditions are met:
313+
314+ 1. Redistributions of source code must retain the above copyright notice,
315+ this list of conditions and the following disclaimer.
316+
317+ 2. Redistributions in binary form must reproduce the above copyright
318+ notice, this list of conditions and the following disclaimer in the
319+ documentation and/or other materials provided with the distribution.
320+
321+ 3. The name of the author may be used to endorse or promote products
322+ derived from this software without specific prior written permission.
323+
324+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
325+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
326+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
327+ EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
328+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
329+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
330+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
331+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
332+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
333+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
334+
335+----------------------------------------------------
336+
337+src/zorbautils/stemmer/
338+
339+Copyright: 2001 Dr. Martin Porter
340+
341+
342+ All the software given out on this Snowball site is covered by the BSD
343+ License (see http://www.opensource.org/licenses/bsd-license.html), with
344+ Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
345+ Copyright (c) 2002, Richard Boulton.
346+
347+ Essentially, all this means is that you can do what you like with the code,
348+ except claim another Copyright for it, or claim that it is issued under a
349+ different license. The software is also issued without warranties, which
350+ means that if anyone suffers through its use, they cannot come back and sue
351+ you. You also have to alert anyone to whom you give the Snowball software to
352+ the fact that it is covered by the BSD license.
353+
354+ We have not bothered to insert the licensing arrangement into the text of
355+ the Snowball software.
356+
357+----------------------------------------------------
358+
359+src/util/less.h
360+
361+Copyright: 1998 Paul J. Lucas
362+
363+
364+ Redistribution and use in source and binary forms, with or without
365+ modification, are permitted provided that the following conditions are met:
366+
367+ o Redistributions of source code must retain the above copyright notice,
368+ this list of conditions and the following disclaimer.
369+
370+ o Redistributions in binary form must reproduce the above copyright
371+ notice, this list of conditions and the following disclaimer in the
372+ documentation and/or other materials provided with the distribution.
373+
374+ o The name of the author may not be used to endorse or promote products
375+ derived from this software without specific prior written permission.
376+
377+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
378+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
379+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
380+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
381+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
382+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
383+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
384+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
385+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
386+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
387+ POSSIBILITY OF SUCH DAMAGE.
388+
389+----------------------------------------------------
390+
391+src/util/auto_vector.h (has been modified)
392+
393+Copyright: 2003 Reliable Software
394+
395+
396+ Redistribution and use in source and binary forms, with or without
397+ modification, are permitted provided that the following conditions are met:
398+
399+ o Redistributions of source code must retain the above copyright notice,
400+ this list of conditions and the following disclaimer.
401+
402+ o Redistributions in binary form must reproduce the above copyright
403+ notice, this list of conditions and the following disclaimer in the
404+ documentation and/or other materials provided with the distribution.
405+
406+ o The name of the author may not be used to endorse or promote products
407+ derived from this software without specific prior written permission.
408+
409+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
410+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
411+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
412+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
413+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
414+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
415+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
416+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
417+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
418+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
419+ POSSIBILITY OF SUCH DAMAGE.
420+
421+----------------------------------------------------
422+
423+cmake_modules/FindBoost.cmake
424+
425+Copyright:
426+ 2006-2008 Andreas Schneider <mail@cynapses.org>
427+ 2007 Wengo
428+ 2007 Mike Jackson
429+ 2008 Andreas Pakulat <apaku@gmx.de>
430+
431+
432+
433+ Redistribution AND use is allowed according to the terms of the New BSD license.
434+ For details see the accompanying COPYING-CMAKE-SCRIPTS file.
435+
436+----------------------------------------------------
437+
438+cmake_modules/FindJNI.cmake
439+cmake_modules/FindPythonLibs.cmake
440+cmake_modules/FindSWIG.cmake
441+
442+Copyright: 2001-2009 Kitware, Inc.
443+
444+
445+ Distributed under the OSI-approved BSD License (the "License");
446+ see accompanying file Copyright.txt for details.
447+
448+ This software is distributed WITHOUT ANY WARRANTY; without even the
449+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
450+ See the License for more information.
451+
452+ CMake - Cross Platform Makefile Generator
453+ Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
454+ All rights reserved.
455+
456+ Redistribution and use in source and binary forms, with or without
457+ modification, are permitted provided that the following conditions
458+ are met:
459+
460+ * Redistributions of source code must retain the above copyright
461+ notice, this list of conditions and the following disclaimer.
462+
463+ * Redistributions in binary form must reproduce the above copyright
464+ notice, this list of conditions and the following disclaimer in the
465+ documentation and/or other materials provided with the distribution.
466+
467+ * Neither the names of Kitware, Inc., the Insight Software Consortium,
468+ nor the names of their contributors may be used to endorse or promote
469+ products derived from this software without specific prior written
470+ permission.
471+
472+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
473+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
474+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
475+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
476+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
477+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
478+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
479+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
480+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
481+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
482+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
483+
484+ ------------------------------------------------------------------------------
485+
486+ The above copyright and license notice applies to distributions of
487+ CMake in source and binary form. Some source files contain additional
488+ notices of original copyright by their contributors; see each source
489+ for details. Third-party software packages supplied with CMake under
490+ compatible licenses provide their own copyright notices documented in
491+ corresponding subdirectories.
492+
493+ ------------------------------------------------------------------------------
494+
495+ CMake was initially developed by Kitware with the following sponsorship:
496+
497+ * National Library of Medicine at the National Institutes of Health
498+ as part of the Insight Segmentation and Registration Toolkit (ITK).
499+
500+ * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
501+ Visualization Initiative.
502+
503+ * National Alliance for Medical Image Computing (NAMIC) is funded by the
504+ National Institutes of Health through the NIH Roadmap for Medical Research,
505+ Grant U54 EB005149.
506+
507+ * Kitware, Inc.
508+
509+----------------------------------------------------
510+
511+/xml.xsd
512+
513+Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
514+
515+
516+ 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.
517+
518+ W3C Software Notice and License
519+
520+ This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
521+
522+ License
523+
524+ 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.
525+
526+ 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:
527+ •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
528+ •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.
529+ •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.)
530+
531+ Disclaimers
532+
533+ 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.
534+
535+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
536+
537+ 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.
538+
539+----------------------------------------------------
540+
541+schemas/xslt-xquery-serialization.xsd
542+
543+Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
544+
545+
546+ 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.
547+
548+ W3C Software Notice and License
549+
550+ This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
551+
552+ License
553+
554+ 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.
555+
556+ 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:
557+ •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
558+ •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.
559+ •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.)
560+
561+ Disclaimers
562+
563+ 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.
564+
565+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
566+
567+ 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.
568+
569+----------------------------------------------------
570+
571+modules/w3c/xpath-functions.xsd
572+
573+Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
574+
575+
576+ 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.
577+
578+ W3C Software Notice and License
579+
580+ This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
581+
582+ License
583+
584+ 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.
585+
586+ 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:
587+ •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
588+ •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.
589+ •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.)
590+
591+ Disclaimers
592+
593+ 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.
594+
595+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
596+
597+ 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.
598+
599+----------------------------------------------------
600+
601+include/xqc.h
602+
603+Copyright: 2008, Matthias Brantner, John Snelson
604+
605+
606+ * All rights reserved.
607+ *
608+ * Redistribution and use in source and binary forms, with or without
609+ * modification, are permitted provided that the following conditions are met:
610+ *
611+ * * Redistributions of source code must retain the above copyright notice,
612+ * this list of conditions and the following disclaimer.
613+ * * Redistributions in binary form must reproduce the above copyright
614+ * notice, this list of conditions and the following disclaimer in the
615+ * documentation and/or other materials provided with the distribution.
616+ * * Neither the name of the developers nor the names of contributors may be
617+ * used to endorse or promote products derived from this software without
618+ * specific prior written permission.
619+ *
620+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
621+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
622+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
623+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
624+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
625+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
626+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
627+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
628+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
629+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
630+ * POSSIBILITY OF SUCH DAMAGE.
631+
632+----------------------------------------------------
633+
634+modules/functx/functx.xq
635+
636+Copyright: 2007 Datypic
637+
638+
639+ : This library is free software; you can redistribute it and/or
640+ : modify it under the terms of the GNU Lesser General Public
641+ : License as published by the Free Software Foundation; either
642+ : version 2.1 of the License.
643+
644+ : This library is distributed in the hope that it will be useful,
645+ : but WITHOUT ANY WARRANTY; without even the implied warranty of
646+ : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
647+ : Lesser General Public License for more details.
648+
649+ : You should have received a copy of the GNU Lesser General Public
650+ : License along with this library; if not, write to the Free Software
651+ : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
652+
653+----------------------------------------------------
654+
655+src/compiler/parser/FlexLexer.h
656+
657+Copyright: 1993 The Regents of the University of California
658+
659+
660+ // All rights reserved.
661+ //
662+ // This code is derived from software contributed to Berkeley by
663+ // Kent Williams and Tom Epperly.
664+ //
665+ // Redistribution and use in source and binary forms, with or without
666+ // modification, are permitted provided that the following conditions
667+ // are met:
668+
669+ // 1. Redistributions of source code must retain the above copyright
670+ // notice, this list of conditions and the following disclaimer.
671+ // 2. Redistributions in binary form must reproduce the above copyright
672+ // notice, this list of conditions and the following disclaimer in the
673+ // documentation and/or other materials provided with the distribution.
674+
675+ // Neither the name of the University nor the names of its contributors
676+ // may be used to endorse or promote products derived from this software
677+ // without specific prior written permission.
678+
679+ // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
680+ // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
681+ // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
682+ // PURPOSE.
683+
684+----------------------------------------------------
685+
686+src/diagnostics/StackWalker.cpp
687+src/diagnostics/StackWalker.h
688+
689+Copyright: 2005 Jochen Kalmbach
690+
691+
692+ Under BSD License: http://www.opensource.org/licenses/bsd-license.php
693+
694+----------------------------------------------------
695+
696+src/util/singleton.h
697+src/util/threads.h
698+
699+Copyright: 2001 Andrei Alexandrescu
700+
701+
702+ This code accompanies the book:
703+ Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
704+ Patterns Applied". Copyright (c) 2001. Addison-Wesley.
705+ Permission to use, copy, modify, distribute and sell this software for any
706+ purpose is hereby granted without fee, provided that the above copyright
707+ notice appear in all copies and that both that copyright notice and this
708+ permission notice appear in supporting documentation.
709+ The author or Addison-Wesley Longman make no representations about the
710+ suitability of this software for any purpose. It is provided "as is"
711+ without express or implied warranty.
712+
713+
714+External libraries used by this project:
715+----------------------------------------------------
716+
717+Name: LIBXML2
718+Preferred version: 2.2.16 or higher
719+Is mandatory: true
720+Website: http://xmlsoft.org/
721+License: MIT
722+Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
723+External notice:
724+
725+ 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:
726+
727+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
728+
729+ 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.
730+
731+ Except as contained in this notice, the name of Daniel Veillard shall not
732+ be used in advertising or otherwise to promote the sale, use or other deal-
733+ ings in this Software without prior written authorization from him.
734+
735+----------------------------------------------------
736+
737+Name: LIBXSLT
738+Preferred version: 1.1.26
739+Is mandatory: false
740+Website: http://xmlsoft.org/XSLT/
741+License: MIT
742+Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
743+External notice:
744+
745+ 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:
746+
747+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
748+
749+ 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.
750+
751+
752+ 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.
753+
754+
755+----------------------------------------------------
756+
757+Name: ICU4C
758+Preferred version: 3.6 or higher
759+Is mandatory: true
760+Website: http://www.icu-project.org/
761+License: ICU License
762+Copyright: 1995-2011 International Business Machines Corporation and others
763+External notice:
764+
765+ 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.
766+
767+ 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.
768+
769+ 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.
770+
771+----------------------------------------------------
772+
773+Name: CURL
774+Preferred version: above 7.12
775+Is mandatory: false
776+Website: http://curl.haxx.se/
777+License: MIT/X derivate license
778+Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
779+External notice:
780+
781+ All rights reserved.
782+
783+ Permission to use, copy, modify, and distribute this software for any purpose
784+ with or without fee is hereby granted, provided that the above copyright
785+ notice and this permission notice appear in all copies.
786+
787+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
788+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
789+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
790+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
791+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
792+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
793+ OR OTHER DEALINGS IN THE SOFTWARE.
794+
795+ Except as contained in this notice, the name of a copyright holder shall not
796+ be used in advertising or otherwise to promote the sale, use or other dealings
797+ in this Software without prior written authorization of the copyright holder.
798+
799+----------------------------------------------------
800+
801+Name: ICONV
802+Preferred version: above 1.12
803+Is mandatory: true
804+Website: http://www.gnu.org/software/libiconv/
805+License: LGPL
806+Copyright: 1998, 2010 Free Software Foundation, Inc.
807+External notice:
808+
809+----------------------------------------------------
810+
811+Name: ZLIB
812+Preferred version: 1.2.5
813+Is mandatory: true
814+Website: http://www.zlib.net/
815+Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
816+External notice:
817+
818+ This software is provided 'as-is', without any express or implied
819+ warranty. In no event will the authors be held liable for any damages
820+ arising from the use of this software.
821+
822+ Permission is granted to anyone to use this software for any purpose,
823+ including commercial applications, and to alter it and redistribute it
824+ freely, subject to the following restrictions:
825+
826+ 1. The origin of this software must not be misrepresented; you must not
827+ claim that you wrote the original software. If you use this software
828+ in a product, an acknowledgment in the product documentation would be
829+ appreciated but is not required.
830+ 2. Altered source versions must be plainly marked as such, and must not be
831+ misrepresented as being the original software.
832+ 3. This notice may not be removed or altered from any source distribution.
833+
834+ Jean-loup Gailly jloup@gzip.org
835+ Mark Adler madler@alumni.caltech.edu
836+
837+----------------------------------------------------
838+
839+Name: XERCES
840+Preferred version: 2.8.0 or higher
841+Is mandatory: true
842+Website: http://xerces.apache.org/xerces-c/
843+License: Apache 2
844+Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
845+External notice:
846+
847+ http://www.apache.org/licenses/LICENSE-2.0
848+
849+----------------------------------------------------
850+
851+Name: BOOST (boost_filesystem)
852+Preferred version: 1.32 or higher
853+Is mandatory: false
854+Website: http://www.boost.org/
855+License: Boost Software License v1.0
856+Copyright:
857+ Beman Dawes, David Abrahams, 1998-2005.
858+ Rene Rivera 2004-2007
859+
860+External notice:
861+
862+ Permission is hereby granted, free of charge, to any person or organization
863+ obtaining a copy of the software and accompanying documentation covered by
864+ this license (the "Software") to use, reproduce, display, distribute,
865+ execute, and transmit the Software, and to prepare derivative works of the
866+ Software, and to permit third-parties to whom the Software is furnished to
867+ do so, all subject to the following:
868+
869+ The copyright notices in the Software and this entire statement, including
870+ the above license grant, this restriction and the following disclaimer,
871+ must be included in all copies of the Software, in whole or in part, and
872+ all derivative works of the Software, unless such copies or derivative
873+ works are solely in the form of machine-executable object code generated by
874+ a source language processor.
875+
876+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
877+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
878+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
879+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
880+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
881+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
882+ DEALINGS IN THE SOFTWARE.
883+
884+
885+External applications used by this project:
886+----------------------------------------------------
887+
888+Name: FLEX
889+Preferred version: 2.5.33
890+Is mandatory: false
891+Website: http://flex.sourceforge.net/
892+Copyright:
893+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
894+ 1990, 1997 The Regents of the University of California. All rights reserved.
895+
896+External notice:
897+
898+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
899+
900+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
901+ 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.
902+
903+ 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.
904+
905+ 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.
906+
907+----------------------------------------------------
908+
909+Name: BISON
910+Preferred version: 2.4 or higher
911+Is mandatory: false
912+Website: http://www.gnu.org/software/bison/
913+License: GPL
914+Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
915+External notice:
916+
917+----------------------------------------------------
918+
919+Name: DOXYGEN
920+Preferred version: v1.7.4
921+Is mandatory: false
922+Website: www.doxygen.org
923+License: GPL
924+Copyright: 1997-2011 by Dimitri van Heesch
925+External notice:
926+
927+ Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
928+ No representations are made about the suitability of this software for any purpose.
929+ It is provided "as is" without express or implied warranty.
930+ See the GNU General Public License for more details.
931+
932+ Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
933+
934+----------------------------------------------------
935+
936+Name: CMAKE
937+Preferred version: 2.8.4
938+Is mandatory: true
939+Website: http://www.cmake.org/
940+License: Creative Commons Attribution-NoDerivs 3.0 Unported License
941+Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
942+External notice:
943+
944+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
945+
946+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
947+
948+ 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.
949+
950+ 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.
951+
952+ 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.
953+
954+----------------------------------------------------
955+
956+Name: SWIG
957+Preferred version: 2.0.4 or above
958+Is mandatory: false
959+Website: http://www.swig.org/
960+License: GPL
961+Copyright:
962+ 1995-2011 The SWIG Developers
963+ 2005-2006 Arizona Board of Regents (University of Arizona).
964+ 1998-2005 University of Chicago.
965+ 1995-1998 The University of Utah and the Regents of the University of California
966+
967+External notice:
968+
969+ SWIG is free software: you can redistribute it and/or modify it
970+ under the terms of the GNU General Public License as published by
971+ the Free Software Foundation, either version 3 of the License, or
972+ (at your option) any later version. See the LICENSE-GPL file for
973+ the full terms of the GNU General Public license version 3.
974+
975+ Portions of SWIG are also licensed under the terms of the licenses
976+ in the file LICENSE-UNIVERSITIES. You must observe the terms of
977+ these licenses, as well as the terms of the GNU General Public License,
978+ when you distribute SWIG.
979+
980+ The SWIG library and examples, under the Lib and Examples top level
981+ directories, are distributed under the following terms:
982+
983+ You may copy, modify, distribute, and make derivative works based on
984+ this software, in source code or object code form, without
985+ restriction. If you distribute the software to others, you may do
986+ so according to the terms of your choice. This software is offered as
987+ is, without warranty of any kind.
988+
989+ See the COPYRIGHT file for a list of contributors to SWIG and their
990+ copyright notices.
991+
992\ No newline at end of file
993
994=== removed file 'NOTICE.txt'
995--- NOTICE.txt 2011-10-19 15:28:51 +0000
996+++ NOTICE.txt 1970-01-01 00:00:00 +0000
997@@ -1,740 +0,0 @@
998------------
999-Zorba 2.0.1
1000------------
1001-
1002-(Note: This file is generated automatically from NOTICE.xml.
1003-Please do not modify this file directly.)
1004-
1005-
1006-
1007-
1008-Apache 2
1009-
1010- Copyright 2006-2011 The FLWOR Foundation
1011-
1012- See LICENSE.txt for license information.
1013-
1014- ------------------------
1015- This product includes software developed at
1016- The FLWOR Foundation (http://www.flworfound.org/).
1017-
1018- ------------------------
1019- Portions of this software were developed at the Systems
1020- Group of the ETH Zurich, Switzerland.
1021-
1022-
1023-Other files used by this project:
1024-----------------------------------------------------
1025-
1026-src/zorbatypes/m_apm.h
1027-src/zorbatypes/mapm/
1028-
1029-Copyright: 1999-2007 Michael C. Ring
1030-Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
1031-
1032- This software is Freeware.
1033-
1034- Permission to use, copy, and distribute this software and its
1035- documentation for any purpose with or without fee is hereby granted,
1036- provided that the above copyright notice appear in all copies and
1037- that both that copyright notice and this permission notice appear
1038- in supporting documentation.
1039-
1040- Permission to modify the software is granted. Permission to distribute
1041- the modified code is granted. Modifications are to be distributed by
1042- using the file 'license.txt' as a template to modify the file header.
1043- 'license.txt' is available in the official MAPM distribution.
1044-
1045- To distribute modified source code, insert the file 'license.txt'
1046- at the top of all modified source code files and edit accordingly.
1047-
1048- This software is provided "as is" without express or implied warranty.
1049-
1050-----------------------------------------------------
1051-
1052-src/zorbamisc/config/stdint.h
1053-
1054-Copyright: 2006 Alexander Chemeris
1055-
1056-
1057- Redistribution and use in source and binary forms, with or without
1058- modification, are permitted provided that the following conditions are met:
1059-
1060- 1. Redistributions of source code must retain the above copyright notice,
1061- this list of conditions and the following disclaimer.
1062-
1063- 2. Redistributions in binary form must reproduce the above copyright
1064- notice, this list of conditions and the following disclaimer in the
1065- documentation and/or other materials provided with the distribution.
1066-
1067- 3. The name of the author may be used to endorse or promote products
1068- derived from this software without specific prior written permission.
1069-
1070- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
1071- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1072- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
1073- EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1074- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1075- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
1076- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1077- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1078- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1079- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1080-
1081-----------------------------------------------------
1082-
1083-src/zorbautils/stemmer/
1084-
1085-Copyright: 2001 Dr. Martin Porter
1086-
1087-
1088- All the software given out on this Snowball site is covered by the BSD
1089- License (see http://www.opensource.org/licenses/bsd-license.html), with
1090- Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
1091- Copyright (c) 2002, Richard Boulton.
1092-
1093- Essentially, all this means is that you can do what you like with the code,
1094- except claim another Copyright for it, or claim that it is issued under a
1095- different license. The software is also issued without warranties, which
1096- means that if anyone suffers through its use, they cannot come back and sue
1097- you. You also have to alert anyone to whom you give the Snowball software to
1098- the fact that it is covered by the BSD license.
1099-
1100- We have not bothered to insert the licensing arrangement into the text of
1101- the Snowball software.
1102-
1103-----------------------------------------------------
1104-
1105-src/util/less.h
1106-
1107-Copyright: 1998 Paul J. Lucas
1108-
1109-
1110- Redistribution and use in source and binary forms, with or without
1111- modification, are permitted provided that the following conditions are met:
1112-
1113- o Redistributions of source code must retain the above copyright notice,
1114- this list of conditions and the following disclaimer.
1115-
1116- o Redistributions in binary form must reproduce the above copyright
1117- notice, this list of conditions and the following disclaimer in the
1118- documentation and/or other materials provided with the distribution.
1119-
1120- o The name of the author may not be used to endorse or promote products
1121- derived from this software without specific prior written permission.
1122-
1123- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1124- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1125- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1126- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
1127- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1128- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1129- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1130- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1131- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1132- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1133- POSSIBILITY OF SUCH DAMAGE.
1134-
1135-----------------------------------------------------
1136-
1137-src/util/auto_vector.h (has been modified)
1138-
1139-Copyright: 2003 Reliable Software
1140-
1141-
1142- Redistribution and use in source and binary forms, with or without
1143- modification, are permitted provided that the following conditions are met:
1144-
1145- o Redistributions of source code must retain the above copyright notice,
1146- this list of conditions and the following disclaimer.
1147-
1148- o Redistributions in binary form must reproduce the above copyright
1149- notice, this list of conditions and the following disclaimer in the
1150- documentation and/or other materials provided with the distribution.
1151-
1152- o The name of the author may not be used to endorse or promote products
1153- derived from this software without specific prior written permission.
1154-
1155- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1156- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1157- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1158- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
1159- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1160- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1161- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1162- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1163- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1164- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1165- POSSIBILITY OF SUCH DAMAGE.
1166-
1167-----------------------------------------------------
1168-
1169-cmake_modules/FindBoost.cmake
1170-
1171-Copyright:
1172- 2006-2008 Andreas Schneider <mail@cynapses.org>
1173- 2007 Wengo
1174- 2007 Mike Jackson
1175- 2008 Andreas Pakulat <apaku@gmx.de>
1176-
1177-
1178-
1179- Redistribution AND use is allowed according to the terms of the New BSD license.
1180- For details see the accompanying COPYING-CMAKE-SCRIPTS file.
1181-
1182-----------------------------------------------------
1183-
1184-cmake_modules/FindJNI.cmake
1185-cmake_modules/FindPythonLibs.cmake
1186-cmake_modules/FindSWIG.cmake
1187-
1188-Copyright: 2001-2009 Kitware, Inc.
1189-
1190-
1191- Distributed under the OSI-approved BSD License (the "License");
1192- see accompanying file Copyright.txt for details.
1193-
1194- This software is distributed WITHOUT ANY WARRANTY; without even the
1195- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1196- See the License for more information.
1197-
1198- CMake - Cross Platform Makefile Generator
1199- Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
1200- All rights reserved.
1201-
1202- Redistribution and use in source and binary forms, with or without
1203- modification, are permitted provided that the following conditions
1204- are met:
1205-
1206- * Redistributions of source code must retain the above copyright
1207- notice, this list of conditions and the following disclaimer.
1208-
1209- * Redistributions in binary form must reproduce the above copyright
1210- notice, this list of conditions and the following disclaimer in the
1211- documentation and/or other materials provided with the distribution.
1212-
1213- * Neither the names of Kitware, Inc., the Insight Software Consortium,
1214- nor the names of their contributors may be used to endorse or promote
1215- products derived from this software without specific prior written
1216- permission.
1217-
1218- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1219- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1220- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1221- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1222- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1223- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1224- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1225- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1226- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1227- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1228- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1229-
1230- ------------------------------------------------------------------------------
1231-
1232- The above copyright and license notice applies to distributions of
1233- CMake in source and binary form. Some source files contain additional
1234- notices of original copyright by their contributors; see each source
1235- for details. Third-party software packages supplied with CMake under
1236- compatible licenses provide their own copyright notices documented in
1237- corresponding subdirectories.
1238-
1239- ------------------------------------------------------------------------------
1240-
1241- CMake was initially developed by Kitware with the following sponsorship:
1242-
1243- * National Library of Medicine at the National Institutes of Health
1244- as part of the Insight Segmentation and Registration Toolkit (ITK).
1245-
1246- * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
1247- Visualization Initiative.
1248-
1249- * National Alliance for Medical Image Computing (NAMIC) is funded by the
1250- National Institutes of Health through the NIH Roadmap for Medical Research,
1251- Grant U54 EB005149.
1252-
1253- * Kitware, Inc.
1254-
1255-----------------------------------------------------
1256-
1257-/xml.xsd
1258-
1259-Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
1260-
1261-
1262- 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.
1263-
1264- W3C Software Notice and License
1265-
1266- This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
1267-
1268- License
1269-
1270- 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.
1271-
1272- 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:
1273- •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
1274- •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.
1275- •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.)
1276-
1277- Disclaimers
1278-
1279- 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.
1280-
1281- COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
1282-
1283- 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.
1284-
1285-----------------------------------------------------
1286-
1287-schemas/xslt-xquery-serialization.xsd
1288-
1289-Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
1290-
1291-
1292- 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.
1293-
1294- W3C Software Notice and License
1295-
1296- This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
1297-
1298- License
1299-
1300- 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.
1301-
1302- 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:
1303- •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
1304- •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.
1305- •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.)
1306-
1307- Disclaimers
1308-
1309- 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.
1310-
1311- COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
1312-
1313- 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.
1314-
1315-----------------------------------------------------
1316-
1317-modules/w3c/xpath-functions.xsd
1318-
1319-Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
1320-
1321-
1322- 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.
1323-
1324- W3C Software Notice and License
1325-
1326- This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
1327-
1328- License
1329-
1330- 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.
1331-
1332- 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:
1333- •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
1334- •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.
1335- •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.)
1336-
1337- Disclaimers
1338-
1339- 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.
1340-
1341- COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
1342-
1343- 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.
1344-
1345-----------------------------------------------------
1346-
1347-include/xqc.h
1348-
1349-Copyright: 2008, Matthias Brantner, John Snelson
1350-
1351-
1352- * All rights reserved.
1353- *
1354- * Redistribution and use in source and binary forms, with or without
1355- * modification, are permitted provided that the following conditions are met:
1356- *
1357- * * Redistributions of source code must retain the above copyright notice,
1358- * this list of conditions and the following disclaimer.
1359- * * Redistributions in binary form must reproduce the above copyright
1360- * notice, this list of conditions and the following disclaimer in the
1361- * documentation and/or other materials provided with the distribution.
1362- * * Neither the name of the developers nor the names of contributors may be
1363- * used to endorse or promote products derived from this software without
1364- * specific prior written permission.
1365- *
1366- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1367- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1368- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1369- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
1370- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1371- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1372- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1373- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1374- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1375- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1376- * POSSIBILITY OF SUCH DAMAGE.
1377-
1378-----------------------------------------------------
1379-
1380-modules/functx/functx.xq
1381-
1382-Copyright: 2007 Datypic
1383-
1384-
1385- : This library is free software; you can redistribute it and/or
1386- : modify it under the terms of the GNU Lesser General Public
1387- : License as published by the Free Software Foundation; either
1388- : version 2.1 of the License.
1389-
1390- : This library is distributed in the hope that it will be useful,
1391- : but WITHOUT ANY WARRANTY; without even the implied warranty of
1392- : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1393- : Lesser General Public License for more details.
1394-
1395- : You should have received a copy of the GNU Lesser General Public
1396- : License along with this library; if not, write to the Free Software
1397- : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1398-
1399-----------------------------------------------------
1400-
1401-src/compiler/parser/FlexLexer.h
1402-
1403-Copyright: 1993 The Regents of the University of California
1404-
1405-
1406- // All rights reserved.
1407- //
1408- // This code is derived from software contributed to Berkeley by
1409- // Kent Williams and Tom Epperly.
1410- //
1411- // Redistribution and use in source and binary forms, with or without
1412- // modification, are permitted provided that the following conditions
1413- // are met:
1414-
1415- // 1. Redistributions of source code must retain the above copyright
1416- // notice, this list of conditions and the following disclaimer.
1417- // 2. Redistributions in binary form must reproduce the above copyright
1418- // notice, this list of conditions and the following disclaimer in the
1419- // documentation and/or other materials provided with the distribution.
1420-
1421- // Neither the name of the University nor the names of its contributors
1422- // may be used to endorse or promote products derived from this software
1423- // without specific prior written permission.
1424-
1425- // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1426- // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1427- // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1428- // PURPOSE.
1429-
1430-----------------------------------------------------
1431-
1432-src/diagnostics/StackWalker.cpp
1433-src/diagnostics/StackWalker.h
1434-
1435-Copyright: 2005 Jochen Kalmbach
1436-
1437-
1438- Under BSD License: http://www.opensource.org/licenses/bsd-license.php
1439-
1440-----------------------------------------------------
1441-
1442-src/util/singleton.h
1443-src/util/threads.h
1444-
1445-Copyright: 2001 Andrei Alexandrescu
1446-
1447-
1448- This code accompanies the book:
1449- Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
1450- Patterns Applied". Copyright (c) 2001. Addison-Wesley.
1451- Permission to use, copy, modify, distribute and sell this software for any
1452- purpose is hereby granted without fee, provided that the above copyright
1453- notice appear in all copies and that both that copyright notice and this
1454- permission notice appear in supporting documentation.
1455- The author or Addison-Wesley Longman make no representations about the
1456- suitability of this software for any purpose. It is provided "as is"
1457- without express or implied warranty.
1458-
1459-
1460-External libraries used by this project:
1461-----------------------------------------------------
1462-
1463-Name: LIBXML2
1464-Preferred version: 2.2.16 or higher
1465-Is mandatory: true
1466-Website: http://xmlsoft.org/
1467-License: MIT
1468-Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
1469-External notice:
1470-
1471- 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:
1472-
1473- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1474-
1475- 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.
1476-
1477- Except as contained in this notice, the name of Daniel Veillard shall not
1478- be used in advertising or otherwise to promote the sale, use or other deal-
1479- ings in this Software without prior written authorization from him.
1480-
1481-----------------------------------------------------
1482-
1483-Name: LIBXSLT
1484-Preferred version: 1.1.26
1485-Is mandatory: false
1486-Website: http://xmlsoft.org/XSLT/
1487-License: MIT
1488-Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
1489-External notice:
1490-
1491- 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:
1492-
1493- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1494-
1495- 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.
1496-
1497-
1498- 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.
1499-
1500-
1501-----------------------------------------------------
1502-
1503-Name: ICU4C
1504-Preferred version: 3.6 or higher
1505-Is mandatory: true
1506-Website: http://www.icu-project.org/
1507-License: ICU License
1508-Copyright: 1995-2011 International Business Machines Corporation and others
1509-External notice:
1510-
1511- 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.
1512-
1513- 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.
1514-
1515- 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.
1516-
1517-----------------------------------------------------
1518-
1519-Name: CURL
1520-Preferred version: above 7.12
1521-Is mandatory: false
1522-Website: http://curl.haxx.se/
1523-License: MIT/X derivate license
1524-Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
1525-External notice:
1526-
1527- All rights reserved.
1528-
1529- Permission to use, copy, modify, and distribute this software for any purpose
1530- with or without fee is hereby granted, provided that the above copyright
1531- notice and this permission notice appear in all copies.
1532-
1533- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1534- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1535- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
1536- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1537- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1538- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
1539- OR OTHER DEALINGS IN THE SOFTWARE.
1540-
1541- Except as contained in this notice, the name of a copyright holder shall not
1542- be used in advertising or otherwise to promote the sale, use or other dealings
1543- in this Software without prior written authorization of the copyright holder.
1544-
1545-----------------------------------------------------
1546-
1547-Name: ICONV
1548-Preferred version: above 1.12
1549-Is mandatory: true
1550-Website: http://www.gnu.org/software/libiconv/
1551-License: LGPL
1552-Copyright: 1998, 2010 Free Software Foundation, Inc.
1553-External notice:
1554-
1555-----------------------------------------------------
1556-
1557-Name: ZLIB
1558-Preferred version: 1.2.5
1559-Is mandatory: true
1560-Website: http://www.zlib.net/
1561-Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
1562-External notice:
1563-
1564- This software is provided 'as-is', without any express or implied
1565- warranty. In no event will the authors be held liable for any damages
1566- arising from the use of this software.
1567-
1568- Permission is granted to anyone to use this software for any purpose,
1569- including commercial applications, and to alter it and redistribute it
1570- freely, subject to the following restrictions:
1571-
1572- 1. The origin of this software must not be misrepresented; you must not
1573- claim that you wrote the original software. If you use this software
1574- in a product, an acknowledgment in the product documentation would be
1575- appreciated but is not required.
1576- 2. Altered source versions must be plainly marked as such, and must not be
1577- misrepresented as being the original software.
1578- 3. This notice may not be removed or altered from any source distribution.
1579-
1580- Jean-loup Gailly jloup@gzip.org
1581- Mark Adler madler@alumni.caltech.edu
1582-
1583-----------------------------------------------------
1584-
1585-Name: XERCES
1586-Preferred version: 2.8.0 or higher
1587-Is mandatory: true
1588-Website: http://xerces.apache.org/xerces-c/
1589-License: Apache 2
1590-Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
1591-External notice:
1592-
1593- http://www.apache.org/licenses/LICENSE-2.0
1594-
1595-----------------------------------------------------
1596-
1597-Name: BOOST (boost_filesystem)
1598-Preferred version: 1.32 or higher
1599-Is mandatory: false
1600-Website: http://www.boost.org/
1601-License: Boost Software License v1.0
1602-Copyright:
1603- Beman Dawes, David Abrahams, 1998-2005.
1604- Rene Rivera 2004-2007
1605-
1606-External notice:
1607-
1608- Permission is hereby granted, free of charge, to any person or organization
1609- obtaining a copy of the software and accompanying documentation covered by
1610- this license (the "Software") to use, reproduce, display, distribute,
1611- execute, and transmit the Software, and to prepare derivative works of the
1612- Software, and to permit third-parties to whom the Software is furnished to
1613- do so, all subject to the following:
1614-
1615- The copyright notices in the Software and this entire statement, including
1616- the above license grant, this restriction and the following disclaimer,
1617- must be included in all copies of the Software, in whole or in part, and
1618- all derivative works of the Software, unless such copies or derivative
1619- works are solely in the form of machine-executable object code generated by
1620- a source language processor.
1621-
1622- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1623- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1624- FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
1625- SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
1626- FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
1627- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1628- DEALINGS IN THE SOFTWARE.
1629-
1630-
1631-External applications used by this project:
1632-----------------------------------------------------
1633-
1634-Name: FLEX
1635-Preferred version: 2.5.33
1636-Is mandatory: false
1637-Website: http://flex.sourceforge.net/
1638-Copyright:
1639- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
1640- 1990, 1997 The Regents of the University of California. All rights reserved.
1641-
1642-External notice:
1643-
1644- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1645-
1646- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1647- 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.
1648-
1649- 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.
1650-
1651- 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.
1652-
1653-----------------------------------------------------
1654-
1655-Name: BISON
1656-Preferred version: 2.4 or higher
1657-Is mandatory: false
1658-Website: http://www.gnu.org/software/bison/
1659-License: GPL
1660-Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1661-External notice:
1662-
1663-----------------------------------------------------
1664-
1665-Name: DOXYGEN
1666-Preferred version: v1.7.4
1667-Is mandatory: false
1668-Website: www.doxygen.org
1669-License: GPL
1670-Copyright: 1997-2011 by Dimitri van Heesch
1671-External notice:
1672-
1673- Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
1674- No representations are made about the suitability of this software for any purpose.
1675- It is provided "as is" without express or implied warranty.
1676- See the GNU General Public License for more details.
1677-
1678- Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
1679-
1680-----------------------------------------------------
1681-
1682-Name: CMAKE
1683-Preferred version: 2.8.4
1684-Is mandatory: true
1685-Website: http://www.cmake.org/
1686-License: Creative Commons Attribution-NoDerivs 3.0 Unported License
1687-Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
1688-External notice:
1689-
1690- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1691-
1692- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1693-
1694- 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.
1695-
1696- 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.
1697-
1698- 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.
1699-
1700-----------------------------------------------------
1701-
1702-Name: SWIG
1703-Preferred version: 2.0.4 or above
1704-Is mandatory: false
1705-Website: http://www.swig.org/
1706-License: GPL
1707-Copyright:
1708- 1995-2011 The SWIG Developers
1709- 2005-2006 Arizona Board of Regents (University of Arizona).
1710- 1998-2005 University of Chicago.
1711- 1995-1998 The University of Utah and the Regents of the University of California
1712-
1713-External notice:
1714-
1715- SWIG is free software: you can redistribute it and/or modify it
1716- under the terms of the GNU General Public License as published by
1717- the Free Software Foundation, either version 3 of the License, or
1718- (at your option) any later version. See the LICENSE-GPL file for
1719- the full terms of the GNU General Public license version 3.
1720-
1721- Portions of SWIG are also licensed under the terms of the licenses
1722- in the file LICENSE-UNIVERSITIES. You must observe the terms of
1723- these licenses, as well as the terms of the GNU General Public License,
1724- when you distribute SWIG.
1725-
1726- The SWIG library and examples, under the Lib and Examples top level
1727- directories, are distributed under the following terms:
1728-
1729- You may copy, modify, distribute, and make derivative works based on
1730- this software, in source code or object code form, without
1731- restriction. If you distribute the software to others, you may do
1732- so according to the terms of your choice. This software is offered as
1733- is, without warranty of any kind.
1734-
1735- See the COPYRIGHT file for a list of contributors to SWIG and their
1736- copyright notices.
1737-
1738\ No newline at end of file
1739
1740=== modified file 'bin/CMakeLists.txt'
1741--- bin/CMakeLists.txt 2011-08-05 02:21:55 +0000
1742+++ bin/CMakeLists.txt 2012-02-02 04:30:26 +0000
1743@@ -15,33 +15,38 @@
1744 INCLUDE_DIRECTORIES(AFTER ${CMAKE_SOURCE_DIR}/src/)
1745 INCLUDE_DIRECTORIES(AFTER ${CMAKE_CURRENT_SOURCE_DIR})
1746
1747-IF(ZORBA_WITH_DEBUGGER_CLIENT)
1748- CONFIGURE_FILE (debug_client/event_handler_init.cpp.in debug_client/event_handler_init.cpp)
1749-
1750- SET(DEBUG_CLIENT_SRCS
1751- debug_client/tuple.h
1752- debug_client/main.cpp
1753- debug_client/debug_command.h
1754- debug_client/debug_command.cpp
1755- debug_client/command_line_handler.h
1756- debug_client/command_line_handler.cpp
1757- debug_client/lock_free_queue.h
1758- debug_client/event_handler.h
1759- debug_client/event_handler.cpp
1760- ${CMAKE_CURRENT_BINARY_DIR}/debug_client/event_handler_init.cpp
1761+IF (ZORBA_WITH_DEBUGGER)
1762+ IF (NOT WIN32)
1763+ FIND_PACKAGE (Libedit)
1764+ IF (LIBEDIT_FOUND)
1765+ INCLUDE_DIRECTORIES (${LIBEDIT_INCLUDE_DIRS})
1766+ SET (LIBEDIT_LIBS ${LIBEDIT_LIBRARIES})
1767+ SET (ZORBA_HAVE_LIBEDIT_H ${LIBEDIT_FOUND})
1768+ ENDIF (LIBEDIT_FOUND)
1769+ ENDIF (NOT WIN32)
1770+
1771+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/debugger/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/debugger/config.h)
1772+ MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/debugger/config.h.cmake --> ${CMAKE_CURRENT_BINARY_DIR}/debugger/config.h")
1773+ INCLUDE_DIRECTORIES (BEFORE ${CMAKE_CURRENT_BINARY_DIR}/debugger)
1774+
1775+ SET (DEBUG_CLIENT_SRCS
1776+ debugger/main.cpp
1777+ debugger/xqdb_client.cpp
1778+ debugger/process_listener.cpp
1779+ debugger/command_prompt.cpp
1780+ debugger/command_line_handler.cpp
1781+ debugger/event_handler.cpp
1782 )
1783
1784- CONFIGURE_FILE (debug_client/message-handler.xq message-handler.xq)
1785-
1786- ZORBA_GENERATE_EXE("debuggercmd" "${DEBUG_CLIENT_SRCS}" "" "debugger" "bin")
1787-ENDIF(ZORBA_WITH_DEBUGGER_CLIENT)
1788+ ZORBA_GENERATE_EXE ("xqdb" "${DEBUG_CLIENT_SRCS}" "${LIBEDIT_LIBS}" "xqdb" "bin")
1789+ENDIF (ZORBA_WITH_DEBUGGER)
1790
1791 SET(SRCS
1792 zorbacmd.cpp
1793 zorbacmdproperties.cpp
1794 error_printer.cpp
1795 util.cpp
1796- module_path.cpp
1797+ path_util.cpp
1798 )
1799
1800 INCLUDE("${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake")
1801@@ -84,3 +89,37 @@
1802 # test the --option option to set an option in the static context
1803 ZORBA_ADD_TEST(bin/zorba_option zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/test/option.xq" -f --option "{http://www.zorba-xquery.com}option=value")
1804 ZORBA_SET_TEST_PROPERTY(bin/zorba_option PASS_REGULAR_EXPRESSION "value")
1805+
1806+# test the --uri-path, --lib-path, and --module-path args.
1807+# Use the versioning tests as they utilize test modules already.
1808+SET (_testdir
1809+ "${CMAKE_CURRENT_SOURCE_DIR}/../test/rbkt/Queries/zorba/versioning")
1810+SET (_uridir "${CMAKE_BINARY_DIR}/TEST_URI_PATH")
1811+SET (_libdir "${CMAKE_BINARY_DIR}/TEST_LIB_PATH")
1812+ZORBA_ADD_TEST(bin/zorba_uri_path_1 zorbacmd -f -q "${_testdir}/import1.xq"
1813+ --uri-path "${_uridir}")
1814+ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_1
1815+ PASS_REGULAR_EXPRESSION "hello, v2")
1816+
1817+ZORBA_ADD_TEST(bin/zorba_uri_path_2 zorbacmd -f -q "${_testdir}/external1.xq"
1818+ --uri-path "${_uridir}")
1819+ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_2
1820+ PASS_REGULAR_EXPRESSION "ZXQP0008")
1821+
1822+ZORBA_ADD_TEST(bin/zorba_uri_path_3 zorbacmd -f -q "${_testdir}/external1.xq"
1823+ --uri-path "${_uridir}" --lib-path "${_libdir}")
1824+ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_3
1825+ PASS_REGULAR_EXPRESSION "hello, v2")
1826+
1827+IF(WIN32)
1828+ SET(PATH_SEP ";")
1829+ELSE(WIN32)
1830+ SET(PATH_SEP ":")
1831+ENDIF(WIN32)
1832+ZORBA_ADD_TEST(bin/zorba_module_path_1 zorbacmd -f -q "${_testdir}/external1.xq"
1833+ --module-path "${_libdir}${PATH_SEP}${_uridir}")
1834+ZORBA_SET_TEST_PROPERTY(bin/zorba_module_path_1
1835+ PASS_REGULAR_EXPRESSION "hello, v2")
1836+
1837+# test compilation of the perf script
1838+ZORBA_ADD_TEST(bin/zorba_compilechk4 zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/../test/zperf/src/start.xq" -f --compile-only)
1839
1840=== removed file 'bin/debug_client/debug_command.cpp'
1841--- bin/debug_client/debug_command.cpp 2011-07-01 01:53:24 +0000
1842+++ bin/debug_client/debug_command.cpp 1970-01-01 00:00:00 +0000
1843@@ -1,99 +0,0 @@
1844-/*
1845- * Copyright 2006-2008 The FLWOR Foundation.
1846- *
1847- * Licensed under the Apache License, Version 2.0 (the "License");
1848- * you may not use this file except in compliance with the License.
1849- * You may obtain a copy of the License at
1850- *
1851- * http://www.apache.org/licenses/LICENSE-2.0
1852- *
1853- * Unless required by applicable law or agreed to in writing, software
1854- * distributed under the License is distributed on an "AS IS" BASIS,
1855- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1856- * See the License for the specific language governing permissions and
1857- * limitations under the License.
1858- */
1859-#include <iostream>
1860-#include "debug_client/debug_command.h"
1861-
1862-namespace zorba { namespace debugclient {
1863-
1864-
1865- void CommandLine::execute()
1866- {
1867- for (;;) {
1868- std::cout << "zdb>> ";
1869- std::string command;
1870- std::getline(std::cin, command);
1871- std::vector<std::string> args;
1872- args << command;
1873- std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.find(args[0]);
1874- if (lIter == theCommands.end()) {
1875- std::cout << args[0] << ": Command not found" << std::endl;
1876- continue;
1877- }
1878- if (!lIter->second->execute(args))
1879- continue;
1880- return;
1881- }
1882- }
1883-
1884-
1885- CommandLine::~CommandLine()
1886- {
1887- for (std::map<std::string, UntypedCommand*>::iterator i = theCommands.begin();
1888- i != theCommands.end(); ++i)
1889- {
1890- delete i->second;
1891- }
1892- }
1893-
1894- CommandLine& CommandLine::operator<<(UntypedCommand *aCommand)
1895- {
1896- theCommands.insert(std::make_pair(aCommand->get_name(), aCommand));
1897- return *this;
1898- }
1899-}}
1900-
1901-namespace std {
1902- vector<string>& operator<< (vector<string>& vec, const string& str)
1903- {
1904- string::size_type before = 0;
1905- string::size_type pos = str.find(" ", 0);
1906- while (pos != str.npos) {
1907- std::string lSub = str.substr(before, pos - before);
1908- if (lSub[0] == '"') {
1909- std::string::size_type lBeforeCopy = before;
1910- do {
1911- lBeforeCopy = str.find("\"", lBeforeCopy + 1);
1912- } while (pos != str.npos && str.size() > pos + 1 && str[pos + 1] == '\\');
1913- pos = lBeforeCopy;
1914- lSub = str.substr(before + 1, pos - before - 1);
1915- }
1916- vec.push_back(lSub);
1917- before = pos + 1;
1918- pos = str.find(" ", before);
1919- }
1920- std::string lSub = str.substr(before);
1921- if (lSub[0] == '"') {
1922- pos = str.find("\"", before + 1);
1923- lSub = str.substr(before + 1, pos - before - 1);
1924- }
1925- vec.push_back(lSub);
1926- return vec;
1927- }
1928-
1929- set<string>& operator<< (set<string>& vec, const string& str)
1930- {
1931- string::size_type before = 0;
1932- string::size_type pos = str.find(" ", 0);
1933- while (pos != str.npos) {
1934- vec.insert(str.substr(before, pos));
1935- before = pos + 1;
1936- pos = str.find(" ", before);
1937- }
1938- vec.insert(str.substr(before));
1939- return vec;
1940- }
1941-
1942-}
1943
1944=== removed file 'bin/debug_client/event_handler_init.cpp.in'
1945--- bin/debug_client/event_handler_init.cpp.in 2011-07-01 01:53:24 +0000
1946+++ bin/debug_client/event_handler_init.cpp.in 1970-01-01 00:00:00 +0000
1947@@ -1,41 +0,0 @@
1948-/*
1949- * Copyright 2006-2008 The FLWOR Foundation.
1950- *
1951- * Licensed under the Apache License, Version 2.0 (the "License");
1952- * you may not use this file except in compliance with the License.
1953- * You may obtain a copy of the License at
1954- *
1955- * http://www.apache.org/licenses/LICENSE-2.0
1956- *
1957- * Unless required by applicable law or agreed to in writing, software
1958- * distributed under the License is distributed on an "AS IS" BASIS,
1959- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1960- * See the License for the specific language governing permissions and
1961- * limitations under the License.
1962- */
1963-#include <fstream>
1964-#include "debug_client/event_handler.h"
1965-
1966-namespace zorba { namespace debugclient {
1967-
1968- std::istream* EventHandler::getCurrentDirectory() {
1969- const char* build_dir = "@CMAKE_BINARY_DIR@/bin/message-handler.xq";
1970- const char* install_dir =
1971-#ifndef WIN32
1972- "@CMAKE_INSTALL_PREFIX@/bin/";
1973-#else
1974- "C:/Program Files/Zorba XQuery Processor @ZORBA_MAJOR_NUMBER@.@ZORBA_MINOR_NUMBER@.@ZORBA_PATCH_NUMBER@/bin/";
1975-#endif
1976- std::auto_ptr<std::ifstream> stream(new std::ifstream(build_dir));
1977- if (stream->good()) {
1978- return stream.release();
1979- }
1980- stream.reset(new std::ifstream(install_dir));
1981- if (stream->good()) {
1982- return stream.release();
1983- }
1984- return 0;
1985- }
1986-
1987-}} // end of namespace zorba::debugclient
1988-
1989
1990=== removed file 'bin/debug_client/lock_free_queue.cpp'
1991--- bin/debug_client/lock_free_queue.cpp 2011-07-01 01:53:24 +0000
1992+++ bin/debug_client/lock_free_queue.cpp 1970-01-01 00:00:00 +0000
1993@@ -1,16 +0,0 @@
1994-/*
1995- * Copyright 2006-2008 The FLWOR Foundation.
1996- *
1997- * Licensed under the Apache License, Version 2.0 (the "License");
1998- * you may not use this file except in compliance with the License.
1999- * You may obtain a copy of the License at
2000- *
2001- * http://www.apache.org/licenses/LICENSE-2.0
2002- *
2003- * Unless required by applicable law or agreed to in writing, software
2004- * distributed under the License is distributed on an "AS IS" BASIS,
2005- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2006- * See the License for the specific language governing permissions and
2007- * limitations under the License.
2008- */
2009-#include "lock_free_queue.h"
2010
2011=== removed file 'bin/debug_client/message-handler.xq'
2012--- bin/debug_client/message-handler.xq 2011-08-26 23:36:24 +0000
2013+++ bin/debug_client/message-handler.xq 1970-01-01 00:00:00 +0000
2014@@ -1,165 +0,0 @@
2015-(:
2016- : Copyright 2006-2009 The FLWOR Foundation.
2017- :
2018- : Licensed under the Apache License, Version 2.0 (the "License");
2019- : you may not use this file except in compliance with the License.
2020- : You may obtain a copy of the License at
2021- :
2022- : http://www.apache.org/licenses/LICENSE-2.0
2023- :
2024- : Unless required by applicable law or agreed to in writing, software
2025- : distributed under the License is distributed on an "AS IS" BASIS,
2026- : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2027- : See the License for the specific language governing permissions and
2028- : limitations under the License.
2029-:)
2030-
2031-import module namespace refl = 'http://www.zorba-xquery.com/modules/reflection';
2032-import module namespace sctx = "http://www.zorba-xquery.com/modules/introspection/sctx";
2033-import module namespace base64 = "http://www.zorba-xquery.com/modules/converters/base64";
2034-
2035-
2036-declare variable $local:localns as xs:string := 'http://www.w3.org/2005/xquery-local-functions';
2037-
2038-
2039-declare variable $local:endl as xs:string := '
2040-';
2041-
2042-declare function local:has-to-stop($resp as element())
2043-{
2044- fn:not(($resp/@command/data(.) eq "stop" and $resp/@reason/data(.) eq "ok")
2045- or ($resp/@status/data(.) eq "stopped")
2046- or ($resp/@status/data(.) eq "stopping"))
2047-};
2048-
2049-declare function local:status($resp as element())
2050-{
2051- fn:concat(
2052- "Status: ", $resp/@status/data(.), $local:endl,
2053- "Reason: ", $resp/@reason/data(.), $local:endl,
2054- let $msg := $resp/text()
2055- return
2056- if (fn:empty($msg) or $msg eq "") then
2057- ""
2058- else
2059- fn:concat($msg, $local:endl)
2060- )
2061-};
2062-
2063-
2064-declare function local:run($resp as element()) {
2065- if ($resp/@status/data(.) eq "starting") then
2066- "Starting query"
2067- else
2068- local:status($resp)
2069-};
2070-
2071-declare function local:stop($resp as element())
2072-{
2073- local:status($resp)
2074-};
2075-
2076-declare function local:breakpoint_set($resp as element())
2077-{
2078- if ($resp/error) then
2079- fn:concat("Error when setting a breakpoint: ", if ($resp/error/message) then $resp/error/message/text() else concat(" errcode: ", data($resp/error/@code)))
2080- else
2081- fn:concat("set breakpoint with id ", data($resp/@id), " and state ", data($resp/@state))
2082-};
2083-
2084-declare function local:breakpoint_list($resp as element())
2085-{
2086- string-join(
2087- for $b in $resp/breakpoint
2088- return concat("Breakpoint ", data($b/@id), " at ", data($b/@filename), ":", data($b/@lineno), " ", data($b/@state)),
2089- $local:endl
2090- )
2091-};
2092-
2093-declare function local:breakpoint_remove($resp as element())
2094-{
2095- "Breakpoint removed"
2096-};
2097-
2098-declare function local:stack_depth($resp as element())
2099-{
2100- concat("Depth: ", data($resp/@depth))
2101-};
2102-
2103-declare function local:stack_get($resp as element())
2104-{
2105- string-join(
2106- for $s in $resp/stack
2107- return concat("Level ", data($s/@level), " at ", data($s/@filename), ":", data($s/@lineno)),
2108- $local:endl
2109- )
2110-};
2111-
2112-
2113-declare function local:context_names($resp as element())
2114-{
2115- string-join(
2116- for $c in $resp/context
2117- return concat("Context: ", data($c/@name), " id: ", data($c/@id)),
2118- $local:endl
2119- )
2120-};
2121-
2122-declare function local:context_get($resp as element())
2123-{
2124- string-join(
2125- for $p in $resp/property
2126- return concat(data($p/@fullname), ": [", data($p/@type), "]",
2127- if ($p/text() ne "") then concat(": ", base64:decode($p/text())) else ""),
2128- $local:endl
2129- )
2130-};
2131-
2132-declare function local:eval($resp as element())
2133-{
2134- if (data($resp/@success) eq "1") then
2135- local:context_get($resp)
2136- else
2137- concat("Eval failed", ":", $resp/error/message/text())
2138-};
2139-
2140-declare function local:process-response($resp as element())
2141-{
2142- if (data($resp/@command) eq "") then
2143- (fn:true(), $resp/@transaction_id/data(.), local:status($resp))
2144- else
2145- let $fun-cont-name := fn:QName($local:localns, concat("local:", $resp/@command/data(.), "-cont"))
2146- let $fun-msg-name := fn:QName($local:localns, concat("local:", $resp/@command/data(.)))
2147- return (
2148- if (sctx:function-arguments-count($fun-cont-name) = 1) then
2149- refl:invoke($fun-cont-name, $resp)
2150- else
2151- local:has-to-stop($resp),
2152- $resp/@transaction_id/data(.),
2153- if (sctx:function-arguments-count($fun-msg-name) = 1) then
2154- refl:invoke($fun-msg-name, $resp)
2155- else
2156- "Recieved a message - command not implemented"
2157- )
2158-};
2159-
2160-declare function local:process-init($init as element())
2161-{
2162- fn:true(),
2163- 0,
2164- fn:concat(fn:string-join(
2165- ('Established connection with', $init/@language/data(.), 'client', $init/@appid/data(.)), ' '), '
2166-')
2167-};
2168-
2169-declare function local:main($response as element()) {
2170- let $process-fun as xs:QName := fn:QName($local:localns, concat("local:process-", node-name($response)))
2171- return
2172- if (sctx:function-arguments-count($process-fun) = 1) then
2173- refl:invoke($process-fun, $response)
2174- else (
2175- true(),
2176- ($response/@transaction_id, 0)[1]/data(.),
2177- "ERROR: Recieved unknown node from client"
2178- )
2179-};
2180
2181=== renamed directory 'bin/debug_client' => 'bin/debugger'
2182=== renamed file 'bin/debug_client/debug_command.h' => 'bin/debugger/command.h'
2183--- bin/debug_client/debug_command.h 2011-07-04 08:05:46 +0000
2184+++ bin/debugger/command.h 2012-02-02 04:30:26 +0000
2185@@ -14,7 +14,9 @@
2186 * limitations under the License.
2187 */
2188 #pragma once
2189-#include <zorba/config.h>
2190+#ifndef ZORBA_DEBUGGER_COMMAND_H
2191+#define ZORBA_DEBUGGER_COMMAND_H
2192+
2193 #include <string>
2194 #include <vector>
2195 #include <iostream>
2196@@ -23,151 +25,18 @@
2197 #include <sstream>
2198 #include <memory>
2199 #include <typeinfo>
2200-#include "debug_client/tuple.h"
2201-
2202-namespace zorba { namespace debugclient {
2203+
2204+#include <zorba/config.h>
2205+
2206+#include "command_arg.h"
2207+#include "tuple.h"
2208+
2209+
2210+namespace zorba { namespace debugger {
2211
2212 class DebugClientParseException : public std::exception {
2213 };
2214
2215- template<typename Tuple>
2216- class CommandArg;
2217-
2218- template<typename Tuple>
2219- class CommandArgInstance {
2220- public:
2221- virtual int get_index() const = 0;
2222- virtual const CommandArg<Tuple>* get_arg() const = 0;
2223- virtual void insertValue(Tuple& t) = 0;
2224- virtual bool isSet(Tuple& t) const = 0;
2225- };
2226-
2227- template<typename T, int Idx, typename Tuple>
2228- class TypedCommandArgInstance : public CommandArgInstance<Tuple>
2229- {
2230- public:
2231- TypedCommandArgInstance(T aValue, const CommandArg<Tuple>* aArg)
2232- : theValue(aValue), theArg(aArg) {}
2233- virtual int get_index() const { return Idx; }
2234- virtual const CommandArg<Tuple>* get_arg() const { return theArg; }
2235- virtual void insertValue(Tuple& t)
2236- {
2237- ZORBA_TR1_NS::get<Idx>(t).first = true;
2238- ZORBA_TR1_NS::get<Idx>(t).second = theValue;
2239- }
2240- virtual bool isSet(Tuple& t) const
2241- {
2242- return ZORBA_TR1_NS::get<Idx>(t).first;
2243- }
2244- private:
2245- T theValue;
2246- const CommandArg<Tuple>* theArg;
2247- };
2248-
2249- template<typename Tuple>
2250- class CommandArgType {
2251- public:
2252- virtual CommandArgInstance<Tuple>* parse(const std::string& str,
2253- const CommandArg<Tuple>* arg) = 0;
2254- virtual bool isVoid() const = 0;
2255- virtual bool isSet(Tuple& t) const = 0;
2256- virtual ~CommandArgType() {}
2257- };
2258-
2259- template<typename T, int Idx, typename Tuple>
2260- class TypedCommandArgType : public CommandArgType<Tuple> {
2261- public:
2262- typedef T Type;
2263- public: // implementation
2264- TypedCommandArgType(bool aIsVoid) : theIsVoid(aIsVoid) {}
2265- TypedCommandArgType(const T& aValue,
2266- bool aIsVoid)
2267- : theDefault(aValue), theIsVoid(aIsVoid) {}
2268- virtual CommandArgInstance<Tuple>* parse(const std::string& str,
2269- const CommandArg<Tuple>* arg)
2270- {
2271- T aValue;
2272- std::stringstream stream(str);
2273- stream >> aValue;
2274- if (stream.fail()) {
2275- std::cerr << "Could not parse argument of type "
2276- << typeid(T).name()
2277- << std::endl;
2278- return 0;
2279- }
2280- return new TypedCommandArgInstance<T, Idx, Tuple>(aValue, arg);
2281- }
2282- virtual bool isVoid() const { return theIsVoid; }
2283- virtual bool isSet(Tuple& t) const
2284- {
2285- return ZORBA_TR1_NS::get<Idx>(t).first;
2286- }
2287- private:
2288- TypedCommandArgType<T, Idx, Tuple>() {}
2289- T theDefault;
2290- bool theIsVoid;
2291- };
2292-
2293- template<typename Tuple>
2294- class CommandArg {
2295- public:
2296- CommandArg(unsigned aId,
2297- CommandArgType<Tuple>* aType,
2298- const std::set<std::string>& aFlags,
2299- const std::string& aDescription,
2300- bool aIsRequired)
2301- : theId(aId),
2302- theType(aType),
2303- theFlags(aFlags),
2304- theDescription(aDescription),
2305- theIsRequired(aIsRequired)
2306- {
2307- }
2308- ~CommandArg() { delete theType; }
2309- unsigned get_id() const { return theId; }
2310- bool canHandle(const std::string& arg) const
2311- {
2312- if (theFlags.find(arg) != theFlags.end()) {
2313- return true;
2314- }
2315- return false;
2316- }
2317- CommandArgInstance<Tuple>* parse(const std::string& str) const
2318- {
2319- return theType->parse(str, this);
2320- }
2321- bool isVoid() const {
2322- return theType->isVoid();
2323- }
2324- bool isRequired() const { return theIsRequired; }
2325- std::string get_name() const {
2326- return *(theFlags.begin());
2327- }
2328- bool isSet(Tuple& t) const
2329- {
2330- return theType->isSet(t);
2331- }
2332- private:
2333- unsigned theId;
2334- CommandArgType<Tuple>* theType;
2335- std::set<std::string> theFlags;
2336- std::string theDescription;
2337- bool theIsRequired;
2338- };
2339-}} // end namespace zorba
2340-
2341-namespace std {
2342-
2343- /**
2344- * This is a helper split function
2345- */
2346- vector<string>& operator<< (vector<string>& vec, const string& str);
2347-
2348- set<string>& operator<< (set<string>& vec, const string& str);
2349-} //end namespace std
2350-
2351-namespace zorba { namespace debugclient {
2352-
2353 template<typename Func, typename Tuple, int CommandIdx>
2354 class CommandInstance
2355 {
2356@@ -188,8 +57,10 @@
2357
2358 class UntypedCommand {
2359 public:
2360- virtual std::string get_name() const = 0;
2361- virtual std::string get_description() const = 0;
2362+ virtual std::string getName() const = 0;
2363+ virtual std::set<std::string> getAliases() const = 0;
2364+ virtual std::string getDescription() const = 0;
2365+ virtual void printHelp() const = 0;
2366 virtual bool execute(const std::vector<std::string>& args) = 0;
2367 };
2368
2369@@ -197,77 +68,141 @@
2370 class Command : public UntypedCommand {
2371 public:
2372 Command(const std::string& aName, Func& aFunction, const std::string& aDescription)
2373- : theName(aName), theFunction(aFunction), theDescription(aDescription) {}
2374+ : theName(aName), theFunction(aFunction), theDescription(aDescription)
2375+ {}
2376+
2377+ Command(const std::string& aName, const std::set<std::string> aAliases, Func& aFunction, const std::string& aDescription)
2378+ : theName(aName), theAliases(aAliases), theFunction(aFunction), theDescription(aDescription)
2379+ {}
2380+
2381 ~Command();
2382+
2383 public:
2384- Command& operator() (unsigned aId,
2385- const std::string& aFlags,
2386- CommandArgType<Tuple>* aType,
2387- const std::string& aDescription = "",
2388- bool isRequired = false);
2389- virtual std::string get_name() const { return theName; }
2390- virtual std::string get_description() const { return theDescription; }
2391+
2392+ void
2393+ addArgument(
2394+ unsigned aId,
2395+ const std::string& aFlags,
2396+ CommandArgType<Tuple>* aType,
2397+ const std::string& aDescription = "",
2398+ bool isRequired = false);
2399+
2400+ static void
2401+ splitNames(
2402+ const std::string& names,
2403+ std::set<std::string>& set);
2404+
2405+ virtual std::string
2406+ getName() const
2407+ {
2408+ return theName;
2409+ }
2410+
2411+ virtual std::set<std::string> getAliases() const
2412+ {
2413+ return theAliases;
2414+ }
2415+
2416+ virtual std::string
2417+ getDescription() const
2418+ {
2419+ return theDescription;
2420+ }
2421+
2422+ virtual void
2423+ printHelp() const;
2424+
2425 virtual bool execute(const std::vector<std::string>& args)
2426 {
2427 CommandInstance<Func, Tuple, CommandIdx> instance(theFunction, theTuple);
2428- if (instance.parseArguments(args, theArgs))
2429+ if (instance.parseArguments(args, theArgs)) {
2430 instance.execute();
2431- else
2432- return false;
2433- return true;
2434+ return true;
2435+ }
2436+ return false;
2437 }
2438 private:
2439 std::string theName;
2440+ std::set<std::string> theAliases;
2441 Func& theFunction;
2442 Tuple theTuple;
2443 std::string theDescription;
2444- std::map<std::string, CommandArg<Tuple>* > theArgs;
2445- };
2446-
2447- class CommandLine {
2448- public:
2449- ~CommandLine();
2450- public:
2451- void execute();
2452- CommandLine& operator<< (UntypedCommand* aCommand);
2453- private:
2454- std::map<std::string, UntypedCommand*> theCommands;
2455- };
2456-
2457- template<typename Func, typename Tuple, int CommandIdx>
2458- Command<Func, Tuple, CommandIdx>::~Command()
2459- {
2460- typedef std::map<std::string, CommandArg<Tuple>* > ArgType;
2461- for (typename ArgType::iterator i = theArgs.begin(); i != theArgs.end(); ++i) {
2462- delete i->second;
2463- }
2464- }
2465-
2466-
2467- template<typename Func, typename Tuple, int CommandIdx>
2468- Command<Func, Tuple, CommandIdx>&
2469- Command<Func, Tuple, CommandIdx>::operator() (unsigned aId,
2470- const std::string& aFlags,
2471- CommandArgType<Tuple>* aType,
2472- const std::string& aDescription,
2473- bool isRequired)
2474- {
2475- std::set<std::string> args;
2476- args << aFlags;
2477- for (std::set<std::string>::iterator i = args.begin(); i != args.end(); ++i) {
2478- std::string toAdd = (i->size() == 1) ? "-" + *i : "--" + *i;
2479- theArgs.insert(std::make_pair(toAdd,
2480- new CommandArg<Tuple>(aId,
2481- aType,
2482- args,
2483- aDescription,
2484- isRequired)
2485- )
2486- );
2487- }
2488- return *this;
2489- }
2490-
2491+ std::map<std::string, CommandArg<Tuple>*> theArgs;
2492+ };
2493+
2494+/*****************************************************************************/
2495+/*****************************************************************************/
2496+
2497+template<typename Func, typename Tuple, int CommandIdx>
2498+Command<Func, Tuple, CommandIdx>::~Command()
2499+{
2500+ typedef std::map<std::string, CommandArg<Tuple>*> ArgType;
2501+ for (typename ArgType::iterator i = theArgs.begin(); i != theArgs.end(); ++i) {
2502+ delete i->second;
2503+ }
2504+}
2505+
2506+template<typename Func, typename Tuple, int CommandIdx>
2507+void
2508+Command<Func, Tuple, CommandIdx>::printHelp() const
2509+{
2510+ std::cout << "Purpose: " << getDescription() << std::endl;
2511+
2512+ typename std::map<std::string, CommandArg<Tuple>*>::const_iterator lIter = theArgs.begin();
2513+ if (lIter == theArgs.end()) {
2514+ std::cout << "This command has no arguments." << std::endl;
2515+ std::cout << std::endl;
2516+ return;
2517+ }
2518+
2519+ std::cout << "Arguments:" << std::endl << std::endl;
2520+ for (; lIter != theArgs.end(); ++lIter) {
2521+ std::cout << " " << lIter->first << "\t" << lIter->second->getDescription() << std::endl;
2522+ }
2523+ std::cout << std::endl;
2524+}
2525+
2526+template<typename Func, typename Tuple, int CommandIdx>
2527+void
2528+Command<Func, Tuple, CommandIdx>::splitNames(const std::string& aNames, std::set<std::string>& aSet)
2529+{
2530+ std::string::size_type before = 0;
2531+ std::string::size_type pos = aNames.find(" ", 0);
2532+ while (pos != aNames.npos) {
2533+ std::string lName = aNames.substr(before, pos);
2534+ if (lName != "") {
2535+ aSet.insert(lName);
2536+ }
2537+ before = pos + 1;
2538+ pos = aNames.find(" ", before);
2539+ }
2540+ std::string lName = aNames.substr(before);
2541+ if (lName != "") {
2542+ aSet.insert(lName);
2543+ }
2544+}
2545+
2546+template<typename Func, typename Tuple, int CommandIdx>
2547+void
2548+Command<Func, Tuple, CommandIdx>::addArgument(
2549+ unsigned aId,
2550+ const std::string& aFlags,
2551+ CommandArgType<Tuple>* aType,
2552+ const std::string& aDescription,
2553+ bool isRequired)
2554+{
2555+ std::set<std::string> lNames;
2556+ splitNames(aFlags, lNames);
2557+
2558+ for (std::set<std::string>::iterator i = lNames.begin(); i != lNames.end(); ++i) {
2559+ std::string toAdd = (i->size() == 1) ? "-" + *i : "--" + *i;
2560+ CommandArg<Tuple>* lArg = new CommandArg<Tuple>(aId, aType, lNames, aDescription, isRequired);
2561+ theArgs.insert(std::make_pair(toAdd, lArg));
2562+ }
2563+}
2564+
2565+/*****************************************************************************/
2566+
2567 template<typename Tuple, typename T, int Idx>
2568 CommandArgType<Tuple>* createArgType(Tuple t)
2569 {
2570@@ -290,6 +225,16 @@
2571 return new Command<Func, Tuple, CommandIdx>(aName, aFunction, aDescription);
2572 }
2573
2574+ template<int CommandIdx, typename Tuple, typename Func>
2575+ Command<Func, Tuple, CommandIdx>* createCommand(Tuple t,
2576+ const std::string& aName,
2577+ const std::set<std::string>& aAliases,
2578+ Func& aFunction,
2579+ const std::string& aDescription)
2580+ {
2581+ return new Command<Func, Tuple, CommandIdx>(aName, aAliases, aFunction, aDescription);
2582+ }
2583+
2584 template<typename Func, typename Tuple, int CommandIdx>
2585 bool CommandInstance<Func, Tuple, CommandIdx>::
2586 parseArguments(const std::vector<std::string>& args,
2587@@ -301,29 +246,34 @@
2588 for (ArgType::size_type i = 1; i < size; ++i) {
2589 typename CArgType::const_iterator pos = aCommandArgs.find(args[i]);
2590 if (pos == aCommandArgs.end()) {
2591- std::cerr << "Error: Unknown Argument " << args[i] << std::endl;
2592+ std::cerr << "Error: Unknown option " << args[i] << std::endl;
2593 parseError = true;
2594 return false;
2595 }
2596 const CommandArg<Tuple>& arg = *(pos->second);
2597- if (!arg.isVoid() && args[++i][0] == '-') {
2598- std::cerr << "Did not expect parameter for option " << args[i] << std::endl;
2599- return false;
2600- }
2601 std::auto_ptr<CommandArgInstance<Tuple> > instance;
2602 if (arg.isVoid()) {
2603 instance.reset(arg.parse("1"));
2604 } else {
2605+ ++i;
2606+ if (i >= size) {
2607+ std::cerr << "Error: Missing value for argument " << args[i - 1] << std::endl;
2608+ parseError = true;
2609+ allSet = false;
2610+ return false;
2611+ }
2612 instance.reset(arg.parse(args[i]));
2613 }
2614- instance->insertValue(theTuple);
2615+ if (instance.get()) {
2616+ instance->insertValue(theTuple);
2617+ }
2618 }
2619 bool allSet = true;
2620 for (typename CArgType::const_iterator i = aCommandArgs.begin();
2621 i != aCommandArgs.end(); ++i)
2622 {
2623 if (i->second->isRequired() && !i->second->isSet(theTuple)) {
2624- std::cerr << "Error: Argument " << i->second->get_name() << " not set" << std::endl;
2625+ std::cerr << "Error: Argument -" << i->second->getName() << " not set" << std::endl;
2626 allSet = false;
2627 }
2628 }
2629@@ -336,4 +286,7 @@
2630 theFunction.template handle<CommandIdx>(this->theTuple);
2631 }
2632
2633-}} // end of namespace zorba::debugclient
2634+} // namespace zorba
2635+} // namespace debugger
2636+
2637+#endif // ZORBA_DEBUGGER_COMMAND_H
2638
2639=== added file 'bin/debugger/command_arg.h'
2640--- bin/debugger/command_arg.h 1970-01-01 00:00:00 +0000
2641+++ bin/debugger/command_arg.h 2012-02-02 04:30:26 +0000
2642@@ -0,0 +1,237 @@
2643+/*
2644+ * Copyright 2006-2008 The FLWOR Foundation.
2645+ *
2646+ * Licensed under the Apache License, Version 2.0 (the "License");
2647+ * you may not use this file except in compliance with the License.
2648+ * You may obtain a copy of the License at
2649+ *
2650+ * http://www.apache.org/licenses/LICENSE-2.0
2651+ *
2652+ * Unless required by applicable law or agreed to in writing, software
2653+ * distributed under the License is distributed on an "AS IS" BASIS,
2654+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2655+ * See the License for the specific language governing permissions and
2656+ * limitations under the License.
2657+ */
2658+#pragma once
2659+#ifndef ZORBA_DEBUGGER_COMMAND_ARG_H
2660+#define ZORBA_DEBUGGER_COMMAND_ARG_H
2661+
2662+#include <string>
2663+#include <iostream>
2664+#include <set>
2665+#include <sstream>
2666+
2667+#include "tuple.h"
2668+
2669+
2670+namespace zorba { namespace debugger {
2671+
2672+template<typename Tuple>
2673+class CommandArg;
2674+
2675+template<typename Tuple>
2676+class CommandArgInstance {
2677+ public:
2678+ virtual int get_index() const = 0;
2679+ virtual const CommandArg<Tuple>* get_arg() const = 0;
2680+ virtual void insertValue(Tuple& t) = 0;
2681+ virtual bool isSet(Tuple& t) const = 0;
2682+};
2683+
2684+template<typename T, int Idx, typename Tuple>
2685+class TypedCommandArgInstance : public CommandArgInstance<Tuple>
2686+{
2687+ public:
2688+ TypedCommandArgInstance(T aValue, const CommandArg<Tuple>* aArg)
2689+ : theValue(aValue), theArg(aArg)
2690+ {
2691+ }
2692+
2693+ virtual int
2694+ get_index() const
2695+ {
2696+ return Idx;
2697+ }
2698+
2699+ virtual const CommandArg<Tuple>*
2700+ get_arg() const
2701+ {
2702+ return theArg;
2703+ }
2704+
2705+ virtual void
2706+ insertValue(Tuple& t)
2707+ {
2708+ ZORBA_TR1_NS::get<Idx>(t).first = true;
2709+ ZORBA_TR1_NS::get<Idx>(t).second = theValue;
2710+ }
2711+
2712+ virtual bool isSet(Tuple& t) const
2713+ {
2714+ return ZORBA_TR1_NS::get<Idx>(t).first;
2715+ }
2716+
2717+ private:
2718+
2719+ T theValue;
2720+ const CommandArg<Tuple>* theArg;
2721+};
2722+
2723+template<typename Tuple>
2724+class CommandArgType
2725+{
2726+ public:
2727+ virtual CommandArgInstance<Tuple>*
2728+ parse(
2729+ const std::string& str,
2730+ const CommandArg<Tuple>* arg) = 0;
2731+
2732+ virtual bool
2733+ isVoid() const = 0;
2734+
2735+ virtual bool
2736+ isSet(Tuple& t) const = 0;
2737+
2738+ virtual ~CommandArgType() {}
2739+};
2740+
2741+ template<typename T, int Idx, typename Tuple>
2742+ class TypedCommandArgType : public CommandArgType<Tuple> {
2743+ public:
2744+ typedef T Type;
2745+ public: // implementation
2746+ TypedCommandArgType(bool aIsVoid) : theIsVoid(aIsVoid) {}
2747+ TypedCommandArgType(const T& aValue,
2748+ bool aIsVoid)
2749+ : theDefault(aValue), theIsVoid(aIsVoid) {}
2750+ virtual CommandArgInstance<Tuple>* parse(const std::string& str,
2751+ const CommandArg<Tuple>* arg)
2752+ {
2753+ T aValue;
2754+
2755+ // special treatment for strings
2756+ // this is a double hack:
2757+ // - we check the type name if this starts with: class std::basic_string
2758+ // - we use void* in readEntireString to workaround the template type T
2759+ // which would otherwise complain during compilation if types and
2760+ // operators do not match
2761+ // TOSO: probably someone can find a more elegant solution
2762+ std::string lTypeName(typeid(T).name());
2763+ if (lTypeName.find("class std::basic_string") == 0) {
2764+ readEntireString(str, &aValue);
2765+ } else {
2766+ std::stringstream stream(str);
2767+ std::stringstream out;
2768+ stream >> aValue;
2769+ if (stream.fail()) {
2770+ std::cerr << "Error: Could not parse value \"" << str << "\" as type "
2771+ << typeid(T).name()
2772+ << std::endl;
2773+ return 0;
2774+ }
2775+ }
2776+
2777+ return new TypedCommandArgInstance<T, Idx, Tuple>(aValue, arg);
2778+ }
2779+ virtual bool isVoid() const { return theIsVoid; }
2780+ virtual bool isSet(Tuple& t) const
2781+ {
2782+ return ZORBA_TR1_NS::get<Idx>(t).first;
2783+ }
2784+ private:
2785+ void readEntireString(std::string aIn, void* aValue)
2786+ {
2787+ *((std::string*)aValue) = aIn;
2788+ }
2789+
2790+ TypedCommandArgType<T, Idx, Tuple>() {}
2791+ T theDefault;
2792+ bool theIsVoid;
2793+ };
2794+
2795+ template<typename Tuple>
2796+ class CommandArg {
2797+ public:
2798+ CommandArg(unsigned aId,
2799+ CommandArgType<Tuple>* aType,
2800+ const std::set<std::string>& aNames,
2801+ const std::string& aDescription,
2802+ bool aIsRequired)
2803+ : theId(aId),
2804+ theType(aType),
2805+ theNames(aNames),
2806+ theDescription(aDescription),
2807+ theIsRequired(aIsRequired)
2808+ {
2809+ }
2810+
2811+ ~CommandArg()
2812+ {
2813+ delete theType;
2814+ }
2815+
2816+ unsigned
2817+ get_id() const
2818+ {
2819+ return theId;
2820+ }
2821+
2822+ bool
2823+ canHandle(const std::string& arg) const
2824+ {
2825+ if (theNames.find(arg) != theNames.end()) {
2826+ return true;
2827+ }
2828+ return false;
2829+ }
2830+
2831+ CommandArgInstance<Tuple>*
2832+ parse(const std::string& str) const
2833+ {
2834+ return theType->parse(str, this);
2835+ }
2836+
2837+ bool
2838+ isVoid() const
2839+ {
2840+ return theType->isVoid();
2841+ }
2842+
2843+ bool
2844+ isRequired() const
2845+ {
2846+ return theIsRequired;
2847+ }
2848+
2849+ std::string
2850+ getName() const
2851+ {
2852+ return *(theNames.begin());
2853+ }
2854+
2855+ std::string
2856+ getDescription() const
2857+ {
2858+ return theDescription;
2859+ }
2860+
2861+ bool
2862+ isSet(Tuple& t) const
2863+ {
2864+ return theType->isSet(t);
2865+ }
2866+
2867+ private:
2868+
2869+ unsigned theId;
2870+ CommandArgType<Tuple>* theType;
2871+ std::set<std::string> theNames;
2872+ std::string theDescription;
2873+ bool theIsRequired;
2874+ };
2875+
2876+} // namespace zorba
2877+} // namespace debugger
2878+
2879+#endif // ZORBA_DEBUGGER_COMMAND_ARG_H
2880
2881=== modified file 'bin/debugger/command_line_handler.cpp'
2882--- bin/debug_client/command_line_handler.cpp 2011-07-01 01:53:24 +0000
2883+++ bin/debugger/command_line_handler.cpp 2012-02-02 04:30:26 +0000
2884@@ -1,4 +1,4 @@
2885-/*
2886+ /*
2887 * Copyright 2006-2008 The FLWOR Foundation.
2888 *
2889 * Licensed under the Apache License, Version 2.0 (the "License");
2890@@ -23,225 +23,385 @@
2891 # define msleep Sleep
2892 #endif
2893
2894-namespace zorba { namespace debugclient {
2895+#include "command_prompt.h"
2896+
2897+
2898+namespace zorba { namespace debugger {
2899
2900- using namespace ::std;
2901 using namespace ::ZORBA_TR1_NS;
2902
2903- CommandLineHandler::CommandLineHandler(unsigned short port,
2904- LockFreeConsumer<std::size_t>& aConsumer,
2905- LockFreeConsumer<bool>& aContinueQueue,
2906- EventHandler& aHandler,
2907- CommandLine& aCommandLine)
2908+CommandLineHandler::CommandLineHandler(
2909+ unsigned short port,
2910+ LockFreeConsumer<std::size_t>& aConsumer,
2911+ LockFreeConsumer<bool>& aContinueQueue,
2912+ EventHandler* aHandler,
2913+ CommandPrompt* aCommandPrompt)
2914 : theConsumer(aConsumer),
2915 theContinueQueue(aContinueQueue),
2916- theClient(DebuggerClient::createDebuggerClient(&aHandler, port, "localhost")),
2917- theCommandLine(aCommandLine),
2918- theQuit(false), theContinue(false), theWaitFor(0)
2919+ theClient(DebuggerClient::createDebuggerClient(aHandler, port, "localhost")),
2920+ theCommandLine(aCommandPrompt),
2921+ theQuit(false), theTerminated(true), theContinue(false), theWaitFor(0)
2922 {
2923 addCommands();
2924 }
2925
2926- CommandLineHandler::~CommandLineHandler()
2927- {
2928- }
2929+CommandLineHandler::~CommandLineHandler()
2930+{
2931+}
2932
2933- void CommandLineHandler::execute()
2934- {
2935- theClient->accept();
2936- std::set<std::size_t> lIdList;
2937- do {
2938+void
2939+CommandLineHandler::execute()
2940+{
2941+ theClient->accept();
2942+ std::set<std::size_t> lIdList;
2943+ do {
2944+ getNextId(lIdList);
2945+ while (lIdList.find(theWaitFor) == lIdList.end()) {
2946 getNextId(lIdList);
2947- while (!theQuit && lIdList.find(theWaitFor) == lIdList.end()) {
2948- getNextId(lIdList);
2949- msleep(20);
2950- }
2951- while (!theContinueQueue.consume(theQuit)) {
2952- msleep(20);
2953- }
2954- theQuit = !theQuit;
2955- if (!theQuit) {
2956- theCommandLine.execute();
2957- while (theContinue) {
2958- theContinue = false;
2959- theCommandLine.execute();
2960- }
2961- }
2962- } while (!theQuit);
2963- }
2964-
2965- void CommandLineHandler::getNextId(std::set<std::size_t>& aIdList)
2966- {
2967- std::size_t result;
2968- if (theConsumer.consume(result)) {
2969- aIdList.insert(result);
2970- }
2971- }
2972-
2973- template<>
2974- void CommandLineHandler::handle<Status>(ZORBA_TR1_NS::tuple<> &t)
2975- {
2976- theWaitFor = theClient->status();
2977- }
2978-
2979- template<>
2980- void CommandLineHandler::handle<Quit>(ZORBA_TR1_NS::tuple<> &t)
2981- {
2982+ msleep(20);
2983+ }
2984+ bool lCanQuit;
2985+ while (!theContinueQueue.consume(lCanQuit)) {
2986+ msleep(20);
2987+ }
2988+ if (lCanQuit) {
2989+ theTerminated = true;
2990+ }
2991+ theCommandLine->execute();
2992+ while (theContinue) {
2993+ theContinue = false;
2994+ theCommandLine->execute();
2995+ }
2996+ } while (!theQuit);
2997+}
2998+
2999+void
3000+CommandLineHandler::getNextId(std::set<std::size_t>& aIdList)
3001+{
3002+ std::size_t result;
3003+ if (theConsumer.consume(result)) {
3004+ aIdList.insert(result);
3005+ }
3006+}
3007+
3008+template<>
3009+void
3010+CommandLineHandler::handle<Status>(ZORBA_TR1_NS::tuple<> &t)
3011+{
3012+ theWaitFor = theClient->status();
3013+}
3014+
3015+template<>
3016+void
3017+CommandLineHandler::handle<Variables>(ZORBA_TR1_NS::tuple<> &t)
3018+{
3019+ theWaitFor = theClient->variables();
3020+}
3021+
3022+template<>
3023+void
3024+CommandLineHandler::handle<Quit>(ZORBA_TR1_NS::tuple<> &t)
3025+{
3026+ if (!theTerminated) {
3027 bool answered = false;
3028 while (!answered) {
3029 std::cout << "Do you really want to stop debugging and exit? (y/n) ";
3030- char answer;
3031- std::cin >> answer;
3032- std::cout << std::endl;
3033- if (answer == 'y') {
3034+ std::string lAnswer;
3035+ std::getline(std::cin, lAnswer);
3036+ if (lAnswer == "y" || lAnswer == "yes") {
3037 answered = true;
3038- } else if (answered == 'n') {
3039+ } else if (lAnswer == "n" || lAnswer == "no") {
3040 theContinue = true;
3041 return;
3042 }
3043 }
3044- theWaitFor = theClient->stop();
3045- theClient->quit();
3046- }
3047-
3048- template<>
3049- void CommandLineHandler::handle<Run>(ZORBA_TR1_NS::tuple<> &t)
3050- {
3051- theWaitFor = theClient->run();
3052- }
3053-
3054- template<>
3055- void CommandLineHandler::handle<BreakpointSet>(std::tr1::tuple<bstring, bstring, bint> &t)
3056- {
3057- DebuggerClient::BreakpointType lType = DebuggerClient::Line;
3058- bool lEnabled = true;
3059- if (get<0>(t).first) {
3060- if (get<0>(t).second == "disabled") {
3061- lEnabled = false;
3062- }
3063- }
3064- theWaitFor = theClient->breakpoint_set(lType,
3065- lEnabled,
3066- get<1>(t).second,
3067- get<2>(t).second);
3068- }
3069-
3070- template<>
3071- void CommandLineHandler::handle<BreakpointGet>(tuple<bint> &aTuple)
3072- {
3073- theWaitFor = theClient->breakpoint_get(get<0>(aTuple).second);
3074- }
3075-
3076- template<>
3077- void CommandLineHandler::handle<BreakpointDel>(tuple<bint> &aTuple)
3078- {
3079- theWaitFor = theClient->breakpoint_remove(get<0>(aTuple).second);
3080- }
3081-
3082- template<>
3083- void CommandLineHandler::handle<BreakpointList>(tuple<> &t)
3084- {
3085- theWaitFor = theClient->breakpoint_list();
3086- }
3087-
3088- template<>
3089- void CommandLineHandler::handle<StackDepth>(tuple<> &t)
3090- {
3091- theWaitFor = theClient->stack_depth();
3092- }
3093-
3094- template<>
3095- void CommandLineHandler::handle<StackGet>(tuple<bint> &aTuple)
3096- {
3097- if (get<0>(aTuple).first) {
3098- theWaitFor = theClient->stack_get(get<0>(aTuple).second);
3099- } else {
3100- theWaitFor = theClient->stack_get();
3101- }
3102- }
3103-
3104- template<>
3105- void CommandLineHandler::handle<ContextNames>(tuple<>& aTuple)
3106- {
3107- theWaitFor = theClient->context_names();
3108- }
3109-
3110- template<>
3111- void CommandLineHandler::handle<ContextGet>(tuple<bint> &aTuple)
3112- {
3113- if (get<0>(aTuple).first)
3114- theWaitFor = theClient->context_get(get<0>(aTuple).second);
3115- else
3116- theWaitFor = theClient->context_get();
3117- }
3118-
3119- template<>
3120- void CommandLineHandler::handle<Eval>(tuple<bstring>& aTuple)
3121- {
3122- theWaitFor = theClient->eval(get<0>(aTuple).second);
3123- }
3124-
3125- void CommandLineHandler::addCommands()
3126- {
3127- theCommandLine << createCommand<Status>(tuple<>(), "status", *this,
3128- "Gets the status of the server");
3129- theCommandLine << createCommand<Quit>(tuple<>(), "quit", *this,
3130- "Stops debugging and quits the client");
3131- theCommandLine << createCommand<Run>(tuple<>(), "run", *this, "Run the Query");
3132- {
3133- Command<CommandLineHandler, tuple<bstring, bstring, bint>, BreakpointSet>* lCommand =
3134- createCommand<BreakpointSet>(tuple<bstring, bstring, bint>(), "break", *this, "Set a breakpoint");
3135- (*lCommand)(0, "s", createArgType<tuple<bstring, bstring, bint>, std::string, 0>(tuple<bstring, bstring, bint>()),
3136- "breakpoint state (enabled or disabled - default: enabled)", false);
3137- (*lCommand)(1, "f", createArgType<tuple<bstring, bstring, bint>, std::string, 1>(tuple<bstring, bstring, bint>()),
3138- "The name of the file where to stop", true);
3139- (*lCommand)(2, "l", createArgType<tuple<bstring, bstring, bint>, int, 2>(tuple<bstring, bstring, bint>()),
3140- "The line number", true);
3141-
3142- theCommandLine << lCommand;
3143- }
3144- {
3145- Command<CommandLineHandler, tuple<bint>, BreakpointGet>* lCommand
3146- = createCommand<BreakpointGet>(tuple<bint>(), "binfo", *this,
3147- "Get information about a given breakpoint");
3148- (*lCommand)(0, "i", createArgType<tuple<bint>, int, 0>(tuple<bint>()),
3149- "The id of the breakpoint", true);
3150-
3151- theCommandLine << lCommand;
3152- }
3153- {
3154- Command<CommandLineHandler, tuple<bint>, BreakpointDel>* lCommand
3155- = createCommand<BreakpointDel>(tuple<bint>(), "bdel", *this, "Delete a breakpoint with a given id");
3156- (*lCommand)(0, "i", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The id of the breakpoint", true);
3157-
3158- theCommandLine << lCommand;
3159- }
3160- theCommandLine << createCommand<BreakpointList>(tuple<>(), "blist", *this, "List all set breakpoints");
3161- theCommandLine << createCommand<StackDepth>(tuple<>(), "sdepth", *this, "Get the depth of the stack");
3162- {
3163- Command<CommandLineHandler, tuple<bint>, StackGet>* lCommand
3164- = createCommand<StackGet>(tuple<bint>(), "sget", *this, "Get information about one or all stack frames");
3165- (*lCommand)(0, "d", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The stack entry two show (show all if not provided)", false);
3166- theCommandLine << lCommand;
3167- }
3168- theCommandLine << createCommand<ContextNames>(tuple<>(), "cnames", *this, "Get the names of the avilable contexts");
3169- {
3170- Command<CommandLineHandler, tuple<bint>, ContextGet>* lCommand
3171- = createCommand<ContextGet>(tuple<bint>(), "cget", *this, "Get a context");
3172-
3173- (*lCommand)(0, "c", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The id of the context", false);
3174-
3175- theCommandLine << lCommand;
3176- }
3177- {
3178- Command<CommandLineHandler, tuple<bstring>, Eval>* lCommand
3179- = createCommand<Eval>(tuple<bstring>(), "eval", *this, "Evaluate a function");
3180-
3181- (*lCommand)(0, "c", createArgType<tuple<bstring>, std::string, 0>(tuple<bstring>()), "The command to evaluate", true);
3182-
3183- theCommandLine << lCommand;
3184- }
3185- }
3186-
3187-}} // namespace zorba::debugclient
3188-
3189+ }
3190+ theWaitFor = theClient->stop(true);
3191+ theClient->quit();
3192+ theQuit = true;
3193+}
3194+
3195+template<>
3196+void
3197+CommandLineHandler::handle<Run>(ZORBA_TR1_NS::tuple<> &t)
3198+{
3199+ theTerminated = false;
3200+ theWaitFor = theClient->run();
3201+}
3202+
3203+template<>
3204+void
3205+CommandLineHandler::handle<Stop>(ZORBA_TR1_NS::tuple<> &t)
3206+{
3207+ theWaitFor = theClient->stop(false);
3208+}
3209+
3210+template<>
3211+void
3212+CommandLineHandler::handle<BreakpointSet>(std::tr1::tuple<bstring, bstring, bint> &aTuple)
3213+{
3214+ DebuggerClient::BreakpointType lType = DebuggerClient::Line;
3215+ bool lEnabled = true;
3216+ if (get<0>(aTuple).first) {
3217+ if (get<0>(aTuple).second == "disabled") {
3218+ lEnabled = false;
3219+ }
3220+ }
3221+ theWaitFor = theClient->breakpoint_set(lType,
3222+ lEnabled,
3223+ get<1>(aTuple).second,
3224+ get<2>(aTuple).second);
3225+}
3226+
3227+template<>
3228+void
3229+CommandLineHandler::handle<BreakpointGet>(tuple<bint> &aTuple)
3230+{
3231+ theWaitFor = theClient->breakpoint_get(get<0>(aTuple).second);
3232+}
3233+
3234+template<>
3235+void
3236+CommandLineHandler::handle<BreakpointRemove>(tuple<bint> &aTuple)
3237+{
3238+ theWaitFor = theClient->breakpoint_remove(get<0>(aTuple).second);
3239+}
3240+
3241+template<>
3242+void
3243+CommandLineHandler::handle<BreakpointList>(tuple<> &aTuple)
3244+{
3245+ theWaitFor = theClient->breakpoint_list();
3246+}
3247+
3248+template<>
3249+void
3250+CommandLineHandler::handle<StackDepth>(tuple<> &aTuple)
3251+{
3252+ theWaitFor = theClient->stack_depth();
3253+}
3254+
3255+template<>
3256+void
3257+CommandLineHandler::handle<StackGet>(tuple<bint> &aTuple)
3258+{
3259+ if (get<0>(aTuple).first) {
3260+ theWaitFor = theClient->stack_get(get<0>(aTuple).second);
3261+ } else {
3262+ theWaitFor = theClient->stack_get();
3263+ }
3264+}
3265+
3266+template<>
3267+void
3268+CommandLineHandler::handle<ContextNames>(tuple<>& aTuple)
3269+{
3270+ theWaitFor = theClient->context_names();
3271+}
3272+
3273+template<>
3274+void CommandLineHandler::handle<ContextGet>(tuple<bint, bint> &aTuple)
3275+{
3276+ int lDepth = -1;
3277+ int lContext = -1;
3278+
3279+ if (get<0>(aTuple).first) {
3280+ lDepth = get<0>(aTuple).second;
3281+ }
3282+ if (get<1>(aTuple).first) {
3283+ lContext = get<1>(aTuple).second;
3284+ }
3285+ theWaitFor = theClient->context_get(lDepth, lContext);
3286+}
3287+
3288+template<>
3289+void CommandLineHandler::handle<Source>(tuple<bint, bint, bstring> &aTuple)
3290+{
3291+ theWaitFor = theClient->source(
3292+ get<2>(aTuple).second,
3293+ get<0>(aTuple).second,
3294+ get<1>(aTuple).second);
3295+}
3296+
3297+template<>
3298+void CommandLineHandler::handle<Eval>(tuple<bstring>& aTuple)
3299+{
3300+ theWaitFor = theClient->eval(get<0>(aTuple).second);
3301+}
3302+
3303+template<>
3304+void
3305+CommandLineHandler::handle<StepIn>(ZORBA_TR1_NS::tuple<> &t)
3306+{
3307+ theTerminated = false;
3308+ theWaitFor = theClient->step_into();
3309+}
3310+
3311+template<>
3312+void
3313+CommandLineHandler::handle<StepOut>(ZORBA_TR1_NS::tuple<> &t)
3314+{
3315+ theWaitFor = theClient->step_out();
3316+}
3317+
3318+template<>
3319+void
3320+CommandLineHandler::handle<StepOver>(ZORBA_TR1_NS::tuple<> &t)
3321+{
3322+ theTerminated = false;
3323+ theWaitFor = theClient->step_over();
3324+}
3325+
3326+void
3327+CommandLineHandler::addCommands()
3328+{
3329+ typedef tuple<> TUPLE;
3330+ typedef tuple<bint> TUPLE_INT;
3331+ typedef tuple<bstring> TUPLE_STR;
3332+ typedef tuple<bint, bint> TUPLE_INT_INT;
3333+ typedef tuple<bstring, bstring, bint> TUPLE_STR_STR_INT;
3334+ typedef tuple<bint, bint, bstring> TUPLE_INT_INT_STR;
3335+
3336+ // DBGP: status
3337+ *theCommandLine << createCommand<Status>(TUPLE(), "status", *this, "Gets the status of the server");
3338+
3339+ // ALIAS: variables (context_get -c -1)
3340+ {
3341+ std::set<std::string> lAliases;
3342+ lAliases.insert("vars");
3343+ *theCommandLine << createCommand<Variables>(TUPLE(), "variables", lAliases, *this, "Gets the variables visible in the current scope");
3344+ }
3345+
3346+ // META: quit
3347+ *theCommandLine << createCommand<Quit>(TUPLE(), "quit", *this, "Stops debugging and quits the client");
3348+
3349+ // DBGP: run
3350+ *theCommandLine << createCommand<Run>(TUPLE(), "run", *this, "Run the query");
3351+
3352+ // DBGP: stop
3353+ *theCommandLine << createCommand<Stop>(TUPLE(), "stop", *this, "Stop the query");
3354+
3355+ // DBGP: breakpoint_set
3356+ {
3357+ std::set<std::string> lAliases;
3358+ lAliases.insert("break");
3359+ Command<CommandLineHandler, TUPLE_STR_STR_INT, BreakpointSet>* lCommand =
3360+ createCommand<BreakpointSet>(TUPLE_STR_STR_INT(), "bset", lAliases, *this, "Set a breakpoint");
3361+
3362+ 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);
3363+ lCommand->addArgument(1, "f", createArgType<TUPLE_STR_STR_INT, std::string, 1>(TUPLE_STR_STR_INT()), "name of the file where to stop", true);
3364+ lCommand->addArgument(2, "l", createArgType<TUPLE_STR_STR_INT, int, 2>(TUPLE_STR_STR_INT()), "line number", true);
3365+
3366+ *theCommandLine << lCommand;
3367+ }
3368+
3369+ // DBGP: breakpoint_get
3370+ {
3371+ Command<CommandLineHandler, TUPLE_INT, BreakpointGet>* lCommand =
3372+ createCommand<BreakpointGet>(TUPLE_INT(), "bget", *this, "Get information about a given breakpoint");
3373+
3374+ lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "breakpoint ID", true);
3375+
3376+ *theCommandLine << lCommand;
3377+ }
3378+
3379+ // DBGP: breakpoint_remove
3380+ {
3381+ std::set<std::string> lAliases;
3382+ lAliases.insert("clear");
3383+ lAliases.insert("delete");
3384+ Command<CommandLineHandler, TUPLE_INT, BreakpointRemove>* lCommand =
3385+ createCommand<BreakpointRemove>(TUPLE_INT(), "bremove", lAliases, *this, "Delete a breakpoint");
3386+
3387+ lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "breakpoint ID", true);
3388+
3389+ *theCommandLine << lCommand;
3390+ }
3391+
3392+ // DBGP: breakpoint_list
3393+ *theCommandLine << createCommand<BreakpointList>(TUPLE(), "blist", *this, "List all set breakpoints");
3394+
3395+ // DBGP: stack_depth
3396+ *theCommandLine << createCommand<StackDepth>(TUPLE(), "sdepth", *this, "Get the depth of the stack");
3397+
3398+ // DBGP: stack_get
3399+ {
3400+ Command<CommandLineHandler, TUPLE_INT, StackGet>* lCommand =
3401+ createCommand<StackGet>(TUPLE_INT(), "sget", *this, "Get information about one or all stack frames");
3402+
3403+ 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);
3404+
3405+ *theCommandLine << lCommand;
3406+ }
3407+
3408+ // DBGP: context_names
3409+ *theCommandLine << createCommand<ContextNames>(tuple<>(), "cnames", *this, "Get the names of the avilable contexts");
3410+ // the DBGP -d arguments for this command is omitted since we always have/return: 0 - Local, 1 - Global
3411+
3412+ // DBGP: context_get
3413+ {
3414+ Command<CommandLineHandler, TUPLE_INT_INT, ContextGet>* lCommand =
3415+ createCommand<ContextGet>(TUPLE_INT_INT(), "cget", *this, "Get a context (list variables in this context)");
3416+
3417+ lCommand->addArgument(0, "d", createArgType<TUPLE_INT_INT, int, 0>(TUPLE_INT_INT()), "stack depth (optional, default: 0)", false);
3418+ 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);
3419+
3420+ *theCommandLine << lCommand;
3421+ }
3422+
3423+ // DBGP: source
3424+ {
3425+ std::set<std::string> lAliases;
3426+ lAliases.insert("list");
3427+ Command<CommandLineHandler, TUPLE_INT_INT_STR, Source>* lCommand =
3428+ createCommand<Source>(TUPLE_INT_INT_STR(), "source", lAliases, *this, "List source code");
3429+
3430+ lCommand->addArgument(0, "b", createArgType<TUPLE_INT_INT_STR, int, 0>(TUPLE_INT_INT_STR()), "begin line (optional, default: first line)", false);
3431+ lCommand->addArgument(1, "e", createArgType<TUPLE_INT_INT_STR, int, 1>(TUPLE_INT_INT_STR()), "end line (optional, default: last line)", false);
3432+ 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);
3433+
3434+ *theCommandLine << lCommand;
3435+ }
3436+
3437+ // DBGP: eval
3438+ {
3439+ std::set<std::string> lAliases;
3440+ lAliases.insert("print");
3441+ Command<CommandLineHandler, TUPLE_STR, Eval>* lCommand =
3442+ createCommand<Eval>(TUPLE_STR(), "eval", lAliases, *this, "Evaluate an expression");
3443+
3444+ // TODO: this argument should not be here at all. Eval has the form: eval -i transaction_id -- {DATA}
3445+ // Eval should be called with a command like: eval 1 + 3
3446+ // - no need for an argument name
3447+ // - everything following the fist contiguous set of whitespaces are sent as string
3448+ lCommand->addArgument(0, "c", createArgType<TUPLE_STR, std::string, 0>(TUPLE_STR()), "expression to evaluate", true);
3449+
3450+ *theCommandLine << lCommand;
3451+ }
3452+
3453+ // DBGP: step_in
3454+ {
3455+ std::set<std::string> lAliases;
3456+ lAliases.insert("step");
3457+ lAliases.insert("s");
3458+ *theCommandLine << createCommand<StepIn>(TUPLE(), "in", lAliases, *this, "Step in");
3459+ }
3460+
3461+ // DBGP: step_out
3462+ {
3463+ std::set<std::string> lAliases;
3464+ lAliases.insert("finish");
3465+ *theCommandLine << createCommand<StepOut>(TUPLE(), "out", lAliases, *this, "Step out");
3466+ }
3467+
3468+ // DBGP: step_over
3469+ {
3470+ std::set<std::string> lAliases;
3471+ lAliases.insert("next");
3472+ lAliases.insert("n");
3473+ *theCommandLine << createCommand<StepOver>(TUPLE(), "over", lAliases, *this, "Step over");
3474+ }
3475+}
3476+
3477+} // namespace zorba
3478+} // namespace debugger
3479
3480=== modified file 'bin/debugger/command_line_handler.h'
3481--- bin/debug_client/command_line_handler.h 2011-07-01 01:53:24 +0000
3482+++ bin/debugger/command_line_handler.h 2012-02-02 04:30:26 +0000
3483@@ -14,46 +14,71 @@
3484 * limitations under the License.
3485 */
3486 #pragma once
3487+#ifndef ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
3488+#define ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
3489
3490 #include <set>
3491 #include <cassert>
3492+
3493 #include <zorba/debugger_client.h>
3494-#include "debug_command.h"
3495+
3496+#include "command.h"
3497 #include "event_handler.h"
3498
3499-namespace zorba { namespace debugclient {
3500-
3501+
3502+namespace zorba { namespace debugger {
3503+
3504+ class CommandPrompt;
3505+
3506 enum Commands {
3507 Status,
3508+ Variables,
3509+ Quit,
3510 Run,
3511+ Stop,
3512 BreakpointSet,
3513 BreakpointGet,
3514- BreakpointDel,
3515+ BreakpointRemove,
3516 BreakpointList,
3517 StackDepth,
3518 StackGet,
3519 ContextNames,
3520 ContextGet,
3521+ Source,
3522 Eval,
3523- Quit
3524+ StepIn,
3525+ StepOut,
3526+ StepOver
3527 };
3528
3529- class CommandLineHandler {
3530+class CommandLineHandler
3531+{
3532 private:
3533+
3534 typedef std::pair<bool, std::string> bstring;
3535 typedef std::pair<bool, int> bint;
3536+
3537 public:
3538- CommandLineHandler(unsigned short port,
3539- LockFreeConsumer<std::size_t>& aConsumer,
3540- LockFreeConsumer<bool>& aContinueQueue,
3541- EventHandler& aHandler,
3542- CommandLine& aCommandLine);
3543+
3544+ CommandLineHandler(
3545+ unsigned short port,
3546+ LockFreeConsumer<std::size_t>& aConsumer,
3547+ LockFreeConsumer<bool>& aContinueQueue,
3548+ EventHandler* aHandler,
3549+ CommandPrompt* aCommandPrompt);
3550+
3551 ~CommandLineHandler();
3552+
3553 public:
3554 void execute();
3555+
3556 public: // Handlers
3557+
3558 template<int>
3559- void handle(ZORBA_TR1_NS::tuple<>& aTuple) { assert(false); }
3560+ void handle(ZORBA_TR1_NS::tuple<>& aTuple)
3561+ {
3562+ assert(false);
3563+ }
3564
3565 template<int>
3566 void handle(ZORBA_TR1_NS::tuple<bstring, bstring, bint>& t)
3567@@ -62,63 +87,96 @@
3568 }
3569
3570 template<int>
3571+ void handle(ZORBA_TR1_NS::tuple<bint, bint, bstring>& t)
3572+ {
3573+ assert(false);
3574+ }
3575+
3576+ template<int>
3577 void handle(ZORBA_TR1_NS::tuple<bint>& aTuple)
3578 {
3579 assert(false);
3580 }
3581
3582 template<int>
3583+ void handle(ZORBA_TR1_NS::tuple<bint, bint>& aTuple)
3584+ {
3585+ assert(false);
3586+ }
3587+
3588+ template<int>
3589 void handle(ZORBA_TR1_NS::tuple<bstring>& aTuple)
3590 {
3591 assert(false);
3592 }
3593+
3594 private:
3595- LockFreeConsumer<std::size_t>& theConsumer;
3596- LockFreeConsumer<bool>& theContinueQueue;
3597- DebuggerClient* theClient;
3598- CommandLine& theCommandLine;
3599- bool theQuit;
3600- bool theContinue;
3601- std::size_t theWaitFor;
3602+ LockFreeConsumer<std::size_t>& theConsumer;
3603+ LockFreeConsumer<bool>& theContinueQueue;
3604+ DebuggerClient* theClient;
3605+ CommandPrompt* theCommandLine;
3606+ bool theQuit;
3607+ bool theTerminated;
3608+ bool theContinue;
3609+ std::size_t theWaitFor;
3610+
3611 private:
3612 void getNextId(std::set<std::size_t>& aIdList);
3613 void addCommands();
3614- };
3615-
3616- template<>
3617- void CommandLineHandler::handle<Status> (ZORBA_TR1_NS::tuple<>& t);
3618-
3619- template<>
3620- void CommandLineHandler::handle<Quit> (ZORBA_TR1_NS::tuple<>& t);
3621-
3622- template<>
3623- void CommandLineHandler::handle<Run> (ZORBA_TR1_NS::tuple<> &t);
3624-
3625- template<>
3626- void CommandLineHandler::handle<StackDepth> (ZORBA_TR1_NS::tuple<>& t);
3627-
3628- template<>
3629- void CommandLineHandler::handle<BreakpointList> (ZORBA_TR1_NS::tuple<>& aTuple);
3630-
3631- template<>
3632- void CommandLineHandler::handle<BreakpointSet> (ZORBA_TR1_NS::tuple<bstring, bstring, bint> &t);
3633-
3634- template<>
3635- void CommandLineHandler::handle<BreakpointGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
3636-
3637- template<>
3638- void CommandLineHandler::handle<BreakpointDel>(ZORBA_TR1_NS::tuple<bint> &aTuple);
3639-
3640- template<>
3641- void CommandLineHandler::handle<StackGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
3642-
3643- template<>
3644- void CommandLineHandler::handle<ContextNames>(ZORBA_TR1_NS::tuple<> &aTuple);
3645-
3646- template<>
3647- void CommandLineHandler::handle<ContextGet>(ZORBA_TR1_NS::tuple<bint> &aTuple);
3648-
3649- template<>
3650- void CommandLineHandler::handle<Eval>(ZORBA_TR1_NS::tuple<bstring>& aTuple);
3651-
3652-}} // close namespaces zorba::debugclient
3653+};
3654+
3655+template<>
3656+void CommandLineHandler::handle<Status> (ZORBA_TR1_NS::tuple<>& t);
3657+
3658+template<>
3659+void CommandLineHandler::handle<Quit> (ZORBA_TR1_NS::tuple<>& t);
3660+
3661+template<>
3662+void CommandLineHandler::handle<Run> (ZORBA_TR1_NS::tuple<> &t);
3663+
3664+template<>
3665+void CommandLineHandler::handle<Stop> (ZORBA_TR1_NS::tuple<> &t);
3666+
3667+template<>
3668+void CommandLineHandler::handle<StackDepth> (ZORBA_TR1_NS::tuple<>& t);
3669+
3670+template<>
3671+void CommandLineHandler::handle<BreakpointList> (ZORBA_TR1_NS::tuple<>& aTuple);
3672+
3673+template<>
3674+void CommandLineHandler::handle<BreakpointSet> (ZORBA_TR1_NS::tuple<bstring, bstring, bint> &t);
3675+
3676+template<>
3677+void CommandLineHandler::handle<BreakpointGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
3678+
3679+template<>
3680+void CommandLineHandler::handle<BreakpointRemove>(ZORBA_TR1_NS::tuple<bint> &aTuple);
3681+
3682+template<>
3683+void CommandLineHandler::handle<StackGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
3684+
3685+template<>
3686+void CommandLineHandler::handle<ContextNames>(ZORBA_TR1_NS::tuple<> &aTuple);
3687+
3688+template<>
3689+void CommandLineHandler::handle<ContextGet>(ZORBA_TR1_NS::tuple<bint, bint> &aTuple);
3690+
3691+template<>
3692+void CommandLineHandler::handle<Source>(ZORBA_TR1_NS::tuple<bint, bint, bstring> &aTuple);
3693+
3694+template<>
3695+void CommandLineHandler::handle<Eval>(ZORBA_TR1_NS::tuple<bstring>& aTuple);
3696+
3697+template<>
3698+void CommandLineHandler::handle<StepIn> (ZORBA_TR1_NS::tuple<> &t);
3699+
3700+template<>
3701+void CommandLineHandler::handle<StepOut> (ZORBA_TR1_NS::tuple<> &t);
3702+
3703+template<>
3704+void CommandLineHandler::handle<StepOver> (ZORBA_TR1_NS::tuple<> &t);
3705+
3706+} // namespace zorba
3707+} // namespace debugger
3708+
3709+#endif // ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
3710
3711=== added file 'bin/debugger/command_prompt.cpp'
3712--- bin/debugger/command_prompt.cpp 1970-01-01 00:00:00 +0000
3713+++ bin/debugger/command_prompt.cpp 2012-02-02 04:30:26 +0000
3714@@ -0,0 +1,287 @@
3715+/*
3716+ * Copyright 2006-2008 The FLWOR Foundation.
3717+ *
3718+ * Licensed under the Apache License, Version 2.0 (the "License");
3719+ * you may not use this file except in compliance with the License.
3720+ * You may obtain a copy of the License at
3721+ *
3722+ * http://www.apache.org/licenses/LICENSE-2.0
3723+ *
3724+ * Unless required by applicable law or agreed to in writing, software
3725+ * distributed under the License is distributed on an "AS IS" BASIS,
3726+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3727+ * See the License for the specific language governing permissions and
3728+ * limitations under the License.
3729+ */
3730+#include "command_prompt.h"
3731+
3732+#include <string>
3733+#include <vector>
3734+#include <map>
3735+#include <iostream>
3736+
3737+#include "command.h"
3738+
3739+
3740+namespace zorba { namespace debugger {
3741+
3742+#ifdef ZORBA_HAVE_LIBEDIT_H
3743+const char*
3744+prompt(EditLine* aEl) {
3745+ return "(xqdb) ";
3746+}
3747+#endif
3748+
3749+CommandPrompt::CommandPrompt()
3750+{
3751+#ifdef ZORBA_HAVE_LIBEDIT_H
3752+ theEditLine = el_init("xqdb", stdin, stdout, stderr);
3753+ theHistory = history_init();
3754+ HistEvent lHistoryEvent;
3755+ history(theHistory, &lHistoryEvent, H_SETSIZE, 100);
3756+
3757+ el_set(theEditLine, EL_PROMPT, prompt);
3758+
3759+ el_set(theEditLine, EL_HIST, history, theHistory);
3760+ el_set(theEditLine, EL_EDITOR, "emacs");
3761+#endif
3762+}
3763+
3764+CommandPrompt::~CommandPrompt()
3765+{
3766+#ifdef ZORBA_HAVE_LIBEDIT_H
3767+ history_end(theHistory);
3768+ el_end(theEditLine);
3769+#endif
3770+
3771+ std::map<std::string, UntypedCommand*>::iterator lIter;
3772+ for (lIter = theCommands.begin(); lIter != theCommands.end(); ++lIter) {
3773+ delete lIter->second;
3774+ }
3775+}
3776+
3777+void
3778+CommandPrompt::printHelp(UntypedCommand* aCommand)
3779+{
3780+ // if no command is provided, print all the available commands
3781+ if (!aCommand) {
3782+ std::cout << "Available commands:" << std::endl;
3783+
3784+ // print the names of all commands
3785+ std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.begin();
3786+ while (lIter != theCommands.end()) {
3787+ std::cout << " " << (*lIter).first;
3788+ std::set<std::string> lAliases = (*lIter).second->getAliases();
3789+ std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
3790+ while (lAliasIter != lAliases.end()) {
3791+ std::cout << ", " << *lAliasIter;
3792+ lAliasIter++;
3793+ }
3794+ std::cout << std::endl;
3795+ lIter++;
3796+ }
3797+
3798+ // some hints for detailed help
3799+ std::cout << std::endl;
3800+ std::cout << "Type help <command> to get more information about one command." << std::endl;
3801+ std::cout << std::endl;
3802+ } else {
3803+ // ok, so we have a command; then print the help
3804+ aCommand->printHelp();
3805+ }
3806+}
3807+
3808+void
3809+CommandPrompt::execute()
3810+{
3811+ bool lWithOutput = true;
3812+
3813+ for (;;) {
3814+#ifdef ZORBA_HAVE_LIBEDIT_H
3815+ const char* lBuf;
3816+ int lCharsRead = -1;
3817+ lBuf = el_gets(theEditLine, &lCharsRead);
3818+ std::string lCommandLine(lBuf, lCharsRead - 1);
3819+#else
3820+ if (lWithOutput) {
3821+ std::cout << "(xqdb) ";
3822+ }
3823+ lWithOutput = true;
3824+ std::string lCommandLine;
3825+ std::getline(std::cin, lCommandLine);
3826+ if (std::cin.fail()) {
3827+ lWithOutput = false;
3828+ std::cin.clear();
3829+ continue;
3830+ }
3831+#endif
3832+
3833+ std::vector<std::string> lArgs;
3834+
3835+ // split the command into arguments
3836+ parseLine(lCommandLine, lArgs);
3837+ std::string::size_type lSize = lArgs.size();
3838+
3839+ // empty command? do nothing!
3840+ if (lSize == 0) {
3841+ lArgs = theLastArgs;
3842+ if (lArgs.size() == 0) {
3843+ continue;
3844+ }
3845+ }
3846+#ifdef ZORBA_HAVE_LIBEDIT_H
3847+ else {
3848+ HistEvent lHistoryEvent;
3849+ history(theHistory, &lHistoryEvent, H_ENTER, lCommandLine.c_str());
3850+ }
3851+#endif
3852+ theLastArgs = lArgs;
3853+
3854+ UntypedCommand* lCommand = NULL;
3855+
3856+ // help is not a command but a hook here
3857+ if (lArgs.at(0) == "h" || lArgs.at(0) == "help") {
3858+ std::string lCmd = "";
3859+
3860+ // if the user needs the help for a specific command
3861+ if (lSize > 1) {
3862+ // do nothing if we don't have a command starting with this prefix?
3863+ // findCommand will print the appropriate errors
3864+ if (!findCommand(lArgs[1], lCommand)) {
3865+ continue;
3866+ }
3867+ }
3868+ printHelp(lCommand);
3869+ continue;
3870+ }
3871+ if (findCommand(lArgs[0], lCommand) && lCommand->execute(lArgs)) {
3872+ return;
3873+ }
3874+ continue;
3875+ }
3876+}
3877+
3878+CommandPrompt&
3879+CommandPrompt::operator<<(UntypedCommand *aCommand)
3880+{
3881+ theCommands.insert(std::make_pair(aCommand->getName(), aCommand));
3882+ return *this;
3883+}
3884+
3885+bool
3886+CommandPrompt::findCommand(const std::string& aPrefix, UntypedCommand*& aCommand)
3887+{
3888+ std::vector<UntypedCommand*> lFoundCommands;
3889+
3890+ std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.begin();
3891+ while (lIter != theCommands.end()) {
3892+ // if a command name is equal with the prefix, this is the command we want
3893+ if ((*lIter).first == aPrefix) {
3894+ aCommand = (*lIter).second;
3895+ return true;
3896+ }
3897+
3898+ bool lIsCandidate = false;
3899+
3900+ // add this command to candidate commands if the prefix matches
3901+ if ((*lIter).first.find(aPrefix) == 0) {
3902+ lFoundCommands.push_back((*lIter).second);
3903+ lIsCandidate = true;
3904+ }
3905+
3906+ // now process the aliases
3907+ std::set<std::string> lAliases = (*lIter).second->getAliases();
3908+ std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
3909+ while (lAliasIter != lAliases.end()) {
3910+ // if a command alias is equal with the prefix, this is the command we want
3911+ if (*lAliasIter == aPrefix) {
3912+ aCommand = (*lIter).second;
3913+ return true;
3914+ }
3915+
3916+ // add this command to candidate commands if the prefix matches one alias
3917+ // and if the command is not already added
3918+ if (!lIsCandidate && (*lAliasIter).find(aPrefix) == 0) {
3919+ lFoundCommands.push_back((*lIter).second);
3920+ break;
3921+ }
3922+ lAliasIter++;
3923+ }
3924+
3925+ lIter++;
3926+ }
3927+
3928+ if (lFoundCommands.empty()) {
3929+ std::cout << "Command not found: " << aPrefix << std::endl;
3930+ return false;
3931+ }
3932+
3933+ if (lFoundCommands.size() > 1) {
3934+ std::cout << "Ambigous command: " << aPrefix << std::endl;
3935+ // show all possible commands that start with this prefix
3936+ for (std::string::size_type i = 0; i < lFoundCommands.size(); i++) {
3937+ UntypedCommand* lCommand = lFoundCommands.at(i);
3938+
3939+ // commands
3940+ if (lCommand->getName().find(aPrefix) == 0) {
3941+ std::cout << " " << lCommand->getName() << std::endl;
3942+ }
3943+
3944+ // and aliases
3945+ std::set<std::string> lAliases = lCommand->getAliases();
3946+ std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
3947+ while (lAliasIter != lAliases.end()) {
3948+ if ((*lAliasIter).find(aPrefix) == 0) {
3949+ std::cout << " " << *lAliasIter << std::endl;
3950+ }
3951+ lAliasIter++;
3952+ }
3953+ }
3954+ return false;
3955+ }
3956+
3957+ aCommand = lFoundCommands[0];
3958+ return true;
3959+}
3960+
3961+void
3962+CommandPrompt::parseLine(const std::string& aLine, std::vector<std::string>& aVector)
3963+{
3964+ std::string::size_type lBefore = 0;
3965+ std::string::size_type lPos = aLine.find_first_of(" \t", 0);
3966+
3967+ while (lPos != aLine.npos) {
3968+ std::string lSub = aLine.substr(lBefore, lPos - lBefore);
3969+
3970+ // if two consecutive spaces, you get an empty string here
3971+ if (lSub != "") {
3972+ if (lSub[0] == '"') {
3973+ std::string::size_type lBeforeCopy = lBefore;
3974+ do {
3975+ lBeforeCopy = aLine.find("\"", lBeforeCopy + 1);
3976+ } while (lPos != aLine.npos && aLine.size() > lPos + 1 && aLine[lPos + 1] == '\\');
3977+ lPos = lBeforeCopy;
3978+ lSub = aLine.substr(lBefore + 1, lPos - lBefore - 1);
3979+ }
3980+ aVector.push_back(lSub);
3981+ }
3982+
3983+ lBefore = lPos + 1;
3984+ lPos = aLine.find_first_of(" \t", lBefore);
3985+ }
3986+ std::string lSub = aLine.substr(lBefore);
3987+
3988+ // catching the case when the command ends with a space
3989+ if (lSub == "") {
3990+ return;
3991+ }
3992+
3993+ if (lSub[0] == '"') {
3994+ lPos = aLine.find("\"", lBefore + 1);
3995+ lSub = aLine.substr(lBefore + 1, lPos - lBefore - 1);
3996+ }
3997+ aVector.push_back(lSub);
3998+}
3999+
4000+} // namespace zorba
4001+} // namespace debugger
4002
4003=== added file 'bin/debugger/command_prompt.h'
4004--- bin/debugger/command_prompt.h 1970-01-01 00:00:00 +0000
4005+++ bin/debugger/command_prompt.h 2012-02-02 04:30:26 +0000
4006@@ -0,0 +1,72 @@
4007+/*
4008+ * Copyright 2006-2008 The FLWOR Foundation.
4009+ *
4010+ * Licensed under the Apache License, Version 2.0 (the "License");
4011+ * you may not use this file except in compliance with the License.
4012+ * You may obtain a copy of the License at
4013+ *
4014+ * http://www.apache.org/licenses/LICENSE-2.0
4015+ *
4016+ * Unless required by applicable law or agreed to in writing, software
4017+ * distributed under the License is distributed on an "AS IS" BASIS,
4018+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4019+ * See the License for the specific language governing permissions and
4020+ * limitations under the License.
4021+ */
4022+#pragma once
4023+#ifndef ZORBA_DEBUGGER_COMMAND_PROMPT_H
4024+#define ZORBA_DEBUGGER_COMMAND_PROMPT_H
4025+
4026+#include <string>
4027+#include <map>
4028+#include <vector>
4029+
4030+#include "config.h"
4031+
4032+#ifdef ZORBA_HAVE_LIBEDIT_H
4033+# include <histedit.h>
4034+#endif
4035+
4036+
4037+namespace zorba { namespace debugger {
4038+
4039+class UntypedCommand;
4040+
4041+class CommandPrompt
4042+{
4043+ public:
4044+ CommandPrompt();
4045+ ~CommandPrompt();
4046+
4047+ public:
4048+
4049+ void execute();
4050+
4051+ CommandPrompt& operator<< (UntypedCommand* command);
4052+
4053+ private:
4054+
4055+ void
4056+ printHelp(UntypedCommand* command);
4057+
4058+ bool
4059+ findCommand(const std::string& prefix, UntypedCommand*& command);
4060+
4061+ void
4062+ parseLine(const std::string& line, std::vector<std::string>& vector);
4063+
4064+ private:
4065+ std::map<std::string, UntypedCommand*> theCommands;
4066+ std::vector<std::string> theLastArgs;
4067+
4068+#ifdef ZORBA_HAVE_LIBEDIT_H
4069+ EditLine* theEditLine;
4070+ History* theHistory;
4071+#endif
4072+};
4073+
4074+
4075+} // namespace zorba
4076+} // namespace debugger
4077+
4078+#endif // ZORBA_DEBUGGER_COMMAND_PROMPT_H
4079
4080=== added file 'bin/debugger/config.h.cmake'
4081--- bin/debugger/config.h.cmake 1970-01-01 00:00:00 +0000
4082+++ bin/debugger/config.h.cmake 2012-02-02 04:30:26 +0000
4083@@ -0,0 +1,24 @@
4084+/*
4085+ * Copyright 2006-2008 The FLWOR Foundation.
4086+ *
4087+ * Licensed under the Apache License, Version 2.0 (the "License");
4088+ * you may not use this file except in compliance with the License.
4089+ * You may obtain a copy of the License at
4090+ *
4091+ * http://www.apache.org/licenses/LICENSE-2.0
4092+ *
4093+ * Unless required by applicable law or agreed to in writing, software
4094+ * distributed under the License is distributed on an "AS IS" BASIS,
4095+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4096+ * See the License for the specific language governing permissions and
4097+ * limitations under the License.
4098+ */
4099+
4100+// This header is configured by Zorba's build process -- DO NOT EDIT!
4101+
4102+#ifndef ZORBA_DEBUGGER_CONFIG_H
4103+#define ZORBA_DEBUGGER_CONFIG_H
4104+
4105+#cmakedefine ZORBA_HAVE_LIBEDIT_H
4106+
4107+#endif /* ZORBA_DEBUGGER_CONFIG_H */
4108
4109=== modified file 'bin/debugger/event_handler.cpp'
4110--- bin/debug_client/event_handler.cpp 2011-07-01 01:53:24 +0000
4111+++ bin/debugger/event_handler.cpp 2012-02-02 04:30:26 +0000
4112@@ -13,88 +13,93 @@
4113 * See the License for the specific language governing permissions and
4114 * limitations under the License.
4115 */
4116+
4117+#include "event_handler.h"
4118+
4119+#include <sstream>
4120+
4121 #include <zorba/zorba.h>
4122 #include <zorba/store_manager.h>
4123 #include <zorba/iterator.h>
4124-#include <sstream>
4125-#include "debug_client/event_handler.h"
4126
4127-namespace zorba { namespace debugclient {
4128+namespace zorba { namespace debugger {
4129
4130- EventHandler::EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContProducer)
4131+EventHandler::EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContProducer)
4132 : theIdQueue(aQueue), theContinueProducer(aContProducer),
4133 theStore(StoreManager::getStore()),
4134 theZorbaInstance(Zorba::getInstance(theStore)),
4135 theStaticContext(theZorbaInstance->createStaticContext())
4136-
4137- {
4138- try {
4139- Zorba_CompilerHints_t lHints;
4140- lHints.opt_level = ZORBA_OPT_LEVEL_O1;
4141- std::auto_ptr<std::istream> stream(getCurrentDirectory());
4142- zorba::String query;
4143- char buffer[1024];
4144- std::string::size_type s;
4145- while ((s = stream->readsome(buffer, 1024))) {
4146- query.append(std::string(buffer, s));
4147- }
4148- theStaticContext->loadProlog(query, lHints);
4149- } catch (zorba::ZorbaException& e) {
4150- std::cerr << "Exception: I was not able to load the query file:" << std::endl;
4151- std::cerr << e.what() << std::endl;
4152- throw;
4153- }
4154- }
4155-
4156- EventHandler::~EventHandler()
4157- {
4158- theStaticContext = 0;
4159- theZorbaInstance->shutdown();
4160- StoreManager::shutdownStore(theStore);
4161- }
4162-
4163- void EventHandler::parseMessage(const std::string &aMessage)
4164- {
4165- try {
4166- zorba::String queryString = "local:main(";
4167- queryString += aMessage + ")";
4168- XQuery_t query = theZorbaInstance->compileQuery(queryString, theStaticContext);
4169- Iterator_t lIter = query->iterator();
4170- Item item;
4171- lIter->open();
4172- bool doContinue = false;
4173- lIter->next(item);
4174- {
4175- const std::string& continueString = item.getStringValue().str();
4176- if (continueString == "true") {
4177- doContinue = true;
4178- } else if (continueString == "false") {
4179- doContinue = false;
4180- } else {
4181- std::stringstream stream(continueString);
4182- stream >> doContinue;
4183- }
4184- }
4185- lIter->next(item);
4186- std::size_t lId;
4187- {
4188- std::stringstream stream(item.getStringValue().c_str());
4189- stream >> lId;
4190- }
4191- lIter->next(item);
4192- std::cout << item.getStringValue() << std::endl;
4193- theContinueProducer.produce(doContinue);
4194- theIdQueue.produce(lId);
4195- } catch (ZorbaException& e) {
4196- std::cerr << "FATAL: could not execute query: " << std::endl;
4197- std::cerr << e << std::endl;
4198- std::cerr << "This is a bug, please report to zorba-users@lists.sourceforge.net" << std::endl;
4199- theContinueProducer.produce(false);
4200- }
4201- }
4202-
4203- void EventHandler::error(unsigned int errcode, const std::string &msg)
4204- {
4205- std::cerr << "Error " << errcode << ": " << msg << std::endl;
4206- }
4207-}}
4208+{
4209+}
4210+
4211+EventHandler::~EventHandler()
4212+{
4213+ theStaticContext = 0;
4214+ theZorbaInstance->shutdown();
4215+ StoreManager::shutdownStore(theStore);
4216+}
4217+
4218+void
4219+EventHandler::init()
4220+{
4221+ try {
4222+ Zorba_CompilerHints_t lHints;
4223+ lHints.opt_level = ZORBA_OPT_LEVEL_O1;
4224+ zorba::String lProlog("import module namespace dmh = 'http://www.zorba-xquery.com/modules/debugger/dbgp-message-handler';");
4225+ theStaticContext->loadProlog(lProlog, lHints);
4226+ } catch (zorba::ZorbaException& e) {
4227+ std::cerr << "Exception: I was not able to load the query file:" << std::endl;
4228+ std::cerr << e.what() << std::endl;
4229+ throw;
4230+ }
4231+}
4232+
4233+void
4234+EventHandler::parseMessage(const std::string &aMessage)
4235+{
4236+ try {
4237+#ifndef NDEBUG
4238+ // uncomment this to see the raw messages received by the event handler
4239+ //std::cout << "Processing response: " << aMessage << std::endl;
4240+#endif
4241+ // the query to process the response
4242+ std::stringstream lQueryStream;
4243+ lQueryStream << "dmh:process(" << aMessage << ")";
4244+ XQuery_t lQuery = theZorbaInstance->compileQuery(lQueryStream.str(), theStaticContext);
4245+
4246+ // get the query result sequrence:
4247+ // 1. a message
4248+ Iterator_t lIter = lQuery->iterator();
4249+ Item lItem;
4250+ lIter->open();
4251+ lIter->next(lItem);
4252+ std::size_t lId;
4253+ std::stringstream lStream(lItem.getStringValue().c_str());
4254+ lStream >> lId;
4255+
4256+ // 2. an "idle" flag (to disable quit confirmation)
4257+ bool lCanQuit = false;
4258+ if (lIter->next(lItem)) {
4259+ String lMessage = lItem.getStringValue();
4260+ lCanQuit = lMessage == "idle";
4261+ std::cout << std::endl << lItem.getStringValue() << std::endl;
4262+ }
4263+ theContinueProducer.produce(lCanQuit);
4264+
4265+ // go and solve the event with this id
4266+ theIdQueue.produce(lId);
4267+ } catch (ZorbaException& e) {
4268+ std::cerr << "FATAL: could not execute query: " << std::endl;
4269+ std::cerr << e << std::endl;
4270+ std::cerr << "This is a bug, please report it at http://bugs.launchpad.net/zorba" << std::endl;
4271+ }
4272+}
4273+
4274+void
4275+EventHandler::error(unsigned int errcode, const std::string &msg)
4276+{
4277+ std::cerr << "Error " << errcode << ": " << msg << std::endl;
4278+}
4279+
4280+} // namespace zorba
4281+} // namespace debugger
4282
4283=== modified file 'bin/debugger/event_handler.h'
4284--- bin/debug_client/event_handler.h 2011-07-01 01:53:24 +0000
4285+++ bin/debugger/event_handler.h 2012-02-02 04:30:26 +0000
4286@@ -14,33 +14,46 @@
4287 * limitations under the License.
4288 */
4289 #pragma once
4290+#ifndef ZORBA_DEBUGGER_EVENT_HANDLER_H
4291+#define ZORBA_DEBUGGER_EVENT_HANDLER_H
4292+
4293 #include <string>
4294 #include <iostream>
4295+
4296 #include <zorba/debugger_event_handler.h>
4297 #include <zorba/static_context.h>
4298+
4299 #include "lock_free_queue.h"
4300
4301-namespace zorba {
4302- class Zorba;
4303-}
4304-
4305-namespace zorba { namespace debugclient {
4306-
4307- class EventHandler : public zorba::DebuggerEventHandler
4308- {
4309+
4310+namespace zorba { namespace debugger {
4311+
4312+class EventHandler : public zorba::DebuggerEventHandler
4313+{
4314 public:
4315- EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContQueue);
4316+ EventHandler(
4317+ LockFreeProducer<std::size_t>& aQueue,
4318+ LockFreeProducer<bool>& aContQueue);
4319+
4320 ~EventHandler();
4321+
4322 public:
4323 virtual void parseMessage(const std::string& aMessage);
4324+
4325 virtual void error(unsigned int errcode, const std::string& msg);
4326+
4327+ virtual void init();
4328+
4329 private:
4330- static std::istream* getCurrentDirectory();
4331 LockFreeProducer<std::size_t>& theIdQueue;
4332 LockFreeProducer<bool>& theContinueProducer;
4333 void* theStore;
4334 Zorba* theZorbaInstance;
4335 StaticContext_t theStaticContext;
4336- };
4337+
4338+};
4339
4340-}} // end of namespace zorba::debugclient
4341+} // namespace zorba
4342+} // namespace debugger
4343+
4344+#endif // ZORBA_DEBUGGER_EVENT_HANDLER_H
4345
4346=== modified file 'bin/debugger/lock_free_queue.h'
4347--- bin/debug_client/lock_free_queue.h 2011-07-01 01:53:24 +0000
4348+++ bin/debugger/lock_free_queue.h 2012-02-02 04:30:26 +0000
4349@@ -14,10 +14,14 @@
4350 * limitations under the License.
4351 */
4352 #pragma once
4353+#ifndef ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
4354+#define ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
4355+
4356 #include <iostream>
4357 #include <list>
4358
4359-namespace zorba { namespace debugclient {
4360+
4361+namespace zorba { namespace debugger {
4362
4363 template<typename T>
4364 class LockFreeProducer
4365@@ -80,4 +84,8 @@
4366 }
4367 return false;
4368 }
4369-}} // namespace zorba::debugclient
4370+
4371+} // namespace zorba
4372+} // namespace debugger
4373+
4374+#endif // ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
4375
4376=== modified file 'bin/debugger/main.cpp'
4377--- bin/debug_client/main.cpp 2011-07-01 01:53:24 +0000
4378+++ bin/debugger/main.cpp 2012-02-02 04:30:26 +0000
4379@@ -13,12 +13,286 @@
4380 * See the License for the specific language governing permissions and
4381 * limitations under the License.
4382 */
4383+
4384+#ifdef WIN32
4385+# include <windows.h>
4386+# include <string.h>
4387+# include <strsafe.h>
4388+#endif
4389+
4390+#include <vector>
4391+
4392 #include <zorba/config.h>
4393-#include "debug_command.h"
4394-#include "command_line_handler.h"
4395+
4396+#include "xqdb_client.h"
4397+#include "process_listener.h"
4398+
4399
4400 using namespace zorba;
4401-using namespace zorba::debugclient;
4402+using namespace zorba::debugger;
4403+
4404+
4405+std::auto_ptr<XqdbClient> theClient;
4406+
4407+// this will make sure the xqdb process will not quit when Ctrl-C is pressed
4408+#ifdef WIN32
4409+BOOL WINAPI
4410+ctrlC_Handler(DWORD aCtrlType)
4411+{
4412+ if (CTRL_C_EVENT == aCtrlType) {
4413+ return true;
4414+ }
4415+ return false;
4416+}
4417+#else
4418+void
4419+ctrlC_Handler(int lParam)
4420+{
4421+ // an empty sugnal handler on Linux should do the job
4422+}
4423+#endif
4424+
4425+
4426+// this handler function is passed the the zorba process listener and will
4427+// the client if the zorba process terminates
4428+void
4429+onExitProcess(ExitCode aExitCode) {
4430+ std::cout << std::endl << "Terminating debugger client." << std::endl;
4431+
4432+#ifndef WIN32
4433+ XqdbClient* lClient = theClient.release();
4434+ if (lClient) {
4435+ delete lClient;
4436+ }
4437+#endif
4438+
4439+ exit(aExitCode);
4440+}
4441+
4442+
4443+int
4444+startZorba(std::string& aExec, std::vector<std::string>& aArgs, std::auto_ptr<ProcessListener>& aProcessListener)
4445+{
4446+#ifdef WIN32
4447+ // **************************
4448+ // start a process on Windows
4449+
4450+ DWORD iReturnVal = 0;
4451+
4452+ std::wstring lExec;
4453+ std::wstring lArgs;
4454+
4455+ lExec.assign(aExec.begin(), aExec.end());
4456+
4457+ // the executable must be the first in the list of arguments
4458+ lArgs.append(L"\"");
4459+ lArgs.append(lExec);
4460+ lArgs.append(L"\"");
4461+
4462+ for (std::vector<std::string>::size_type j = 0; j < aArgs.size(); j++) {
4463+ std::string lArg(aArgs.at(j));
4464+ std::wstring lArgW;
4465+ lArgW.assign(lArg.begin(), lArg.end());
4466+ lArgs.append(L" ");
4467+ lArgs.append(lArgW);
4468+ }
4469+
4470+ // CreateProcessW can modify Parameters thus we allocate needed memory
4471+ wchar_t * pwszParam = new wchar_t[lArgs.size() + 1];
4472+ if (pwszParam == 0) {
4473+ return 1;
4474+ }
4475+ const wchar_t* pchrTemp = lArgs.c_str();
4476+ wcscpy_s(pwszParam, lArgs.size() + 1, pchrTemp);
4477+
4478+ // CreateProcess API initialization
4479+ STARTUPINFOW siStartupInfo;
4480+ PROCESS_INFORMATION piProcessInfo;
4481+ memset(&siStartupInfo, 0, sizeof(siStartupInfo));
4482+ memset(&piProcessInfo, 0, sizeof(piProcessInfo));
4483+ siStartupInfo.cb = sizeof(siStartupInfo);
4484+
4485+ BOOL lResult = CreateProcessW(
4486+ const_cast<LPCWSTR>(lExec.c_str()),
4487+ pwszParam, 0, 0, false,
4488+ CREATE_DEFAULT_ERROR_MODE, 0, 0,
4489+ &siStartupInfo, &piProcessInfo);
4490+
4491+ if (lResult) {
4492+ // Watch the process
4493+ aProcessListener.reset(new ProcessListener(piProcessInfo.dwProcessId, &onExitProcess));
4494+ }
4495+ else {
4496+ // CreateProcess failed
4497+ iReturnVal = GetLastError();
4498+ LPVOID lpMsgBuf;
4499+ LPVOID lpDisplayBuf;
4500+
4501+ FormatMessage(
4502+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
4503+ NULL,
4504+ iReturnVal,
4505+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
4506+ (LPTSTR) &lpMsgBuf,
4507+ 0, NULL);
4508+
4509+ // Display the error message and exit the process
4510+
4511+ lpDisplayBuf = (LPVOID)LocalAlloc(
4512+ LMEM_ZEROINIT,
4513+ (lstrlen((LPCTSTR)lpMsgBuf) + 40) * sizeof(TCHAR));
4514+
4515+ StringCchPrintf(
4516+ (LPTSTR)lpDisplayBuf,
4517+ LocalSize(lpDisplayBuf) / sizeof(TCHAR),
4518+ TEXT("Error (%d) when starting zorba: %s"),
4519+ iReturnVal,
4520+ lpMsgBuf);
4521+
4522+ std::wstring lErrorW((wchar_t*)lpDisplayBuf);
4523+ std::string lError;
4524+ lError.assign(lErrorW.begin(), lErrorW.end());
4525+ std::cout << lError << std::endl;
4526+
4527+ LocalFree(lpMsgBuf);
4528+ LocalFree(lpDisplayBuf);
4529+ }
4530+
4531+ // Free memory
4532+ delete[]pwszParam;
4533+ pwszParam = 0;
4534+
4535+ // Release handles
4536+ CloseHandle(piProcessInfo.hProcess);
4537+ CloseHandle(piProcessInfo.hThread);
4538+
4539+ return iReturnVal;
4540+
4541+#else
4542+ // ************************
4543+ // start a process on Linux
4544+
4545+ pid_t pID = fork();
4546+ if (pID == 0) {
4547+ // Code only executed by child process
4548+ std::stringstream lCommand;
4549+ lCommand << aExec;
4550+ for (std::vector<std::string>::size_type j = 0; j < aArgs.size(); j++) {
4551+ lCommand << " " << aArgs.at(j);
4552+ }
4553+
4554+ int lRes = system(lCommand.str().c_str());
4555+ exit(lRes);
4556+ }
4557+ else {
4558+ // Code only executed by parent process
4559+ if (pID < 0) {
4560+ std::cerr << "Failed to fork Zorba" << std::endl;
4561+ return pID;
4562+ }
4563+
4564+ // Watch the process
4565+ aProcessListener.reset(new ProcessListener(pID, &onExitProcess));
4566+
4567+ return 0;
4568+ }
4569+#endif
4570+}
4571+
4572+void printUsage(std::string& aProgram)
4573+{
4574+ std::cerr << "Usage:" << std::endl
4575+ << " " << aProgram << " <zorba_arguments>" << std::endl
4576+ << " this will start a debugger command line and a zorba process with the given arguments" << std::endl;
4577+}
4578+
4579+bool
4580+processArguments(
4581+ int argc,
4582+ char* argv[],
4583+ std::string& aProgram,
4584+ bool& aStandalone,
4585+ std::string& aZorba,
4586+ unsigned int& aPort,
4587+ std::vector<std::string>& aZorbaArgs)
4588+{
4589+ aPort = 28028;
4590+
4591+ // find the path to Zorba and this executable name
4592+ aProgram = argv[0];
4593+
4594+#ifdef WIN32
4595+ char lSep = '\\';
4596+#else
4597+ char lSep = '/';
4598+#endif
4599+ std::string::size_type lPos = aProgram.find_last_of(lSep);
4600+
4601+ std::stringstream lZs;
4602+
4603+ if (lPos == aProgram.npos) {
4604+ lZs << "." << lSep;
4605+ } else {
4606+ lZs << aProgram.substr(0, lPos + 1);
4607+ aProgram = aProgram.substr(lPos + 1);
4608+ }
4609+ lZs << "zorba";
4610+#ifdef WIN32
4611+ lZs << ".exe";
4612+#endif
4613+ aZorba = lZs.str();
4614+
4615+
4616+ bool lHasFileArg = false;
4617+ bool lHasQueryArg = false;
4618+ bool lHasQueryVal = false;
4619+
4620+ // find if the user asked for help or specified a specific port
4621+ for (int i = 1; i < argc; i++) {
4622+ std::string lArg = argv[i];
4623+ if (lArg == "-h" || lArg == "--help") {
4624+ return false;
4625+ }
4626+ else if (lArg == "-p" || lArg == "--debug-port") {
4627+ // if there is one more argument
4628+ if (i < argc - 1) {
4629+ // get the port value
4630+ int lPort;
4631+ std::stringstream lStream(argv[i + 1]);
4632+ lStream >> lPort;
4633+ if (!lStream.fail()) {
4634+ aPort = lPort;
4635+ }
4636+ }
4637+ }
4638+ else if (lArg == "-f") {
4639+ lHasFileArg = true;
4640+ }
4641+ else if (lArg == "-q") {
4642+ lHasQueryArg = true;
4643+ if (++i < argc) {
4644+ lHasQueryVal = true;
4645+ }
4646+ }
4647+ }
4648+
4649+ if (!lHasFileArg || !lHasQueryArg || !lHasQueryVal) {
4650+ std::cout << "Not enough arguments to start Zorba." << std::endl;
4651+ std::cout << "Running the standalone XQuery debugger client on port: " << aPort << std::endl;
4652+ return true;
4653+ }
4654+
4655+ // zorba will need the -d flag
4656+ aZorbaArgs.push_back("-d");
4657+
4658+ // gather all arguments (excepting the program name)
4659+ for (int i = 1; i < argc; i++) {
4660+ aZorbaArgs.push_back(argv[i]);
4661+ }
4662+
4663+ aStandalone = false;
4664+ return true;
4665+}
4666
4667 #ifndef _WIN32_WCE
4668 int
4669@@ -28,24 +302,72 @@
4670 _tmain(int argc, _TCHAR* argv[])
4671 #endif
4672 {
4673- int port = 28028;
4674- if (argv[1]) {
4675- std::stringstream stream(argv[1]);
4676- stream >> port;
4677- if (stream.fail() || argv[2]) {
4678- std::cerr << "Unknown argument. USAGE: " << argv[0] << " [PORT]" << std::endl;
4679- return 2;
4680+#ifdef WIN32
4681+ SetConsoleCtrlHandler(ctrlC_Handler, TRUE);
4682+#else
4683+ signal(SIGINT, ctrlC_Handler);
4684+#endif
4685+
4686+ // **************************************************************************
4687+ // processing arguments
4688+
4689+ std::string lProgram, lZorbaExec;
4690+ unsigned int lPort = 28028;
4691+ std::vector<std::string> lZorbaArgs;
4692+
4693+ bool lStandalone = true;
4694+ if (!processArguments(argc, argv, lProgram, lStandalone, lZorbaExec, lPort, lZorbaArgs)) {
4695+ printUsage(lProgram);
4696+ return 1;
4697+ }
4698+
4699+#ifndef NDEBUG
4700+ // **************************************************************************
4701+ // debug reporting
4702+
4703+ if (!lStandalone) {
4704+ std::cout << "Communication port: " << lPort << std::endl;
4705+ std::cout << "Zorba executable: " << lZorbaExec << std::endl;
4706+ std::cout << "Zorba arguments: ";
4707+ for (std::vector<std::string>::size_type j = 0; j < lZorbaArgs.size(); j++) {
4708+ std::cout << lZorbaArgs.at(j) << " ";
4709 }
4710+ std::cout << std::endl;
4711 }
4712+#endif
4713+
4714 try {
4715- LockFreeQueue<std::size_t> lQueue;
4716- LockFreeQueue<bool> lContEvent;
4717- EventHandler lHandler(lQueue, lContEvent);
4718- CommandLine cli;
4719- CommandLineHandler handler(port, lQueue, lContEvent, lHandler, cli);
4720- handler.execute();
4721+ // **************************************************************************
4722+ // start a zorba
4723+
4724+ // This is a process listener used to watch the Zorba process termination.
4725+ std::auto_ptr<ProcessListener> lProcessListener;
4726+
4727+ if (!lStandalone) {
4728+ int lResult = startZorba(lZorbaExec, lZorbaArgs, lProcessListener);
4729+ if (lResult) {
4730+ return lResult;
4731+ }
4732+ } else {
4733+ std::cout << "Listening for an incomming Zorba connection on port " << lPort << "..." << std::endl;
4734+ }
4735+
4736+ // **************************************************************************
4737+ // start the debugger command line
4738+
4739+ theClient.reset(new XqdbClient(lPort));
4740+ theClient->start();
4741+
4742 } catch (...) {
4743- return 4;
4744- }
4745+ return -1;
4746+ }
4747+
4748+#ifndef WIN32
4749+ XqdbClient* lClient = theClient.release();
4750+ if (lClient) {
4751+ delete lClient;
4752+ }
4753+#endif
4754+
4755 return 0;
4756 }
4757
4758=== added file 'bin/debugger/process_listener.cpp'
4759--- bin/debugger/process_listener.cpp 1970-01-01 00:00:00 +0000
4760+++ bin/debugger/process_listener.cpp 2012-02-02 04:30:26 +0000
4761@@ -0,0 +1,105 @@
4762+/*
4763+ * Copyright 2006-2008 The FLWOR Foundation.
4764+ *
4765+ * Licensed under the Apache License, Version 2.0 (the "License");
4766+ * you may not use this file except in compliance with the License.
4767+ * You may obtain a copy of the License at
4768+ *
4769+ * http://www.apache.org/licenses/LICENSE-2.0
4770+ *
4771+ * Unless required by applicable law or agreed to in writing, software
4772+ * distributed under the License is distributed on an "AS IS" BASIS,
4773+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4774+ * See the License for the specific language governing permissions and
4775+ * limitations under the License.
4776+ */
4777+
4778+#include "process_listener.h"
4779+
4780+#include <iostream>
4781+
4782+#ifdef ZORBA_HAVE_PTHREAD_H
4783+# include <cassert>
4784+#endif
4785+
4786+
4787+namespace zorba { namespace debugger {
4788+
4789+ProcessListener::ProcessListener(ProcessId aProcessID, ExitCallbackType aCallback)
4790+ : theProcessID(aProcessID), theCallback(aCallback)
4791+{
4792+#ifdef WIN32
4793+ theThread = CreateThread(NULL, 0, &run, (void*) this, 0, &theThreadId);
4794+#else
4795+ if (pthread_create(&theThread, NULL, &run, (void*) this)) {
4796+ assert(false);
4797+ }
4798+#endif
4799+}
4800+
4801+ProcessListener::~ProcessListener()
4802+{
4803+}
4804+
4805+ProcessId
4806+ProcessListener::getProcessID()
4807+{
4808+ return theProcessID;
4809+}
4810+
4811+ExitCallbackType
4812+ProcessListener::getCallback()
4813+{
4814+ return theCallback;
4815+}
4816+
4817+
4818+ZORBA_THREAD_RETURN
4819+ProcessListener::run(void* params)
4820+{
4821+ ProcessListener* lThis = static_cast<ProcessListener*>(params);
4822+ ExitCode lExitCode = -1;
4823+ ProcessId lPid = lThis->getProcessID();
4824+
4825+#ifdef WIN32
4826+ HANDLE lProcessHandle = OpenProcess(SYNCHRONIZE, false, lPid);
4827+ if (lProcessHandle != NULL) {
4828+ // wait for the process to exit
4829+ DWORD lResult = WaitForSingleObject(lProcessHandle, INFINITE);
4830+
4831+ // find out the process exit code if possible
4832+ if (!GetExitCodeProcess(lProcessHandle, &lExitCode)) {
4833+ lExitCode = -1;
4834+ }
4835+ DWORD dw = GetLastError();
4836+
4837+ // wait a little for zorba to dump the garbage
4838+ Sleep(1000);
4839+ }
4840+#else
4841+ int lChildExitStatus;
4842+
4843+ // wait for the process to exit
4844+ waitpid(lPid, &lChildExitStatus, 0);
4845+
4846+ // find out the process exit code if possible
4847+ if (WIFEXITED(lChildExitStatus)) {
4848+ lExitCode = WEXITSTATUS(lChildExitStatus);
4849+ }
4850+
4851+ // wait a little for zorba to dump the garbage
4852+ sleep(1);
4853+#endif
4854+
4855+ // and call the callback when this happened
4856+ ExitCallbackType lCallback = lThis->getCallback();
4857+ lCallback(lExitCode);
4858+
4859+ for (int i = 0; i < 10; i++) {
4860+ std::cout << i << std::endl;
4861+ }
4862+ return NULL;
4863+}
4864+
4865+} // namespace zorba
4866+} // namespace debugger
4867
4868=== added file 'bin/debugger/process_listener.h'
4869--- bin/debugger/process_listener.h 1970-01-01 00:00:00 +0000
4870+++ bin/debugger/process_listener.h 2012-02-02 04:30:26 +0000
4871@@ -0,0 +1,75 @@
4872+/*
4873+ * Copyright 2006-2008 The FLWOR Foundation.
4874+ *
4875+ * Licensed under the Apache License, Version 2.0 (the "License");
4876+ * you may not use this file except in compliance with the License.
4877+ * You may obtain a copy of the License at
4878+ *
4879+ * http://www.apache.org/licenses/LICENSE-2.0
4880+ *
4881+ * Unless required by applicable law or agreed to in writing, software
4882+ * distributed under the License is distributed on an "AS IS" BASIS,
4883+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4884+ * See the License for the specific language governing permissions and
4885+ * limitations under the License.
4886+ */
4887+#pragma once
4888+#ifndef ZORBA_DEBUGGER_PROCESS_LISTENER_H
4889+#define ZORBA_DEBUGGER_PROCESS_LISTENER_H
4890+
4891+#include <zorba/config.h>
4892+
4893+#ifdef ZORBA_HAVE_PTHREAD_H
4894+# include <pthread.h>
4895+# include <sys/wait.h>
4896+ typedef pthread_t ThreadId;
4897+ typedef pid_t ProcessId;
4898+ typedef int ExitCode;
4899+# define ZORBA_THREAD_RETURN void *
4900+#else
4901+# include <windows.h>
4902+ typedef DWORD ThreadId;
4903+ typedef DWORD ProcessId;
4904+ typedef DWORD ExitCode;
4905+# define ZORBA_THREAD_RETURN DWORD WINAPI
4906+#endif
4907+
4908+typedef void (*ExitCallbackType)(ExitCode);
4909+
4910+
4911+namespace zorba { namespace debugger {
4912+
4913+class ProcessListener
4914+{
4915+ public:
4916+ ProcessListener(ProcessId processID, ExitCallbackType callback);
4917+
4918+ ~ProcessListener();
4919+
4920+ ProcessId
4921+ getProcessID();
4922+
4923+ ExitCallbackType
4924+ getCallback();
4925+
4926+ private:
4927+
4928+ static ZORBA_THREAD_RETURN run(void* params);
4929+
4930+ private:
4931+
4932+#ifdef ZORBA_HAVE_PTHREAD_H
4933+ pthread_t theThread;
4934+#else
4935+ ThreadId theThreadId;
4936+ HANDLE theThread;
4937+#endif
4938+
4939+ ProcessId theProcessID;
4940+ ExitCallbackType theCallback;
4941+};
4942+
4943+} // namespace zorba
4944+} // namespace debugger
4945+
4946+#endif // ZORBA_DEBUGGER_PROCESS_LISTENER_H
4947
4948=== modified file 'bin/debugger/tuple.h'
4949--- bin/debug_client/tuple.h 2011-07-04 08:05:46 +0000
4950+++ bin/debugger/tuple.h 2012-02-02 04:30:26 +0000
4951@@ -14,9 +14,15 @@
4952 * limitations under the License.
4953 */
4954 #pragma once
4955+#ifndef ZORBA_DEBUGGER_TUPLE_H
4956+#define ZORBA_DEBUGGER_TUPLE_H
4957+
4958 #include <zorba/config.h>
4959+
4960 #if ZORBA_TR1_IN_TR1_SUBDIRECTORY
4961 # include <tr1/tuple>
4962 #else
4963 # include <tuple>
4964 #endif
4965+
4966+#endif // ZORBA_DEBUGGER_TUPLE_H
4967
4968=== added file 'bin/debugger/xqdb_client.cpp'
4969--- bin/debugger/xqdb_client.cpp 1970-01-01 00:00:00 +0000
4970+++ bin/debugger/xqdb_client.cpp 2012-02-02 04:30:26 +0000
4971@@ -0,0 +1,63 @@
4972+/*
4973+ * Copyright 2006-2008 The FLWOR Foundation.
4974+ *
4975+ * Licensed under the Apache License, Version 2.0 (the "License");
4976+ * you may not use this file except in compliance with the License.
4977+ * You may obtain a copy of the License at
4978+ *
4979+ * http://www.apache.org/licenses/LICENSE-2.0
4980+ *
4981+ * Unless required by applicable law or agreed to in writing, software
4982+ * distributed under the License is distributed on an "AS IS" BASIS,
4983+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4984+ * See the License for the specific language governing permissions and
4985+ * limitations under the License.
4986+ */
4987+
4988+#include "xqdb_client.h"
4989+
4990+#include <iostream>
4991+
4992+#ifdef ZORBA_HAVE_PTHREAD_H
4993+# include <cassert>
4994+#endif
4995+
4996+
4997+namespace zorba { namespace debugger {
4998+
4999+XqdbClient::XqdbClient(unsigned int aPort)
5000+{
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: