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: 241071 lines (+121084/-65139)
1254 files modified
.bzrignore (+2/-0)
CMakeConfiguration.txt (+3/-4)
CMakeLists.txt (+32/-9)
CPackSourceConfig.cmake.in (+1/-1)
ChangeLog (+94/-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 (+172/-96)
config/CMakeLists.txt (+5/-5)
config/ZorbaConfig.cmake.in (+7/-4)
doc/cxx/examples/CMakeLists.txt (+4/-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 (+7/-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 (+16/-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 (+18/-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 (+131/-4)
src/api/itemfactoryimpl.h (+43/-3)
src/api/options.cpp (+38/-13)
src/api/serialization/serializer.cpp (+518/-79)
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 (+36/-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 (+487/-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 (+39/-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 (+211/-40)
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 (+922/-254)
src/store/naive/atomic_items.h (+267/-89)
src/store/naive/collection_set.cpp (+43/-27)
src/store/naive/collection_set.h (+86/-85)
src/store/naive/dataguide.cpp (+1/-1)
src/store/naive/inmemorystore.cpp (+2/-2)
src/store/naive/inmemorystorec.cpp (+1/-1)
src/store/naive/item.cpp (+370/-60)
src/store/naive/item_iterator.cpp (+1/-1)
src/store/naive/item_vector.cpp (+4/-2)
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 (+103/-67)
src/store/naive/loader_fast.cpp (+42/-47)
src/store/naive/name_iterator.h (+68/-62)
src/store/naive/node_factory.cpp (+6/-6)
src/store/naive/node_factory.h (+3/-3)
src/store/naive/node_items.cpp (+653/-286)
src/store/naive/node_items.h (+179/-77)
src/store/naive/node_iterators.cpp (+38/-12)
src/store/naive/node_iterators.h (+63/-9)
src/store/naive/node_updates.cpp (+19/-19)
src/store/naive/nsbindings.cpp (+4/-4)
src/store/naive/nsbindings.h (+3/-2)
src/store/naive/ordpath.cpp (+96/-2)
src/store/naive/ordpath.h (+11/-4)
src/store/naive/properties.cpp (+1/-1)
src/store/naive/pul_primitive_factory.cpp (+248/-172)
src/store/naive/pul_primitive_factory.h (+74/-8)
src/store/naive/pul_primitives.cpp (+402/-106)
src/store/naive/pul_primitives.h (+202/-28)
src/store/naive/qname_pool.cpp (+8/-8)
src/store/naive/qname_pool.h (+1/-1)
src/store/naive/shared_types.h (+25/-0)
src/store/naive/simple_collection.cpp (+414/-192)
src/store/naive/simple_collection.h (+32/-41)
src/store/naive/simple_index.cpp (+316/-306)
src/store/naive/simple_index.h (+163/-204)
src/store/naive/simple_index_general.cpp (+1564/-2176)
src/store/naive/simple_index_general.h (+313/-174)
src/store/naive/simple_index_value.cpp (+188/-52)
src/store/naive/simple_index_value.h (+84/-39)
src/store/naive/simple_item_factory.cpp (+185/-15)
src/store/naive/simple_item_factory.h (+45/-0)
src/store/naive/simple_iterator_factory.cpp (+6/-6)
src/store/naive/simple_lazy_temp_seq.cpp (+159/-97)
src/store/naive/simple_lazy_temp_seq.h (+29/-144)
src/store/naive/simple_pul.cpp (+413/-120)
src/store/naive/simple_pul.h (+88/-9)
src/store/naive/simple_store.cpp (+313/-228)
src/store/naive/simple_store.h (+100/-52)
src/store/naive/simple_temp_seq.cpp (+167/-220)
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/store/naive/string_pool.cpp (+1/-1)
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 (+9/-1)
src/unit_tests/string.cpp (+11/-1)
src/unit_tests/string_instantiate.cpp (+9/-1)
src/unit_tests/test_debugger_protocol.cpp (+0/-414)
src/unit_tests/thesaurus.cpp (+18/-14)
src/unit_tests/tokenizer.cpp (+9/-1)
src/unit_tests/unique_ptr.cpp (+8/-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 (+9/-4)
src/util/http_util.h (+0/-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 (+18/-5)
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 (+18/-1)
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/http-test-data/docroot/http-test-data/http2.xml (+4/-0)
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/spec/xquery_1_1.xml.res (+0/-4)
test/rbkt/ExpQueryResults/zorba/spec/xquery_3_0.xml.res (+4/-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 (+281/-19)
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_bogus2.xq (+1/-1)
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/spec/XQuery_3.0.html (+28771/-30944)
test/rbkt/Queries/zorba/spec/xquery_1_1.spec (+0/-5)
test/rbkt/Queries/zorba/spec/xquery_1_1.xq (+0/-69)
test/rbkt/Queries/zorba/spec/xquery_3_0.spec (+5/-0)
test/rbkt/Queries/zorba/spec/xquery_3_0.xq (+69/-0)
test/rbkt/Queries/zorba/spec/xquery_spec.xqi (+4/-13)
test/rbkt/Queries/zorba/store/documents.xq (+1/-0)
test/rbkt/Queries/zorba/store/example_3.xq (+4/-4)
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/versioning/import-chain1.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import-chain2.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import1.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import2.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import3.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import4.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import5.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import6.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import7.xq (+1/-1)
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 (+7/-3)
test/rbkt/modules/bad-ver.xq (+1/-1)
test/rbkt/modules/module-A.xq (+1/-1)
test/rbkt/modules/module-B.xq (+1/-1)
test/rbkt/modules/random-file.txt (+1/-0)
test/rbkt/modules/ver.xq (+1/-1)
test/rbkt/modules/ver2.xq (+1/-1)
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+92335@code.launchpad.net

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

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 : 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-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental failed. Below is the output from the failed tests.

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

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

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

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

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

Subscribers

People subscribed via source and target branches

to all changes: