From 3abe9331b564f65690bdf2ebe001271a7011b0e2 Mon Sep 17 00:00:00 2001 From: erititan Date: Fri, 13 Nov 2015 11:58:22 +0100 Subject: [PATCH] Sync with 5.4.0 --- .gitignore | 5 +- JNI/Makefile | 2 +- JNI/jnimw.cc | 2 +- JNI/jnimw.h | 2 +- JNI/jninativelib.cc | 2 +- ...eclipse_titan_executor_jni_JNIMiddleWare.h | 2 +- Makefile | 2 +- Makefile.cfg | 85 +- Makefile.genrules | 6 +- README.linux | 29 +- common/CharCoding.hh | 2 +- common/JSON_Tokenizer.cc | 55 + common/JSON_Tokenizer.hh | 16 + common/Makefile | 2 +- common/ModuleVersion.cc | 2 +- common/ModuleVersion.hh | 2 +- common/NetworkHandler.cc | 2 +- common/NetworkHandler.hh | 2 +- common/Path2.cc | 2 +- common/Path2.hh | 2 +- common/Quadruple.cc | 2 +- common/Quadruple.hh | 2 +- common/cfg_process_utils.hh | 2 +- common/config_preproc.cc | 2 +- common/config_preproc.h | 2 +- common/config_preproc_la.l | 15 +- common/config_preproc_p.y | 2 +- common/dbgnew.hh | 2 +- common/hostid.c | 2 +- common/license.c | 2 +- common/license.h | 2 +- common/memory.c | 6 +- common/memory.h | 2 +- common/new.cc | 2 +- common/path.c | 2 +- common/path.h | 2 +- common/pattern.hh | 10 +- common/pattern_la.l | 2 +- common/pattern_p.y | 17 +- common/pattern_uni.y | 2 +- common/platform.h | 2 +- common/static_check.h | 2 +- common/ttcn3float.hh | 9 +- common/usage_stats.cc | 2 +- common/usage_stats.hh | 2 +- common/userinfo.c | 2 +- common/userinfo.h | 2 +- common/version.h | 6 +- common/version.py | 2 +- common/version_internal.h | 4 +- compiler2/AST.cc | 25 +- compiler2/AST.hh | 2 +- compiler2/Code.cc | 6 +- compiler2/Code.hh | 2 +- compiler2/CodeGenHelper.cc | 3 +- compiler2/CodeGenHelper.hh | 2 +- compiler2/CompField.cc | 2 +- compiler2/CompField.hh | 2 +- compiler2/CompType.cc | 2 +- compiler2/CompType.hh | 2 +- compiler2/CompilerError.cc | 2 +- compiler2/CompilerError.hh | 2 +- compiler2/Constraint.cc | 2 +- compiler2/Constraint.hh | 2 +- compiler2/EnumItem.cc | 17 +- compiler2/EnumItem.hh | 4 +- compiler2/Identifier.cc | 2 +- compiler2/Identifier.hh | 2 +- compiler2/Int.cc | 2 +- compiler2/Int.hh | 2 +- compiler2/Makefile | 2 +- compiler2/PredefFunc.cc | 2 +- compiler2/PredefFunc.hh | 2 +- compiler2/ProjectGenHelper.cc | 14 +- compiler2/ProjectGenHelper.hh | 4 +- compiler2/Real.cc | 2 +- compiler2/Real.hh | 2 +- compiler2/Setting.cc | 2 +- compiler2/Setting.hh | 2 +- compiler2/SigParam.cc | 2 +- compiler2/SigParam.hh | 2 +- compiler2/Stopwatch.cc | 2 +- compiler2/Stopwatch.hh | 2 +- compiler2/Type.cc | 122 +- compiler2/Type.hh | 4 +- compiler2/TypeCompat.cc | 2 +- compiler2/TypeCompat.hh | 2 +- compiler2/Type_chk.cc | 19 +- compiler2/Type_codegen.cc | 227 +- compiler2/Typestuff.cc | 2 +- compiler2/Typestuff.hh | 2 +- compiler2/Value.cc | 230 +- compiler2/Value.hh | 16 +- compiler2/Valuestuff.cc | 2 +- compiler2/Valuestuff.hh | 2 +- compiler2/XerAttributes.cc | 2 +- compiler2/XerAttributes.hh | 2 +- compiler2/asn1/AST_asn1.cc | 2 +- compiler2/asn1/AST_asn1.hh | 2 +- compiler2/asn1/Block.cc | 2 +- compiler2/asn1/Block.hh | 2 +- compiler2/asn1/Makefile | 2 +- compiler2/asn1/OCSV.cc | 2 +- compiler2/asn1/OCSV.hh | 2 +- compiler2/asn1/Object.cc | 2 +- compiler2/asn1/Object.hh | 2 +- compiler2/asn1/Object0.hh | 2 +- compiler2/asn1/Ref.cc | 2 +- compiler2/asn1/Ref.hh | 2 +- compiler2/asn1/TableConstraint.cc | 2 +- compiler2/asn1/TableConstraint.hh | 2 +- compiler2/asn1/Tag.cc | 2 +- compiler2/asn1/Tag.hh | 2 +- compiler2/asn1/TokenBuf.cc | 2 +- compiler2/asn1/TokenBuf.hh | 2 +- compiler2/asn1/Type_parse.cc | 2 +- compiler2/asn1/asn1.hh | 2 +- compiler2/asn1/asn1_preparser.h | 2 +- compiler2/asn1/asn1_preparser.l | 2 +- compiler2/asn1/asn1la.l | 4 +- compiler2/asn1/asn1p.y | 2 +- compiler2/asn1/asn1p_old.h | 2 +- compiler2/compiler.1 | 20 +- compiler2/datatypes.h | 15 +- compiler2/encdec.c | 2 +- compiler2/encdec.h | 2 +- compiler2/enum.c | 181 +- compiler2/enum.h | 2 +- compiler2/error.h | 2 +- compiler2/functionref.c | 70 +- compiler2/functionref.h | 2 +- compiler2/main.cc | 23 +- compiler2/main.hh | 5 +- compiler2/makefile.c | 148 +- compiler2/map.hh | 2 +- compiler2/record.c | 558 +++- compiler2/record.h | 2 +- compiler2/record_of.c | 317 +- compiler2/record_of.h | 2 +- compiler2/stack.hh | 2 +- compiler2/string.cc | 2 +- compiler2/string.hh | 2 +- compiler2/subtype.cc | 266 +- compiler2/subtype.hh | 43 +- compiler2/subtypestuff.cc | 2 +- compiler2/subtypestuff.hh | 2 +- compiler2/tcov.xsd | 2 +- compiler2/tcov.xsl | 2 +- compiler2/tcov2lcov.cc | 2 +- compiler2/tcov2lcov.hh | 2 +- compiler2/titanver | 2 +- compiler2/ttcn3/AST_ttcn3.cc | 68 +- compiler2/ttcn3/AST_ttcn3.hh | 8 +- compiler2/ttcn3/ArrayDimensions.cc | 2 +- compiler2/ttcn3/ArrayDimensions.hh | 2 +- compiler2/ttcn3/Attributes.cc | 12 +- compiler2/ttcn3/Attributes.hh | 2 +- compiler2/ttcn3/BerAST.cc | 2 +- compiler2/ttcn3/BerAST.hh | 2 +- compiler2/ttcn3/ILT.cc | 2 +- compiler2/ttcn3/ILT.hh | 2 +- compiler2/ttcn3/JsonAST.cc | 32 +- compiler2/ttcn3/JsonAST.hh | 17 +- compiler2/ttcn3/Makefile | 2 +- compiler2/ttcn3/PatternString.cc | 52 +- compiler2/ttcn3/PatternString.hh | 5 +- compiler2/ttcn3/RawAST.cc | 10 +- compiler2/ttcn3/RawAST.hh | 3 +- compiler2/ttcn3/Statement.cc | 144 +- compiler2/ttcn3/Statement.hh | 14 +- compiler2/ttcn3/Templatestuff.cc | 20 +- compiler2/ttcn3/Templatestuff.hh | 8 +- compiler2/ttcn3/TextAST.cc | 2 +- compiler2/ttcn3/TextAST.hh | 2 +- compiler2/ttcn3/Ttcn2Json.cc | 12 + compiler2/ttcn3/Ttcn2Json.hh | 8 + compiler2/ttcn3/TtcnTemplate.cc | 806 ++++- compiler2/ttcn3/TtcnTemplate.hh | 16 +- compiler2/ttcn3/Ttcnstuff.cc | 2 +- compiler2/ttcn3/Ttcnstuff.hh | 2 +- compiler2/ttcn3/charstring_la.l | 6 +- compiler2/ttcn3/coding_attrib_la.l | 2 +- compiler2/ttcn3/coding_attrib_p.y | 2 +- compiler2/ttcn3/compiler.c | 2 +- compiler2/ttcn3/compiler.h | 3 +- compiler2/ttcn3/compiler.l | 7 +- compiler2/ttcn3/compiler.y | 47 +- compiler2/ttcn3/comptype_attrib_la.l | 2 +- compiler2/ttcn3/port.c | 58 +- compiler2/ttcn3/port.h | 2 +- compiler2/ttcn3/pstring_la.l | 38 +- compiler2/ttcn3/rawAST.l | 19 +- compiler2/ttcn3/rawAST.y | 37 +- compiler2/ttcn3/rawASTspec.h | 2 +- compiler2/ttcn3/signature.c | 69 +- compiler2/ttcn3/signature.h | 2 +- compiler2/ttcn3/ttcn3_preparser.h | 2 +- compiler2/ttcn3/ttcn3_preparser.l | 2 +- compiler2/ttcn3_makefilegen.1 | 30 +- compiler2/union.c | 270 +- compiler2/union.h | 2 +- compiler2/ustring.cc | 57 +- compiler2/ustring.hh | 5 +- compiler2/vector.hh | 2 +- compiler2/xpather.cc | 96 +- compiler2/xpather.h | 11 +- core/.gitignore | 2 + core/ASN_Any.cc | 2 +- core/ASN_Any.hh | 2 +- core/ASN_CharacterString.cc | 896 ++++-- core/ASN_CharacterString.hh | 66 +- core/ASN_EmbeddedPDV.cc | 896 ++++-- core/ASN_EmbeddedPDV.hh | 66 +- core/ASN_External.cc | 833 +++-- core/ASN_External.hh | 68 +- core/ASN_Null.cc | 109 +- core/ASN_Null.hh | 22 +- core/Addfunc.cc | 2 +- core/Addfunc.hh | 2 +- core/Array.cc | 2 +- core/Array.hh | 235 +- core/BER.cc | 2 +- core/BER.hh | 2 +- core/Basetype.cc | 24 +- core/Basetype.hh | 17 +- core/Bitstring.cc | 183 +- core/Bitstring.hh | 19 +- core/Boolean.cc | 113 +- core/Boolean.hh | 20 +- core/Charstring.cc | 187 +- core/Charstring.hh | 25 +- core/Communication.cc | 2 +- core/Communication.hh | 2 +- core/Component.cc | 128 +- core/Component.hh | 20 +- core/Default.cc | 112 +- core/Default.hh | 22 +- core/Encdec.cc | 7 +- core/Encdec.hh | 2 +- core/Error.cc | 13 +- core/Error.hh | 2 +- core/Event_Handler.hh | 2 +- core/Fd_And_Timeout_User.hh | 2 +- core/Float.cc | 210 +- core/Float.hh | 27 +- core/Hexstring.cc | 189 +- core/Hexstring.hh | 19 +- core/ILoggerPlugin.hh | 2 +- core/Integer.cc | 594 +++- core/Integer.hh | 20 +- core/JSON.cc | 2 +- core/JSON.hh | 40 +- core/LegacyLogger.cc | 2 +- core/LegacyLogger.hh | 2 +- core/Logger.cc | 2 +- core/Logger.hh | 2 +- core/LoggerPlugin.cc | 2 +- core/LoggerPlugin.hh | 2 +- core/LoggerPluginManager.cc | 2 +- core/LoggerPluginManager.hh | 2 +- core/LoggerPlugin_dynamic.cc | 2 +- core/LoggerPlugin_static.cc | 2 +- core/LoggingBits.cc | 2 +- core/LoggingBits.hh | 2 +- core/LoggingParam.hh | 2 +- core/Makefile | 46 +- core/Message_types.hh | 2 +- core/Module_list.cc | 61 +- core/Module_list.hh | 7 +- core/Objid.cc | 113 +- core/Objid.hh | 20 +- core/Octetstring.cc | 182 +- core/Octetstring.hh | 18 +- core/Optional.hh | 26 +- core/Parallel_main.cc | 9 +- core/Param_Types.cc | 217 +- core/Param_Types.hh | 139 +- core/Parameters.h | 2 +- core/Port.cc | 2 +- core/Port.hh | 2 +- core/ProfMerge_main.cc | 231 ++ core/Profiler.cc | 1463 +-------- core/Profiler.hh | 89 +- core/ProfilerTools.cc | 1412 +++++++++ core/ProfilerTools.hh | 163 + core/RAW.cc | 2 +- core/RAW.hh | 4 +- core/RInt.cc | 2 +- core/RInt.hh | 2 +- core/Runtime.cc | 7 +- core/Runtime.hh | 4 +- core/Single_main.cc | 2 +- core/Snapshot.cc | 2 +- core/Snapshot.hh | 2 +- core/String_struct.hh | 2 +- core/Struct_of.cc | 81 +- core/Struct_of.hh | 17 +- core/TCov.cc | 2 +- core/TCov.hh | 2 +- core/TEXT.cc | 2 +- core/TEXT.hh | 2 +- core/TTCN3.hh | 2 +- core/Template.cc | 602 +++- core/Template.hh | 83 +- core/Textbuf.cc | 79 +- core/Textbuf.hh | 2 +- core/Timer.cc | 2 +- core/Timer.hh | 2 +- core/TitanLoggerApi.xsd | 2 +- core/TitanLoggerControl.ttcn | 2 +- core/TitanLoggerControlImpl.cc | 2 +- core/Types.h | 2 +- core/Universal_charstring.cc | 241 +- core/Universal_charstring.hh | 24 +- core/VIRAG.asn | 2 +- core/Vector.hh | 18 +- core/Verdicttype.cc | 113 +- core/Verdicttype.hh | 20 +- core/XER.cc | 2 +- core/XER.hh | 2 +- core/XmlReader.cc | 2 +- core/XmlReader.hh | 2 +- core/config_process.l | 118 +- core/config_process.y | 366 +-- core/gccversion.c | 2 +- core/license_gen.c | 2 +- core/simplify.pl | 2 +- core/ttcn3_profmerge.1 | 98 + core2/Basetype2.cc | 481 ++- core2/Makefile | 2 +- doc/parallelarch/Makefile | 2 +- doc/parallelarch/state_mach_conn_endpoint.dot | 2 +- doc/parallelarch/state_mach_conn_mc.dot | 2 +- doc/parallelarch/state_mach_hc_mc.dot | 2 +- doc/parallelarch/state_mach_mapping_mc.dot | 2 +- doc/parallelarch/state_mach_mc.dot | 2 +- doc/parallelarch/state_mach_ptc_mc.dot | 2 +- etc/Makefile | 2 +- etc/TXDSample.xml | 2 +- etc/autotest/freshbuild.sh | 2 +- etc/autotest/mountall.sh | 2 +- etc/autotest/product_handler.py | 2 +- etc/autotest/titan_builder.py | 2 +- etc/autotest/titan_builder.sh | 2 +- etc/autotest/titan_builder_cfg.py | 2 +- etc/autotest/titan_publisher.py | 2 +- etc/howto/pqb_stats_howto.txt | 2 +- etc/howto/titan_release_howto.txt | 2 +- etc/scripts/cfg_msg_maker.py | 2 +- etc/scripts/stacklogger.pl | 2 +- etc/scripts/tpd_graph_xml2dot.py | 2 +- etc/scripts/ttcn3_archive.pl | 2 +- etc/solaris/build.sh | 2 +- etc/solaris/get.sh | 2 +- etc/solaris/path.sh | 2 +- etc/solaris/titan.sh | 2 +- etc/xsd/Junit.xsd | 2 +- etc/xsd/TPD.xsd | 10 +- .../BER_EncDec/BER_EncDec_TD.fast_script | 2 +- function_test/BER_EncDec/BER_EncDec_TD.script | 2 +- function_test/BER_EncDec/Makefile | 8 +- function_test/BER_EncDec/Temp.cfg | 2 +- .../Config_Parser/Logging_1_TD.script | 88 +- .../Config_Parser/OrderedInclude.script | 2 +- .../PreprocessingCfgFiles_TD.script | 18 +- function_test/Config_Parser/begin_script.sh | 2 +- function_test/Config_Parser/end_script.sh | 2 +- function_test/Config_Parser/extfunc.cc | 2 +- function_test/Makefile | 2 +- function_test/RAW_EncDec/Makefile | 8 +- .../RAW_EncDec/RAW_EncDec_TD.fast_script | 2 +- function_test/RAW_EncDec/RAW_EncDec_TD.script | 2 +- function_test/RAW_EncDec/Temp.cfg | 2 +- function_test/README.txt | 2 +- .../Semantic_Analyser/ASN_SA_1_TD.script | 2 +- .../ASN_SA_asn1adhoc_TD.script | 2 +- .../Semantic_Analyser/Makefile.semantic | 4 +- .../Semantic_Analyser/SA_6_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_10_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_11_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_13_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_1_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_3_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_4_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_5_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_6_TD.script | 6 +- .../Semantic_Analyser/TTCN3_SA_7_TD.script | 2 +- .../Semantic_Analyser/TTCN3_SA_9_TD.script | 2 +- .../TTCN3_SA_ttcn3adhoc_TD.script | 2 +- function_test/Semantic_Analyser/cw.pl | 2 +- .../Semantic_Analyser/defpars/HQ30279A.ttcn | 2 +- .../Semantic_Analyser/defpars/Makefile | 2 +- .../defpars/bende_fn_SE.ttcn | 2 +- .../Semantic_Analyser/defpars/bende_t_SE.ttcn | 2 +- .../Semantic_Analyser/encode/Makefile | 2 +- .../Semantic_Analyser/encode/encode_SE.ttcn | 2 +- .../Semantic_Analyser/float/Makefile | 2 +- .../Semantic_Analyser/float/subtype_OK.ttcn | 2 +- .../Semantic_Analyser/float/subtype_SE.ttcn | 2 +- function_test/Semantic_Analyser/harness.pl | 2 +- .../import_of_iports/A_CYCLIC.ttcn | 2 +- .../import_of_iports/A_SE.ttcn | 2 +- .../import_of_iports/B_APR_SE.ttcn | 2 +- .../import_of_iports/B_APU_SE.ttcn | 2 +- .../import_of_iports/B_CEFR_SE.ttcn | 2 +- .../import_of_iports/B_CYCLIC.ttcn | 2 +- .../import_of_iports/B_SE.ttcn | 2 +- .../import_of_iports/C_BPR_SE.ttcn | 2 +- .../import_of_iports/C_BPU_SE.ttcn | 2 +- .../import_of_iports/C_CYCLIC.ttcn | 2 +- .../import_of_iports/C_FR_SE.ttcn | 2 +- .../import_of_iports/C_SE.ttcn | 2 +- .../import_of_iports/D_CPR_SE.ttcn | 2 +- .../import_of_iports/D_CPU_SE.ttcn | 2 +- .../import_of_iports/D_FR_SE.ttcn | 2 +- .../import_of_iports/D_SE.ttcn | 2 +- .../import_of_iports/E_DPR_SE.ttcn | 2 +- .../import_of_iports/E_DPU_SE.ttcn | 2 +- .../import_of_iports/E_FR_SE.ttcn | 2 +- .../import_of_iports/E_SE.ttcn | 2 +- .../import_of_iports/Makefile | 2 +- .../Semantic_Analyser/options/quitter3.ttcn | 2 +- .../Semantic_Analyser/options/quitter3Q1.ttcn | 2 +- .../options/quitter3Q1S.ttcn | 2 +- .../Semantic_Analyser/options/quitter3Q2.ttcn | 2 +- .../options/quitter3Q2S.ttcn | 2 +- .../Semantic_Analyser/options/quitter3S.ttcn | 2 +- .../Semantic_Analyser/param/Makefile | 2 +- .../Semantic_Analyser/param/param_SE.ttcn | 2 +- .../template_restrictions/.gitignore | 2 + .../template_restrictions/Makefile | 8 + .../template_restrictions/TempRes_SE.ttcn | 56 + .../Semantic_Analyser/template_restrictions/t | 9 + .../ver/CRL_111_222_3_R2D_OK.ttcn | 2 +- .../ver/CRL_111_222_R2D_OK.ttcn | 2 +- function_test/Semantic_Analyser/ver/Makefile | 2 +- .../Semantic_Analyser/ver/R2D2_SE.ttcn | 2 +- .../Semantic_Analyser/ver/R2D_SE.ttcn | 2 +- .../Semantic_Analyser/ver/c3p0_SE.ttcn | 2 +- .../Semantic_Analyser/ver/dup_ver_SE.ttcn | 2 +- .../Semantic_Analyser/ver/high_titan_SE.ttcn | 6 +- .../Semantic_Analyser/ver/importer_SE.ttcn | 2 +- .../Semantic_Analyser/ver/new_ver_SE.ttcn | 2 +- .../Semantic_Analyser/ver/notimported_SE.ttcn | 2 +- .../Semantic_Analyser/ver/noversion_SE.ttcn | 2 +- .../Semantic_Analyser/ver/unreleased_SE.ttcn | 2 +- .../Semantic_Analyser/ver/ver_OK.ttcn | 2 +- .../Semantic_Analyser/ver/ver_highest_OK.ttcn | 2 +- .../ver/ver_newstyle_OK.ttcn | 2 +- .../ver/ver_newstyle_per1_template_OK.ttcn | 2 +- .../ver/ver_newstyle_template_OK.ttcn | 2 +- function_test/Semantic_Analyser/xer/Makefile | 2 +- .../xer/aa_not_in_record_SE.ttcn | 2 +- .../xer/aa_not_string_SE.ttcn | 2 +- .../Semantic_Analyser/xer/aa_twice_SE.ttcn | 2 +- .../Semantic_Analyser/xer/aa_untagged_SE.ttcn | 2 +- .../Semantic_Analyser/xer/ae_clash_SE.ttcn | 2 +- .../xer/ae_wrong_type_SE.ttcn | 2 +- .../xer/atr_not_on_record_SE.ttcn | 2 +- .../xer/atr_untagged_SE.ttcn | 2 +- .../Semantic_Analyser/xer/attribs_OK.ttcn | 2 +- .../Semantic_Analyser/xer/b64_clash_SE.ttcn | 2 +- .../xer/b64_wrong_type_SE.ttcn | 2 +- .../Semantic_Analyser/xer/bogus_SE.ttcn | 2 +- .../Semantic_Analyser/xer/decimal_SE.ttcn | 2 +- .../Semantic_Analyser/xer/dfe_charenc_OK.ttcn | 2 +- .../Semantic_Analyser/xer/dfe_clash_SE.ttcn | 2 +- .../Semantic_Analyser/xer/dfe_int_OK.ttcn | 2 +- .../Semantic_Analyser/xer/disorder_SE.ttcn | 2 +- .../Semantic_Analyser/xer/dup_text_SE.ttcn | 2 +- .../Semantic_Analyser/xer/dupenum_SE.ttcn | 2 +- .../xer/emb_first_opt_SE.ttcn | 2 +- .../xer/emb_first_untag_SE.ttcn | 2 +- .../xer/emb_not_record_SE.ttcn | 2 +- .../Semantic_Analyser/xer/emb_untag_SE.ttcn | 2 +- .../xer/emb_wrong_first_SE.ttcn | 2 +- .../Semantic_Analyser/xer/encdec_OK.ttcn | 2 +- .../Semantic_Analyser/xer/ifq_SE.ttcn | 2 +- .../Semantic_Analyser/xer/list_clash_SE.ttcn | 2 +- .../xer/list_not_recof_SE.ttcn | 2 +- .../Semantic_Analyser/xer/namedup1_SE.ttcn | 2 +- .../Semantic_Analyser/xer/namedup2_SE.ttcn | 2 +- .../Semantic_Analyser/xer/no_text_all_SE.ttcn | 2 +- .../xer/ns_empty_prefix_dup_OK.ttcn | 2 +- .../xer/ns_prefix_dup_OK.ttcn | 2 +- .../Semantic_Analyser/xer/ns_xml_SE.ttcn | 2 +- .../Semantic_Analyser/xer/qname_SE.ttcn | 2 +- .../Semantic_Analyser/xer/qname_attr_OK.ttcn | 2 +- .../Semantic_Analyser/xer/recur_SE.ttcn | 2 +- .../Semantic_Analyser/xer/soapy.ttcn | 2 +- .../xer/text_clash_use_number_SE.ttcn | 2 +- .../xer/text_no_enum_SE.ttcn | 2 +- .../xer/text_over_text_SE.ttcn | 2 +- .../Semantic_Analyser/xer/untag2_SE.ttcn | 2 +- .../xer/untagged_charenc_OK.ttcn | 2 +- .../xer/untagged_charenc_another_SE.ttcn | 2 +- .../xer/untagged_charenc_optional_SE.ttcn | 2 +- .../xer/untagged_noncharenc_SE.ttcn | 2 +- .../xer/untagged_parent_not_record_SE.ttcn | 2 +- .../xer/untagged_parent_untagged_SE.ttcn | 2 +- .../xer/uo_attribonly_SE.ttcn | 2 +- .../Semantic_Analyser/xer/uo_no_recof_SE.ttcn | 2 +- .../xer/usenil_clash_SE.ttcn | 2 +- .../xer/usenil_comp_clash_SE.ttcn | 2 +- .../xer/usenil_no_controlns_SE.ttcn | 2 +- .../xer/usenil_no_optional_SE.ttcn | 2 +- .../xer/usenil_not_attr_SE.ttcn | 2 +- .../xer/usenil_not_record_SE.ttcn | 2 +- .../xer/usetype_clash_SE.ttcn | 2 +- .../xer/usetype_not_union_SE.ttcn | 2 +- .../xer/usetype_with_untagged_SE.ttcn | 2 +- .../xer/usetype_with_usetype_SE.ttcn | 2 +- .../xer/useunion_not_union_SE.ttcn | 2 +- .../xer/useunion_with_non_charenc_SE.ttcn | 2 +- .../xer/useunion_with_useunion_SE.ttcn | 2 +- function_test/Text_EncDec/Makefile | 8 +- .../Text_EncDec/TEXT_1_TD.fast_script | 2 +- function_test/Text_EncDec/TEXT_1_TD.script | 2 +- function_test/Text_EncDec/Temp.cfg | 2 +- function_test/Tools/SAtester.pl | 2 +- function_test/XER_EncDec/Makefile | 8 +- function_test/XER_EncDec/Temp.cfg | 2 +- function_test/XER_EncDec/XER_EncDec_TD.script | 2 +- .../doc/TTCN3_Executor_TestReport.doc | Bin 1106432 -> 1143296 bytes hello/Makefile | 4 +- hello/MyExample.cfg | 3 +- hello/MyExample.ttcn | 3 +- hello/PCOType.cc | 2 +- hello/PCOType.hh | 2 +- hello/hello_world.ttcn | 79 + help/Makefile | 2 +- help/chm_refact.sh | 2 +- help/info/BNF.html | 2 +- help/info/action.html | 2 +- help/info/activate.html | 2 +- help/info/address.html | 2 +- help/info/alive.html | 2 +- help/info/all.html | 2 +- help/info/alt.html | 2 +- help/info/altstep.html | 2 +- help/info/and.html | 2 +- help/info/and4b.html | 2 +- help/info/any.html | 2 +- help/info/anytype.html | 4 +- help/info/apply.html | 71 + help/info/bit2hex.html | 4 +- help/info/bit2int.html | 2 +- help/info/bit2oct.html | 2 +- help/info/bit2str.html | 2 +- help/info/bitstring.html | 2 +- help/info/boolean.html | 2 +- help/info/break.html | 2 +- help/info/call.html | 2 +- help/info/case.html | 2 +- help/info/catch.html | 2 +- help/info/char.html | 2 +- help/info/char2int.html | 2 +- help/info/char2oct.html | 2 +- help/info/charstring.html | 2 +- help/info/check.html | 2 +- help/info/clear.html | 2 +- help/info/complement.html | 2 +- help/info/component.html | 2 +- help/info/connect.html | 2 +- help/info/const.html | 2 +- help/info/continue.html | 2 +- help/info/control.html | 2 +- help/info/create.html | 2 +- help/info/deactivate.html | 2 +- help/info/decode_base64.html | 2 +- help/info/decvalue.html | 2 +- help/info/default.html | 4 +- help/info/derefers.html | 72 + help/info/disconnect.html | 4 +- help/info/display.html | 2 +- help/info/do.html | 2 +- help/info/done.html | 2 +- help/info/else.html | 2 +- help/info/encode.html | 2 +- help/info/encode_base64.html | 2 +- help/info/encvalue.html | 2 +- help/info/enumerated.html | 2 +- help/info/error.html | 2 +- help/info/except.html | 2 +- help/info/exception.html | 2 +- help/info/execute.html | 2 +- help/info/extension.html | 2 +- help/info/external.html | 2 +- help/info/fail.html | 2 +- help/info/false.html | 2 +- help/info/float.html | 2 +- help/info/float2int.html | 2 +- help/info/float2str.html | 2 +- help/info/for.html | 2 +- help/info/friend.html | 2 +- help/info/from.html | 2 +- help/info/function.html | 2 +- help/info/get_stringencoding.html | 2 +- help/info/getcall.html | 2 +- help/info/getreply.html | 2 +- help/info/getverdict.html | 2 +- help/info/goto.html | 2 +- help/info/group.html | 2 +- help/info/hex2bit.html | 2 +- help/info/hex2int.html | 2 +- help/info/hex2oct.html | 2 +- help/info/hex2str.html | 2 +- help/info/hexstring.html | 2 +- help/info/if.html | 2 +- help/info/ifpresent.html | 2 +- help/info/import.html | 2 +- help/info/in.html | 2 +- help/info/inconc.html | 2 +- help/info/infinity.html | 2 +- help/info/inout.html | 2 +- help/info/int2bit.html | 2 +- help/info/int2char.html | 59 +- help/info/int2enum.html | 91 + help/info/int2float.html | 19 +- help/info/int2hex.html | 2 +- help/info/int2oct.html | 2 +- help/info/int2str.html | 2 +- help/info/int2unichar.html | 2 +- help/info/integer.html | 2 +- help/info/interleave.html | 2 +- help/info/isbound.html | 2 +- help/info/ischosen.html | 2 +- help/info/ispresent.html | 2 +- help/info/isvalue.html | 2 +- help/info/kill.html | 2 +- help/info/killed.html | 2 +- help/info/label.html | 2 +- help/info/language.html | 2 +- help/info/length.html | 2 +- help/info/lengthof.html | 2 +- help/info/log.html | 4 +- help/info/log2str.html | 67 + help/info/map.html | 2 +- help/info/match.html | 2 +- help/info/message.html | 2 +- help/info/mixed.html | 2 +- help/info/mod.html | 2 +- help/info/modifies.html | 2 +- help/info/module.html | 2 +- help/info/modulepar.html | 2 +- help/info/mtc.html | 2 +- help/info/noblock.html | 2 +- help/info/none.html | 2 +- help/info/not.html | 2 +- help/info/not4b.html | 2 +- help/info/nowait.html | 2 +- help/info/null.html | 2 +- help/info/objid.html | 2 +- help/info/oct2bit.html | 2 +- help/info/oct2char.html | 2 +- help/info/oct2hex.html | 2 +- help/info/oct2int.html | 2 +- help/info/oct2str.html | 2 +- help/info/oct2unichar.html | 2 +- help/info/octetstring.html | 2 +- help/info/of.html | 2 +- help/info/omit.html | 2 +- help/info/on.html | 2 +- help/info/operators.html | 2 +- help/info/optional.html | 2 +- help/info/or.html | 2 +- help/info/or4b.html | 2 +- help/info/out.html | 2 +- help/info/override.html | 2 +- help/info/param.html | 2 +- help/info/pass.html | 2 +- help/info/pattern.html | 2 +- help/info/permutation.html | 2 +- help/info/port.html | 2 +- help/info/private.html | 2 +- help/info/procedure.html | 2 +- help/info/profiler.html | 2 +- help/info/public.html | 2 +- help/info/raise.html | 2 +- help/info/read.html | 2 +- help/info/receive.html | 2 +- help/info/record.html | 2 +- help/info/recursive.html | 4 +- help/info/refers.html | 68 + help/info/regexp.html | 4 +- help/info/rem.html | 2 +- help/info/remove_bom.html | 2 +- help/info/repeat.html | 2 +- help/info/replace.html | 2 +- help/info/reply.html | 2 +- help/info/return.html | 2 +- help/info/rnd.html | 2 +- help/info/running.html | 2 +- help/info/runs.html | 2 +- help/info/select.html | 2 +- help/info/self.html | 2 +- help/info/send.html | 2 +- help/info/sender.html | 2 +- help/info/set.html | 2 +- help/info/setverdict.html | 2 +- help/info/signature.html | 2 +- help/info/sizeof.html | 2 +- help/info/start.html | 2 +- help/info/stop.html | 2 +- help/info/str2bit.html | 2 +- help/info/str2float.html | 2 +- help/info/str2hex.html | 2 +- help/info/str2int.html | 2 +- help/info/str2oct.html | 2 +- help/info/subset.html | 27 +- help/info/substr.html | 2 +- help/info/superset.html | 27 +- help/info/system.html | 2 +- help/info/template.html | 2 +- help/info/testcase.html | 2 +- help/info/testcasename.html | 2 +- help/info/timeout.html | 2 +- help/info/timer.html | 2 +- help/info/to.html | 2 +- help/info/trigger.html | 2 +- help/info/true.html | 2 +- help/info/type.html | 223 +- help/info/unichar2char.html | 2 +- help/info/unichar2int.html | 2 +- help/info/unichar2oct.html | 2 +- help/info/union.html | 2 +- help/info/universal.html | 2 +- help/info/unmap.html | 2 +- help/info/value.html | 2 +- help/info/valueof.html | 2 +- help/info/var.html | 2 +- help/info/variant.html | 2 +- help/info/verdicttype.html | 2 +- help/info/while.html | 2 +- help/info/with.html | 2 +- help/info/xor.html | 2 +- help/info/xor4b.html | 2 +- help/titan.hhc | 2 +- help/titan.hhp | 2 +- help/titan_index.html | 30 +- help/titan_main.html | 10 +- help/ttcn3_help | 2 +- langviz/Grammar.cc | 2 +- langviz/Grammar.hh | 2 +- langviz/Graph.cc | 2 +- langviz/Graph.hh | 2 +- langviz/Iterator.cc | 2 +- langviz/Iterator.hh | 2 +- langviz/Makefile | 2 +- langviz/Node.cc | 2 +- langviz/Node.hh | 2 +- langviz/Rule.cc | 2 +- langviz/Rule.hh | 2 +- langviz/Symbol.cc | 2 +- langviz/Symbol.hh | 2 +- langviz/bison_la.l | 2 +- langviz/bison_p.y | 2 +- langviz/error.c | 2 +- langviz/error.h | 2 +- langviz/main.cc | 2 +- license/Makefile | 2 +- license/Makefile_renew_license | 2 +- license/license.dat | 2 +- license/license_gen.c | 2 +- license/renew_license.c | 2 +- license/renew_license.html | 2 +- loggerplugins/JUnitLogger/JUnitLogger.cc | 2 +- loggerplugins/JUnitLogger/JUnitLogger.hh | 2 +- loggerplugins/JUnitLogger/Makefile | 2 +- loggerplugins/JUnitLogger2/JUnitLogger2.cc | 2 +- loggerplugins/JUnitLogger2/JUnitLogger2.hh | 2 +- loggerplugins/JUnitLogger2/Makefile | 2 +- loggerplugins/Makefile | 2 +- loggerplugins/TSTLogger/Makefile | 2 +- loggerplugins/TSTLogger/TSTLogger.cc | 2 +- loggerplugins/TSTLogger/TSTLogger.hh | 2 +- makefiles/Makefile.personal.bangjohansen | 2 +- makefiles/Makefile.personal.cygwin15 | 2 +- makefiles/Makefile.personal.ehubuux110 | 2 +- makefiles/Makefile.personal.elx1pjld12-hz | 2 + ...le.personal.esekilxxen1843.rnd.ericsson.se | 2 +- makefiles/Makefile.personal.esekits1024 | 2 +- makefiles/Makefile.personal.esekits1080 | 2 +- makefiles/Makefile.personal.esekits3013 | 2 +- makefiles/Makefile.personal.esekiux5120 | 2 +- makefiles/Makefile.personal.tcclab1 | 2 +- makefiles/Makefile.personal.tcclab2 | 4 +- makefiles/Makefile.personal.tcclab3 | 2 +- makefiles/Makefile.personal.tcclab4 | 2 +- makefiles/Makefile.personal.tcclab5 | 2 +- makefiles/Makefile.personal.tcclab6 | 2 +- mctr2/Makefile | 2 +- mctr2/cli/Cli.cc | 6 +- mctr2/cli/Cli.h | 4 +- mctr2/cli/Makefile | 2 +- mctr2/cli/config_read.l | 27 +- mctr2/cli/config_read.y | 156 +- mctr2/editline/Makefile | 2 +- mctr2/mctr/MainController.cc | 4 +- mctr2/mctr/MainController.h | 4 +- mctr2/mctr/Makefile | 2 +- mctr2/mctr/MctrError.cc | 2 +- mctr2/mctr/UserInterface.cc | 4 +- mctr2/mctr/UserInterface.h | 4 +- mctr2/mctr/config_data.cc | 2 +- mctr2/mctr/config_data.h | 2 +- mctr2/mctr/main.cc | 4 +- mctr2/mctr/ttcn3_start | 2 +- parser/Makefile | 2 +- parser/parser.l | 2 +- parser/parser.y | 4 +- regression_test/ASN1/Makefile | 2 +- regression_test/ASN1/Test303/Makefile | 2 +- regression_test/ASN1/Test303/Test303A.asn | 2 +- regression_test/ASN1/Test303/Test303T.ttcn | 2 +- regression_test/ASN1/Test303/config.cfg | 2 +- regression_test/ASN1/Test307/Makefile | 2 +- regression_test/ASN1/Test307/Test307A.asn | 2 +- regression_test/ASN1/Test307/Test307T.ttcn | 2 +- regression_test/ASN1/Test308/Makefile | 2 +- regression_test/ASN1/Test308/Test308A.asn | 2 +- regression_test/ASN1/Test308/Test308T.ttcn | 2 +- regression_test/ASN1/Test309/Makefile | 2 +- regression_test/ASN1/Test309/Test309A.asn | 2 +- regression_test/ASN1/Test309/Test309T.ttcn | 2 +- regression_test/ASN1/Test310/Makefile | 2 +- regression_test/ASN1/Test310/Test310A.asn | 2 +- regression_test/ASN1/Test310/Test310T.ttcn | 2 +- regression_test/ASN1/Test330/Makefile | 2 +- regression_test/ASN1/Test330/Test330A.asn | 2 +- regression_test/ASN1/Test330/Test330T.ttcn | 2 +- regression_test/ASN1/Test332/Makefile | 2 +- regression_test/ASN1/Test332/Test332A.asn | 2 +- regression_test/ASN1/Test332/Test332T.ttcn | 2 +- regression_test/ASN1/Test338/Makefile | 2 +- regression_test/ASN1/Test338/Test338A.asn | 2 +- regression_test/ASN1/Test338/Test338T.ttcn | 2 +- regression_test/ASN1/Test340/Makefile | 2 +- regression_test/ASN1/Test340/Test340A.asn | 2 +- regression_test/ASN1/Test340/Test340T.ttcn | 2 +- regression_test/ASN1/Test342/Makefile | 2 +- regression_test/ASN1/Test342/Test342A.asn | 2 +- regression_test/ASN1/Test342/Test342T.ttcn | 2 +- regression_test/ASN1/Test344/Makefile | 2 +- regression_test/ASN1/Test344/Test344A.asn | 2 +- regression_test/ASN1/Test344/Test344T.ttcn | 2 +- regression_test/ASN1/Test346/Makefile | 2 +- regression_test/ASN1/Test346/Test346A.asn | 2 +- regression_test/ASN1/Test346/Test346T.ttcn | 2 +- regression_test/ASN1/Test348/Makefile | 2 +- regression_test/ASN1/Test348/Test348A.asn | 2 +- regression_test/ASN1/Test348/Test348T.ttcn | 2 +- regression_test/ASN1/Test350/Makefile | 2 +- regression_test/ASN1/Test350/Test350A.asn | 2 +- regression_test/ASN1/Test350/Test350T.ttcn | 2 +- regression_test/ASN1/Test350/config.cfg | 2 +- regression_test/ASN1/Test352/Makefile | 2 +- regression_test/ASN1/Test352/Test352A.asn | 2 +- regression_test/ASN1/Test352/Test352T.ttcn | 2 +- regression_test/ASN1/Test352/config.cfg | 2 +- regression_test/ASN1/Test354/Makefile | 2 +- regression_test/ASN1/Test354/Test354A.asn | 2 +- regression_test/ASN1/Test354/Test354T.ttcn | 2 +- regression_test/ASN1/Test354/config.cfg | 2 +- regression_test/ASN1/Test356/Makefile | 2 +- regression_test/ASN1/Test356/Test356A.asn | 2 +- regression_test/ASN1/Test356/Test356T.ttcn | 2 +- regression_test/ASN1/Test356/config.cfg | 2 +- regression_test/ASN1/Test358/Makefile | 2 +- regression_test/ASN1/Test358/Test358A.asn | 2 +- regression_test/ASN1/Test358/Test358T.ttcn | 2 +- regression_test/ASN1/Test358/config.cfg | 2 +- regression_test/ASN1/Test360/Makefile | 2 +- regression_test/ASN1/Test360/Test360A.asn | 2 +- regression_test/ASN1/Test360/Test360T.ttcn | 2 +- regression_test/ASN1/Test360/config.cfg | 2 +- regression_test/ASN1/Test38/Makefile | 2 +- regression_test/ASN1/Test38/Test38A.asn | 2 +- regression_test/ASN1/Test38/Test38B.asn | 2 +- regression_test/ASN1/codeGeneration2/Makefile | 2 +- .../ASN1/codeGeneration2/Test46.asn | 2 +- .../ASN1/codeGeneration2/Test48.asn | 2 +- .../ASN1/codeGeneration2/Test49.asn | 2 +- .../ASN1/codeGeneration2/Test51.asn | 2 +- .../ASN1/codeGeneration2/Test52.asn | 2 +- .../ASN1/codeGeneration2/Test53.asn | 2 +- .../ASN1/codeGeneration2/Test54.asn | 2 +- .../ASN1/codeGeneration2/Test55.asn | 2 +- .../ASN1/codeGeneration2/Test56.asn | 2 +- .../ASN1/codeGeneration2/Test57.asn | 2 +- .../ASN1/codeGeneration2/Test60.asn | 2 +- .../ASN1/codeGeneration2/Test61.asn | 2 +- .../ASN1/codeGeneration2/Test62.asn | 2 +- .../ASN1/codeGeneration2/Test63.asn | 2 +- .../ASN1/codeGeneration2/Test64.asn | 2 +- .../ASN1/codeGeneration2/Test65.asn | 2 +- .../ASN1/codeGeneration2/Test66.asn | 2 +- .../ASN1/codeGeneration2/Test68.asn | 2 +- .../ASN1/codeGeneration2/Test71.asn | 2 +- .../ASN1/codeGeneration2/Test74.asn | 2 +- .../ASN1/codeGeneration2/Test75.asn | 2 +- .../ASN1/codeGeneration2/Test76.asn | 2 +- .../ASN1/codeGeneration2/Test77.asn | 2 +- .../ASN1/codeGeneration2/Test78.asn | 2 +- .../ASN1/codeGeneration2/Test80.asn | 2 +- .../ASN1/codeGeneration2/Test81.asn | 2 +- .../ASN1/codeGeneration2/Test83.asn | 2 +- .../ASN1/codeGeneration2/Test86.asn | 2 +- .../ASN1/codeGeneration2/Test87.asn | 2 +- regression_test/ASN1/enum1/Makefile | 2 +- regression_test/ASN1/enum1/Test23.asn | 2 +- regression_test/ASN1/enum2/Makefile | 2 +- regression_test/ASN1/enum2/Test25.asn | 2 +- regression_test/ASN1/errorMessages/Makefile | 2 +- regression_test/ASN1/errorMessages/Test11.asn | 2 +- regression_test/ASN1/errorMessages/Test12.asn | 2 +- regression_test/ASN1/errorMessages/Test13.asn | 2 +- regression_test/ASN1/errorMessages/Test14.asn | 2 +- regression_test/ASN1/errorMessages/Test15.asn | 2 +- regression_test/ASN1/errorMessages/Test16.asn | 2 +- regression_test/ASN1/errorMessages/Test17.asn | 2 +- regression_test/ASN1/errorMessages/Test18.asn | 2 +- .../ASN1/errorMessages/Test19_1.asn | 2 +- .../ASN1/errorMessages/Test19_2.asn | 2 +- regression_test/ASN1/errorMessages/Test20.asn | 2 +- regression_test/ASN1/errorMessages/Test21.asn | 2 +- regression_test/ASN1/errorMessages/Test22.asn | 2 +- regression_test/ASN1/errorMessages/Test24.asn | 2 +- regression_test/ASN1/errorMessages/Test26.asn | 2 +- regression_test/ASN1/errorMessages/Test28.asn | 2 +- regression_test/ASN1/errorMessages/Test32.asn | 2 +- regression_test/ASN1/errorMessages/Test33.asn | 2 +- regression_test/ASN1/errorMessages/Test34.asn | 2 +- regression_test/ASN1/errorMessages/Test39.asn | 2 +- regression_test/ASN1/errorMessages/Test40.asn | 2 +- regression_test/ASN1/errorMessages/Test41.asn | 2 +- regression_test/ASN1/errorMessages/Test42.asn | 2 +- regression_test/ASN1/errorMessages/Test43.asn | 2 +- regression_test/ASN1/errorMessages/Test44.asn | 2 +- regression_test/ASN1/errorMessages/Test45.asn | 2 +- regression_test/ASN1/errorMessages/Test47.asn | 2 +- regression_test/ASN1/errorMessages/Test50.asn | 2 +- regression_test/ASN1/errorMessages/Test67.asn | 2 +- regression_test/ASN1/errorMessages/Test69.asn | 2 +- regression_test/ASN1/errorMessages/Test70.asn | 2 +- regression_test/ASN1/errorMessages/Test72.asn | 2 +- regression_test/ASN1/errorMessages/Test73.asn | 2 +- regression_test/ASN1/errorMessages/Test79.asn | 2 +- regression_test/ASN1/errorMessages/Test82.asn | 2 +- regression_test/ASN1/errorMessages/Test84.asn | 2 +- regression_test/ASN1/errorMessages/Test85.asn | 2 +- regression_test/ASN1/errorMessages2/Makefile | 2 +- .../ASN1/errorMessages2/Test10.asn | 2 +- regression_test/ASN1/hyphen/Makefile | 2 +- regression_test/ASN1/hyphen/Test284.asn | 2 +- regression_test/ASN1/keyword/Makefile | 2 +- regression_test/ASN1/keyword/Test283.asn | 2 +- regression_test/ASN1/keyword/Test283T.ttcn | 2 +- regression_test/ASN1/parse/Makefile | 2 +- regression_test/ASN1/parse/Test1.asn | 2 +- .../ASN1/parse/Test1_known_errors.asn | 2 +- regression_test/ASN1/parse/Test2.asn | 2 +- .../ASN1/parse/Test2_known_errors.asn | 2 +- regression_test/ASN1/parse/Test3.asn | 2 +- .../ASN1/parse/Test3_known_errors.asn | 2 +- regression_test/ASN1/parse/Test4.asn | 2 +- .../ASN1/parse/Test4_known_errors.asn | 2 +- regression_test/ASN1/transformations/Makefile | 2 +- .../ASN1/transformations/Test289A.asn | 2 +- .../ASN1/transformations/Test289B.asn | 2 +- .../ASN1/transformations/Test5A.asn | 2 +- .../ASN1/transformations/Test5B.asn | 2 +- .../ASN1/transformations/Test6A.asn | 2 +- .../ASN1/transformations/Test6B.asn | 2 +- .../ASN1/transformations/Test7A.asn | 2 +- .../ASN1/transformations/Test7B.asn | 2 +- .../ASN1/transformations/Test8A.asn | 2 +- .../ASN1/transformations/Test8B.asn | 2 +- .../ASN1/transformations/Test9A.asn | 2 +- .../ASN1/transformations/Test9B.asn | 2 +- regression_test/BER/Makefile | 2 +- regression_test/BER/MyPort1.cc | 2 +- regression_test/BER/MyPort1.hh | 2 +- regression_test/BER/MyPort2.cc | 2 +- regression_test/BER/MyPort2.hh | 2 +- regression_test/BER/Regr.cfg | 2 +- regression_test/BER/Regr.ttcn | 8 +- regression_test/BER/Regr1.asn | 2 +- regression_test/BER/Regr2.asn | 2 +- regression_test/BER_x682/Makefile | 2 +- regression_test/BER_x682/MyPort1.cc | 2 +- regression_test/BER_x682/MyPort1.hh | 2 +- regression_test/BER_x682/MyPort2.cc | 2 +- regression_test/BER_x682/MyPort2.hh | 2 +- regression_test/BER_x682/X.cfg | 2 +- regression_test/BER_x682/X.ttcn | 2 +- regression_test/BER_x682/X682.asn | 2 +- regression_test/BER_x682_wa/Makefile | 2 +- regression_test/BER_x682_wa/MyPort1.cc | 2 +- regression_test/BER_x682_wa/MyPort1.hh | 2 +- regression_test/BER_x682_wa/MyPort2.cc | 2 +- regression_test/BER_x682_wa/MyPort2.hh | 2 +- regression_test/BER_x682_wa/X.cfg | 2 +- regression_test/BER_x682_wa/X.ttcn | 2 +- regression_test/BER_x682_wa/x682.asn | 2 +- regression_test/CRTR00015758/Makefile | 2 +- regression_test/CRTR00015758/config.cfg | 2 +- regression_test/CRTR00015758/no.ttcn | 2 +- regression_test/CRTR00015758/run.cfg | 2 +- regression_test/CRTR00015758/trouble.cfg | 2 +- regression_test/ERC/Makefile | 2 +- regression_test/ERC/base.cfg | 2 +- regression_test/ERC/config.cfg | 2 +- regression_test/ERC/erc.ttcn | 3 +- regression_test/ERC/included1.cfg | 2 +- regression_test/ERC/included2.cfg | 2 +- regression_test/ERC/subdir/subdir_config.cfg | 2 +- regression_test/HQ16404/HQ16404.ttcn | 2 +- regression_test/HQ16404/Makefile | 2 +- regression_test/HQ16404/config.cfg | 2 +- regression_test/Makefile | 4 +- regression_test/Makefile.regression | 3 +- .../RAW/Examples/DTAP_RAW_Samples.ttcn | 2 +- .../RAW/Examples/DTAP_typedefs.ttcn | 2 +- regression_test/RAW/Examples/Makefile | 2 +- regression_test/RAW/Examples/RAW_Test.ttcn | 2 +- regression_test/RAW/Examples/RAWtest.cfg | 2 +- .../RAW/Examples/SCCP_RAW_Samples.ttcn | 2 +- .../RAW/Examples/SCCP_typedefs.ttcn | 2 +- .../RAW/Examples/general_typedefs.ttcn | 2 +- .../RAW/HN25015/General_Types.ttcn | 2 +- regression_test/RAW/HN25015/HN25015.ttcn | 2 +- regression_test/RAW/HN25015/Makefile | 2 +- regression_test/RAW/HN25015/SGsAP_Types.ttcn | 2 +- regression_test/RAW/HN25015/config.cfg | 2 +- regression_test/RAW/HQ26535/GTPv2_Types.ttcn | 2 +- .../RAW/HQ26535/General_Types.ttcn | 2 +- regression_test/RAW/HQ26535/Makefile | 2 +- regression_test/RAW/HQ26535/gtpctest.ttcn | 2 +- regression_test/RAW/HQ49956/Makefile | 2 +- regression_test/RAW/HQ49956/Module.ttcn | 2 +- regression_test/RAW/HQ49956/Test.ttcn | 2 +- .../RAW/HS16977/HS16977_Constants.ttcn | 2 +- regression_test/RAW/HS16977/HS16977_Test.ttcn | 2 +- .../RAW/HS16977/HS16977_Types.ttcn | 2 +- regression_test/RAW/HS16977/Makefile | 2 +- regression_test/RAW/HS16977/config.cfg | 2 +- regression_test/RAW/IntX/IntX.ttcn | 372 +++ regression_test/RAW/IntX/Makefile | 135 + regression_test/RAW/IntX/config.cfg | 14 + regression_test/RAW/Makefile | 2 +- .../XML/EXER-whitepaper/AnyAttributes.ttcnpp | 2 +- .../XML/EXER-whitepaper/AnyElement.ttcnpp | 2 +- .../EXER-whitepaper/AnyElementOptional.ttcnpp | 2 +- .../AnyElementOptional2.ttcnpp | 2 +- .../XML/EXER-whitepaper/Attribute.ttcnpp | 4 +- .../EXER-whitepaper/DefaultForEmpty.ttcnpp | 2 +- .../XML/EXER-whitepaper/EmbedValues.ttcnpp | 2 +- .../XML/EXER-whitepaper/List.ttcnpp | 2 +- regression_test/XML/EXER-whitepaper/Makefile | 2 +- .../XML/EXER-whitepaper/Name.ttcnpp | 2 +- .../XML/EXER-whitepaper/Namespaces.ttcnpp | 2 +- .../XML/EXER-whitepaper/NamespacesDup.ttcnpp | 2 +- .../XML/EXER-whitepaper/Order.ttcnpp | 2 +- .../XML/EXER-whitepaper/Qname.ttcnpp | 2 +- .../XML/EXER-whitepaper/Text.ttcnpp | 2 +- .../XML/EXER-whitepaper/Untagged.ttcnpp | 2 +- .../XML/EXER-whitepaper/Untagged1.ttcnpp | 2 +- .../XML/EXER-whitepaper/UseNil.ttcnpp | 2 +- .../XML/EXER-whitepaper/UseNilSimple.ttcnpp | 2 +- .../XML/EXER-whitepaper/UseNumber.ttcnpp | 2 +- .../XML/EXER-whitepaper/UseOrder.ttcnpp | 2 +- .../XML/EXER-whitepaper/UseType.ttcnpp | 2 +- .../XML/EXER-whitepaper/UseUnion.ttcnpp | 2 +- .../XML/EXER-whitepaper/Whitespace.ttcnpp | 2 +- .../XML/EXER-whitepaper/config.cfg | 2 +- regression_test/XML/HM60295/Importer.xsd | 2 +- regression_test/XML/HM60295/Makefile | 2 +- regression_test/XML/HM60295/Schema1.xsd | 2 +- regression_test/XML/HM60295/Schema2.xsd | 2 +- regression_test/XML/HM60295/config.cfg | 2 +- regression_test/XML/HM60295/tester.ttcn | 2 +- regression_test/XML/HN15589/A.xsd | 2 +- regression_test/XML/HN15589/B.xsd | 2 +- regression_test/XML/HN15589/HN15589.ttcnpp | 2 +- regression_test/XML/HN15589/Makefile | 2 +- regression_test/XML/HN15589/config.cfg | 2 +- .../XML/HN15589/flipflop-check.xsd | 2 +- regression_test/XML/HN15589/log2xml.pl | 2 +- regression_test/XML/HN15589/xsd/XTDL.xsd | 2 +- .../XML/HN15589/xsd/XTDP-Message.xsd | 2 +- regression_test/XML/HN15589/xtdl.ttcn | 2 +- regression_test/XML/HN15589/xtdp.cfg | 2 +- regression_test/XML/HN15589/xtdp.ttcn | 2 +- regression_test/XML/HQ30408/HQ30408.ttcn | 2 +- regression_test/XML/HQ30408/Makefile | 2 +- regression_test/XML/HR49727/HR49727.ttcn | 2 +- regression_test/XML/HR49727/Makefile | 2 +- .../XML/HR49727/UsefulTtcn3Types.ttcn | 2 +- regression_test/XML/HR49727/XSD.ttcn | 2 +- regression_test/XML/HR49727/config.cfg | 2 +- .../http_jabber_org_protocol_pubsub.ttcn | 2 +- ...http_jabber_org_protocol_pubsub_event.ttcn | 2 +- .../XML/HR49727/jabber_x_data.ttcn | 2 +- regression_test/XML/HU13380/HU13380.ttcn | 64 + regression_test/XML/HU13380/Makefile | 138 + regression_test/XML/HU13380/config.cfg | 12 + regression_test/XML/Makefile | 4 +- regression_test/XML/NegativeTest/Makefile | 2 +- regression_test/XML/NegativeTest/ReadXml.ttcn | 2 +- .../XML/NegativeTest/ReadXmlImpl.cc | 2 +- .../XML/NegativeTest/exer_rec.ttcn | 2 +- .../XML/NegativeTest/exer_rec_of.ttcn | 2 +- .../XML/NegativeTest/exer_uni.ttcn | 2 +- regression_test/XML/NegativeTest/indent.pl | 2 +- regression_test/XML/NegativeTest/rec.ttcn | 2 +- regression_test/XML/NegativeTest/rec_of.ttcn | 2 +- regression_test/XML/NegativeTest/run.cfg | 2 +- regression_test/XML/NegativeTest/runner.ttcn | 2 +- regression_test/XML/NegativeTest/uni.ttcn | 2 +- regression_test/XML/TTCNandXML/AnnexB1.ttcn | 2 +- .../XML/TTCNandXML/AnnexB1Template.ttcnpp | 2 +- regression_test/XML/TTCNandXML/AnnexB2.ttcn | 2 +- .../XML/TTCNandXML/AnnexB2Template.ttcnpp | 2 +- regression_test/XML/TTCNandXML/AnnexB3.ttcn | 2 +- .../XML/TTCNandXML/AnnexB3Template.ttcnpp | 2 +- regression_test/XML/TTCNandXML/AnnexB4.ttcn | 2 +- .../XML/TTCNandXML/AnnexB4Template.ttcnpp | 2 +- .../XML/TTCNandXML/AnyStuff.ttcnpp | 2 +- .../XML/TTCNandXML/AttribPath.ttcn | 2 +- .../XML/TTCNandXML/AttribPathTest.ttcnpp | 2 +- .../XML/TTCNandXML/AttributesTest.ttcnpp | 2 +- .../XML/TTCNandXML/Base64Test.ttcnpp | 2 +- .../XML/TTCNandXML/DFEAttribTest.ttcnpp | 2 +- regression_test/XML/TTCNandXML/DFETest.ttcnpp | 2 +- regression_test/XML/TTCNandXML/E0.ttcn | 2 +- .../XML/TTCNandXML/EmbedValues.ttcnpp | 2 +- .../XML/TTCNandXML/EnumTest.ttcnpp | 2 +- regression_test/XML/TTCNandXML/Flatten.cc | 2 +- regression_test/XML/TTCNandXML/Flattener.ttcn | 2 +- regression_test/XML/TTCNandXML/Makefile | 2 +- regression_test/XML/TTCNandXML/Marx.ttcnpp | 2 +- .../XML/TTCNandXML/NamespaceDef.ttcn | 2 +- .../XML/TTCNandXML/NamespaceTest.ttcnpp | 2 +- .../XML/TTCNandXML/Regressions.ttcnpp | 2 +- regression_test/XML/TTCNandXML/UTF8.ttcn | 2 +- .../XML/TTCNandXML/WhitespaceTest.ttcnpp | 2 +- regression_test/XML/TTCNandXML/X693amd1.ttcn | 2 +- .../XML/TTCNandXML/X693amd1Test.ttcnpp | 2 +- .../XML/TTCNandXML/XSDAttributes.ttcn | 2 +- regression_test/XML/TTCNandXML/config.cfg | 2 +- regression_test/XML/XER/AsnValues.asn | 2 +- regression_test/XML/XER/Asntypes.asn | 2 +- regression_test/XML/XER/EmptyUnion.asn | 2 +- regression_test/XML/XER/Flatten.cc | 2 +- regression_test/XML/XER/Makefile | 2 +- regression_test/XML/XER/ObjectClass.asn | 2 +- .../XML/XER/ObjectClassWithSyntax.asn | 2 +- regression_test/XML/XER/SetValues.asn | 2 +- regression_test/XML/XER/Sets.asn | 2 +- regression_test/XML/XER/Txerasntypes.ttcnpp | 2 +- regression_test/XML/XER/Txerbinstr.ttcnpp | 2 +- regression_test/XML/XER/Txerboolean.ttcnpp | 2 +- regression_test/XML/XER/Txerenum.ttcnpp | 2 +- regression_test/XML/XER/Txerfloat.ttcnpp | 2 +- regression_test/XML/XER/Txerint.ttcnpp | 2 +- regression_test/XML/XER/Txernested.ttcnpp | 2 +- regression_test/XML/XER/Txerobjclass.ttcnpp | 2 +- regression_test/XML/XER/Txersets.ttcnpp | 2 +- regression_test/XML/XER/Txerstring.ttcnpp | 2 +- regression_test/XML/XER/checkit.pl | 2 +- regression_test/XML/XER/config.cfg | 2 +- regression_test/XML/XER/junk.ttcn3 | 2 +- regression_test/XML/XMLqualif/Makefile | 2 +- regression_test/XML/XMLqualif/POtest.ttcnpp | 2 +- regression_test/XML/XMLqualif/config.cfg | 2 +- regression_test/XML/XMLqualif/globall.xsd | 2 +- regression_test/XML/XMLqualif/po_qual.xsd | 2 +- regression_test/XML/XMLqualif/po_qual_atr.xsd | 2 +- .../XML/XMLqualif/po_qual_both.xsd | 2 +- .../XML/XMLqualif/po_qual_default.xml | 2 +- .../XML/XMLqualif/po_qual_explicit.xml | 2 +- regression_test/XML/XMLqualif/po_unqual.xml | 2 +- regression_test/XML/XMLqualif/po_unqual.xsd | 2 +- regression_test/XML/XmlWorkflow/Makefile | 2 +- .../PIPEasp_CNL113334/demo/PIPE.cfg | 2 +- .../demo/PIPEasp_Templates.ttcn | 2 +- .../PIPEasp_CNL113334/demo/PipeTest.prj | 2 +- .../PIPEasp_CNL113334/demo/PipeTest.ttcn | 2 +- .../PIPEasp_CNL113334/demo/ShellNotice.sh | 2 +- .../demo/ShellQuestionString.sh | 2 +- .../demo/ShellQuestionYesNo.sh | 2 +- .../PIPEasp_CNL113334/src/PIPEasp_PT.cc | 2 +- .../PIPEasp_CNL113334/src/PIPEasp_PT.hh | 2 +- .../src/PIPEasp_PortType.ttcn | 2 +- .../PIPEasp_CNL113334/src/PIPEasp_Types.ttcn | 2 +- .../PIPEasp_CNL113334/test/Makefile | 2 +- .../PIPEasp_CNL113334/test/PIPEasp_PT.cc | 2 +- .../PIPEasp_CNL113334/test/PIPEasp_PT.hh | 2 +- .../test/PIPEasp_PortType.ttcn | 2 +- .../PIPEasp_CNL113334/test/PIPEasp_Types.ttcn | 2 +- .../XML/XmlWorkflow/Tgc/IsTypes.xsd | 2 +- regression_test/XML/XmlWorkflow/Tgc/Tgc.ttcn | 2 +- regression_test/XML/XmlWorkflow/Tgc/Tgc.xsd | 2 +- .../XML/XmlWorkflow/Tgc/UsefulTtcn3Types.ttcn | 2 +- .../XML/XmlWorkflow/Tgc/XMLSchema.xsd | 2 +- regression_test/XML/XmlWorkflow/Tgc/XSD.ttcn | 2 +- regression_test/XML/XmlWorkflow/Tgc/confd.xsd | 2 +- .../Tgc/tail_f_com_ns_confd_1_0.ttcn | 2 +- ...sson_com_is_isco_IsTypes_R4L06_R4AF11.ttcn | 2 +- ..._ericsson_com_is_isco_Tgc_R6A48_R6H01.ttcn | 2 +- .../Tgc/www_w3_org_XML_1998_namespace.ttcn | 2 +- regression_test/XML/XmlWorkflow/Tgc/xml.xsd | 2 +- .../XmlTest_expectedTtcns/MyTypes_e.ttcn | 72 + .../NoTargetNamespace.ttcn | 58 + .../XmlTest_imsike_e.ttcn | 2 +- .../attribute_in_extension_e.ttcn | 72 + ...le_org_complex_restriction_with_use_e.ttcn | 117 + .../http_www_example_org_name_conv2_e.ttcn | 47 + .../http_www_example_org_name_conv3_e.ttcn | 47 + ..._org_nillable_in_nillable_extension_e.ttcn | 92 + ...http_www_example_org_seq_embeds_seq_e.ttcn | 80 + ...http_www_example_org_ttcn_wildcards_e.ttcn | 12 + .../http_www_example_org_wildcards_e.ttcn | 118 + .../imported_module_1_e.ttcn | 53 + .../imported_module_e.ttcn | 53 + .../module_typename_conversion_e.ttcn | 75 + .../name_conversion_extension_attrib_e.ttcn | 81 + .../nillable_annotations_e.ttcn | 75 + ..._ietf_params_xml_ns_conference_info_e.ttcn | 40 +- .../www_XmlTest_org_annotation_c_e.ttcn | 3 +- .../www_XmlTest_org_annotation_t_e.ttcn | 2 +- .../www_XmlTest_org_boolean_e.ttcn | 8 + .../www_XmlTest_org_complex_all_e.ttcn | 20 +- .../www_XmlTest_org_complex_include2_e.ttcn | 2 +- ...mlTest_org_element_recordOfElements_e.ttcn | 2 +- .../www_XmlTest_org_list_e.ttcn | 2 + .../www_XmlTest_org_string_e.ttcn | 2 +- .../www_XmlTest_org_union_e.ttcn | 10 + .../www_example_org_all_e.ttcn | 175 ++ .../www_example_org_anyattr_in_complex_e.ttcn | 63 + .../www_example_org_anyattrib_single_e.ttcn | 132 + .../www_example_org_attr_ext_rest_e.ttcn | 220 ++ .../www_example_org_attrib_enum_e.ttcn | 59 + .../www_example_org_attrib_order_a_e.ttcn | 115 + .../www_example_org_attrib_order_b_e.ttcn | 53 + ...www_example_org_attribgroup_ingroup_e.ttcn | 68 + ...ample_org_boolean_variant_commented_e.ttcn | 131 + .../www_example_org_comment_placement_e.ttcn | 95 + .../www_example_org_complex_nillable_e.ttcn | 146 + ..._example_org_decimal_fractiondigits_e.ttcn | 69 + ..._dont_generate_element_substitution_e.ttcn | 98 + .../www_example_org_enum_field_names_e.ttcn | 61 + ..._example_org_enumeration_remove_dup_e.ttcn | 123 + ...example_org_enumeration_restriction_e.ttcn | 157 + .../www_example_org_fixed_value_e.ttcn | 161 + ...e_org_generate_element_substitution_e.ttcn | 102 + .../www_example_org_id_attrib_e.ttcn | 50 + .../www_example_org_import_prefix_e.ttcn | 81 + .../www_example_org_imported2_e.ttcn | 69 + .../www_example_org_imported_e.ttcn | 59 + .../www_example_org_list_simpletype_e.ttcn | 117 + .../www_example_org_long_extension_e.ttcn | 149 + .../www_example_org_name_conv_http_e.ttcn | 47 + .../www_example_org_namespaceas_e.ttcn | 92 + .../www_example_org_nillable_fixed_e.ttcn | 102 + .../www_example_org_no_ns_connector_e.ttcn | 68 + ...rg_not_a_number_minex_inf_maxex_inf_e.ttcn | 73 + ...xample_org_qualified_element_attrib_e.ttcn | 78 + ...w_example_org_regex_square_brackets_e.ttcn | 65 + .../www_example_org_self_recursion_e.ttcn | 66 + ...ple_org_seq_enumeration_restriction_e.ttcn | 77 + ...www_example_org_seq_group_reference_e.ttcn | 81 + .../www_example_org_simpletype_base_e.ttcn | 58 + .../www_example_org_simpletype_ref_e.ttcn | 86 + ...xample_org_simpletype_restrict_comp_e.ttcn | 70 + ..._substitutiongroup_abstract_block_1_e.ttcn | 134 + ..._substitutiongroup_abstract_block_2_e.ttcn | 134 + ...tutiongroup_complex_without_element_e.ttcn | 127 + .../www_example_org_substitutiongroup_e.ttcn | 132 + ...rg_substitutiongroup_long_extension_e.ttcn | 152 + ..._example_org_substitutiongroup_main_e.ttcn | 78 + ...w_example_org_substitutiongroup_ref_e.ttcn | 57 + ...le_org_type_attributegroup_nillable_e.ttcn | 94 + ..._example_org_type_conversion_follow_e.ttcn | 99 + .../www_example_org_unnamed_union_e.ttcn | 69 + ...mple_org_unqualified_element_attrib_e.ttcn | 76 + .../www_example_org_xml_in_annotation_e.ttcn | 63 + .../XmlTest_protocolXSDs/CAI3G/Bulk.xsd | 2 +- .../CAI3G/GenericCai3gType.xsd | 2 +- .../CAI3G/Provisioning.xsd | 2 +- .../XmlTest_protocolXSDs/CCAPI/CCAPI.xsd | 2 +- .../XmlTest_protocolXSDs/HSS/avg.xsd | 2 +- .../HSS/cai3g1.2_provisioning.xsd | 2 +- .../XmlTest_protocolXSDs/HSS/eps.xsd | 2 +- .../XmlTest_protocolXSDs/HSS/hssla_types.xsd | 2 +- .../JMdict/jmdict-good.xsd | 2 +- .../MGW/IntegratedSite.xsd | 2 +- .../MGW/IntegratedSite_HK84933.xsd | 2 +- .../XmlTest_protocolXSDs/MGW/IsTypes.xsd | 2 +- .../XmlTest_protocolXSDs/MGW/MainSwitch.xsd | 2 +- .../XmlTest_protocolXSDs/MGW/Mgw_R9B27.xsd | 2 +- .../XmlTest_protocolXSDs/MGW/Misc.xsd | 2 +- .../XmlTest_protocolXSDs/MGW/XMLSchema.xsd | 2 +- .../XmlTest_protocolXSDs/MGW/confd.xsd | 2 +- .../XmlTest_protocolXSDs/MGW/xml.xsd | 2 +- .../XmlTest_protocolXSDs/PAP/PAP.xsd | 2 +- .../XmlTest_protocolXSDs/PIDF/pidf.xsd | 2 +- .../XmlTest_protocolXSDs/PIDF/rlmi.xsd | 2 +- .../XmlTest_protocolXSDs/PIDF/testschema.xsd | 2 +- .../XmlTest_protocolXSDs/PIDF/xml_PIDF.xsd | 2 +- .../ParlayX/parlayx_common_types_2_0.xsd | 2 +- ..._payment_amount_charging_interface_2_0.xsd | 2 +- ..._reserve_amount_charging_interface_2_0.xsd | 2 +- ..._reserve_volume_charging_interface_2_0.xsd | 2 +- .../ParlayX/parlayx_payment_types_2_0.xsd | 2 +- ..._payment_volume_charging_interface_2_0.xsd | 2 +- .../XmlTest_protocolXSDs/RLP/RLP_SVC.xsd | 2 +- .../RLXML/RLXML_small.xsd | 2 +- .../XmlTest_protocolXSDs/RLXML/rlxml.xml | 2 +- .../XmlTest_protocolXSDs/SIP/SIP.xsd | 2 +- .../ShData/ShDataType.xsd | 2 +- .../XmlTest_protocolXSDs/XML_RPC/XML_RPC.xsd | 2 +- .../XmlTest_xsds/ETSI_CR5852_union.xsd | 2 +- .../XmlTest_xsds/UsefulTtcn3Types.ttcn | 2 +- .../XML/XmlWorkflow/XmlTest_xsds/XSD.ttcn | 2 +- .../XmlTest_xsds/XmlTest_annotation.xsd | 2 +- .../XmlTest_xsds/XmlTest_annotation1.xsd | 2 +- .../XmlTest_xsds/XmlTest_annotation2.xsd | 2 +- .../XmlTest_xsds/XmlTest_boolean.xsd | 2 +- .../XmlTest_boolean_withTypeAndBase.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex1.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex2.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_all.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_any.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_choice.xsd | 2 +- .../XmlTest_complex_extension.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_import_A.xsd | 2 +- .../XmlTest_complex_import_AB.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_import_B.xsd | 2 +- .../XmlTest_complex_import_neg1.xsd | 2 +- .../XmlTest_complex_import_pos.xsd | 2 +- ...Test_complex_import_withSchemaLocation.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_include.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_include1.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_include2.xsd | 4 +- .../XmlTest_complex_minOccursMaxOccurs.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_mixed.xsd | 2 +- .../XmlTest_complex_restriction.xsd | 2 +- .../XmlTest_complex_restriction_neg1.xsd | 2 +- .../XmlTest_complex_restriction_neg2.xsd | 2 +- .../XmlTest_complex_simpleContent.xsd | 2 +- .../XmlTest_xsds/XmlTest_complex_unique.xsd | 16 +- .../XmlTest_xsds/XmlTest_decimal.xsd | 2 +- .../XmlTest_xsds/XmlTest_decimal_withEnum.xsd | 2 +- .../XmlTest_decimal_withLength.xsd | 2 +- .../XmlTest_decimal_withMinMaxExclusive.xsd | 2 +- .../XmlTest_decimal_withMinMaxInclusive.xsd | 2 +- .../XmlTest_xsds/XmlTest_element_abstract.xsd | 2 +- .../XmlTest_xsds/XmlTest_element_anyType.xsd | 2 +- .../XmlTest_element_nameInheritance.xsd | 2 +- .../XmlTest_element_recordOfElements.xsd | 2 +- .../XmlTest_element_recordOfElements3.xsd | 2 +- .../XmlTest_element_recordOfElements4.xsd | 2 +- .../XmlTest_element_recordOfElements5.xsd | 2 +- .../XmlTest_xsds/XmlTest_imsike.xsd | 6 +- .../XmlTest_xsds/XmlTest_integer.xsd | 2 +- .../XmlTest_xsds/XmlTest_integer_empty1.xsd | 2 +- .../XmlTest_xsds/XmlTest_integer_withEnum.xsd | 2 +- .../XmlTest_integer_withLength.xsd | 2 +- .../XmlTest_integer_withMaxExcl.xsd | 2 +- .../XmlTest_integer_withMaxIncl.xsd | 2 +- .../XmlTest_integer_withMinExcl.xsd | 2 +- .../XmlTest_integer_withMinIncl.xsd | 2 +- .../XmlWorkflow/XmlTest_xsds/XmlTest_list.xsd | 2 +- .../XmlTest_xsds/XmlTest_list_integer.xsd | 2 +- .../XmlTest_xsds/XmlTest_simple_enum.xsd | 2 +- .../XmlTest_xsds/XmlTest_string.xsd | 2 +- .../XmlTest_string_withEmptyLength.xsd | 2 +- .../XmlTest_string_withEmptyMax.xsd | 2 +- .../XmlTest_string_withEmptyMin.xsd | 2 +- .../XmlTest_xsds/XmlTest_string_withEnum.xsd | 2 +- .../XmlTest_string_withFaultyMinMax.xsd | 2 +- .../XmlTest_string_withFixedLength.xsd | 2 +- .../XmlTest_string_withFloatLength.xsd | 2 +- .../XmlTest_string_withMinLength.xsd | 2 +- .../XmlTest_string_withNegativeLength.xsd | 2 +- .../XmlTest_string_withNegativeMax.xsd | 2 +- .../XmlTest_string_withNegativeMin.xsd | 2 +- .../XmlTest_string_withOverDefinition.xsd | 2 +- .../XmlTest_string_withPosLength.xsd | 2 +- .../XmlTest_string_withPosMax.xsd | 2 +- .../XmlTest_string_withTypeAndBase.xsd | 2 +- .../XmlTest_string_withWhitespace.xsd | 2 +- .../XmlWorkflow/XmlTest_xsds/XmlTest_time.xsd | 2 +- .../XmlTest_xsds/XmlTest_time_withEnum.xsd | 2 +- .../XmlTest_xsds/XmlTest_union.xsd | 2 +- .../XmlTest_xsds/XmlTest_union2.xsd | 2 +- .../XmlTest_xsds/XmlTest_version.xsd | 2 +- .../XML/XmlWorkflow/XmlTest_xsds/empty.xsd | 2 +- .../XmlTest_xsds/noTargetNamespace.xsd | 2 +- .../XML/XmlWorkflow/XmlTest_xsds/po.xsd | 2 +- regression_test/XML/XmlWorkflow/bin/prj2mk.pl | 2 +- .../XML/XmlWorkflow/bin2/prj2mk.pl | 2 +- .../XML/XmlWorkflow/src/UsefulTtcn3Types.ttcn | 2 +- regression_test/XML/XmlWorkflow/src/XSD.ttcn | 2 +- .../XML/XmlWorkflow/src/XmlTest.cfg | 2 +- .../XmlWorkflow/src/XmlTest_protocolXsds.cfg | 2 +- .../XML/XmlWorkflow/src/xmlTest.prj | 128 +- .../src/xmlTest_Functions_complex.ttcn | 2 +- .../src/xmlTest_Functions_complex1.ttcn | 2 +- .../src/xmlTest_Functions_complex2.ttcn | 2 +- .../src/xmlTest_Functions_element.ttcn | 32 +- .../src/xmlTest_Functions_list.ttcn | 2 +- .../src/xmlTest_Functions_string.ttcn | 2 +- .../XML/XmlWorkflow/src/xmlTest_Shell.ttcn | 3 +- .../XmlWorkflow/src/xmlTest_Testcases.ttcn | 779 ++++- .../XML/XmlWorkflow/src/xmlTest_encDec.ttcn | 2 +- .../src/xmlTest_protocolXsd_Testcases.ttcn | 2 +- .../XmlWorkflow/src/xmlTest_protocolXsds.prj | 2 +- .../XML/XmlWorkflow/xsd/HQ73011.xsd | 2 +- .../XML/XmlWorkflow/xsd/PDUexample.xsd | 2 +- regression_test/XML/XmlWorkflow/xsd/all.xsd | 108 +- .../XML/XmlWorkflow/xsd/any_anyAttribute.xsd | 15 +- .../XmlWorkflow/xsd/anyattr_in_complex.xsd | 21 + .../XML/XmlWorkflow/xsd/anyattrib_single.xsd | 77 + .../XmlWorkflow/xsd/anyattribute_optional.xsd | 33 + .../XML/XmlWorkflow/xsd/attrib_enum.xsd | 18 + .../XML/XmlWorkflow/xsd/attrib_order_a.xsd | 40 + .../XML/XmlWorkflow/xsd/attrib_order_b.xsd | 20 + .../XML/XmlWorkflow/xsd/attrib_order_c.xsd | 9 + .../xsd/attrib_restriction_extension.xsd | 137 + .../XmlWorkflow/xsd/attribgroup_ingroup.xsd | 23 + .../XML/XmlWorkflow/xsd/attributeGroup.xsd | 2 +- .../xsd/attribute_in_extension.xsd | 26 + .../XML/XmlWorkflow/xsd/attribute_use.xsd | 2 +- .../XmlWorkflow/xsd/attribute_use_noTNS.xsd | 2 +- .../xsd/attributegroup_nillable.xsd | 33 + .../xsd/boolean_variant_commented.xsd | 55 + .../XML/XmlWorkflow/xsd/comment_placement.xsd | 93 + .../XML/XmlWorkflow/xsd/complexTypes.xsd | 2 +- .../XML/XmlWorkflow/xsd/complex_nillable.xsd | 65 + .../xsd/complex_restriction_with_use.xsd | 71 + .../xsd/complex_self_recursion.xsd | 26 + .../xsd/decimal_fractiondigits.xsd | 33 + .../dont_generate_element_substitution.xsd | 41 + .../XmlWorkflow/xsd/element_in_all_minmax.xsd | 19 + .../XmlWorkflow/xsd/element_in_all_mixed.xsd | 23 + .../XML/XmlWorkflow/xsd/elements.xsd | 2 +- .../XML/XmlWorkflow/xsd/enum_field_names.xsd | 11 + .../xsd/enumeration_remove_dup.xsd | 79 + .../xsd/enumeration_restriction.xsd | 128 + .../xsd/enumeration_restriction2.xsd | 51 + .../xsd/extending_complex_types.xsd | 2 +- .../XML/XmlWorkflow/xsd/fixed_value.xsd | 23 + .../xsd/generate_element_substitution.xsd | 41 + .../XML/XmlWorkflow/xsd/group_all.xsd | 2 +- .../XML/XmlWorkflow/xsd/groups.xsd | 2 +- .../XML/XmlWorkflow/xsd/id_attrib.xsd | 10 + .../XmlWorkflow/xsd/import_prefix_name.xsd | 22 + .../XML/XmlWorkflow/xsd/imported2.xsd | 21 + .../XML/XmlWorkflow/xsd/imported_module.xsd | 7 + .../XML/XmlWorkflow/xsd/imported_module_.xsd | 6 + .../XmlWorkflow/xsd/imported_prefix_name.xsd | 27 + .../XML/XmlWorkflow/xsd/include1dir1a.xsd | 2 +- .../XML/XmlWorkflow/xsd/include1dir1b.xsd | 2 +- .../XML/XmlWorkflow/xsd/include1dir2a.xsd | 2 +- .../XML/XmlWorkflow/xsd/include1dir2b.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular1a.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular1b.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular2a.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular2b.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular3a.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular3b.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular4a.xsd | 2 +- .../XML/XmlWorkflow/xsd/includeCircular4b.xsd | 2 +- regression_test/XML/XmlWorkflow/xsd/list.xsd | 2 +- .../XML/XmlWorkflow/xsd/list_invalid.xsd | 2 +- .../XML/XmlWorkflow/xsd/list_simpletype.xsd | 90 + .../XML/XmlWorkflow/xsd/long_extension.xsd | 76 + .../XML/XmlWorkflow/xsd/minBound_maxBound.xsd | 2 +- .../XmlWorkflow/xsd/minOccurs_maxOccurs.xsd | 2 +- .../xsd/module_typename_conversion.xsd | 19 + .../xsd/module_typename_conversion_1.xsd | 18 + .../xsd/name_clash_element-attribute.xsd | 2 +- ...ame_clash_element-attribute_noNsPrefix.xsd | 2 +- .../xsd/name_conv_non_alphanumeric.xsd | 5 + .../xsd/name_conv_remove_seq_of_low_line.xsd | 5 + .../XML/XmlWorkflow/xsd/name_conv_with_z.xsd | 5 + .../xsd/name_conversion_extension_attrib.xsd | 34 + .../XML/XmlWorkflow/xsd/namespaceas.xsd | 61 + .../XmlWorkflow/xsd/nillable_annotations.xsd | 28 + .../XML/XmlWorkflow/xsd/nillable_fixed.xsd | 31 + .../xsd/nillable_in_nillable_extension.xsd | 36 + .../XML/XmlWorkflow/xsd/no_ns_connector.xsd | 14 + .../xsd/not_a_number_minex_inf_maxex_-inf.xsd | 65 + .../xsd/qualified_element_attrib.xsd | 29 + .../XML/XmlWorkflow/xsd/ranges_float.xsd | 2 +- .../XML/XmlWorkflow/xsd/ranges_integer.xsd | 2 +- .../XmlWorkflow/xsd/regex_square_brackets.xsd | 24 + .../xsd/restricting_complex_types.xsd | 2 +- .../XML/XmlWorkflow/xsd/schema.xsd | 2 +- .../XmlWorkflow/xsd/seq_group_reference.xsd | 31 + .../xsd/sequence_embeds_sequence.xsd | 28 + .../XML/XmlWorkflow/xsd/simpletype_base.xsd | 15 + .../XML/XmlWorkflow/xsd/simpletype_ref.xsd | 65 + .../xsd/simpletype_restrict_comp.xsd | 50 + .../XML/XmlWorkflow/xsd/substitutiongroup.xsd | 44 + .../substitutiongroup_abstract_block_1.xsd | 44 + .../substitutiongroup_abstract_block_2.xsd | 44 + ...stitutiongroup_complex_without_element.xsd | 54 + .../xsd/substitutiongroup_long_extension.xsd | 66 + .../xsd/substitutiongroup_main.xsd | 17 + .../XmlWorkflow/xsd/substitutiongroup_neg.xsd | 29 + .../XmlWorkflow/xsd/substitutiongroup_ref.xsd | 12 + .../xsd/type_conversion_follow.xsd | 41 + regression_test/XML/XmlWorkflow/xsd/union.xsd | 2 +- .../xsd/unqualified_element_attrib.xsd | 29 + .../XML/XmlWorkflow/xsd/xml_in_annotation.xsd | 22 + regression_test/XML/macros.ttcnin | 2 +- regression_test/XML/tpdValidTest/Makefile | 2 +- .../tpdTest/Abstract_Socket_CNL113384.tpd | 85 + .../tpdTest/AoC_v1.1.2_CNL113653.tpd | 43 + .../tpdValidTest/tpdTest/BFCP_CNL113751.tpd | 63 + .../tpdTest/BICC_ANSI_CNL113397.tpd | 62 + .../tpdTest/BICC_Q.1902.1_CNL113359.tpd | 62 + .../tpdTest/BICC_TTC_CNL113416.tpd | 62 + .../tpdTest/BSSGP_v10.6.0_CNL113750.tpd | 57 + .../tpdTest/BSSGP_v9.4.0_CNL113720.tpd | 57 + .../tpdTest/BSSMAP_v11.2.0_CNL113761.tpd | 59 + .../tpdTest/BSSMAP_v8.6.0_CNL113655.tpd | 59 + .../tpdTest/CAP_v2_v6.4.0_CNL113483.tpd | 70 + .../tpdTest/CAP_v4.7.0_CNL113425.tpd | 101 + .../tpdTest/CAP_v4_v7.2.0_CNL113572.tpd | 110 + .../tpdTest/CAP_v4_v7.6.0_CNL113721.tpd | 116 + .../tpdTest/CCAPI_MINSAT_60_CNL113601.tpd | 439 +++ .../tpdTest/CDR_v9.12.0_CNL113757.tpd | 70 + .../tpdTest/CDR_v9.5.0_CNL113712.tpd | 71 + .../tpdTest/CDR_v9.5.0_SGSN_CNL113728.tpd | 70 + .../tpdTest/CIP_CS4.0_CNL113535.tpd | 64 + .../tpdTest/CIP_Orga_Italy_CNL113701.tpd | 65 + .../tpdValidTest/tpdTest/DHCP_CNL113461.tpd | 61 + .../tpdValidTest/tpdTest/DHCPv6_CNL113763.tpd | 47 + .../tpdValidTest/tpdTest/DNS_CNL113429.tpd | 42 + .../tpdTest/DSS1_ETSI_CNL113435.tpd | 77 + .../tpdValidTest/tpdTest/EAP_CNL113722.tpd | 68 + .../tpdTest/ECMS_CORBAmsg_CNL113687.tpd | 100 + .../tpdTest/EPTF_Applib_BICC_CNL113711.tpd | 61 + .../tpdTest/EPTF_Applib_BSSMAP_CNL113608.tpd | 53 + .../tpdTest/EPTF_Applib_CAI3G_CNL113566.tpd | 63 + .../tpdTest/EPTF_Applib_CAP_CNL113662.tpd | 54 + .../EPTF_Applib_CAP_Common_CNL113662.tpd | 53 + .../tpdTest/EPTF_Applib_CAP_v2_CNL113662.tpd | 45 + .../tpdTest/EPTF_Applib_CAP_v3_CNL113662.tpd | 46 + .../tpdTest/EPTF_Applib_CAP_v4_CNL113662.tpd | 45 + .../EPTF_Applib_CAP_v4_v760_CNL113662.tpd | 45 + .../tpdTest/EPTF_Applib_CIP_All_CNL113666.tpd | 41 + .../tpdTest/EPTF_Applib_CIP_CNL113666.tpd | 51 + .../EPTF_Applib_CIP_Orga_CNL113666.tpd | 45 + .../tpdTest/EPTF_Applib_DNS_CNL113597.tpd | 118 + .../tpdTest/EPTF_Applib_DSS1_CNL113748.tpd | 63 + .../EPTF_Applib_Diameter_CNL113521.tpd | 93 + .../EPTF_Applib_EricssonRTC_CNL113683.tpd | 53 + .../tpdTest/EPTF_Applib_H248_CNL113523.tpd | 95 + .../tpdTest/EPTF_Applib_HTTP_CNL113618.tpd | 108 + .../tpdTest/EPTF_Applib_INAP_CNL113596.tpd | 52 + .../tpdTest/EPTF_Applib_ISUP_CNL113681.tpd | 63 + .../tpdTest/EPTF_Applib_IUA_CNL113747.tpd | 67 + .../tpdTest/EPTF_Applib_LANL2_CNL113698.tpd | 101 + .../tpdTest/EPTF_Applib_LNP_CNL113714.tpd | 61 + .../tpdTest/EPTF_Applib_MAP_CNL113595.tpd | 57 + .../tpdTest/EPTF_Applib_MLSim_CNL113568.tpd | 54 + .../tpdTest/EPTF_Applib_MSRP_CNL113564.tpd | 57 + .../EPTF_Applib_MobileL3_CNL113609.tpd | 49 + .../tpdTest/EPTF_Applib_RANAP_CNL113647.tpd | 49 + .../tpdTest/EPTF_Applib_SDP_CNL113744.tpd | 94 + .../tpdTest/EPTF_Applib_SGsAP_CNL113723.tpd | 135 + .../tpdTest/EPTF_Applib_SIP_CNL113522.tpd | 87 + .../tpdTest/EPTF_Applib_SOAP_CNL113620.tpd | 98 + .../tpdTest/EPTF_Applib_SRVCC_CNL113741.tpd | 81 + .../tpdTest/EPTF_Applib_STUN_CNL113645.tpd | 119 + .../EPTF_Applib_UPloadCP_CNL113634.tpd | 61 + .../EPTF_Applib_UserPlane_CNL113724.tpd | 60 + .../tpdTest/EPTF_Applib_VXML_CNL113565.tpd | 121 + .../tpdTest/EPTF_Applib_XCAP_CNL113534.tpd | 146 + .../tpdValidTest/tpdTest/EPTF_CLL_Base.tpd | 35 + .../tpdValidTest/tpdTest/EPTF_CLL_Buffer.tpd | 35 + .../XML/tpdValidTest/tpdTest/EPTF_CLL_CLI.tpd | 39 + .../tpdTest/EPTF_CLL_CentralScheduling.tpd | 43 + .../EPTF_CLL_CentralSchedulingUIHandler.tpd | 39 + .../tpdValidTest/tpdTest/EPTF_CLL_Common.tpd | 57 + .../tpdTest/EPTF_CLL_DataSource.tpd | 41 + .../tpdTest/EPTF_CLL_ExecCtrl.tpd | 56 + .../tpdTest/EPTF_CLL_ExecCtrl_UI.tpd | 47 + .../XML/tpdValidTest/tpdTest/EPTF_CLL_FBQ.tpd | 35 + .../tpdTest/EPTF_CLL_GUIViewer.tpd | 47 + .../tpdValidTest/tpdTest/EPTF_CLL_HashMap.tpd | 43 + .../tpdTest/EPTF_CLL_HostAdmin.tpd | 46 + .../tpdTest/EPTF_CLL_HostAdmin_UI.tpd | 41 + .../tpdValidTest/tpdTest/EPTF_CLL_ILog.tpd | 39 + .../tpdTest/EPTF_CLL_ILogBase.tpd | 38 + .../tpdTest/EPTF_CLL_ILogString.tpd | 35 + .../tpdTest/EPTF_CLL_LGenBase.tpd | 82 + .../tpdTest/EPTF_CLL_LGenBase_UI.tpd | 35 + .../tpdTest/EPTF_CLL_LoadRegulator.tpd | 38 + .../tpdTest/EPTF_CLL_LoadRegulatorUI.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_CLL_Logging.tpd | 35 + .../tpdTest/EPTF_CLL_Logging_Client.tpd | 35 + .../tpdTest/EPTF_CLL_Logging_Server.tpd | 39 + .../tpdTest/EPTF_CLL_Logging_UI.tpd | 42 + .../tpdValidTest/tpdTest/EPTF_CLL_NQueue.tpd | 36 + .../tpdTest/EPTF_CLL_NameService.tpd | 37 + .../tpdTest/EPTF_CLL_PTCDeployment.tpd | 37 + .../tpdTest/EPTF_CLL_RandomNArray.tpd | 34 + .../tpdTest/EPTF_CLL_RedBlackTree.tpd | 43 + .../tpdTest/EPTF_CLL_Rendezvous.tpd | 40 + .../tpdTest/EPTF_CLL_RingBuffer.tpd | 34 + .../tpdTest/EPTF_CLL_Scheduler.tpd | 38 + .../tpdTest/EPTF_CLL_Semaphore.tpd | 36 + .../tpdTest/EPTF_CLL_StatCapture.tpd | 42 + .../tpdTest/EPTF_CLL_StatCaptureControl.tpd | 37 + .../tpdTest/EPTF_CLL_StatCaptureUI.tpd | 40 + .../tpdTest/EPTF_CLL_StatHandler.tpd | 46 + .../tpdTest/EPTF_CLL_StatHandler_UI.tpd | 41 + .../tpdTest/EPTF_CLL_StatManager.tpd | 40 + .../tpdTest/EPTF_CLL_StatMeasure.tpd | 39 + .../tpdTest/EPTF_CLL_StatReplay.tpd | 42 + .../tpdTest/EPTF_CLL_TimeProfileEditor.tpd | 40 + .../tpdTest/EPTF_CLL_Transport.tpd | 37 + .../tpdTest/EPTF_CLL_TransportRouting.tpd | 34 + .../EPTF_CLL_Transport_CommPortIPL4.tpd | 36 + .../tpdTest/EPTF_CLL_Transport_Common.tpd | 34 + .../tpdTest/EPTF_CLL_Transport_IPL2.tpd | 52 + .../tpdTest/EPTF_CLL_Transport_IPL4.tpd | 43 + ...PTF_CLL_Transport_MessageBufferManager.tpd | 37 + .../tpdTest/EPTF_CLL_UIHandler.tpd | 103 + .../tpdTest/EPTF_CLL_Variable.tpd | 41 + .../tpdTest/EPTF_CLL_Variable_UI.tpd | 39 + .../EPTF_CommonTransport_M3_CNL113682.tpd | 95 + .../EPTF_CommonTransport_SCCP_CNL113610.tpd | 58 + .../EPTF_CommonTransport_TCAP_CNL113592.tpd | 66 + .../tpdTest/EPTF_FreeBusyQueue_demo.tpd | 42 + .../XML/tpdValidTest/tpdTest/EPTF_GenApp.tpd | 72 + .../tpdValidTest/tpdTest/EPTF_GenApp_AC.tpd | 33 + .../tpdValidTest/tpdTest/EPTF_GenApp_AIR.tpd | 35 + .../tpdValidTest/tpdTest/EPTF_GenApp_ASDP.tpd | 39 + .../tpdTest/EPTF_GenApp_ATandT.tpd | 76 + .../tpdTest/EPTF_GenApp_BCS_AC.tpd | 52 + .../tpdTest/EPTF_GenApp_BCS_SSP.tpd | 42 + .../tpdTest/EPTF_GenApp_BCS_WCE.tpd | 97 + .../tpdTest/EPTF_GenApp_CAI3G.tpd | 34 + .../tpdTest/EPTF_GenApp_CAPv2.tpd | 38 + .../tpdTest/EPTF_GenApp_CAPv3.tpd | 38 + .../tpdTest/EPTF_GenApp_CAPv4.tpd | 39 + .../tpdValidTest/tpdTest/EPTF_GenApp_CCMP.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_GenApp_CIP.tpd | 36 + .../tpdTest/EPTF_GenApp_CIP_Orga.tpd | 36 + .../tpdValidTest/tpdTest/EPTF_GenApp_CLF.tpd | 45 + .../tpdTest/EPTF_GenApp_CLFv2.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_GenApp_CNS.tpd | 41 + .../tpdValidTest/tpdTest/EPTF_GenApp_CSCF.tpd | 45 + .../tpdTest/EPTF_GenApp_CSCFclient.tpd | 48 + .../tpdTest/EPTF_GenApp_Common.tpd | 92 + .../tpdTest/EPTF_GenApp_DIAMETER.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_GenApp_DNS.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_GenApp_DSC.tpd | 42 + .../tpdValidTest/tpdTest/EPTF_GenApp_EDB.tpd | 79 + .../tpdTest/EPTF_GenApp_EDB_CLI.tpd | 82 + .../tpdValidTest/tpdTest/EPTF_GenApp_EPC.tpd | 46 + .../tpdValidTest/tpdTest/EPTF_GenApp_ETM.tpd | 408 +++ .../tpdTest/EPTF_GenApp_ETM_CAPv2.tpd | 58 + .../tpdTest/EPTF_GenApp_ETM_CAPv3.tpd | 67 + .../tpdTest/EPTF_GenApp_ETM_CAPv4.tpd | 67 + .../tpdTest/EPTF_GenApp_ETM_CAPv4_v760.tpd | 67 + .../tpdTest/EPTF_GenApp_ETM_CCA.tpd | 55 + .../tpdTest/EPTF_GenApp_ETM_CSCF.tpd | 44 + .../tpdTest/EPTF_GenApp_ETM_DCC.tpd | 47 + .../tpdTest/EPTF_GenApp_ETM_ECC.tpd | 49 + .../tpdTest/EPTF_GenApp_ETM_HomeZone.tpd | 47 + .../tpdTest/EPTF_GenApp_ETM_LTE_INAP.tpd | 55 + .../tpdTest/EPTF_GenApp_ETM_MCC.tpd | 57 + .../tpdTest/EPTF_GenApp_ETM_NP.tpd | 45 + .../tpdTest/EPTF_GenApp_ETM_NP21.tpd | 51 + .../tpdTest/EPTF_GenApp_ETM_SNA.tpd | 41 + .../tpdTest/EPTF_GenApp_ETM_SNA2.tpd | 48 + .../tpdValidTest/tpdTest/EPTF_GenApp_H248.tpd | 41 + .../tpdValidTest/tpdTest/EPTF_GenApp_HLR.tpd | 45 + .../tpdTest/EPTF_GenApp_HLRsim.tpd | 43 + .../tpdValidTest/tpdTest/EPTF_GenApp_HTTP.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_GenApp_INAP.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_GenApp_ISUP.tpd | 36 + .../tpdValidTest/tpdTest/EPTF_GenApp_LDAP.tpd | 73 + .../tpdValidTest/tpdTest/EPTF_GenApp_LNP.tpd | 37 + .../tpdValidTest/tpdTest/EPTF_GenApp_LRF.tpd | 39 + .../tpdValidTest/tpdTest/EPTF_GenApp_LTE.tpd | 56 + .../tpdTest/EPTF_GenApp_MABEZ.tpd | 45 + .../tpdValidTest/tpdTest/EPTF_GenApp_MAP.tpd | 35 + .../tpdValidTest/tpdTest/EPTF_GenApp_MGW.tpd | 45 + .../tpdTest/EPTF_GenApp_MMESim.tpd | 43 + .../tpdTest/EPTF_GenApp_MMsim.tpd | 42 + .../tpdValidTest/tpdTest/EPTF_GenApp_MRFC.tpd | 44 + .../tpdValidTest/tpdTest/EPTF_GenApp_MSS.tpd | 49 + .../tpdValidTest/tpdTest/EPTF_GenApp_MTAS.tpd | 84 + .../tpdTest/EPTF_GenApp_MTAS_noSS7.tpd | 79 + .../tpdValidTest/tpdTest/EPTF_GenApp_MWI.tpd | 45 + .../tpdTest/EPTF_GenApp_MWIAS.tpd | 45 + .../tpdValidTest/tpdTest/EPTF_GenApp_Meta.tpd | 74 + .../tpdValidTest/tpdTest/EPTF_GenApp_NACF.tpd | 40 + .../tpdValidTest/tpdTest/EPTF_GenApp_NASS.tpd | 53 + .../tpdTest/EPTF_GenApp_Netconf.tpd | 39 + .../tpdValidTest/tpdTest/EPTF_GenApp_OCF.tpd | 45 + .../tpdTest/EPTF_GenApp_PCRFsim.tpd | 44 + .../tpdValidTest/tpdTest/EPTF_GenApp_PGM.tpd | 373 +++ .../tpdTest/EPTF_GenApp_PGM_HTTP.tpd | 36 + .../tpdTest/EPTF_GenApp_PGM_SIP.tpd | 37 + .../tpdTest/EPTF_GenApp_ParlayX.tpd | 36 + .../tpdValidTest/tpdTest/EPTF_GenApp_RACF.tpd | 40 + .../tpdValidTest/tpdTest/EPTF_GenApp_SCP.tpd | 37 + .../tpdValidTest/tpdTest/EPTF_GenApp_SIP.tpd | 34 + .../tpdValidTest/tpdTest/EPTF_GenApp_SNA.tpd | 37 + .../tpdValidTest/tpdTest/EPTF_GenApp_SOAP.tpd | 36 + .../tpdValidTest/tpdTest/EPTF_GenApp_UAAF.tpd | 38 + .../tpdValidTest/tpdTest/EPTF_GenApp_USSD.tpd | 35 + .../tpdTest/EPTF_GenApp_UserPlane.tpd | 42 + .../tpdValidTest/tpdTest/EPTF_GenApp_VMS.tpd | 44 + .../tpdValidTest/tpdTest/EPTF_GenApp_VXML.tpd | 36 + .../tpdTest/EPTF_GenApp_WCE_HTTP_Client.tpd | 36 + .../tpdValidTest/tpdTest/EPTF_GenApp_XCAP.tpd | 37 + .../tpdValidTest/tpdTest/EPTF_ILog_demo.tpd | 45 + .../tpdTest/EricssonRTC_CNL113414.tpd | 67 + .../Ericsson_INAP_CS1plus_CNL113356.tpd | 66 + .../tpdTest/Ericsson_MAP_v2_CNL113725.tpd | 51 + .../tpdTest/GCP_31r1_CNL113364.tpd | 69 + .../tpdTest/GTP_v9.11.0_CNL113765.tpd | 70 + .../tpdTest/GTPv2_Sv_v10.5.0_CNL113740.tpd | 50 + .../tpdTest/GTPv2_Sv_v11.4.0_CNL113777.tpd | 73 + .../tpdTest/GTPv2_Sv_v9.1.0_CNL113703.tpd | 64 + .../tpdTest/GTPv2_Sv_v9.7.0_CNL113730.tpd | 62 + .../tpdTest/GTPv2_Sv_v9.8.0_CNL113737.tpd | 62 + .../tpdTest/GTPv2_v11.x.0_CNL113753.tpd | 60 + .../tpdTest/GiGnREPLAYasp_CNL113604.tpd | 69 + .../tpdTest/H225.0_v0298_CNL113354.tpd | 193 ++ .../tpdTest/H245_v6_CNL113587.tpd | 185 ++ .../tpdTest/H248_v2_CNL113424.tpd | 75 + .../tpdTest/HTTPmsg_CNL113312.tpd | 64 + .../tpdValidTest/tpdTest/IMSA2_CNL113693.tpd | 59 + .../tpdTest/IOS_HRPD_CLN113752.tpd | 47 + .../tpdValidTest/tpdTest/IPL4_EIN_SCTP.tpd | 254 ++ .../tpdTest/IPL4asp_CNL113531.tpd | 147 + .../tpdTest/IPL4asp_CNL113531_Interface.tpd | 51 + .../XML/tpdValidTest/tpdTest/IP_CNL113418.tpd | 64 + .../tpdTest/IP_Daemon_Dynamic_CNL113739.tpd | 82 + .../IP_Daemon_Dynamic_CNL113739_demo.tpd | 39 + .../tpdTest/ISUP_ANSI_CNL113411.tpd | 62 + .../tpdTest/ISUP_Q.762_CNL113365.tpd | 62 + .../tpdTest/ISUP_Q.762_TCOM_CNL113762.tpd | 52 + .../tpdTest/ISUP_for_Japan_CNL113727.tpd | 62 + .../tpdValidTest/tpdTest/IUA_CNL113439.tpd | 47 + .../tpdTest/JSON_v07_2006_CNL113676.tpd | 47 + .../XML/tpdValidTest/tpdTest/JUnit.tpd | 33 + .../tpdTest/LANL2asp_CNL113519.tpd | 70 + .../LDAPasp_RFC4511_CNL113513_Functions.tpd | 56 + .../LDAPasp_RFC4511_CNL113513_TestPort.tpd | 62 + .../tpdTest/LNP_ANSI_CNL113715.tpd | 67 + .../tpdTest/LOADMEASasp_CNL113585.tpd | 75 + .../tpdValidTest/tpdTest/M2PA_CNL113558.tpd | 47 + .../tpdTest/M3AP_v9.4.0_CNL113735.tpd | 320 ++ .../tpdTest/M3UA_SCTP_Daemon_CNL113487.tpd | 55 + .../tpdTest/MAP_ANSI_v2.0_CNL113673.tpd | 61 + .../tpdTest/MAP_ANSI_v2.0_CNL113673_demo.tpd | 62 + .../tpdTest/MAP_Current_CNL113745_1.tpd | 182 ++ .../tpdTest/MAP_Current_CNL113745_1_HLR.tpd | 194 ++ .../tpdTest/MAP_Current_CNL113745_1_v123.tpd | 56 + .../MAP_Current_CNL113745_1_v123_HLR.tpd | 49 + .../tpdTest/MAP_v10.4.0_CNL113736.tpd | 86 + .../tpdTest/MAP_v10.6.0_CNL113764.tpd | 74 + .../tpdValidTest/tpdTest/MAP_v1_CNL113431.tpd | 57 + .../tpdValidTest/tpdTest/MAP_v2_CNL113432.tpd | 57 + .../tpdTest/MAP_v6.11.0_CNL113500.tpd | 96 + .../tpdTest/MAP_v6.3.0_CNL113366.tpd | 88 + .../tpdTest/MAP_v7.12.0_CNL113635.tpd | 192 ++ .../tpdTest/MAP_v7.12.0_CNL113635_v123.tpd | 55 + .../tpdTest/MAP_v7.8.0_CNL113569.tpd | 85 + .../tpdTest/MAP_v9.3.0_CNL113710.tpd | 85 + .../tpdValidTest/tpdTest/MIME_CNL113352.tpd | 46 + .../tpdTest/MLSIMPLUSasp_CNL113749.tpd | 56 + .../tpdTest/MLSIMasp_CNL113538.tpd | 121 + .../tpdValidTest/tpdTest/MMLasp_CNL113490.tpd | 95 + .../tpdValidTest/tpdTest/MSRP_CNL113467.tpd | 84 + .../tpdTest/MTP3asp_CNL113337.tpd | 89 + .../tpdTest/MTP3asp_EIN_CNL113421.tpd | 78 + .../tpdTest/MobileL3_v10.5.0_CNL113758.tpd | 73 + .../tpdTest/MobileL3_v9.5.0_CNL113719.tpd | 72 + .../tpdTest/NAS_EPS_v10.6.1_CNL113746.tpd | 59 + .../tpdTest/NAS_EPS_v9.7.0_CNL113729.tpd | 58 + .../tpdValidTest/tpdTest/PIM_CNL113733.tpd | 60 + .../tpdTest/PIPEasp_CNL113334.tpd | 70 + .../tpdTest/PMIP_v10.5.0_CNL113759.tpd | 60 + .../tpdTest/PMIP_v8.5.0_CNL113704.tpd | 59 + .../tpdTest/ParlayX_CNL113540.tpd | 264 ++ .../tpdTest/ProtocolModules_Common.tpd | 36 + .../tpdTest/RANAP_v10.4.0_CNL113742.tpd | 302 ++ .../tpdTest/RANAP_v9.5.0_CNL113718.tpd | 226 ++ ...RANAP_v9.5.0_CNL113718_demo_RNC_to_RNC.tpd | 174 ++ .../tpdValidTest/tpdTest/ROSE_CNL113369.tpd | 52 + .../tpdValidTest/tpdTest/RTP_CNL113392.tpd | 50 + .../tpdValidTest/tpdTest/RTSP_CNL113588.tpd | 57 + .../tpdTest/S1AP_v10.6.0_CNL113756.tpd | 211 ++ .../tpdTest/S1AP_v8.7.0_CNL113672.tpd | 321 ++ .../tpdTest/S1AP_v9.4.0_CNL113717.tpd | 246 ++ .../tpdTest/S1AP_v9.7.0_CNL113732.tpd | 222 ++ .../tpdTest/SBC_AP_v10.0.0_CNL113734.tpd | 238 ++ .../tpdTest/SBC_AP_v9.3.0_CNL113731.tpd | 238 ++ .../tpdValidTest/tpdTest/SCCP_CNL113341.tpd | 87 + .../tpdTest/SCCPasp_CNL113348.tpd | 148 + .../tpdTest/SCTP_Daemon_CNL113477.tpd | 62 + .../tpdTest/SCTP_Daemon_Dynamic_CNL113630.tpd | 65 + .../tpdTest/SCTPasp_CNL113469.tpd | 98 + .../tpdValidTest/tpdTest/SDP_CNL113353.tpd | 81 + .../tpdTest/SGsAP_v9.0.0_CNL113684.tpd | 59 + .../tpdValidTest/tpdTest/SIPmsg_CNL113319.tpd | 85 + .../tpdValidTest/tpdTest/SNMP_CNL113774.tpd | 71 + .../tpdTest/SNMPmsg_CNL113344.tpd | 63 + .../tpdValidTest/tpdTest/SQLasp_CNL113760.tpd | 53 + .../tpdValidTest/tpdTest/SRTP_CNL113769.tpd | 53 + .../tpdTest/SS7Common_CNL113755.tpd | 66 + .../tpdTest/SSHCLIENTasp_CNL113484.tpd | 61 + .../tpdTest/STDINOUTmsg_CNL113642.tpd | 50 + .../tpdValidTest/tpdTest/STUN_CNL113644.tpd | 46 + .../tpdValidTest/tpdTest/SUA_CNL113478.tpd | 60 + .../tpdTest/SUA_Daemon_CNL113743.tpd | 63 + .../tpdValidTest/tpdTest/SUAasp_CNL113516.tpd | 67 + .../tpdTest/SUNRPCasp_CNL113493.tpd | 47 + .../tpdTest/Socket_API_CNL113686.tpd | 58 + ...scriptionHistoryProtocol_1.0_CNL113584.tpd | 460 +++ .../tpdValidTest/tpdTest/TCAP_CNL113342.tpd | 61 + .../tpdTest/TCAPasp_CNL113349.tpd | 99 + .../TCCUsefulFunctions_CNL113472_Common.tpd | 62 + .../TCCUsefulFunctions_CNL113472_IPsec.tpd | 93 + ...TCCUsefulFunctions_CNL113472_Interface.tpd | 46 + .../TCCUsefulFunctions_CNL113472_Maths.tpd | 48 + .../TCCUsefulFunctions_CNL113472_Regexp.tpd | 48 + .../TCCUsefulFunctions_CNL113472_Security.tpd | 53 + .../TCCUsefulFunctions_CNL113472_TitanSim.tpd | 51 + .../TCCUsefulFunctions_CNL113472_XPath.tpd | 56 + .../tpdValidTest/tpdTest/TCP_CNL113675.tpd | 44 + .../tpdValidTest/tpdTest/TCPasp_CNL113347.tpd | 59 + .../tpdTest/TELNET_Daemon_CNL113667.tpd | 61 + .../tpdTest/TELNETasp_CNL113320.tpd | 65 + .../tpdTest/Tariffing_v8.0.0_CNL113654.tpd | 45 + .../tpdTest/TitanSim_evolution_files.tpd | 124 + .../tpdTest/Trigger_HSS4.2_CNL113583.tpd | 518 +++ .../tpdValidTest/tpdTest/UDP_CNL113420.tpd | 58 + .../tpdValidTest/tpdTest/UDPasp_CNL113346.tpd | 57 + .../tpdTest/UPloadCP_CNL113633.tpd | 64 + .../tpdTest/XML_RPC_CNL113488.tpd | 388 +++ .../tpdValidTest/tpdTest/XSDASN_CNL113474.tpd | 144 + .../tpdValidTest/tpdTest/XTDP_CNL113663.tpd | 43 + .../tpdTest/XTDPasp_CNL113494.tpd | 64 + .../XML/tpdValidTest/tpdValidTest.sh | 4 +- .../XML/xsdConverter/Examples/Example1.xsd | 2 +- .../XML/xsdConverter/Examples/Example2.xsd | 2 +- .../XML/xsdConverter/Examples/Example3.xsd | 2 +- .../XML/xsdConverter/Examples/Example4.xsd | 2 +- .../XML/xsdConverter/Examples/Examples.ttcn | 2 +- .../XML/xsdConverter/Examples/Makefile | 2 +- .../xsdConverter/Examples/chapter_5_1_1.xsd | 2 +- .../xsdConverter/Examples/chapter_5_1_2.xsd | 2 +- .../xsdConverter/Examples/chapter_5_1_3.xsd | 2 +- .../xsdConverter/Examples/chapter_5_1_4.xsd | 2 +- .../xsdConverter/Examples/chapter_5_1_5.xsd | 2 +- .../xsdConverter/Examples/chapter_5_1_6.xsd | 2 +- .../xsdConverter/Examples/chapter_5_2_1.xsd | 2 +- .../xsdConverter/Examples/chapter_5_2_2.xsd | 2 +- .../xsdConverter/Examples/chapter_5_2_3.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_6.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_1.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_3.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_4.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_5.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_6.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_7.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_8.xsd | 2 +- .../XML/xsdConverter/Examples/chapter_7_9.xsd | 2 +- .../XML/xsdConverter/Examples/config.cfg | 2 +- .../XML/xsdConverter/HN21072/HN21072Test.ttcn | 2 +- .../XML/xsdConverter/HN21072/Makefile | 2 +- .../XML/xsdConverter/HN21072/W3-WSDL-chop.xsd | 2 +- .../XML/xsdConverter/HN21072/log2xml.pl | 2 +- .../XML/xsdConverter/HN65402/Makefile | 2 +- .../XML/xsdConverter/HN65402/jellystone.ttcn | 2 +- .../XML/xsdConverter/HN65402/jellystone.xsd | 2 +- .../XML/xsdConverter/HO12250/HO12250.xsd | 2 +- .../XML/xsdConverter/HO12250/Makefile | 2 +- .../XML/xsdConverter/HO16426/Makefile | 2 +- .../XML/xsdConverter/HO16426/diversion.ttcn | 2 +- .../XML/xsdConverter/HO16426/diversion.xsd | 2 +- .../XML/xsdConverter/HO18151/HO18151.ttcn | 2 +- .../XML/xsdConverter/HO18151/HO18151.xsd | 2 +- .../XML/xsdConverter/HO18151/Makefile | 2 +- .../XML/xsdConverter/HO21968/HO21968.ttcn | 2 +- .../xsdConverter/HO21968/HO21968noprefix.xsd | 2 +- .../xsdConverter/HO21968/HO21968prefix.xsd | 2 +- .../XML/xsdConverter/HO21968/Makefile | 2 +- .../XML/xsdConverter/HQ48576/HQ48576Test.ttcn | 2 +- .../XML/xsdConverter/HQ48576/Makefile | 2 +- .../XML/xsdConverter/HQ48576/hlrla_types.xsd | 2 +- regression_test/XML/xsdConverter/Makefile | 2 +- .../XML/xsdConverter/Makefile.converter | 2 +- .../acceptance_test/Fibonacci/Fibonacci.cfg | 2 +- .../acceptance_test/Fibonacci/Fibonacci.ttcn | 2 +- .../acceptance_test/Fibonacci/Makefile | 2 +- .../acceptance_test/chinese/Makefile | 2 +- .../acceptance_test/chinese/chinese.ttcn | 2 +- .../acceptance_test/comptest/Makefile | 2 +- .../acceptance_test/comptest/comptest.ttcn | 2 +- .../acceptance_test/testerlanc/Makefile | 2 +- .../testerlanc/testerlanc.ttcn | 2 +- regression_test/all_from/Makefile | 2 +- regression_test/all_from/all_from.ttcn | 2 +- .../all_from/all_from_complement.ttcn | 2 +- .../all_from/all_from_permutation.ttcn | 2 +- .../all_from/all_from_subrefs.ttcn | 284 ++ regression_test/all_from/all_from_subset.ttcn | 2 +- .../all_from/all_from_superset.ttcn | 2 +- regression_test/all_from/all_from_var.ttcn | 2 +- .../all_from/all_from_with_functions.ttcn | 2 +- regression_test/all_from/everything.ttcn | 2 +- regression_test/all_from/f_ext.cc | 2 +- regression_test/all_from/f_ext.hh | 2 +- regression_test/all_from/functions.ttcn | 2 +- .../all_from/imported_templates.ttcn | 2 +- regression_test/all_from/sapc.ttcn | 2 +- regression_test/all_from/types.ttcn | 2 +- regression_test/anytype/AnyUser.ttcnpp | 2 +- regression_test/anytype/AnytypeTest.ttcnpp | 2 +- regression_test/anytype/Makefile | 2 +- regression_test/anytype/Supplier.asn | 2 +- regression_test/anytype/config.cfg | 2 +- regression_test/anytype/noany.ttcn | 2 +- regression_test/anytype/smallany.ttcn | 2 +- regression_test/anytypeOper/Makefile | 2 +- regression_test/anytypeOper/TanytypeOper.ttcn | 2 +- .../anytypeOper/TanytypeWrapOper.ttcn | 2 +- regression_test/anytypeOper/config.cfg | 2 +- regression_test/arrayOper/Makefile | 2 +- regression_test/arrayOper/TarrayOper.ttcn | 2 +- regression_test/arrayOper/config.cfg | 2 +- regression_test/assignmentNotation/Makefile | 2 +- .../TassignmentNotation.asn | 2 +- .../TassignmentNotation.cfg | 2 +- .../TassignmentNotation.ttcn | 2 +- .../TassignmentNotation_First.cfg | 2 +- .../TassignmentNotation_Second.cfg | 2 +- .../TassignmentNotation_Third.cfg | 2 +- regression_test/basicStatem/Makefile | 2 +- regression_test/basicStatem/TbasicStatem.ttcn | 2 +- regression_test/basicStatem/config.cfg | 2 +- regression_test/bitstrOper/Makefile | 2 +- regression_test/bitstrOper/TbitstrOper.ttcn | 3 +- regression_test/bitstrOper/config.cfg | 2 +- regression_test/boolOper/Makefile | 2 +- regression_test/boolOper/TboolOper.ttcn | 2 +- regression_test/boolOper/config.cfg | 2 +- regression_test/cfgFile/Makefile | 2 +- regression_test/cfgFile/define/Makefile | 2 +- .../cfgFile/define/macro_reference/Makefile | 11 +- .../macro_reference/TSTM_macro_test_main.cfg | 2 +- .../TSTM_macro_test_testcases.ttcn | 2 +- .../cfgFile/define/structured/Makefile | 11 +- .../cfgFile/define/structured/structured.cfg | 2 +- .../cfgFile/define/structured/structured.ttcn | 2 +- .../cfgFile/module_parameters/Makefile | 4 +- .../module_parameters/assignment/Makefile | 11 +- .../assignment/assignment.cfg | 4 +- .../assignment/assignment.ttcn | 2 +- .../cfgFile/module_parameters/concat/Makefile | 11 +- .../module_parameters/concat/concat.cfg | 2 +- .../module_parameters/concat/concat.ttcn | 2 +- .../module_parameters/references/Makefile | 53 + .../references/references.cfg | 175 ++ .../references/references.ttcn | 701 +++++ .../cfgFile/ordered_include/Makefile | 11 +- .../ordered_include/config_sub2/oi2_sub.cfg | 2 +- .../configs_sub/oi1_subfolder1.cfg | 2 +- .../cfgFile/ordered_include/oi.ttcn | 2 +- .../cfgFile/ordered_include/oi1.cfg | 2 +- .../cfgFile/ordered_include/oi1_after1.cfg | 2 +- .../cfgFile/ordered_include/oi1_after2.cfg | 2 +- .../cfgFile/ordered_include/oi1_after3.cfg | 2 +- .../cfgFile/ordered_include/oi1_before1.cfg | 2 +- .../cfgFile/ordered_include/oi1_before2.cfg | 2 +- .../ordered_include/oi1_before_include.cfg | 2 +- .../cfgFile/ordered_include/oi2.cfg | 2 +- .../cfgFile/ordered_include/oi22.cfg | 2 +- .../cfgFile/ordered_include/oi23.cfg | 2 +- .../cfgFile/ordered_include/oi2_nomacro.cfg | 2 +- .../cfgFile/ordered_include/oi_after1.cfg | 2 +- .../cfgFile/ordered_include/oi_after2.cfg | 2 +- .../ordered_include/oi_after_list1.cfg | 2 +- .../ordered_include/oi_after_list2.cfg | 2 +- .../cfgFile/ordered_include/oi_before1.cfg | 2 +- .../cfgFile/ordered_include/oi_before2.cfg | 2 +- .../cfgFile/ordered_include/oi_before3.cfg | 2 +- .../cfgFile/ordered_include/oi_before4.cfg | 2 +- .../cfgFile/ordered_include/oi_before5.cfg | 2 +- .../oi_include_interference.cfg | 2 +- .../ordered_include/oi_include_mix.cfg | 2 +- .../cfgFile/ordered_include/oi_last1.cfg | 2 +- .../cfgFile/ordered_include/oi_last2.cfg | 2 +- .../cfgFile/ordered_include/oi_last3.cfg | 2 +- .../cfgFile/ordered_include/oi_subfolder1.cfg | 2 +- .../cfgFile/testport_parameters/Makefile | 11 +- .../cfgFile/testport_parameters/PCOType.cc | 2 +- .../cfgFile/testport_parameters/PCOType.hh | 2 +- .../testport_parameters/array_index.cfg | 2 +- .../testport_parameters/array_index.ttcn | 2 +- regression_test/cfg_list_concat/Makefile | 2 +- regression_test/cfg_list_concat/concat.prj | 2 +- regression_test/cfg_list_concat/concat.ttcn | 2 +- .../cfg_list_concat/everything.cfg | 2 +- regression_test/cfg_list_concat/sub1.cfg | 2 +- regression_test/cfg_list_concat/sub2.cfg | 2 +- regression_test/charOper/Makefile | 2 +- regression_test/charOper/TcharOper.ttcn | 2 +- regression_test/charOper/config.cfg | 2 +- regression_test/charstrOper/Makefile | 2 +- regression_test/charstrOper/TcharstrOper.ttcn | 2 +- regression_test/charstrOper/config.cfg | 2 +- regression_test/commMessage/HS41022.ttcn | 2 +- .../commMessage/ImplMsgEncData.asn | 2 +- regression_test/commMessage/Makefile | 2 +- regression_test/commMessage/TcommMessage.ttcn | 2 +- regression_test/commMessage/config.cfg | 2 +- .../commMessage/config_parallel.cfg | 2 +- regression_test/commProcedure/ExtProcPort.cc | 2 +- regression_test/commProcedure/ExtProcPort.hh | 2 +- regression_test/commProcedure/Makefile | 2 +- regression_test/commProcedure/PortAddress.cc | 2 +- regression_test/commProcedure/PortAddress.hh | 2 +- regression_test/commProcedure/ProcPort.ttcn | 54 +- regression_test/compileonly/Makefile | 4 +- .../compileonly/assignmentNotation/Makefile | 2 +- .../TassignmentNotation.ttcn | 2 +- .../compileonly/attribQualif/Makefile | 2 +- .../attribQualif/TattribQualif.ttcn | 2 +- .../compileonly/centralstorage/Makefile | 2 +- .../centralstorage/base_asn/Base_asn.asn | 2 +- .../base_mixed/Base_mixed_asn.asn | 2 +- .../base_mixed/base_mixed_PT.cc | 2 +- .../base_mixed/base_mixed_PT.hh | 2 +- .../base_mixed/base_mixed_ttcn.ttcn | 2 +- .../base_mixed/base_mixed_ttcnpp.ttcnpp | 2 +- .../centralstorage/base_ttcn/base_PT.cc | 2 +- .../centralstorage/base_ttcn/base_PT.hh | 2 +- .../centralstorage/base_ttcn/base_ttcn.ttcnpp | 2 +- .../extended_ttcn/extended_ttcn.ttcn | 2 +- .../extended_ttcn/extended_ttcnpp.ttcnpp | 2 +- .../separate_project/separate_PT.cc | 2 +- .../separate_project/separate_PT.hh | 2 +- .../separate_project/separate_ttcn.ttcn | 2 +- .../separate_project/separate_ttcnpp.ttcnpp | 2 +- .../centralstorage/separate_user/config.cfg | 2 +- .../separate_user/separate_user.ttcn | 2 +- .../user_all_bases/user_all_bases.ttcn | 2 +- .../centralstorage/user_ttcn/fake.ttcnpp | 2 +- .../centralstorage/user_ttcn/user_ttcn.ttcn | 2 +- .../compileonly/circularImport/A.asn | 2 +- .../compileonly/circularImport/B.asn | 2 +- .../compileonly/circularImport/Makefile | 2 +- .../compileonly/compareImported/A.ttcn | 2 +- .../compileonly/compareImported/B.ttcn | 2 +- .../compileonly/compareImported/C.ttcn | 2 +- .../compileonly/compareImported/Makefile | 2 +- .../compileonly/compoundif/Makefile | 2 +- .../compileonly/compoundif/Tcompoundif.ttcn | 2 +- .../dynamicTemplate/DynamicTemplate.ttcn | 2 +- .../compileonly/dynamicTemplate/Makefile | 2 +- .../compileonly/dynamicTemplate/external.cc | 2 +- regression_test/compileonly/isbound/Makefile | 2 +- .../compileonly/isbound/bad_SE.ttcn | 2 +- .../compileonly/isbound/bogus_SY.ttcn | 2 +- .../isbound/isbound_component_OK.ttcn | 2 +- .../compileonly/isbound/isbound_port_SE.ttcn | 2 +- .../isbound/isbound_testcase_SE.ttcn | 2 +- .../compileonly/isbound/one_OK.ttcn | 2 +- .../COMMON/ProtocolModules_Common.tpd | 2 +- .../mfgen-tpd/COMMON/src/General_Types.ttcn | 2 +- .../COMMON/src/MobileDomainDefinitions.asn | 2 +- .../mfgen-tpd/HP79745/Hello000/Hello000.tpd | 2 +- .../HP79745/Hello000/src/MyExample0.ttcn | 2 +- .../mfgen-tpd/HP79745/Hello123/Hello123.tpd | 2 +- .../HP79745/Hello123/src/MyExample1.ttcn | 2 +- .../mfgen-tpd/HP79745/HelloTpd/HelloTpd.tpd | 2 +- .../HP79745/HelloTpd/src/MyExample.ttcn | 2 +- .../compileonly/mfgen-tpd/HP79745/Makefile | 2 +- .../compileonly/mfgen-tpd/HQ56829/Makefile | 2 +- .../compileonly/mfgen-tpd/HQ56834/Makefile | 2 +- .../compileonly/mfgen-tpd/HQ56834/counter.tpd | 2 +- .../mfgen-tpd/HQ56834/src/counter.ttcn | 2 +- .../compileonly/mfgen-tpd/HQ56848/Makefile | 2 +- .../compileonly/mfgen-tpd/HQ56848/counter.tpd | 2 +- .../mfgen-tpd/HQ56848/src/counter.ttcn | 2 +- .../compileonly/mfgen-tpd/HQ60308/counter.tpd | 2 +- .../mfgen-tpd/HQ60308/src/counter.ttcn | 2 +- .../compileonly/mfgen-tpd/HR30356/Makefile | 2 +- .../mfgen-tpd/HR30356/client/client.tpd | 2 +- .../mfgen-tpd/HR30356/client/src/client.ttcn | 2 +- .../HR30356/controller/controller.tpd | 2 +- .../HR30356/controller/src/controller.ttcn | 2 +- .../mfgen-tpd/HR30356/server/server.tpd | 2 +- .../mfgen-tpd/HR30356/server/src/server.ttcn | 2 +- .../HR30356/testport/src/testport.ttcn | 2 +- .../mfgen-tpd/HR30356/testport/testport.tpd | 2 +- .../mfgen-tpd/HR30365/Hello000/Hello000.tpd | 2 +- .../HR30365/Hello000/src/MyExample0.ttcn | 2 +- .../mfgen-tpd/HR30365/Hello123/Hello123.tpd | 2 +- .../HR30365/Hello123/src/MyExample1.ttcn | 2 +- .../mfgen-tpd/HR30365/HelloTpd/HelloTpd.tpd | 2 +- .../HR30365/HelloTpd/src/MyExample.ttcn | 2 +- .../compileonly/mfgen-tpd/HR30365/Makefile | 2 +- .../compileonly/mfgen-tpd/Makefile | 2 +- .../NAS_EPS_v9.7.0_CNL113729.tpd | 2 +- .../src/NAS_EPS_v970.ttcn | 2 +- .../test/NAS_EPS_Test.cfg | 2 +- .../test/NAS_EPS_Test.ttcn | 2 +- .../test/NAS_EPS_v9.7.0_CNL113729_test.tpd | 2 +- .../buildconfig_param/HelloTpd/HelloTpd.tpd | 2 +- .../HelloTpd/src/MyExample.cfg | 2 +- .../HelloTpd/src/MyExample.ttcn | 2 +- .../buildconfig_param/HelloTpd/src/PCOType.cc | 2 +- .../buildconfig_param/HelloTpd/src/PCOType.hh | 2 +- .../mfgen-tpd/buildconfig_param/Makefile | 2 +- .../consumer-ref-supplier-Default.tpd | 2 +- .../mfgen-tpd/consumer/creator.ttcn | 2 +- .../mfgen-tpd/consumer/src/consumer.ttcn | 2 +- .../mfgen-tpd/consumer/src/userfun.cc | 2 +- .../mfgen-tpd/dependency_check/Makefile | 2 +- .../dependency_check/client/client.tpd | 2 +- .../dependency_check/client/src/client.ttcn | 2 +- .../controller/controller.tpd | 2 +- .../controller/src/controller.ttcn | 2 +- .../dependency_check/server/server.tpd | 2 +- .../dependency_check/server/src/server.ttcn | 2 +- .../testport/src/testport.ttcn | 2 +- .../dependency_check/testport/testport.tpd | 2 +- .../mfgen-tpd/flagTest/Hello000/Hello000.tpd | 2 +- .../flagTest/Hello000/src/MyExample0.ttcn | 2 +- .../mfgen-tpd/flagTest/Hello123/Hello123.tpd | 2 +- .../flagTest/Hello123/src/MyExample1.ttcn | 2 +- .../mfgen-tpd/flagTest/HelloTpd/HelloTpd.tpd | 2 +- .../flagTest/HelloTpd/src/MyExample.ttcn | 2 +- .../flagTest/HelloTpd2/HelloTpd2.tpd | 2 +- .../flagTest/HelloTpd2/src/MyExample2.ttcn | 2 +- .../compileonly/mfgen-tpd/flagTest/Makefile | 2 +- .../compileonly/mfgen-tpd/handmade.ttcn | 2 +- .../HelloTpd/HelloTpd.tpd | 2 +- .../HelloTpd/src/MyExample.cfg | 2 +- .../HelloTpd/src/MyExample.ttcn | 2 +- .../HelloTpd/src/PCOType.cc | 2 +- .../HelloTpd/src/PCOType.hh | 2 +- .../invalid_buildconfig_param/Makefile | 2 +- .../Hello000/Hello000.tpd | 2 +- .../Hello000/src/MyExample0.cfg | 2 +- .../Hello000/src/MyExample0.ttcn | 2 +- .../Hello000/src/PCOType0.cc | 2 +- .../Hello000/src/PCOType0.hh | 2 +- .../Hello123/Hello123.tpd | 2 +- .../Hello123/src/MyExample1.cfg | 2 +- .../Hello123/src/MyExample1.ttcn | 2 +- .../Hello123/src/PCOType1.cc | 2 +- .../Hello123/src/PCOType1.hh | 2 +- .../HelloTpd/HelloTpd.tpd | 2 +- .../HelloTpd/src/MyExample.cfg | 2 +- .../HelloTpd/src/MyExample.ttcn | 2 +- .../HelloTpd/src/PCOType.cc | 2 +- .../HelloTpd/src/PCOType.hh | 2 +- .../invalid_buildconfig_tpd/Makefile | 2 +- .../mfgen-tpd/library/HelloTpd/HelloTpd.tpd | 2 +- .../library/HelloTpd/src/MyExample.cfg | 2 +- .../library/HelloTpd/src/MyExample.ttcn | 2 +- .../mfgen-tpd/library/HelloTpd/src/PCOType.cc | 2 +- .../mfgen-tpd/library/HelloTpd/src/PCOType.hh | 2 +- .../mfgen-tpd/library/HelloTpd2/HelloTpd.tpd | 2 +- .../compileonly/mfgen-tpd/library/Makefile | 2 +- .../compileonly/mfgen-tpd/library/a.ttcn | 2 +- .../compileonly/mfgen-tpd/library/b.ttcn | 2 +- .../library/central_storage/central.ttcn | 2 +- .../compileonly/mfgen-tpd/outsider.ttcn | 2 +- .../compileonly/mfgen-tpd/runner.pl | 2 +- .../mfgen-tpd/subplier/src/subway.ttcn | 2 +- .../mfgen-tpd/subplier/subplier.tpd | 2 +- .../mfgen-tpd/supplier/src/supplier.ttcn | 2 +- .../mfgen-tpd/supplier/src/supplier2.ttcn | 2 +- .../mfgen-tpd/supplier/supplier24.tpd | 2 +- .../namedActualParameters/Makefile | 2 +- .../TnamedActualParameters.ttcn | 2 +- regression_test/compileonly/openType/Makefile | 2 +- regression_test/compileonly/openType/X.asn | 2 +- .../openTypeNames/IO_based_message.asn | 86 + .../compileonly/openTypeNames/Makefile | 42 + .../openTypeNames/Open_type_use.ttcn | 212 ++ .../optionalAssignCompare/Makefile | 2 +- .../ToptionalAssignCompare.ttcn | 2 +- .../compileonly/portConstructor/Makefile | 2 +- .../compileonly/portConstructor/x.ttcn | 2 +- .../styleGuide/Another_module.ttcn | 2 +- .../compileonly/styleGuide/Makefile | 2 +- .../compileonly/styleGuide/MyASN1_module.asn | 2 +- .../styleGuide/MySample_module.ttcn | 2 +- .../compileonly/styleGuide/external.cc | 2 +- regression_test/compileonly/topLevelPdu/A.asn | 2 +- regression_test/compileonly/topLevelPdu/B.asn | 2 +- .../compileonly/topLevelPdu/Makefile | 2 +- .../compileonly/typeInstantiation/A.asn | 2 +- .../compileonly/typeInstantiation/B.asn | 2 +- .../compileonly/typeInstantiation/Makefile | 2 +- regression_test/configOper/Makefile | 2 +- regression_test/configOper/TconfigOper.ttcn | 2 +- regression_test/controlTimer/Makefile | 2 +- .../controlTimer/TcontrolTimer.ttcn | 2 +- regression_test/controlTimer/config.cfg | 2 +- regression_test/defaultOper/Makefile | 2 +- regression_test/defaultOper/TdefaultOper.ttcn | 2 +- regression_test/defaultOper/config.cfg | 2 +- regression_test/enumOper/Makefile | 2 +- regression_test/enumOper/TenumOper.ttcn | 38 +- regression_test/enumOper/config.cfg | 2 +- regression_test/floatOper/Makefile | 2 +- regression_test/floatOper/TfloatOper.ttcn | 6 +- regression_test/floatOper/config.cfg | 2 +- .../functionReference/FuncRef.ttcn | 10 +- regression_test/functionReference/Makefile | 2 +- regression_test/functionReference/config.cfg | 2 +- regression_test/functionSubref/Makefile | 54 + .../functionSubref/TfunctionSubref.ttcn | 586 ++++ .../functionSubref/TpardTemplateSubref.ttcn | 205 ++ regression_test/functionSubref/config.cfg | 15 + regression_test/hexstrOper/Makefile | 2 +- regression_test/hexstrOper/ThexstrOper.ttcn | 2 +- regression_test/hexstrOper/config.cfg | 2 +- regression_test/iconv/Makefile | 2 +- regression_test/iconv/config.cfg | 2 +- regression_test/iconv/converter.ttcn | 2 +- regression_test/iconv/convertest.ttcn | 8 +- regression_test/iconv/iconver.cc | 2 +- regression_test/implicitMsgEncoding/Makefile | 2 +- .../implicitMsgEncoding/PCOType.cc | 2 +- .../implicitMsgEncoding/PCOType.hh | 2 +- .../implicitMsgEncoding/TimplicitEnc.ttcn | 2 +- .../implicitMsgEncoding/config.cfg | 2 +- regression_test/implicitOmit/Makefile | 2 +- regression_test/implicitOmit/config.cfg | 2 +- regression_test/implicitOmit/io.ttcn | 2 +- regression_test/intOper/Makefile | 2 +- regression_test/intOper/PCOType.cc | 2 +- regression_test/intOper/PCOType.hh | 2 +- regression_test/intOper/TintOper.ttcn | 110 +- regression_test/intOper/config.cfg | 2 +- regression_test/ipv6/Makefile | 2 +- regression_test/ipv6/host_ipv6_global.cfg | 2 +- regression_test/ipv6/host_link_local.cfg | 2 +- regression_test/ipv6/invalid_global_ipv6.cfg | 2 +- .../ipv6/invalid_global_ipv6_long.cfg | 2 +- regression_test/ipv6/ip_create_on_host.cfg | 2 +- regression_test/ipv6/ipv6.ttcn | 2 +- regression_test/ipv6/ipv6_all_global.cfg | 2 +- .../ipv6/ipv6_long_short_global.cfg | 2 +- regression_test/ipv6/ipv_hostname_macro.cfg | 2 +- regression_test/ipv6/link_local_ipv6.cfg | 2 +- .../ipv6/localhost_create_on_host.cfg | 2 +- .../ipv6/localhost_ip_create_on_host.cfg | 2 +- .../ipv6/long_host_ipv6_global.cfg | 2 +- regression_test/ipv6/long_ipv6_global.cfg | 2 +- .../ipv6/no_full_syntax_check_link_local.cfg | 2 +- .../no_full_syntax_check_link_local_long.cfg | 2 +- regression_test/ipv6/total_link_local.cfg | 2 +- regression_test/ipv6/valid_global_ipv6.cfg | 2 +- regression_test/ispresent/IsPresent_Test.cfg | 2 +- regression_test/ispresent/IsPresent_Test.ttcn | 17 +- regression_test/ispresent/Makefile | 2 +- regression_test/json/AttributeTestcases.ttcn | 126 +- regression_test/json/Functions.ttcn | 27 +- regression_test/json/JSON.cfg | 2 +- regression_test/json/JsonData.asn | 8 +- regression_test/json/Makefile | 2 +- regression_test/json/SemanticCheck.ttcn | 2 +- regression_test/json/Testcases.ttcn | 2 +- regression_test/json/Types.ttcn | 41 +- regression_test/junitlogger/Makefile | 2 +- regression_test/junitlogger/main1.cfg | 2 +- regression_test/junitlogger/main1.ttcn | 2 +- regression_test/junitlogger/test_junitlog.pl | 2 +- regression_test/junitlogger/test_junitlog.sh | 2 +- regression_test/lazyEval/LazyASNTypes.asn | 2 +- regression_test/lazyEval/Makefile | 11 +- regression_test/lazyEval/lazy.cfg | 2 +- regression_test/lazyEval/lazy_A.ttcn | 2 +- regression_test/lazyEval/lazy_B.ttcn | 2 +- regression_test/lazyEval/lazy_defs.ttcn | 2 +- regression_test/lazyEval/lazy_main.ttcn | 2 +- regression_test/logFiles/CommonStuff.ttcn | 2 +- regression_test/logFiles/LogFiles.cfg | 2 +- regression_test/logFiles/LogFiles.ttcn | 2 +- regression_test/logFiles/LogFiles2.cfg | 2 +- regression_test/logFiles/LogFilesInc.cfg | 2 +- regression_test/logFiles/LogFilesProc.cfg | 2 +- regression_test/logFiles/Makefile | 3 +- regression_test/logFiles/TitanLogTest.cfg | 2 +- regression_test/logFiles/TitanLogTest.ttcn | 2 +- regression_test/logFiles/extfunc.cc | 2 +- regression_test/logFiles/filtered_e.log2 | 2 + regression_test/logFiles/lfilter.log2 | 4 + regression_test/logFiles/logFiles_doc.script | 2 +- regression_test/logFiles/logfilter.sh | 22 + regression_test/logger/Makefile | 2 +- .../logger/emergency_logging/Console_N.txt | 2 +- .../logger/emergency_logging/Console_O.txt | 2 +- .../emergency_logging/EL_BufferAll_1.cfg | 2 +- .../emergency_logging/EL_BufferAll_10.cfg | 2 +- .../emergency_logging/EL_BufferAll_11.cfg | 2 +- .../emergency_logging/EL_BufferAll_12.cfg | 2 +- .../emergency_logging/EL_BufferAll_13.cfg | 2 +- .../emergency_logging/EL_BufferAll_1_NOEL.cfg | 2 +- .../emergency_logging/EL_BufferAll_2.cfg | 2 +- .../emergency_logging/EL_BufferAll_3.cfg | 2 +- .../emergency_logging/EL_BufferAll_3_NOEL.cfg | 2 +- .../emergency_logging/EL_BufferAll_4.cfg | 2 +- .../emergency_logging/EL_BufferAll_5.cfg | 2 +- .../emergency_logging/EL_BufferAll_6.cfg | 2 +- .../emergency_logging/EL_BufferAll_7.cfg | 2 +- .../emergency_logging/EL_BufferAll_7A.cfg | 2 +- .../emergency_logging/EL_BufferAll_8.cfg | 2 +- .../emergency_logging/EL_BufferAll_9.cfg | 2 +- .../emergency_logging/EL_BufferMasked_1.cfg | 2 +- .../emergency_logging/EL_BufferMasked_10.cfg | 2 +- .../emergency_logging/EL_BufferMasked_11.cfg | 2 +- .../emergency_logging/EL_BufferMasked_12.cfg | 2 +- .../emergency_logging/EL_BufferMasked_13.cfg | 2 +- .../emergency_logging/EL_BufferMasked_2.cfg | 2 +- .../emergency_logging/EL_BufferMasked_3.cfg | 2 +- .../emergency_logging/EL_BufferMasked_4.cfg | 2 +- .../emergency_logging/EL_BufferMasked_5.cfg | 2 +- .../emergency_logging/EL_BufferMasked_6.cfg | 2 +- .../emergency_logging/EL_BufferMasked_7.cfg | 2 +- .../emergency_logging/EL_BufferMasked_8.cfg | 2 +- .../emergency_logging/EL_BufferMasked_9.cfg | 2 +- .../emergency_logging/EmergencyLogTest.sh | 2 +- .../EmergencyLoggingTest.ttcn | 2 +- .../EmergencyLoggingTest_BuffMasked.cfg | 2 +- .../logger/emergency_logging/Makefile | 2 +- .../logger/emergency_logging/PCO_PT.cc | 2 +- .../logger/emergency_logging/PCO_PT.hh | 2 +- .../emergency_logging/Titan_LogTest.ttcn | 2 +- .../Titan_LogTestDefinitions.ttcn | 2 +- .../emergency_logging/failed_testcases.txt | 2 +- .../logger/emergency_logging/runlog.txt | 2 +- regression_test/logger/logcontrol/Makefile | 2 +- .../logcontrol/Titan_LogControlTest.cfg | 2 +- .../logcontrol/Titan_LogControlTest.ttcn | 2 +- .../logtest/Console_original_merged_log.txt | 2 +- regression_test/logger/logtest/Makefile | 2 +- regression_test/logger/logtest/PCO_PT.cc | 2 +- regression_test/logger/logtest/PCO_PT.hh | 2 +- .../logger/logtest/Titan_LogTest.cfg | 2 +- .../logger/logtest/Titan_LogTest.ttcn | 2 +- .../logtest/Titan_LogTestDefinitions.ttcn | 2 +- .../logger/logtest/Titan_LogTest_ACTION.cfg | 2 +- .../Titan_LogTest_ACTIONplusEXECUTOR_RT.cfg | 2 +- .../logger/logtest/Titan_LogTest_DEBUG.cfg | 2 +- ...itan_LogTest_DEFAULT_OPplusEXECUTOR_RT.cfg | 2 +- .../logtest/Titan_LogTest_ERRORplusRT.cfg | 2 +- .../logtest/Titan_LogTest_EXECUTOR_LOGOPT.cfg | 2 +- .../Titan_LogTest_EXECUTOR_RTplusCOMP.cfg | 2 +- .../Titan_LogTest_EXECUTOR_RTplusLOGOPT.cfg | 2 +- .../logger/logtest/Titan_LogTest_EXEC_RT.cfg | 2 +- .../logtest/Titan_LogTest_EX_UNQUAL.cfg | 2 +- .../Titan_LogTest_E_RTplus_E_CONFIGDATA.cfg | 2 +- .../logger/logtest/Titan_LogTest_FUNC.cfg | 2 +- .../logger/logtest/Titan_LogTest_MATCH.cfg | 2 +- .../logger/logtest/Titan_LogTest_PARALLEL.cfg | 2 +- .../logtest/Titan_LogTest_PORTEVENT.cfg | 2 +- .../logger/logtest/Titan_LogTest_STAT.cfg | 2 +- .../logger/logtest/Titan_LogTest_TC.cfg | 2 +- .../logger/logtest/Titan_LogTest_TIMER.cfg | 2 +- .../logtest/Titan_LogTest_TTCN_ACTION.cfg | 2 +- .../logger/logtest/Titan_LogTest_USER.cfg | 2 +- .../logger/logtest/Titan_LogTest_VERDICT.cfg | 2 +- .../logger/logtest/Titan_LogTest_WARNING.cfg | 2 +- regression_test/logger/logtest/logtest.sh | 2 +- .../logger/logtest/original_merged_log.txt | 2 +- .../logtest/original_merged_log_modified.txt | 2 +- regression_test/logger_control/Makefile | 2 +- regression_test/logger_control/config.cfg | 2 +- .../logger_control/logcontrol.ttcn | 2 +- regression_test/loggerplugin/Makefile | 2 +- regression_test/loggerplugin/a.ttcn | 2 +- regression_test/loggerplugin/config.cfg | 2 +- regression_test/lostTimer/Makefile | 2 +- regression_test/lostTimer/TlostTimer.ttcn | 5 +- regression_test/lostTimer/config.cfg | 2 +- regression_test/macros/Macros.ttcn | 2 +- regression_test/macros/Makefile | 2 +- regression_test/macros/config.cfg | 2 +- regression_test/modifiedTemplate/Makefile | 2 +- .../modifiedTemplate/TmodifiedTemplate.ttcn | 2 +- regression_test/modifiedTemplate/config.cfg | 2 +- .../namedActualParameters/Makefile | 2 +- .../namedActualParameters/config.cfg | 2 +- .../namedActualParameters/inlinetemplate.ttcn | 2 +- .../namedActualParameters/namedparam.ttcn | 2 +- .../namedActualParameters/small.ttcn | 2 +- .../namedActualParameters/templates.ttcn | 2 +- regression_test/negativeTest/Makefile | 2 +- regression_test/negativeTest/NegTest.cfg | 2 +- .../negativeTest/NegTestTestcases.ttcn | 2 +- regression_test/negativeTest/NegTestTypes.asn | 2 +- regression_test/negativeTest/NegTest_RAW.cfg | 2 +- .../negativeTest/NegTest_RAW_Testcases.ttcn | 2 +- .../negativeTest/NegTest_RAW_Types.ttcn | 2 +- regression_test/negativeTest/NegTest_TEXT.cfg | 2 +- .../negativeTest/NegTest_TEXT_Testcases.ttcn | 2 +- .../negativeTest/NegTest_TEXT_Types.ttcn | 2 +- regression_test/negativeTest/NegTest_XML.cfg | 2 +- .../negativeTest/NegTest_XML_Testcases.ttcn | 2 +- .../negativeTest/NegTest_XML_Types.xsd | 2 +- regression_test/negativeTest/NegTest_all.cfg | 2 +- regression_test/negativeTest/Types.asn | 2 +- .../negativeTest/UsefulTtcn3Types.ttcn | 2 +- regression_test/negativeTest/XSD.ttcn | 2 +- regression_test/negativeTest/config.cfg | 2 +- regression_test/negativeTest/negtest.ttcn | 2 +- ...ww_XmlTest_org_negativeTest_XML_Types.ttcn | 2 +- regression_test/nonMandatoryPar/Makefile | 2 +- regression_test/nonMandatoryPar/PCOType.cc | 2 +- regression_test/nonMandatoryPar/PCOType.hh | 2 +- .../nonMandatoryPar/TnonMandatory.ttcn | 2 +- regression_test/nonMandatoryPar/config.cfg | 2 +- regression_test/objidOper/Makefile | 2 +- regression_test/objidOper/TobjidOper.ttcn | 9 +- regression_test/objidOper/config.cfg | 2 +- regression_test/objidOper/indexer.cc | 2 +- regression_test/octetstrOper/Makefile | 2 +- .../octetstrOper/ToctetstrOper.ttcn | 3 +- regression_test/octetstrOper/config.cfg | 2 +- regression_test/omitdef/Datatypes.asn | 2 +- regression_test/omitdef/Dumping.hh | 2 +- regression_test/omitdef/Makefile | 2 +- regression_test/omitdef/PT_DefOpt.cc | 2 +- regression_test/omitdef/PT_DefOpt.hh | 2 +- regression_test/omitdef/Tsenderos.ttcn | 2 +- regression_test/omitdef/config.cfg | 2 +- regression_test/pattern_quadruples/Makefile | 2 +- regression_test/pattern_quadruples/config.cfg | 2 +- .../pattern_quadruples.ttcn | 2 +- regression_test/preCompilerFlags/Makefile | 2 +- .../preCompilerFlags/TpreCompilerFlags.ttcnpp | 2 +- regression_test/preCompilerFlags/config.cfg | 2 +- regression_test/predefFunction/Makefile | 2 +- regression_test/predefFunction/PreDef.cfg | 2 +- regression_test/predefFunction/bit_to_OK.ttcn | 2 +- regression_test/predefFunction/bit_to_SW.ttcn | 2 +- .../predefFunction/char_to_OK.ttcn | 2 +- .../predefFunction/char_to_SW.ttcn | 2 +- regression_test/predefFunction/encdec_OK.ttcn | 2 +- .../predefFunction/enum_to_OK.ttcn | 2 +- .../predefFunction/enum_to_SW.ttcn | 2 +- .../predefFunction/float_to_OK.ttcn | 2 +- .../predefFunction/float_to_SW.ttcn | 2 +- regression_test/predefFunction/hex_to_OK.ttcn | 2 +- regression_test/predefFunction/hex_to_SW.ttcn | 2 +- regression_test/predefFunction/int_to_OK.ttcn | 2 +- regression_test/predefFunction/int_to_SW.ttcn | 2 +- .../predefFunction/isprecho_OK.ttcn | 2 +- .../predefFunction/length_of_OK.ttcn | 2 +- .../predefFunction/length_of_SW.ttcn | 2 +- regression_test/predefFunction/oct_to_OK.ttcn | 2 +- regression_test/predefFunction/oct_to_SW.ttcn | 2 +- regression_test/predefFunction/regex_OK.ttcn | 2 +- .../predefFunction/replacer_OK.ttcn | 2 +- .../predefFunction/replacer_SW.ttcn | 2 +- regression_test/predefFunction/rotter_OK.ttcn | 2 +- regression_test/predefFunction/rotter_SW.ttcn | 2 +- regression_test/predefFunction/shifty_OK.ttcn | 2 +- regression_test/predefFunction/shifty_SW.ttcn | 2 +- .../predefFunction/size_of_OK.ttcn | 2 +- .../predefFunction/size_of_SW.ttcn | 2 +- regression_test/predefFunction/str_to_OK.ttcn | 2 +- regression_test/predefFunction/str_to_SW.ttcn | 2 +- .../predefFunction/sub_str_OK.ttcn | 2 +- .../predefFunction/sub_str_SW.ttcn | 2 +- regression_test/predefFunction/tcname_OK.ttcn | 2 +- regression_test/predefFunction/tcname_SW.ttcn | 2 +- regression_test/prereq.pl | 2 +- regression_test/profiler/Makefile | 3 +- regression_test/profiler/PIPEasp_PT.cc | 2 +- regression_test/profiler/PIPEasp_PT.hh | 2 +- .../profiler/PIPEasp_PortType.ttcn | 2 +- .../profiler/PIPEasp_Templates.ttcn | 2 +- regression_test/profiler/PIPEasp_Types.ttcn | 2 +- regression_test/profiler/Shell.ttcn | 18 +- regression_test/profiler/Testcases.ttcn | 72 +- regression_test/profiler/data_e.json | 37 + regression_test/profiler/double_e.json | 263 ++ regression_test/profiler/double_e.stats | 84 + regression_test/profiler/merged_e.stats | 84 + regression_test/profiler/prof2.cfg | 2 +- regression_test/profiler/prof3.cfg | 2 +- regression_test/recofOper/BerType.asn | 2 +- regression_test/recofOper/Circular1.ttcn | 22 + regression_test/recofOper/Circular2.ttcn | 17 + regression_test/recofOper/Makefile | 4 +- regression_test/recofOper/TrecofOper.ttcn | 2 +- regression_test/recofOper/TrecofParamRef.ttcn | 2 +- regression_test/recofOper/config.cfg | 2 +- regression_test/recordOper/Makefile | 2 +- regression_test/recordOper/TrecordOper.ttcn | 2 +- regression_test/recordOper/config.cfg | 2 +- regression_test/setOper/Makefile | 2 +- regression_test/setOper/TsetOper.ttcn | 2 +- regression_test/setOper/config.cfg | 2 +- regression_test/setofMatch/Makefile | 2 +- regression_test/setofMatch/TsetofMatch.ttcn | 2 +- regression_test/setofMatch/config.cfg | 2 +- regression_test/setofOper/Makefile | 2 +- regression_test/setofOper/TsetofOper.ttcn | 2 +- regression_test/setofOper/config.cfg | 2 +- regression_test/singlecontrol/Makefile | 2 +- .../singlecontrol/alsohascontrolpart.ttcn | 2 +- regression_test/singlecontrol/config.cfg | 2 +- regression_test/singlecontrol/config1.cfg | 2 +- regression_test/singlecontrol/config2.cfg | 2 +- .../singlecontrol/config_noexec.cfg | 2 +- .../singlecontrol/hascontrolpart.ttcn | 2 +- .../singlecontrol/nocontrolpart.ttcn | 2 +- regression_test/singlecontrol/ouch.cfg | 2 +- regression_test/slider/Makefile | 2 +- regression_test/slider/PT1.cc | 2 +- regression_test/slider/PT1.hh | 2 +- regression_test/slider/UNDER.cc | 2 +- regression_test/slider/UNDER.hh | 2 +- regression_test/slider/dual.ttcn | 2 +- regression_test/slider/dual2.ttcn | 2 +- regression_test/slider/dualnegtest.ttcn | 2 +- regression_test/slider/run.cfg | 2 +- regression_test/slider/slider.ttcn | 2 +- regression_test/templateAnytype/Makefile | 2 +- .../templateAnytype/TtemplateAnytype.ttcn | 2 +- regression_test/templateAnytype/config.cfg | 2 +- regression_test/templateBitstr/Makefile | 2 +- .../templateBitstr/TtemplateBitstr.ttcn | 2 +- regression_test/templateBitstr/config.cfg | 2 +- regression_test/templateBool/Makefile | 2 +- .../templateBool/TtemplateBool.ttcn | 2 +- regression_test/templateBool/config.cfg | 2 +- regression_test/templateChar/Makefile | 2 +- .../templateChar/TtemplateChar.ttcn | 2 +- regression_test/templateChar/config.cfg | 2 +- regression_test/templateCharstr/Makefile | 2 +- .../templateCharstr/TtemplateCharstr.ttcn | 2 +- regression_test/templateCharstr/config.cfg | 2 +- regression_test/templateEnum/Makefile | 2 +- .../templateEnum/TtemplateEnum.ttcn | 2 +- regression_test/templateEnum/config.cfg | 2 +- regression_test/templateFloat/Makefile | 2 +- .../templateFloat/TtemplateFloat.ttcn | 22 +- regression_test/templateFloat/config.cfg | 2 +- regression_test/templateInt/Makefile | 2 +- regression_test/templateInt/TtemplateInt.ttcn | 33 +- regression_test/templateInt/config.cfg | 2 +- regression_test/templateOctetstr/Makefile | 2 +- .../templateOctetstr/TtemplateOctetstr.ttcn | 2 +- regression_test/templateOctetstr/config.cfg | 2 +- .../templateOmit/Common/Templates.ttcn | 51 + .../templateOmit/Common/Types.ttcn | 53 + .../LegacyTests/LegacyTestcases.ttcn | 529 ++++ .../templateOmit/LegacyTests/Makefile | 58 + .../templateOmit/LegacyTests/legacy.cfg | 14 + regression_test/templateOmit/Makefile | 24 + .../templateOmit/NewTests/Makefile | 56 + .../templateOmit/NewTests/NewTestcases.ttcn | 423 +++ regression_test/templateOmit/NewTests/new.cfg | 14 + regression_test/templateRec/Makefile | 4 +- regression_test/templateRec/TtemplateRec.ttcn | 15 +- .../templateRec/TtemplateRecAsn.asn | 2 +- regression_test/templateRec/config.cfg | 2 +- regression_test/templateRecof/Makefile | 2 +- .../templateRecof/TmultiplePermutations.ttcn | 2 +- .../templateRecof/TtemplateRecof.ttcn | 2 +- regression_test/templateRecof/config.cfg | 2 +- regression_test/templateSet/Makefile | 2 +- regression_test/templateSet/TtemplateSet.ttcn | 2 +- regression_test/templateSet/config.cfg | 2 +- regression_test/templateSetof/Makefile | 2 +- .../templateSetof/TtemplateSetof.ttcn | 2 +- regression_test/templateSetof/config.cfg | 2 +- regression_test/templateUnion/Makefile | 2 +- .../templateUnion/TtemplateUnion.ttcn | 2 +- regression_test/templateUnion/config.cfg | 2 +- regression_test/testcase_defparam/Makefile | 2 +- regression_test/testcase_defparam/config.cfg | 2 +- .../testcase_defparam/tcdefparam.ttcn | 2 +- regression_test/text2ttcn/Makefile | 107 +- regression_test/text2ttcn/array_test.ttcn | 2 +- regression_test/text2ttcn/bitstring_test.ttcn | 2 +- regression_test/text2ttcn/boolean_test.ttcn | 2 +- .../text2ttcn/charstring_test.ttcn | 8 +- regression_test/text2ttcn/component_test.ttcn | 2 +- regression_test/text2ttcn/enum_test.ttcn | 2 +- regression_test/text2ttcn/float_test.ttcn | 2 +- regression_test/text2ttcn/functions.ttcn | 2 +- regression_test/text2ttcn/hexstring_test.ttcn | 2 +- regression_test/text2ttcn/integer_test.ttcn | 2 +- regression_test/text2ttcn/objid_test.ttcn | 2 +- .../text2ttcn/octetstring_test.ttcn | 2 +- regression_test/text2ttcn/record_test.ttcn | 2 +- regression_test/text2ttcn/recordof_test.ttcn | 2 +- regression_test/text2ttcn/set_test.ttcn | 3 +- regression_test/text2ttcn/setof_test.ttcn | 2 +- regression_test/text2ttcn/text2ttcn_1.cfg | 2 +- regression_test/text2ttcn/types.ttcn | 2 +- .../text2ttcn/ucharstring_test.ttcn | 2 +- regression_test/text2ttcn/union_test.ttcn | 2 +- regression_test/transparent/Makefile | 2 +- regression_test/transparent/run.cfg | 2 +- regression_test/transparent/transparent.ttcn | 2 +- regression_test/tryCatch/Makefile | 2 +- regression_test/tryCatch/PCOType.cc | 2 +- regression_test/tryCatch/PCOType.hh | 2 +- regression_test/tryCatch/external_function.cc | 2 +- regression_test/tryCatch/tryCatch.cfg | 2 +- .../tryCatch/tryCatch_Functions.ttcn | 2 +- .../tryCatch/tryCatch_Testcases.ttcn | 2 +- regression_test/ttcn2json/CompareSchemas.ttcn | 37 +- regression_test/ttcn2json/General_Types.ttcn | 2 +- .../ttcn2json/General_Types_e.json | 769 +++-- regression_test/ttcn2json/Main_e.json | 1 + regression_test/ttcn2json/Makefile | 4 +- regression_test/ttcn2json/MiniRanap_e.json | 1 + regression_test/ttcn2json/PIPEasp_PT.cc | 2 +- regression_test/ttcn2json/PIPEasp_PT.hh | 2 +- .../ttcn2json/PIPEasp_PortType.ttcn | 2 +- .../ttcn2json/PIPEasp_Templates.ttcn | 2 +- regression_test/ttcn2json/PIPEasp_Types.ttcn | 2 +- regression_test/ttcn2json/Shell.ttcn | 2 +- regression_test/ttcn2json/SubType.ttcn | 125 + regression_test/ttcn2json/SubType_e.json | 632 ++++ regression_test/ttcn2json/Testcases.ttcn | 9 +- .../ttcn2json/f_ext_import_schema.cc | 149 +- regression_test/ttcn2json/one.ttcn | 10 +- regression_test/ttcn2json/one_e.json | 329 +- regression_test/ttcn2json/three.ttcn | 5 +- regression_test/ttcn2json/three_e.json | 78 +- regression_test/ttcn2json/two.ttcn | 11 +- regression_test/ttcn2json/two_e.json | 76 +- regression_test/ttcn2json/zero.asn | 2 +- regression_test/typeCompat/ASN_Ext.asn | 2 +- regression_test/typeCompat/Compat.ttcn | 2 +- regression_test/typeCompat/Ext.ttcn | 2 +- regression_test/typeCompat/Ext2.ttcn | 2 +- regression_test/typeCompat/Makefile | 2 +- regression_test/typeCompat/Std.ttcn | 2 +- regression_test/typeCompat/config.cfg | 2 +- .../ucharstrOper/Base64Testcases.ttcn | 2 +- regression_test/ucharstrOper/Common.ttcn | 2 +- regression_test/ucharstrOper/Makefile | 2 +- .../ucharstrOper/TucharstrOper.ttcn | 2 +- .../ucharstrOper/UTF16Testcases.ttcn | 2 +- .../ucharstrOper/UTF32Testcases.ttcn | 2 +- .../ucharstrOper/UTF8Testcases.ttcn | 2 +- regression_test/ucharstrOper/config.cfg | 2 +- .../ucharstrOper/cstr_content.ttcn | 2 +- regression_test/ucharstrOper/external.cc | 2 +- regression_test/unionOper/Makefile | 2 +- regression_test/unionOper/TunionOper.ttcn | 2 +- regression_test/unionOper/config.cfg | 2 +- regression_test/vcheck.pl | 2 +- regression_test/verdictOper/Makefile | 2 +- regression_test/verdictOper/TverdictOper.ttcn | 2 +- regression_test/verdictOper/config.cfg | 2 +- regression_test/visibility/Makefile | 2 +- regression_test/visibility/Visibility.ttcn | 2 +- regression_test/visibility/config.cfg | 2 +- regression_test/visibility/module1.ttcn | 2 +- regression_test/visibility/module2.ttcn | 2 +- regression_test/visibility/module3.ttcn | 2 +- regression_test/visibility/module4.ttcn | 2 +- repgen/Makefile | 2 +- repgen/logfilter.c | 5 +- repgen/logformat.l | 69 +- repgen/logmerge.c | 2 +- repgen/parser.l | 2 +- repgen/repgen.c | 2 +- repgen/repgen.h | 2 +- repgen/ttcn3_logfilter.1 | 2 +- repgen/ttcn3_logformat.1 | 5 +- repgen/ttcn3_logmerge.1 | 2 +- .../TITAN_Executor_API/build.xml | 2 +- .../javadoc-overview/javadoc-overview.html | 2 +- .../TITAN_Executor_API/readme.txt | 2 +- .../titan/executor/jni/ComponentStruct.java | 2 +- .../titan/executor/jni/HcStateEnum.java | 2 +- .../titan/executor/jni/HostStruct.java | 2 +- .../titan/executor/jni/IJNICallback.java | 2 +- .../titan/executor/jni/JNIMiddleWare.java | 2 +- .../titan/executor/jni/McStateEnum.java | 2 +- .../titan/executor/jni/QualifiedName.java | 2 +- .../titan/executor/jni/TcStateEnum.java | 2 +- .../eclipse/titan/executor/jni/Timeval.java | 2 +- .../titan/executor/jni/TransportTypeEnum.java | 2 +- .../titan/executor/jni/VerdictTypeEnum.java | 2 +- .../titan/executorapi/HostController.java | 2 +- .../executorapi/IJniExecutorObserver.java | 2 +- .../titan/executorapi/JniExecutor.java | 2 +- .../exception/JniExecutorException.java | 2 +- .../JniExecutorIllegalArgumentException.java | 2 +- .../JniExecutorJniLoadException.java | 2 +- .../JniExecutorStartSessionException.java | 2 +- .../JniExecutorWrongStateException.java | 2 +- .../titan/executorapi/package-info.java | 2 +- .../eclipse/titan/executorapi/util/Log.java | 2 +- .../titan/executorapi/util/StringUtil.java | 2 +- .../titan/executorapi/demo/CommonData.java | 2 +- .../titan/executorapi/demo/DemoFrame.java | 2 +- .../executorapi/demo/ExecuteCfgDialog.java | 2 +- .../demo/ExecuteControlDialog.java | 2 +- .../demo/ExecuteTestcaseDialog.java | 2 +- .../eclipse/titan/executorapi/demo/Main.java | 2 +- .../TITAN_Executor_API_test/build.xml | 2 +- .../build_and_run_test.sh | 82 + .../TITAN_Executor_API_test/readme.txt | 101 +- .../HostControllerErrorIllegalArgTest.java | 2 +- .../JniExecutorAsyncErrorIllegalArgTest.java | 2 +- .../test/JniExecutorAsyncErrorTest.java | 2 +- .../JniExecutorAsyncErrorWrongStateTest.java | 2 +- .../test/JniExecutorAsyncHappySimpleTest.java | 2 +- .../test/JniExecutorAsyncHappyTest.java | 2 +- .../test/JniExecutorAsyncTest.java | 2 +- .../executorapi/test/JniExecutorSync.java | 2 +- .../executorapi/test/JniExecutorSyncTest.java | 2 +- .../executorapi/test/JniExecutorTest.java | 2 +- .../executorapi/test/NormalTestObserver.java | 2 +- .../executorapi/test/StringUtilTest.java | 2 +- .../titan/executorapi/test/Test1Observer.java | 2 +- .../titan/executorapi/test/Test2Observer.java | 2 +- .../titan/executorapi/test/TestConstants.java | 2 +- .../executorapi/test/TestObserverBase.java | 2 +- .../titan/executorapi/test/TestUtil.java | 2 +- .../doc/Titan_Executor_API_User_Guide.doc | Bin 64512 -> 74240 bytes usrguide/Makefile | 2 +- usrguide/PRI.doc | Bin 84480 -> 0 bytes usrguide/PRI.docx | Bin 0 -> 127610 bytes usrguide/apiguide.doc | Bin 555520 -> 696832 bytes usrguide/installationguide.doc | Bin 118272 -> 118784 bytes usrguide/pdfgen.sh | 2 +- usrguide/referenceguide.doc | Bin 1615360 -> 1682432 bytes usrguide/releasenotes.doc | Bin 581120 -> 581120 bytes usrguide/userguide.doc | Bin 847872 -> 849920 bytes xsdconvert/Annotation.cc | 38 +- xsdconvert/Annotation.hh | 17 +- xsdconvert/AttributeType.cc | 248 ++ xsdconvert/AttributeType.hh | 131 + xsdconvert/ComplexType.cc | 2780 +++++++++++------ xsdconvert/ComplexType.hh | 213 +- xsdconvert/FieldType.cc | 587 ---- xsdconvert/FieldType.hh | 98 - xsdconvert/GeneralFunctions.cc | 597 ++-- xsdconvert/GeneralFunctions.hh | 63 +- xsdconvert/GeneralTypes.hh | 125 +- xsdconvert/ImportStatement.cc | 126 +- xsdconvert/ImportStatement.hh | 45 +- xsdconvert/List.hh | 200 +- xsdconvert/Makefile | 6 +- xsdconvert/Mstring.cc | 182 +- xsdconvert/Mstring.hh | 127 +- xsdconvert/PredefinedModules.cc | 10 +- xsdconvert/RootType.cc | 320 +- xsdconvert/RootType.hh | 174 +- xsdconvert/SimpleType.cc | 1472 +++++---- xsdconvert/SimpleType.hh | 287 +- xsdconvert/TTCN3Module.cc | 358 ++- xsdconvert/TTCN3Module.hh | 187 +- xsdconvert/TTCN3ModuleInventory.cc | 248 +- xsdconvert/TTCN3ModuleInventory.hh | 66 +- xsdconvert/XMLParser.cc | 752 +++-- xsdconvert/XMLParser.hh | 175 +- xsdconvert/converter.cc | 394 +-- 2787 files changed, 61901 insertions(+), 12236 deletions(-) create mode 100644 core/ProfMerge_main.cc create mode 100644 core/ProfilerTools.cc create mode 100644 core/ProfilerTools.hh create mode 100644 core/ttcn3_profmerge.1 create mode 100644 function_test/Semantic_Analyser/template_restrictions/.gitignore create mode 100644 function_test/Semantic_Analyser/template_restrictions/Makefile create mode 100644 function_test/Semantic_Analyser/template_restrictions/TempRes_SE.ttcn create mode 100755 function_test/Semantic_Analyser/template_restrictions/t mode change 100644 => 100755 function_test/doc/TTCN3_Executor_TestReport.doc create mode 100644 hello/hello_world.ttcn create mode 100644 help/info/apply.html create mode 100644 help/info/derefers.html create mode 100644 help/info/int2enum.html create mode 100644 help/info/log2str.html create mode 100644 help/info/refers.html create mode 100644 makefiles/Makefile.personal.elx1pjld12-hz create mode 100644 regression_test/RAW/IntX/IntX.ttcn create mode 100644 regression_test/RAW/IntX/Makefile create mode 100644 regression_test/RAW/IntX/config.cfg create mode 100644 regression_test/XML/HU13380/HU13380.ttcn create mode 100644 regression_test/XML/HU13380/Makefile create mode 100644 regression_test/XML/HU13380/config.cfg create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/MyTypes_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/NoTargetNamespace.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/attribute_in_extension_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/http_www_example_org_complex_restriction_with_use_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/http_www_example_org_name_conv2_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/http_www_example_org_name_conv3_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/http_www_example_org_nillable_in_nillable_extension_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/http_www_example_org_seq_embeds_seq_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/http_www_example_org_wildcards_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/imported_module_1_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/imported_module_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/module_typename_conversion_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/name_conversion_extension_attrib_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/nillable_annotations_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_all_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_anyattr_in_complex_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_anyattrib_single_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_attr_ext_rest_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_attrib_enum_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_attrib_order_a_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_attrib_order_b_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_attribgroup_ingroup_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_boolean_variant_commented_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_comment_placement_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_complex_nillable_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_decimal_fractiondigits_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_dont_generate_element_substitution_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_enum_field_names_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_enumeration_remove_dup_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_enumeration_restriction_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_fixed_value_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_generate_element_substitution_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_id_attrib_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_import_prefix_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_imported2_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_imported_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_list_simpletype_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_long_extension_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_name_conv_http_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_namespaceas_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_nillable_fixed_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_no_ns_connector_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_qualified_element_attrib_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_regex_square_brackets_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_self_recursion_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_seq_enumeration_restriction_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_seq_group_reference_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_simpletype_base_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_simpletype_ref_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_simpletype_restrict_comp_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_substitutiongroup_abstract_block_1_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_substitutiongroup_abstract_block_2_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_substitutiongroup_complex_without_element_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_substitutiongroup_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_substitutiongroup_long_extension_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_substitutiongroup_main_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_substitutiongroup_ref_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_type_attributegroup_nillable_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_type_conversion_follow_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_unnamed_union_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_unqualified_element_attrib_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/XmlTest_expectedTtcns/www_example_org_xml_in_annotation_e.ttcn create mode 100644 regression_test/XML/XmlWorkflow/xsd/anyattr_in_complex.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/anyattrib_single.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/anyattribute_optional.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attrib_enum.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attrib_order_a.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attrib_order_b.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attrib_order_c.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attrib_restriction_extension.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attribgroup_ingroup.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attribute_in_extension.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/attributegroup_nillable.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/boolean_variant_commented.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/comment_placement.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/complex_nillable.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/complex_restriction_with_use.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/complex_self_recursion.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/decimal_fractiondigits.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/dont_generate_element_substitution.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/element_in_all_minmax.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/element_in_all_mixed.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/enum_field_names.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/enumeration_remove_dup.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/enumeration_restriction.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/enumeration_restriction2.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/fixed_value.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/generate_element_substitution.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/id_attrib.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/import_prefix_name.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/imported2.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/imported_module.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/imported_module_.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/imported_prefix_name.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/list_simpletype.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/long_extension.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/module_typename_conversion.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/module_typename_conversion_1.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/name_conv_non_alphanumeric.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/name_conv_remove_seq_of_low_line.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/name_conv_with_z.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/name_conversion_extension_attrib.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/namespaceas.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/nillable_annotations.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/nillable_fixed.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/nillable_in_nillable_extension.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/no_ns_connector.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/not_a_number_minex_inf_maxex_-inf.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/qualified_element_attrib.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/regex_square_brackets.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/seq_group_reference.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/sequence_embeds_sequence.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/simpletype_base.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/simpletype_ref.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/simpletype_restrict_comp.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup_abstract_block_1.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup_abstract_block_2.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup_complex_without_element.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup_long_extension.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup_main.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup_neg.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/substitutiongroup_ref.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/type_conversion_follow.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/unqualified_element_attrib.xsd create mode 100644 regression_test/XML/XmlWorkflow/xsd/xml_in_annotation.xsd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/Abstract_Socket_CNL113384.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/AoC_v1.1.2_CNL113653.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BFCP_CNL113751.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BICC_ANSI_CNL113397.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BICC_Q.1902.1_CNL113359.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BICC_TTC_CNL113416.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BSSGP_v10.6.0_CNL113750.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BSSGP_v9.4.0_CNL113720.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BSSMAP_v11.2.0_CNL113761.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/BSSMAP_v8.6.0_CNL113655.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CAP_v2_v6.4.0_CNL113483.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CAP_v4.7.0_CNL113425.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CAP_v4_v7.2.0_CNL113572.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CAP_v4_v7.6.0_CNL113721.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CCAPI_MINSAT_60_CNL113601.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CDR_v9.12.0_CNL113757.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CDR_v9.5.0_CNL113712.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CDR_v9.5.0_SGSN_CNL113728.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CIP_CS4.0_CNL113535.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/CIP_Orga_Italy_CNL113701.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/DHCP_CNL113461.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/DHCPv6_CNL113763.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/DNS_CNL113429.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/DSS1_ETSI_CNL113435.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EAP_CNL113722.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ECMS_CORBAmsg_CNL113687.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_BICC_CNL113711.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_BSSMAP_CNL113608.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CAI3G_CNL113566.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CAP_CNL113662.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CAP_Common_CNL113662.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CAP_v2_CNL113662.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CAP_v3_CNL113662.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CAP_v4_CNL113662.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CAP_v4_v760_CNL113662.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CIP_All_CNL113666.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CIP_CNL113666.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_CIP_Orga_CNL113666.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_DNS_CNL113597.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_DSS1_CNL113748.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_Diameter_CNL113521.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_EricssonRTC_CNL113683.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_H248_CNL113523.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_HTTP_CNL113618.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_INAP_CNL113596.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_ISUP_CNL113681.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_IUA_CNL113747.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_LANL2_CNL113698.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_LNP_CNL113714.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_MAP_CNL113595.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_MLSim_CNL113568.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_MSRP_CNL113564.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_MobileL3_CNL113609.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_RANAP_CNL113647.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_SDP_CNL113744.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_SGsAP_CNL113723.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_SIP_CNL113522.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_SOAP_CNL113620.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_SRVCC_CNL113741.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_STUN_CNL113645.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_UPloadCP_CNL113634.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_UserPlane_CNL113724.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_VXML_CNL113565.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_Applib_XCAP_CNL113534.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Base.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Buffer.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_CLI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_CentralScheduling.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_CentralSchedulingUIHandler.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Common.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_DataSource.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_ExecCtrl.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_ExecCtrl_UI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_FBQ.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_GUIViewer.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_HashMap.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_HostAdmin.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_HostAdmin_UI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_ILog.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_ILogBase.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_ILogString.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_LGenBase.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_LGenBase_UI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_LoadRegulator.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_LoadRegulatorUI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Logging.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Logging_Client.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Logging_Server.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Logging_UI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_NQueue.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_NameService.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_PTCDeployment.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_RandomNArray.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_RedBlackTree.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Rendezvous.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_RingBuffer.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Scheduler.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Semaphore.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatCapture.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatCaptureControl.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatCaptureUI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatHandler.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatHandler_UI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatManager.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatMeasure.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_StatReplay.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_TimeProfileEditor.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Transport.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_TransportRouting.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Transport_CommPortIPL4.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Transport_Common.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Transport_IPL2.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Transport_IPL4.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Transport_MessageBufferManager.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_UIHandler.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Variable.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CLL_Variable_UI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CommonTransport_M3_CNL113682.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CommonTransport_SCCP_CNL113610.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_CommonTransport_TCAP_CNL113592.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_FreeBusyQueue_demo.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_AC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_AIR.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ASDP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ATandT.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_BCS_AC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_BCS_SSP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_BCS_WCE.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CAI3G.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CAPv2.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CAPv3.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CAPv4.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CCMP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CIP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CIP_Orga.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CLF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CLFv2.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CNS.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CSCF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_CSCFclient.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_Common.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_DIAMETER.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_DNS.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_DSC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_EDB.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_EDB_CLI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_EPC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_CAPv2.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_CAPv3.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_CAPv4.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_CAPv4_v760.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_CCA.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_CSCF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_DCC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_ECC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_HomeZone.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_LTE_INAP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_MCC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_NP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_NP21.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_SNA.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ETM_SNA2.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_H248.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_HLR.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_HLRsim.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_HTTP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_INAP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ISUP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_LDAP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_LNP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_LRF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_LTE.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MABEZ.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MAP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MGW.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MMESim.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MMsim.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MRFC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MSS.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MTAS.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MTAS_noSS7.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MWI.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_MWIAS.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_Meta.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_NACF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_NASS.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_Netconf.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_OCF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_PCRFsim.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_PGM.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_PGM_HTTP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_PGM_SIP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_ParlayX.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_RACF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_SCP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_SIP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_SNA.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_SOAP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_UAAF.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_USSD.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_UserPlane.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_VMS.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_VXML.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_WCE_HTTP_Client.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_GenApp_XCAP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EPTF_ILog_demo.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/EricssonRTC_CNL113414.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/Ericsson_INAP_CS1plus_CNL113356.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/Ericsson_MAP_v2_CNL113725.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GCP_31r1_CNL113364.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GTP_v9.11.0_CNL113765.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GTPv2_Sv_v10.5.0_CNL113740.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GTPv2_Sv_v11.4.0_CNL113777.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GTPv2_Sv_v9.1.0_CNL113703.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GTPv2_Sv_v9.7.0_CNL113730.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GTPv2_Sv_v9.8.0_CNL113737.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GTPv2_v11.x.0_CNL113753.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/GiGnREPLAYasp_CNL113604.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/H225.0_v0298_CNL113354.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/H245_v6_CNL113587.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/H248_v2_CNL113424.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/HTTPmsg_CNL113312.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IMSA2_CNL113693.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IOS_HRPD_CLN113752.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IPL4_EIN_SCTP.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IPL4asp_CNL113531.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IPL4asp_CNL113531_Interface.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IP_CNL113418.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IP_Daemon_Dynamic_CNL113739.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IP_Daemon_Dynamic_CNL113739_demo.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ISUP_ANSI_CNL113411.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ISUP_Q.762_CNL113365.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ISUP_Q.762_TCOM_CNL113762.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ISUP_for_Japan_CNL113727.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/IUA_CNL113439.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/JSON_v07_2006_CNL113676.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/JUnit.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/LANL2asp_CNL113519.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/LDAPasp_RFC4511_CNL113513_Functions.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/LDAPasp_RFC4511_CNL113513_TestPort.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/LNP_ANSI_CNL113715.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/LOADMEASasp_CNL113585.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/M2PA_CNL113558.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/M3AP_v9.4.0_CNL113735.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/M3UA_SCTP_Daemon_CNL113487.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_ANSI_v2.0_CNL113673.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_ANSI_v2.0_CNL113673_demo.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_Current_CNL113745_1.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_Current_CNL113745_1_HLR.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_Current_CNL113745_1_v123.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_Current_CNL113745_1_v123_HLR.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v10.4.0_CNL113736.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v10.6.0_CNL113764.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v1_CNL113431.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v2_CNL113432.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v6.11.0_CNL113500.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v6.3.0_CNL113366.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v7.12.0_CNL113635.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v7.12.0_CNL113635_v123.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v7.8.0_CNL113569.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MAP_v9.3.0_CNL113710.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MIME_CNL113352.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MLSIMPLUSasp_CNL113749.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MLSIMasp_CNL113538.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MMLasp_CNL113490.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MSRP_CNL113467.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MTP3asp_CNL113337.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MTP3asp_EIN_CNL113421.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MobileL3_v10.5.0_CNL113758.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/MobileL3_v9.5.0_CNL113719.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/NAS_EPS_v10.6.1_CNL113746.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/NAS_EPS_v9.7.0_CNL113729.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/PIM_CNL113733.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/PIPEasp_CNL113334.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/PMIP_v10.5.0_CNL113759.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/PMIP_v8.5.0_CNL113704.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ParlayX_CNL113540.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ProtocolModules_Common.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/RANAP_v10.4.0_CNL113742.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/RANAP_v9.5.0_CNL113718.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/RANAP_v9.5.0_CNL113718_demo_RNC_to_RNC.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/ROSE_CNL113369.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/RTP_CNL113392.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/RTSP_CNL113588.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/S1AP_v10.6.0_CNL113756.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/S1AP_v8.7.0_CNL113672.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/S1AP_v9.4.0_CNL113717.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/S1AP_v9.7.0_CNL113732.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SBC_AP_v10.0.0_CNL113734.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SBC_AP_v9.3.0_CNL113731.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SCCP_CNL113341.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SCCPasp_CNL113348.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SCTP_Daemon_CNL113477.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SCTP_Daemon_Dynamic_CNL113630.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SCTPasp_CNL113469.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SDP_CNL113353.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SGsAP_v9.0.0_CNL113684.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SIPmsg_CNL113319.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SNMP_CNL113774.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SNMPmsg_CNL113344.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SQLasp_CNL113760.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SRTP_CNL113769.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SS7Common_CNL113755.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SSHCLIENTasp_CNL113484.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/STDINOUTmsg_CNL113642.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/STUN_CNL113644.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SUA_CNL113478.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SUA_Daemon_CNL113743.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SUAasp_CNL113516.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SUNRPCasp_CNL113493.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/Socket_API_CNL113686.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/SubscriptionHistoryProtocol_1.0_CNL113584.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCAP_CNL113342.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCAPasp_CNL113349.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_Common.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_IPsec.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_Interface.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_Maths.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_Regexp.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_Security.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_TitanSim.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCCUsefulFunctions_CNL113472_XPath.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCP_CNL113675.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TCPasp_CNL113347.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TELNET_Daemon_CNL113667.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TELNETasp_CNL113320.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/Tariffing_v8.0.0_CNL113654.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/TitanSim_evolution_files.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/Trigger_HSS4.2_CNL113583.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/UDP_CNL113420.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/UDPasp_CNL113346.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/UPloadCP_CNL113633.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/XML_RPC_CNL113488.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/XSDASN_CNL113474.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/XTDP_CNL113663.tpd create mode 100644 regression_test/XML/tpdValidTest/tpdTest/XTDPasp_CNL113494.tpd create mode 100644 regression_test/all_from/all_from_subrefs.ttcn create mode 100644 regression_test/cfgFile/module_parameters/references/Makefile create mode 100644 regression_test/cfgFile/module_parameters/references/references.cfg create mode 100644 regression_test/cfgFile/module_parameters/references/references.ttcn create mode 100644 regression_test/compileonly/openTypeNames/IO_based_message.asn create mode 100644 regression_test/compileonly/openTypeNames/Makefile create mode 100644 regression_test/compileonly/openTypeNames/Open_type_use.ttcn create mode 100644 regression_test/functionSubref/Makefile create mode 100644 regression_test/functionSubref/TfunctionSubref.ttcn create mode 100644 regression_test/functionSubref/TpardTemplateSubref.ttcn create mode 100644 regression_test/functionSubref/config.cfg create mode 100644 regression_test/logFiles/filtered_e.log2 create mode 100644 regression_test/logFiles/lfilter.log2 create mode 100755 regression_test/logFiles/logfilter.sh create mode 100644 regression_test/profiler/double_e.json create mode 100644 regression_test/profiler/double_e.stats create mode 100644 regression_test/profiler/merged_e.stats create mode 100644 regression_test/recofOper/Circular1.ttcn create mode 100644 regression_test/recofOper/Circular2.ttcn create mode 100644 regression_test/templateOmit/Common/Templates.ttcn create mode 100644 regression_test/templateOmit/Common/Types.ttcn create mode 100644 regression_test/templateOmit/LegacyTests/LegacyTestcases.ttcn create mode 100644 regression_test/templateOmit/LegacyTests/Makefile create mode 100644 regression_test/templateOmit/LegacyTests/legacy.cfg create mode 100644 regression_test/templateOmit/Makefile create mode 100644 regression_test/templateOmit/NewTests/Makefile create mode 100644 regression_test/templateOmit/NewTests/NewTestcases.ttcn create mode 100644 regression_test/templateOmit/NewTests/new.cfg create mode 100644 regression_test/ttcn2json/SubType.ttcn create mode 100644 regression_test/ttcn2json/SubType_e.json create mode 100755 titan_executor_api/TITAN_Executor_API_test/build_and_run_test.sh delete mode 100644 usrguide/PRI.doc create mode 100644 usrguide/PRI.docx create mode 100644 xsdconvert/AttributeType.cc create mode 100644 xsdconvert/AttributeType.hh delete mode 100644 xsdconvert/FieldType.cc delete mode 100644 xsdconvert/FieldType.hh diff --git a/.gitignore b/.gitignore index 4fb1668..c41dfb7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ doxygen Install Makefile.personal -.cproject +.project .TITAN* *.o +*.so +*.so.0 +*.so.0.0 *.exe *.pdf META-INF diff --git a/JNI/Makefile b/JNI/Makefile index 41753a5..3e9261c 100644 --- a/JNI/Makefile +++ b/JNI/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/JNI/jnimw.cc b/JNI/jnimw.cc index 151afe1..a4ca5d1 100644 --- a/JNI/jnimw.cc +++ b/JNI/jnimw.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/JNI/jnimw.h b/JNI/jnimw.h index 5b0da16..9c00ec7 100644 --- a/JNI/jnimw.h +++ b/JNI/jnimw.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/JNI/jninativelib.cc b/JNI/jninativelib.cc index b472414..62a3c92 100644 --- a/JNI/jninativelib.cc +++ b/JNI/jninativelib.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/JNI/org_eclipse_titan_executor_jni_JNIMiddleWare.h b/JNI/org_eclipse_titan_executor_jni_JNIMiddleWare.h index d1443dd..bca634c 100644 --- a/JNI/org_eclipse_titan_executor_jni_JNIMiddleWare.h +++ b/JNI/org_eclipse_titan_executor_jni_JNIMiddleWare.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/Makefile b/Makefile index 766ca7e..74fc88d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/Makefile.cfg b/Makefile.cfg index 6c8e47b..f4c5fb9 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -75,20 +75,9 @@ OPENSSL_DIR := default # Location of libxml2 XMLDIR := default -## ## ## ## ## Variables below are automatically set ## ## ## ## ## - # Flags for the C(++) preprocessor: # Prevent a warning about yyinput being defined but not used CPPFLAGS := -DYY_NO_INPUT -ifeq ($(DEBUG), yes) - CPPFLAGS += -DMEMORY_DEBUG -DFATAL_DEBUG -else - CPPFLAGS += -DNDEBUG -endif - -# MingW flags need to be passed to the preprocessor during ctags configure -CPPFLAGS += $(MINGW) - # Flags shared between C and C++ COMPILERFLAGS := -Wall @@ -100,16 +89,55 @@ COMPILERFLAGS := -Wall # Flags for the C compiler. # std=gnu9x shuts up warnings about long long and variadic macros CCFLAGS = $(COMPILERFLAGS) -std=gnu9x + +# Flags for the C++ compiler: +CXXFLAGS = $(COMPILERFLAGS) -Wno-long-long + +# The command for maintaining static libraries: +AR := ar + +# The command for building the shared libraries: +# It shall be set to either "$(CXX) -G" or "$(CXX) -shared" depending +# on the linker you use. +LD = $(CXX) -shared + +# Flags for linking binary executables (e.g. for profiling): +LDFLAGS = $(MINGW) + +# The command for removing symbol table from the executables: +STRIP := strip + +# Flags for flex: +FLEXFLAGS := -B -s -Cr + +# Flags for bison: +BISONFLAGS := -d + +# Override common settings with personal preferences if needed +-include $(TOP)/Makefile.personal + +## ## ## ## ## Variables below are automatically set ## ## ## ## ## + +ifeq ($(DEBUG), yes) + CPPFLAGS += -DMEMORY_DEBUG -DFATAL_DEBUG +else + CPPFLAGS += -DNDEBUG +endif + +# MingW flags need to be passed to the preprocessor during ctags configure +CPPFLAGS += $(MINGW) + ifeq ($(DEBUG), yes) CCFLAGS += -g CCFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align \ -Wstrict-prototypes +else +ifeq ($(COVERAGE), yes) + CCFLAGS += -O0 else CCFLAGS += -O2 endif - -# Flags for the C++ compiler: -CXXFLAGS = $(COMPILERFLAGS) -Wno-long-long +endif # Only the default Cygwin compiler can be used for Mingw. # Its version is 3.4.4, too low. @@ -121,9 +149,13 @@ endif ifeq ($(DEBUG), yes) CXXFLAGS += -g CXXFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align +else +ifeq ($(COVERAGE), yes) + CXXFLAGS += -O0 else CXXFLAGS += -O2 endif +endif # Flags for the C/C++ compilers to generate dependency list (-M or -MM # for gcc or clang, -xM or -xM1 for Sun C compiler). @@ -137,25 +169,11 @@ CCDEPFLAG := -xM1 CXXDEPFLAG := -xM1 endif -# The command for maintaining static libraries: -AR := ar - -# The command for building the shared libraries: -# It shall be set to either "$(CXX) -G" or "$(CXX) -shared" depending -# on the linker you use. -LD = $(CXX) -shared - -# Flags for linking binary executables (e.g. for profiling): -LDFLAGS = $(MINGW) ifeq ($(DEBUG), yes) LDFLAGS += -g endif -# The command for removing symbol table from the executables: -STRIP := strip -# Flags for flex: -FLEXFLAGS := -B -s -Cr ifeq ($(DEBUG), yes) FLEXFLAGS += -b -p # FLEXFLAGS += -d @@ -165,21 +183,16 @@ else FLEXFLAGS += -Cfe endif -# Flags for bison: -BISONFLAGS := -d + ifeq ($(DEBUG), yes) BISONFLAGS += -t -v endif ifeq ($(COVERAGE), yes) -ifneq ($(DEBUG), yes) - $(error TURN ON DEBUG MODE FOR COVERAGE) -else CPPFLAGS += -DCOVERAGE_BUILD COMPILERFLAGS += -fprofile-arcs -ftest-coverage LDFLAGS += -fprofile-arcs -ftest-coverage -lgcov endif -endif # Directory which contains the code for POSIX regular expression handling. # It is needed on platforms where the system's libc does not support POSIX @@ -206,8 +219,6 @@ endif # or installed. TEXPATH := /usr/local/teTeX2.0.2/bin/sparc-sun-solaris2.8 -# Override common settings with personal preferences if needed --include $(TOP)/Makefile.personal ########################################################################### # You don't have to alter anything below this line. diff --git a/Makefile.genrules b/Makefile.genrules index b33ef4c..eb33bab 100644 --- a/Makefile.genrules +++ b/Makefile.genrules @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -79,6 +79,10 @@ V_DEP = $(V_DEP_$(VD)) %.o: %.c $(V_CC)$(CC) -c $(CPPFLAGS) $(CCFLAGS) $< -o $@ +# Special rule for building profmerge files +%.profmerge.o: %.cc + $(V_CXX)$(CXX) -c -DPROF_MERGE $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + %.o: %.cc $(V_CXX)$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ diff --git a/README.linux b/README.linux index 0d35fa7..5534e3d 100644 --- a/README.linux +++ b/README.linux @@ -17,13 +17,13 @@ sudo apt-get install xutils-dev The following packages may be needed for titan_eclipse/automatic_build: sudo apt-get install ant xsltproc -2.Clone the titan directory from git into /home//titan +2.Clone the titan directory from git into /home//titan.core -git clone https://github.com/eclipse/titan.core titan +git clone https://github.com/eclipse/titan.core titan.core 3. Configure the build -cd titan +cd titan.core check that MakefileFOSS.cfg is present and has the following content: cat MakefileFOSS.cfg @@ -37,15 +37,15 @@ Options can be overridden by the content of a file named Makefile.personal whic adapt to local installation directories, change config options etc. Below, a small number of typical scenarios are presented. -1) JNI disabled +a) JNI disabled The JNI interface is used by the Eclipse Titan Executor or by the Java Executor API. If you don't need them , Titan can be compiled without JNI. -Create ~/titan/Makefile.personal to override settings in Makefile.cfg with the following content: +Create ~/titan.core/Makefile.personal to override settings in Makefile.cfg with the following content: (replace paths with values relevant to your installation) -TTCN3_DIR := /home//titan/Install +TTCN3_DIR := /home//titan.core/Install OPENSSL_DIR := /usr #JDKDIR := /usr/lib/jvm/java-7-openjdk-amd64 XMLDIR := /usr @@ -55,14 +55,14 @@ GEN_PDF := no -2) JNI enabled +b) JNI enabled install JDK into /home//jdk -Create ~/titan/Makefile.personal to override settings in Makefile.cfg with the following content: +Create ~/titan.core/Makefile.personal to override settings in Makefile.cfg with the following content: (replace paths with values relevant to your installation) -TTCN3_DIR := /home//titan/Install +TTCN3_DIR := /home//titan.core/Install OPENSSL_DIR := /usr JDKDIR := /usr/lib/jvm/java-7-openjdk-amd64 XMLDIR := /usr @@ -77,7 +77,7 @@ make 5. Set environment variables -setenv TTCN3_DIR /home//titan/Install +setenv TTCN3_DIR /home//titan.core/Install setenv PATH /home//titan.core/Install/bin/:${PATH} setenv LD_LIBRARY_PATH /home//titan.core/Install/lib:${LD_LIBRARY_PATH} @@ -85,7 +85,7 @@ for csh or -export TTCN3_DIR=/home//titan/Install +export TTCN3_DIR=/home//titan.core/Install export PATH=/home//titan.core/Install/bin/:${PATH} export LD_LIBRARY_PATH=/home//titan.core/Install/lib:${LD_LIBRARY_PATH} @@ -95,15 +95,16 @@ for bash make install -This will install Titan into /home//titan/Install +This will install Titan into /home//titan.core/Install 7. Optionally , run function/regression tests -cd /home//titan/function_test +cd /home//titan.core/function_test in the following Makefiles +BER_EncDec/Makefile XER_EncDec/Makefile Text_EncDec/Makefile RAW_EncDec/Makefile @@ -116,7 +117,7 @@ make ( or make |& tee outputfile if you want to save the output for verification) -cd /home//titan/regression_test +cd /home//titan.core/regression_test make run ( or make run |& tee outputfile if you want to save the output for verification) diff --git a/common/CharCoding.hh b/common/CharCoding.hh index 9a4bde2..c511a92 100644 --- a/common/CharCoding.hh +++ b/common/CharCoding.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/JSON_Tokenizer.cc b/common/JSON_Tokenizer.cc index cb58f0c..b221e86 100644 --- a/common/JSON_Tokenizer.cc +++ b/common/JSON_Tokenizer.cc @@ -1,3 +1,11 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2000-2015 Ericsson Telecom AB +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v10.html +/////////////////////////////////////////////////////////////////////////////// + #include #include "JSON_Tokenizer.hh" @@ -371,3 +379,50 @@ int JSON_Tokenizer::put_next_token(json_token_t p_token, const char* p_token_str return buf_len - start_len; } + +char* convert_to_json_string(const char* str) +{ + char* ret_val = mcopystrn("\"", 1); + // control characters (like \n) cannot be placed in a JSON string, replace + // them with JSON metacharacters + // double quotes and backslashes need to be escaped, too + size_t str_len = strlen(str); + for (size_t i = 0; i < str_len; ++i) { + switch (str[i]) { + case '\n': + ret_val = mputstrn(ret_val, "\\n", 2); + break; + case '\r': + ret_val = mputstrn(ret_val, "\\r", 2); + break; + case '\t': + ret_val = mputstrn(ret_val, "\\t", 2); + break; + case '\f': + ret_val = mputstrn(ret_val, "\\f", 2); + break; + case '\b': + ret_val = mputstrn(ret_val, "\\b", 2); + break; + case '\"': + ret_val = mputstrn(ret_val, "\\\"", 2); + break; + case '\\': + ret_val = mputstrn(ret_val, "\\\\", 2); + break; + default: + if (str[i] < 32 && str[i] > 0) { + // use the JSON \uHHHH notation for other control characters + // (this is just for esthetic reasons, these wouldn't break the JSON + // string format) + ret_val = mputprintf(ret_val, "\\u00%d%c", str[i] / 16, + (str[i] % 16 < 10) ? (str[i] % 16 + '0') : (str[i] % 16 - 10 + 'A')); + } + else { + ret_val = mputc(ret_val, str[i]); + } + break; + } + } + return mputstrn(ret_val, "\"", 1); +} diff --git a/common/JSON_Tokenizer.hh b/common/JSON_Tokenizer.hh index 6775c69..fb07489 100644 --- a/common/JSON_Tokenizer.hh +++ b/common/JSON_Tokenizer.hh @@ -1,3 +1,11 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2000-2015 Ericsson Telecom AB +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v10.html +/////////////////////////////////////////////////////////////////////////////// + #ifndef JSON_TOKENIZER_HH #define JSON_TOKENIZER_HH @@ -155,6 +163,14 @@ public: // A dummy JSON tokenizer, use when there is no actual JSON document static JSON_Tokenizer DUMMY_BUFFER; +/** Converts a string into a JSON string by replacing all control characters + * with JSON escape sequences, if available, or with the \uHHHH escape sequence. + * The string is also wrapped inside a set of double quotes and all double quotes + * and backslash characters are double-escaped. + * + * Returns an expstring, that needs to be freed. */ +extern char* convert_to_json_string(const char* str); + #endif /* JSON_TOKENIZER_HH */ diff --git a/common/Makefile b/common/Makefile index 3b11451..6675bc6 100644 --- a/common/Makefile +++ b/common/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/common/ModuleVersion.cc b/common/ModuleVersion.cc index b08d5c5..0d57b63 100644 --- a/common/ModuleVersion.cc +++ b/common/ModuleVersion.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/ModuleVersion.hh b/common/ModuleVersion.hh index be54651..19890ec 100644 --- a/common/ModuleVersion.hh +++ b/common/ModuleVersion.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/NetworkHandler.cc b/common/NetworkHandler.cc index 95a81cd..1401929 100644 --- a/common/NetworkHandler.cc +++ b/common/NetworkHandler.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/NetworkHandler.hh b/common/NetworkHandler.hh index 138bb67..5dd982e 100644 --- a/common/NetworkHandler.hh +++ b/common/NetworkHandler.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/Path2.cc b/common/Path2.cc index a150300..6a588bf 100644 --- a/common/Path2.cc +++ b/common/Path2.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/Path2.hh b/common/Path2.hh index a2170c9..c0d785a 100644 --- a/common/Path2.hh +++ b/common/Path2.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/Quadruple.cc b/common/Quadruple.cc index 2b8111c..a2f744a 100644 --- a/common/Quadruple.cc +++ b/common/Quadruple.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/Quadruple.hh b/common/Quadruple.hh index 2b98dae..0efbb06 100644 --- a/common/Quadruple.hh +++ b/common/Quadruple.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/cfg_process_utils.hh b/common/cfg_process_utils.hh index 05ecf16..35dfd3c 100644 --- a/common/cfg_process_utils.hh +++ b/common/cfg_process_utils.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/config_preproc.cc b/common/config_preproc.cc index db1d3d3..85ffdb4 100644 --- a/common/config_preproc.cc +++ b/common/config_preproc.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/config_preproc.h b/common/config_preproc.h index 026d095..2974984 100644 --- a/common/config_preproc.h +++ b/common/config_preproc.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/config_preproc_la.l b/common/config_preproc_la.l index 1699f33..7c1520d 100644 --- a/common/config_preproc_la.l +++ b/common/config_preproc_la.l @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -135,9 +135,18 @@ MACRO_REFERENCE_INT \$"{"{WS}{TTCN3IDENTIFIER}{WS}(","{WS}integer{WS})?"}" "["{WS}MODULE_PARAMETERS{WS}"]" BEGIN(SC_module_parameters); "["{WS}TESTPORT_PARAMETERS{WS}"]" BEGIN(SC_testport_parameters); - + { "["{NUMBER}"]" ; +} + + +{ + "["[ \t0-9a-zA-Z+*/&-]*"]" ; +} + + +{ "["[^\r\n\[\]]*{MACRO_REFERENCE_INT}{WS}[^\r\n\[\]]*"]" ; } @@ -192,7 +201,7 @@ MACRO_REFERENCE_INT \$"{"{WS}{TTCN3IDENTIFIER}{WS}(","{WS}integer{WS})?"}" BEGIN(INITIAL); } else { preproc_error_flag = 1; - config_preproc_error(error_msg.c_str()); + config_preproc_error("%s", error_msg.c_str()); } } /* no break */ diff --git a/common/config_preproc_p.y b/common/config_preproc_p.y index 939e394..e76ee4f 100644 --- a/common/config_preproc_p.y +++ b/common/config_preproc_p.y @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/common/dbgnew.hh b/common/dbgnew.hh index b0a8a2e..b236a0e 100644 --- a/common/dbgnew.hh +++ b/common/dbgnew.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/hostid.c b/common/hostid.c index 2f0dc8a..50ffd06 100644 --- a/common/hostid.c +++ b/common/hostid.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/license.c b/common/license.c index aa381f0..3cad4c9 100644 --- a/common/license.c +++ b/common/license.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/license.h b/common/license.h index 560d1a0..b2d6d0b 100644 --- a/common/license.h +++ b/common/license.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/memory.c b/common/memory.c index 11ceec8..724fc74 100644 --- a/common/memory.c +++ b/common/memory.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -311,6 +311,7 @@ static void check_memory_address(memory_block *block_ptr, int oper) #define MALLOC_INTERNAL(f,l,s) Malloc_dbg(f,l,s) #define MEMPTYSTR_INTERNAL(f,l) memptystr_dbg(f,l) #define MCOPYSTR_INTERNAL(f,l,s) mcopystr_dbg(f,l,s) +#define MCOPYSTRN_INTERNAL(f,l,s,l2) mcopystrn_dbg(f,l,s,l2) #define REALLOC_INTERNAL(f,l,p,s) Realloc_dbg(f,l,p,s) #define FREE_INTERNAL(f,l,p) Free_dbg(f,l,p) #define MPRINTF_VA_LIST_INTERNAL(f,l,s,p) mprintf_va_list_dbg(f,l,s,p) @@ -333,6 +334,7 @@ static void extract_location(void *p, const char **fn, int *ln) #define MALLOC_INTERNAL(f,l,s) Malloc(s) #define MEMPTYSTR_INTERNAL(f,l) memptystr() #define MCOPYSTR_INTERNAL(f,l,s) mcopystr(s) +#define MCOPYSTRN_INTERNAL(f,l,s,l2) mcopystrn(s,l2) #define REALLOC_INTERNAL(f,l,p,s) Realloc(p,s) #define FREE_INTERNAL(f,l,p) Free(p) #define MPRINTF_VA_LIST_INTERNAL(f,l,s,p) mprintf_va_list(s,p) @@ -861,7 +863,7 @@ expstring_t mputstrn(expstring_t str, const char *str2, size_t len2) memset(str + newlen, '\0', newsize - newlen); } memcpy(str + len, str2, len2); - } else str = MCOPYSTR_INTERNAL(filename, line, str2); + } else str = MCOPYSTRN_INTERNAL(filename, line, str2, len2); } return str; } diff --git a/common/memory.h b/common/memory.h index b048423..cf31f0a 100644 --- a/common/memory.h +++ b/common/memory.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/new.cc b/common/new.cc index 7506718..11eade3 100644 --- a/common/new.cc +++ b/common/new.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/path.c b/common/path.c index 59765c2..d9c4f3d 100644 --- a/common/path.c +++ b/common/path.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/path.h b/common/path.h index b1594cb..e72b743 100644 --- a/common/path.h +++ b/common/path.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/pattern.hh b/common/pattern.hh index f5db171..96104b6 100644 --- a/common/pattern.hh +++ b/common/pattern.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -20,8 +20,12 @@ * charstring pattern to a POSIX Extended Regular Expression (ERE). * If error occurs, returns a NULL-pointer. It uses the * TTCN_pattern_error() and TTCN_pattern_warning() functions to - * report errors/warnings. */ -extern char* TTCN_pattern_to_regexp(const char* p_pattern); + * report errors/warnings. + * + * The function is also used on universal charstring patterns (in UTF-8 format) + * during JSON schema generation. In this case the 2nd parameter must be set + * to true, so no errors are reported for the extended ASCII characters. */ +extern char* TTCN_pattern_to_regexp(const char* p_pattern, bool utf8 = false); extern char* TTCN_pattern_to_regexp_uni(const char* p_pattern, int** groups = 0); diff --git a/common/pattern_la.l b/common/pattern_la.l index 29e3d16..109c0c2 100644 --- a/common/pattern_la.l +++ b/common/pattern_la.l @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/common/pattern_p.y b/common/pattern_p.y index 8d01c5c..90a59fe 100644 --- a/common/pattern_p.y +++ b/common/pattern_p.y @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -54,6 +54,8 @@ /** The converted regexp. */ static char *ret_val; + /** Turns error messages for extended ASCII characters on or off */ + static bool allow_ext_ascii = false; /** The parser error reporting function. */ static void pattern_yyerror(const char *error_str); /** Creates the POSIX equivalent of literal character \a c using the @@ -406,8 +408,8 @@ RE_OneCharPos: | TOK_Char { unsigned char c = $1; - if (c == 0 || c > 127) TTCN_pattern_error("Character with code %u " - "(0x%02x) cannot be used in a pattern for type charstring.", c, c); + if (c == 0 || (c > 127 && !allow_ext_ascii)) TTCN_pattern_error("Character " + "with code %u (0x%02x) cannot be used in a pattern for type charstring.", c, c); $$ = translate_character($1); } | RE_Quadruple @@ -551,8 +553,8 @@ RE_Set_Range_Char: | TOK_Char { unsigned char c = $1; - if (c == 0 || c > 127) TTCN_pattern_error("Character with code %u " - "(0x%02x) cannot be used in a pattern for type charstring.", c, c); + if (c == 0 || (c > 127 && !allow_ext_ascii)) TTCN_pattern_error("Character " + "with code %u (0x%02x) cannot be used in a pattern for type charstring.", c, c); $$ = $1; } | RE_Quadruple { $$ = $1; } @@ -621,13 +623,16 @@ RE_Quadruple: * Interface *********************************************************************/ -char* TTCN_pattern_to_regexp(const char* p_pattern) +char* TTCN_pattern_to_regexp(const char* p_pattern, bool utf8) { /* if you want to debug */ //pattern_yydebug=1; ret_val=NULL; + /* allow extended ASCII characters if the pattern is in UTF-8 format */ + allow_ext_ascii = utf8; + yy_buffer_state *flex_buffer = pattern_yy_scan_string(p_pattern); if(flex_buffer == NULL) { TTCN_pattern_error("Flex buffer creation failed."); diff --git a/common/pattern_uni.y b/common/pattern_uni.y index 1d33ad7..18754ad 100644 --- a/common/pattern_uni.y +++ b/common/pattern_uni.y @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/common/platform.h b/common/platform.h index cc016fe..50dfb9f 100644 --- a/common/platform.h +++ b/common/platform.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/static_check.h b/common/static_check.h index 40b8117..9a0be9d 100644 --- a/common/static_check.h +++ b/common/static_check.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/ttcn3float.hh b/common/ttcn3float.hh index 9e8f560..4bc3c6d 100644 --- a/common/ttcn3float.hh +++ b/common/ttcn3float.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -10,6 +10,13 @@ #include +/* TTCN-3 float values that have absolute value smaller than this + are displayed in exponential notation. */ +#define MIN_DECIMAL_FLOAT 1.0E-4 +/* TTCN-3 float values that have absolute value larger or equal than this + are displayed in exponential notation. */ +#define MAX_DECIMAL_FLOAT 1.0E+10 + #ifndef signbit // Probably Solaris. // Thankfully, IEEE Std 1003.1, 2004 Edition says that signbit is a macro, diff --git a/common/usage_stats.cc b/common/usage_stats.cc index c195d84..36116ce 100644 --- a/common/usage_stats.cc +++ b/common/usage_stats.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/usage_stats.hh b/common/usage_stats.hh index 632508b..2396568 100644 --- a/common/usage_stats.hh +++ b/common/usage_stats.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/userinfo.c b/common/userinfo.c index 66db4b9..843be53 100644 --- a/common/userinfo.c +++ b/common/userinfo.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/userinfo.h b/common/userinfo.h index 80ac1ba..6113aeb 100644 --- a/common/userinfo.h +++ b/common/userinfo.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/common/version.h b/common/version.h index 5ee2842..8f25a76 100644 --- a/common/version.h +++ b/common/version.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -10,7 +10,7 @@ /* Version numbers */ #define TTCN3_MAJOR 5 -#define TTCN3_MINOR 3 +#define TTCN3_MINOR 4 #define TTCN3_PATCHLEVEL 0 //#define TTCN3_BUILDNUMBER 0 @@ -22,7 +22,7 @@ * TTCN3_VERSION = TTCN3_MAJOR * 1000000 + TTCN3_MINOR * 10000 + * TTCN3_PATCHLEVEL * 100 + TTCN3_BUILDNUMBER */ -#define TTCN3_VERSION 50300 +#define TTCN3_VERSION 50400 /* A monotonically increasing version number. * An official release is deemed to have the highest possible build number (99) diff --git a/common/version.py b/common/version.py index cc43468..117b55e 100644 --- a/common/version.py +++ b/common/version.py @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/common/version_internal.h b/common/version_internal.h index bc8da1b..38a9a93 100644 --- a/common/version_internal.h +++ b/common/version_internal.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -249,7 +249,7 @@ #endif /* Copyright message */ -#define COPYRIGHT_STRING COMMENT_PREFIX "Copyright Ericsson Telecom AB 2000-2014" +#define COPYRIGHT_STRING COMMENT_PREFIX "Copyright (c) 2000-2015 Ericsson Telecom AB" /* For prefixing the above messages. Default value: empty string. */ #define COMMENT_PREFIX diff --git a/compiler2/AST.cc b/compiler2/AST.cc index 202d282..daae450 100644 --- a/compiler2/AST.cc +++ b/compiler2/AST.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -878,6 +878,24 @@ namespace Common { output->functions.set_param = NULL; has_set_param = true; } else has_set_param = false; + // get_param function + bool has_get_param; + if (output->functions.get_param) { + output->source.static_function_prototypes = mputstr(output->source.static_function_prototypes, + "static Module_Param* get_module_param(Module_Param_Name& param_name);\n"); + output->source.static_function_bodies = mputstr(output->source.static_function_bodies, + "static Module_Param* get_module_param(Module_Param_Name& param_name)\n" + "{\n" + "const char* const par_name = param_name.get_current_name();\n"); + output->source.static_function_bodies = + mputstr(output->source.static_function_bodies, output->functions.get_param); + output->source.static_function_bodies = + mputstr(output->source.static_function_bodies, "return NULL;\n" + "}\n\n"); + Free(output->functions.get_param); + output->functions.get_param = NULL; + has_get_param = true; + } else has_get_param = false; // log_param function bool has_log_param; if (output->functions.log_param) { @@ -1029,12 +1047,13 @@ namespace Common { } string extra_str = extra ? ( string('"') + extra + string('"') ) : string("NULL"); output->source.global_vars = mputprintf(output->source.global_vars, - ", %uU, %uU, %uU, %uU, %s, %luLU, %s, %s, %s, %s, %s, %s, %s", + ", %uU, %uU, %uU, %uU, %s, %luLU, %s, %s, %s, %s, %s, %s, %s, %s", suffix, release, patch, build, extra_str.c_str(), (unsigned long)num_xml_namespaces, ((num_xml_namespaces || (control_ns && control_ns_prefix)) ? "xml_namespaces" : "0"), has_post_init ? "post_init_module" : "NULL", has_set_param ? "set_module_param" : "NULL", + has_get_param ? "get_module_param" : "NULL", has_log_param ? "log_module_param" : "NULL", has_init_comp ? "init_comp_type" : "NULL", has_start ? "start_ptc_function" : "NULL", @@ -1045,6 +1064,8 @@ namespace Common { FATAL_ERROR("Module::generate_functions(): post_init function in ASN.1 module"); if (has_set_param) FATAL_ERROR("Module::generate_functions(): set_param function in ASN.1 module"); + if (has_get_param) + FATAL_ERROR("Module::generate_functions(): get_param function in ASN.1 module"); if (has_log_param) FATAL_ERROR("Module::generate_functions(): log_param function in ASN.1 module"); if (has_init_comp) diff --git a/compiler2/AST.hh b/compiler2/AST.hh index ddb99c2..7de62e8 100644 --- a/compiler2/AST.hh +++ b/compiler2/AST.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Code.cc b/compiler2/Code.cc index f9769d9..e5ff356 100644 --- a/compiler2/Code.cc +++ b/compiler2/Code.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -39,6 +39,7 @@ namespace Common { output->functions.pre_init = NULL; output->functions.post_init = NULL; output->functions.set_param = NULL; + output->functions.get_param = NULL; output->functions.log_param = NULL; output->functions.init_comp = NULL; output->functions.start = NULL; @@ -92,6 +93,8 @@ namespace Common { mputstr(dest->functions.post_init, src->functions.post_init); dest->functions.set_param = mputstr(dest->functions.set_param, src->functions.set_param); + dest->functions.get_param = + mputstr(dest->functions.get_param, src->functions.get_param); dest->functions.log_param = mputstr(dest->functions.log_param, src->functions.log_param); dest->functions.init_comp = @@ -124,6 +127,7 @@ namespace Common { Free(output->functions.pre_init); Free(output->functions.post_init); Free(output->functions.set_param); + Free(output->functions.get_param); Free(output->functions.log_param); Free(output->functions.init_comp); Free(output->functions.start); diff --git a/compiler2/Code.hh b/compiler2/Code.hh index 8f8cac7..a15d32a 100644 --- a/compiler2/Code.hh +++ b/compiler2/Code.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/CodeGenHelper.cc b/compiler2/CodeGenHelper.cc index d096883..4d6f16b 100644 --- a/compiler2/CodeGenHelper.cc +++ b/compiler2/CodeGenHelper.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -210,6 +210,7 @@ void CodeGenHelper::finalize_generation(Type* type) { transfer_value(dst.functions.post_init, src.functions.post_init); transfer_value(dst.functions.set_param, src.functions.set_param); + transfer_value(dst.functions.get_param, src.functions.get_param); transfer_value(dst.functions.log_param, src.functions.log_param); transfer_value(dst.functions.init_comp, src.functions.init_comp); transfer_value(dst.functions.start, src.functions.start); diff --git a/compiler2/CodeGenHelper.hh b/compiler2/CodeGenHelper.hh index cee1242..d07c837 100644 --- a/compiler2/CodeGenHelper.hh +++ b/compiler2/CodeGenHelper.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/CompField.cc b/compiler2/CompField.cc index 07a7b0a..bd3298d 100644 --- a/compiler2/CompField.cc +++ b/compiler2/CompField.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/CompField.hh b/compiler2/CompField.hh index c65aa02..b07f615 100644 --- a/compiler2/CompField.hh +++ b/compiler2/CompField.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/CompType.cc b/compiler2/CompType.cc index 3f09be2..f14825f 100644 --- a/compiler2/CompType.cc +++ b/compiler2/CompType.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/CompType.hh b/compiler2/CompType.hh index eb14224..c131d57 100644 --- a/compiler2/CompType.hh +++ b/compiler2/CompType.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/CompilerError.cc b/compiler2/CompilerError.cc index 2b438fa..e90ae49 100644 --- a/compiler2/CompilerError.cc +++ b/compiler2/CompilerError.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/CompilerError.hh b/compiler2/CompilerError.hh index 9405a00..bf62b06 100644 --- a/compiler2/CompilerError.hh +++ b/compiler2/CompilerError.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Constraint.cc b/compiler2/Constraint.cc index 3ba9c51..e820ed9 100644 --- a/compiler2/Constraint.cc +++ b/compiler2/Constraint.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Constraint.hh b/compiler2/Constraint.hh index 59d2fac..5f89638 100644 --- a/compiler2/Constraint.hh +++ b/compiler2/Constraint.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/EnumItem.cc b/compiler2/EnumItem.cc index c125b48..5b24ace 100644 --- a/compiler2/EnumItem.cc +++ b/compiler2/EnumItem.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -61,21 +61,6 @@ void EnumItem::set_text(const string& p_text) text = p_text; } -string EnumItem::get_name_hacked(Type *p_type) const -{ - if (p_type->is_asn1()) { - string hack_asnname(Identifier::name_2_asn(p_type->get_genname_own())); - hack_asnname += "-enum-"; - hack_asnname += name->get_asnname(); - return Identifier::asn_2_name(hack_asnname); - } else { - string hack_ttcnname(Identifier::name_2_ttcn(p_type->get_genname_own())); - hack_ttcnname += "_enum_"; - hack_ttcnname += name->get_ttcnname(); - return Identifier::ttcn_2_name(hack_ttcnname); - } -} - void EnumItem::dump(unsigned level) const { name->dump(level); diff --git a/compiler2/EnumItem.hh b/compiler2/EnumItem.hh index 62be404..2ff8fa3 100644 --- a/compiler2/EnumItem.hh +++ b/compiler2/EnumItem.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -33,8 +33,6 @@ public: virtual EnumItem *clone() const; virtual void set_fullname(const string& p_fullname); const Identifier& get_name() const { return *name; } - /// Return the name for the "enum hack" - string get_name_hacked(Type *p_type) const; Value *get_value() const { return value; } void set_value(Value *p_value); const string& get_text() const { return text; } diff --git a/compiler2/Identifier.cc b/compiler2/Identifier.cc index 9632a0e..10f8b4d 100644 --- a/compiler2/Identifier.cc +++ b/compiler2/Identifier.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Identifier.hh b/compiler2/Identifier.hh index b0ee3e8..c01df15 100644 --- a/compiler2/Identifier.hh +++ b/compiler2/Identifier.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Int.cc b/compiler2/Int.cc index 3c1bee7..456f32b 100644 --- a/compiler2/Int.cc +++ b/compiler2/Int.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Int.hh b/compiler2/Int.hh index 9f25995..8de6b0c 100644 --- a/compiler2/Int.hh +++ b/compiler2/Int.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Makefile b/compiler2/Makefile index 61ef64f..8499fe4 100644 --- a/compiler2/Makefile +++ b/compiler2/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/compiler2/PredefFunc.cc b/compiler2/PredefFunc.cc index 9b0f083..746cde2 100644 --- a/compiler2/PredefFunc.cc +++ b/compiler2/PredefFunc.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/PredefFunc.hh b/compiler2/PredefFunc.hh index 0131b42..3720a22 100644 --- a/compiler2/PredefFunc.hh +++ b/compiler2/PredefFunc.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/ProjectGenHelper.cc b/compiler2/ProjectGenHelper.cc index 991449e..4b47535 100644 --- a/compiler2/ProjectGenHelper.cc +++ b/compiler2/ProjectGenHelper.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -226,7 +226,7 @@ std::string ProjectDescriptor::setRelativePathTo(const std::string& absPathTo) } if (length == i) { // got subdirectory if (projectAbsWorkingDir == absPathTo) { - return std::string("."); // the same pathes were given + return std::string("."); // the same paths were given } else if ((projectAbsWorkingDir.size() > absPathTo.size() && projectAbsWorkingDir.at(length) == SEPARATOR) || (projectAbsWorkingDir.size() < absPathTo.size() && absPathTo.at(length) == SEPARATOR)) @@ -495,22 +495,22 @@ void ProjectGenHelper::getExternalLibs(std::vector& extLibs) } } -void ProjectGenHelper::getExternalLibSearchPathes(std::vector& extLibPathes) +void ProjectGenHelper::getExternalLibSearchPaths(std::vector& extLibPaths) { if (!Zflag) return; - std::map libPathes; + std::map libPaths; for (std::map::iterator it = projs.begin(); it != projs.end(); ++it) { if ((it->second).numOfLibSearchPaths() > 0) { for (size_t i = 0; i < (it->second).numOfLibSearchPaths(); ++i) { const char* key = (it->second).getLibSearchPath(i); const char* value = (it->second).getProjectName().c_str(); - libPathes.insert(std::pair(key,value)); // filter duplicates + libPaths.insert(std::pair(key,value)); // filter duplicates } } } std::map::iterator it; - for (it = libPathes.begin(); it != libPathes.end(); ++it) { - extLibPathes.push_back(it->first); + for (it = libPaths.begin(); it != libPaths.end(); ++it) { + extLibPaths.push_back(it->first); } } diff --git a/compiler2/ProjectGenHelper.hh b/compiler2/ProjectGenHelper.hh index 638633b..df661cb 100644 --- a/compiler2/ProjectGenHelper.hh +++ b/compiler2/ProjectGenHelper.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -122,7 +122,7 @@ public: std::map::const_iterator getEnd() const; size_t numOfLibs() const; void getExternalLibs(std::vector& extLibs); - void getExternalLibSearchPathes(std::vector& extLibPathes); + void getExternalLibSearchPaths(std::vector& extLibPaths); bool hasReferencedProject(); size_t numOfProjects() const { return projs.size();}; bool isCPPSourceFile(const char* fileName) const; diff --git a/compiler2/Real.cc b/compiler2/Real.cc index 0a15eda..41f486b 100644 --- a/compiler2/Real.cc +++ b/compiler2/Real.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Real.hh b/compiler2/Real.hh index 1e5380b..8920ed8 100644 --- a/compiler2/Real.hh +++ b/compiler2/Real.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Setting.cc b/compiler2/Setting.cc index 47e5a73..b8262e0 100644 --- a/compiler2/Setting.cc +++ b/compiler2/Setting.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Setting.hh b/compiler2/Setting.hh index 82f1bfc..b46986c 100644 --- a/compiler2/Setting.hh +++ b/compiler2/Setting.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/SigParam.cc b/compiler2/SigParam.cc index 739edff..e7f956f 100644 --- a/compiler2/SigParam.cc +++ b/compiler2/SigParam.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/SigParam.hh b/compiler2/SigParam.hh index c32592c..1f2b9ee 100644 --- a/compiler2/SigParam.hh +++ b/compiler2/SigParam.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Stopwatch.cc b/compiler2/Stopwatch.cc index 7495079..49f727e 100644 --- a/compiler2/Stopwatch.cc +++ b/compiler2/Stopwatch.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Stopwatch.hh b/compiler2/Stopwatch.hh index 8fcbdfb..b2918fb 100644 --- a/compiler2/Stopwatch.hh +++ b/compiler2/Stopwatch.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Type.cc b/compiler2/Type.cc index fd06d5d..40b83b8 100644 --- a/compiler2/Type.cc +++ b/compiler2/Type.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -1591,6 +1591,10 @@ namespace Common { Ttcn::FieldOrArrayRef *ref = subrefs->get_ref(i); switch (ref->get_type()) { case Ttcn::FieldOrArrayRef::FIELD_REF: { + if (t->typetype == T_OPENTYPE) { + // allow the alternatives of open types as both lower and upper identifiers + ref->set_field_name_to_lowercase(); + } const Identifier& id = *ref->get_id(); switch (t->typetype) { case T_CHOICE_A: @@ -2006,7 +2010,7 @@ namespace Common { } break; case T_SEQ_T: - case T_SET_T: + case T_SET_T: { if(rawattrib){ size_t fieldnum; for(int c=0;ctaglist.nElements;c++) { // check TAG @@ -2175,6 +2179,7 @@ namespace Common { } } } + int used_bits = 0; // number of bits used to store all previous fields for(size_t i = 0; i < get_nof_comps(); i++) { // field attributes CompField *cf = get_comp_byIndex(i); const Identifier& field_id = cf->get_name(); @@ -2183,6 +2188,27 @@ namespace Common { field_type->force_raw(); RawAST *rawpar = field_type->rawattrib; if (rawpar) { + if (rawpar->prepadding != 0) { + used_bits = (used_bits + rawpar->prepadding - 1) / rawpar->prepadding * + rawpar->prepadding; + } + if (rawpar->intx && field_type_last->get_typetype() == T_INT) { // IntX + if (used_bits % 8 != 0 && + (!rawattrib || rawattrib->fieldorder != XDEFMSB)) { + error("Using RAW parameter IntX in a record/set with FIELDORDER " + "set to 'lsb' is only supported if the IntX field starts at " + "the beginning of a new octet. There are %d unused bits in the " + "last octet before field %s.", 8 - (used_bits % 8), + field_id.get_dispname().c_str()); + } + } + else { + used_bits += rawpar->fieldlength; + } + if (rawpar->padding != 0) { + used_bits = (used_bits + rawpar->padding - 1) / rawpar->padding * + rawpar->padding; + } for (int j = 0; j < rawpar->lengthto_num; j++) { // LENGTHTO Identifier *idf = rawpar->lengthto[j]; if (!has_comp_withName(*idf)) { @@ -2400,7 +2426,7 @@ namespace Common { } } } - break; + break; } case T_BSTR: if(rawattrib->fieldlength==0 && rawattrib->length_restrition!=-1){ rawattrib->fieldlength=rawattrib->length_restrition; @@ -2447,8 +2473,14 @@ namespace Common { "(64)", rawattrib->fieldlength, get_fullname().c_str()); } break; - case T_ENUM_T: case T_INT: + if (rawattrib->intx) { + rawattrib->bitorderinfield = XDEFMSB; + rawattrib->bitorderinoctet = XDEFMSB; + rawattrib->byteorder = XDEFMSB; + } + break; + case T_ENUM_T: case T_BOOL: default: // nothing to do, ASN1 types or types without defined raw attribute @@ -2617,6 +2649,17 @@ namespace Common { chk_text(); } + static const char* JSON_SCHEMA_KEYWORDS[] = { + // built-in JSON schema keywords + "$ref", "type", "properties", "items", "anyOf", "enum", "pattern", + "default", "minItems", "maxItems", "additionalProperties", "fieldOrder", + "required", "$schema", "minLength", "maxLength", "minimum", "maximum", + "excludeMinimum", "excludeMaximum", "allOf" + // TITAN-specific keywords + "originalName", "unusedAlias", "subType", "numericValues", "omitAsNull", + "encoding", "decoding" + }; + void Type::chk_json() { if (json_checked) return; @@ -2637,6 +2680,7 @@ namespace Common { break; } case T_SEQOF: case T_SETOF: + case T_ARRAY: get_ofType()->force_json(); break; default: @@ -2671,6 +2715,71 @@ namespace Common { if (NULL != jsonattrib->default_value) { chk_json_default(); } + + const size_t nof_extensions = jsonattrib->schema_extensions.size(); + if (0 != nof_extensions) { + const size_t nof_keywords = sizeof(JSON_SCHEMA_KEYWORDS) / sizeof(char*); + + // these keep track of erroneous extensions so each warning is only + // displayed once + char* checked_extensions = new char[nof_extensions]; + char* checked_keywords = new char[nof_keywords]; + memset(checked_extensions, 0, nof_extensions); + memset(checked_keywords, 0, nof_keywords); + + for (size_t i = 0; i < nof_extensions; ++i) { + for (size_t j = 0; j < nof_keywords; ++j) { + if (0 == checked_extensions[i] && 0 == checked_keywords[j] && + 0 == strcmp(jsonattrib->schema_extensions[i]->key, + JSON_SCHEMA_KEYWORDS[j])) { + // only report the warning once for each keyword + warning("JSON schema keyword '%s' should not be used as the key of " + "attribute 'extend'", JSON_SCHEMA_KEYWORDS[j]); + checked_keywords[j] = 1; + checked_extensions[i] = 1; + break; + } + } + if (0 == checked_extensions[i]) { + for (size_t k = i + 1; k < nof_extensions; ++k) { + if (0 == strcmp(jsonattrib->schema_extensions[i]->key, + jsonattrib->schema_extensions[k]->key)) { + if (0 == checked_extensions[i]) { + // only report the warning once for each unique key + warning("Key '%s' is used multiple times in 'extend' attributes " + "of type '%s'", jsonattrib->schema_extensions[i]->key, + get_typename().c_str()); + checked_extensions[i] = 1; + } + checked_extensions[k] = 1; + } + } + } + } + delete[] checked_extensions; + delete[] checked_keywords; + } + if (jsonattrib->metainfo_unbound) { + Type* parent = get_parent_type(); + if (T_SEQ_T == get_type_refd_last()->typetype || + T_SET_T == get_type_refd_last()->typetype) { + // if it's set for the record/set, pass it onto its fields + size_t nof_comps = get_nof_comps(); + for (size_t i = 0; i < nof_comps; i++) { + Type* comp_type = get_comp_byIndex(i)->get_type(); + if (NULL == comp_type->jsonattrib) { + comp_type->jsonattrib = new JsonAST; + } + comp_type->jsonattrib->metainfo_unbound = true; + } + } + else if (NULL == parent || (T_SEQ_T != parent->typetype && + T_SET_T != parent->typetype)) { + // only allowed if it's a field of a record/set + error("Invalid attribute 'metainfo for unbound', requires record, set, " + "or field of a record or set"); + } + } } } @@ -5258,9 +5367,6 @@ end_ext: const string& spec = s.get_attribSpec().get_spec(); if (spec == get_encoding_name(encoding_type)) { return true; - } else { - // if it has an encode other than the one we're looking for, quit now - return false; } } // if ENCODE } // for @@ -5512,8 +5618,6 @@ end_ext: if (spec == ex_emm_ell // the right answer ||spec == ex_ee_arr) // the acceptable answer return memory.remember(t, ANSWER_YES); - else // if it has an encode other than XER, quit now - return memory.remember(t, ANSWER_NO); } // if ENCODE } // for } // next a diff --git a/compiler2/Type.hh b/compiler2/Type.hh index 29f8595..57eee7a 100644 --- a/compiler2/Type.hh +++ b/compiler2/Type.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -1169,6 +1169,8 @@ namespace Common { /** Generates a reference to this type's schema segment and inserts it into * the given schema. */ void generate_json_schema_ref(JSON_Tokenizer& json); + + JsonAST* get_json_attributes() const { return jsonattrib; } }; /** @} end of AST_Type group */ diff --git a/compiler2/TypeCompat.cc b/compiler2/TypeCompat.cc index 4e58d7a..96400fb 100644 --- a/compiler2/TypeCompat.cc +++ b/compiler2/TypeCompat.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/TypeCompat.hh b/compiler2/TypeCompat.hh index 02e2c7b..ef36e3b 100644 --- a/compiler2/TypeCompat.hh +++ b/compiler2/TypeCompat.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Type_chk.cc b/compiler2/Type_chk.cc index d3861eb..d3bf10e 100644 --- a/compiler2/Type_chk.cc +++ b/compiler2/Type_chk.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -1522,7 +1522,7 @@ void Type::chk_xer_untagged() // found the component if (cf->get_is_optional() || cf->get_defval() != 0) { error("Type with final encoding attribute UNTAGGED" - " shall not have OPIONAL or DEFAULT"); + " shall not have OPTIONAL or DEFAULT"); } break; } @@ -3938,6 +3938,10 @@ bool Type::chk_this_value_Choice(Value *value, Common::Assignment *lhs, } // no break case Value::V_CHOICE: { + if (!value->is_asn1() && typetype == T_OPENTYPE) { + // allow the alternatives of open types as both lower and upper identifiers + value->set_alt_name_to_lowercase(); + } const Identifier& alt_name = value->get_alt_name(); if(!has_comp_withName(alt_name)) { if (value->is_asn1()) { @@ -5354,7 +5358,8 @@ bool Type::chk_this_template_generic(Template *t, namedbool incomplete_allowed, t_comp->set_my_governor(this); chk_this_template_ref(t_comp); self_ref |= chk_this_template_generic(t_comp, INCOMPLETE_NOT_ALLOWED, - allow_omit, ANY_OR_OMIT_ALLOWED, sub_chk, implicit_omit, lhs); + omit_in_value_list ? OMIT_ALLOWED : OMIT_NOT_ALLOWED, + ANY_OR_OMIT_ALLOWED, sub_chk, implicit_omit, lhs); if(temptype==Ttcn::Template::COMPLEMENTED_LIST && t_comp->get_template_refd_last()->get_templatetype() == Ttcn::Template::ANY_OR_OMIT) @@ -5724,10 +5729,10 @@ void Type::chk_this_template_Int_Real(Template *t) FATAL_ERROR("Type::chk_this_template_Int_Real()"); } } - if (v_lower && !v_upper) { + if (v_lower && !vr->get_max_v()) { chk_range_boundary_infinity(v_lower, true); } - if (!v_lower && v_upper) { + if (!vr->get_min_v() && v_upper) { chk_range_boundary_infinity(v_upper, false); } break;} @@ -5761,6 +5766,10 @@ bool Type::chk_this_template_Choice(Template *t, namedbool is_modified, // to have more than one here. for (size_t i = 0; i < nof_nts; i++) { Ttcn::NamedTemplate *nt = t->get_namedtemp_byIndex(i); + if (typetype == T_OPENTYPE) { + // allow the alternatives of open types as both lower and upper identifiers + nt->set_name_to_lowercase(); + } const Identifier& nt_name = nt->get_name(); if (!has_comp_withName(nt_name)) { diff --git a/compiler2/Type_codegen.cc b/compiler2/Type_codegen.cc index 5be67c2..cfddb7a 100644 --- a/compiler2/Type_codegen.cc +++ b/compiler2/Type_codegen.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -650,7 +650,12 @@ void Type::generate_code_rawdescriptor(output_struct *target) "extern const TTCN_RAWdescriptor_t %s_raw_;\n", gennameown_str); char *str = mprintf("const TTCN_RAWdescriptor_t %s_raw_ = {", gennameown_str); - str = mputprintf(str, "%d,", rawattrib->fieldlength); + if (rawattrib->intx) { + str = mputstr(str, "RAW_INTX,"); + } + else { + str = mputprintf(str, "%d,", rawattrib->fieldlength); + } if (rawattrib->comp == XDEFCOMPL) str = mputstr(str, "SG_2COMPL,"); else if (rawattrib->comp == XDEFSIGNBIT) str = mputstr(str, "SG_SG_BIT,"); else str = mputstr(str, "SG_NO,"); @@ -967,19 +972,20 @@ void Type::generate_code_jsondescriptor(output_struct *target) if (NULL == jsonattrib) { target->source.global_vars = mputprintf(target->source.global_vars, - "const TTCN_JSONdescriptor_t %s_json_ = { false, NULL, false, NULL };\n" + "const TTCN_JSONdescriptor_t %s_json_ = { false, NULL, false, NULL, false };\n" , get_genname_own().c_str()); } else { char* alias = jsonattrib->alias ? mputprintf(NULL, "\"%s\"", jsonattrib->alias) : NULL; char* def_val = jsonattrib->default_value ? mputprintf(NULL, "\"%s\"", jsonattrib->default_value) : NULL; target->source.global_vars = mputprintf(target->source.global_vars, - "const TTCN_JSONdescriptor_t %s_json_ = { %s, %s, %s, %s };\n" + "const TTCN_JSONdescriptor_t %s_json_ = { %s, %s, %s, %s, %s };\n" , get_genname_own().c_str() , jsonattrib->omit_as_null ? "true" : "false" , alias ? alias : "NULL" , jsonattrib->as_value ? "true" : "false" - , def_val ? def_val : "NULL"); + , def_val ? def_val : "NULL" + , jsonattrib->metainfo_unbound ? "true" : "false"); Free(alias); Free(def_val); } @@ -1098,6 +1104,25 @@ void Type::generate_code_Choice(output_struct *target) sdef.opentype_outermost = get_is_opentype_outermost(); sdef.ot = generate_code_ot(pool); sdef.nElements = get_nof_comps(); + sdef.isOptional = false; + if (parent_type != NULL) { + switch (parent_type->typetype) { + case T_SEQ_T: + case T_SEQ_A: + case T_SET_T: + case T_SET_A: + for (size_t x = 0; x < parent_type->get_nof_comps(); ++x) { + CompField * cf = parent_type->get_comp_byIndex(x); + if (cf->get_type() == this && cf->get_is_optional()) { + sdef.isOptional = true; + break; // from the for loop + } + } + break; + default: + break; + } + } sdef.elements = (struct_field*) Malloc(sdef.nElements*sizeof(*sdef.elements)); memset(sdef.elements, 0, sdef.nElements*sizeof(*sdef.elements)); @@ -1124,30 +1149,56 @@ void Type::generate_code_Choice(output_struct *target) typetype_t tt = cftype->get_type_refd_last()->typetype; switch(tt) { case T_INT: + case T_INT_A: sdef.elements[i].jsonValueType = JSON_NUMBER; break; case T_REAL: sdef.elements[i].jsonValueType = JSON_NUMBER | JSON_STRING; break; case T_BOOL: - sdef.elements[i].jsonValueType = JSON_LITERAL; + sdef.elements[i].jsonValueType = JSON_BOOLEAN; + break; + case T_NULL: + sdef.elements[i].jsonValueType = JSON_NULL; break; case T_BSTR: + case T_BSTR_A: case T_HSTR: case T_OSTR: case T_CSTR: case T_USTR: + case T_UTF8STRING: + case T_NUMERICSTRING: + case T_PRINTABLESTRING: + case T_TELETEXSTRING: + case T_VIDEOTEXSTRING: + case T_IA5STRING: + case T_GRAPHICSTRING: + case T_VISIBLESTRING: + case T_GENERALSTRING: + case T_UNIVERSALSTRING: + case T_BMPSTRING: case T_VERDICT: case T_ENUM_T: + case T_ENUM_A: + case T_OID: + case T_ROID: + case T_ANY: sdef.elements[i].jsonValueType = JSON_STRING; break; case T_SEQ_T: + case T_SEQ_A: case T_SET_T: + case T_SET_A: case T_CHOICE_T: + case T_CHOICE_A: + case T_ANYTYPE: + case T_OPENTYPE: sdef.elements[i].jsonValueType = JSON_OBJECT; break; case T_SEQOF: case T_SETOF: + case T_ARRAY: sdef.elements[i].jsonValueType = JSON_ARRAY; break; default: @@ -1531,6 +1582,7 @@ void Type::generate_code_Se(output_struct *target) cur.jsonOmitAsNull = type->jsonattrib->omit_as_null; cur.jsonAlias = type->jsonattrib->alias; cur.jsonDefaultValue = type->jsonattrib->default_value; + cur.jsonMetainfoUnbound = type->jsonattrib->metainfo_unbound; } // if jsonattrib } // next element @@ -1845,7 +1897,7 @@ void Type::generate_code_SeOf(output_struct *target) case T_UNIVERSALSTRING: case T_BMPSTRING: case T_OBJECTDESCRIPTOR: - target->header.typedefs = mputprintf(target->header.typedefs, + target->header.class_decls = mputprintf(target->header.class_decls, "typedef PreGenRecordOf::PREGEN__%s__OF__UNIVERSAL__CHARSTRING%s %s;\n" "typedef PreGenRecordOf::PREGEN__%s__OF__UNIVERSAL__CHARSTRING%s_template %s_template;\n", (typetype == T_SEQOF) ? "RECORD" : "SET", @@ -1854,7 +1906,9 @@ void Type::generate_code_SeOf(output_struct *target) optimized_memalloc ? "__OPTIMIZED" : "", get_genname_own().c_str()); return; default: - target->header.typedefs = mputprintf(target->header.typedefs, + // generate these in the class declarations part, they need to be + // outside of the include guard in case of circular imports + target->header.class_decls = mputprintf(target->header.class_decls, "typedef PreGenRecordOf::PREGEN__%s__OF__%s%s %s;\n" "typedef PreGenRecordOf::PREGEN__%s__OF__%s%s_template %s_template;\n", (typetype == T_SEQOF) ? "RECORD" : "SET", oftypename.c_str(), @@ -2172,7 +2226,7 @@ void Type::generate_code_done(output_struct *target) "component_reference.log();\n" "TTCN_Logger::log_event_str(\" failed: Return value does not match " "the template: \");\n" - "value_template.log_match(return_value);\n" + "value_template.log_match(return_value%s);\n" "TTCN_Logger::end_event();\n" "}\n" "return ALT_NO;\n" @@ -2180,7 +2234,7 @@ void Type::generate_code_done(output_struct *target) "} else return ret_val;\n" "}\n\n", genname_str, genname_str, dispname_str, genname_str, dispname_str, - dispname_str); + dispname_str, omit_in_value_list ? ", TRUE" : ""); } bool Type::ispresent_anyvalue_embedded_field(Type* t, @@ -2352,8 +2406,9 @@ void Type::generate_code_ispresentbound(expression_struct *expr, is_template?"_template":"", tmp_id_str); expr->expr = mputprintf(expr->expr, - "%s = %s.%s();\n", global_id.c_str(), - tmp_id2_str, isbound ? "is_bound" : "is_present"); + "%s = %s.%s(%s);\n", global_id.c_str(), + tmp_id2_str, isbound ? "is_bound" : "is_present", + (!isbound && is_template && omit_in_value_list) ? "TRUE" : ""); Free(tmp_generalid_str); tmp_generalid_str = mcopystr(tmp_id2_str); @@ -2409,8 +2464,9 @@ void Type::generate_code_ispresentbound(expression_struct *expr, id.get_name().c_str()); expr->expr = mputprintf(expr->expr, - "%s = %s.%s();\n", global_id.c_str(), - tmp_id_str, isbound||(i!=(nof_refs-1)) ? "is_bound" : "is_present"); + "%s = %s.%s(%s);\n", global_id.c_str(), + tmp_id_str, isbound||(i!=(nof_refs-1)) ? "is_bound" : "is_present", + (!(isbound||(i!=(nof_refs-1))) && is_template && omit_in_value_list) ? "TRUE" : ""); Free(tmp_generalid_str); tmp_generalid_str = mcopystr(tmp_id_str); } @@ -2496,9 +2552,10 @@ void Type::generate_code_ispresentbound(expression_struct *expr, if (is_string_element) { expr->expr = mputprintf(expr->expr, - "%s = %s[%s].%s();\n", global_id.c_str(), + "%s = %s[%s].%s(%s);\n", global_id.c_str(), tmp_generalid_str, tmp_index_id_str, - isbound||(i!=(nof_refs-1)) ? "is_bound" : "is_present"); + isbound||(i!=(nof_refs-1)) ? "is_bound" : "is_present", + (!(isbound||(i!=(nof_refs-1))) && is_template && omit_in_value_list) ? "TRUE" : ""); } else { if (is_template) { expr->expr = mputprintf(expr->expr, @@ -2515,8 +2572,9 @@ void Type::generate_code_ispresentbound(expression_struct *expr, } expr->expr = mputprintf(expr->expr, - "%s = %s.%s();\n", global_id.c_str(), tmp_id_str, - isbound||(i!=(nof_refs-1)) ? "is_bound" : "is_present"); + "%s = %s.%s(%s);\n", global_id.c_str(), tmp_id_str, + isbound||(i!=(nof_refs-1)) ? "is_bound" : "is_present", + (!(isbound||(i!=(nof_refs-1))) && is_template && omit_in_value_list) ? "TRUE" : ""); } Free(tmp_generalid_str); @@ -2689,22 +2747,56 @@ void Type::generate_json_schema(JSON_Tokenizer& json, bool embedded, bool as_val Free(alias_str); } } - + // get the type at the end of the reference chain Type* last = get_type_refd_last(); - // if the type has its own definition and it's embedded in another type, then - // its schema already exists, only add a reference to it + // check if this is a reference to another type that has its own definition + Type* refd_type = NULL; + if (is_ref()) { + Type* iter = this; + while (iter->is_ref()) { + iter = iter->get_type_refd(); + if (iter->ownertype == OT_TYPE_DEF || /* TTCN-3 type definition */ + iter->ownertype == OT_TYPE_ASS) { /* ASN.1 type assignment */ + refd_type = iter; + break; + } + } + } + + // check if there are any type restrictions + boolean has_restrictions = sub_type != NULL && sub_type->has_json_schema(); + + // if it's a referenced type, then its schema already exists, only add a pointer to it // exception: instances of ASN.1 parameterized types, always embed their schemas - if (embedded && (!is_ref() || !get_type_refd()->pard_type_instance) && - (last->ownertype == OT_TYPE_DEF /* TTCN-3 type definition */ - || last->ownertype == OT_TYPE_ASS /* ASN.1 type assignment */ )) { + if (refd_type != NULL && !get_type_refd()->pard_type_instance) { + if (has_restrictions) { + // an 'allOf' structure is needed if this is a subtype, + // insert the pointer in the first part + json.put_next_token(JSON_TOKEN_NAME, "allOf"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + json.put_next_token(JSON_TOKEN_OBJECT_START); + } json.put_next_token(JSON_TOKEN_NAME, "$ref"); char* ref_str = mprintf("\"#/definitions/%s/%s\"", - last->my_scope->get_scope_mod()->get_modid().get_ttcnname().c_str(), - (is_ref() && last->pard_type_instance) ? get_type_refd()->get_dispname().c_str() : last->get_dispname().c_str()); + refd_type->my_scope->get_scope_mod()->get_modid().get_ttcnname().c_str(), + refd_type->get_dispname().c_str()); json.put_next_token(JSON_TOKEN_STRING, ref_str); Free(ref_str); + if (has_restrictions) { + // close the first part of the 'allOf' and insert the type restrictions + // in the second part + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_OBJECT_START); + + // pass the tokenizer to the subtype to insert the type restrictions' schema + sub_type->generate_json_schema(json); + + // close the second part and the 'allOf' structure itself + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_ARRAY_END); + } } else { // generate the schema for the referenced type switch (last->typetype) { @@ -2720,22 +2812,32 @@ void Type::generate_json_schema(JSON_Tokenizer& json, bool embedded, bool as_val json.put_next_token(JSON_TOKEN_STRING, "\"integer\""); break; case T_REAL: - // any of: JSON number or the special values as strings (in an enum) - json.put_next_token(JSON_TOKEN_NAME, "anyOf"); - json.put_next_token(JSON_TOKEN_ARRAY_START); - json.put_next_token(JSON_TOKEN_OBJECT_START); - json.put_next_token(JSON_TOKEN_NAME, "type"); - json.put_next_token(JSON_TOKEN_STRING, "\"number\""); - json.put_next_token(JSON_TOKEN_OBJECT_END); - json.put_next_token(JSON_TOKEN_OBJECT_START); - json.put_next_token(JSON_TOKEN_NAME, "enum"); - json.put_next_token(JSON_TOKEN_ARRAY_START); - json.put_next_token(JSON_TOKEN_STRING, "\"not_a_number\""); - json.put_next_token(JSON_TOKEN_STRING, "\"infinity\""); - json.put_next_token(JSON_TOKEN_STRING, "\"-infinity\""); - json.put_next_token(JSON_TOKEN_ARRAY_END); - json.put_next_token(JSON_TOKEN_OBJECT_END); - json.put_next_token(JSON_TOKEN_ARRAY_END); + if (has_restrictions) { + // adding restrictions after the type's schema wouldn't work here + // if the restrictions affect the special values + // use a special function that generates the schema segment for both + // the float type and its restrictions + sub_type->generate_json_schema_float(json); + has_restrictions = false; // so they aren't generated twice + } + else { + // any of: JSON number or the special values as strings (in an enum) + json.put_next_token(JSON_TOKEN_NAME, "anyOf"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + json.put_next_token(JSON_TOKEN_OBJECT_START); + json.put_next_token(JSON_TOKEN_NAME, "type"); + json.put_next_token(JSON_TOKEN_STRING, "\"number\""); + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_OBJECT_START); + json.put_next_token(JSON_TOKEN_NAME, "enum"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + json.put_next_token(JSON_TOKEN_STRING, "\"not_a_number\""); + json.put_next_token(JSON_TOKEN_STRING, "\"infinity\""); + json.put_next_token(JSON_TOKEN_STRING, "\"-infinity\""); + json.put_next_token(JSON_TOKEN_ARRAY_END); + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_ARRAY_END); + } break; case T_BSTR: case T_BSTR_A: @@ -2791,15 +2893,23 @@ void Type::generate_json_schema(JSON_Tokenizer& json, bool embedded, bool as_val json.put_next_token(JSON_TOKEN_STRING, "\"^[0-2][.][1-3]?[0-9]([.][0-9]|([1-9][0-9]+))*$\""); break; case T_VERDICT: - // enumerate the possible values - json.put_next_token(JSON_TOKEN_NAME, "enum"); - json.put_next_token(JSON_TOKEN_ARRAY_START); - json.put_next_token(JSON_TOKEN_STRING, "\"none\""); - json.put_next_token(JSON_TOKEN_STRING, "\"pass\""); - json.put_next_token(JSON_TOKEN_STRING, "\"inconc\""); - json.put_next_token(JSON_TOKEN_STRING, "\"fail\""); - json.put_next_token(JSON_TOKEN_STRING, "\"error\""); - json.put_next_token(JSON_TOKEN_ARRAY_END); + if (has_restrictions) { + // the restrictions would only add another JSON enum (after the one + /// generated below), instead just insert the one with the restrictions + sub_type->generate_json_schema(json); + has_restrictions = false; // so they aren't generated twice + } + else { + // enumerate the possible values + json.put_next_token(JSON_TOKEN_NAME, "enum"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + json.put_next_token(JSON_TOKEN_STRING, "\"none\""); + json.put_next_token(JSON_TOKEN_STRING, "\"pass\""); + json.put_next_token(JSON_TOKEN_STRING, "\"inconc\""); + json.put_next_token(JSON_TOKEN_STRING, "\"fail\""); + json.put_next_token(JSON_TOKEN_STRING, "\"error\""); + json.put_next_token(JSON_TOKEN_ARRAY_END); + } break; case T_ENUM_T: case T_ENUM_A: @@ -2847,6 +2957,11 @@ void Type::generate_json_schema(JSON_Tokenizer& json, bool embedded, bool as_val default: FATAL_ERROR("Type::generate_json_schema"); } + + if (has_restrictions) { + // pass the tokenizer to the subtype to insert the type restrictions' schema + sub_type->generate_json_schema(json); + } } // insert default value (if any) @@ -2880,6 +2995,16 @@ void Type::generate_json_schema(JSON_Tokenizer& json, bool embedded, bool as_val FATAL_ERROR("Type::generate_json_schema"); } } + + // insert schema extensions (if any) + if (jsonattrib != NULL) { + for (size_t i = 0; i < jsonattrib->schema_extensions.size(); ++i) { + json.put_next_token(JSON_TOKEN_NAME, jsonattrib->schema_extensions[i]->key); + char* value_str = mprintf("\"%s\"", jsonattrib->schema_extensions[i]->value); + json.put_next_token(JSON_TOKEN_STRING, value_str); + Free(value_str); + } + } // end of type's schema json.put_next_token(JSON_TOKEN_OBJECT_END); diff --git a/compiler2/Typestuff.cc b/compiler2/Typestuff.cc index 28125f4..867cad5 100644 --- a/compiler2/Typestuff.cc +++ b/compiler2/Typestuff.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Typestuff.hh b/compiler2/Typestuff.hh index 034e8f0..20c2f0e 100644 --- a/compiler2/Typestuff.hh +++ b/compiler2/Typestuff.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Value.cc b/compiler2/Value.cc index 7fb2f0b..1ea0cb0 100644 --- a/compiler2/Value.cc +++ b/compiler2/Value.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -30,6 +30,7 @@ #include "ttcn3/Statement.hh" #include "ttcn3/Attributes.hh" +#include "../common/JSON_Tokenizer.hh" #include #include @@ -9082,6 +9083,25 @@ error: if (valuetype != V_CHOICE) FATAL_ERROR("Value::get_alt_value()"); return u.choice.alt_value; } + + void Value::set_alt_name_to_lowercase() + { + if (valuetype != V_CHOICE) FATAL_ERROR("Value::set_alt_name_to_lowercase()"); + string new_name = u.choice.alt_name->get_name(); + if (isupper(new_name[0])) { + new_name[0] = tolower(new_name[0]); + if (new_name[new_name.size() - 1] == '_') { + // an underscore is inserted at the end of the alternative name if it's + // a basic type's name (since it would conflict with the class generated + // for that type) + // remove the underscore, it won't conflict with anything if its name + // starts with a lowercase letter + new_name.replace(new_name.size() - 1, 1, ""); + } + delete u.choice.alt_name; + u.choice.alt_name = new Identifier(Identifier::ID_NAME, new_name); + } + } bool Value::has_oid_error() { @@ -11343,7 +11363,7 @@ error: } expr->expr = mputstr(expr->expr, ".log_match("); u.expr.v1->generate_code_expr(expr); - expr->expr = mputc(expr->expr, ')'); + expr->expr = mputprintf(expr->expr, "%s)", omit_in_value_list ? ", TRUE" : ""); } void Value::generate_code_expr_expr(expression_struct *expr) @@ -11657,7 +11677,8 @@ error: expr->expr=mputstr(expr->expr, ".is_bound()"); break; case OPTYPE_ISPRESENT: - expr->expr=mputstr(expr->expr, ".is_present()"); + expr->expr=mputprintf(expr->expr, ".is_present(%s)", + omit_in_value_list ? "TRUE" : ""); break; case OPTYPE_SIZEOF: expr->expr=mputstr(expr->expr, ".size_of()"); @@ -11680,7 +11701,7 @@ error: u.expr.t2->generate_code(expr); expr->expr = mputstr(expr->expr, ".match("); u.expr.v1->generate_code_expr(expr); - expr->expr = mputc(expr->expr, ')'); + expr->expr = mputprintf(expr->expr, "%s)", omit_in_value_list ? ", TRUE" : ""); break; case OPTYPE_UNDEF_RUNNING: // it is resolved during semantic check @@ -12046,7 +12067,7 @@ error: Value* v4_last = v4->get_value_refd_last(); if ((v4_last->valuetype == V_SEQOF || v4_last->valuetype == V_SETOF) && !v4_last->u.val_vs->is_indexed() && v4_last->u.val_vs->get_nof_vs() == 0) { - expr->expr = mputprintf(expr->expr, "(%s)", v4->my_governor->get_stringRepr().c_str()); + expr->expr = mputprintf(expr->expr, "(%s)", v4->my_governor->get_genname_value(my_scope).c_str()); } v4->generate_code_expr_mandatory(expr); } @@ -12610,6 +12631,205 @@ error: } return str; } + + /** This type contains the JSON encoding type of an omitted optional field */ + enum omitted_json_value_t { + NOT_OMITTED, // the field is not omitted + OMITTED_ABSENT, // the omitted field is not present in the JSON object + OMITTED_NULL // the omitted field is set to 'null' in the JSON object + }; + + /** JSON code for omitted optional fields of can be generated in 2 ways: + * - the field is not present in the JSON object or + * - the field is present and its value is 'null'. + * Because of this all record/set values containing omitted fields have 2^N + * possible JSON encodings, where N is the number of omitted fields. + * + * This function helps go through all the possible encodings, by generating + * the next combination from a previous one. + * + * The algorithm is basically adding 1 to a binary number (where OMITTED_ABSENT + * is zero, OMITTED_NULL is one, all NOT_OMITTEDs are ignored and the first bit + * is the least significant bit). + * + * Usage: generate the first combination, where all omitted fields are absent + * (=all zeros), and keep calling this function until the last combination + * (where all omitted fields are 'null', = all ones) is reached. + * + * @return true, if the next combination was successfully generated, or + * false, when called with the last combination */ + static bool next_omitted_json_combo(int* omitted_fields, size_t len) + { + for (size_t i = 0; i < len; ++i) { + if (omitted_fields[i] == OMITTED_ABSENT) { + omitted_fields[i] = OMITTED_NULL; + for (size_t j = 0; j < i; ++j) { + if (omitted_fields[j] == OMITTED_NULL) { + omitted_fields[j] = OMITTED_ABSENT; + } + } + return true; + } + } + return false; + } + + void Value::generate_json_value(JSON_Tokenizer& json, bool allow_special_float /* = true */) + { + switch (valuetype) { + case V_INT: + json.put_next_token(JSON_TOKEN_NUMBER, get_val_Int()->t_str().c_str()); + break; + case V_REAL: { + Real r = get_val_Real(); + if (r == REAL_INFINITY) { + if (allow_special_float) { + json.put_next_token(JSON_TOKEN_STRING, "\"infinity\""); + } + } + else if (r == -REAL_INFINITY) { + if (allow_special_float) { + json.put_next_token(JSON_TOKEN_STRING, "\"-infinity\""); + } + } + else if (r != r) { + if (allow_special_float) { + json.put_next_token(JSON_TOKEN_STRING, "\"not_a_number\""); + } + } + else { + // true if decimal representation possible (use %f format) + bool decimal_repr = (r == 0.0) + || (r > -MAX_DECIMAL_FLOAT && r <= -MIN_DECIMAL_FLOAT) + || (r >= MIN_DECIMAL_FLOAT && r < MAX_DECIMAL_FLOAT); + char* number_str = mprintf(decimal_repr ? "%f" : "%e", r); + json.put_next_token(JSON_TOKEN_NUMBER, number_str); + Free(number_str); + } + break; } + case V_BOOL: + json.put_next_token(get_val_bool() ? JSON_TOKEN_LITERAL_TRUE : JSON_TOKEN_LITERAL_FALSE); + break; + case V_BSTR: + case V_HSTR: + case V_OSTR: + case V_CSTR: { + char* str = convert_to_json_string(get_val_str().c_str()); + json.put_next_token(JSON_TOKEN_STRING, str); + Free(str); + break; } + case V_USTR: { + char* str = convert_to_json_string(ustring_to_uft8(get_val_ustr()).c_str()); + json.put_next_token(JSON_TOKEN_STRING, str); + Free(str); + break; } + case V_VERDICT: + case V_ENUM: + json.put_next_token(JSON_TOKEN_STRING, + (string('\"') + create_stringRepr() + string('\"')).c_str()); + break; + case V_SEQOF: + case V_SETOF: + json.put_next_token(JSON_TOKEN_ARRAY_START); + if (!u.val_vs->is_indexed()) { + for (size_t i = 0; i < u.val_vs->get_nof_vs(); ++i) { + u.val_vs->get_v_byIndex(i)->generate_json_value(json); + } + } + else { + for (size_t i = 0; i < u.val_vs->get_nof_ivs(); ++i) { + // look for the entry with index equal to i + for (size_t j = 0; j < u.val_vs->get_nof_ivs(); ++j) { + if (u.val_vs->get_iv_byIndex(j)->get_index()->get_val_Int()->get_val() == (Int)i) { + u.val_vs->get_iv_byIndex(j)->get_value()->generate_json_value(json); + break; + } + } + } + } + json.put_next_token(JSON_TOKEN_ARRAY_END); + break; + case V_SEQ: + case V_SET: { + // omitted fields have 2 possible JSON values (the field is absent, or it's + // present with value 'null'), each combination of omitted values must be + // generated + size_t len = get_nof_comps(); + int* omitted_fields = new int[len]; // stores one combination + for (size_t i = 0; i < len; ++i) { + if (get_se_comp_byIndex(i)->get_value()->valuetype == V_OMIT) { + // all omitted fields are absent in the first combination + omitted_fields[i] = OMITTED_ABSENT; + } + else { + omitted_fields[i] = NOT_OMITTED; + } + } + do { + // generate the JSON object from the present combination + json.put_next_token(JSON_TOKEN_OBJECT_START); + for (size_t i = 0; i < len; ++i) { + if (omitted_fields[i] == OMITTED_ABSENT) { + // the field is absent, don't insert anything + continue; + } + // use the field's alias, if it has one + const char* alias = NULL; + if (my_governor != NULL) { + JsonAST* field_attrib = my_governor->get_comp_byName( + get_se_comp_byIndex(i)->get_name())->get_type()->get_json_attributes(); + if (field_attrib != NULL) { + alias = field_attrib->alias; + } + } + json.put_next_token(JSON_TOKEN_NAME, (alias != NULL) ? alias : + get_se_comp_byIndex(i)->get_name().get_ttcnname().c_str()); + if (omitted_fields[i] == OMITTED_NULL) { + json.put_next_token(JSON_TOKEN_LITERAL_NULL); + } + else { + get_se_comp_byIndex(i)->get_value()->generate_json_value(json); + } + } + json.put_next_token(JSON_TOKEN_OBJECT_END); + } // generate the next combination, until all combinations have been processed + while (next_omitted_json_combo(omitted_fields, len)); + break; } + case V_CHOICE: { + bool as_value = my_governor != NULL && + my_governor->get_type_refd_last()->get_json_attributes() != NULL && + my_governor->get_type_refd_last()->get_json_attributes()->as_value; + if (!as_value) { + // no 'as value' coding instruction, insert an object with one field + json.put_next_token(JSON_TOKEN_OBJECT_START); + // use the field's alias, if it has one + const char* alias = NULL; + if (my_governor != NULL) { + JsonAST* field_attrib = my_governor->get_comp_byName( + get_alt_name())->get_type()->get_json_attributes(); + if (field_attrib != NULL) { + alias = field_attrib->alias; + } + } + json.put_next_token(JSON_TOKEN_NAME, (alias != NULL) ? alias : + get_alt_name().get_ttcnname().c_str()); + } + get_alt_value()->generate_json_value(json); + if (!as_value) { + json.put_next_token(JSON_TOKEN_OBJECT_END); + } + break; } + case V_REFD: { + Value* v = get_value_refd_last(); + if (this != v) { + v->generate_json_value(json); + return; + } + } // no break + default: + FATAL_ERROR("Value::generate_json_value - %d", valuetype); + } + } bool Value::explicit_cast_needed(bool forIsValue) { diff --git a/compiler2/Value.hh b/compiler2/Value.hh index 61d324c..a163c21 100644 --- a/compiler2/Value.hh +++ b/compiler2/Value.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -15,6 +15,7 @@ #include "../common/ttcn3float.hh" class ustring; +class JSON_Tokenizer; namespace Asn { class Block; @@ -686,6 +687,12 @@ namespace Common { bool is_indexed() const; const Identifier& get_alt_name(); Value *get_alt_value(); + /** Sets the first letter in the name of the alternative to lowercase + * if it's an uppercase letter. + * Used on open types (the name of their alternatives can be given with both + * an uppercase or a lowercase first letter, and the generated code will need + * to use the lowercase version). */ + void set_alt_name_to_lowercase(); /** Returns whether the embedded object identifier components * contain any error. Applicable to OID/ROID values only. */ bool has_oid_error(); @@ -904,6 +911,11 @@ namespace Common { char *generate_code_init_refd(char *str, const char *name); public: + /** Generates JSON code from this value. Used in JSON schema generation. + * No code is generated for special float values NaN, INF and -INF if the + * 2nd parameter is false. */ + void generate_json_value(JSON_Tokenizer& json, bool allow_special_float = true); + /** Returns whether C++ explicit cast (type conversion) is necessary when * \a this is the argument of a send() or log() statement. True is returned * when the type of the C++ equivalent is ambiguous or is a built-in type @@ -979,7 +991,7 @@ namespace Common { static void generate_code_ap_default_value(expression_struct *expr, Value* value, Scope* scope); static void generate_code_ap_default_ti(expression_struct *expr, TemplateInstance* ti, Scope* scope); }; - + } // namespace Common #endif // _Common_Value_HH diff --git a/compiler2/Valuestuff.cc b/compiler2/Valuestuff.cc index bc243ba..5d49a4b 100644 --- a/compiler2/Valuestuff.cc +++ b/compiler2/Valuestuff.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/Valuestuff.hh b/compiler2/Valuestuff.hh index 619b5dc..a9b0c7c 100644 --- a/compiler2/Valuestuff.hh +++ b/compiler2/Valuestuff.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/XerAttributes.cc b/compiler2/XerAttributes.cc index c10a0fc..62dd84b 100644 --- a/compiler2/XerAttributes.cc +++ b/compiler2/XerAttributes.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/XerAttributes.hh b/compiler2/XerAttributes.hh index d9cd437..82e6028 100644 --- a/compiler2/XerAttributes.hh +++ b/compiler2/XerAttributes.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/AST_asn1.cc b/compiler2/asn1/AST_asn1.cc index 6e83b0b..342f3c4 100644 --- a/compiler2/asn1/AST_asn1.cc +++ b/compiler2/asn1/AST_asn1.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/AST_asn1.hh b/compiler2/asn1/AST_asn1.hh index 43eba03..33ad2f9 100644 --- a/compiler2/asn1/AST_asn1.hh +++ b/compiler2/asn1/AST_asn1.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Block.cc b/compiler2/asn1/Block.cc index 8764ddf..bbfd7ea 100644 --- a/compiler2/asn1/Block.cc +++ b/compiler2/asn1/Block.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Block.hh b/compiler2/asn1/Block.hh index e5a87fa..6c6862e 100644 --- a/compiler2/asn1/Block.hh +++ b/compiler2/asn1/Block.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Makefile b/compiler2/asn1/Makefile index 8dc4f99..473bbdd 100644 --- a/compiler2/asn1/Makefile +++ b/compiler2/asn1/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/compiler2/asn1/OCSV.cc b/compiler2/asn1/OCSV.cc index b217b4a..c417324 100644 --- a/compiler2/asn1/OCSV.cc +++ b/compiler2/asn1/OCSV.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/OCSV.hh b/compiler2/asn1/OCSV.hh index a9618ed..abaae0f 100644 --- a/compiler2/asn1/OCSV.hh +++ b/compiler2/asn1/OCSV.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Object.cc b/compiler2/asn1/Object.cc index 38d4d32..21751cd 100644 --- a/compiler2/asn1/Object.cc +++ b/compiler2/asn1/Object.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Object.hh b/compiler2/asn1/Object.hh index 3a801a8..98027d7 100644 --- a/compiler2/asn1/Object.hh +++ b/compiler2/asn1/Object.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Object0.hh b/compiler2/asn1/Object0.hh index 310fd65..3339107 100644 --- a/compiler2/asn1/Object0.hh +++ b/compiler2/asn1/Object0.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Ref.cc b/compiler2/asn1/Ref.cc index 0c7b52f..7c92d28 100644 --- a/compiler2/asn1/Ref.cc +++ b/compiler2/asn1/Ref.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Ref.hh b/compiler2/asn1/Ref.hh index ef8686c..77bf44c 100644 --- a/compiler2/asn1/Ref.hh +++ b/compiler2/asn1/Ref.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/TableConstraint.cc b/compiler2/asn1/TableConstraint.cc index fd6a820..42b6267 100644 --- a/compiler2/asn1/TableConstraint.cc +++ b/compiler2/asn1/TableConstraint.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/TableConstraint.hh b/compiler2/asn1/TableConstraint.hh index d89b247..188083d 100644 --- a/compiler2/asn1/TableConstraint.hh +++ b/compiler2/asn1/TableConstraint.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Tag.cc b/compiler2/asn1/Tag.cc index 72b6c64..9da1245 100644 --- a/compiler2/asn1/Tag.cc +++ b/compiler2/asn1/Tag.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Tag.hh b/compiler2/asn1/Tag.hh index 00b0eb8..e9dd5e4 100644 --- a/compiler2/asn1/Tag.hh +++ b/compiler2/asn1/Tag.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/TokenBuf.cc b/compiler2/asn1/TokenBuf.cc index 4435280..90babcd 100644 --- a/compiler2/asn1/TokenBuf.cc +++ b/compiler2/asn1/TokenBuf.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/TokenBuf.hh b/compiler2/asn1/TokenBuf.hh index a53f849..2f34def 100644 --- a/compiler2/asn1/TokenBuf.hh +++ b/compiler2/asn1/TokenBuf.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/Type_parse.cc b/compiler2/asn1/Type_parse.cc index f3b3fbe..edf2d68 100644 --- a/compiler2/asn1/Type_parse.cc +++ b/compiler2/asn1/Type_parse.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/asn1.hh b/compiler2/asn1/asn1.hh index bef4c7e..957d131 100644 --- a/compiler2/asn1/asn1.hh +++ b/compiler2/asn1/asn1.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/asn1_preparser.h b/compiler2/asn1/asn1_preparser.h index 5d41eed..3be85a9 100644 --- a/compiler2/asn1/asn1_preparser.h +++ b/compiler2/asn1/asn1_preparser.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/asn1/asn1_preparser.l b/compiler2/asn1/asn1_preparser.l index f15099c..ede9eca 100644 --- a/compiler2/asn1/asn1_preparser.l +++ b/compiler2/asn1/asn1_preparser.l @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/compiler2/asn1/asn1la.l b/compiler2/asn1/asn1la.l index 244302f..63dba48 100644 --- a/compiler2/asn1/asn1la.l +++ b/compiler2/asn1/asn1la.l @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -378,8 +378,6 @@ TITAN_ID [A-Za-z0-9 \-_]+ } <> { - Location loc(asn1_infile, yylineno); - loc.error("Unterminated `--' (missing newline at the end of file)"); yy_pop_state(); return 0; } diff --git a/compiler2/asn1/asn1p.y b/compiler2/asn1/asn1p.y index 8b7da2e..9131608 100644 --- a/compiler2/asn1/asn1p.y +++ b/compiler2/asn1/asn1p.y @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/compiler2/asn1/asn1p_old.h b/compiler2/asn1/asn1p_old.h index 146d57e..c328ff5 100644 --- a/compiler2/asn1/asn1p_old.h +++ b/compiler2/asn1/asn1p_old.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/compiler.1 b/compiler2/compiler.1 index 2df9a34..9739703 100644 --- a/compiler2/compiler.1 +++ b/compiler2/compiler.1 @@ -3,7 +3,7 @@ compiler \- TTCN-3 and ASN.1 to C++ translator .SH SYNOPSIS .B compiler -.RB "[\| " \-abcdfgijlLpqrRsStuwxXyY " \|]" +.RB "[\| " \-abcdfgijlLMpqrRsStuwxXyY " \|]" .RB "[\| " \-V .IR " verb_level" " \|]" .RB "[\| " \-K @@ -141,6 +141,22 @@ Usage of this option a bit enlarges the size of the generated code and slightly reduces execution speed. This flag is not recommended when the TTCN-3 test suite is used for load generation. .TP +.B \-M +Allows the use of the value +.B omit +in template lists and complemented template lists (legacy behavior). +If set, an omitted field will match a template list, if the value +.B omit +appears in the list, and it will match a complemented template list, if +.B omit +is not in the list (the +.B ifpresent +attribute can still be used for matching omitted fields). This also affects the +.B ispresent +operation and the +.B present +template restriction accordingly. +.TP .BI \-o " dir" The output files (including Test Port skeletons) will be placed into the directory specified by @@ -385,7 +401,7 @@ ITU-T Recommendations X.680-683: .SH AUTHOR This manpage is written by Janos Zoltan Szabo, Ericsson Telecom AB .br -Copyright (c) 2000-2014 Ericsson Telecom AB +Copyright (c) 2000-2015 Ericsson Telecom AB .br All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 diff --git a/compiler2/datatypes.h b/compiler2/datatypes.h index a49fe4b..66c7ff0 100644 --- a/compiler2/datatypes.h +++ b/compiler2/datatypes.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -36,11 +36,12 @@ typedef enum { typedef enum { JSON_NONE = 0x00, // no value type set (default) JSON_NUMBER = 0x01, // integer and float - JSON_STRING = 0x02, // all string types, the verdict type and enumerated values - JSON_LITERAL = 0x04, // boolean (true or false) - JSON_OBJECT = 0x08, // records, sets and unions - JSON_ARRAY = 0x10, // record of and set of - JSON_ANY_VALUE = 0x1F // unions with the "as value" coding instruction + JSON_STRING = 0x02, // all string types, the objid type, the verdict type and enumerated values + JSON_BOOLEAN = 0x04, // boolean (true or false) + JSON_OBJECT = 0x08, // records, sets, unions and the anytype + JSON_ARRAY = 0x10, // record of, set of and array + JSON_NULL = 0x20, // ASN.1 null type + JSON_ANY_VALUE = 0x3F // unions with the "as value" coding instruction } json_value_t; /* Compound type definitions */ @@ -68,6 +69,7 @@ typedef struct { unsigned short jsonValueType; boolean xerAttribute; boolean jsonOmitAsNull; + boolean jsonMetainfoUnbound; const char* jsonAlias; const char* jsonDefaultValue; /** true if the field is a record-of or set-of with optimized memory allocation */ @@ -105,6 +107,7 @@ typedef struct { boolean has_opentypes; boolean opentype_outermost; Opentype_t *ot; + boolean isOptional; /**< this structure is an optional field in a record/set */ } struct_def; /** record of, set of descriptor for code generation */ diff --git a/compiler2/encdec.c b/compiler2/encdec.c index 4d5362d..64bd7fa 100644 --- a/compiler2/encdec.c +++ b/compiler2/encdec.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/encdec.h b/compiler2/encdec.h index 3f9f88b..9a107ae 100644 --- a/compiler2/encdec.h +++ b/compiler2/encdec.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/enum.c b/compiler2/enum.c index 15ad0b5..1d58b2e 100644 --- a/compiler2/enum.c +++ b/compiler2/enum.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -298,6 +298,16 @@ void defEnumClass(const enum_def *edef, output_struct *output) def = mputstr(def, "int as_int() const { return enum2int(enum_value); }\n" "void from_int(int p_val) { *this = p_val; }\n"); + + /* TTCN-3 predefined function int2enum() */ + def = mputstr(def, "void int2enum(int int_val);\n"); + src = mputprintf(src, "void %s::int2enum(int int_val)\n" + "{\n" + "if (!is_valid_enum(int_val)) " + "TTCN_error(\"Assigning invalid numeric value %%d to a variable of " + "enumerated type %s.\", int_val);\n" + "enum_value = (%s)int_val;\n" + "}\n\n", name, dispname, enum_type); /* miscellaneous members */ def = mputprintf(def, "operator %s() const;\n", enum_type); @@ -354,12 +364,36 @@ void defEnumClass(const enum_def *edef, output_struct *output) "void %s::set_param(Module_Param& param)\n" "{\n" " param.basic_check(Module_Param::BC_VALUE, \"enumerated value\");\n" - " if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error(\"enumerated value\", \"%s\");\n" - " enum_value = str_to_enum(param.get_enumerated());\n" - " if (!is_valid_enum(enum_value)) {\n " + " Module_Param_Ptr mp = ¶m;\n" + " if (param.get_type() == Module_Param::MP_Reference) {\n" + /* enumerated values are also treated as references (containing only 1 name) by the parser; + first check if the reference name is a valid enumerated value */ + " char* enum_name = param.get_enumerated();\n" + /* get_enumerated() returns NULL if the reference contained more than one name */ + " enum_value = (enum_name != NULL) ? str_to_enum(enum_name) : %s;\n" + " if (is_valid_enum(enum_value)) {\n" + " return;\n" + " }\n" + /* it's not a valid enum value => dereference it! */ + " mp = param.get_referenced_param();\n" + " }\n" + " if (mp->get_type()!=Module_Param::MP_Enumerated) param.type_error(\"enumerated value\", \"%s\");\n" + " enum_value = str_to_enum(mp->get_enumerated());\n" + " if (!is_valid_enum(enum_value)) {\n" " param.error(\"Invalid enumerated value for type %s.\");\n" " }\n" - "}\n\n", name, dispname, dispname); + "}\n\n", name, unknown_value, dispname, dispname); + + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf + (src, + "Module_Param* %s::get_param(Module_Param_Name& /* param_name */) const\n" + "{\n" + " if (!is_bound()) {\n" + " return new Module_Param_Unbound();\n" + " }\n" + " return new Module_Param_Enumerated(mcopystr(enum_to_str(enum_value)));\n" + "}\n\n", name); /* encoders/decoders */ def = mputstr(def, "void encode_text(Text_Buf& text_buf) const;\n"); @@ -808,9 +842,10 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) char *def = NULL, *src = NULL; const char *name = edef->name, *dispname = edef->dispname; - char *enum_type, *unbound_value; + char *enum_type, *unbound_value, *unknown_value; enum_type = mprintf("%s::enum_type", name); unbound_value = mprintf("%s::UNBOUND_VALUE", name); + unknown_value = mprintf("%s::UNKNOWN_VALUE", name); /* Class declaration */ output->header.class_decls = mputprintf(output->header.class_decls, @@ -1054,10 +1089,10 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "}\n\n", name, name, name); /* match operators */ - def = mputprintf(def, "boolean match(%s other_value) const;\n", enum_type); + def = mputprintf(def, "boolean match(%s other_value, boolean legacy = FALSE) " + "const;\n", enum_type); src = mputprintf(src, - "boolean %s_template::match(%s other_value) " - "const\n" + "boolean %s_template::match(%s other_value, boolean) const\n" "{\n" "switch (template_selection) {\n" "case SPECIFIC_VALUE:\n" @@ -1081,10 +1116,10 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "return FALSE;\n" "}\n\n", name, enum_type, dispname); - def = mputprintf(def, "boolean match(const %s& other_value) const;\n", - name); + def = mputprintf(def, "boolean match(const %s& other_value, boolean legacy " + "= FALSE) const;\n", name); src = mputprintf(src, - "boolean %s_template::match(const %s& other_value) const\n" + "boolean %s_template::match(const %s& other_value, boolean) const\n" "{\n" "if (other_value.enum_value == %s) " "TTCN_error(\"Matching a template of enumerated type %s with an unbound " @@ -1143,8 +1178,8 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "void copy_value(const Base_Type* other_value);\n" "Base_Template* clone() const;\n" "const TTCN_Typedescriptor_t* get_descriptor() const;\n" - "boolean matchv(const Base_Type* other_value) const;\n" - "void log_matchv(const Base_Type* match_value) const;\n"); + "boolean matchv(const Base_Type* other_value, boolean legacy) const;\n" + "void log_matchv(const Base_Type* match_value, boolean legacy) const;\n"); src = mputprintf(src, "void %s_template::valueofv(Base_Type* value) const " "{ *(static_cast<%s*>(value)) = valueof(); }\n" @@ -1156,10 +1191,12 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "{ return new %s_template(*this); }\n" "const TTCN_Typedescriptor_t* %s_template::get_descriptor() const " "{ return &%s_descr_; }\n" - "boolean %s_template::matchv(const Base_Type* other_value) const " - "{ return match(*(static_cast(other_value))); }\n" - "void %s_template::log_matchv(const Base_Type* match_value) const " - " { log_match(*(static_cast(match_value))); }\n", + "boolean %s_template::matchv(const Base_Type* other_value, " + "boolean legacy) const " + "{ return match(*(static_cast(other_value)), legacy); }\n" + "void %s_template::log_matchv(const Base_Type* match_value, " + "boolean legacy) const " + " { log_match(*(static_cast(match_value)), legacy); }\n", name, name, name, name, name, @@ -1196,11 +1233,10 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "log_ifpresent();\n" "}\n\n", name, name); - def = mputprintf(def, "void log_match(const %s& match_value) const;\n", - name); + def = mputprintf(def, "void log_match(const %s& match_value, " + "boolean legacy = FALSE) const;\n", name); src = mputprintf(src, - "void %s_template::log_match(const %s& match_value) " - "const\n" + "void %s_template::log_match(const %s& match_value, boolean) const\n" "{\n" "match_value.log();\n" "TTCN_Logger::log_event_str(\" with \");\n" @@ -1267,18 +1303,18 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "}\n\n", name, enum_type, name, dispname, name, dispname); /* TTCN-3 ispresent() function */ - def = mputstr(def, "boolean is_present() const;\n"); + def = mputstr(def, "boolean is_present(boolean legacy = FALSE) const;\n"); src = mputprintf(src, - "boolean %s_template::is_present() const\n" + "boolean %s_template::is_present(boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;\n" - "return !match_omit();\n" + "return !match_omit(legacy);\n" "}\n\n", name); /* match_omit() */ - def = mputstr(def, "boolean match_omit() const;\n"); + def = mputstr(def, "boolean match_omit(boolean legacy = FALSE) const;\n"); src = mputprintf(src, - "boolean %s_template::match_omit() const\n" + "boolean %s_template::match_omit(boolean legacy) const\n" "{\n" "if (is_ifpresent) return TRUE;\n" "switch (template_selection) {\n" @@ -1287,10 +1323,12 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "return TRUE;\n" "case VALUE_LIST:\n" "case COMPLEMENTED_LIST:\n" + "if (legacy) {\n" "for (unsigned int i=0; iget_ifpresent();\n" + " return;\n" + " }\n" + /* it's not a valid enum value => dereference it! */ + " mp = param.get_referenced_param();\n" + " }\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Omit:\n" " *this = OMIT_VALUE;\n" " break;\n" @@ -1314,14 +1367,17 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) " *this = ANY_OR_OMIT;\n" " break;\n" " case Module_Param::MP_List_Template:\n" - " case Module_Param::MP_ComplementList_Template:\n" - " set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());\n" - " for (size_t p_i=0; p_iget_type()==Module_Param::MP_List_Template ? " + "VALUE_LIST : COMPLEMENTED_LIST, mp->get_size());\n" + " for (size_t p_i=0; p_iget_size(); p_i++) {\n" + " temp.list_item(p_i).set_param(*mp->get_elem(p_i));\n" " }\n" - " break;\n" + " *this = temp;\n" + " break; }\n" " case Module_Param::MP_Enumerated: {\n" - " %s enum_val = %s::str_to_enum(param.get_enumerated());\n" + " %s enum_val = %s::str_to_enum(mp->get_enumerated());\n" " if (!%s::is_valid_enum(enum_val)) {\n" " param.error(\"Invalid enumerated value for type %s.\");\n" " }\n" @@ -1330,15 +1386,61 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) " default:\n" " param.type_error(\"enumerated template\", \"%s\");\n" " }\n" - " is_ifpresent = param.get_ifpresent();\n" - "}\n\n", name, enum_type, name, name, dispname, dispname); + " is_ifpresent = param.get_ifpresent() || mp->get_ifpresent();\n" + "}\n\n", name, enum_type, name, unknown_value, name + , name, enum_type, name, name, dispname, dispname); + + /* get_param() */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf + (src, + "Module_Param* %s_template::get_param(Module_Param_Name& param_name) const\n" + "{\n" + " Module_Param* mp = NULL;\n" + " switch (template_selection) {\n" + " case UNINITIALIZED_TEMPLATE:\n" + " mp = new Module_Param_Unbound();\n" + " break;\n" + " case OMIT_VALUE:\n" + " mp = new Module_Param_Omit();\n" + " break;\n" + " case ANY_VALUE:\n" + " mp = new Module_Param_Any();\n" + " break;\n" + " case ANY_OR_OMIT:\n" + " mp = new Module_Param_AnyOrNone();\n" + " break;\n" + " case SPECIFIC_VALUE:\n" + " mp = new Module_Param_Enumerated(mcopystr(%s::enum_to_str(single_value)));\n" + " break;\n" + " case VALUE_LIST:\n" + " case COMPLEMENTED_LIST: {\n" + " if (template_selection == VALUE_LIST) {\n" + " mp = new Module_Param_List_Template();\n" + " }\n" + " else {\n" + " mp = new Module_Param_ComplementList_Template();\n" + " }\n" + " for (size_t i = 0; i < value_list.n_values; ++i) {\n" + " mp->add_elem(value_list.list_value[i].get_param(param_name));\n" + " }\n" + " break; }\n" + " default:\n" + " break;\n" + " }\n" + " if (is_ifpresent) {\n" + " mp->set_ifpresent();\n" + " }\n" + " return mp;\n" + "}\n\n", name, name); if (!use_runtime_2) { /* check template restriction */ def = mputstr(def, "void check_restriction(template_res t_res, " - "const char* t_name=NULL) const;\n"); + "const char* t_name=NULL, boolean legacy = FALSE) const;\n"); src = mputprintf(src, - "void %s_template::check_restriction(template_res t_res, const char* t_name) const\n" + "void %s_template::check_restriction(template_res t_res, const char* t_name,\n" + "boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return;\n" "switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {\n" @@ -1350,7 +1452,7 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) "template_selection==SPECIFIC_VALUE)) return;\n" "break;\n" "case TR_PRESENT:\n" - "if (!match_omit()) return;\n" + "if (!match_omit(legacy)) return;\n" "break;\n" "default:\n" "return;\n" @@ -1370,4 +1472,5 @@ void defEnumTemplate(const enum_def *edef, output_struct *output) Free(enum_type); Free(unbound_value); + Free(unknown_value); } diff --git a/compiler2/enum.h b/compiler2/enum.h index 0c460df..f1b2122 100644 --- a/compiler2/enum.h +++ b/compiler2/enum.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/error.h b/compiler2/error.h index 687e9ff..03602eb 100644 --- a/compiler2/error.h +++ b/compiler2/error.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/functionref.c b/compiler2/functionref.c index f81764b..b7d1a720 100644 --- a/compiler2/functionref.c +++ b/compiler2/functionref.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -275,6 +275,13 @@ void defFunctionrefClass(const funcref_def *fdef, output_struct *output) "{\n" " param.error(\"Not supported.\");\n" "}\n\n", name); + + /* get_param */ + def = mputstr(def,"Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf(src,"Module_Param* %s::get_param(Module_Param_Name& /* param_name */) const\n" + "{\n" + " return NULL;\n" + "}\n\n", name); /* encode_text / decode_text */ def = mputstr(def,"void encode_text(Text_Buf& text_buf) const;\n"); @@ -508,9 +515,9 @@ void defFunctionrefTemplate(const funcref_def *fdef, output_struct *output) /* match functions */ def = mputprintf(def,"boolean match(%s::function_pointer " - "other_value) const;\n", name); + "other_value, boolean legacy = FALSE) const;\n", name); src = mputprintf(src,"boolean %s_template::match(%s::function_pointer " - "other_value) const\n" + "other_value, boolean) const\n" "{\n" "switch(template_selection) {\n" "case SPECIFIC_VALUE:\n" @@ -532,11 +539,12 @@ void defFunctionrefTemplate(const funcref_def *fdef, output_struct *output) "};\n" "return FALSE;\n" "}\n\n", name, name, dispname); - def = mputprintf(def,"boolean match(const %s& other_value) const;\n", name); - src = mputprintf(src,"boolean %s_template::match(const %s& other_value) " - "const\n" + def = mputprintf(def,"boolean match(const %s& other_value, boolean legacy " + "= FALSE) const;\n", name); + src = mputprintf(src,"boolean %s_template::match(const %s& other_value, " + "boolean) const\n" "{\n" - " if (!other_value.is_bound()) return FALSE;\n" + " if (!other_value.is_bound()) return FALSE;\n" "return match(other_value.referred_function);\n" "}\n\n", name, name); @@ -588,8 +596,8 @@ void defFunctionrefTemplate(const funcref_def *fdef, output_struct *output) "void copy_value(const Base_Type* other_value);\n" "Base_Template* clone() const;\n" "const TTCN_Typedescriptor_t* get_descriptor() const;\n" - "boolean matchv(const Base_Type* other_value) const;\n" - "void log_matchv(const Base_Type* match_value) const;\n"); + "boolean matchv(const Base_Type* other_value, boolean legacy) const;\n" + "void log_matchv(const Base_Type* match_value, boolean legacy) const;\n"); src = mputprintf(src, "void %s_template::valueofv(Base_Type* value) const " "{ *(static_cast<%s*>(value)) = valueof(); }\n" @@ -601,10 +609,12 @@ void defFunctionrefTemplate(const funcref_def *fdef, output_struct *output) "{ return new %s_template(*this); }\n" "const TTCN_Typedescriptor_t* %s_template::get_descriptor() const " "{ return &%s_descr_; }\n" - "boolean %s_template::matchv(const Base_Type* other_value) const " - "{ return match(*(static_cast(other_value))); }\n" - "void %s_template::log_matchv(const Base_Type* match_value) const " - " { log_match(*(static_cast(match_value))); }\n", + "boolean %s_template::matchv(const Base_Type* other_value, " + "boolean legacy) const " + "{ return match(*(static_cast(other_value)), legacy); }\n" + "void %s_template::log_matchv(const Base_Type* match_value, " + "boolean legacy) const " + " { log_match(*(static_cast(match_value)), legacy); }\n", name, name, name, name, name, @@ -639,14 +649,15 @@ void defFunctionrefTemplate(const funcref_def *fdef, output_struct *output) "}\n\n", name, fat_string); /* log_match function */ - def = mputprintf(def,"void log_match(const %s& match_value) const;\n", name); - src = mputprintf(src,"void %s_template::log_match(const %s& match_value) " - "const\n" + def = mputprintf(def,"void log_match(const %s& match_value, " + "boolean legacy = FALSE) const;\n", name); + src = mputprintf(src,"void %s_template::log_match(const %s& match_value, " + "boolean legacy) const\n" "{\n" "log();\n" "TTCN_Logger::log_event_str(\" with \");\n" "match_value.log();\n" - "if(match(match_value)) TTCN_Logger::log_event_str(\" matched\");\n" + "if(match(match_value, legacy)) TTCN_Logger::log_event_str(\" matched\");\n" "else TTCN_Logger::log_event_str(\" unmatched\");\n" "}\n\n", name, name); @@ -716,18 +727,18 @@ void defFunctionrefTemplate(const funcref_def *fdef, output_struct *output) src = mputstr(src,"}\n\n"); /* TTCN-3 ispresent() function */ - def = mputstr(def, "boolean is_present() const;\n"); + def = mputstr(def, "boolean is_present(boolean legacy = FALSE) const;\n"); src = mputprintf(src, - "boolean %s_template::is_present() const\n" + "boolean %s_template::is_present(boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;\n" - "return !match_omit();\n" + "return !match_omit(legacy);\n" "}\n\n", name); /* match_omit() */ - def = mputstr(def, "boolean match_omit() const;\n"); + def = mputstr(def, "boolean match_omit(boolean legacy = FALSE) const;\n"); src = mputprintf(src, - "boolean %s_template::match_omit() const\n" + "boolean %s_template::match_omit(boolean legacy) const\n" "{\n" "if (is_ifpresent) return TRUE;\n" "switch (template_selection) {\n" @@ -736,10 +747,12 @@ void defFunctionrefTemplate(const funcref_def *fdef, output_struct *output) "return TRUE;\n" "case VALUE_LIST:\n" "case COMPLEMENTED_LIST:\n" + "if (legacy) {\n" "for (unsigned int i=0; icode_splitting_mode = NULL; makefile->coverage = FALSE; makefile->tcov_file_name = NULL; + makefile->profiled_file_list = NULL; makefile->library = FALSE; makefile->linkingStrategy = FALSE; makefile->hierarchical = FALSE; @@ -297,6 +300,7 @@ static void init_makefile_struct(struct makefile_struct *makefile) makefile->prep_includes = NULL; makefile->prep_defines = NULL; makefile->outparamboundness = FALSE; + makefile->omit_in_value_list = FALSE; makefile->solspeclibraries = NULL; makefile->sol8speclibraries = NULL; makefile->linuxspeclibraries = NULL; @@ -472,6 +476,16 @@ static void dump_makefile_struct(const struct makefile_struct *makefile, DEBUG(level + 1, "Code coverage file: %s", makefile->tcov_file_name != NULL ? makefile->tcov_file_name : ""); + if (makefile->profiled_file_list) { + char* lists = mcopystr(makefile->profiled_file_list->str); + struct string_list* iter = makefile->profiled_file_list->next; + while(iter != NULL) { + lists = mputprintf(lists, " %s", iter->str); + iter = iter->next; + } + DEBUG(level + 1, "Profiled file list(s): %s", lists); + Free(lists); + } #ifdef COVERAGE_BUILD DEBUG(level + 1, "Enable coverage: %s", makefile->coverage ? "yes" : "no"); #endif @@ -1961,7 +1975,7 @@ static void print_makefile(struct makefile_struct *makefile) "AR = ar\n" "ARFLAGS = \n\n" "# Flags for the TTCN-3 and ASN.1 compiler:\n" - "COMPILER_FLAGS =%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s %s\n\n" + "COMPILER_FLAGS =%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n\n" "# Execution mode: (either ttcn3 or ttcn3-parallel)\n" "TTCN3_LIB = ttcn3%s%s%s\n\n" #ifdef LICENSE @@ -1997,7 +2011,9 @@ static void print_makefile(struct makefile_struct *makefile) /*(makefile->addsourcelineinfo ? " -L" : ""),*/ (makefile->suppresswarnings ? " -w" : ""), (makefile->outparamboundness ? " -Y" : ""), + (makefile->omit_in_value_list ? " -M" : ""), (makefile->tcov_file_name ? makefile->tcov_file_name : ""), + (makefile->profiled_file_list ? " -z $(PROFILED_FILE_LIST)" : ""), /* end of COMPILER FLAGS */ (makefile->use_runtime_2 ? "-rt2" : ""), /* TTCN3_LIB */ (makefile->single_mode ? "" : "-parallel"), @@ -2169,6 +2185,29 @@ static void print_makefile(struct makefile_struct *makefile) } } } + if (makefile->profiled_file_list) { + if (makefile->profiled_file_list->next && !makefile->central_storage) { + // merge all profiled file lists into one list + fprintf(fp, "\n\n" + "# Text file containing the list of profiled TTCN-3 files of " + "this project:\n" + "PROFILED_FILE_LIST = %s.merged\n" + "PROFILED_FILE_LIST_SEGMENTS =", + makefile->profiled_file_list->str); + struct string_list* iter = makefile->profiled_file_list; + while(iter != NULL) { + fprintf(fp, " %s", iter->str); + iter = iter->next; + } + } + else { + // only one profiled file list is needed + fprintf(fp, "\n\n" + "# Text file containing the list of profiled TTCN-3 files of " + "this project:\n" + "PROFILED_FILE_LIST = %s", makefile->profiled_file_list->str); + } + } fputs("\n\n" "# C++ source & header files generated from the TTCN-3 & ASN.1 " "modules of\n" @@ -3040,7 +3079,7 @@ static void print_makefile(struct makefile_struct *makefile) } free_string2_list(head); - struct string_list* act_head = getExternalLibPathes(makefile->project_name); + struct string_list* act_head = getExternalLibPaths(makefile->project_name); struct string_list* act_ext_elem = act_head; while (act_ext_elem) { if (act_ext_elem->str) { @@ -3099,7 +3138,7 @@ static void print_makefile(struct makefile_struct *makefile) act_elem = act_elem->next; } free_string2_list(head); - struct string_list* act_head = getExternalLibPathes(makefile->project_name); + struct string_list* act_head = getExternalLibPaths(makefile->project_name); struct string_list* act_ext_elem = act_head; while (act_ext_elem) { if (act_ext_elem->str) { @@ -3210,6 +3249,8 @@ static void print_makefile(struct makefile_struct *makefile) "preprocess: $(PREPROCESSED_TTCN3_MODULES) ;\n\n", fp); } + boolean merge_profiled_file_lists = makefile->profiled_file_list + && makefile->profiled_file_list->next && !makefile->central_storage; if (makefile->central_storage) { boolean is_first = TRUE; fprintf(fp, "$(GENERATED_SOURCES) $(GENERATED_HEADERS):%s compile-all compile ", @@ -3275,8 +3316,14 @@ static void print_makefile(struct makefile_struct *makefile) "endif\n" "endif",fp); } + if (makefile->profiled_file_list) { + fputs("\n\n" + "compile:: $(PROFILED_FILE_LIST)\n" + "\ttouch $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) " + "$(ASN1_MODULES)", fp); + } fprintf(fp, "\n\n" - "compile: $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) " + "compile:%s $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) " "$(ASN1_MODULES)\n" "\t@echo \"compiling \"'$(patsubst %%.tpd, %%, $(TPD))';\n" "\t$(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) \\\n" @@ -3284,6 +3331,7 @@ static void print_makefile(struct makefile_struct *makefile) "\t$(PREPROCESSED_TTCN3_MODULES) $(BASE_PREPROCESSED_TTCN3_MODULES) %s\\\n" "\t$(ASN1_MODULES) $(BASE_ASN1_MODULES) %s - $?\n" "\ttouch $@\n\n", + makefile->profiled_file_list ? ":" : "", makefile->linkingStrategy ? "$(BASE2_TTCN3_MODULES) ":"", makefile->linkingStrategy ? "$(BASE2_PREPROCESSED_TTCN3_MODULES) ":"", makefile->linkingStrategy ? "$(BASE2_ASN1_MODULES)":""); @@ -3304,7 +3352,7 @@ static void print_makefile(struct makefile_struct *makefile) makefile->linkingStrategy ? "$(BASE2_TTCN3_MODULES) ":"", makefile->linkingStrategy ? "$(BASE2_PREPROCESSED_TTCN3_MODULES) ":"", makefile->linkingStrategy ? "$(BASE2_ASN1_MODULES) ":""); - } + } else { fprintf(fp, "\n" "\t@if [ ! -f $@ ]; then %s compile-all; $(MAKE) compile-all; fi\n", rm_command); @@ -3342,14 +3390,20 @@ static void print_makefile(struct makefile_struct *makefile) "endif",fp); } + if (makefile->profiled_file_list) { + fputs("\n\n" + "compile:: $(PROFILED_FILE_LIST)\n" + "\ttouch $(TTCN3_MODULES) $(ASN1_MODULES)", fp); + } fprintf(fp, "\n\n" - "compile: $(TTCN3_MODULES) $(ASN1_MODULES)\n" + "compile:%s $(TTCN3_MODULES) $(ASN1_MODULES)\n" "\t@echo \"compiling \"'$(patsubst %%.tpd, %%, $(TPD))';\n" "\t$(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) \\\n" "\t$(TTCN3_MODULES) $(BASE_TTCN3_MODULES) %s\\\n" "\t$(ASN1_MODULES) $(BASE_ASN1_MODULES) %s\\\n" "\t- $?\n" "\ttouch $@\n\n", + makefile->profiled_file_list ? ":" : "", makefile->linkingStrategy ? "$(BASE2_TTCN3_MODULES) " : "", makefile->linkingStrategy ? "$(BASE2_ASN1_MODULES) " : ""); fprintf(fp, @@ -3393,11 +3447,14 @@ static void print_makefile(struct makefile_struct *makefile) "\t@exit 2\n\n", base_dir->dir_name); } } - } + } else { /* not central storage */ fprintf(fp, "$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile\n" "\t@if [ ! -f $@ ]; then %s compile; $(MAKE) compile; fi\n\n" - "check: $(TTCN3_MODULES) ", rm_command); + "%s" + "check:%s $(TTCN3_MODULES) ", rm_command, + merge_profiled_file_lists ? "check:: $(PROFILED_FILE_LIST)\n\n" : "", + merge_profiled_file_lists ? ":" : ""); if (makefile->preprocess) fputs("$(PREPROCESSED_TTCN3_MODULES) ", fp); fputs("$(ASN1_MODULES)\n" "\t$(TTCN3_DIR)/bin/compiler -s $(COMPILER_FLAGS) ", fp); @@ -3407,8 +3464,14 @@ static void print_makefile(struct makefile_struct *makefile) "\t$(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES)", fp); } - fputs("\n\n" - "compile: $(TTCN3_MODULES) ", fp); + if (makefile->profiled_file_list) { + fputs("\n\ncompile:: $(PROFILED_FILE_LIST)\n" + "\ttouch $(TTCN3_MODULES) ", fp); + if (makefile->preprocess) fputs("$(PREPROCESSED_TTCN3_MODULES) ", fp); + fputs("$(ASN1_MODULES)", fp); + } + fprintf(fp, "\n\n" + "compile:%s $(TTCN3_MODULES) ", makefile->profiled_file_list ? ":" : ""); if (makefile->preprocess) fputs("$(PREPROCESSED_TTCN3_MODULES) ", fp); fputs("$(ASN1_MODULES)\n" "\t$(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) ", fp); @@ -3422,6 +3485,10 @@ static void print_makefile(struct makefile_struct *makefile) fputs(" - $?\n" "\ttouch $@\n" "\n", fp); + if (merge_profiled_file_lists) { + fputs("$(PROFILED_FILE_LIST): $(PROFILED_FILE_LIST_SEGMENTS)\n" + "\tcat $(PROFILED_FILE_LIST_SEGMENTS) > $(PROFILED_FILE_LIST)\n\n", fp); + } } // clean: if (makefile->linkingStrategy) { @@ -3438,6 +3505,9 @@ static void print_makefile(struct makefile_struct *makefile) fputs("compile", fp); if (makefile->central_storage) fputs(" compile-all", fp); if (makefile->gcc_dep) fputs(" $(DEPFILES)", fp); + if (merge_profiled_file_lists) { + fputs(" $(PROFILED_FILE_LIST)", fp); + } fprintf(fp, " \\\n" "\ttags *.log%s%s\n\n", add_refd_prjs?" referenced*":"", @@ -3452,6 +3522,9 @@ static void print_makefile(struct makefile_struct *makefile) fputs("compile", fp); if (makefile->central_storage) fputs(" compile-all", fp); if (makefile->gcc_dep) fputs(" $(DEPFILES)", fp); + if (merge_profiled_file_lists) { + fputs(" $(PROFILED_FILE_LIST)", fp); + } fprintf(fp, " \\\n" "\ttags *.log%s", add_refd_prjs?" referenced*":""); @@ -3639,14 +3712,14 @@ static void generate_makefile(size_t n_arguments, char *arguments[], boolean central_storage, boolean absolute_paths, boolean preprocess, boolean dump_makefile_data, boolean force_overwrite, boolean use_runtime_2, boolean dynamic, boolean makedepend, boolean coverage, - const char *code_splitting_mode, const char *tcov_file_name, + const char *code_splitting_mode, const char *tcov_file_name, struct string_list* profiled_file_list, boolean Lflag, boolean Zflag, boolean Hflag, struct string_list* sub_project_dirs, struct string_list* ttcn3_prep_includes, struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes, struct string_list* prep_defines, struct string_list* prep_undefines, boolean codesplittpd, boolean quietly, boolean disablesubtypecheck, const char* cxxcompiler, const char* optlevel, const char* optflags, boolean disableber, boolean disableraw, boolean disabletext, boolean disablexer, boolean disablejson, boolean forcexerinasn, boolean defaultasomit, boolean gccmsgformat, boolean linenumbersonlymsg, boolean includesourceinfo, boolean addsourcelineinfo, boolean suppresswarnings, - boolean outparamboundness, struct string_list* solspeclibraries, struct string_list* sol8speclibraries, + boolean outparamboundness, boolean omit_in_value_list, struct string_list* solspeclibraries, struct string_list* sol8speclibraries, struct string_list* linuxspeclibraries, struct string_list* freebsdspeclibraries, struct string_list* win32speclibraries, const char* ttcn3preprocessor, struct string_list* linkerlibraries, struct string_list* additionalObjects, struct string_list* linkerlibsearchpath, char* generatorCommandOutput, @@ -3696,6 +3769,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[], makefile.addsourcelineinfo = addsourcelineinfo; makefile.suppresswarnings = suppresswarnings; makefile.outparamboundness = outparamboundness; + makefile.omit_in_value_list = omit_in_value_list; makefile.solspeclibraries = solspeclibraries; makefile.sol8speclibraries = sol8speclibraries; makefile.linuxspeclibraries = linuxspeclibraries; @@ -3773,7 +3847,11 @@ static void generate_makefile(size_t n_arguments, char *arguments[], } if (tcov_file_name != NULL) { - makefile.tcov_file_name = mputprintf(makefile.tcov_file_name, "-K %s", tcov_file_name); + makefile.tcov_file_name = mprintf(" -K %s", tcov_file_name); + } + + if (profiled_file_list != NULL) { + makefile.profiled_file_list = profiled_file_list; } if (makefile.nTTCN3Modules >= 1) { @@ -3826,7 +3904,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[], static void usage(void) { fprintf(stderr, "\n" - "usage: %s [-abc" C_flag "dDfFglLmprRstTVwWXZ] [-K file] [-P dir]" + "usage: %s [-abc" C_flag "dDfFglLmMprRstTVwWXZ] [-K file] [-z file ] [-P dir]" " [-U none|type] [-e ets_name] [-o dir|file]\n" " [-t project_descriptor.tpd [-b buildconfig]]\n" " [-O file] ... module_name ... testport_name ...\n" @@ -3842,10 +3920,11 @@ static void usage(void) " -e ets_name: name of the target executable\n" " -f: force overwriting of the output Makefile\n" " -g: generate Makefile for use with GNU make\n" + " -K file: enable selective code coverage\n" " -l: use dynamic linking\n" " -L: create makefile with library archive as the default target\n" " -m: always use makedepend for dependencies\n" - " -K file: enable selective code coverage\n" + " -M: allow 'omit' in template value lists (legacy behavior)\n" " -o dir|file: write the Makefile to the given directory or file\n" " -O file: add the given file to the Makefile as other file\n" " -p: generate Makefile with TTCN-3 preprocessing\n" @@ -3855,6 +3934,7 @@ static void usage(void) " -v: show version\n" " -w: suppress warnings\n" " -Y: Enforces legacy behaviour of the \"out\" function parameters (see refguide)\n" + " -z file: enable profiling and code coverage for the TTCN-3 files in the argument\n" "Options for processing the Titan Project Descriptor file(s):\n" " -t tpd: read project descriptor file\n" " -b buildconfig: use the specified build config instead of the default\n" @@ -3911,7 +3991,8 @@ int main(int argc, char *argv[]) dxflag = FALSE, fxflag = FALSE, doflag = FALSE, gfflag = FALSE, lnflag = FALSE, isflag = FALSE, asflag = FALSE, swflag = FALSE, Vflag = FALSE, Dflag = FALSE, Wflag = FALSE, - djflag = FALSE, Zflag = FALSE, Hflag = FALSE; + djflag = FALSE, Zflag = FALSE, Hflag = FALSE, Mflag = FALSE, + zflag = FALSE; boolean error_flag = FALSE; char *output_file = NULL; char *ets_name = NULL; @@ -3922,6 +4003,8 @@ int main(int argc, char *argv[]) const char *tpd_file_name = NULL; const char *tpd_build_config = NULL; const char *tcov_file_name = NULL; + struct string_list* profiled_file_list = NULL; + const char *profiled_file_list_zflag = NULL; const char *file_list_path = NULL; enum tpd_result tpd_processed = FALSE; struct string_list* sub_project_dirs = NULL; @@ -3964,7 +4047,7 @@ int main(int argc, char *argv[]) } for ( ; ; ) { - int c = getopt(argc, argv, "O:ab:c" C_flag "dDe:fFgK:o:lLmpP:rRst:TU:vVwWXYZH"); + int c = getopt(argc, argv, "O:ab:c" C_flag "dDe:fFgK:o:lLmMpP:rRst:TU:vVwWXYz:ZH"); if (c == -1) break; switch (c) { case 'O': @@ -4027,6 +4110,9 @@ int main(int argc, char *argv[]) case 'm': SET_FLAG(m); break; + case 'M': + SET_FLAG(M); + break; case 'p': SET_FLAG(p); break; @@ -4084,6 +4170,10 @@ int main(int argc, char *argv[]) case 'X': SET_FLAG(X); break; + case 'z': + SET_FLAG(z); + profiled_file_list_zflag = optarg; + break; case 'Z': SET_FLAG(Z); break; @@ -4099,7 +4189,7 @@ int main(int argc, char *argv[]) if ( aflag || bflag || cflag || Cflag || dflag || eflag || fflag || Fflag || gflag || mflag || oflag || lflag || pflag || Pflag || rflag || Rflag || sflag || tflag || Tflag || Vflag || wflag || Xflag || Kflag || Dflag || Wflag || Yflag - || Zflag || Hflag || n_other_files > 0) + || Zflag || Hflag || Mflag || zflag || n_other_files > 0) error_flag = TRUE; } @@ -4261,9 +4351,9 @@ int main(int argc, char *argv[]) &Rflag, &lflag, &mflag, &Pflag, &Lflag, rflag, Fflag, Tflag, output_file, &abs_work_dir, sub_project_dirs, program_name, prj_graph_fp, create_symlink_list,ttcn3_prep_includes, ttcn3_prep_defines,ttcn3_prep_undefines, prep_includes, prep_defines, prep_undefines, &csflag, &quflag, &dsflag, &cxxcompiler, &optlevel, &optflags, &dbflag, &drflag, &dtflag, &dxflag, &djflag, &fxflag, &doflag, &gfflag, &lnflag, &isflag, - &asflag, &swflag, &Yflag, solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, &ttcn3prep, + &asflag, &swflag, &Yflag, &Mflag, solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, &ttcn3prep, linkerlibraries, additionalObjects, linkerlibsearchpath, Vflag, Dflag, &Zflag, &Hflag, - &generatorCommandOutput, target_placement_list, Wflag, run_command_list, required_configs); + &generatorCommandOutput, target_placement_list, Wflag, run_command_list, required_configs, &profiled_file_list); Free(abs_work_dir); if (prj_graph_fp) { @@ -4274,6 +4364,16 @@ int main(int argc, char *argv[]) ERROR("Failed to process %s", tpd_file_name); exit(EXIT_FAILURE); } + if (zflag) { + WARNING("Compiler option '-z' and its argument will be overwritten by " + "the settings in the TPD"); + } + } + else if (zflag) { + // use the argument given in the command line if there is no TPD + profiled_file_list = (struct string_list*)Malloc(sizeof(struct string_list)); + profiled_file_list->str = mcopystr(profiled_file_list_zflag); + profiled_file_list->next = NULL; } if (!Pflag) { @@ -4287,9 +4387,10 @@ int main(int argc, char *argv[]) } generate_makefile(argc - optind, argv + optind, n_other_files, other_files, output_file, ets_name, project_name, gflag, sflag, cflag, aflag, pflag, dflag, fflag||Fflag, - Rflag, lflag, mflag, Cflag, code_splitting_mode, tcov_file_name, Lflag, Zflag, Hflag, rflag ? sub_project_dirs : NULL, ttcn3_prep_includes, + Rflag, lflag, mflag, Cflag, code_splitting_mode, tcov_file_name, profiled_file_list, + Lflag, Zflag, Hflag, rflag ? sub_project_dirs : NULL, ttcn3_prep_includes, ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines, prep_undefines, csflag, quflag, dsflag, cxxcompiler, optlevel, optflags, dbflag, - drflag, dtflag, dxflag, djflag, fxflag, doflag, gfflag, lnflag, isflag, asflag, swflag, Yflag, solspeclibraries, + drflag, dtflag, dxflag, djflag, fxflag, doflag, gfflag, lnflag, isflag, asflag, swflag, Yflag, Mflag, solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, ttcn3prep, linkerlibraries, additionalObjects, linkerlibsearchpath, generatorCommandOutput, target_placement_list); } @@ -4309,6 +4410,7 @@ int main(int argc, char *argv[]) free_string_list(linkerlibraries); free_string_list(additionalObjects); free_string_list(linkerlibsearchpath); + free_string_list(profiled_file_list); Free(generatorCommandOutput); free_string2_list(target_placement_list); diff --git a/compiler2/map.hh b/compiler2/map.hh index 477f524..38880f6 100644 --- a/compiler2/map.hh +++ b/compiler2/map.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/record.c b/compiler2/record.c index eeda176..097ffe7 100644 --- a/compiler2/record.c +++ b/compiler2/record.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -2689,6 +2689,7 @@ void gen_xer(const struct_def *sdef, char **pdef, char **psrc) src = mputprintf(src, " {\n" " field_%s.set_size(0);\n" + " if (!tag_closed) {\n" /* Nothing to order if there are no child elements */ " int e_val, num_seen = 0, *seen_f = new int[%lu];\n" , sdef->elements[uo].name , (unsigned long)(n_embed) @@ -2700,6 +2701,7 @@ void gen_xer(const struct_def *sdef, char **pdef, char **psrc) src = mputstr(src, " int last_embval_index = 0;\n"); } src = mputprintf(src, + " bool early_exit = false;\n" " for (int i=0; i < %lu; ++i) {\n" " for (rd_ok=p_reader.Ok(); rd_ok==1; rd_ok=p_reader.Read()) {\n" , (unsigned long)(n_embed)); @@ -2717,8 +2719,12 @@ void gen_xer(const struct_def *sdef, char **pdef, char **psrc) src = mputstr(src, " type = p_reader.NodeType();\n" " if (type==XML_READER_TYPE_ELEMENT) break;\n" + " if (type == XML_READER_TYPE_END_ELEMENT) {\n" + " early_exit = true;\n" + " break;\n" + " }\n" " }\n" - " if (rd_ok != 1) break;\n" + " if (rd_ok != 1 || early_exit) break;\n" " const char * x_name = (const char*)p_reader.LocalName();\n" /* Name or LocalName ? */); if (sdef->xerEmbedValuesPossible) { @@ -2793,7 +2799,11 @@ void gen_xer(const struct_def *sdef, char **pdef, char **psrc) } src = mputstr(src, - " continue; \n" /* take care of the dangling else */ + " {\n" /* take care of the dangling else */ + " TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INVAL_MSG,\n" + " \"Bad XML tag '%s' instead of a valid field\", x_name);\n" + " break;\n" + " }\n" " }\n" " for (int d_f = 0; d_f < num_seen; ++d_f)\n" " if (e_val == seen_f[d_f])\n" @@ -2828,6 +2838,7 @@ void gen_xer(const struct_def *sdef, char **pdef, char **psrc) " TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_CONSTRAINT, \"Wrong number of elements\");\n" " }\n" " }\n" + " } // !tag_closed\n" " } else { // !uo\n" , sdef->elements[uo].dispname , min_ordered, max_ordered @@ -2959,7 +2970,20 @@ void gen_xer(const struct_def *sdef, char **pdef, char **psrc) } src = mputstr(src, - " } // errorcontext\n" /* End scope for error context objects */ + " } // errorcontext\n"); /* End scope for error context objects */ + + /* Check if every non-optional field has been set */ + for (i = 0; i < sdef->nElements; ++i) { + if (!sdef->elements[i].isOptional) { + src = mputprintf(src, + " if (!field_%s.is_bound()) {\n" + " TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INCOMPL_MSG,\n" + " \"No data found for non-optional field '%s'\");\n" + " }\n" + , sdef->elements[i].name, sdef->elements[i].dispname); + } + } + src = mputstr(src, " if (!omit_tag) {\n" " int current_depth;\n" " for (rd_ok = p_reader.Ok(); rd_ok == 1; rd_ok = p_reader.Read()) {\n" @@ -3307,27 +3331,31 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) "param.error(\"Field `%%s' not found in %s type `%s'\", param_field);\n" " }\n" " param.basic_check(Module_Param::BC_VALUE, \"%s value\");\n" - " switch (param.get_type()) {\n" + " Module_Param_Ptr mp = ¶m;\n" + " if (param.get_type() == Module_Param::MP_Reference) {\n" + " mp = param.get_referenced_param();\n" + " }\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Value_List:\n" - " if (%luget_size()) {\n" + " param.error(\"%s value of type %s has %lu fields but list value has %%d fields\", (int)mp->get_size());\n" " }\n", kind_str, dispname, kind_str, (unsigned long)sdef->nElements, kind_str, dispname, (unsigned long)sdef->nElements); for (i = 0; i < sdef->nElements; ++i) { src = mputprintf(src, - " if (param.get_size()>%lu && param.get_elem(%lu)->get_type()!=Module_Param::MP_NotUsed) %s().set_param(*param.get_elem(%lu));\n", + " if (mp->get_size()>%lu && mp->get_elem(%lu)->get_type()!=Module_Param::MP_NotUsed) %s().set_param(*mp->get_elem(%lu));\n", (unsigned long)i, (unsigned long)i, sdef->elements[i].name, (unsigned long)i); } src = mputstr(src, " break;\n" " case Module_Param::MP_Assignment_List: {\n" - " Vector value_used(param.get_size());\n" - " value_used.resize(param.get_size(), false);\n"); + " Vector value_used(mp->get_size());\n" + " value_used.resize(mp->get_size(), false);\n"); for (i = 0; i < sdef->nElements; ++i) { src = mputprintf(src, - " for (size_t val_idx=0; val_idxget_size(); val_idx++) {\n" + " Module_Param* const curr_param = mp->get_elem(val_idx);\n" " if (!strcmp(curr_param->get_id()->get_name(), \"%s\")) {\n" " if (curr_param->get_type()!=Module_Param::MP_NotUsed) {\n" " %s().set_param(*curr_param);\n" @@ -3338,8 +3366,8 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) , sdef->elements[i].dispname, sdef->elements[i].name); } src = mputprintf(src, - " for (size_t val_idx=0; val_idxerror(\"Non existent field name in type %s: %%s\", param.get_elem(val_idx)->get_id()->get_name());\n" + " for (size_t val_idx=0; val_idxget_size(); val_idx++) if (!value_used[val_idx]) {\n" + " mp->get_elem(val_idx)->error(\"Non existent field name in type %s: %%s\", mp->get_elem(val_idx)->get_id()->get_name());\n" " break;\n" " }\n" " } break;\n" @@ -3347,6 +3375,48 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) " param.type_error(\"%s value\", \"%s\");\n" " }\n" "}\n\n", dispname, kind_str, dispname); + + /* get param function */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf(src, + "Module_Param* %s::get_param(Module_Param_Name& param_name) const\n" + "{\n" + " if (!is_bound()) {\n" + " return new Module_Param_Unbound();\n" + " }\n" + " if (param_name.next_name()) {\n" + // Haven't reached the end of the module parameter name + // => the name refers to one of the fields, not to the whole record + " char* param_field = param_name.get_current_name();\n" + " if (param_field[0] >= '0' && param_field[0] <= '9') {\n" + " TTCN_error(\"Unexpected array index in module parameter reference, \"\n" + " \"expected a valid field name for %s type `%s'\");\n" + " }\n" + " ", name, kind_str, dispname); + for (i = 0; i < sdef->nElements; i++) { + src = mputprintf(src, + "if (strcmp(\"%s\", param_field) == 0) {\n" + " return %s().get_param(param_name);\n" + " } else ", + sdef->elements[i].dispname, sdef->elements[i].name); + } + src = mputprintf(src, + "TTCN_error(\"Field `%%s' not found in %s type `%s'\", param_field);\n" + " }\n" + " Module_Param_Assignment_List* mp = new Module_Param_Assignment_List();\n" + , kind_str, dispname); + for (i = 0; i < sdef->nElements; i++) { + src = mputprintf(src, + " Module_Param* mp_field_%s = field_%s.get_param(param_name);\n" + " mp_field_%s->set_id(new Module_Param_FieldName(mcopystr(\"%s\")));\n" + " mp->add_elem(mp_field_%s);\n" + , sdef->elements[i].name, sdef->elements[i].name + , sdef->elements[i].name, sdef->elements[i].dispname + , sdef->elements[i].name); + } + src = mputstr(src, + " return mp;\n" + " }\n\n"); /* set implicit omit function, recursive */ def = mputstr(def, " void set_implicit_omit();\n"); @@ -4250,17 +4320,30 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) " int enc_len = p_tok.put_next_token(JSON_TOKEN_OBJECT_START, NULL);\n\n" , name, dispname); for (i = 0; i < sdef->nElements; ++i) { - if (sdef->elements[i].isOptional && !sdef->elements[i].jsonOmitAsNull) { + if (sdef->elements[i].isOptional && !sdef->elements[i].jsonOmitAsNull && + !sdef->elements[i].jsonMetainfoUnbound) { src = mputprintf(src, " if (field_%s.is_present())\n" , sdef->elements[i].name); } - src=mputprintf(src, + src = mputprintf(src, " {\n" - " enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, \"%s\");\n" - " enc_len += field_%s.JSON_encode(%s_descr_, p_tok);\n" + " enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, \"%s\");\n " + , sdef->elements[i].jsonAlias ? sdef->elements[i].jsonAlias : sdef->elements[i].dispname); + if (sdef->elements[i].jsonMetainfoUnbound) { + src = mputprintf(src, + "if (!field_%s.is_bound()) {\n" + " enc_len += p_tok.put_next_token(JSON_TOKEN_LITERAL_NULL);\n" + " enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, \"metainfo %s\");\n" + " enc_len += p_tok.put_next_token(JSON_TOKEN_STRING, \"\\\"unbound\\\"\");\n" + " }\n" + " else " + , sdef->elements[i].name + , sdef->elements[i].jsonAlias ? sdef->elements[i].jsonAlias : sdef->elements[i].dispname); + } + src = mputprintf(src, + "enc_len += field_%s.JSON_encode(%s_descr_, p_tok);\n" " }\n\n" - , sdef->elements[i].jsonAlias ? sdef->elements[i].jsonAlias : sdef->elements[i].dispname , sdef->elements[i].name, sdef->elements[i].typedescrname); } src = mputstr(src, @@ -4282,8 +4365,20 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) " return JSON_ERROR_INVALID_TOKEN;\n" " }\n" " bound_flag = TRUE;\n\n" - // Read name - value token pairs until we reach some other token - " while (true) {\n" + , name); + boolean has_metainfo_enabled = FALSE; + for (i = 0; i < sdef->nElements; ++i) { + if (sdef->elements[i].jsonMetainfoUnbound) { + // initialize meta info states + src = mputprintf(src, + " int metainfo_%s = JSON_METAINFO_NONE;\n" + , sdef->elements[i].name); + has_metainfo_enabled = TRUE; + } + } + src = mputstr(src, + // Read name - value token pairs until we reach some other token + "\n while (true) {\n" " char* fld_name = 0;\n" " size_t name_len = 0;\n" " size_t buf_pos = p_tok.get_buf_pos();\n" @@ -4297,31 +4392,96 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) " p_tok.set_buf_pos(buf_pos);\n" " break;\n" " }\n" - " else {\n " - , name); + " else {\n "); + if (has_metainfo_enabled) { + // check for meta info + src = mputstr(src, + "boolean is_metainfo = FALSE;\n" + " if (name_len > 9 && 0 == strncmp(fld_name, \"metainfo \", 9)) {\n" + " fld_name += 9;\n" + " name_len -= 9;\n" + " is_metainfo = TRUE;\n" + " }\n "); + } for (i = 0; i < sdef->nElements; ++i) { src = mputprintf(src, // check field name "if (%d == name_len && 0 == strncmp(fld_name, \"%s\", name_len)) {\n" - " int ret_val = field_%s.JSON_decode(%s_descr_, p_tok, p_silent);\n" - " if (0 > ret_val) {\n" - " if (JSON_ERROR_INVALID_TOKEN) {\n" - " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, \"%s\");\n" - " }\n" - " return JSON_ERROR_FATAL;\n" - " }\n" - " dec_len += ret_val;\n" - " } else " , (int)strlen(sdef->elements[i].jsonAlias ? sdef->elements[i].jsonAlias : sdef->elements[i].dispname) - , sdef->elements[i].jsonAlias ? sdef->elements[i].jsonAlias : sdef->elements[i].dispname - , sdef->elements[i].name, sdef->elements[i].typedescrname + , sdef->elements[i].jsonAlias ? sdef->elements[i].jsonAlias : sdef->elements[i].dispname); + if (has_metainfo_enabled) { + src = mputstr(src, " if (is_metainfo) {\n"); + if (sdef->elements[i].jsonMetainfoUnbound) { + src = mputprintf(src, + // check meta info + " char* info_value = 0;\n" + " size_t info_len = 0;\n" + " dec_len += p_tok.get_next_token(&j_token, &info_value, &info_len);\n" + " if (JSON_TOKEN_STRING == j_token && 9 == info_len &&\n" + " 0 == strncmp(info_value, \"\\\"unbound\\\"\", 9)) {\n" + " metainfo_%s = JSON_METAINFO_UNBOUND;\n" + " }\n" + " else {\n" + " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_METAINFO_VALUE_ERROR, \"%s\");\n" + " return JSON_ERROR_FATAL;\n" + " }\n" + , sdef->elements[i].name, sdef->elements[i].dispname); + } + else { + src = mputprintf(src, + " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_METAINFO_NOT_APPLICABLE, \"%s\");\n" + " return JSON_ERROR_FATAL;\n" + , sdef->elements[i].dispname); + } + src = mputstr(src, + " }\n" + " else {\n"); + if (sdef->elements[i].jsonMetainfoUnbound) { + src = mputstr(src, " buf_pos = p_tok.get_buf_pos();\n"); + } + } + src = mputprintf(src, + " int ret_val = field_%s.JSON_decode(%s_descr_, p_tok, p_silent);\n" + " if (0 > ret_val) {\n" + " if (JSON_ERROR_INVALID_TOKEN == ret_val) {\n" + , sdef->elements[i].name, sdef->elements[i].typedescrname); + if (sdef->elements[i].jsonMetainfoUnbound) { + src = mputprintf(src, + // undo the last action on the buffer, check if the invalid token was a null token + " p_tok.set_buf_pos(buf_pos);\n" + " p_tok.get_next_token(&j_token, NULL, NULL);\n" + " if (JSON_TOKEN_LITERAL_NULL == j_token) {\n" + " if (JSON_METAINFO_NONE == metainfo_%s) {\n" + // delay reporting an error for now, there might be meta info later + " metainfo_%s = JSON_METAINFO_NEEDED;\n" + " continue;\n" + " }\n" + " else if (JSON_METAINFO_UNBOUND == metainfo_%s) {\n" + // meta info already found + " continue;\n" + " }\n" + " }\n" + , sdef->elements[i].name, sdef->elements[i].name, sdef->elements[i].name); + } + src = mputprintf(src, + " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, \"%s\");\n" + " }\n" + " return JSON_ERROR_FATAL;\n" + " }\n" + " dec_len += ret_val;\n" , sdef->elements[i].dispname); + if (has_metainfo_enabled) { + src = mputstr(src, " }\n"); + } + src = mputstr(src, + " }\n" + " else "); } - src = mputstr(src, + src = mputprintf(src, "{\n" // invalid field name " char* fld_name2 = mcopystrn(fld_name, name_len);\n" - " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_INVALID_NAME_ERROR, fld_name2);\n" + " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, %sJSON_DEC_INVALID_NAME_ERROR, fld_name2);\n" // if this is set to a warning, skip the value of the field " dec_len += p_tok.get_next_token(&j_token, NULL, NULL);\n" " if (JSON_TOKEN_NUMBER != j_token && JSON_TOKEN_STRING != j_token &&\n" @@ -4339,11 +4499,25 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) " if (JSON_TOKEN_OBJECT_END != j_token) {\n" " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_OBJECT_END_TOKEN_ERROR, \"\");\n" " return JSON_ERROR_FATAL;\n" - " }\n\n"); - // Check if every field has been set + " }\n\n " + , has_metainfo_enabled ? "is_metainfo ?\n JSON_DEC_METAINFO_NAME_ERROR : " : ""); + // Check if every field has been set and handle meta info for (i = 0; i < sdef->nElements; ++i) { + if (sdef->elements[i].jsonMetainfoUnbound) { + src = mputprintf(src, + "if (JSON_METAINFO_UNBOUND == metainfo_%s) {\n" + " field_%s.clean_up();\n" + " }\n" + " else if (JSON_METAINFO_NEEDED == metainfo_%s) {\n" + // no meta info was found for this field, report the delayed error + " JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, \"%s\");\n" + " }\n" + " else " + , sdef->elements[i].name, sdef->elements[i].name + , sdef->elements[i].name, sdef->elements[i].dispname); + } src = mputprintf(src, - " if (!field_%s.is_bound()) {\n" + "if (!field_%s.is_bound()) {\n" , sdef->elements[i].name); if (sdef->elements[i].jsonDefaultValue) { src = mputprintf(src, @@ -4952,11 +5126,11 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) "}\n\n", name, name, name); /* match operation (template matching) */ - def = mputprintf(def, "boolean match(const %s& other_value) const;\n", - name); + def = mputprintf(def, "boolean match(const %s& other_value, boolean legacy " + "= FALSE) const;\n", name); src = mputprintf(src, - "boolean %s_template::match(const %s& other_value) const\n" + "boolean %s_template::match(const %s& other_value, boolean legacy) const\n" "{\n" "if (!other_value.is_bound()) return FALSE;\n" "switch (template_selection) {\n" @@ -4970,13 +5144,13 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) src = mputprintf(src,"if(!other_value.%s().is_bound()) return FALSE;\n", sdef->elements[i].name); if (sdef->elements[i].isOptional) src = mputprintf(src, "if((other_value.%s().ispresent() ? " - "!single_value->field_%s.match((const %s&)other_value.%s()) : " - "!single_value->field_%s.match_omit()))", + "!single_value->field_%s.match((const %s&)other_value.%s(), legacy) : " + "!single_value->field_%s.match_omit(legacy)))", sdef->elements[i].name, sdef->elements[i].name, sdef->elements[i].type, sdef->elements[i].name, sdef->elements[i].name); else src = mputprintf(src, - "if(!single_value->field_%s.match(other_value.%s()))", + "if(!single_value->field_%s.match(other_value.%s(), legacy))", sdef->elements[i].name, sdef->elements[i].name); src = mputstr(src, "return FALSE;\n"); } @@ -4986,7 +5160,7 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) "case COMPLEMENTED_LIST:\n" "for (unsigned int list_count = 0; list_count < value_list.n_values; " "list_count++)\n" - "if (value_list.list_value[list_count].match(other_value)) " + "if (value_list.list_value[list_count].match(other_value, legacy)) " "return template_selection == VALUE_LIST;\n" "return template_selection == COMPLEMENTED_LIST;\n" "default:\n" @@ -5244,14 +5418,14 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) "}\n\n"); /* log_match function */ - def = mputprintf(def, "void log_match(const %s& match_value) " - "const;\n", name); + def = mputprintf(def, "void log_match(const %s& match_value, " + "boolean legacy = FALSE) const;\n", name); src = mputprintf(src, - "void %s_template::log_match(const %s& match_value) const\n" - "{\n" + "void %s_template::log_match(const %s& match_value, boolean legacy) const\n" + "{\n" "if(TTCN_Logger::VERBOSITY_COMPACT" " == TTCN_Logger::get_matching_verbosity()){\n" - "if(match(match_value)){\n" + "if(match(match_value, legacy)){\n" "TTCN_Logger::print_logmatch_buffer();\n" "TTCN_Logger::log_event_str(\" matched\");\n" "} else{\n" @@ -5262,13 +5436,13 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) if (sdef->elements[i].isOptional){ src = mputprintf(src, "if (match_value.%s().ispresent()){\n" - "if(!single_value->field_%s.match(match_value.%s())){\n" + "if(!single_value->field_%s.match(match_value.%s(), legacy)){\n" "TTCN_Logger::log_logmatch_info(\".%s\");\n" - "single_value->field_%s.log_match(match_value.%s());\n" + "single_value->field_%s.log_match(match_value.%s(), legacy);\n" "TTCN_Logger::set_logmatch_buffer_len(previous_size);\n" "}\n" "} else {\n" - "if (!single_value->field_%s.match_omit()){\n " + "if (!single_value->field_%s.match_omit(legacy)){\n " "TTCN_Logger::log_logmatch_info(\".%s := omit with \");\n" "TTCN_Logger::print_logmatch_buffer();\n" "single_value->field_%s.log();\n" @@ -5283,9 +5457,9 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) sdef->elements[i].name); }else{ src = mputprintf(src, - "if(!single_value->field_%s.match(match_value.%s())){\n" + "if(!single_value->field_%s.match(match_value.%s(), legacy)){\n" "TTCN_Logger::log_logmatch_info(\".%s\");\n" - "single_value->field_%s.log_match(match_value.%s());\n" + "single_value->field_%s.log_match(match_value.%s(), legacy);\n" "TTCN_Logger::set_logmatch_buffer_len(previous_size);\n" "}\n",sdef->elements[i].name, sdef->elements[i].name, sdef->elements[i].dispname, sdef->elements[i].name, @@ -5311,11 +5485,11 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) src = mputprintf(src, " %s := \");\n", sdef->elements[i].dispname); if (sdef->elements[i].isOptional) src = mputprintf(src, "if (match_value.%s().ispresent()) " - "single_value->field_%s.log_match(match_value.%s());\n" + "single_value->field_%s.log_match(match_value.%s(), legacy);\n" "else {\n" "TTCN_Logger::log_event_str(\"omit with \");\n" "single_value->field_%s.log();\n" - "if (single_value->field_%s.match_omit()) " + "if (single_value->field_%s.match_omit(legacy)) " "TTCN_Logger::log_event_str(\" matched\");\n" "else TTCN_Logger::log_event_str(\" unmatched\");\n" "}\n", @@ -5323,7 +5497,7 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) sdef->elements[i].name, sdef->elements[i].name, sdef->elements[i].name); else src = mputprintf(src, - "single_value->field_%s.log_match(match_value.%s());\n", + "single_value->field_%s.log_match(match_value.%s(), legacy);\n", sdef->elements[i].name, sdef->elements[i].name); } src = mputstr(src, @@ -5332,7 +5506,7 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) "match_value.log();\n" "TTCN_Logger::log_event_str(\" with \");\n" "log();\n" - "if (match(match_value)) TTCN_Logger::log_event_str(\" matched\");\n" + "if (match(match_value, legacy)) TTCN_Logger::log_event_str(\" matched\");\n" "else TTCN_Logger::log_event_str(\" unmatched\");\n" "}\n" "}\n\n"); @@ -5427,7 +5601,11 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) "param.error(\"Field `%%s' not found in %s template type `%s'\", param_field);\n" " }\n" " param.basic_check(Module_Param::BC_TEMPLATE, \"%s template\");\n" - " switch (param.get_type()) {\n" + " Module_Param_Ptr mp = ¶m;\n" + " if (param.get_type() == Module_Param::MP_Reference) {\n" + " mp = param.get_referenced_param();\n" + " }\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Omit:\n" " *this = OMIT_VALUE;\n" " break;\n" @@ -5438,31 +5616,34 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) " *this = ANY_OR_OMIT;\n" " break;\n" " case Module_Param::MP_List_Template:\n" - " case Module_Param::MP_ComplementList_Template:\n" - " set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());\n" - " for (size_t p_i=0; p_iget_type()==Module_Param::MP_List_Template ? " + "VALUE_LIST : COMPLEMENTED_LIST, mp->get_size());\n" + " for (size_t p_i=0; p_iget_size(); p_i++) {\n" + " temp.list_item(p_i).set_param(*mp->get_elem(p_i));\n" " }\n" - " break;\n" + " *this = temp;\n" + " break; }\n" " case Module_Param::MP_Value_List:\n" - " if (%luget_size()) {\n" + " param.error(\"%s template of type %s has %lu fields but list value has %%d fields\", (int)mp->get_size());\n" " }\n", - kind_str, dispname, kind_str, (unsigned long)sdef->nElements, kind_str, dispname, (unsigned long)sdef->nElements); + kind_str, dispname, kind_str, name, (unsigned long)sdef->nElements, kind_str, dispname, (unsigned long)sdef->nElements); for (i = 0; i < sdef->nElements; ++i) { src = mputprintf(src, - " if (param.get_size()>%lu && param.get_elem(%lu)->get_type()!=Module_Param::MP_NotUsed) %s().set_param(*param.get_elem(%lu));\n", + " if (mp->get_size()>%lu && mp->get_elem(%lu)->get_type()!=Module_Param::MP_NotUsed) %s().set_param(*mp->get_elem(%lu));\n", (unsigned long)i, (unsigned long)i, sdef->elements[i].name, (unsigned long)i); } src = mputstr(src, " break;\n" " case Module_Param::MP_Assignment_List: {\n" - " Vector value_used(param.get_size());\n" - " value_used.resize(param.get_size(), false);\n"); + " Vector value_used(mp->get_size());\n" + " value_used.resize(mp->get_size(), false);\n"); for (i = 0; i < sdef->nElements; ++i) { src = mputprintf(src, - " for (size_t val_idx=0; val_idxget_size(); val_idx++) {\n" + " Module_Param* const curr_param = mp->get_elem(val_idx);\n" " if (!strcmp(curr_param->get_id()->get_name(), \"%s\")) {\n" " if (curr_param->get_type()!=Module_Param::MP_NotUsed) {\n" " %s().set_param(*curr_param);\n" @@ -5473,23 +5654,96 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) , sdef->elements[i].dispname, sdef->elements[i].name); } src = mputprintf(src, - " for (size_t val_idx=0; val_idxerror(\"Non existent field name in type %s: %%s\", param.get_elem(val_idx)->get_id()->get_name());\n" + " for (size_t val_idx=0; val_idxget_size(); val_idx++) if (!value_used[val_idx]) {\n" + " mp->get_elem(val_idx)->error(\"Non existent field name in type %s: %%s\", mp->get_elem(val_idx)->get_id()->get_name());\n" " break;\n" " }\n" " } break;\n" " default:\n" " param.type_error(\"%s template\", \"%s\");\n" " }\n" - " is_ifpresent = param.get_ifpresent();\n" + " is_ifpresent = param.get_ifpresent() || mp->get_ifpresent();\n" "}\n\n", dispname, kind_str, dispname); + + /* get_param() */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf(src, + "Module_Param* %s_template::get_param(Module_Param_Name& param_name) const\n" + "{\n" + " if (param_name.next_name()) {\n" + // Haven't reached the end of the module parameter name + // => the name refers to one of the fields, not to the whole record + " char* param_field = param_name.get_current_name();\n" + " if (param_field[0] >= '0' && param_field[0] <= '9') {\n" + " TTCN_error(\"Unexpected array index in module parameter reference, \"\n" + " \"expected a valid field name for %s template type `%s'\");\n" + " }\n" + " ", name, kind_str, dispname); + for (i = 0; i < sdef->nElements; i++) { + src = mputprintf(src, + "if (strcmp(\"%s\", param_field) == 0) {\n" + " return %s().get_param(param_name);\n" + " } else ", + sdef->elements[i].dispname, sdef->elements[i].name); + } + src = mputprintf(src, + "TTCN_error(\"Field `%%s' not found in %s type `%s'\", param_field);\n" + " }\n" + " Module_Param* mp = NULL;\n" + " switch (template_selection) {\n" + " case UNINITIALIZED_TEMPLATE:\n" + " mp = new Module_Param_Unbound();\n" + " break;\n" + " case OMIT_VALUE:\n" + " mp = new Module_Param_Omit();\n" + " break;\n" + " case ANY_VALUE:\n" + " mp = new Module_Param_Any();\n" + " break;\n" + " case ANY_OR_OMIT:\n" + " mp = new Module_Param_AnyOrNone();\n" + " break;\n" + " case SPECIFIC_VALUE: {\n" + " mp = new Module_Param_Assignment_List();\n" + , kind_str, dispname); + for (i = 0; i < sdef->nElements; i++) { + src = mputprintf(src, + " Module_Param* mp_field_%s = single_value->field_%s.get_param(param_name);\n" + " mp_field_%s->set_id(new Module_Param_FieldName(mcopystr(\"%s\")));\n" + " mp->add_elem(mp_field_%s);\n" + , sdef->elements[i].name, sdef->elements[i].name + , sdef->elements[i].name, sdef->elements[i].dispname + , sdef->elements[i].name); + } + src = mputstr(src, + " break; }\n" + " case VALUE_LIST:\n" + " case COMPLEMENTED_LIST: {\n" + " if (template_selection == VALUE_LIST) {\n" + " mp = new Module_Param_List_Template();\n" + " }\n" + " else {\n" + " mp = new Module_Param_ComplementList_Template();\n" + " }\n" + " for (size_t i = 0; i < value_list.n_values; ++i) {\n" + " mp->add_elem(value_list.list_value[i].get_param(param_name));\n" + " }\n" + " break; }\n" + " default:\n" + " break;\n" + " }\n" + " if (is_ifpresent) {\n" + " mp->set_ifpresent();\n" + " }\n" + " return mp;\n" + "}\n\n"); /* check template restriction */ def = mputstr(def, "void check_restriction(template_res t_res, " - "const char* t_name=NULL) const;\n"); + "const char* t_name=NULL, boolean legacy = FALSE) const;\n"); src = mputprintf(src, "void %s_template::check_restriction(" - "template_res t_res, const char* t_name) const\n" + "template_res t_res, const char* t_name, boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return;\n" "switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {\n" @@ -5506,7 +5760,7 @@ void defRecordTemplate1(const struct_def *sdef, output_struct *output) src = mputprintf(src, "return;\n" "case TR_PRESENT:\n" - "if (!match_omit()) return;\n" + "if (!match_omit(legacy)) return;\n" "break;\n" "default:\n" "return;\n" @@ -5649,15 +5903,30 @@ static void defEmptyRecordClass(const struct_def *sdef, "}\n\n", name); /* set_param function */ - def = mputstr(def, "void set_param(const Module_Param& param);\n"); - src = mputprintf(src, "void %s::set_param(const Module_Param& param)\n" + def = mputstr(def, "void set_param(Module_Param& param);\n"); + src = mputprintf(src, "void %s::set_param(Module_Param& param)\n" "{\n" " param.basic_check(Module_Param::BC_VALUE, \"empty record/set value (i.e. { })\");\n" - " if (param.get_type()!=Module_Param::MP_Value_List || param.get_size()>0) {\n" + " Module_Param_Ptr mp = ¶m;\n" + " if (param.get_type() == Module_Param::MP_Reference) {\n" + " mp = param.get_referenced_param();\n" + " }\n" + " if (mp->get_type()!=Module_Param::MP_Value_List || mp->get_size()>0) {\n" " param.type_error(\"empty record/set value (i.e. { })\", \"%s\");\n" " }\n" " bound_flag = TRUE;\n" "}\n\n", name, dispname); + + /* get param function */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf(src, + "Module_Param* %s::get_param(Module_Param_Name& /* param_name */) const\n" + "{\n" + " if (!is_bound()) {\n" + " return new Module_Param_Unbound();\n" + " }\n" + " return new Module_Param_Value_List();\n" + "}\n\n", name); /* encode_text function */ def = mputstr(def, "void encode_text(Text_Buf& text_buf) const;\n"); @@ -6108,9 +6377,10 @@ static void defEmptyRecordTemplate(const char *name, const char *dispname, "}\n\n", name, name, name); /* match operation with {} */ - def = mputstr(def, "boolean match(null_type other_value) const;\n"); - src = mputprintf(src, "boolean %s_template::match(null_type other_value) " - "const\n" + def = mputstr(def, "boolean match(null_type other_value, boolean legacy " + "= FALSE) const;\n"); + src = mputprintf(src, "boolean %s_template::match(null_type other_value," + "boolean) const\n" "{\n" "switch (template_selection) {\n" "case ANY_VALUE:\n" @@ -6134,10 +6404,10 @@ static void defEmptyRecordTemplate(const char *name, const char *dispname, "}\n\n", name, dispname); /* match operation with specific value */ - def = mputprintf(def, "boolean match(const %s& other_value) const;\n", - name); - src = mputprintf(src, "boolean %s_template::match(const %s& other_value) " - "const\n" + def = mputprintf(def, "boolean match(const %s& other_value, boolean legacy " + "= FALSE) const;\n", name); + src = mputprintf(src, "boolean %s_template::match(const %s& other_value, " + "boolean) const\n" "{\n" "if (!other_value.is_bound()) return FALSE;" "return match(NULL_VALUE);\n" @@ -6215,10 +6485,10 @@ static void defEmptyRecordTemplate(const char *name, const char *dispname, "}\n\n", name); /* log_match function */ - def = mputprintf(def, "void log_match(const %s& match_value) const;\n", - name); - src = mputprintf(src, "void %s_template::log_match(const %s& match_value) " - "const\n" + def = mputprintf(def, "void log_match(const %s& match_value, " + "boolean legacy = FALSE) const;\n", name); + src = mputprintf(src, "void %s_template::log_match(const %s& match_value, " + "boolean) const\n" "{\n" "match_value.log();\n" "TTCN_Logger::log_event_str(\" with \");\n" @@ -6279,12 +6549,16 @@ static void defEmptyRecordTemplate(const char *name, const char *dispname, "}\n\n", name, name, dispname); /* set_param() */ - def = mputstr(def, "void set_param(const Module_Param& param);\n"); + def = mputstr(def, "void set_param(Module_Param& param);\n"); src = mputprintf(src, - "void %s_template::set_param(const Module_Param& param)\n" + "void %s_template::set_param(Module_Param& param)\n" "{\n" " param.basic_check(Module_Param::BC_TEMPLATE, \"empty record/set template\");\n" - " switch (param.get_type()) {\n" + " Module_Param_Ptr mp = ¶m;\n" + " if (param.get_type() == Module_Param::MP_Reference) {\n" + " mp = param.get_referenced_param();\n" + " }\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Omit:\n" " *this = OMIT_VALUE;\n" " break;\n" @@ -6295,28 +6569,74 @@ static void defEmptyRecordTemplate(const char *name, const char *dispname, " *this = ANY_OR_OMIT;\n" " break;\n" " case Module_Param::MP_List_Template:\n" - " case Module_Param::MP_ComplementList_Template:\n" - " set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());\n" - " for (size_t p_i=0; p_iget_type()==Module_Param::MP_List_Template ? " + "VALUE_LIST : COMPLEMENTED_LIST, mp->get_size());\n" + " for (size_t p_i=0; p_iget_size(); p_i++) {\n" + " temp.list_item(p_i).set_param(*mp->get_elem(p_i));\n" " }\n" - " break;\n" + " *this = temp;\n" + " break; }\n" " case Module_Param::MP_Value_List:\n" - " if (param.get_size()>0) param.type_error(\"empty record/set template\", \"%s\");\n" + " if (mp->get_size()>0) param.type_error(\"empty record/set template\", \"%s\");\n" " *this = NULL_VALUE;\n" " break;\n" " default:\n" " param.type_error(\"empty record/set template\", \"%s\");\n" " }\n" - " is_ifpresent = param.get_ifpresent();\n" - "}\n\n", name, dispname, dispname); + " is_ifpresent = param.get_ifpresent() || mp->get_ifpresent();\n" + "}\n\n", name, name, dispname, dispname); + + /* get_param() */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf(src, + "Module_Param* %s_template::get_param(Module_Param_Name& param_name) const\n" + "{\n" + " Module_Param* mp = NULL;\n" + " switch (template_selection) {\n" + " case UNINITIALIZED_TEMPLATE:\n" + " mp = new Module_Param_Unbound();\n" + " break;\n" + " case OMIT_VALUE:\n" + " mp = new Module_Param_Omit();\n" + " break;\n" + " case ANY_VALUE:\n" + " mp = new Module_Param_Any();\n" + " break;\n" + " case ANY_OR_OMIT:\n" + " mp = new Module_Param_AnyOrNone();\n" + " break;\n" + " case SPECIFIC_VALUE:\n" + " mp = new Module_Param_Value_List();\n" + " break;\n" + " case VALUE_LIST:\n" + " case COMPLEMENTED_LIST: {\n" + " if (template_selection == VALUE_LIST) {\n" + " mp = new Module_Param_List_Template();\n" + " }\n" + " else {\n" + " mp = new Module_Param_ComplementList_Template();\n" + " }\n" + " for (size_t i = 0; i < value_list.n_values; ++i) {\n" + " mp->add_elem(value_list.list_value[i].get_param(param_name));\n" + " }\n" + " break; }\n" + " default:\n" + " break;\n" + " }\n" + " if (is_ifpresent) {\n" + " mp->set_ifpresent();\n" + " }\n" + " return mp;\n" + "}\n\n", name); /* check template restriction */ def = mputstr(def, "void check_restriction(template_res t_res, " - "const char* t_name=NULL) const;\n"); + "const char* t_name=NULL, boolean legacy = FALSE) const;\n"); src = mputprintf(src, "void %s_template::check_restriction(" - "template_res t_res, const char* t_name) const\n" + "template_res t_res, const char* t_name, boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return;\n" "switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {\n" @@ -6326,7 +6646,7 @@ static void defEmptyRecordTemplate(const char *name, const char *dispname, "if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;\n" "return;\n" "case TR_PRESENT:\n" - "if (!match_omit()) return;\n" + "if (!match_omit(legacy)) return;\n" "break;\n" "default:\n" "return;\n" @@ -6350,18 +6670,18 @@ static void defCommonRecordTemplate(const char *name, char **def, char **src) { /* TTCN-3 ispresent() function */ - *def = mputstr(*def, "boolean is_present() const;\n"); + *def = mputstr(*def, "boolean is_present(boolean legacy = FALSE) const;\n"); *src = mputprintf(*src, - "boolean %s_template::is_present() const\n" + "boolean %s_template::is_present(boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;\n" - "return !match_omit();\n" + "return !match_omit(legacy);\n" "}\n\n", name); /* match_omit() */ - *def = mputstr(*def, "boolean match_omit() const;\n"); + *def = mputstr(*def, "boolean match_omit(boolean legacy = FALSE) const;\n"); *src = mputprintf(*src, - "boolean %s_template::match_omit() const\n" + "boolean %s_template::match_omit(boolean legacy) const\n" "{\n" "if (is_ifpresent) return TRUE;\n" "switch (template_selection) {\n" @@ -6370,10 +6690,12 @@ static void defCommonRecordTemplate(const char *name, "return TRUE;\n" "case VALUE_LIST:\n" "case COMPLEMENTED_LIST:\n" + "if (legacy) {\n" "for (unsigned int l_idx=0; l_idxget_type()==Module_Param::MP_Value_List && mp->get_size()==0) {\n" " *this = NULL_VALUE;\n" " return;\n" " }\n" - " switch (param.get_type()) {\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Value_List:\n" - " set_size(param.get_size());\n" - " for (size_t i=0; iget_size());\n" + " for (size_t i=0; iget_size(); ++i) {\n" + " Module_Param* const curr = mp->get_elem(i);\n" " if (curr->get_type()!=Module_Param::MP_NotUsed) {\n" " (*this)[i].set_param(*curr);\n" " }\n" " }\n" " break;\n" " case Module_Param::MP_Indexed_List:\n" - " for (size_t i=0; iget_size(); ++i) {\n" + " Module_Param* const curr = mp->get_elem(i);\n" " (*this)[curr->get_id()->get_index()].set_param(*curr);\n" " }\n" " break;\n" @@ -630,12 +634,12 @@ void defRecordOfClass1(const struct_of_def *sdef, output_struct *output) " }\n" " break;\n" " case Module_Param::OT_CONCAT:\n" - " switch (param.get_type()) {\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Value_List: {\n" " if (!is_bound()) *this = NULL_VALUE;\n" " int start_idx = lengthof();\n" - " for (size_t i=0; iget_size(); ++i) {\n" + " Module_Param* const curr = mp->get_elem(i);\n" " if ((curr->get_type()!=Module_Param::MP_NotUsed)) {\n" " (*this)[start_idx+(int)i].set_param(*curr);\n" " }\n" @@ -651,10 +655,41 @@ void defRecordOfClass1(const struct_of_def *sdef, output_struct *output) " default:\n" " TTCN_error(\"Internal error: Unknown operation type.\");\n" " }\n" - "}\n", name, sdef->kind == RECORD_OF ? "record of" : "set of", + "}\n\n", name, sdef->kind == RECORD_OF ? "record of" : "set of", dispname, sdef->kind == RECORD_OF ? "record of" : "set of", sdef->kind == RECORD_OF ? "record of" : "set of", dispname, sdef->kind == RECORD_OF ? "record of" : "set of", dispname); + + /* get param function */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf + (src, + "Module_Param* %s::get_param(Module_Param_Name& param_name) const\n" + "{\n" + " if (!is_bound()) {\n" + " return new Module_Param_Unbound();\n" + " }\n" + " if (param_name.next_name()) {\n" + // Haven't reached the end of the module parameter name + // => the name refers to one of the elements, not to the whole record of + " char* param_field = param_name.get_current_name();\n" + " if (param_field[0] < '0' || param_field[0] > '9') {\n" + " TTCN_error(\"Unexpected record field name in module parameter reference, \"\n" + " \"expected a valid index for %s type `%s'\");\n" + " }\n" + " int param_index = -1;\n" + " sscanf(param_field, \"%%d\", ¶m_index);\n" + " return (*this)[param_index].get_param(param_name);\n" + " }\n" + " Vector values;\n" + " for (int i = 0; i < val_ptr->n_elements; ++i) {\n" + " values.push_back((*this)[i].get_param(param_name));\n" + " }\n" + " Module_Param_Value_List* mp = new Module_Param_Value_List();\n" + " mp->add_list_with_implicit_ids(&values);\n" + " values.clear();\n" + " return mp;\n" + "}\n\n", name, sdef->kind == RECORD_OF ? "record of" : "set of", dispname); /* set implicit omit function, recursive */ def = mputstr(def, " void set_implicit_omit();\n"); @@ -2083,25 +2118,29 @@ void defRecordOfClassMemAllocOptimized(const struct_of_def *sdef, output_struct " return;\n" " }\n" " param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, \"%s value\");\n" + " Module_Param_Ptr mp = ¶m;\n" + " if (param.get_type() == Module_Param::MP_Reference) {\n" + " mp = param.get_referenced_param();\n" + " }\n" " switch (param.get_operation_type()) {\n" " case Module_Param::OT_ASSIGN:\n" - " if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {\n" + " if (mp->get_type()==Module_Param::MP_Value_List && mp->get_size()==0) {\n" " *this = NULL_VALUE;\n" " return;\n" " }\n" - " switch (param.get_type()) {\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Value_List:\n" - " set_size(param.get_size());\n" - " for (size_t i=0; iget_size());\n" + " for (size_t i=0; iget_size(); ++i) {\n" + " Module_Param* const curr = mp->get_elem(i);\n" " if (curr->get_type()!=Module_Param::MP_NotUsed) {\n" " (*this)[i].set_param(*curr);\n" " }\n" " }\n" " break;\n" " case Module_Param::MP_Indexed_List:\n" - " for (size_t i=0; iget_size(); ++i) {\n" + " Module_Param* const curr = mp->get_elem(i);\n" " (*this)[curr->get_id()->get_index()].set_param(*curr);\n" " }\n" " break;\n" @@ -2110,12 +2149,12 @@ void defRecordOfClassMemAllocOptimized(const struct_of_def *sdef, output_struct " }\n" " break;\n" " case Module_Param::OT_CONCAT:\n" - " switch (param.get_type()) {\n" + " switch (mp->get_type()) {\n" " case Module_Param::MP_Value_List: {\n" " if (!is_bound()) *this = NULL_VALUE;\n" " int start_idx = lengthof();\n" - " for (size_t i=0; iget_size(); ++i) {\n" + " Module_Param* const curr = mp->get_elem(i);\n" " if ((curr->get_type()!=Module_Param::MP_NotUsed)) {\n" " (*this)[start_idx+(int)i].set_param(*curr);\n" " }\n" @@ -2135,6 +2174,37 @@ void defRecordOfClassMemAllocOptimized(const struct_of_def *sdef, output_struct sdef->kind == RECORD_OF ? "record of" : "set of", sdef->kind == RECORD_OF ? "record of" : "set of", dispname, sdef->kind == RECORD_OF ? "record of" : "set of", dispname); + + /* get param function */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf + (src, + "Module_Param* %s::get_param(Module_Param_Name& param_name) const\n" + "{\n" + " if (!is_bound()) {\n" + " return new Module_Param_Unbound();\n" + " }\n" + " if (param_name.next_name()) {\n" + // Haven't reached the end of the module parameter name + // => the name refers to one of the elements, not to the whole record of + " char* param_field = param_name.get_current_name();\n" + " if (param_field[0] < '0' || param_field[0] > '9') {\n" + " TTCN_error(\"Unexpected record field name in module parameter reference, \"\n" + " \"expected a valid index for %s type `%s'\");\n" + " }\n" + " int param_index = -1;\n" + " sscanf(param_field, \"%%d\", ¶m_index);\n" + " return (*this)[param_index].get_param(param_name);\n" + " }\n" + " Vector values;\n" + " for (int i = 0; i < n_elements; ++i) {\n" + " values.push_back((*this)[i].get_param(param_name));\n" + " }\n" + " Module_Param_Value_List* mp = new Module_Param_Value_List();\n" + " mp->add_list_with_implicit_ids(&values);\n" + " values.clear();\n" + " return mp;\n" + "}\n\n", name, sdef->kind == RECORD_OF ? "record of" : "set of", dispname); /* encoding / decoding functions */ def = mputstr(def, "void encode_text(Text_Buf& text_buf) const;\n"); @@ -3388,15 +3458,15 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) def = mputstr(def, "static boolean match_function_specific(const Base_Type *value_ptr, " "int value_index, const Restricted_Length_Template *template_ptr, " - "int template_index);\n"); + "int template_index, boolean legacy);\n"); src = mputprintf(src, "boolean %s_template::match_function_specific(const Base_Type *value_ptr, " "int value_index, const Restricted_Length_Template *template_ptr, " - "int template_index)\n" + "int template_index, boolean legacy)\n" "{\n" "if (value_index >= 0) return ((const %s_template*)template_ptr)->" "single_value.value_elements[template_index]->" - "match((*(const %s*)value_ptr)[value_index]);\n" + "match((*(const %s*)value_ptr)[value_index], legacy);\n" "else return ((const %s_template*)template_ptr)->" "single_value.value_elements[template_index]->is_any_or_omit();\n" "}\n\n", name, name, name, name); @@ -3406,15 +3476,15 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) def = mputstr(def, "static boolean match_function_set(const Base_Type *value_ptr, " "int value_index, const Restricted_Length_Template *template_ptr, " - "int template_index);\n"); + "int template_index, boolean legacy);\n"); src = mputprintf(src, "boolean %s_template::match_function_set(const Base_Type *value_ptr, " "int value_index, const Restricted_Length_Template *template_ptr, " - "int template_index)\n" + "int template_index, boolean legacy)\n" "{\n" "if (value_index >= 0) return ((const %s_template*)template_ptr)->" "value_set.set_items[template_index].match(" - "(*(const %s*)value_ptr)[value_index]);\n" + "(*(const %s*)value_ptr)[value_index], legacy);\n" "else return ((const %s_template*)template_ptr)->" "value_set.set_items[template_index].is_any_or_omit();\n" "}\n\n", name, name, name, name); @@ -3423,16 +3493,16 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) def = mputstr(def, "static void log_function(const Base_Type *value_ptr, " "const Restricted_Length_Template *template_ptr," - " int index_value, int index_template);\n"); + " int index_value, int index_template, boolean legacy);\n"); src = mputprintf(src, "void %s_template::log_function(const Base_Type *value_ptr, " "const Restricted_Length_Template *template_ptr," - " int index_value, int index_template)\n" + " int index_value, int index_template, boolean legacy)\n" "{\n" "if (value_ptr != NULL && template_ptr != NULL)" "((const %s_template*)template_ptr)" "->single_value.value_elements[index_template]" - "->log_match((*(const %s*)value_ptr)[index_value]);\n" + "->log_match((*(const %s*)value_ptr)[index_value], legacy);\n" "else if (value_ptr != NULL) (*(const %s*)value_ptr)[index_value].log();\n" "else if (template_ptr != NULL) ((const %s_template*)template_ptr)" "->single_value.value_elements[index_template]->log();\n" @@ -3860,10 +3930,10 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) dispname, dispname, dispname, dispname, dispname, dispname); /* match operation */ - def = mputprintf(def, "boolean match(const %s& other_value) const;\n", - name); + def = mputprintf(def, "boolean match(const %s& other_value, boolean legacy " + "= FALSE) const;\n", name); src = mputprintf(src, - "boolean %s_template::match(const %s& other_value) const\n" + "boolean %s_template::match(const %s& other_value, boolean legacy) const\n" "{\n" "if (!other_value.is_bound()) return FALSE;\n" "int value_length = other_value.size_of();\n" @@ -3871,7 +3941,7 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "switch (template_selection) {\n" "case SPECIFIC_VALUE:\n" "return match_%s_of(&other_value, value_length, this, " - "single_value.n_elements, match_function_specific);\n" + "single_value.n_elements, match_function_specific, legacy);\n" "case OMIT_VALUE:\n" "return FALSE;\n" "case ANY_VALUE:\n" @@ -3881,7 +3951,7 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "case COMPLEMENTED_LIST:\n" "for (unsigned int list_count = 0; list_count < value_list.n_values; " "list_count++)\n" - "if (value_list.list_value[list_count].match(other_value)) " + "if (value_list.list_value[list_count].match(other_value, legacy)) " "return template_selection == VALUE_LIST;\n" "return template_selection == COMPLEMENTED_LIST;\n", name, name, sdef->kind == RECORD_OF ? "record" : "set"); @@ -3890,7 +3960,7 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "case SUPERSET_MATCH:\n" "case SUBSET_MATCH:\n" "return match_set_of(&other_value, value_length, this, " - "value_set.n_items, match_function_set);\n"); + "value_set.n_items, match_function_set, legacy);\n"); } src = mputprintf(src, "default:\n" @@ -4091,13 +4161,13 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "log_ifpresent();\n" "}\n\n"); - def = mputprintf(def, "void log_match(const %s& match_value) const;\n", - name); - src = mputprintf(src, "void %s_template::log_match(const %s& match_value) " - "const\n" + def = mputprintf(def, "void log_match(const %s& match_value, " + "boolean legacy = FALSE) const;\n", name); + src = mputprintf(src, "void %s_template::log_match(const %s& match_value, " + "boolean legacy) const\n" "{\n" "if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){\n" - "if(match(match_value)){\n" + "if(match(match_value, legacy)){\n" "TTCN_Logger::print_logmatch_buffer();\n" "TTCN_Logger::log_event_str(\" matched\");\n" "}else{\n", name, name); @@ -4110,9 +4180,9 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();\n" "for (int elem_count = 0; elem_count < single_value.n_elements; " "elem_count++) {\n" - "if(!single_value.value_elements[elem_count]->match(match_value[elem_count])){\n" + "if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){\n" "TTCN_Logger::log_logmatch_info(\"[%d]\", elem_count);\n" - "single_value.value_elements[elem_count]->log_match(match_value[elem_count]);\n" + "single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);\n" "TTCN_Logger::set_logmatch_buffer_len(previous_size);\n" "}\n" "}\n" @@ -4130,7 +4200,7 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();\n" "if (template_selection == SPECIFIC_VALUE)\n" " log_match_heuristics(&match_value, match_value.size_of(), this, " - "single_value.n_elements, match_function_specific, log_function);\n" + "single_value.n_elements, match_function_specific, log_function, legacy);\n" "else{\n" "if(previous_size != 0){\n" "TTCN_Logger::print_logmatch_buffer();\n" @@ -4159,7 +4229,7 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "elem_count++) {\n" "if (elem_count > 0) TTCN_Logger::log_event_str(\", \");\n" "single_value.value_elements[elem_count]->log_match" - "(match_value[elem_count]);\n" + "(match_value[elem_count], legacy);\n" "}\n" "TTCN_Logger::log_event_str(\" }\");\n" "log_match_length(single_value.n_elements);\n" @@ -4169,13 +4239,13 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "match_value.log();\n" "TTCN_Logger::log_event_str(\" with \");\n" "log();\n" - "if (match(match_value)) TTCN_Logger::log_event_str(\" matched\");\n"); + "if (match(match_value, legacy)) TTCN_Logger::log_event_str(\" matched\");\n"); if (sdef->kind == SET_OF) { src = mputstr(src, "else {\n" "TTCN_Logger::log_event_str(\" unmatched\");\n" "if (template_selection == SPECIFIC_VALUE) log_match_heuristics(" "&match_value, match_value.size_of(), this, single_value.n_elements, " - "match_function_specific, log_function);\n" + "match_function_specific, log_function, legacy);\n" "}\n"); } else { src = mputstr(src, "else TTCN_Logger::log_event_str(\" unmatched\");\n" @@ -4273,18 +4343,18 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "}\n\n", dispname); /* TTCN-3 ispresent() function */ - def = mputstr(def, "boolean is_present() const;\n"); + def = mputstr(def, "boolean is_present(boolean legacy = FALSE) const;\n"); src = mputprintf(src, - "boolean %s_template::is_present() const\n" + "boolean %s_template::is_present(boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;\n" - "return !match_omit();\n" + "return !match_omit(legacy);\n" "}\n\n", name); /* match_omit() */ - def = mputstr(def, "boolean match_omit() const;\n"); + def = mputstr(def, "boolean match_omit(boolean legacy = FALSE) const;\n"); src = mputprintf(src, - "boolean %s_template::match_omit() const\n" + "boolean %s_template::match_omit(boolean legacy) const\n" "{\n" "if (is_ifpresent) return TRUE;\n" "switch (template_selection) {\n" @@ -4293,10 +4363,12 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "return TRUE;\n" "case VALUE_LIST:\n" "case COMPLEMENTED_LIST:\n" + "if (legacy) {\n" "for (unsigned int i=0; iget_type()) {\n" " case Module_Param::MP_Omit:\n" " *this = OMIT_VALUE;\n" " break;\n" @@ -4334,40 +4410,43 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) " *this = ANY_OR_OMIT;\n" " break;\n" " case Module_Param::MP_List_Template:\n" - " case Module_Param::MP_ComplementList_Template:\n" - " set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());\n" - " for (size_t p_i=0; p_iget_type()==Module_Param::MP_List_Template ? " + "VALUE_LIST : COMPLEMENTED_LIST, mp->get_size());\n" + " for (size_t p_i=0; p_iget_size(); p_i++) {\n" + " temp.list_item(p_i).set_param(*mp->get_elem(p_i));\n" " }\n" - " break;\n" + " *this = temp;\n" + " break; }\n" " case Module_Param::MP_Indexed_List:\n" " if (template_selection!=SPECIFIC_VALUE) set_size(0);\n" - " for (size_t p_i=0; p_iget_id()->get_index())].set_param(*param.get_elem(p_i));\n" + " for (size_t p_i=0; p_iget_size(); ++p_i) {\n" + " (*this)[(int)(mp->get_elem(p_i)->get_id()->get_index())].set_param(*mp->get_elem(p_i));\n" " }\n" " break;\n", - name, sdef->kind==RECORD_OF?"record":"set", dispname, sdef->kind==RECORD_OF?"record":"set"); + name, sdef->kind==RECORD_OF?"record":"set", dispname, sdef->kind==RECORD_OF?"record":"set", name); if (sdef->kind == RECORD_OF) { src = mputstr(src, " case Module_Param::MP_Value_List: {\n" - " set_size(param.get_size());\n" + " set_size(mp->get_size());\n" " int curr_idx = 0;\n" - " for (size_t p_i=0; p_iget_type()) {\n" + " for (size_t p_i=0; p_iget_size(); ++p_i) {\n" + " switch (mp->get_elem(p_i)->get_type()) {\n" " case Module_Param::MP_NotUsed:\n" " curr_idx++;\n" " break;\n" " case Module_Param::MP_Permutation_Template: {\n" " int perm_start_idx = curr_idx;\n" - " for (size_t perm_i=0; perm_iget_size(); perm_i++) {\n" - " (*this)[curr_idx].set_param(*(param.get_elem(p_i)->get_elem(perm_i)));\n" + " for (size_t perm_i=0; perm_iget_elem(p_i)->get_size(); perm_i++) {\n" + " (*this)[curr_idx].set_param(*(mp->get_elem(p_i)->get_elem(perm_i)));\n" " curr_idx++;\n" " }\n" " int perm_end_idx = curr_idx - 1;\n" " add_permutation(perm_start_idx, perm_end_idx);\n" " } break;\n" " default:\n" - " (*this)[curr_idx].set_param(*param.get_elem(p_i));\n" + " (*this)[curr_idx].set_param(*mp->get_elem(p_i));\n" " curr_idx++;\n" " }\n" " }\n" @@ -4375,18 +4454,18 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) } else { src = mputstr(src, " case Module_Param::MP_Value_List:\n" - " set_size(param.get_size());\n" - " for (size_t p_i=0; p_iget_type()!=Module_Param::MP_NotUsed) {\n" - " (*this)[p_i].set_param(*param.get_elem(p_i));\n" + " set_size(mp->get_size());\n" + " for (size_t p_i=0; p_iget_size(); ++p_i) {\n" + " if (mp->get_elem(p_i)->get_type()!=Module_Param::MP_NotUsed) {\n" + " (*this)[p_i].set_param(*mp->get_elem(p_i));\n" " }\n" " }\n" " break;\n" " case Module_Param::MP_Superset_Template:\n" " case Module_Param::MP_Subset_Template:\n" - " set_type(param.get_type()==Module_Param::MP_Superset_Template ? SUPERSET_MATCH : SUBSET_MATCH, param.get_size());\n" - " for (size_t p_i=0; p_iget_type()==Module_Param::MP_Superset_Template ? SUPERSET_MATCH : SUBSET_MATCH, mp->get_size());\n" + " for (size_t p_i=0; p_iget_size(); p_i++) {\n" + " set_item(p_i).set_param(*mp->get_elem(p_i));\n" " }\n" " break;\n"); } @@ -4394,16 +4473,84 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) " default:\n" " param.type_error(\"%s of template\", \"%s\");\n" " }\n" - " is_ifpresent = param.get_ifpresent();\n" - " set_length_range(param);\n" + " is_ifpresent = param.get_ifpresent() || mp->get_ifpresent();\n" + " if (param.get_length_restriction() != NULL) {\n" + " set_length_range(param);\n" + " }\n" + " else {\n" + " set_length_range(*mp);\n" + " };\n" "}\n\n", sdef->kind==RECORD_OF?"record":"set", dispname); + + /* get_param() */ + def = mputstr(def, "Module_Param* get_param(Module_Param_Name& param_name) const;\n"); + src = mputprintf + (src, + "Module_Param* %s_template::get_param(Module_Param_Name& param_name) const\n" + "{\n" + " if (param_name.next_name()) {\n" + // Haven't reached the end of the module parameter name + // => the name refers to one of the elements, not to the whole record of + " char* param_field = param_name.get_current_name();\n" + " if (param_field[0] < '0' || param_field[0] > '9') {\n" + " TTCN_error(\"Unexpected record field name in module parameter reference, \"\n" + " \"expected a valid index for %s template type `%s'\");\n" + " }\n" + " int param_index = -1;\n" + " sscanf(param_field, \"%%d\", ¶m_index);\n" + " return (*this)[param_index].get_param(param_name);\n" + " }\n" + " Module_Param* mp = NULL;\n" + " switch (template_selection) {\n" + " case UNINITIALIZED_TEMPLATE:\n" + " mp = new Module_Param_Unbound();\n" + " break;\n" + " case OMIT_VALUE:\n" + " mp = new Module_Param_Omit();\n" + " break;\n" + " case ANY_VALUE:\n" + " mp = new Module_Param_Any();\n" + " break;\n" + " case ANY_OR_OMIT:\n" + " mp = new Module_Param_AnyOrNone();\n" + " break;\n" + " case SPECIFIC_VALUE: {\n" + " Vector values;\n" + " for (int i = 0; i < single_value.n_elements; ++i) {\n" + " values.push_back((*this)[i].get_param(param_name));\n" + " }\n" + " mp = new Module_Param_Value_List();\n" + " mp->add_list_with_implicit_ids(&values);\n" + " values.clear();\n" + " break; }\n" + " case VALUE_LIST:\n" + " case COMPLEMENTED_LIST: {\n" + " if (template_selection == VALUE_LIST) {\n" + " mp = new Module_Param_List_Template();\n" + " }\n" + " else {\n" + " mp = new Module_Param_ComplementList_Template();\n" + " }\n" + " for (size_t i = 0; i < value_list.n_values; ++i) {\n" + " mp->add_elem(value_list.list_value[i].get_param(param_name));\n" + " }\n" + " break; }\n" + " default:\n" + " break;\n" + " }\n" + " if (is_ifpresent) {\n" + " mp->set_ifpresent();\n" + " }\n" + " mp->set_length_restriction(get_length_range());\n" + " return mp;\n" + "}\n\n", name, sdef->kind==RECORD_OF ? "record of" : "set of", dispname); /* check template restriction */ def = mputstr(def, "void check_restriction(template_res t_res, " - "const char* t_name=NULL) const;\n"); + "const char* t_name=NULL, boolean legacy = FALSE) const;\n"); src = mputprintf(src, "void %s_template::check_restriction(" - "template_res t_res, const char* t_name) const\n" + "template_res t_res, const char* t_name, boolean legacy) const\n" "{\n" "if (template_selection==UNINITIALIZED_TEMPLATE) return;\n" "switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {\n" @@ -4416,7 +4563,7 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output) "t_res, t_name ? t_name : \"%s\");\n" "return;\n" "case TR_PRESENT:\n" - "if (!match_omit()) return;\n" + "if (!match_omit(legacy)) return;\n" "break;\n" "default:\n" "return;\n" @@ -4552,8 +4699,9 @@ void defRecordOfTemplate2(const struct_of_def *sdef, output_struct *output) type, name, type); /* match operation */ - def = mputprintf(def, "inline boolean match(const %s& match_value) const " - "{ return matchv(&match_value); }\n", name); + def = mputprintf(def, "inline boolean match(const %s& match_value, " + "boolean legacy = FALSE) const " + "{ return matchv(&match_value, legacy); }\n", name); /* valueof operation */ def = mputprintf(def, "%s valueof() const;\n", name); @@ -4611,8 +4759,9 @@ void defRecordOfTemplate2(const struct_of_def *sdef, output_struct *output) } /* logging functions */ - def = mputprintf(def, "inline void log_match(const %s& match_value) const " - "{ log_matchv(&match_value); }\n", name); + def = mputprintf(def, "inline void log_match(const %s& match_value, " + "boolean legacy = FALSE) const " + "{ log_matchv(&match_value, legacy); }\n", name); /* virtual helper functions */ def = mputprintf(def, diff --git a/compiler2/record_of.h b/compiler2/record_of.h index 45ec923..ca0c171 100644 --- a/compiler2/record_of.h +++ b/compiler2/record_of.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/stack.hh b/compiler2/stack.hh index 17c98dd..de35cfe 100644 --- a/compiler2/stack.hh +++ b/compiler2/stack.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/string.cc b/compiler2/string.cc index 1917183..fac3507 100644 --- a/compiler2/string.cc +++ b/compiler2/string.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/string.hh b/compiler2/string.hh index 886e953..cc57780 100644 --- a/compiler2/string.hh +++ b/compiler2/string.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/subtype.cc b/compiler2/subtype.cc index 60f81ae..bb448b3 100644 --- a/compiler2/subtype.cc +++ b/compiler2/subtype.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -17,6 +17,7 @@ #include "ttcn3/Templatestuff.hh" #include "ttcn3/PatternString.hh" #include "Constraint.hh" +#include "../common/JSON_Tokenizer.hh" #include @@ -3040,4 +3041,267 @@ void SubType::generate_code(output_struct &) if (checked!=STC_YES) FATAL_ERROR("SubType::generate_code()"); } +void SubType::generate_json_schema(JSON_Tokenizer& json, bool allow_special_float /* = true */) +{ + bool has_value_list = false; + size_t nof_ranges = 0; + for (size_t i = 0; i < parsed->size(); ++i) { + SubTypeParse *parse = (*parsed)[i]; + switch (parse->get_selection()) { + case SubTypeParse::STP_SINGLE: + // single values will be added later, all at once + has_value_list = true; + break; + case SubTypeParse::STP_RANGE: + ++nof_ranges; + break; + case SubTypeParse::STP_LENGTH: { + Ttcn::LengthRestriction* len_res = parse->Length(); + Value* min_val = len_res->get_is_range() ? len_res->get_lower_value() : + len_res->get_single_value(); + Value* max_val = len_res->get_is_range() ? len_res->get_upper_value() : + len_res->get_single_value(); + const char* json_min = NULL; + const char* json_max = NULL; + switch (subtype) { + case ST_RECORDOF: + case ST_SETOF: + // use minItems and maxItems for record of/set of + json_min = "minItems"; + json_max = "maxItems"; + break; + case ST_BITSTRING: + case ST_HEXSTRING: + case ST_OCTETSTRING: + case ST_CHARSTRING: + case ST_UNIVERSAL_CHARSTRING: + // use minLength and maxLength for string types + json_min = "minLength"; + json_max = "maxLength"; + break; + default: + FATAL_ERROR("SubType::generate_json_schema - length %d", subtype); + } + json.put_next_token(JSON_TOKEN_NAME, json_min); + min_val->generate_json_value(json); + if (max_val != NULL) { + json.put_next_token(JSON_TOKEN_NAME, json_max); + max_val->generate_json_value(json); + } + break; } + case SubTypeParse::STP_PATTERN: { + json.put_next_token(JSON_TOKEN_NAME, "pattern"); + char* json_pattern = parse->Pattern()->convert_to_json(); + json.put_next_token(JSON_TOKEN_STRING, json_pattern); + Free(json_pattern); + break; } + default: + break; + } + } + + bool need_anyOf = (subtype == ST_INTEGER || subtype == ST_FLOAT) && + (nof_ranges + (has_value_list ? 1 : 0) > 1); + if (need_anyOf) { + // there are multiple value range/value list restrictions, + // they need to be grouped in an 'anyOf' structure + json.put_next_token(JSON_TOKEN_NAME, "anyOf"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + json.put_next_token(JSON_TOKEN_OBJECT_START); + } + if (has_value_list) { + // generate the value list into an enum + json.put_next_token(JSON_TOKEN_NAME, "enum"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + generate_json_schema_value_list(json, allow_special_float); + json.put_next_token(JSON_TOKEN_ARRAY_END); + } + if (need_anyOf && has_value_list) { + // end of the value list and beginning of the first value range + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_OBJECT_START); + } + if (nof_ranges > 0) { + switch (subtype) { + case ST_INTEGER: + case ST_FLOAT: + generate_json_schema_number_ranges(json); + break; + case ST_CHARSTRING: + case ST_UNIVERSAL_CHARSTRING: { + // merge all string range restrictions into one JSON schema pattern + char* pattern_str = mcopystrn("\"^[", 3); + pattern_str = generate_json_schema_string_ranges(pattern_str); + pattern_str = mputstrn(pattern_str, "]*$\"", 4); + json.put_next_token(JSON_TOKEN_NAME, "pattern"); + json.put_next_token(JSON_TOKEN_STRING, pattern_str); + Free(pattern_str); + break; } + default: + FATAL_ERROR("SubType::generate_json_schema - range %d", subtype); + } + } + if (need_anyOf) { + // end of the 'anyOf' structure + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_ARRAY_END); + } +} + +void SubType::generate_json_schema_value_list(JSON_Tokenizer& json, bool allow_special_float) +{ + for (size_t i = 0; i < parsed->size(); ++i) { + SubTypeParse *parse = (*parsed)[i]; + if (parse->get_selection() == SubTypeParse::STP_SINGLE) { + if (parse->Single()->get_valuetype() == Value::V_REFD) { + Common::Assignment* ass = parse->Single()->get_reference()->get_refd_assignment(); + if (ass->get_asstype() == Common::Assignment::A_TYPE) { + // it's a reference to another subtype, insert its value list here + ass->get_Type()->get_sub_type()->generate_json_schema_value_list(json, allow_special_float); + } + } + else { + parse->Single()->generate_json_value(json, allow_special_float); + } + } + } +} + +bool SubType::generate_json_schema_number_ranges(JSON_Tokenizer& json, bool first /* = true */) +{ + for (size_t i = 0; i < parsed->size(); ++i) { + SubTypeParse *parse = (*parsed)[i]; + if (parse->get_selection() == SubTypeParse::STP_SINGLE) { + if (parse->Single()->get_valuetype() == Value::V_REFD) { + Common::Assignment* ass = parse->Single()->get_reference()->get_refd_assignment(); + if (ass->get_asstype() == Common::Assignment::A_TYPE) { + // it's a reference to another subtype, insert its value ranges here + first = ass->get_Type()->get_sub_type()->generate_json_schema_number_ranges(json, first); + } + } + } + else if (parse->get_selection() == SubTypeParse::STP_RANGE) { + if (!first) { + // the ranges are in an 'anyOf' structure, they need to be placed in an object + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_OBJECT_START); + } + else { + first = false; + } + // add the minimum and/or maximum values as numbers + if (parse->Min() != NULL) { + json.put_next_token(JSON_TOKEN_NAME, "minimum"); + parse->Min()->generate_json_value(json); + json.put_next_token(JSON_TOKEN_NAME, "exclusiveMinimum"); + json.put_next_token(parse->MinExclusive() ? JSON_TOKEN_LITERAL_TRUE : JSON_TOKEN_LITERAL_FALSE); + } + if (parse->Max() != NULL) { + json.put_next_token(JSON_TOKEN_NAME, "maximum"); + parse->Max()->generate_json_value(json); + json.put_next_token(JSON_TOKEN_NAME, "exclusiveMaximum"); + json.put_next_token(parse->MaxExclusive() ? JSON_TOKEN_LITERAL_TRUE : JSON_TOKEN_LITERAL_FALSE); + } + } + } + return first; +} + +char* SubType::generate_json_schema_string_ranges(char* pattern_str) +{ + for (size_t i = 0; i < parsed->size(); ++i) { + SubTypeParse *parse = (*parsed)[i]; + if (parse->get_selection() == SubTypeParse::STP_SINGLE) { + if (parse->Single()->get_valuetype() == Value::V_REFD) { + Common::Assignment* ass = parse->Single()->get_reference()->get_refd_assignment(); + if (ass->get_asstype() == Common::Assignment::A_TYPE) { + // it's a reference to another subtype, insert its string ranges here + pattern_str = ass->get_Type()->get_sub_type()->generate_json_schema_string_ranges(pattern_str); + } + } + } + else if (parse->get_selection() == SubTypeParse::STP_RANGE) { + // insert the string range into the pattern string + string lower_str = (subtype == ST_CHARSTRING) ? parse->Min()->get_val_str() : + ustring_to_uft8(parse->Min()->get_val_ustr()); + string upper_str = (subtype == ST_CHARSTRING) ? parse->Max()->get_val_str() : + ustring_to_uft8(parse->Max()->get_val_ustr()); + pattern_str = mputprintf(pattern_str, "%s-%s", lower_str.c_str(), upper_str.c_str()); + } + } + return pattern_str; +} + +void SubType::generate_json_schema_float(JSON_Tokenizer& json) +{ + bool has_nan = float_st->is_element(make_ttcn3float(REAL_NAN)); + bool has_pos_inf = float_st->is_element(make_ttcn3float(REAL_INFINITY)); + bool has_neg_inf = float_st->is_element(make_ttcn3float(-REAL_INFINITY)); + bool has_special = has_nan || has_pos_inf || has_neg_inf; + bool has_number = false; + for (size_t i = 0; i < parsed->size() && !has_number; ++i) { + // go through the restrictions and check if at least one number is allowed + SubTypeParse *parse = (*parsed)[i]; + switch (parse->get_selection()) { + case SubTypeParse::STP_SINGLE: { + Real r = parse->Single()->get_val_Real(); + if (r == r && r != REAL_INFINITY && r != -REAL_INFINITY) { + // a single value other than NaN, INF and -INF is a number + has_number = true; + } + break; } + case SubTypeParse::STP_RANGE: { + if (parse->Min() != NULL) { + if (parse->Min()->get_val_Real() != REAL_INFINITY) { + // a minimum value other than INF means a number is allowed + has_number = true; + } + } + if (parse->Max() != NULL) { + // a maximum value other than -INF means a number is allowed + if (parse->Max()->get_val_Real() != -REAL_INFINITY) { + has_number = true; + } + } + break; } + default: + break; + } + } + if (has_number && has_special) { + json.put_next_token(JSON_TOKEN_NAME, "anyOf"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + json.put_next_token(JSON_TOKEN_OBJECT_START); + } + if (has_number) { + json.put_next_token(JSON_TOKEN_NAME, "type"); + json.put_next_token(JSON_TOKEN_STRING, "\"number\""); + // generate the restrictions' schema elements here + // (the 2nd parameter makes sure that NaN, INF and -INF are ignored) + generate_json_schema(json, false); + } + if (has_number && has_special) { + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_OBJECT_START); + } + if (has_special) { + json.put_next_token(JSON_TOKEN_NAME, "enum"); + json.put_next_token(JSON_TOKEN_ARRAY_START); + if (has_nan) { + json.put_next_token(JSON_TOKEN_STRING, "\"not_a_number\""); + } + if (has_pos_inf) { + json.put_next_token(JSON_TOKEN_STRING, "\"infinity\""); + } + if (has_neg_inf) { + json.put_next_token(JSON_TOKEN_STRING, "\"-infinity\""); + } + json.put_next_token(JSON_TOKEN_ARRAY_END); + } + if (has_number && has_special) { + json.put_next_token(JSON_TOKEN_OBJECT_END); + json.put_next_token(JSON_TOKEN_ARRAY_END); + } +} + } // namespace Common diff --git a/compiler2/subtype.hh b/compiler2/subtype.hh index f7fde1a..c6fb5a1 100644 --- a/compiler2/subtype.hh +++ b/compiler2/subtype.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -18,6 +18,8 @@ #include "subtypestuff.hh" +class JSON_Tokenizer; + namespace Ttcn { class LengthRestriction; class Template; @@ -255,6 +257,45 @@ public: /// No-op. void generate_code(output_struct &); + + /** Returns true if there are JSON schema elements to be generated for this subtype */ + boolean has_json_schema() const { return parsed != NULL; } + + /** Generates the JSON schema segment for the type restrictions. + * + * The float special values NaN, INF and -INF are not included in the code + * generated for float value list restrictions if the 2nd parameter is false. */ + void generate_json_schema(JSON_Tokenizer& json, bool allow_special_float = true); + + /** Generates the JSON values inside the subtype's value list restriction. + * Recursive (it also inserts the values of referenced subtypes into the list). + * + * The float special values NaN, INF and -INF are not included in the code + * generated for float value lists if the 2nd parameter is false. */ + void generate_json_schema_value_list(JSON_Tokenizer& json, bool allow_special_float); + + /** Generates the JSON schema elements for integer and float range restrictions. + * If there are multiple restrictions, then they are placed in an 'anyOf' structure, + * each one in a JSON object. The function also inserts the separators between these + * objects (the 2nd parameter indicates whether the first range has been inserted). + * + * Recursive (it also inserts the value ranges of referenced subtypes). + * @return true, if the first value range has not been inserted yet */ + bool generate_json_schema_number_ranges(JSON_Tokenizer& json, bool first = true); + + /** Generates the segments of the JSON schema string pattern (regex) used for + * representing the range restrictions of charstrings and universal charstrings. + * A value range (inside a regex set expression) is generated for each TTCN-3 + * range restriction. + * + * Recursive (it also inserts the string ranges of referenced subtypes). */ + char* generate_json_schema_string_ranges(char* pattern_str); + + /** Generates the JSON schema segment of the float type this subtype belongs to + * (the schema segment for the whole type is generated, not only the type's + * restrictions). + * This replaces the schema segment generated by Type::generate_json_schema().*/ + void generate_json_schema_float(JSON_Tokenizer& json); void dump(unsigned level) const; diff --git a/compiler2/subtypestuff.cc b/compiler2/subtypestuff.cc index bc18d92..ed38eb6 100644 --- a/compiler2/subtypestuff.cc +++ b/compiler2/subtypestuff.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/subtypestuff.hh b/compiler2/subtypestuff.hh index 473213e..f6f94c5 100644 --- a/compiler2/subtypestuff.hh +++ b/compiler2/subtypestuff.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/compiler2/tcov.xsd b/compiler2/tcov.xsd index f8b0b24..99b7173 100644 --- a/compiler2/tcov.xsd +++ b/compiler2/tcov.xsd @@ -1,6 +1,6 @@ <--3rd-> - int start_pos = (i == 0) ? 0 : ucs_param->get_quad_pos(i - 1) + 1; - int end_pos = (i == nof_quads) ? ucs_param->get_string_size() : ucs_param->get_quad_pos(i); - if (end_pos > start_pos) { - TTCN_Buffer buff; - for (int j = start_pos; j < end_pos; ++j) { - buff.put_c(uchars[j].uc_cell); - } - if (is_bound()) { - // Add the string before the quad character - *this = *this + from_UTF8_buffer(buff); - } else { - *this = from_UTF8_buffer(buff); - } - } - if (i != nof_quads) { - // Add the quad character itself - if (is_bound()) { - *this = *this + uchars[end_pos]; - } else { - *this = UNIVERSAL_CHARSTRING(uchars[end_pos]); - } - } - } + case Module_Param::OT_CONCAT: + if (is_bound()) { + *this = *this + UNIVERSAL_CHARSTRING(mp->get_string_size(), (universal_char*)mp->get_string_data()); } else { - // plan B (should never happen) - if (is_bound()) { - *this = *this + UNIVERSAL_CHARSTRING(param.get_string_size(), (universal_char*)param.get_string_data()); - } else { - init_struct(param.get_string_size()); - memcpy(val_ptr->uchars_ptr, param.get_string_data(), val_ptr->n_uchars * sizeof(universal_char)); - } + *this = UNIVERSAL_CHARSTRING(mp->get_string_size(), (universal_char*)mp->get_string_data()); } - break; } + break; default: TTCN_error("Internal error: UNIVERSAL_CHARSTRING::set_param()"); } break; } + case Module_Param::MP_Expression: + if (mp->get_expr_type() == Module_Param::EXPR_CONCATENATE) { + UNIVERSAL_CHARSTRING operand1, operand2; + is_pattern = operand1.set_param_internal(*mp->get_operand1(), allow_pattern); + operand2.set_param(*mp->get_operand2()); + if (param.get_operation_type() == Module_Param::OT_CONCAT) { + *this = *this + operand1 + operand2; + } + else { + *this = operand1 + operand2; + } + } + else { + param.expr_type_error("a universal charstring"); + } + break; + case Module_Param::MP_Pattern: + if (allow_pattern) { + *this = CHARSTRING(mp->get_pattern()); + is_pattern = TRUE; + break; + } + // else fall through default: param.type_error("universal charstring value"); } + return is_pattern; +} + +void UNIVERSAL_CHARSTRING::set_param(Module_Param& param) { + set_param_internal(param, FALSE); +} + +Module_Param* UNIVERSAL_CHARSTRING::get_param(Module_Param_Name& param_name) const +{ + if (!is_bound()) { + return new Module_Param_Unbound(); + } + if (charstring) { + return cstr.get_param(param_name); + } + universal_char* val_cpy = (universal_char*)Malloc(val_ptr->n_uchars * sizeof(universal_char)); + memcpy(val_cpy, val_ptr->uchars_ptr, val_ptr->n_uchars * sizeof(universal_char)); + return new Module_Param_Universal_Charstring(val_ptr->n_uchars, val_cpy); } void UNIVERSAL_CHARSTRING::encode_text(Text_Buf& text_buf) const @@ -3800,7 +3805,7 @@ const UNIVERSAL_CHARSTRING_ELEMENT UNIVERSAL_CHARSTRING_template::operator[](con } boolean UNIVERSAL_CHARSTRING_template::match - (const UNIVERSAL_CHARSTRING& other_value) const + (const UNIVERSAL_CHARSTRING& other_value, boolean /* legacy */) const { if (!other_value.is_bound()) return FALSE; int value_length = other_value.lengthof(); @@ -4061,7 +4066,7 @@ void UNIVERSAL_CHARSTRING_template::log() const } void UNIVERSAL_CHARSTRING_template::log_match - (const UNIVERSAL_CHARSTRING& match_value) const + (const UNIVERSAL_CHARSTRING& match_value, boolean /* legacy */) const { if (TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && TTCN_Logger::get_logmatch_buffer_len() != 0) { @@ -4077,7 +4082,11 @@ void UNIVERSAL_CHARSTRING_template::log_match void UNIVERSAL_CHARSTRING_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "universal charstring template"); - switch (param.get_type()) { + Module_Param_Ptr mp = ¶m; + if (param.get_type() == Module_Param::MP_Reference) { + mp = param.get_referenced_param(); + } + switch (mp->get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; @@ -4088,21 +4097,24 @@ void UNIVERSAL_CHARSTRING_template::set_param(Module_Param& param) { *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: - case Module_Param::MP_ComplementList_Template: - set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size()); - for (size_t i=0; iget_type() == Module_Param::MP_List_Template ? + VALUE_LIST : COMPLEMENTED_LIST, mp->get_size()); + for (size_t i=0; iget_size(); i++) { + temp.list_item(i).set_param(*mp->get_elem(i)); } - break; + *this = temp; + break; } case Module_Param::MP_Charstring: - *this = CHARSTRING(param.get_string_size(), (char*)param.get_string_data()); + *this = CHARSTRING(mp->get_string_size(), (char*)mp->get_string_data()); break; case Module_Param::MP_Universal_Charstring: - *this = UNIVERSAL_CHARSTRING(param.get_string_size(), (universal_char*)param.get_string_data()); + *this = UNIVERSAL_CHARSTRING(mp->get_string_size(), (universal_char*)mp->get_string_data()); break; case Module_Param::MP_StringRange: { - universal_char lower_uchar = param.get_lower_uchar(); - universal_char upper_uchar = param.get_upper_uchar(); + universal_char lower_uchar = mp->get_lower_uchar(); + universal_char upper_uchar = mp->get_upper_uchar(); clean_up(); set_selection(VALUE_RANGE); value_range.min_is_set = TRUE; @@ -4112,15 +4124,92 @@ void UNIVERSAL_CHARSTRING_template::set_param(Module_Param& param) { } break; case Module_Param::MP_Pattern: clean_up(); - pattern_string = new CHARSTRING(param.get_pattern()); + pattern_string = new CHARSTRING(mp->get_pattern()); pattern_value.regexp_init = FALSE; set_selection(STRING_PATTERN); break; + case Module_Param::MP_Expression: + if (mp->get_expr_type() == Module_Param::EXPR_CONCATENATE) { + UNIVERSAL_CHARSTRING operand1, operand2, result; + boolean is_pattern = operand1.set_param_internal(*mp->get_operand1(), TRUE); + operand2.set_param(*mp->get_operand2()); + result = operand1 + operand2; + if (is_pattern) { + clean_up(); + if (result.charstring) { + pattern_string = new CHARSTRING(result.cstr); + } + else { + pattern_string = new CHARSTRING(result.get_stringRepr_for_pattern()); + } + pattern_value.regexp_init = FALSE; + set_selection(STRING_PATTERN); + } + else { + *this = result; + } + } + else { + param.expr_type_error("a charstring"); + } + break; default: param.type_error("universal charstring template"); } - is_ifpresent = param.get_ifpresent(); - set_length_range(param); + is_ifpresent = param.get_ifpresent() || mp->get_ifpresent(); + if (param.get_length_restriction() != NULL) { + set_length_range(param); + } + else { + set_length_range(*mp); + } +} + +Module_Param* UNIVERSAL_CHARSTRING_template::get_param(Module_Param_Name& param_name) const +{ + Module_Param* mp = NULL; + switch (template_selection) { + case UNINITIALIZED_TEMPLATE: + mp = new Module_Param_Unbound(); + break; + case OMIT_VALUE: + mp = new Module_Param_Omit(); + break; + case ANY_VALUE: + mp = new Module_Param_Any(); + break; + case ANY_OR_OMIT: + mp = new Module_Param_AnyOrNone(); + break; + case SPECIFIC_VALUE: + mp = single_value.get_param(param_name); + break; + case VALUE_LIST: + case COMPLEMENTED_LIST: { + if (template_selection == VALUE_LIST) { + mp = new Module_Param_List_Template(); + } + else { + mp = new Module_Param_ComplementList_Template(); + } + for (size_t i = 0; i < value_list.n_values; ++i) { + mp->add_elem(value_list.list_value[i].get_param(param_name)); + } + break; } + case VALUE_RANGE: + mp = new Module_Param_StringRange(value_range.min_value, value_range.max_value); + break; + case STRING_PATTERN: + mp = new Module_Param_Pattern(mcopystr(*pattern_string)); + break; + default: + break; + } + if (is_ifpresent) { + mp->set_ifpresent(); + } + mp->set_length_restriction(get_length_range()); + return mp; } void UNIVERSAL_CHARSTRING_template::encode_text(Text_Buf& text_buf) const @@ -4205,13 +4294,13 @@ void UNIVERSAL_CHARSTRING_template::decode_text(Text_Buf& text_buf) } } -boolean UNIVERSAL_CHARSTRING_template::is_present() const +boolean UNIVERSAL_CHARSTRING_template::is_present(boolean legacy /* = FALSE */) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; - return !match_omit(); + return !match_omit(legacy); } -boolean UNIVERSAL_CHARSTRING_template::match_omit() const +boolean UNIVERSAL_CHARSTRING_template::match_omit(boolean legacy /* = FALSE */) const { if (is_ifpresent) return TRUE; switch (template_selection) { @@ -4220,10 +4309,14 @@ boolean UNIVERSAL_CHARSTRING_template::match_omit() const return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: - for (unsigned int i=0; i(value)) = valueof(); } @@ -576,10 +584,10 @@ public: void copy_value(const Base_Type* other_value) { *this = *(static_cast(other_value)); } Base_Template* clone() const { return new UNIVERSAL_CHARSTRING_template(*this); } const TTCN_Typedescriptor_t* get_descriptor() const { return &UNIVERSAL_CHARSTRING_descr_; } - boolean matchv(const Base_Type* other_value) const { return match(*(static_cast(other_value))); } - void log_matchv(const Base_Type* match_value) const { log_match(*(static_cast(match_value))); } + boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast(other_value)), legacy); } + void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast(match_value)), legacy); } #else - void check_restriction(template_res t_res, const char* t_name=NULL) const; + void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; #endif const CHARSTRING& get_single_value() const; diff --git a/core/VIRAG.asn b/core/VIRAG.asn index 65f8685..1a2ab9b 100644 --- a/core/VIRAG.asn +++ b/core/VIRAG.asn @@ -1,5 +1,5 @@ --///////////////////////////////////////////////////////////////////////////// --- Copyright (c) 2000-2014 Ericsson Telecom AB +-- Copyright (c) 2000-2015 Ericsson Telecom AB -- All rights reserved. This program and the accompanying materials -- are made available under the terms of the Eclipse Public License v1.0 -- which accompanies this distribution, and is available at diff --git a/core/Vector.hh b/core/Vector.hh index a439f91..8f5ed55 100644 --- a/core/Vector.hh +++ b/core/Vector.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -11,7 +11,23 @@ #include +#ifndef PROF_MERGE #include "Error.hh" +#else +// there's no point in including Error.hh and all the includes that come with it +// when building the profiler merge tool, just use this simple error function +#include +#include +void TTCN_error(const char *fmt, ...) +{ + va_list parameters; + va_start(parameters, fmt); + vfprintf(stderr, fmt, parameters); + va_end(parameters); + putc('\n', stderr); + fflush(stderr); +} +#endif // Not invented here template diff --git a/core/Verdicttype.cc b/core/Verdicttype.cc index e8ba460..d74aff4 100644 --- a/core/Verdicttype.cc +++ b/core/Verdicttype.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -95,12 +95,24 @@ void VERDICTTYPE::log() const void VERDICTTYPE::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "verdict value"); - if (param.get_type()!=Module_Param::MP_Verdict) param.type_error("verdict value"); - const verdicttype verdict = param.get_verdict(); + Module_Param_Ptr mp = ¶m; + if (param.get_type() == Module_Param::MP_Reference) { + mp = param.get_referenced_param(); + } + if (mp->get_type()!=Module_Param::MP_Verdict) param.type_error("verdict value"); + const verdicttype verdict = mp->get_verdict(); if (!IS_VALID(verdict)) param.error("Internal error: invalid verdict value (%d).", verdict); verdict_value = verdict; } +Module_Param* VERDICTTYPE::get_param(Module_Param_Name& /* param_name */) const +{ + if (!is_bound()) { + return new Module_Param_Unbound(); + } + return new Module_Param_Verdict(verdict_value); +} + void VERDICTTYPE::encode_text(Text_Buf& text_buf) const { if (!is_bound()) @@ -547,7 +559,8 @@ VERDICTTYPE_template& VERDICTTYPE_template::operator= return *this; } -boolean VERDICTTYPE_template::match(verdicttype other_value) const +boolean VERDICTTYPE_template::match(verdicttype other_value, + boolean /* legacy */) const { if (!IS_VALID(other_value)) TTCN_error("Matching a verdict template with " "an invalid value (%d).", other_value); @@ -571,7 +584,8 @@ boolean VERDICTTYPE_template::match(verdicttype other_value) const return FALSE; } -boolean VERDICTTYPE_template::match(const VERDICTTYPE& other_value) const +boolean VERDICTTYPE_template::match(const VERDICTTYPE& other_value, + boolean /* legacy */) const { if (!other_value.is_bound()) return FALSE; return match(other_value.verdict_value); @@ -635,7 +649,8 @@ void VERDICTTYPE_template::log() const log_ifpresent(); } -void VERDICTTYPE_template::log_match(const VERDICTTYPE& match_value) const +void VERDICTTYPE_template::log_match(const VERDICTTYPE& match_value, + boolean /* legacy */) const { if (TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && TTCN_Logger::get_logmatch_buffer_len() != 0) { @@ -651,7 +666,11 @@ void VERDICTTYPE_template::log_match(const VERDICTTYPE& match_value) const void VERDICTTYPE_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "verdict template"); - switch (param.get_type()) { + Module_Param_Ptr mp = ¶m; + if (param.get_type() == Module_Param::MP_Reference) { + mp = param.get_referenced_param(); + } + switch (mp->get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; @@ -662,19 +681,62 @@ void VERDICTTYPE_template::set_param(Module_Param& param) { *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: - case Module_Param::MP_ComplementList_Template: - set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size()); - for (size_t i=0; iget_type() == Module_Param::MP_List_Template ? + VALUE_LIST : COMPLEMENTED_LIST, mp->get_size()); + for (size_t i=0; iget_size(); i++) { + temp.list_item(i).set_param(*mp->get_elem(i)); } - break; + *this = temp; + break; } case Module_Param::MP_Verdict: - *this = param.get_verdict(); + *this = mp->get_verdict(); break; default: param.type_error("verdict template"); } - is_ifpresent = param.get_ifpresent(); + is_ifpresent = param.get_ifpresent() || mp->get_ifpresent(); +} + +Module_Param* VERDICTTYPE_template::get_param(Module_Param_Name& param_name) const +{ + Module_Param* mp = NULL; + switch (template_selection) { + case UNINITIALIZED_TEMPLATE: + mp = new Module_Param_Unbound(); + break; + case OMIT_VALUE: + mp = new Module_Param_Omit(); + break; + case ANY_VALUE: + mp = new Module_Param_Any(); + break; + case ANY_OR_OMIT: + mp = new Module_Param_AnyOrNone(); + break; + case SPECIFIC_VALUE: + mp = new Module_Param_Verdict(single_value); + break; + case VALUE_LIST: + case COMPLEMENTED_LIST: { + if (template_selection == VALUE_LIST) { + mp = new Module_Param_List_Template(); + } + else { + mp = new Module_Param_ComplementList_Template(); + } + for (size_t i = 0; i < value_list.n_values; ++i) { + mp->add_elem(value_list.list_value[i].get_param(param_name)); + } + break; } + default: + break; + } + if (is_ifpresent) { + mp->set_ifpresent(); + } + return mp; } void VERDICTTYPE_template::encode_text(Text_Buf& text_buf) const @@ -728,13 +790,13 @@ void VERDICTTYPE_template::decode_text(Text_Buf& text_buf) } } -boolean VERDICTTYPE_template::is_present() const +boolean VERDICTTYPE_template::is_present(boolean legacy /* = FALSE */) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; - return !match_omit(); + return !match_omit(legacy); } -boolean VERDICTTYPE_template::match_omit() const +boolean VERDICTTYPE_template::match_omit(boolean legacy /* = FALSE */) const { if (is_ifpresent) return TRUE; switch (template_selection) { @@ -743,10 +805,14 @@ boolean VERDICTTYPE_template::match_omit() const return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: - for (unsigned int i=0; i& other_value); VERDICTTYPE_template& operator=(const VERDICTTYPE_template& other_value); - boolean match(verdicttype other_value) const; - boolean match(const VERDICTTYPE& other_value) const; + boolean match(verdicttype other_value, boolean legacy = FALSE) const; + boolean match(const VERDICTTYPE& other_value, boolean legacy = FALSE) const; verdicttype valueof() const; void set_type(template_sel template_type, unsigned int list_length); VERDICTTYPE_template& list_item(unsigned int list_index); void log() const; - void log_match(const VERDICTTYPE& match_value) const; + void log_match(const VERDICTTYPE& match_value, boolean legacy = FALSE) const; void set_param(Module_Param& param); + Module_Param* get_param(Module_Param_Name& param_name) const; void encode_text(Text_Buf& text_buf) const; void decode_text(Text_Buf& text_buf); - boolean is_present() const; - boolean match_omit() const; + boolean is_present(boolean legacy = FALSE) const; + boolean match_omit(boolean legacy = FALSE) const; #ifdef TITAN_RUNTIME_2 void valueofv(Base_Type* value) const {*(static_cast(value)) = valueof();} void set_value(template_sel other_value) {*this = other_value;} void copy_value(const Base_Type* other_value) {*this = *(static_cast(other_value));} Base_Template* clone() const {return new VERDICTTYPE_template(*this);} const TTCN_Typedescriptor_t* get_descriptor() const {return &VERDICTTYPE_descr_;} - boolean matchv(const Base_Type* other_value) const {return match(*(static_cast(other_value)));} - void log_matchv(const Base_Type* match_value) const {log_match(*(static_cast(match_value)));} + boolean matchv(const Base_Type* other_value, boolean legacy) const {return match(*(static_cast(other_value)), legacy);} + void log_matchv(const Base_Type* match_value, boolean legacy) const {log_match(*(static_cast(match_value)), legacy);} #else - void check_restriction(template_res t_res, const char* t_name=NULL) const; + void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; #endif }; diff --git a/core/XER.cc b/core/XER.cc index 5fa5eff..03259a0 100644 --- a/core/XER.cc +++ b/core/XER.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/core/XER.hh b/core/XER.hh index 78262af..181f6af 100644 --- a/core/XER.hh +++ b/core/XER.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/core/XmlReader.cc b/core/XmlReader.cc index 4f602ae..3b0da21 100644 --- a/core/XmlReader.cc +++ b/core/XmlReader.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/core/XmlReader.hh b/core/XmlReader.hh index 5a0b8dc..c6c480f 100644 --- a/core/XmlReader.hh +++ b/core/XmlReader.hh @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/core/config_process.l b/core/config_process.l index dafbf2d..aba8584 100644 --- a/core/config_process.l +++ b/core/config_process.l @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -303,11 +303,19 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% " {NUMBER} { yylval.int_val = new int_val_t(yytext); + if (YY_START == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPNumber; + } return Number; } {FLOAT} { yylval.float_val = atof(yytext); + if (YY_START == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPFloat; + } return Float; } @@ -421,6 +429,10 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% " break; default: set_ret_val_cstr(cstring); + if (caller_state == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPCstring; + } return Cstring; } @@ -474,6 +486,10 @@ TTCNSTRINGPARSING_COMPONENT "$#&&&(#TTCNSTRINGPARSING_COMPONENT$#&&^#% " BEGIN(caller_state); if (caller_state!=SC_DEFINE) { set_ret_val_cstr(cstring); + if (caller_state == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPCstring; + } return Cstring; } @@ -1000,155 +1016,155 @@ LOG_ALL { /* statistics filters */ [Nn]umber[Oo]f[Ll]ines { - yylval.uint_val = TTCN3_Profiler::STATS_NUMBER_OF_LINES; + yylval.uint_val = Profiler_Tools::STATS_NUMBER_OF_LINES; return ProfilerStatsFlag; } [Ll]ine[Dd]ata[Rr]aw { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_DATA_RAW; + yylval.uint_val = Profiler_Tools::STATS_LINE_DATA_RAW; return ProfilerStatsFlag; } [Ff]unc[Dd]ata[Rr]aw { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_DATA_RAW; + yylval.uint_val = Profiler_Tools::STATS_FUNC_DATA_RAW; return ProfilerStatsFlag; } [Ll]ine[Aa]vg[Rr]aw { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_AVG_RAW; + yylval.uint_val = Profiler_Tools::STATS_LINE_AVG_RAW; return ProfilerStatsFlag; } [Ff]unc[Aa]vg[Rr]aw { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_AVG_RAW; + yylval.uint_val = Profiler_Tools::STATS_FUNC_AVG_RAW; return ProfilerStatsFlag; } [Ll]ine[Tt]imes[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_TIMES_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_LINE_TIMES_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ff]unc[Tt]imes[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_TIMES_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_FUNC_TIMES_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ll]ine[Tt]imes[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_TIMES_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_LINE_TIMES_SORTED_TOTAL; return ProfilerStatsFlag; } [Ff]unc[Tt]imes[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_TIMES_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_FUNC_TIMES_SORTED_TOTAL; return ProfilerStatsFlag; } [Ll]ine[Cc]ount[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_COUNT_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_LINE_COUNT_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ff]unc[Cc]ount[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_COUNT_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_FUNC_COUNT_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ll]ine[Cc]ount[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_COUNT_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_LINE_COUNT_SORTED_TOTAL; return ProfilerStatsFlag; } [Ff]unc[Cc]ount[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_COUNT_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_FUNC_COUNT_SORTED_TOTAL; return ProfilerStatsFlag; } [Ll]ine[Aa]vg[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_AVG_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_LINE_AVG_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ff]unc[Aa]vg[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_AVG_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_FUNC_AVG_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ll]ine[Aa]vg[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_AVG_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_LINE_AVG_SORTED_TOTAL; return ProfilerStatsFlag; } [Ff]unc[Aa]vg[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_AVG_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_FUNC_AVG_SORTED_TOTAL; return ProfilerStatsFlag; } [Tt]op10[Ll]ine[Tt]imes { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_LINE_TIMES; + yylval.uint_val = Profiler_Tools::STATS_TOP10_LINE_TIMES; return ProfilerStatsFlag; } [Tt]op10[Ff]unc[Tt]imes { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_FUNC_TIMES; + yylval.uint_val = Profiler_Tools::STATS_TOP10_FUNC_TIMES; return ProfilerStatsFlag; } [Tt]op10[Ll]ine[Cc]ount { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_LINE_COUNT; + yylval.uint_val = Profiler_Tools::STATS_TOP10_LINE_COUNT; return ProfilerStatsFlag; } [Tt]op10[Ff]unc[Cc]ount { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_FUNC_COUNT; + yylval.uint_val = Profiler_Tools::STATS_TOP10_FUNC_COUNT; return ProfilerStatsFlag; } [Tt]op10[Ll]ine[Aa]vg { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_LINE_AVG; + yylval.uint_val = Profiler_Tools::STATS_TOP10_LINE_AVG; return ProfilerStatsFlag; } [Tt]op10[Ff]unc[Aa]vg { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_FUNC_AVG; + yylval.uint_val = Profiler_Tools::STATS_TOP10_FUNC_AVG; return ProfilerStatsFlag; } [Uu]nused[Ll]ines { - yylval.uint_val = TTCN3_Profiler::STATS_UNUSED_LINES; + yylval.uint_val = Profiler_Tools::STATS_UNUSED_LINES; return ProfilerStatsFlag; } [Uu]nused[Ff]unc { - yylval.uint_val = TTCN3_Profiler::STATS_UNUSED_FUNC; + yylval.uint_val = Profiler_Tools::STATS_UNUSED_FUNC; return ProfilerStatsFlag; } [Aa]ll[Rr]aw[Dd]ata { - yylval.uint_val = TTCN3_Profiler::STATS_ALL_RAW_DATA; + yylval.uint_val = Profiler_Tools::STATS_ALL_RAW_DATA; return ProfilerStatsFlag; } [Ll]ine[Dd]ata[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_DATA_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_LINE_DATA_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ff]unc[Dd]ata[Ss]orted[Bb]y[Mm]od { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_DATA_SORTED_BY_MOD; + yylval.uint_val = Profiler_Tools::STATS_FUNC_DATA_SORTED_BY_MOD; return ProfilerStatsFlag; } [Ll]ine[Dd]ata[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_DATA_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_LINE_DATA_SORTED_TOTAL; return ProfilerStatsFlag; } [Ff]unc[Dd]ata[Ss]orted[Tt]otal { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_DATA_SORTED_TOTAL; + yylval.uint_val = Profiler_Tools::STATS_FUNC_DATA_SORTED_TOTAL; return ProfilerStatsFlag; } [Ll]ine[Dd]ata[Ss]orted { - yylval.uint_val = TTCN3_Profiler::STATS_LINE_DATA_SORTED; + yylval.uint_val = Profiler_Tools::STATS_LINE_DATA_SORTED; return ProfilerStatsFlag; } [Ff]unc[Dd]ata[Ss]orted { - yylval.uint_val = TTCN3_Profiler::STATS_FUNC_DATA_SORTED; + yylval.uint_val = Profiler_Tools::STATS_FUNC_DATA_SORTED; return ProfilerStatsFlag; } [Aa]ll[Dd]ata[Ss]orted { - yylval.uint_val = TTCN3_Profiler::STATS_ALL_DATA_SORTED; + yylval.uint_val = Profiler_Tools::STATS_ALL_DATA_SORTED; return ProfilerStatsFlag; } [Tt]op10[Ll]ine[Dd]ata { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_LINE_DATA; + yylval.uint_val = Profiler_Tools::STATS_TOP10_LINE_DATA; return ProfilerStatsFlag; } [Tt]op10[Ff]unc[Dd]ata { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_FUNC_DATA; + yylval.uint_val = Profiler_Tools::STATS_TOP10_FUNC_DATA; return ProfilerStatsFlag; } [Tt]op10[Aa]ll[Dd]ata { - yylval.uint_val = TTCN3_Profiler::STATS_TOP10_ALL_DATA; + yylval.uint_val = Profiler_Tools::STATS_TOP10_ALL_DATA; return ProfilerStatsFlag; } [Uu]nused[Dd]ata { - yylval.uint_val = TTCN3_Profiler::STATS_UNUSED_DATA; + yylval.uint_val = Profiler_Tools::STATS_UNUSED_DATA; return ProfilerStatsFlag; } [Aa]ll { - yylval.uint_val = TTCN3_Profiler::STATS_ALL; + yylval.uint_val = Profiler_Tools::STATS_ALL; return ProfilerStatsFlag; } } @@ -1181,7 +1197,7 @@ LOG_ALL { {ASN1LOWERIDENTIFIER} { yylval.str_val = mcopystr(yytext); - for (int i = 0; i < yyleng; i++) { + for (size_t i = 0; i < yyleng; i++) { if (yylval.str_val[i] == '-') yylval.str_val[i] = '_'; } TTCN_warning("In line %d of configuration file: `%s' is not a valid TTCN-3 " @@ -1202,7 +1218,7 @@ LOG_ALL { char* comp_num_str = mcopystrn(yytext + pos + 1, len - pos - 1); yylval.int_val = new int_val_t(comp_num_str); Free(comp_num_str); - return Number; + return MPNumber; } {MACRO_BOOL} { @@ -1258,6 +1274,10 @@ LOG_ALL { "this context."); yylval.int_val = new int_val_t((RInt)0); } + if (YY_START == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPNumber; + } return Number; } @@ -1286,6 +1306,10 @@ LOG_ALL { "this context."); yylval.float_val = 0.0; } + if (YY_START == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPFloat; + } return Float; } @@ -1335,6 +1359,10 @@ LOG_ALL { "this context."); yylval.charstring_val.n_chars = 0; yylval.charstring_val.chars_ptr = memptystr(); + if (YY_START == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPCstring; + } return Cstring; } @@ -1351,6 +1379,10 @@ LOG_ALL { yylval.charstring_val.n_chars=0; yylval.charstring_val.chars_ptr=memptystr(); Free(macroname); + if (YY_START == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPCstring; + } return Cstring; } @@ -1364,6 +1396,10 @@ LOG_ALL { yylval.charstring_val.chars_ptr=(char*)Malloc(macrolen+1); memcpy(yylval.charstring_val.chars_ptr, macrovalue, macrolen+1); Free(macroname); + if (YY_START == SC_MODULE_PARAMETERS) { + // return a different token for module parameters so it doesn't conflict with references + return MPCstring; + } return Cstring; } } diff --git a/core/config_process.y b/core/config_process.y index 28dce69..37e0d81 100644 --- a/core/config_process.y +++ b/core/config_process.y @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2000-2014 Ericsson Telecom AB + * Copyright (c) 2000-2015 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -181,8 +181,8 @@ string_map_t *config_defines; %token EndTestCase %token Identifier %token ASN1LowerIdentifier "ASN.1 identifier beginning with a lowercase letter" -%token Number -%token Float +%token Number MPNumber "integer value" +%token Float MPFloat "float value" %token BooleanValue "true or false" %token VerdictValue %token Bstring "bit string value" @@ -191,7 +191,7 @@ string_map_t *config_defines; %token BstringMatch "bit string template" %token HstringMatch "hex string template" %token OstringMatch "octet string template" -%token Cstring "charstring value" +%token Cstring MPCstring "charstring value" %token DNSName "hostname" /* a single bit */ %token LoggingBit @@ -236,10 +236,8 @@ string_map_t *config_defines; %type ObjIdValue ObjIdComponentList %type ObjIdComponent NumberForm NameAndNumberForm -%type UniversalCharstringValue - seqUniversalCharstringFragment UniversalCharstringFragment +%type UniversalCharstringValue UniversalCharstringFragment %type Quadruple -%type EnumeratedValue %type LoggerPluginId %type LoggerPlugin LoggerPluginList @@ -270,9 +268,10 @@ string_map_t *config_defines; %type FieldName %type ParameterValue SimpleParameterValue ParameterValueOrNotUsedSymbol FieldValue ArrayItem IndexItem IndexItemList FieldValueList ArrayItemList CompoundValue IntegerRange FloatRange StringRange + ParameterExpression ParameterReference %type TemplateItemList %type LengthMatch -%type PatternChunk PatternChunkList +%type PatternChunk %type IndexItemIndex LengthBound %type ProfilerStatsFlags @@ -280,7 +279,6 @@ string_map_t *config_defines; ArrayRef ASN1LowerIdentifier Command -EnumeratedValue FieldName Identifier LogFileName @@ -289,7 +287,6 @@ TestportName TestportParameterName TestportParameterValue PatternChunk -PatternChunkList BstringMatch HstringMatch OstringMatch @@ -312,9 +309,9 @@ OctetstringValue %destructor { Free($$.chars_ptr); } Cstring +MPCstring -%destructor { Free($$.uchars_ptr); Free($$.quad_positions); } -seqUniversalCharstringFragment +%destructor { Free($$.uchars_ptr); } UniversalCharstringFragment UniversalCharstringValue @@ -328,6 +325,7 @@ ExecuteItem IntegerValue NameAndNumberForm Number +MPNumber NumberForm ObjIdComponent ParameterValue @@ -343,6 +341,8 @@ IndexItem IntegerRange FloatRange StringRange +ParameterExpression +ParameterReference %destructor { delete $$; } LengthMatch @@ -354,18 +354,18 @@ TemplateItemList ParameterName ParameterNameSegment +%left '&' /* to avoid shift/reduce conflicts */ %left '+' '-' %left '*' '/' %left UnarySign -%expect 2 +%expect 1 /* -2 conflicts in two distinct states. -When seeing a '*' token after an integer or float value in section -[MODULE_PARAMETERS] parser cannot decide whether the token is a multiplication -operator (shift) or it refers to all modules in the next module parameter -(reduce). +1 conflict: +When seeing a '*' token after a module parameter expression the parser cannot +decide whether the token is a multiplication operator (shift) or it refers to +all modules in the next module parameter (reduce). */ %% @@ -433,11 +433,10 @@ ParameterNameSegment: $$ = $1; $$->push_back($3); } -| ParameterNameSegment '[' Number ']' +| ParameterNameSegment IndexItemIndex { $$ = $1; - $$->push_back($3->as_string()); - delete $3; + $$->push_back(mprintf("%d", $2)); } | Identifier { @@ -447,21 +446,21 @@ ParameterNameSegment: ; ParameterValue: - SimpleParameterValue + ParameterExpression { $$ = $1; } -| SimpleParameterValue LengthMatch +| ParameterExpression LengthMatch { $$ = $1; $$->set_length_restriction($2); } -| SimpleParameterValue IfpresentKeyword +| ParameterExpression IfpresentKeyword { $$ = $1; $$->set_ifpresent(); } -| SimpleParameterValue LengthMatch IfpresentKeyword +| ParameterExpression LengthMatch IfpresentKeyword { $$ = $1; $$->set_length_restriction($2); @@ -492,27 +491,69 @@ LengthMatch: ; LengthBound: - IntegerValue + ParameterExpression { - if (!$1->is_native()) { + $1->set_id(new Module_Param_CustomName(mcopystr("length bound"))); + INTEGER tmp; + tmp.set_param(*$1); + if (!tmp.get_val().is_native()) { config_process_error("bignum length restriction bound."); $$ = 0; - } else if ($1->is_negative()) { + } else if (tmp.get_val().is_negative()) { config_process_error("negative length restriction bound."); $$ = 0; } else { - $$ = $1->get_val(); + $$ = tmp; } delete $1; } ; +// one global rule for expressions in module parameters +// the expression's result will be calculated by set_param() +ParameterExpression: + SimpleParameterValue { $$ = $1; } +| ParameterReference { $$ = $1; } +| '(' ParameterExpression ')' { $$ = $2; } +| '+' ParameterExpression %prec UnarySign { $$ = $2; } +| '-' ParameterExpression %prec UnarySign { $$ = new Module_Param_Expression($2); } +| ParameterExpression '+' ParameterExpression + { + $$ = new Module_Param_Expression(Module_Param::EXPR_ADD, $1, $3); + } +| ParameterExpression '-' ParameterExpression + { + $$ = new Module_Param_Expression(Module_Param::EXPR_SUBTRACT, $1, $3); + } +| ParameterExpression '*' ParameterExpression + { + $$ = new Module_Param_Expression(Module_Param::EXPR_MULTIPLY, $1, $3); + } +| ParameterExpression '/' ParameterExpression + { + $$ = new Module_Param_Expression(Module_Param::EXPR_DIVIDE, $1, $3); + } +| ParameterExpression '&' ParameterExpression + { + $$ = new Module_Param_Expression(Module_Param::EXPR_CONCATENATE, $1, $3); + } +; + +ParameterReference: + // enumerated values are also treated as references by the parser, + // these will be sorted out later during set_param() + ParameterNameSegment + { + $$ = new Module_Param_Reference(new Module_Param_Name(*$1)); + } +; + SimpleParameterValue: - IntegerValue + MPNumber { $$ = new Module_Param_Integer($1); } -| FloatValue +| MPFloat { $$ = new Module_Param_Float($1); } @@ -540,17 +581,13 @@ SimpleParameterValue: { $$ = new Module_Param_Octetstring($1.n_octets, $1.octets_ptr); } -| Cstring +| MPCstring { $$ = new Module_Param_Charstring($1.n_chars, $1.chars_ptr); } | UniversalCharstringValue { - $$ = new Module_Param_Universal_Charstring($1.n_uchars, $1.uchars_ptr, $1.n_quads, $1.quad_positions); - } -| EnumeratedValue - { - $$ = new Module_Param_Enumerated($1); + $$ = new Module_Param_Universal_Charstring($1.n_uchars, $1.uchars_ptr); } | OmitKeyword { @@ -592,7 +629,7 @@ SimpleParameterValue: { $$ = $1; } -| PatternKeyword PatternChunkList +| PatternKeyword PatternChunk { $$ = new Module_Param_Pattern($2); } @@ -665,21 +702,8 @@ SimpleParameterValue: } ; -PatternChunkList: - PatternChunk - { - $$ = $1; - } -| PatternChunkList '&' PatternChunk - { - $$ = $1; - $$ = mputstr($$, $3); - Free($3); - } -; - PatternChunk: - Cstring + MPCstring { $$ = mcopystr($1.chars_ptr); Free($1.chars_ptr); @@ -691,30 +715,30 @@ PatternChunk: ; IntegerRange: - '(' '-' InfinityKeyword DotDot IntegerValue ')' + '(' '-' InfinityKeyword DotDot MPNumber ')' { $$ = new Module_Param_IntRange(NULL, $5); } -| '(' IntegerValue DotDot IntegerValue ')' +| '(' MPNumber DotDot MPNumber ')' { $$ = new Module_Param_IntRange($2, $4); } -| '(' IntegerValue DotDot InfinityKeyword ')' +| '(' MPNumber DotDot InfinityKeyword ')' { $$ = new Module_Param_IntRange($2, NULL); } ; FloatRange: - '(' '-' InfinityKeyword DotDot FloatValue ')' + '(' '-' InfinityKeyword DotDot MPFloat ')' { $$ = new Module_Param_FloatRange(0.0, false, $5, true); } -| '(' FloatValue DotDot FloatValue ')' +| '(' MPFloat DotDot MPFloat ')' { $$ = new Module_Param_FloatRange($2, true, $4, true); } -| '(' FloatValue DotDot InfinityKeyword ')' +| '(' MPFloat DotDot InfinityKeyword ')' { $$ = new Module_Param_FloatRange($2, true, 0.0, false); } @@ -739,12 +763,11 @@ StringRange: } Free($2.uchars_ptr); Free($4.uchars_ptr); - Free($2.quad_positions); - Free($4.quad_positions); $$ = new Module_Param_StringRange(lower, upper); } ; +// integers outside of the [MODULE_PARAMETERS] section IntegerValue: Number { $$ = $1; } | '(' IntegerValue ')' { $$ = $2; } @@ -801,6 +824,7 @@ IntegerValue: } ; +// floats outside of the [MODULE_PARAMETERS] section FloatValue: Float { $$ = $1; } | '(' FloatValue ')' { $$ = $2; } @@ -846,11 +870,11 @@ ObjIdComponent: ; NumberForm: - Number { $$ = $1; } + MPNumber { $$ = $1; } ; NameAndNumberForm: - Identifier '(' Number ')' + Identifier '(' MPNumber ')' { Free($1); $$ = $3; @@ -858,149 +882,28 @@ NameAndNumberForm: ; BitstringValue: - Bstring -{ - $$ = $1; -} - | BitstringValue ConcatOp Bstring -{ - $$.n_bits = $1.n_bits + $3.n_bits; - int n_bytes_1 = ($1.n_bits+7)/8; - int n_bytes_3 = ($3.n_bits+7)/8; - int n_bytes = ($$.n_bits+7)/8; - $$.bits_ptr = (unsigned char *)Realloc($1.bits_ptr, n_bytes); - int n_rem_1 = $1.n_bits % 8; // remainder bits - if (n_rem_1!=0) { - for (int i=n_bytes_1; i> (8-n_rem_1); - } - if (n_bytes_1+n_bytes_3>n_bytes) - $$.bits_ptr[n_bytes-1] |= $3.bits_ptr[n_bytes_3-1] << n_rem_1; - } else { - memcpy($$.bits_ptr + n_bytes_1, $3.bits_ptr, n_bytes_3); - } - Free($3.bits_ptr); -} + Bstring { $$ = $1; } ; HexstringValue: - Hstring -{ - $$ = $1; -} - | HexstringValue ConcatOp Hstring -{ - $$.n_nibbles = $1.n_nibbles + $3.n_nibbles; - int n_bytes = ($$.n_nibbles + 1) / 2; - $$.nibbles_ptr = (unsigned char *)Realloc($1.nibbles_ptr, n_bytes); - int n_bytes_1 = ($1.n_nibbles + 1) / 2; - int n_bytes_3 = ($3.n_nibbles + 1) / 2; - if ($1.n_nibbles % 2) { - for (int i=n_bytes_1; i> 4; - } - if ($3.n_nibbles % 2) - $$.nibbles_ptr[n_bytes - 1] |= $3.nibbles_ptr[n_bytes_3 - 1] << 4; - } else { - memcpy($$.nibbles_ptr + n_bytes_1, $3.nibbles_ptr, n_bytes_3); - } - Free($3.nibbles_ptr); -} + Hstring { $$ = $1; } ; OctetstringValue: - Ostring -{ - $$ = $1; -} - | OctetstringValue ConcatOp Ostring -{ - $$.n_octets = $1.n_octets + $3.n_octets; - $$.octets_ptr = (unsigned char *)Realloc($1.octets_ptr, $$.n_octets); - memcpy($$.octets_ptr + $1.n_octets, $3.octets_ptr, $3.n_octets); - Free($3.octets_ptr); -} + Ostring { $$ = $1; } ; UniversalCharstringValue: - Cstring seqUniversalCharstringFragment -{ - $$.n_uchars = $1.n_chars + $2.n_uchars; - $$.uchars_ptr = (universal_char*) - Malloc($$.n_uchars * sizeof(universal_char)); - for (int i = 0; i < $1.n_chars; i++) { - $$.uchars_ptr[i].uc_group = 0; - $$.uchars_ptr[i].uc_plane = 0; - $$.uchars_ptr[i].uc_row = 0; - $$.uchars_ptr[i].uc_cell = $1.chars_ptr[i]; - } - memcpy($$.uchars_ptr + $1.n_chars, $2.uchars_ptr, - $2.n_uchars * sizeof(universal_char)); - $$.n_quads = $2.n_quads; - $$.quad_positions = (int*)Malloc($$.n_quads * sizeof(int)); - for (int i = 0; i < $$.n_quads; i++) { - $$.quad_positions[i] = $2.quad_positions[i] + $1.n_chars; - } - Free($1.chars_ptr); - Free($2.uchars_ptr); - Free($2.quad_positions); -} - | Quadruple + Quadruple { $$.n_uchars = 1; $$.uchars_ptr = (universal_char*)Malloc(sizeof(universal_char)); $$.uchars_ptr[0] = $1; - $$.n_quads = 1; - $$.quad_positions = (int*)Malloc(sizeof(int)); - $$.quad_positions[0] = 0; -} - | Quadruple seqUniversalCharstringFragment -{ - $$.n_uchars = $2.n_uchars + 1; - $$.uchars_ptr = (universal_char*) - Malloc($$.n_uchars * sizeof(universal_char)); - $$.uchars_ptr[0] = $1; - memcpy($$.uchars_ptr + 1, $2.uchars_ptr, - $2.n_uchars * sizeof(universal_char)); - $$.n_quads = $2.n_quads + 1; - $$.quad_positions = (int*)Malloc($$.n_quads * sizeof(int)); - $$.quad_positions[0] = 0; - for (int i = 0; i < $2.n_quads; i++) { - $$.quad_positions[i + 1] = $2.quad_positions[i] + 1; - } - Free($2.uchars_ptr); - Free($2.quad_positions); -} -; - -seqUniversalCharstringFragment: - ConcatOp UniversalCharstringFragment -{ - $$ = $2; -} - | seqUniversalCharstringFragment ConcatOp UniversalCharstringFragment -{ - $$.n_uchars = $1.n_uchars + $3.n_uchars; - $$.uchars_ptr = (universal_char*) - Realloc($1.uchars_ptr, $$.n_uchars * sizeof(universal_char)); - memcpy($$.uchars_ptr + $1.n_uchars, $3.uchars_ptr, - $3.n_uchars * sizeof(universal_char)); - $$.n_quads = $1.n_quads + $3.n_quads; - $$.quad_positions = (int*)Realloc($1.quad_positions, $$.n_quads * sizeof(int)); - for (int i = 0; i < $3.n_quads; i++) { - $$.quad_positions[$1.n_quads + i] = $3.quad_positions[i] + $1.n_uchars; - } - Free($3.uchars_ptr); - Free($3.quad_positions); } ; UniversalCharstringFragment: - Cstring + MPCstring { $$.n_uchars = $1.n_chars; $$.uchars_ptr = (universal_char*) @@ -1011,8 +914,6 @@ UniversalCharstringFragment: $$.uchars_ptr[i].uc_row = 0; $$.uchars_ptr[i].uc_cell = $1.chars_ptr[i]; } - $$.n_quads = 0; - $$.quad_positions = 0; Free($1.chars_ptr); } | Quadruple @@ -1020,51 +921,57 @@ UniversalCharstringFragment: $$.n_uchars = 1; $$.uchars_ptr = (universal_char*)Malloc(sizeof(universal_char)); $$.uchars_ptr[0] = $1; - $$.n_quads = 1; - $$.quad_positions = (int*)Malloc(sizeof(int)); - $$.quad_positions[0] = 0; } ; Quadruple: - CharKeyword '(' IntegerValue ',' IntegerValue ',' IntegerValue ',' - IntegerValue ')' -{ - if (*$3 < 0 || *$3 > 127) { - char *s = $3->as_string(); + CharKeyword '(' ParameterExpression ',' ParameterExpression ',' + ParameterExpression ',' ParameterExpression ')' +{ + $3->set_id(new Module_Param_CustomName(mcopystr("quadruple group"))); + $5->set_id(new Module_Param_CustomName(mcopystr("quadruple plane"))); + $7->set_id(new Module_Param_CustomName(mcopystr("quadruple row"))); + $9->set_id(new Module_Param_CustomName(mcopystr("quadruple cell"))); + INTEGER g, p, r, c; + g.set_param(*$3); + p.set_param(*$5); + r.set_param(*$7); + c.set_param(*$9); + if (g < 0 || g > 127) { + char *s = g.get_val().as_string(); config_process_error_f("The first number of quadruple (group) must be " "within the range 0 .. 127 instead of %s.", s); Free(s); - $$.uc_group = *$3 < 0 ? 0 : 127; + $$.uc_group = g < 0 ? 0 : 127; } else { - $$.uc_group = $3->get_val(); + $$.uc_group = g; } - if (*$5 < 0 || *$5 > 255) { - char *s = $5->as_string(); + if (p < 0 || p > 255) { + char *s = p.get_val().as_string(); config_process_error_f("The second number of quadruple (plane) must be " "within the range 0 .. 255 instead of %s.", s); Free(s); - $$.uc_plane = *$5 < 0 ? 0 : 255; + $$.uc_plane = p < 0 ? 0 : 255; } else { - $$.uc_plane = $5->get_val(); + $$.uc_plane = p; } - if (*$7 < 0 || *$7 > 255) { - char *s = $7->as_string(); + if (r < 0 || r > 255) { + char *s = r.get_val().as_string(); config_process_error_f("The third number of quadruple (row) must be " "within the range 0 .. 255 instead of %s.", s); Free(s); - $$.uc_row = *$7 < 0 ? 0 : 255; + $$.uc_row = r < 0 ? 0 : 255; } else { - $$.uc_row = $7->get_val(); + $$.uc_row = r; } - if (*$9 < 0 || *$9 > 255) { - char *s = $9->as_string(); + if (c < 0 || c > 255) { + char *s = c.get_val().as_string(); config_process_error_f("The fourth number of quadruple (cell) must be " "within the range 0 .. 255 instead of %s.", s); Free(s); - $$.uc_cell = *$9 < 0 ? 0 : 255; + $$.uc_cell = c < 0 ? 0 : 255; } else { - $$.uc_cell = $9->get_val(); + $$.uc_cell = c; } delete $3; delete $5; @@ -1073,28 +980,20 @@ Quadruple: } ; -ConcatOp: - '&' -; - +// character strings outside of the [MODULE_PARAMETERS] section StringValue: Cstring { $$ = mcopystr($1.chars_ptr); Free($1.chars_ptr); } - | StringValue ConcatOp Cstring + | StringValue '&' Cstring { $$ = mputstr($1, $3.chars_ptr); Free($3.chars_ptr); } ; -EnumeratedValue: - Identifier { $$ = $1; } - | ASN1LowerIdentifier { $$ = $1; } -; - CompoundValue: '{' '}' { @@ -1112,7 +1011,7 @@ CompoundValue: { $$ = $2; } -| '(' ParameterValue ',' TemplateItemList ')' /* at least 2 elements to avoid shift/reduce conflicts with IntegerValue and FloatValue rules */ +| '(' ParameterValue ',' TemplateItemList ')' /* at least 2 elements to avoid shift/reduce conflicts with the ParameterExpression rule */ { $$ = new Module_Param_List_Template(); $2->set_id(new Module_Param_Index($$->get_size(),false)); @@ -1246,16 +1145,19 @@ IndexItem: ; IndexItemIndex: - '[' IntegerValue ']' + '[' ParameterExpression ']' { - if (!$2->is_native()) { - config_process_error("bignum index."); // todo - } - if ($2->is_negative()) { - config_process_error("negative index."); // todo - } - $$ = $2->get_val(); - delete $2; + $2->set_id(new Module_Param_CustomName(mcopystr("array index"))); + INTEGER tmp; + tmp.set_param(*$2); + if (!tmp.get_val().is_native()) { + config_process_error("bignum index."); // todo + } + if (tmp.get_val().is_negative()) { + config_process_error("negative index."); // todo + } + $$ = tmp; + delete $2; } ; diff --git a/core/gccversion.c b/core/gccversion.c index ee87f57..18cdfd9 100644 --- a/core/gccversion.c +++ b/core/gccversion.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/core/license_gen.c b/core/license_gen.c index c945a6c..2c0a20d 100644 --- a/core/license_gen.c +++ b/core/license_gen.c @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/core/simplify.pl b/core/simplify.pl index 612f12c..e56384e 100644 --- a/core/simplify.pl +++ b/core/simplify.pl @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/core/ttcn3_profmerge.1 b/core/ttcn3_profmerge.1 new file mode 100644 index 0000000..f91b841 --- /dev/null +++ b/core/ttcn3_profmerge.1 @@ -0,0 +1,98 @@ +.TH ttcn3_profmerge 1 "August 2015" "Ericsson Telecom AB" "TTCN-3 Tools" +.SH NAME +ttcn3_profmerge \- TTCN-3 profiler and code coverage merge tool +.SH SYNOPSIS +.B ttcn3_profmerge +.RB "[ " \-pc +.RB "] [ " \-o +.I "file" +.RB "] [ " \-s +.IR "file" " ]" +.RB "[ " \-f +.IR "filter" " ]" +.IR db_file1 " [" +.IR db_file2 " ... ]" +.br +or +.br +.B ttcn3_profmerge +.B \-v +.SH DESCRIPTION +This manual page is a quick reference for the TTCN-3 profmerge utility of +the TTCN-3 Test Executor. The +.B ttcn3_profmerge +utility, which can be found in +.I $TTCN3_DIR/bin, +merges all input files (profiler databases) given in the command argument into a +single output file. It can also generate profiler statistics from the merged +database. +.br +Since there are two possible outputs, neither of them are written to the standard output. +.br +It is useful for test suites that are run on multiple Host Controllers (in parallel mode). +.SH OPTIONS +Available command line switches are: +.TP 10 +.B \-p +Discards profiler data from the merged database. All execution times will be set to zero in +the output database file, and statistics related to execution times will not be generated (both +profiler and code coverage data cannot be discarded, since there would be no data left). +.TP +.B \-c +Discards code coverage data from the merged database. All execution counts will be set to zero in +the output database file, and statistics related to execution counts will not be generated (both +profiler and code coverage data cannot be discarded, since there would be no data left). +.TP +.BI \-o " file" +Prints the output (merged) database to the specified +.IR file \. +At least one output file (this or the statistics file) must be set. +.TP +.BI \-s " file" +Prints statistics for the merged database into the specified +.IR file \. +At least one output file (this or the output database file) must be set. +.TP +.BI \-f " filter" +Specifies which statistics entries are generated. The +.I filter +is a hexadecimal number, the last 25 bits each correspond to the 25 entries +in the statistics file (the least significant bit corresponds to the first entry, +and so on). The filter is ignored if the statistics file is not set. +.TP +.B \-v +Prints +.I version +and license key information and exits. +.SH ENVIRONMENT VARIABLES +.TP +.SM +TTCN3_DIR +The installation directory where the uncompressed binary package of the +TTCN-3 Test Executor can be found. +.TP +.SM +TTCN3_LICENSE_FILE +Points to the +.I file +.RB ( NB: +.I not +the directory) that contains the personalized license key for the +current user or host. +.SH BUGS +None known at this time +.LP +.SH SEE ALSO +The +.B Programmer's Technical Reference for the TTCN-3 +.B Test Executor. +.SH AUTHOR +This manpage is written by Botond Baranyi, Ericsson Telecom AB +.br +Copyright (c) 2000-2015 Ericsson Telecom AB +.br +All rights reserved. This program and the accompanying materials +are made available under the terms of the Eclipse Public License v1.0 +which accompanies this distribution, and is available at +.br +http://www.eclipse.org/legal/epl-v10.html diff --git a/core2/Basetype2.cc b/core2/Basetype2.cc index 189fa74..41a165d 100644 --- a/core2/Basetype2.cc +++ b/core2/Basetype2.cc @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at @@ -255,7 +255,8 @@ Record_Of_Type::Record_Of_Type(null_type /*other_value*/) } Record_Of_Type::Record_Of_Type(const Record_Of_Type& other_value) -: Base_Type(other_value), val_ptr(NULL), err_descr(other_value.err_descr), refd_ind_ptr(NULL) +: Base_Type(other_value), RefdIndexInterface(other_value) +, val_ptr(NULL), err_descr(other_value.err_descr), refd_ind_ptr(NULL) { if (!other_value.is_bound()) TTCN_error("Copying an unbound record of/set of value."); @@ -2289,25 +2290,31 @@ void Record_Of_Type::set_param(Module_Param& param) { } param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, is_set()?"set of value":"record of value"); + + Module_Param_Ptr mp = ¶m; + if (param.get_type() == Module_Param::MP_Reference) { + mp = param.get_referenced_param(); + } + switch (param.get_operation_type()) { case Module_Param::OT_ASSIGN: - if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) { + if (mp->get_type()==Module_Param::MP_Value_List && mp->get_size()==0) { set_val(NULL_VALUE); return; } - switch (param.get_type()) { + switch (mp->get_type()) { case Module_Param::MP_Value_List: - set_size(param.get_size()); - for (size_t i=0; iget_size()); + for (size_t i=0; iget_size(); ++i) { + Module_Param* const curr = mp->get_elem(i); if (curr->get_type()!=Module_Param::MP_NotUsed) { get_at(i)->set_param(*curr); } } break; case Module_Param::MP_Indexed_List: - for (size_t i=0; iget_size(); ++i) { + Module_Param* const current = mp->get_elem(i); get_at(current->get_id()->get_index())->set_param(*current); } break; @@ -2316,12 +2323,12 @@ void Record_Of_Type::set_param(Module_Param& param) { } break; case Module_Param::OT_CONCAT: - switch (param.get_type()) { + switch (mp->get_type()) { case Module_Param::MP_Value_List: { if (!is_bound()) set_val(NULL_VALUE); int start_idx = lengthof(); - for (size_t i=0; iget_size(); ++i) { + Module_Param* const curr = mp->get_elem(i); if ((curr->get_type()!=Module_Param::MP_NotUsed)) { get_at(start_idx+(int)i)->set_param(*curr); } @@ -2339,6 +2346,34 @@ void Record_Of_Type::set_param(Module_Param& param) { } } +Module_Param* Record_Of_Type::get_param(Module_Param_Name& param_name) const +{ + if (!is_bound()) { + return new Module_Param_Unbound(); + } + if (param_name.next_name()) { + // Haven't reached the end of the module parameter name + // => the name refers to one of the elements, not to the whole record of + char* param_field = param_name.get_current_name(); + if (param_field[0] < '0' || param_field[0] > '9') { + TTCN_error("Unexpected record field name in module parameter reference, " + "expected a valid index for %s type `%s'", + is_set() ? "set of" : "record of", get_descriptor()->name); + } + int param_index = -1; + sscanf(param_field, "%d", ¶m_index); + return get_at(param_index)->get_param(param_name); + } + Vector values; + for (int i = 0; i < val_ptr->n_elements; ++i) { + values.push_back(val_ptr->value_elements[i]->get_param(param_name)); + } + Module_Param_Value_List* mp = new Module_Param_Value_List(); + mp->add_list_with_implicit_ids(&values); + values.clear(); + return mp; +} + void Record_Of_Type::set_implicit_omit() { for (int i = 0; i < get_nof_elements(); ++i) { @@ -2474,21 +2509,27 @@ void Record_Type::set_param(Module_Param& param) { } param.basic_check(Module_Param::BC_VALUE, is_set()?"set value":"record value"); - switch (param.get_type()) { + + Module_Param_Ptr mp = ¶m; + if (param.get_type() == Module_Param::MP_Reference) { + mp = param.get_referenced_param(); + } + + switch (mp->get_type()) { case Module_Param::MP_Value_List: - if (get_count()<(int)param.get_size()) { - param.error("%s value of type %s has %d fields but list value has %d fields", is_set()?"Set":"Record", get_descriptor()->name, get_count(), (int)param.get_size()); + if (get_count()<(int)mp->get_size()) { + param.error("%s value of type %s has %d fields but list value has %d fields", is_set()?"Set":"Record", get_descriptor()->name, get_count(), (int)mp->get_size()); } - for (size_t i=0; iget_type()!=Module_Param::MP_NotUsed) { - get_at((int)i)->set_param(*mp); + for (size_t i=0; iget_size(); i++) { + Module_Param* mp_elem = mp->get_elem(i); + if (mp_elem->get_type()!=Module_Param::MP_NotUsed) { + get_at((int)i)->set_param(*mp_elem); } } break; case Module_Param::MP_Assignment_List: - for (size_t i=0; iget_size(); ++i) { + Module_Param* const current = mp->get_elem(i); bool found = false; for (int j=0; jget_id()->get_name())) { @@ -2509,6 +2550,38 @@ void Record_Type::set_param(Module_Param& param) { } } +Module_Param* Record_Type::get_param(Module_Param_Name& param_name) const +{ + if (!is_bound()) { + return new Module_Param_Unbound(); + } + if (param_name.next_name()) { + // Haven't reached the end of the module parameter name + // => the name refers to one of the fields, not to the whole record + char* param_field = param_name.get_current_name(); + if (param_field[0] >= '0' && param_field[0] <= '9') { + TTCN_error("Unexpected array index in module parameter reference, " + "expected a valid field name for %s type `%s'", + is_set() ? "set" : "record", get_descriptor()->name); + } + int field_cnt = get_count(); + for (int field_idx = 0; field_idx < field_cnt; field_idx++) { + if (strcmp(fld_name(field_idx), param_field) == 0) { + return get_at(field_idx)->get_param(param_name); + } + } + TTCN_error("Field `%s' not found in %s type `%s'", + param_field, is_set() ? "set" : "record", get_descriptor()->name); + } + Module_Param_Assignment_List* mp = new Module_Param_Assignment_List(); + for (int i = 0; i < get_count(); ++i) { + Module_Param* mp_field = get_at(i)->get_param(param_name); + mp_field->set_id(new Module_Param_FieldName(mcopystr(fld_name(i)))); + mp->add_elem(mp_field); + } + return mp; +} + void Record_Type::set_implicit_omit() { int field_cnt = get_count(); @@ -5167,98 +5240,79 @@ int Record_Type::XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& reader, get_at(oi)->set_to_omit(); ++n_optionals; } + Record_Of_Type *use_order = static_cast(get_at(uo_index)); // Initialize the use_order field to empty. Let it grow on demand. // (setting it to the minimum acceptable size may leave unbound elements // if the XML was incomplete). use_order->set_size(0); - Record_Type *jumbled = this; // the record affected by USE_ORDER - int begin = first_nonattr; - int end = field_cnt; // "one past" - if (p_td.xer_bits & USE_NIL) { - Base_Type *last_optional = get_at(field_cnt-1); - if (!usenil_attribute) { // exer known true - last_optional->set_to_present(); - jumbled = static_cast(last_optional->get_opt_value()); - // We will operate on the members of last_optional, - // effectively bypassing last_optional->XER_decode() itself. - begin = 0; - end = jumbled->get_count(); - ec_1.set_msg("%s': ", fld_name(field_cnt-1)); - } - } - if (num_attributes > 0 - && first_nonattr != field_cnt - && i == first_nonattr - 1) { // exer known true - // If there were attributes and their processing just finished, - // the reader is positioned on the start tag of the record. - // Move ahead, unless there are no non-attribute fields. - reader.Read(); - } - // Then, the non-attributes - - // The index runs over the members affected by USE-ORDER. - // This is [first_nonattr,field_cnt) unless USE-NIL is involved, - // in which case it's [0,optional_sequence::field_cnt) - int *seen = new int[end-begin]; - int num_seen = 0; - int last_any_elem = begin - 1; - // The index of the latest embedded value can change outside of this function - // (if the field is a untagged record of), in this case the next value should - // be ignored, as it's already been handled by the record of - int last_embval_index = 0; - for (i = begin; i < end; i++) { - for (success = reader.Ok(); success == 1; success = reader.Read()) { - type = reader.NodeType(); - if (0 != emb_val && reader.NodeType()==XML_READER_TYPE_TEXT) { - UNIVERSAL_CHARSTRING emb_ustr((const char*)reader.Value()); - emb_val->embval_array->get_at(emb_val->embval_index)->set_value(&emb_ustr); + // Nothing to order if there are no child elements + if (!tag_closed) { + Record_Type *jumbled = this; // the record affected by USE_ORDER + int begin = first_nonattr; + int end = field_cnt; // "one past" + if (p_td.xer_bits & USE_NIL) { + Base_Type *last_optional = get_at(field_cnt-1); + if (!usenil_attribute) { // exer known true + last_optional->set_to_present(); + jumbled = static_cast(last_optional->get_opt_value()); + // We will operate on the members of last_optional, + // effectively bypassing last_optional->XER_decode() itself. + begin = 0; + end = jumbled->get_count(); + ec_1.set_msg("%s': ", fld_name(field_cnt-1)); } - // The non-attribute components must not be UNTAGGED - if (type == XML_READER_TYPE_ELEMENT) break; - // else if (type==XML_READER_TYPE_END_ELEMENT) panic? } - if (0 != emb_val) { - if (last_embval_index == emb_val->embval_index) { - ++emb_val->embval_index; - } - last_embval_index = emb_val->embval_index; + if (num_attributes > 0 + && first_nonattr != field_cnt + && i == first_nonattr - 1) { // exer known true + // If there were attributes and their processing just finished, + // the reader is positioned on the start tag of the record. + // Move ahead, unless there are no non-attribute fields. + reader.Read(); } - if (success != 1) break; - const char *name = (const char *)reader.LocalName(); - boolean field_name_found = false; - // Find out which member it is. - // FIXME some hashing should be implemented - for (int k = begin; k < end; k++) { - if (!(jumbled->xer_descr(k)->xer_bits & ANY_ELEMENT) && - check_name(name, *jumbled->xer_descr(k), 1)) { - ec_1.set_msg("%s': ", jumbled->fld_name(k)); - - // Check for the same field being decoded twice. - // We can't use the field's is_bound()/is_present(), - // because the field may be bound on input, e.g. for - // prototype(fast) or prototype(backtrack). - int in_dex = k - begin; - for (int o = 0; o < num_seen ;++o) { - if (in_dex == seen[o]) TTCN_EncDec_ErrorContext::error( - TTCN_EncDec::ET_INVAL_MSG, "Duplicate element"); + // Then, the non-attributes + + // The index runs over the members affected by USE-ORDER. + // This is [first_nonattr,field_cnt) unless USE-NIL is involved, + // in which case it's [0,optional_sequence::field_cnt) + int *seen = new int[end-begin]; + int num_seen = 0; + int last_any_elem = begin - 1; + // The index of the latest embedded value can change outside of this function + // (if the field is an untagged record of), in this case the next value should + // be ignored, as it's already been handled by the record of + int last_embval_index = 0; + bool early_exit = false; + for (i = begin; i < end; i++) { + for (success = reader.Ok(); success == 1; success = reader.Read()) { + type = reader.NodeType(); + if (0 != emb_val && reader.NodeType()==XML_READER_TYPE_TEXT) { + UNIVERSAL_CHARSTRING emb_ustr((const char*)reader.Value()); + emb_val->embval_array->get_at(emb_val->embval_index)->set_value(&emb_ustr); + } + // The non-attribute components must not be UNTAGGED + if (type == XML_READER_TYPE_ELEMENT) break; + if (type == XML_READER_TYPE_END_ELEMENT) { + early_exit = true; + break; } - seen[num_seen++] = in_dex; - // Set the next use-order member. - // Non-const get_at creates the object in the record-of. - static_cast(use_order->get_at(i - begin)) - ->from_int(in_dex); - Base_Type *b = jumbled->get_at(k); - b->XER_decode(*jumbled->xer_descr(k), reader, flavor, emb_val); - field_name_found = true; - break; } - } - if (!field_name_found) { - // Check the anyElement fields - for (int k = last_any_elem + 1; k < end; k++) { - if (jumbled->xer_descr(k)->xer_bits & ANY_ELEMENT) { + if (0 != emb_val) { + if (last_embval_index == emb_val->embval_index) { + ++emb_val->embval_index; + } + last_embval_index = emb_val->embval_index; + } + if (success != 1 || early_exit) break; + const char *name = (const char *)reader.LocalName(); + bool field_name_found = false; + // Find out which member it is. + // FIXME some hashing should be implemented + for (int k = begin; k < end; k++) { + if (!(jumbled->xer_descr(k)->xer_bits & ANY_ELEMENT) && + check_name(name, *jumbled->xer_descr(k), 1)) { ec_1.set_msg("%s': ", jumbled->fld_name(k)); // Check for the same field being decoded twice. @@ -5277,44 +5331,77 @@ int Record_Type::XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& reader, ->from_int(in_dex); Base_Type *b = jumbled->get_at(k); b->XER_decode(*jumbled->xer_descr(k), reader, flavor, emb_val); - last_any_elem = k; + field_name_found = true; break; } } + if (!field_name_found) { + // Check the anyElement fields + for (int k = last_any_elem + 1; k < end; k++) { + if (jumbled->xer_descr(k)->xer_bits & ANY_ELEMENT) { + ec_1.set_msg("%s': ", jumbled->fld_name(k)); + + // Check for the same field being decoded twice. + // We can't use the field's is_bound()/is_present(), + // because the field may be bound on input, e.g. for + // prototype(fast) or prototype(backtrack). + int in_dex = k - begin; + for (int o = 0; o < num_seen ;++o) { + if (in_dex == seen[o]) TTCN_EncDec_ErrorContext::error( + TTCN_EncDec::ET_INVAL_MSG, "Duplicate element"); + } + seen[num_seen++] = in_dex; + // Set the next use-order member. + // Non-const get_at creates the object in the record-of. + static_cast(use_order->get_at(i - begin)) + ->from_int(in_dex); + Base_Type *b = jumbled->get_at(k); + b->XER_decode(*jumbled->xer_descr(k), reader, flavor, emb_val); + last_any_elem = k; + field_name_found = true; + break; + } + } + } + if (!field_name_found) { + TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INVAL_MSG, + "Bad XML tag '%s' instead of a valid field", name); + break; + } + } // next field + if (0 != emb_val) { + if (reader.NodeType()==XML_READER_TYPE_TEXT) { + UNIVERSAL_CHARSTRING emb_ustr((const char*)reader.Value()); + emb_val->embval_array->get_at(emb_val->embval_index)->set_value(&emb_ustr); + } + if (last_embval_index == emb_val->embval_index) { + ++emb_val->embval_index; + } } - } // next field - if (0 != emb_val) { - if (reader.NodeType()==XML_READER_TYPE_TEXT) { - UNIVERSAL_CHARSTRING emb_ustr((const char*)reader.Value()); - emb_val->embval_array->get_at(emb_val->embval_index)->set_value(&emb_ustr); - } - if (last_embval_index == emb_val->embval_index) { - ++emb_val->embval_index; - } - } - delete [] seen; - ec_1.set_msg(" "); // no active component - ec_0.set_msg(" "); - - // Check that we collected the required number of children - int num_collected = use_order->size_of(); - if (p_td.xer_bits & USE_NIL) { - int expected = usenil_attribute ? 0 : jumbled->get_count(); - if (num_collected != expected) { - TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INCOMPL_MSG, - "Incorrect number of fields %d, expected %d", - num_collected, expected); + delete [] seen; + ec_1.set_msg(" "); // no active component + ec_0.set_msg(" "); + + // Check that we collected the required number of children + int num_collected = use_order->size_of(); + if (p_td.xer_bits & USE_NIL) { + int expected = usenil_attribute ? 0 : jumbled->get_count(); + if (num_collected != expected) { + TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INCOMPL_MSG, + "Incorrect number of fields %d, expected %d", + num_collected, expected); + } } - } - else { - if (num_collected < field_cnt - first_nonattr - n_optionals - ||num_collected > field_cnt - first_nonattr) { - TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INCOMPL_MSG, - "Wrong number of fields! size = %d, expected %d..%d", - use_order->size_of(), field_cnt - first_nonattr - n_optionals, - field_cnt - first_nonattr); + else { + if (num_collected < field_cnt - first_nonattr - n_optionals + ||num_collected > field_cnt - first_nonattr) { + TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INCOMPL_MSG, + "Wrong number of fields! size = %d, expected %d..%d", + use_order->size_of(), field_cnt - first_nonattr - n_optionals, + field_cnt - first_nonattr); + } } - } + } // not empty element } else { // not USE-ORDER, simpler code if (usenil_attribute) { @@ -5391,7 +5478,15 @@ int Record_Type::XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& reader, } // if embed-values } // if use-qname - + + // Check if every non-optional field has been set + for (i = 0; i < field_cnt; ++i) { + if (!get_at(i)->is_optional() && !get_at(i)->is_bound()) { + TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_INCOMPL_MSG, + "No data found for non-optional field '%s'", fld_name(i)); + } + } + if (own_tag) { // We had our start tag. Then our fields did their thing. // Now we expect the end tag. And it better be our end tag! @@ -5450,14 +5545,22 @@ int Record_Type::JSON_encode(const TTCN_Typedescriptor_t&, JSON_Tokenizer& p_tok int field_count = get_count(); for(int i = 0; i < field_count; ++i) { + boolean metainfo_unbound = NULL != fld_descr(i)->json && fld_descr(i)->json->metainfo_unbound; if ((NULL != fld_descr(i)->json && fld_descr(i)->json->omit_as_null) || - !get_at(i)->is_optional() || get_at(i)->is_present()) { - if (NULL != fld_descr(i)->json && NULL != fld_descr(i)->json->alias) { - enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, fld_descr(i)->json->alias); - } else { - enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, fld_name(i)); + get_at(i)->is_present() || metainfo_unbound) { + const char* field_name = (NULL != fld_descr(i)->json && NULL != fld_descr(i)->json->alias) ? + fld_descr(i)->json->alias : fld_name(i); + enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, field_name); + if (metainfo_unbound && !get_at(i)->is_bound()) { + enc_len += p_tok.put_next_token(JSON_TOKEN_LITERAL_NULL); + char* metainfo_str = mprintf("metainfo %s", field_name); + enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, metainfo_str); + Free(metainfo_str); + enc_len += p_tok.put_next_token(JSON_TOKEN_STRING, "\"unbound\""); + } + else { + enc_len += get_at(i)->JSON_encode(*fld_descr(i), p_tok); } - enc_len += get_at(i)->JSON_encode(*fld_descr(i), p_tok); } } @@ -5480,6 +5583,13 @@ int Record_Type::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& const int field_count = get_count(); + // initialize meta info states + int* metainfo = new int[field_count]; + for (int i = 0; i < field_count; ++i) { + metainfo[i] = (NULL != fld_descr(i)->json && fld_descr(i)->json->metainfo_unbound) ? + JSON_METAINFO_NONE : JSON_METAINFO_NOT_APPLICABLE; + } + while (true) { // Read name - value token pairs until we reach some other token char* name = 0; @@ -5496,6 +5606,14 @@ int Record_Type::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& break; } else { + // check for meta info + boolean is_metainfo = FALSE; + if (name_len > 9 && 0 == strncmp(name, "metainfo ", 9)) { + name += 9; + name_len -= 9; + is_metainfo = TRUE; + } + // check field name int field_idx; for (field_idx = 0; field_idx < field_count; ++field_idx) { @@ -5513,7 +5631,8 @@ int Record_Type::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& if (field_count == field_idx) { // invalid field name char* name2 = mcopystrn(name, name_len); - JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_INVALID_NAME_ERROR, name2); + JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, is_metainfo ? + JSON_DEC_METAINFO_NAME_ERROR : JSON_DEC_INVALID_NAME_ERROR, name2); // if this is set to a warning, skip the value of the field dec_len += p_tok.get_next_token(&token, NULL, NULL); if (JSON_TOKEN_NUMBER != token && JSON_TOKEN_STRING != token && @@ -5527,14 +5646,53 @@ int Record_Type::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& continue; } - int ret_val = get_at(field_idx)->JSON_decode(*fld_descr(field_idx), p_tok, p_silent); - if (0 > ret_val) { - if (JSON_ERROR_INVALID_TOKEN) { - JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, fld_name(field_idx)); + if (is_metainfo) { + if (JSON_METAINFO_NOT_APPLICABLE != metainfo[field_idx]) { + // check meta info + char* info_value = 0; + size_t info_len = 0; + dec_len += p_tok.get_next_token(&token, &info_value, &info_len); + if (JSON_TOKEN_STRING == token && 9 == info_len && + 0 == strncmp(info_value, "\"unbound\"", 9)) { + metainfo[field_idx] = JSON_METAINFO_UNBOUND; + } + else { + JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_METAINFO_VALUE_ERROR, + fld_name(field_idx)); + return JSON_ERROR_FATAL; + } + } + else { + JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_METAINFO_NOT_APPLICABLE, + fld_name(field_idx)); + return JSON_ERROR_FATAL; } - return JSON_ERROR_FATAL; } - dec_len += ret_val; + else { + buf_pos = p_tok.get_buf_pos(); + int ret_val = get_at(field_idx)->JSON_decode(*fld_descr(field_idx), p_tok, p_silent); + if (0 > ret_val) { + if (JSON_ERROR_INVALID_TOKEN == ret_val) { + // undo the last action on the buffer, check if the invalid token was a null token + p_tok.set_buf_pos(buf_pos); + p_tok.get_next_token(&token, NULL, NULL); + if (JSON_TOKEN_LITERAL_NULL == token) { + if (JSON_METAINFO_NONE == metainfo[field_idx]) { + // delay reporting an error for now, there might be meta info later + metainfo[field_idx] = JSON_METAINFO_NEEDED; + continue; + } + else if (JSON_METAINFO_UNBOUND == metainfo[field_idx]) { + // meta info already found + continue; + } + } + JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, fld_name(field_idx)); + } + return JSON_ERROR_FATAL; + } + dec_len += ret_val; + } } } @@ -5544,10 +5702,17 @@ int Record_Type::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& return JSON_ERROR_FATAL; } - // Check if every field has been set + // Check if every field has been set and handle meta info for (int field_idx = 0; field_idx < field_count; ++field_idx) { Base_Type* field = get_at(field_idx); - if (!field->is_bound()) { + if (JSON_METAINFO_UNBOUND == metainfo[field_idx]) { + field->clean_up(); + } + else if (JSON_METAINFO_NEEDED == metainfo[field_idx]) { + // no meta info was found for this field, report the delayed error + JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, fld_name(field_idx)); + } + else if (!field->is_bound()) { if (NULL != fld_descr(field_idx)->json && NULL != fld_descr(field_idx)->json->default_value) { get_at(field_idx)->JSON_decode(*fld_descr(field_idx), DUMMY_BUFFER, p_silent); } @@ -5560,6 +5725,8 @@ int Record_Type::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& } } + delete metainfo; + return dec_len; } @@ -5593,12 +5760,24 @@ void Empty_Record_Type::log() const void Empty_Record_Type::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "empty record/set value (i.e. { })"); - if (param.get_type()!=Module_Param::MP_Value_List || param.get_size()>0) { + Module_Param_Ptr mp = ¶m; + if (param.get_type() == Module_Param::MP_Reference) { + mp = param.get_referenced_param(); + } + if (mp->get_type()!=Module_Param::MP_Value_List || mp->get_size()>0) { param.type_error("empty record/set value (i.e. { })", get_descriptor()->name); } bound_flag = TRUE; } +Module_Param* Empty_Record_Type::get_param(Module_Param_Name& /* param_name */) const +{ + if (!is_bound()) { + return new Module_Param_Unbound(); + } + return new Module_Param_Value_List(); +} + void Empty_Record_Type::encode_text(Text_Buf& /*text_buf*/) const { if (!bound_flag) diff --git a/core2/Makefile b/core2/Makefile index a597ae2..2444bcd 100644 --- a/core2/Makefile +++ b/core2/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/doc/parallelarch/Makefile b/doc/parallelarch/Makefile index e7f3568..93c3b0a 100644 --- a/doc/parallelarch/Makefile +++ b/doc/parallelarch/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/doc/parallelarch/state_mach_conn_endpoint.dot b/doc/parallelarch/state_mach_conn_endpoint.dot index a5fdf60..564d406 100644 --- a/doc/parallelarch/state_mach_conn_endpoint.dot +++ b/doc/parallelarch/state_mach_conn_endpoint.dot @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/doc/parallelarch/state_mach_conn_mc.dot b/doc/parallelarch/state_mach_conn_mc.dot index 2d6dde0..68dc9de 100644 --- a/doc/parallelarch/state_mach_conn_mc.dot +++ b/doc/parallelarch/state_mach_conn_mc.dot @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/doc/parallelarch/state_mach_hc_mc.dot b/doc/parallelarch/state_mach_hc_mc.dot index 08f0e44..4d9f199 100644 --- a/doc/parallelarch/state_mach_hc_mc.dot +++ b/doc/parallelarch/state_mach_hc_mc.dot @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/doc/parallelarch/state_mach_mapping_mc.dot b/doc/parallelarch/state_mach_mapping_mc.dot index ad8e591..5c3cfb4 100644 --- a/doc/parallelarch/state_mach_mapping_mc.dot +++ b/doc/parallelarch/state_mach_mapping_mc.dot @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/doc/parallelarch/state_mach_mc.dot b/doc/parallelarch/state_mach_mc.dot index 1622650..99c06bd 100644 --- a/doc/parallelarch/state_mach_mc.dot +++ b/doc/parallelarch/state_mach_mc.dot @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/doc/parallelarch/state_mach_ptc_mc.dot b/doc/parallelarch/state_mach_ptc_mc.dot index 65585c6..0a7a21d 100644 --- a/doc/parallelarch/state_mach_ptc_mc.dot +++ b/doc/parallelarch/state_mach_ptc_mc.dot @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2000-2014 Ericsson Telecom AB +// Copyright (c) 2000-2015 Ericsson Telecom AB // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at diff --git a/etc/Makefile b/etc/Makefile index 68ea356..fffb344 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000-2014 Ericsson Telecom AB +# Copyright (c) 2000-2015 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at diff --git a/etc/TXDSample.xml b/etc/TXDSample.xml index dc866a4..1068532 100644 --- a/etc/TXDSample.xml +++ b/etc/TXDSample.xml @@ -1,6 +1,6 @@ + + + + +apply + + + + + + +
Titan
+ + + + + + + +
+


+

+
+

apply

+
+

This function is used to call a function, altstep or testcase referenced by a behavior type variable.

+
+

Related keyword:

+ +
+
+
+ + + + +
+

+ + behavior_type_variable.apply( + arguments + )

+
+
+
+
    +
  • +

    The behavior_type_variable denotes a behavior type variable that refers to a function, altstep or testcase.

    +
  • +
  • +

    The arguments denotes the argument list of the function, see function.

    +
  • +
  • +

    Details and examples can be found under behavior_type.

    +
  • +
+ + +
+ + diff --git a/help/info/bit2hex.html b/help/info/bit2hex.html index aac0d36..032ea67 100644 --- a/help/info/bit2hex.html +++ b/help/info/bit2hex.html @@ -1,5 +1,5 @@ + + + + +derefers + + + + + + +
Titan
+ + + + + + + +
+


+

+
+

derefers

+
+

This function is used to start a behavior function referred by a behavior type variable that refers to a behavior name (reference for function name, altstep name or testcase name).

+
+

Related keyword:

+ +
+
+
+ + + + +
+

+ derefers ( + reference_var + ) ( + arguments + )

+
+
+
+
    +
  • +

    The reference_var denotes a behavior type variable that refers to a function, an altstep or a testcase.

    +
  • +
  • +

    The arguments denotes the argument list of the function, see function.

    +
  • +
  • +

    Details and examples can be found under behavior_type.

    +
  • +
+ + +
+ + diff --git a/help/info/disconnect.html b/help/info/disconnect.html index 524c8ce..c009c78 100644 --- a/help/info/disconnect.html +++ b/help/info/disconnect.html @@ -1,5 +1,5 @@ + + + + +int2enum + + + + + + +
Titan
+ + + + + + + +
+


+

+
+

int2enum

+
+

This function converts an integer value into an enumerated value of a given enumerated type. +


+

Related keyword:

+ +
+
+
+ + + + +
+

+ int2enum ( in integer + inpar + ,out + Enumerated_type + outpar + ) +

+ +
+
+
+
    +
  • +

    The integer value shall be +provided as in parameter "inpar" and the result of the conversion shall be stored in an out parameter "outpar".

    +
  • +
  • +

    The type of the out parameter determines the type into which the in parameter is converted.

    +
  • +
+
+ +

Example:

+

+ + type enumerated MyFirstEnumType {
+    Monday, Tuesday, Wednesday, Thursday, Friday
+ };

+ type enumerated MySecondEnumType {
+    Saturday(-3), Sunday (0), Monday
+ };

+ //within a dynamic language element:
+ var MyFirstEnumType firstEnum := Tuesday;
+ var MySecondEnumType secondEnum := Sunday;

+ int2enum(0, firstEnum) // firstEnum == Monday
+ int2enum(1, secondEnum) // secondEnum == Monday
+
+

+ +
+ + diff --git a/help/info/int2float.html b/help/info/int2float.html index 7af596e..5d58942 100644 --- a/help/info/int2float.html +++ b/help/info/int2float.html @@ -1,16 +1,16 @@ +--> - - -int2float + + + int2float @@ -22,16 +22,15 @@ - +
-


-

+



int2float


-

This function converts an integer value into a float value. +

This function converts an integer value into a float value.


Related keyword: