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: 173942 lines (+91840/-33825)
1220 files modified
.bzrignore (+2/-0)
CMakeConfiguration.txt (+3/-4)
CMakeLists.txt (+29/-7)
CPackSourceConfig.cmake.in (+1/-1)
ChangeLog (+93/-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 (+127/-61)
config/CMakeLists.txt (+5/-5)
config/ZorbaConfig.cmake.in (+7/-4)
doc/cxx/examples/CMakeLists.txt (+9/-0)
doc/cxx/examples/errors.cpp (+4/-4)
doc/cxx/examples/jsoniq.cpp (+392/-0)
doc/cxx/examples/simple.cpp (+17/-10)
doc/php/CMakeLists.txt (+1/-1)
doc/php/examples/CMakeLists.txt (+12/-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/CMakeLists.txt (+4/-0)
doc/zorba/JSONforXQuery.html (+1/-0)
doc/zorba/XQueryforJSON.html (+1/-0)
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/indexpage.dox.in (+9/-1)
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 (+121/-3)
include/zorba/item_factory.h (+106/-2)
include/zorba/options.h (+24/-5)
include/zorba/pregenerated/diagnostic_list.h (+82/-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 (+15/-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 (+389/-0)
modules/org/jsoniq/www/pregenerated/errors.xq (+109/-0)
schemas/CMakeLists.txt (+24/-0)
schemas/xhtml/xhtml-lat1.ent (+196/-0)
schemas/xhtml/xhtml-special.ent (+80/-0)
schemas/xhtml/xhtml-symbol.ent (+237/-0)
schemas/xhtml/xhtml1-frameset.dtd (+1235/-0)
schemas/xhtml/xhtml1-strict.dtd (+978/-0)
schemas/xhtml/xhtml1-transitional.dtd (+1201/-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 (+141/-1)
src/api/itemfactoryimpl.cpp (+122/-4)
src/api/itemfactoryimpl.h (+43/-3)
src/api/options.cpp (+38/-13)
src/api/serialization/serializer.cpp (+513/-77)
src/api/serialization/serializer.h (+120/-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 (+120/-5)
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 (+21/-0)
src/compiler/api/compilercb.h (+17/-4)
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 (+43/-18)
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/ftnode.cpp (+2/-2)
src/compiler/expression/json_exprs.cpp (+197/-0)
src/compiler/expression/json_exprs.h (+156/-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 (+56/-1)
src/compiler/expression/var_expr.h (+110/-32)
src/compiler/parser/location.hh (+4/-11)
src/compiler/parser/position.hh (+11/-22)
src/compiler/parser/stack.hh (+6/-14)
src/compiler/parser/xquery_parser.cpp (+9027/-8592)
src/compiler/parser/xquery_parser.hpp (+39/-75)
src/compiler/parser/xquery_parser.y (+182/-58)
src/compiler/parser/xquery_scanner.cpp (+3215/-3117)
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 (+121/-3)
src/compiler/parsetree/parsenodes.h (+123/-5)
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 (+8/-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 (+70/-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 (+873/-332)
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 (+29/-9)
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 (+88/-46)
src/context/root_static_context.h (+5/-3)
src/context/root_static_context_init.cpp.in (+9/-2)
src/context/static_context.cpp (+486/-398)
src/context/static_context.h (+116/-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 (+283/-45)
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 (+120/-6)
src/diagnostics/pregenerated/dict_en.cpp (+92/-10)
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 (+99/-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 (+36/-56)
src/functions/pregenerated/func_accessors.h (+70/-58)
src/functions/pregenerated/func_any_uri.cpp (+6/-6)
src/functions/pregenerated/func_any_uri.h (+4/-2)
src/functions/pregenerated/func_base64.cpp (+6/-6)
src/functions/pregenerated/func_base64.h (+8/-4)
src/functions/pregenerated/func_booleans.cpp (+9/-9)
src/functions/pregenerated/func_booleans.h (+21/-9)
src/functions/pregenerated/func_collections.cpp (+641/-291)
src/functions/pregenerated/func_collections.h (+451/-345)
src/functions/pregenerated/func_context.cpp (+24/-24)
src/functions/pregenerated/func_context.h (+32/-16)
src/functions/pregenerated/func_documents.cpp (+15/-15)
src/functions/pregenerated/func_documents.h (+22/-10)
src/functions/pregenerated/func_durations_dates_times.cpp (+63/-63)
src/functions/pregenerated/func_durations_dates_times.h (+84/-42)
src/functions/pregenerated/func_errors_and_diagnostics.cpp (+15/-15)
src/functions/pregenerated/func_errors_and_diagnostics.h (+21/-11)
src/functions/pregenerated/func_fetch.cpp (+6/-6)
src/functions/pregenerated/func_fetch.h (+8/-4)
src/functions/pregenerated/func_fnput.cpp (+3/-3)
src/functions/pregenerated/func_fnput.h (+6/-2)
src/functions/pregenerated/func_function_item_iter.cpp (+12/-12)
src/functions/pregenerated/func_function_item_iter.h (+12/-6)
src/functions/pregenerated/func_ic_ddl.cpp (+9/-9)
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 (+707/-0)
src/functions/pregenerated/func_jsoniq_functions.h (+523/-0)
src/functions/pregenerated/func_maps.cpp (+28/-28)
src/functions/pregenerated/func_maps.h (+32/-16)
src/functions/pregenerated/func_maths.cpp (+78/-78)
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.cpp (+75/-75)
src/functions/pregenerated/func_nodes.h (+128/-54)
src/functions/pregenerated/func_numerics.cpp (+33/-33)
src/functions/pregenerated/func_numerics.h (+35/-21)
src/functions/pregenerated/func_other_diagnostics.cpp (+6/-6)
src/functions/pregenerated/func_other_diagnostics.h (+8/-4)
src/functions/pregenerated/func_parse_fragment.cpp (+6/-6)
src/functions/pregenerated/func_parse_fragment.h (+4/-2)
src/functions/pregenerated/func_parsing_and_serializing.cpp (+12/-12)
src/functions/pregenerated/func_parsing_and_serializing.h (+10/-4)
src/functions/pregenerated/func_qnames.cpp (+24/-24)
src/functions/pregenerated/func_qnames.h (+41/-19)
src/functions/pregenerated/func_random.cpp (+12/-12)
src/functions/pregenerated/func_random.h (+12/-6)
src/functions/pregenerated/func_schema.cpp (+12/-12)
src/functions/pregenerated/func_schema.h (+27/-11)
src/functions/pregenerated/func_sctx.cpp (+75/-75)
src/functions/pregenerated/func_sctx.h (+100/-50)
src/functions/pregenerated/func_sequences.cpp (+121/-121)
src/functions/pregenerated/func_sequences.h (+255/-185)
src/functions/pregenerated/func_strings.cpp (+187/-127)
src/functions/pregenerated/func_strings.h (+154/-63)
src/functions/pregenerated/func_xqdoc.cpp (+6/-6)
src/functions/pregenerated/func_xqdoc.h (+8/-4)
src/functions/pregenerated/function_enum.h (+121/-47)
src/functions/signature.cpp (+92/-62)
src/functions/signature.h (+9/-1)
src/functions/udf.cpp (+242/-16)
src/functions/udf.h (+53/-5)
src/precompiled/stdafx.h (+1/-1)
src/runtime/CMakeLists.txt (+7/-0)
src/runtime/accessors/accessors_impl.cpp (+42/-23)
src/runtime/base/plan_iterator.h (+4/-0)
src/runtime/booleans/BooleanImpl.cpp (+237/-236)
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 (+51/-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 (+276/-0)
src/runtime/json/json_constructors.h (+135/-0)
src/runtime/json/json_impl.cpp (+527/-0)
src/runtime/json/jsoniq_functions_impl.cpp (+1048/-0)
src/runtime/json/pregenerated/json.cpp (+94/-0)
src/runtime/json/pregenerated/json.h (+114/-0)
src/runtime/json/pregenerated/jsoniq_functions.cpp (+679/-0)
src/runtime/json/pregenerated/jsoniq_functions.h (+928/-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 (+73/-15)
src/runtime/scripting/scripting.h (+8/-0)
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 (+20/-7)
src/runtime/spec/codegen-h.xq (+49/-12)
src/runtime/spec/collections/collections.xml (+458/-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 (+638/-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 (+7/-2)
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 (+295/-1)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+725/-0)
src/runtime/visitors/pregenerated/printer_visitor.h (+194/-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 (+24/-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 (+309/-37)
src/store/naive/json_items.cpp (+704/-0)
src/store/naive/json_items.h (+482/-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 (+3/-3)
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 (+408/-186)
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 (+255/-157)
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.cpp (+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 (+5/-5)
src/zorbaserialization/archiver.cpp (+4/-1)
src/zorbaserialization/archiver.h (+1/-1)
src/zorbaserialization/zorba_class_serializer.cpp (+1/-0)
src/zorbaserialization/zorba_class_serializer.h (+3/-5)
src/zorbatypes/URI.cpp (+0/-3)
src/zorbatypes/rchandle.h (+2/-2)
src/zorbatypes/rclist.h (+37/-0)
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 (+17/-27)
swig/php/XQueryProcessor.php (+397/-0)
swig/php/generate_proxy.php.in (+0/-209)
swig/php/test.xq (+1/-0)
swig/php/zorba_api.i (+7/-1)
swig/php/zorba_api_wrapper.php (+1215/-0)
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/fetch/fetch_random_file.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 (+1/-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/ebv01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/ebv02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/ebv04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/empty_member01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/empty_member02.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/string01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/true_false_null.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case01_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case06.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case07.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case08.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case11.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 (+280/-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/fetch/fetch_random_file.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-false-2.xq (+2/-0)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-2.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-3.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-4.xq (+1/-1)
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 (+2/-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 (+95/-0)
test/rbkt/Queries/zorba/jsoniq/data01.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/data01.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/data02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/data02.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/data03.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/data03.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/data04.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/data04.xq (+1/-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/ebv01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/ebv02.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/ebv03.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/ebv03.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/ebv04.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/empty_member01.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/empty_member02.xq (+10/-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/member_03.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/member_03.xq (+5/-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/string01.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/string02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/string02.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/true_false_null.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/use_case01.xq (+30/-0)
test/rbkt/Queries/zorba/jsoniq/use_case01_2.xq (+29/-0)
test/rbkt/Queries/zorba/jsoniq/use_case02.xq (+26/-0)
test/rbkt/Queries/zorba/jsoniq/use_case03.xq (+59/-0)
test/rbkt/Queries/zorba/jsoniq/use_case04.xq (+32/-0)
test/rbkt/Queries/zorba/jsoniq/use_case05.xml (+44/-0)
test/rbkt/Queries/zorba/jsoniq/use_case05.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/use_case06.xq (+16/-0)
test/rbkt/Queries/zorba/jsoniq/use_case07.xq (+33/-0)
test/rbkt/Queries/zorba/jsoniq/use_case08.xq (+24/-0)
test/rbkt/Queries/zorba/jsoniq/use_case09.xq (+33/-0)
test/rbkt/Queries/zorba/jsoniq/use_case10.xq (+20/-0)
test/rbkt/Queries/zorba/jsoniq/use_case11.xq (+53/-0)
test/rbkt/Queries/zorba/jsoniq/value_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/values_01.xq (+4/-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/local-xhtml.spec (+1/-0)
test/rbkt/Queries/zorba/schemas/local-xhtml.xq (+6/-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/modules/CMakeLists.txt (+4/-0)
test/rbkt/modules/random-file.txt (+1/-0)
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+91965@code.launchpad.net

This proposal supersedes a proposal from 2012-02-07.

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

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 : 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

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

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 :

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

Subscribers

People subscribed via source and target branches

to all changes: