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: 170057 lines (+89370/-32359)
1207 files modified
CMakeConfiguration.txt (+3/-4)
CMakeLists.txt (+29/-7)
CPackSourceConfig.cmake.in (+1/-1)
ChangeLog (+93/-12)
NOTICE.txt (+0/-740)
bin/CMakeLists.txt (+58/-19)
bin/debug_client/debug_command.cpp (+0/-99)
bin/debug_client/event_handler_init.cpp.in (+0/-41)
bin/debug_client/lock_free_queue.cpp (+0/-16)
bin/debug_client/message-handler.xq (+0/-165)
bin/debugger/command.h (+164/-211)
bin/debugger/command_arg.h (+237/-0)
bin/debugger/command_line_handler.cpp (+364/-204)
bin/debugger/command_line_handler.h (+116/-58)
bin/debugger/command_prompt.cpp (+287/-0)
bin/debugger/command_prompt.h (+72/-0)
bin/debugger/config.h.cmake (+24/-0)
bin/debugger/event_handler.cpp (+81/-76)
bin/debugger/event_handler.h (+25/-12)
bin/debugger/lock_free_queue.h (+10/-2)
bin/debugger/main.cpp (+340/-18)
bin/debugger/process_listener.cpp (+105/-0)
bin/debugger/process_listener.h (+75/-0)
bin/debugger/tuple.h (+6/-0)
bin/debugger/xqdb_client.cpp (+63/-0)
bin/debugger/xqdb_client.h (+51/-0)
bin/path_util.cpp (+60/-45)
bin/path_util.h (+9/-24)
bin/zorbacmd.cpp (+87/-50)
bin/zorbacmdproperties.cpp (+14/-5)
bin/zorbacmdproperties.h (+7/-1)
bin/zorbacmdproperties.txt (+3/-1)
bin/zorbacmdproperties_base.h (+19/-3)
cmake_modules/FindLibedit.cmake (+46/-0)
cmake_modules/FindPHP5.cmake (+5/-0)
cmake_modules/ZorbaModule.cmake (+127/-61)
config/CMakeLists.txt (+5/-5)
config/ZorbaConfig.cmake.in (+7/-4)
doc/cxx/examples/errors.cpp (+4/-4)
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/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 (+1/-1)
doc/zorba/jsoniq.dox (+66/-0)
doc/zorba/modules_authoring.dox (+2/-3)
doc/zorba/modules_authoring_2.dox (+4/-3)
doc/zorba/modules_building_in.dox (+1/-1)
doc/zorba/options.dox (+233/-54)
doc/zorba/uriresolvers.dox (+120/-38)
doc/zorba/xqddf.dox (+206/-153)
doc/zorba/xqdoc/templates/main.html (+36/-24)
include/zorba/config.h.cmake (+13/-10)
include/zorba/debugger_client.h (+14/-2)
include/zorba/diagnostic.h (+9/-1)
include/zorba/dynamic_context.h (+14/-1)
include/zorba/error.h (+7/-0)
include/zorba/identtypes.h (+16/-4)
include/zorba/internal/qname.h (+40/-0)
include/zorba/internal/type_traits.h (+3/-1)
include/zorba/internal/unique_ptr.h (+2/-2)
include/zorba/item.h (+29/-3)
include/zorba/item_factory.h (+60/-1)
include/zorba/options.h (+24/-5)
include/zorba/pregenerated/diagnostic_list.h (+80/-4)
include/zorba/static_collection_manager.h (+66/-3)
include/zorba/static_context.h (+619/-529)
include/zorba/store_consts.h (+42/-8)
include/zorba/thesaurus.h (+24/-28)
include/zorba/typeident.h (+44/-34)
include/zorba/uri_resolvers.h (+18/-3)
include/zorba/xquery.h (+19/-1)
include/zorba/zorba.h (+1/-0)
modules/ExternalModules.conf (+14/-13)
modules/com/zorba-xquery/www/modules/CMakeLists.txt (+19/-1)
modules/com/zorba-xquery/www/modules/converters/json-options.xsd (+47/-0)
modules/com/zorba-xquery/www/modules/converters/json.xq (+231/-0)
modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq (+277/-0)
modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_handler.cpp (+4/-4)
modules/com/zorba-xquery/www/modules/node-position.xq (+524/-0)
modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+89/-9)
modules/com/zorba-xquery/www/modules/pregenerated/warnings.xq (+20/-1)
modules/com/zorba-xquery/www/modules/store/jsoniq/dynamic/collections/ddl.xq (+122/-0)
modules/com/zorba-xquery/www/modules/store/jsoniq/dynamic/collections/dml.xq (+354/-0)
modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq (+187/-60)
modules/com/zorba-xquery/www/modules/string.xq (+21/-1)
modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq (+20/-13)
modules/org/CMakeLists.txt (+2/-0)
modules/org/jsoniq/CMakeLists.txt (+15/-0)
modules/org/jsoniq/www/CMakeLists.txt (+21/-0)
modules/org/jsoniq/www/functions.xq (+272/-0)
modules/org/jsoniq/www/pregenerated/errors.xq (+104/-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 (+33/-1)
src/api/itemfactoryimpl.cpp (+61/-4)
src/api/itemfactoryimpl.h (+25/-3)
src/api/options.cpp (+38/-13)
src/api/serialization/serializer.cpp (+451/-63)
src/api/serialization/serializer.h (+111/-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 (+189/-0)
src/compiler/expression/json_exprs.h (+148/-0)
src/compiler/expression/path_expr.h (+5/-5)
src/compiler/expression/script_exprs.cpp (+163/-17)
src/compiler/expression/script_exprs.h (+101/-26)
src/compiler/expression/update_exprs.cpp (+60/-73)
src/compiler/expression/update_exprs.h (+51/-50)
src/compiler/expression/var_expr.cpp (+56/-1)
src/compiler/expression/var_expr.h (+110/-32)
src/compiler/parser/xquery_parser.cpp (+7930/-7283)
src/compiler/parser/xquery_parser.hpp (+28/-24)
src/compiler/parser/xquery_parser.y (+253/-51)
src/compiler/parser/xquery_scanner.cpp (+3211/-3127)
src/compiler/parser/xquery_scanner.l (+35/-12)
src/compiler/parsetree/parsenode_print_dot_visitor.h (+6/-0)
src/compiler/parsetree/parsenode_print_xml_visitor.cpp (+84/-27)
src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+10/-3)
src/compiler/parsetree/parsenode_print_xquery_visitor.cpp (+31/-13)
src/compiler/parsetree/parsenode_visitor.h (+8/-0)
src/compiler/parsetree/parsenodes.cpp (+114/-0)
src/compiler/parsetree/parsenodes.h (+118/-4)
src/compiler/rewriter/framework/rewriter_context.h (+59/-31)
src/compiler/rewriter/rewriters/default_optimizer.cpp (+10/-0)
src/compiler/rewriter/rules/flwor_rules.cpp (+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 (+53/-42)
src/compiler/rewriter/tools/dataflow_annotations.cpp (+557/-8)
src/compiler/rewriter/tools/dataflow_annotations.h (+37/-1)
src/compiler/rewriter/tools/expr_tools.cpp (+536/-6)
src/compiler/rewriter/tools/udf_graph.cpp (+6/-4)
src/compiler/translator/translator.cpp (+711/-318)
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 (+86/-45)
src/context/root_static_context.h (+5/-3)
src/context/root_static_context_init.cpp.in (+9/-2)
src/context/static_context.cpp (+476/-393)
src/context/static_context.h (+114/-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 (+278/-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 (+117/-6)
src/diagnostics/pregenerated/dict_en.cpp (+89/-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 (+76/-0)
src/functions/func_node_sort_distinct.cpp (+48/-13)
src/functions/func_node_sort_distinct.h (+8/-6)
src/functions/func_numerics_impl.cpp (+152/-152)
src/functions/func_reflection.cpp (+7/-4)
src/functions/func_sequences_impl.cpp (+282/-210)
src/functions/func_sequences_impl.h (+97/-56)
src/functions/func_serialize_impl.cpp (+38/-0)
src/functions/func_strings_impl.cpp (+21/-2)
src/functions/func_var_decl.cpp (+6/-64)
src/functions/function.cpp (+60/-23)
src/functions/function.h (+15/-13)
src/functions/function_consts.h (+5/-6)
src/functions/library.cpp (+12/-0)
src/functions/pregenerated/func_accessors.cpp (+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 (+679/-0)
src/functions/pregenerated/func_jsoniq_functions.h (+503/-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 (+120/-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 (+206/-220)
src/runtime/booleans/BooleanImpl.h (+1/-1)
src/runtime/collections/collections_base.cpp (+25/-18)
src/runtime/collections/collections_base.h (+45/-56)
src/runtime/collections/collections_impl.cpp (+529/-681)
src/runtime/collections/collections_impl.h (+12/-3)
src/runtime/collections/pregenerated/collections.h (+137/-84)
src/runtime/core/arithmetic_impl.cpp (+50/-52)
src/runtime/core/arithmetic_impl.h (+18/-15)
src/runtime/core/constructors.cpp (+90/-88)
src/runtime/core/constructors.h (+27/-44)
src/runtime/core/flwor_iterator.cpp (+27/-30)
src/runtime/core/flwor_iterator.h (+1/-0)
src/runtime/core/fncall_iterator.cpp (+171/-25)
src/runtime/core/fncall_iterator.h (+39/-6)
src/runtime/core/gflwor/common.cpp (+45/-27)
src/runtime/core/gflwor/common.h (+4/-2)
src/runtime/core/gflwor/groupby_iterator.cpp (+9/-14)
src/runtime/core/gflwor/window_iterator.cpp (+3/-5)
src/runtime/core/path_iterators.cpp (+39/-33)
src/runtime/core/path_iterators.h (+3/-3)
src/runtime/core/sequencetypes.cpp (+214/-166)
src/runtime/core/trycatch.cpp (+1/-1)
src/runtime/core/var_iterators.cpp (+67/-90)
src/runtime/core/var_iterators.h (+13/-13)
src/runtime/eval/eval.cpp (+71/-35)
src/runtime/eval/eval.h (+18/-9)
src/runtime/fetch/fetch_impl.cpp (+11/-9)
src/runtime/full_text/apply.cpp (+19/-12)
src/runtime/full_text/ft_stop_words_set.cpp (+4/-4)
src/runtime/full_text/icu_tokenizer.cpp (+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 (+1025/-0)
src/runtime/json/pregenerated/json.cpp (+94/-0)
src/runtime/json/pregenerated/json.h (+114/-0)
src/runtime/json/pregenerated/jsoniq_functions.cpp (+654/-0)
src/runtime/json/pregenerated/jsoniq_functions.h (+892/-0)
src/runtime/misc/materialize.cpp (+1/-1)
src/runtime/nodes/node_position_impl.cpp (+756/-0)
src/runtime/nodes/pregenerated/node_position.cpp (+710/-0)
src/runtime/nodes/pregenerated/node_position.h (+858/-0)
src/runtime/numerics/NumericsImpl.cpp (+99/-113)
src/runtime/numerics/NumericsImpl.h (+2/-2)
src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp (+13/-6)
src/runtime/parsing_and_serializing/pregenerated/parsing_and_serializing.h (+2/-0)
src/runtime/qnames/qnames_impl.cpp (+41/-48)
src/runtime/scripting/scripting.cpp (+7/-8)
src/runtime/sequences/sequences_impl.cpp (+12/-12)
src/runtime/spec/accessors/accessors.xml (+48/-14)
src/runtime/spec/booleans/booleans.xml (+28/-15)
src/runtime/spec/codegen-cpp.xq (+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 (+614/-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 (+288/-1)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+710/-0)
src/runtime/visitors/pregenerated/printer_visitor.h (+189/-0)
src/runtime/visitors/printer_visitor_impl.cpp (+242/-173)
src/runtime/visitors/printer_visitor_impl.h (+61/-51)
src/runtime/xqdoc/xqdoc_impl.cpp (+4/-4)
src/store/api/annotation.h (+17/-15)
src/store/api/collection.h (+7/-4)
src/store/api/index.h (+60/-22)
src/store/api/item.h (+204/-39)
src/store/api/item_factory.h (+25/-145)
src/store/api/pul.h (+66/-8)
src/store/api/shared_types.h (+3/-0)
src/store/api/store.h (+45/-15)
src/store/api/temp_seq.h (+47/-47)
src/store/api/update_consts.h (+24/-1)
src/store/api/xs_type_codes.h (+96/-0)
src/store/naive/CMakeLists.txt (+8/-0)
src/store/naive/atomic_items.cpp (+915/-247)
src/store/naive/atomic_items.h (+267/-89)
src/store/naive/collection_set.cpp (+41/-25)
src/store/naive/collection_set.h (+86/-85)
src/store/naive/item.cpp (+309/-37)
src/store/naive/json_items.cpp (+704/-0)
src/store/naive/json_items.h (+479/-0)
src/store/naive/json_loader.cpp (+312/-0)
src/store/naive/json_loader.h (+72/-0)
src/store/naive/loader_dtd.cpp (+92/-56)
src/store/naive/loader_fast.cpp (+31/-36)
src/store/naive/name_iterator.h (+68/-62)
src/store/naive/node_factory.cpp (+2/-2)
src/store/naive/node_factory.h (+3/-3)
src/store/naive/node_items.cpp (+641/-274)
src/store/naive/node_items.h (+179/-77)
src/store/naive/node_iterators.cpp (+35/-9)
src/store/naive/node_iterators.h (+63/-9)
src/store/naive/node_updates.cpp (+10/-10)
src/store/naive/nsbindings.cpp (+3/-3)
src/store/naive/nsbindings.h (+3/-2)
src/store/naive/ordpath.cpp (+94/-0)
src/store/naive/ordpath.h (+11/-4)
src/store/naive/pul_primitive_factory.cpp (+245/-169)
src/store/naive/pul_primitive_factory.h (+74/-8)
src/store/naive/pul_primitives.cpp (+390/-94)
src/store/naive/pul_primitives.h (+202/-28)
src/store/naive/qname_pool.cpp (+2/-2)
src/store/naive/qname_pool.h (+1/-1)
src/store/naive/shared_types.h (+25/-0)
src/store/naive/simple_collection.cpp (+408/-186)
src/store/naive/simple_collection.h (+32/-41)
src/store/naive/simple_index.cpp (+312/-302)
src/store/naive/simple_index.h (+163/-204)
src/store/naive/simple_index_general.cpp (+1560/-2172)
src/store/naive/simple_index_general.h (+313/-174)
src/store/naive/simple_index_value.cpp (+187/-51)
src/store/naive/simple_index_value.h (+84/-39)
src/store/naive/simple_item_factory.cpp (+174/-4)
src/store/naive/simple_item_factory.h (+45/-0)
src/store/naive/simple_lazy_temp_seq.cpp (+158/-96)
src/store/naive/simple_lazy_temp_seq.h (+29/-144)
src/store/naive/simple_pul.cpp (+379/-85)
src/store/naive/simple_pul.h (+88/-9)
src/store/naive/simple_store.cpp (+288/-203)
src/store/naive/simple_store.h (+100/-52)
src/store/naive/simple_temp_seq.cpp (+166/-219)
src/store/naive/simple_temp_seq.h (+42/-43)
src/store/naive/store_defs.h (+0/-78)
src/store/naive/store_properties.h (+36/-17)
src/system/globalenv.cpp (+73/-25)
src/system/globalenv.h (+41/-22)
src/system/zorba_properties.h (+50/-12)
src/system/zorba_properties.txt (+4/-2)
src/types/casting.cpp (+595/-315)
src/types/casting.h (+39/-17)
src/types/root_typemanager.cpp (+252/-157)
src/types/root_typemanager.h (+78/-39)
src/types/schema/EventSchemaValidator.cpp (+3/-1)
src/types/schema/revalidateUtils.cpp (+6/-5)
src/types/schema/schema.cpp (+7/-7)
src/types/schema/schema.h (+2/-2)
src/types/schema/validate.cpp (+5/-2)
src/types/typeconstants.h (+1/-51)
src/types/typeimpl.cpp (+417/-60)
src/types/typeimpl.h (+258/-180)
src/types/typemanager.h (+30/-19)
src/types/typemanagerimpl.cpp (+143/-101)
src/types/typemanagerimpl.h (+32/-24)
src/types/typeops.cpp (+693/-513)
src/types/typeops.h (+21/-44)
src/unit_tests/CMakeLists.txt (+14/-0)
src/unit_tests/json_parser.cpp (+636/-0)
src/unit_tests/json_parser.cpp.moved (+623/-0)
src/unit_tests/stemmer.cpp (+8/-1)
src/unit_tests/string.cpp (+10/-1)
src/unit_tests/string_instantiate.cpp (+8/-1)
src/unit_tests/test_debugger_protocol.cpp (+0/-414)
src/unit_tests/thesaurus.cpp (+17/-14)
src/unit_tests/tokenizer.cpp (+8/-1)
src/unit_tests/unique_ptr.cpp (+7/-1)
src/unit_tests/unit_test_list.h (+9/-3)
src/unit_tests/unit_tests.cpp (+10/-1)
src/util/CMakeLists.txt (+1/-0)
src/util/ascii_util.h (+1/-6)
src/util/http_util.cpp (+2/-2)
src/util/json_parser.cpp (+634/-0)
src/util/json_parser.h (+553/-0)
src/util/regex.h (+2/-2)
src/util/regex_ascii.h (+0/-2)
src/util/stl_util.h (+2/-0)
src/util/string_util.h (+6/-2)
src/util/unicode_util.h (+4/-9)
src/util/uri_util.cpp (+2/-2)
src/util/utf8_util.cpp (+17/-0)
src/util/utf8_util.h (+0/-5)
src/util/utf8_util_base.h (+27/-12)
src/util/xml_util.h (+0/-1)
src/zorbamisc/ns_consts.h (+10/-5)
src/zorbaserialization/archiver.cpp (+4/-1)
src/zorbaserialization/archiver.h (+1/-1)
src/zorbaserialization/zorba_class_serializer.cpp (+1/-0)
src/zorbaserialization/zorba_class_serializer.h (+3/-5)
src/zorbatypes/URI.cpp (+0/-3)
src/zorbatypes/rchandle.h (+2/-2)
src/zorbatypes/rclist.h (+37/-0)
src/zorbautils/hashmap_itemh.h (+112/-0)
swig/CMakeLists.txt (+2/-7)
swig/ItemFactory.h (+69/-0)
swig/ItemFactory.i (+192/-0)
swig/StaticContext.h (+69/-0)
swig/StaticContext.i (+43/-107)
swig/XQuery.i (+14/-0)
swig/Zorba.i (+28/-1)
swig/java/CMakeLists.txt (+2/-0)
swig/php/CMakeLists.txt (+17/-27)
swig/php/XQueryProcessor.php (+397/-0)
swig/php/generate_proxy.php.in (+0/-209)
swig/php/test.xq (+1/-0)
swig/php/zorba_api.i (+7/-1)
swig/php/zorba_api_wrapper.php (+1215/-0)
swig/python/CMakeLists.txt (+2/-0)
swig/ruby/CMakeLists.txt (+10/-0)
swig/zorba_api.i (+4/-1)
test/apitest.cpp (+21/-6)
test/parser/parsertestdriver.cpp (+2/-0)
test/rbkt/ExpCompilerResults/IterPlan/iterscript.cmake (+14/-10)
test/rbkt/ExpCompilerResults/IterPlan/zorba/error/trace1.iter (+8/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx4.iter (+24/-22)
test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter (+1/-1)
test/rbkt/ExpCompilerResults/IterPlan/zorba/misc/hoist4.iter (+7/-7)
test/rbkt/ExpCompilerResults/IterPlan/zorba/misc/inline_var1.iter (+2/-2)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-c.iter (+375/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-nc.iter (+375/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide2-c.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide2-nc.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dblp-q0.iter (+182/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9065.iter (+62/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9198.iter (+75/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9199.iter (+75/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9212.iter (+83/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9389.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9390.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9392.iter (+71/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-gary1.iter (+227/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx1.iter (+105/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx4.iter (+170/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-q8.iter (+102/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/path17.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q1.iter (+49/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q10.iter (+246/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q11.iter (+103/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q12.iter (+115/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q13.iter (+45/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q14.iter (+39/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q15.iter (+50/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q16.iter (+65/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q17.iter (+47/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q18.iter (+38/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q19.iter (+56/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q2.iter (+43/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q20.iter (+192/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q3.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q4.iter (+126/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q5.iter (+41/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q6.iter (+29/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q7.iter (+39/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q8.iter (+107/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q9.iter (+169/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/udfs1.iter (+58/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/paths/pred_order.iter (+2/-2)
test/rbkt/ExpCompilerResults/IterPlan/zorba/string/SubstringFunc/SubstringFunc2.iter (+10/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/string/SubstringFunc/SubstringFunc3.iter (+14/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf-fib-rec.iter (+42/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf1.iter (+5/-5)
test/rbkt/ExpQueryResults/zorba/debugger/dmh/break_response.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/debugger/dmh/break_response_no_info.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/error/trace1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/eval/eval9.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/eval/invoke1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fetch/fetch_random_file.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-same-sentence-false-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/groupby/posvar.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/index/auctions1.xml.res (+3/-3)
test/rbkt/ExpQueryResults/zorba/index/numbers.xml.res (+21/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-02.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-03.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-04.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-array-05.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-object-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-object-02.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-parse-snelson.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/json/json-serialize-array-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_01.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_02.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_15.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_16.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_17.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_18.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_21.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_210.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_211.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_212.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_213.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_22.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_23.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_24.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_25.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_26.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_27.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_28.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_29.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_3_7.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_4_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_4_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_4_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_5_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_5_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_6_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_6_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_7_6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/coll_dyn_01.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/coll_dyn_03.xml.res (+14/-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/empty_member01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/empty_member02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/empty_member03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/empty_member04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/empty_member05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/empty_member06.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/use_case01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case01_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case06.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case07.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case08.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/use_case11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/value_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/values_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/misc/baseuri.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide-c.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide-nc.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide2-c.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide2-nc.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dblp-q0.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9198.xml.res (+19/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9199.xml.res (+19/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9212.xml.res (+49/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9389.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9390.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9392.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-gary1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-idx1.xml.res (+254/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-idx4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-q8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/parser_test.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/path17.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q13.xml.res (+18/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q17.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q18.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q19.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q20.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q7.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q9.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/udfs1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_1_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_2.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_2_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_3.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_3_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_4.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_4_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_err.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/schemas/validate_xqdoc_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/validate_xqdoc_02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/udf/udf-fib-rec-BIG_INTEGER.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/udf/udf-fib-rec.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding06.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding13.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling08.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling24.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling26.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling27.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling28.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling29.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling30.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling32.xml.res (+12/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling33.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling34.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling35.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling36.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling38.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling39.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling40.xml.res (+24/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling41.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling45.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling46.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling47.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling48.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/windowing12.xml.res (+1/-0)
test/rbkt/Queries/CMakeLists.txt (+280/-18)
test/rbkt/Queries/w3c_known_failures.txt (+49/-90)
test/rbkt/Queries/w3c_known_failures_XQueryX.txt (+88/-0)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq (+10/-6)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq (+9/-6)
test/rbkt/Queries/zorba/debugger/dmh/break_response.xq (+5/-0)
test/rbkt/Queries/zorba/debugger/dmh/break_response_no_info.xq (+7/-0)
test/rbkt/Queries/zorba/error/trace1.xq (+6/-0)
test/rbkt/Queries/zorba/eval/eval9.xq (+6/-0)
test/rbkt/Queries/zorba/eval/invoke1.xq (+5/-0)
test/rbkt/Queries/zorba/eval/invoke1_1.xqlib (+10/-0)
test/rbkt/Queries/zorba/eval/invoke1_2.xqlib (+3/-0)
test/rbkt/Queries/zorba/fetch/fetch_random_file.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-false-2.xq (+2/-0)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-2.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-3.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-4.xq (+1/-1)
test/rbkt/Queries/zorba/groupby/posvar.xq (+17/-0)
test/rbkt/Queries/zorba/index/auctions1.xml (+1/-0)
test/rbkt/Queries/zorba/index/auctions1.xq (+1/-1)
test/rbkt/Queries/zorba/index/numbers.xml (+10/-0)
test/rbkt/Queries/zorba/index/numbers.xq (+75/-0)
test/rbkt/Queries/zorba/index/numbers.xqlib (+28/-0)
test/rbkt/Queries/zorba/json/json-parse-array-01.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-02.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-03.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-04.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-array-05.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-object-01.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-object-02.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-parse-snelson.xq (+20/-0)
test/rbkt/Queries/zorba/json/json-serialize-array-01.xq (+8/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_01.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_02.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_03.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_14.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_15.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_16.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_17.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_18.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_21.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_210.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_211.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_212.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_213.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_22.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_23.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_24.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_25.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_26.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_27.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_28.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_29.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_1.xq (+11/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_2.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_3.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_4.xq (+14/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_5.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_6.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_3_7.xq (+6/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_4_1.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_4_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_4_3.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_5_1.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_5_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_6_1.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_6_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_6_3.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_1.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_2.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_3.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_4.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_5.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/arr_constr_7_6.xq (+2/-0)
test/rbkt/Queries/zorba/jsoniq/coll_dyn_01.xq (+57/-0)
test/rbkt/Queries/zorba/jsoniq/coll_dyn_02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/coll_dyn_02.xq (+16/-0)
test/rbkt/Queries/zorba/jsoniq/coll_dyn_03.xq (+94/-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/empty_member01.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/empty_member02.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/empty_member03.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/empty_member04.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/empty_member05.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/empty_member06.xq (+12/-0)
test/rbkt/Queries/zorba/jsoniq/flatten_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/fn_boolean_01.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/insert01.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/insert02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/insert02.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/insert03.xq (+8/-0)
test/rbkt/Queries/zorba/jsoniq/insert04.xq (+12/-0)
test/rbkt/Queries/zorba/jsoniq/insert05.xq (+10/-0)
test/rbkt/Queries/zorba/jsoniq/insert06.xq (+27/-0)
test/rbkt/Queries/zorba/jsoniq/insert07.spec (+2/-0)
test/rbkt/Queries/zorba/jsoniq/insert07.xq (+9/-0)
test/rbkt/Queries/zorba/jsoniq/member_01.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/names_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/names_02.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/null01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/null02.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/null03.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/obj_constr_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/object_01.xq (+4/-0)
test/rbkt/Queries/zorba/jsoniq/object_02.xq (+16/-0)
test/rbkt/Queries/zorba/jsoniq/pair_01.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/parser_01.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/parser_01.xq (+3/-0)
test/rbkt/Queries/zorba/jsoniq/rename01.xq (+7/-0)
test/rbkt/Queries/zorba/jsoniq/rename02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/rename02.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/rename03.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/rename03.xq (+5/-0)
test/rbkt/Queries/zorba/jsoniq/replace01.xq (+8/-0)
test/rbkt/Queries/zorba/jsoniq/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/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 (+62/-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 (+5/-0)
test/rbkt/Queries/zorba/misc/baseuri.xml (+1/-0)
test/rbkt/Queries/zorba/misc/baseuri.xq (+2/-0)
test/rbkt/Queries/zorba/modules/libraryModule15.xqlib (+8/-3)
test/rbkt/Queries/zorba/no-copy/auction.xml (+2182/-0)
test/rbkt/Queries/zorba/no-copy/books.xml (+25/-0)
test/rbkt/Queries/zorba/no-copy/dataguide-c.xq (+87/-0)
test/rbkt/Queries/zorba/no-copy/dataguide-nc.xq (+91/-0)
test/rbkt/Queries/zorba/no-copy/dataguide2-c.xq (+33/-0)
test/rbkt/Queries/zorba/no-copy/dataguide2-nc.xq (+38/-0)
test/rbkt/Queries/zorba/no-copy/dblp-q0.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/dblp-q0.xq (+32/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9065.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9198.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9199.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9212.xq (+15/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9389.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9390.xq (+15/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9392.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-gary1.xq (+42/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-idx1.xq (+12/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-idx4.xq (+33/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-q8.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/parser_test.xq (+3/-0)
test/rbkt/Queries/zorba/no-copy/path17.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/path17.xq (+12/-0)
test/rbkt/Queries/zorba/no-copy/q1.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q1.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/q10.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q10.xq (+36/-0)
test/rbkt/Queries/zorba/no-copy/q11.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q11.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q12.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q12.xq (+16/-0)
test/rbkt/Queries/zorba/no-copy/q13.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q13.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/q14.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q14.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/q15.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q15.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q16.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q16.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/q17.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q17.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q18.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q18.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/q19.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q19.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q2.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q2.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q20.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q20.xq (+34/-0)
test/rbkt/Queries/zorba/no-copy/q3.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q3.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q4.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q4.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q5.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q5.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q6.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q6.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q7.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q7.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/q8.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q8.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q9.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q9.xq (+20/-0)
test/rbkt/Queries/zorba/no-copy/simple_parser.xqlib (+2207/-0)
test/rbkt/Queries/zorba/no-copy/test1.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/udfs1.xq (+31/-0)
test/rbkt/Queries/zorba/no-copy/udfs2.xq (+31/-0)
test/rbkt/Queries/zorba/nodes/position.xml (+15/-0)
test/rbkt/Queries/zorba/nodes/position_1.xq (+97/-0)
test/rbkt/Queries/zorba/nodes/position_1_parsed.xq (+98/-0)
test/rbkt/Queries/zorba/nodes/position_2.xq (+157/-0)
test/rbkt/Queries/zorba/nodes/position_2_parsed.xq (+156/-0)
test/rbkt/Queries/zorba/nodes/position_3.xq (+32/-0)
test/rbkt/Queries/zorba/nodes/position_3_parsed.xq (+34/-0)
test/rbkt/Queries/zorba/nodes/position_4.xq (+84/-0)
test/rbkt/Queries/zorba/nodes/position_4_parsed.xq (+81/-0)
test/rbkt/Queries/zorba/nodes/position_err.xq (+60/-0)
test/rbkt/Queries/zorba/schemas/local-xhtml.spec (+1/-0)
test/rbkt/Queries/zorba/schemas/local-xhtml.xq (+6/-0)
test/rbkt/Queries/zorba/schemas/validate_xqdoc_01.xq (+4/-0)
test/rbkt/Queries/zorba/schemas/validate_xqdoc_02.xq (+4/-0)
test/rbkt/Queries/zorba/store/documents.xq (+1/-0)
test/rbkt/Queries/zorba/string/Regex/regex_a4.xq (+1/-0)
test/rbkt/Queries/zorba/string/token01.txt (+1/-0)
test/rbkt/Queries/zorba/string/token02.txt (+1/-0)
test/rbkt/Queries/zorba/string/token03.txt (+1/-0)
test/rbkt/Queries/zorba/string/token04.txt (+1/-0)
test/rbkt/Queries/zorba/string/tokenize01.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize02.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize03.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize04.xq (+5/-0)
test/rbkt/Queries/zorba/udf/udf-fib-rec.spec (+1/-0)
test/rbkt/Queries/zorba/udf/udf-fib-rec.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/sliding01.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding02.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding03.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding04.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding05.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding06.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/sliding07.xq (+10/-0)
test/rbkt/Queries/zorba/windowing/sliding08.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/sliding08.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding09.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding10.xq (+18/-0)
test/rbkt/Queries/zorba/windowing/sliding11.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding12.xq (+7/-0)
test/rbkt/Queries/zorba/windowing/sliding13.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding14.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/tumbling01.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling02.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling04.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling05.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling06.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling07.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling08.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling09.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling10.xq (+10/-0)
test/rbkt/Queries/zorba/windowing/tumbling11.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling11.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling14.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling14.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling15.spec (+2/-0)
test/rbkt/Queries/zorba/windowing/tumbling15.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling16.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling16.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling17.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling17.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling18.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling18.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling19.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling19.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling20.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling20.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling21.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling21.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling22.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling22.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling24.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling25.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling26.xq (+3/-0)
test/rbkt/Queries/zorba/windowing/tumbling27.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling28.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling29.xq (+17/-0)
test/rbkt/Queries/zorba/windowing/tumbling31.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling31.xq (+3/-0)
test/rbkt/Queries/zorba/windowing/tumbling32.xq (+19/-0)
test/rbkt/Queries/zorba/windowing/tumbling33.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling34.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling35.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling36.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling37.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling37.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling38.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling39.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/tumbling40.xq (+27/-0)
test/rbkt/Queries/zorba/windowing/tumbling41.xq (+9/-0)
test/rbkt/Queries/zorba/windowing/tumbling42.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling42.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling43.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling43.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling44.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling44.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling45.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling46.xq (+17/-0)
test/rbkt/Queries/zorba/windowing/tumbling47.xq (+20/-0)
test/rbkt/Queries/zorba/windowing/tumbling48.xq (+18/-0)
test/rbkt/Queries/zorba/windowing/tumbling49.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/windowing12.xq (+9/-0)
test/rbkt/Queries/zorba/windowing/windowing13.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/windowing13.xq (+4/-0)
test/rbkt/Queries/zorba/xmark/q10.xq (+8/-4)
test/rbkt/Queries/zorba/xqddf/daniel/i1.xq (+3/-1)
test/rbkt/Queries/zorba/xqddf/test-node-reference.xq (+2/-0)
test/rbkt/Scripts/w3c/Readme.txt (+17/-7)
test/rbkt/Scripts/w3c/Submit_xqts.cmake (+23/-9)
test/rbkt/Scripts/w3c/generate-submission-xqftts.xq (+4/-4)
test/rbkt/Scripts/w3c/generate-submission-xqts.xq (+4/-9)
test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh (+1/-1)
test/rbkt/Scripts/w3c/import_w3c_testsuite.sh (+1/-1)
test/rbkt/itertest.xq.in (+58/-44)
test/rbkt/modules/CMakeLists.txt (+4/-0)
test/rbkt/modules/random-file.txt (+1/-0)
test/rbkt/specification.h (+8/-2)
test/rbkt/testdriver.cpp (+5/-0)
test/rbkt/testdriver_common.cpp (+14/-3)
test/rbkt/testdriver_mt.cpp (+32/-5)
test/unit/CMakeLists.txt (+33/-10)
test/unit/context_item.cpp (+158/-0)
test/unit/context_item1.xq (+4/-0)
test/unit/context_item2.xq (+6/-0)
test/unit/cxx_api_ch1.xq (+26/-0)
test/unit/cxx_api_ch2.xq (+17/-0)
test/unit/cxx_api_ch3.xq (+20/-0)
test/unit/cxx_api_ch4.xq (+19/-0)
test/unit/cxx_api_changes.cpp (+345/-0)
test/unit/datetime.cpp (+2/-0)
test/unit/ext_main3.xq (+21/-0)
test/unit/ext_mod2.xq (+19/-0)
test/unit/external_function.cpp (+59/-1)
test/unit/guestbook.xq (+9/-0)
test/unit/guestbook_main.xq (+1/-1)
test/unit/main_invoke.xq (+9/-0)
test/unit/module2.xq (+6/-0)
test/unit/module4.xq (+6/-0)
test/unit/static_context.cpp (+75/-0)
test/unit/staticcollectionmanager.cpp (+65/-2)
test/unit/testGetExtVarA.xq (+13/-0)
test/unit/testGetExtVarB.xq (+6/-0)
test/update/CMakeLists.txt (+1/-1)
test/update/Queries/zorba/store/sc3.spec (+0/-2)
test/update/Scripts/Readme.txt (+8/-5)
test/update/Scripts/XQUTS.xml (+1/-1)
test/update/Scripts/generate-submission-xquts.xq (+11/-4)
test/update/Scripts/import_w3c_update_testsuite.sh (+1/-1)
test/update/Scripts/zorba-xquts-submission.xml (+858/-0)
test/update/Scripts/zorba-xqutsx-submission.xml (+858/-0)
test/zperf/src/start.xq (+154/-100)
To merge this branch: bzr merge lp:~zorba-coders/zorba/jsoniq
Reviewer Review Type Date Requested Status
Zorba Coders Pending
Review via email: mp+91530@code.launchpad.net

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

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

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 :

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

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

lp:~zorba-coders/zorba/jsoniq updated
10628. By Matthias Brantner

better error for member accessor with wrong arg type

10629. By Chris Hillery

Add serialization of nested XML. Escape all strings appropriately.

10630. By Markos Zaharioudakis

fixed bug in implicit invocation of json item accessor functions

10631. By Chris Hillery

Added Item API methods for JSONiq.

10632. By Matthias Brantner

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

10633. By Matthias Brantner

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

10634. By Matthias Brantner

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

10635. By Matthias Brantner

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

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

10636. By Matthias Brantner

fixed fn:boolean for json pairs and json:null

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

10637. By Matthias Brantner

merge

10638. By Matthias Brantner

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

10639. By Matthias Brantner

changed semantics of the member selector to automatically do iteration

10640. By Matthias Brantner

implicit iteration for member selectors

10641. By Matthias Brantner

allow true, false, and null everywhere

10642. By Matthias Brantner

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

10643. By Chris Hillery

Fix serialization of control sequences.

10644. By Chris Hillery

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

10645. By Chris Hillery

Adding documentation for all functions.

10646. By Chris Hillery

Merge from trunk.

10647. By Chris Hillery

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

10648. By Markos Zaharioudakis

predeclared jn prefix

10649. By Markos Zaharioudakis

predeclared jn prefix (2nd try)

10650. By Matthias Brantner

commit the pre-generated parser files

10651. By Matthias Brantner

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

10652. By Matthias Brantner

build fixes for without json

10653. By Matthias Brantner

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

10654. By Matthias Brantner

merge with trunk

10655. By Matthias Brantner

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

10656. By Matthias Brantner

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

10657. By Chris Hillery

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

10658. By Chris Hillery

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

10659. By Chris Hillery

Use Store::populateJSONArray() in ItemFactory.

10660. By Matthias Brantner

updated namespace prefix in the jsoniq module to jn

10661. By Matthias Brantner

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

10662. By Matthias Brantner

updated jsoniq tutorials to latest drafts

10663. By Nicolae Brinza

Implementation of the new Cloudscript grammar.

10664. By Markos Zaharioudakis

removed pairs from type system and compiler

10665. By Markos Zaharioudakis

merge from trunk

10666. By Markos Zaharioudakis

forbid json items in xml constructors

10667. By Markos Zaharioudakis

translation of json constructor exprs

10668. By Markos Zaharioudakis

re-implemented json constructors

10669. By Markos Zaharioudakis

fixed EBV for jsoniq

10670. By Markos Zaharioudakis

work on jsoniq functions

10671. By Markos Zaharioudakis

fixed error codes and tests

10672. By Markos Zaharioudakis

implemented values( as object()) function

10673. By Markos Zaharioudakis

implemented accumulating object constructor

10674. By Markos Zaharioudakis

implemented the project function

10675. By Markos Zaharioudakis

implemented object insertions

10676. By Markos Zaharioudakis

more work on jsoniq updates

10677. By Markos Zaharioudakis

more work on jsoniq updates

10678. By Chris Hillery

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

10679. By Chris Hillery

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

10680. By Markos Zaharioudakis

done with object updates

10681. By Markos Zaharioudakis

fixed tests failing due to serialization changes

10682. By Markos Zaharioudakis

more work on array updates

10683. By Markos Zaharioudakis

done with array updates

10684. By Markos Zaharioudakis

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

10685. By Markos Zaharioudakis

removed array(ItemType) type

10686. By Markos Zaharioudakis

introduced JNTY0002 error

10687. By Markos Zaharioudakis

merge from trunk + work on static and dynamic collection modules

10688. By Markos Zaharioudakis

merged with trunk

10689. By Markos Zaharioudakis

fixed no-copy rule omission

10690. By Chris Hillery

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

10691. By Chris Hillery

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

10692. By Ghislain Fourny

Merged jsoniq-plan_serialization branch.

10693. By Ghislain Fourny

Merged trunk back.

10694. By Ghislain Fourny

Fixed flwor expression clause getter.

10695. By Ghislain Fourny

Now compiles and links.

10696. By Ghislain Fourny

Merged trunk back (10838).

10697. By Ghislain Fourny

Fixed some tests.

10698. By Chris Hillery

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

10699. By Ghislain Fourny

Copied pregenerated scanner and parser files.

10700. By Ghislain Fourny

Merged changes from child branch.

10701. By Ghislain Fourny

Merged trunk back.

10702. By Ghislain Fourny

Added curly braces in JSON insert expressions.

10703. By Ghislain Fourny

Extended update syntax to general FilterExprs.

10704. By Ghislain Fourny

Solved memory leak.

10705. By Ghislain Fourny

Adding tests.

10706. By Ghislain Fourny

Collection functions now work with general items.

10707. By Ghislain Fourny

Began removing pairs in the implementation. Still build errors.

10708. By Ghislain Fourny

Now compiles, but does not link yet.

10709. By Ghislain Fourny

Now links.

10710. By Ghislain Fourny

All JSONiq tests now pass.

10711. By Ghislain Fourny

Renamed cloudscript-extensions to jsoniq-extensions

10712. By Ghislain Fourny

Renamed cloudscript to jsoniq.

10713. By Ghislain Fourny

Renamed cloudscript to jsoniq.

10714. By Ghislain Fourny

Renamed cloudscript to jsoniq.

10715. By Ghislain Fourny

Now outputs INF upon positive infinity.

10716. By Ghislain Fourny

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

10717. By Ghislain Fourny

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

10718. By Ghislain Fourny

Indices should now work.

10719. By Ghislain Fourny

Index creation and probe should now work.

10720. By Ghislain Fourny

Reverted rename.

10721. By Ghislain Fourny

Reverted renaming.

10722. By Ghislain Fourny

Merged trunk back.

10723. By Ghislain Fourny

Merged jsoniq-deactivated back.

10724. By Ghislain Fourny

Fixed index maintenance.

10725. By Ghislain Fourny

Fixed tests.

10726. By Ghislain Fourny

Merged trunk back.

10727. By Ghislain Fourny

Synced error codes.

10728. By Ghislain Fourny

Added guards.

10729. By Ghislain Fourny

Deactivating JSON for merge proposal and one more fix.

10730. By Ghislain Fourny

Synced error codes.

10731. By Ghislain Fourny

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

10732. By Ghislain Fourny

Removed useless and obsolete code that still contained JSON Pairs.

10733. By Ghislain Fourny

Fixed comment.

10734. By Ghislain Fourny

Added files.

10735. By Markos Zaharioudakis

small cosmetic changes

10736. By Ghislain Fourny

Implemented Markos' comments 1 through 5.

10737. By Ghislain Fourny

Implemented Markos' comments 7, 8 and 9.

10738. By Ghislain Fourny

Changed signature of getArraySize() to xs_integer.

10739. By Ghislain Fourny

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

10740. By Ghislain Fourny

Adding tests.

10741. By Ghislain Fourny

Updated pregenerated parser files.

10742. By Ghislain Fourny

Generating preprocessor guards for STRUCTURED_ITEM.

10743. By Ghislain Fourny

Fixed emit_end().

10744. By Ghislain Fourny

Updated updating error code and adding wrappers.

10745. By Ghislain Fourny

Now back to original order when outputting keys.

10746. By Ghislain Fourny

Optimized JSON root management system.

10747. By Ghislain Fourny

Optimized JSON item value memory management.

10748. By Ghislain Fourny

Using items instead of zstrings as keys in JSON objects.

10749. By Ghislain Fourny

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

10750. By Ghislain Fourny

Merged trunk back.

10751. By Markos Zaharioudakis

compilation fixes

10752. By Markos Zaharioudakis

compilation fixes

10753. By Markos Zaharioudakis

added all variants of getStringValue() for JSONNull + cosmetic

10754. By Markos Zaharioudakis

merge from trunk

10755. By Ghislain Fourny

Implemented Markos' comments, except 10.

10756. By Ghislain Fourny

Merged trunk back.

10757. By Ghislain Fourny

Fixed tests.

10758. By Ghislain Fourny

Merged trunk back.

10759. By Ghislain Fourny

Implemented more efficient data structure on objects.

10760. By Ghislain Fourny

Changed parameter of getObjectValue() to an item.

10761. By Ghislain Fourny

Removed free list.

10762. By Ghislain Fourny

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

10763. By Ghislain Fourny

Fixed compilation error on Windows.

10764. By Ghislain Fourny

Improved efficiency of removing an object pair.

10765. By Markos Zaharioudakis

a better implementation for SimpleJSONObject::remove()

10766. By Markos Zaharioudakis

small optimizations + cosmetic

10767. By Markos Zaharioudakis

commented out ZORBA_TEST_PLAN_SERIALIZATION flag in testdriver.cpp

10768. By Markos Zaharioudakis

fixed compiler warnings

10769. By Markos Zaharioudakis

fixed print out of jsoniq errors

10770. By Markos Zaharioudakis

added missing <value> to a couple of jsoniq errors

10771. By Ghislain Fourny

Deactivated invariant assertions for the moment.

10772. By Ghislain Fourny

Merged trunk back.

10773. By Ghislain Fourny

Regenerated files.

10774. By Ghislain Fourny

A small fix (already in trunk).

Unmerged revisions

10774. By Ghislain Fourny

A small fix (already in trunk).

10773. By Ghislain Fourny

Regenerated files.

10772. By Ghislain Fourny

Merged trunk back.

10771. By Ghislain Fourny

Deactivated invariant assertions for the moment.

10770. By Markos Zaharioudakis

added missing <value> to a couple of jsoniq errors

10769. By Markos Zaharioudakis

fixed print out of jsoniq errors

10768. By Markos Zaharioudakis

fixed compiler warnings

10767. By Markos Zaharioudakis

commented out ZORBA_TEST_PLAN_SERIALIZATION flag in testdriver.cpp

10766. By Markos Zaharioudakis

small optimizations + cosmetic

10765. By Markos Zaharioudakis

a better implementation for SimpleJSONObject::remove()

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: