Commit b504211e authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Added compiler option '-I' for enabling real-time features, which are now...


Added compiler option '-I' for enabling real-time features, which are now disabled by default (bug 539514)

Change-Id: I82dfc84f3ed6f6936927b8159e3ff476d429c097
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 8093b2fa
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
compiler \- TTCN-3 and ASN.1 to C++ translator compiler \- TTCN-3 and ASN.1 to C++ translator
.SH SYNOPSIS .SH SYNOPSIS
.B compiler .B compiler
.RB "[\| " \-abcdDeEfgijlLMnNpqrRsStuwxXyY " \|]" .RB "[\| " \-abcdDeEfgiIjlLMnNpqrRsStuwxXyY " \|]"
.RB "[\| " \-V .RB "[\| " \-V
.IR " verb_level" " \|]" .IR " verb_level" " \|]"
.RB "[\| " \-J .RB "[\| " \-J
...@@ -119,6 +119,9 @@ will contain only the ...@@ -119,6 +119,9 @@ will contain only the
the column numbers will remain hidden. This option provides backward the column numbers will remain hidden. This option provides backward
compatibility with the error message format of earlier versions. compatibility with the error message format of earlier versions.
.TP .TP
.B \-I
Enables real-time testing features.
.TP
.B \-j .B \-j
Disables JSON encoder/decoder functions. Disables JSON encoder/decoder functions.
.TP .TP
......
...@@ -99,8 +99,8 @@ boolean generate_skeleton = FALSE, force_overwrite = FALSE, ...@@ -99,8 +99,8 @@ boolean generate_skeleton = FALSE, force_overwrite = FALSE,
force_gen_seof = FALSE, omit_in_value_list = FALSE, force_gen_seof = FALSE, omit_in_value_list = FALSE,
warnings_for_bad_variants = FALSE, debugger_active = FALSE, warnings_for_bad_variants = FALSE, debugger_active = FALSE,
legacy_unbound_union_fields = FALSE, split_to_slices = FALSE, legacy_unbound_union_fields = FALSE, split_to_slices = FALSE,
legacy_untagged_union, disable_user_info, legacy_codec_handling = FALSE; legacy_untagged_union, disable_user_info, legacy_codec_handling = FALSE,
// use legacy codec handling until the implementation of the new one is finished realtime_features = FALSE;
// Default code splitting mode is set to 'no splitting'. // Default code splitting mode is set to 'no splitting'.
CodeGenHelper::split_type code_splitting_mode = CodeGenHelper::SPLIT_NONE; CodeGenHelper::split_type code_splitting_mode = CodeGenHelper::SPLIT_NONE;
...@@ -395,7 +395,7 @@ static boolean is_valid_asn1_filename(const char* file_name) ...@@ -395,7 +395,7 @@ static boolean is_valid_asn1_filename(const char* file_name)
static void usage() static void usage()
{ {
fprintf(stderr, "\n" fprintf(stderr, "\n"
"usage: %s [-abcdDeEfgijlLMnNOpqrRsStuwxXyY] [-J file] [-K file] [-z file] [-V verb_level]\n" "usage: %s [-abcdDeEfgiIjlLMnNOpqrRsStuwxXyY] [-J file] [-K file] [-z file] [-V verb_level]\n"
" [-o dir] [-U none|type|'number'] [-P modulename.top_level_pdu_name] [-Q number] ...\n" " [-o dir] [-U none|type|'number'] [-P modulename.top_level_pdu_name] [-Q number] ...\n"
" [-T] module.ttcn [-A] module.asn ...\n" " [-T] module.ttcn [-A] module.asn ...\n"
" or %s -v\n" " or %s -v\n"
...@@ -413,6 +413,7 @@ static void usage() ...@@ -413,6 +413,7 @@ static void usage()
" -f: force overwriting of output files\n" " -f: force overwriting of output files\n"
" -g: emulate GCC error/warning message format\n" " -g: emulate GCC error/warning message format\n"
" -i: use only line numbers in error/warning messages\n" " -i: use only line numbers in error/warning messages\n"
" -I: enable real-time testing features\n"
" -j: disable JSON encoder/decoder functions\n" " -j: disable JSON encoder/decoder functions\n"
" -J file: read input files from file\n" " -J file: read input files from file\n"
" -K file: enable selective code coverage\n" " -K file: enable selective code coverage\n"
...@@ -500,7 +501,7 @@ int main(int argc, char *argv[]) ...@@ -500,7 +501,7 @@ int main(int argc, char *argv[])
Sflag = false, Kflag = false, jflag = false, zflag = false, Fflag = false, Sflag = false, Kflag = false, jflag = false, zflag = false, Fflag = false,
Mflag = false, Eflag = false, nflag = false, Bflag = false, errflag = false, Mflag = false, Eflag = false, nflag = false, Bflag = false, errflag = false,
print_usage = false, ttcn2json = false, Nflag = false, Dflag = false, print_usage = false, ttcn2json = false, Nflag = false, Dflag = false,
eflag = false, Oflag = false; eflag = false, Oflag = false, Iflag = false;
CodeGenHelper cgh; CodeGenHelper cgh;
...@@ -596,7 +597,7 @@ int main(int argc, char *argv[]) ...@@ -596,7 +597,7 @@ int main(int argc, char *argv[])
if (!ttcn2json) { if (!ttcn2json) {
for ( ; ; ) { for ( ; ; ) {
int c = getopt(argc, argv, "aA:bBcC:dDeEfFgijJ:K:lLMnNo:OpP:qQ:rRsStT:uU:vV:wxXyYz:0-"); int c = getopt(argc, argv, "aA:bBcC:dDeEfFgiIjJ:K:lLMnNo:OpP:qQ:rRsStT:uU:vV:wxXyYz:0-");
if (c == -1) break; if (c == -1) break;
switch (c) { switch (c) {
case 'a': case 'a':
...@@ -670,6 +671,10 @@ int main(int argc, char *argv[]) ...@@ -670,6 +671,10 @@ int main(int argc, char *argv[])
SET_FLAG(i); SET_FLAG(i);
output_only_linenum = TRUE; output_only_linenum = TRUE;
break; break;
case 'I':
SET_FLAG(I);
realtime_features = TRUE;
break;
case 'J': case 'J':
file_list_file_name = optarg; file_list_file_name = optarg;
break; break;
...@@ -839,7 +844,7 @@ int main(int argc, char *argv[]) ...@@ -839,7 +844,7 @@ int main(int argc, char *argv[])
bflag || fflag || iflag || lflag || oflag || pflag || qflag || bflag || fflag || iflag || lflag || oflag || pflag || qflag ||
rflag || sflag || tflag || uflag || wflag || xflag || Xflag || Rflag || rflag || sflag || tflag || uflag || wflag || xflag || Xflag || Rflag ||
Uflag || yflag || Kflag || jflag || zflag || Fflag || Mflag || Eflag || Uflag || yflag || Kflag || jflag || zflag || Fflag || Mflag || Eflag ||
nflag || Bflag || Dflag || eflag || Oflag) { nflag || Bflag || Dflag || eflag || Oflag || Iflag) {
errflag = true; errflag = true;
print_usage = true; print_usage = true;
} }
......
...@@ -52,7 +52,7 @@ extern boolean generate_skeleton, force_overwrite, include_line_info, ...@@ -52,7 +52,7 @@ extern boolean generate_skeleton, force_overwrite, include_line_info,
implicit_json_encoding, json_refs_for_all_types, force_gen_seof, implicit_json_encoding, json_refs_for_all_types, force_gen_seof,
omit_in_value_list, warnings_for_bad_variants, debugger_active, omit_in_value_list, warnings_for_bad_variants, debugger_active,
legacy_unbound_union_fields, split_to_slices, legacy_untagged_union, legacy_unbound_union_fields, split_to_slices, legacy_untagged_union,
disable_user_info, legacy_codec_handling; disable_user_info, legacy_codec_handling, realtime_features;
extern const char *expected_platform; extern const char *expected_platform;
......
...@@ -272,6 +272,7 @@ struct makefile_struct { ...@@ -272,6 +272,7 @@ struct makefile_struct {
boolean disable_predef_ext_folder; boolean disable_predef_ext_folder;
boolean enable_legacy_encoding; boolean enable_legacy_encoding;
boolean disable_userinfo; boolean disable_userinfo;
boolean realtime_features;
struct string_list* solspeclibraries; /* not owned */ struct string_list* solspeclibraries; /* not owned */
struct string_list* sol8speclibraries; /* not owned */ struct string_list* sol8speclibraries; /* not owned */
struct string_list* linuxspeclibraries; /* not owned */ struct string_list* linuxspeclibraries; /* not owned */
...@@ -343,6 +344,7 @@ static void init_makefile_struct(struct makefile_struct *makefile) ...@@ -343,6 +344,7 @@ static void init_makefile_struct(struct makefile_struct *makefile)
makefile->disable_predef_ext_folder = FALSE; makefile->disable_predef_ext_folder = FALSE;
makefile->enable_legacy_encoding = FALSE; makefile->enable_legacy_encoding = FALSE;
makefile->disable_userinfo = FALSE; makefile->disable_userinfo = FALSE;
makefile->realtime_features = FALSE;
makefile->solspeclibraries = NULL; makefile->solspeclibraries = NULL;
makefile->sol8speclibraries = NULL; makefile->sol8speclibraries = NULL;
makefile->linuxspeclibraries = NULL; makefile->linuxspeclibraries = NULL;
...@@ -2250,7 +2252,7 @@ static void print_makefile(struct makefile_struct *makefile) ...@@ -2250,7 +2252,7 @@ static void print_makefile(struct makefile_struct *makefile)
"AR = ar\n" "AR = ar\n"
"ARFLAGS = \n\n" "ARFLAGS = \n\n"
"# Flags for the TTCN-3 and ASN.1 compiler:\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%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%s%s%s%s%s%s%s\n\n"
"# Execution mode: (either ttcn3 or ttcn3-parallel)\n" "# Execution mode: (either ttcn3 or ttcn3-parallel)\n"
"TTCN3_LIB = ttcn3%s%s%s\n\n" "TTCN3_LIB = ttcn3%s%s%s\n\n"
#ifdef LICENSE #ifdef LICENSE
...@@ -2295,6 +2297,7 @@ static void print_makefile(struct makefile_struct *makefile) ...@@ -2295,6 +2297,7 @@ static void print_makefile(struct makefile_struct *makefile)
(makefile->tcov_file_name ? makefile->tcov_file_name : ""), (makefile->tcov_file_name ? makefile->tcov_file_name : ""),
(makefile->profiled_file_list ? " -z $(PROFILED_FILE_LIST)" : ""), (makefile->profiled_file_list ? " -z $(PROFILED_FILE_LIST)" : ""),
(makefile->disable_userinfo ? " -D" : ""), (makefile->disable_userinfo ? " -D" : ""),
(makefile->realtime_features ? " -I" : ""),
/* end of COMPILER FLAGS */ /* end of COMPILER FLAGS */
(makefile->use_runtime_2 ? "-rt2" : ""), /* TTCN3_LIB */ (makefile->use_runtime_2 ? "-rt2" : ""), /* TTCN3_LIB */
(makefile->single_mode ? "" : "-parallel"), (makefile->single_mode ? "" : "-parallel"),
...@@ -4675,7 +4678,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[], ...@@ -4675,7 +4678,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[],
boolean linenumbersonlymsg, boolean includesourceinfo, boolean addsourcelineinfo, boolean suppresswarnings, boolean linenumbersonlymsg, boolean includesourceinfo, boolean addsourcelineinfo, boolean suppresswarnings,
boolean outparamboundness, boolean omit_in_value_list, boolean warnings_for_bad_variants, boolean activate_debugger, boolean outparamboundness, boolean omit_in_value_list, boolean warnings_for_bad_variants, boolean activate_debugger,
boolean ignore_untagged_on_top_union, boolean disable_predef_ext_folder, boolean enable_legacy_encoding, boolean disable_userinfo, boolean ignore_untagged_on_top_union, boolean disable_predef_ext_folder, boolean enable_legacy_encoding, boolean disable_userinfo,
struct string_list* solspeclibraries, struct string_list* sol8speclibraries, boolean realtime_features, struct string_list* solspeclibraries, struct string_list* sol8speclibraries,
struct string_list* linuxspeclibraries, struct string_list* freebsdspeclibraries, struct string_list* linuxspeclibraries, struct string_list* freebsdspeclibraries,
struct string_list* win32speclibraries, const char* ttcn3preprocessor, struct string_list* linkerlibraries, struct string_list* win32speclibraries, const char* ttcn3preprocessor, struct string_list* linkerlibraries,
struct string_list* additionalObjects, struct string_list* linkerlibsearchpath, char* generatorCommandOutput, struct string_list* additionalObjects, struct string_list* linkerlibsearchpath, char* generatorCommandOutput,
...@@ -4732,6 +4735,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[], ...@@ -4732,6 +4735,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[],
makefile.disable_predef_ext_folder = disable_predef_ext_folder; makefile.disable_predef_ext_folder = disable_predef_ext_folder;
makefile.enable_legacy_encoding = enable_legacy_encoding; makefile.enable_legacy_encoding = enable_legacy_encoding;
makefile.disable_userinfo = disable_userinfo; makefile.disable_userinfo = disable_userinfo;
makefile.realtime_features = realtime_features;
makefile.solspeclibraries = solspeclibraries; makefile.solspeclibraries = solspeclibraries;
makefile.sol8speclibraries = sol8speclibraries; makefile.sol8speclibraries = sol8speclibraries;
makefile.linuxspeclibraries = linuxspeclibraries; makefile.linuxspeclibraries = linuxspeclibraries;
...@@ -4895,6 +4899,7 @@ static void usage(void) ...@@ -4895,6 +4899,7 @@ static void usage(void)
" -f: force overwriting of the output Makefile\n" " -f: force overwriting of the output Makefile\n"
" -g: generate Makefile for use with GNU make\n" " -g: generate Makefile for use with GNU make\n"
" -G: enable legacy encoding rules\n" " -G: enable legacy encoding rules\n"
" -i: enable real-time testing features\n"
" -I path: Add path to the search paths when using TPD files\n" " -I path: Add path to the search paths when using TPD files\n"
" -J file: The names of files taken from file instead of command line\n" " -J file: The names of files taken from file instead of command line\n"
" -K file: enable selective code coverage\n" " -K file: enable selective code coverage\n"
...@@ -4952,7 +4957,7 @@ int main(int argc, char *argv[]) ...@@ -4952,7 +4957,7 @@ int main(int argc, char *argv[])
Sflag = FALSE, Vflag = FALSE, Dflag = FALSE, Wflag = FALSE, Sflag = FALSE, Vflag = FALSE, Dflag = FALSE, Wflag = FALSE,
djflag = FALSE, doerflag = FALSE, Zflag = FALSE, Hflag = FALSE, Mflag = FALSE, djflag = FALSE, doerflag = FALSE, Zflag = FALSE, Hflag = FALSE, Mflag = FALSE,
diflag = FALSE, zflag = FALSE, Eflag = FALSE, nflag = FALSE, diflag = FALSE, zflag = FALSE, Eflag = FALSE, nflag = FALSE,
Nflag = FALSE, Gflag = FALSE, duflag = FALSE; Nflag = FALSE, Gflag = FALSE, duflag = FALSE, iflag = FALSE;
boolean error_flag = FALSE; boolean error_flag = FALSE;
char *output_file = NULL; char *output_file = NULL;
char *ets_name = NULL; char *ets_name = NULL;
...@@ -5012,7 +5017,7 @@ int main(int argc, char *argv[]) ...@@ -5012,7 +5017,7 @@ int main(int argc, char *argv[])
} }
for ( ; ; ) { for ( ; ; ) {
int c = getopt(argc, argv, "O:ab:c" C_flag "dDe:EfFgGI:J:K:o:lLmMnNpP:rRsSt:TU:vVwWXYz:ZH"); int c = getopt(argc, argv, "O:ab:c" C_flag "dDe:EfFgGiI:J:K:o:lLmMnNpP:rRsSt:TU:vVwWXYz:ZH");
if (c == -1) break; if (c == -1) break;
switch (c) { switch (c) {
case 'O': case 'O':
...@@ -5074,6 +5079,9 @@ int main(int argc, char *argv[]) ...@@ -5074,6 +5079,9 @@ int main(int argc, char *argv[])
case 'H': case 'H':
SET_FLAG(H); SET_FLAG(H);
break; break;
case 'i':
SET_FLAG(i);
break;
case 'J': case 'J':
file_list_file_name = optarg; file_list_file_name = optarg;
break; break;
...@@ -5193,7 +5201,8 @@ int main(int argc, char *argv[]) ...@@ -5193,7 +5201,8 @@ int main(int argc, char *argv[])
if ( aflag || bflag || cflag || Cflag || dflag || eflag || fflag || Fflag || gflag if ( aflag || bflag || cflag || Cflag || dflag || eflag || fflag || Fflag || gflag
|| mflag || oflag || lflag || pflag || Pflag || rflag || Rflag || sflag || Gflag || mflag || oflag || lflag || pflag || Pflag || rflag || Rflag || sflag || Gflag
|| tflag || Tflag || Vflag || wflag || Xflag || Kflag || Dflag || Wflag || Yflag || tflag || Tflag || Vflag || wflag || Xflag || Kflag || Dflag || Wflag || Yflag
|| Zflag || Hflag || Mflag || zflag || Eflag || nflag || n_other_files > 0 || n_search_paths > 0) || Zflag || Hflag || Mflag || zflag || Eflag || nflag || iflag
|| n_other_files > 0 || n_search_paths > 0)
error_flag = TRUE; error_flag = TRUE;
} }
...@@ -5392,7 +5401,7 @@ int main(int argc, char *argv[]) ...@@ -5392,7 +5401,7 @@ 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, &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, &csmode, create_symlink_list, ttcn3_prep_includes, ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines, prep_undefines, &csmode,
&quflag, &dsflag, &cxxcompiler, &optlevel, &optflags, &dbflag, &drflag, &dtflag, &dxflag, &djflag, &doerflag, &fxflag, &doflag, &gfflag, &lnflag, &isflag, &quflag, &dsflag, &cxxcompiler, &optlevel, &optflags, &dbflag, &drflag, &dtflag, &dxflag, &djflag, &doerflag, &fxflag, &doflag, &gfflag, &lnflag, &isflag,
&asflag, &temp_wflag, &Yflag, &Mflag, &Eflag, &nflag, &Nflag, &diflag, &Gflag, &duflag, &asflag, &temp_wflag, &Yflag, &Mflag, &Eflag, &nflag, &Nflag, &diflag, &Gflag, &duflag, &iflag,
solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, &ttcn3prep, solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, &ttcn3prep,
linkerlibraries, additionalObjects, linkerlibsearchpath, Vflag, Dflag, &Zflag, &Hflag, linkerlibraries, additionalObjects, linkerlibsearchpath, Vflag, Dflag, &Zflag, &Hflag,
&generatorCommandOutput, target_placement_list, Wflag, run_command_list, required_configs, &profiled_file_list, search_paths, n_search_paths, &makefileScript); &generatorCommandOutput, target_placement_list, Wflag, run_command_list, required_configs, &profiled_file_list, search_paths, n_search_paths, &makefileScript);
...@@ -5441,7 +5450,7 @@ int main(int argc, char *argv[]) ...@@ -5441,7 +5450,7 @@ int main(int argc, char *argv[])
file_list_file_name, Lflag, Zflag, Hflag, rflag ? sub_project_dirs : NULL, ttcn3_prep_includes, file_list_file_name, Lflag, Zflag, Hflag, rflag ? sub_project_dirs : NULL, ttcn3_prep_includes,
ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines, prep_undefines, csmode, quflag, dsflag, cxxcompiler, optlevel, optflags, dbflag, ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines, prep_undefines, csmode, quflag, dsflag, cxxcompiler, optlevel, optflags, dbflag,
drflag, dtflag, dxflag, djflag, doerflag, fxflag, doflag, gfflag, lnflag, isflag, asflag, wflag, Yflag, Mflag, Eflag, nflag, Nflag, diflag, drflag, dtflag, dxflag, djflag, doerflag, fxflag, doflag, gfflag, lnflag, isflag, asflag, wflag, Yflag, Mflag, Eflag, nflag, Nflag, diflag,
Gflag, duflag, solspeclibraries, sol8speclibraries, linuxspeclibraries, Gflag, duflag, iflag, solspeclibraries, sol8speclibraries, linuxspeclibraries,
freebsdspeclibraries, win32speclibraries, ttcn3prep, linkerlibraries, additionalObjects, freebsdspeclibraries, win32speclibraries, ttcn3prep, linkerlibraries, additionalObjects,
linkerlibsearchpath, generatorCommandOutput, target_placement_list); linkerlibsearchpath, generatorCommandOutput, target_placement_list);
if (makefileScript != NULL) { if (makefileScript != NULL) {
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "Ttcnstuff.hh" // at least for PortTypeBody::PortOperationMode_t #include "Ttcnstuff.hh" // at least for PortTypeBody::PortOperationMode_t
#include "Statement.hh" // for Statement::statementtype_t #include "Statement.hh" // for Statement::statementtype_t
#include "Attributes.hh" #include "Attributes.hh"
#include "../main.hh"
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
...@@ -451,7 +452,6 @@ none RETURN(NoneKeyword); ...@@ -451,7 +452,6 @@ none RETURN(NoneKeyword);
not RETURN(NotKeyword); not RETURN(NotKeyword);
not_a_number RETURN(NaNKeyword); not_a_number RETURN(NaNKeyword);
not4b RETURN(Not4bKeyword); not4b RETURN(Not4bKeyword);
now RETURN(NowKeyword);
nowait RETURN(NowaitKeyword); nowait RETURN(NowaitKeyword);
null RETURN(NullKeyword); null RETURN(NullKeyword);
objid RETURN(ObjectIdentifierKeyword); objid RETURN(ObjectIdentifierKeyword);
...@@ -475,7 +475,6 @@ procedure RETURN(ProcedureKeyword); ...@@ -475,7 +475,6 @@ procedure RETURN(ProcedureKeyword);
public RETURN(PublicKeyword); public RETURN(PublicKeyword);
raise RETURN_DOT(RaiseKeyword); raise RETURN_DOT(RaiseKeyword);
read RETURN_DOT(ReadKeyword); read RETURN_DOT(ReadKeyword);
realtime RETURN(RealtimeKeyword);
receive RETURN_DOT(ReceiveOpKeyword); receive RETURN_DOT(ReceiveOpKeyword);
record RETURN(RecordKeyword); record RETURN(RecordKeyword);
recursive RETURN(RecursiveKeyword); recursive RETURN(RecursiveKeyword);
...@@ -502,7 +501,6 @@ system RETURN(SystemKeyword); ...@@ -502,7 +501,6 @@ system RETURN(SystemKeyword);
template RETURN(TemplateKeyword); template RETURN(TemplateKeyword);
testcase RETURN(TestcaseKeyword); testcase RETURN(TestcaseKeyword);
timeout RETURN_DOT(TimeoutKeyword); timeout RETURN_DOT(TimeoutKeyword);
timestamp RETURN(TimestampKeyword);
timer RETURN(TimerKeyword); timer RETURN(TimerKeyword);
to RETURN(ToKeyword); to RETURN(ToKeyword);
trigger RETURN_DOT(TriggerOpKeyword); trigger RETURN_DOT(TriggerOpKeyword);
...@@ -521,6 +519,46 @@ with RETURN(WithKeyword); ...@@ -521,6 +519,46 @@ with RETURN(WithKeyword);
xor RETURN(XorKeyword); xor RETURN(XorKeyword);
xor4b RETURN(Xor4bKeyword); xor4b RETURN(Xor4bKeyword);
/* condition-based keywords
* (can be switched to identifiers with a command line option) */
now {
if (realtime_features) {
RETURN(NowKeyword);
}
else {
Location loc(infile, yylloc);
loc.warning("Keyword 'now' is treated as an identifier. Activate compiler "
"option '-I' to use real-time testing features.");
yylval.id = new Identifier(Identifier::ID_TTCN, string(yyleng, yytext));
RETURN_LVAL(IDentifier);
}
}
realtime {
if (realtime_features) {
RETURN(RealtimeKeyword);
}
else {
Location loc(infile, yylloc);
loc.warning("Keyword 'realtime' is treated as an identifier. Activate "
"compiler option '-I' to use real-time testing features.");
yylval.id = new Identifier(Identifier::ID_TTCN, string(yyleng, yytext));
RETURN_LVAL(IDentifier);
}
}
timestamp {
if (realtime_features) {
RETURN(TimestampKeyword);
}
else {
Location loc(infile, yylloc);
loc.warning("Keyword 'timestamp' is treated as an identifier. Activate "
"compiler option '-I' to use real-time testing features.");
yylval.id = new Identifier(Identifier::ID_TTCN, string(yyleng, yytext));
RETURN_LVAL(IDentifier);
}
}
/* modifier keywords */ /* modifier keywords */
"@nocase" RETURN(NocaseKeyword); "@nocase" RETURN(NocaseKeyword);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
ttcn3_makefilegen \- Makefile Generator ttcn3_makefilegen \- Makefile Generator
.SH SYNOPSIS .SH SYNOPSIS
.B ttcn3_makefilegen .B ttcn3_makefilegen
.RB "[\| " \-acdEfglMnpRsSw " \|]" .RB "[\| " \-acdEfgilMnpRsSw " \|]"
.RB "[\| " \-e .RB "[\| " \-e
.IR " ETS_name" " \|]" .IR " ETS_name" " \|]"
.RB "[\| " \-o .RB "[\| " \-o
...@@ -68,6 +68,9 @@ only. The resulting Makefile will be smaller and less redundant. It ...@@ -68,6 +68,9 @@ only. The resulting Makefile will be smaller and less redundant. It
exploits the pattern substitution features of GNU make, which may cause exploits the pattern substitution features of GNU make, which may cause
syntax errors with other versions of make. syntax errors with other versions of make.
.TP .TP
.B \-i
Enables real-time testing features.
.TP
.BI \-I " path" .BI \-I " path"
Adds the path to the list of search paths. Adds the path to the list of search paths.
.I path .I path
......
...@@ -1269,7 +1269,8 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char* tpdName, c ...@@ -1269,7 +1269,8 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char* tpdName, c
char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag, char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag,
boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag, boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean *p_Eflag, boolean* p_nflag, boolean* p_Nflag, boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean *p_Eflag, boolean* p_nflag, boolean* p_Nflag,
boolean* p_diflag, boolean* p_enable_legacy_encoding, boolean* p_disable_userinfo, struct string_list* solspeclibs, struct string_list* sol8speclibs, boolean* p_diflag, boolean* p_enable_legacy_encoding, boolean* p_disable_userinfo, boolean* p_realtime_features,
struct string_list* solspeclibs, struct string_list* sol8speclibs,
struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep, struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep,
struct string_list* linkerlibs, struct string_list* additionalObjects, struct string_list* linkerlibsearchp, boolean Vflag, boolean Dflag, struct string_list* linkerlibs, struct string_list* additionalObjects, struct string_list* linkerlibsearchp, boolean Vflag, boolean Dflag,
boolean *p_Zflag, boolean *p_Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir, boolean *p_Zflag, boolean *p_Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir,
...@@ -1289,7 +1290,8 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg, ...@@ -1289,7 +1290,8 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag, char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag,
boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag, boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean* p_Eflag, boolean* p_nflag, boolean* p_Nflag, boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean* p_Eflag, boolean* p_nflag, boolean* p_Nflag,
boolean* p_diflag, boolean* p_enable_legacy_encoding, boolean* p_disable_userinfo, struct string_list* solspeclibs, struct string_list* sol8speclibs, boolean* p_diflag, boolean* p_enable_legacy_encoding, boolean* p_disable_userinfo, boolean* p_realtime_features,
struct string_list* solspeclibs, struct string_list* sol8speclibs,
struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep, struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep,
string_list* linkerlibs, string_list* additionalObjects, string_list* linkerlibsearchp, boolean Vflag, boolean Dflag, boolean *p_Zflag, string_list* linkerlibs, string_list* additionalObjects, string_list* linkerlibsearchp, boolean Vflag, boolean Dflag, boolean *p_Zflag,
boolean *p_Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir, boolean *p_Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir,
...@@ -1319,7 +1321,8 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg, ...@@ -1319,7 +1321,8 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
optlevel, optflags, p_dbflag, p_drflag, p_dtflag, p_dxflag, p_djflag, optlevel, optflags, p_dbflag, p_drflag, p_dtflag, p_dxflag, p_djflag,
p_doerflag, p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag, p_doerflag, p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag,
p_asflag, p_swflag, p_Yflag, p_Mflag, p_Eflag, p_nflag, p_Nflag, p_asflag, p_swflag, p_Yflag, p_Mflag, p_Eflag, p_nflag, p_Nflag,
p_diflag, p_enable_legacy_encoding, p_disable_userinfo, solspeclibs, sol8speclibs, p_diflag, p_enable_legacy_encoding, p_disable_userinfo,
p_realtime_features, solspeclibs, sol8speclibs,
linuxspeclibs, freebsdspeclibs, win32speclibs, ttcn3prep, linuxspeclibs, freebsdspeclibs, win32speclibs, ttcn3prep,
linkerlibs, additionalObjects, linkerlibsearchp, Vflag, Dflag, p_Zflag, linkerlibs, additionalObjects, linkerlibsearchp, Vflag, Dflag, p_Zflag,
p_Hflag, generatorCommandOutput, target_placement_list, prefix_workdir, p_Hflag, generatorCommandOutput, target_placement_list, prefix_workdir,
...@@ -1348,7 +1351,8 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg, ...@@ -1348,7 +1351,8 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
optlevel, optflags, p_dbflag, p_drflag, p_dtflag, p_dxflag, p_djflag, optlevel, optflags, p_dbflag, p_drflag, p_dtflag, p_dxflag, p_djflag,
p_doerflag, p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag, p_doerflag, p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag,
p_asflag, p_swflag, p_Yflag, p_Mflag, p_Eflag, p_nflag, p_Nflag, p_asflag, p_swflag, p_Yflag, p_Mflag, p_Eflag, p_nflag, p_Nflag,
p_diflag, p_enable_legacy_encoding, p_disable_userinfo, solspeclibs, sol8speclibs, p_diflag, p_enable_legacy_encoding, p_disable_userinfo,
p_realtime_features, solspeclibs, sol8speclibs,
linuxspeclibs, freebsdspeclibs, win32speclibs, ttcn3prep, linuxspeclibs, freebsdspeclibs, win32speclibs, ttcn3prep,
linkerlibs, additionalObjects, linkerlibsearchp, Vflag, Dflag, p_Zflag, linkerlibs, additionalObjects, linkerlibsearchp, Vflag, Dflag, p_Zflag,
p_Hflag, generatorCommandOutput, target_placement_list, prefix_workdir, p_Hflag, generatorCommandOutput, target_placement_list, prefix_workdir,
...@@ -1452,7 +1456,8 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c ...@@ -1452,7 +1456,8 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag, char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag,
boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag, boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean* p_Eflag, boolean* p_nflag, boolean* p_Nflag, boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean* p_Eflag, boolean* p_nflag, boolean* p_Nflag,
boolean* p_diflag, boolean* p_enable_legacy_encoding, boolean* p_disable_userinfo, struct string_list* solspeclibs, struct string_list* sol8speclibs, boolean* p_diflag, boolean* p_enable_legacy_encoding, boolean* p_disable_userinfo, boolean* p_realtime_features,
struct string_list* solspeclibs, struct string_list* sol8speclibs,
struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep, struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep,
string_list* linkerlibs, string_list* additionalObjects, string_list* linkerlibsearchp, boolean Vflag, boolean Dflag, boolean *p_Zflag, string_list* linkerlibs, string_list* additionalObjects, string_list* linkerlibsearchp, boolean Vflag, boolean Dflag, boolean *p_Zflag,
boolean *p_Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir, boolean *p_Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir,
...@@ -2060,6 +2065,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c ...@@ -2060,6 +2065,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
xsdbool2boolean(xpathCtx, actcfg, "ignoreUntaggedOnTopLevelUnion", p_Nflag); xsdbool2boolean(xpathCtx, actcfg, "ignoreUntaggedOnTopLevelUnion", p_Nflag);
xsdbool2boolean(xpathCtx, actcfg, "enableLegacyEncoding", p_enable_legacy_encoding); xsdbool2boolean(xpathCtx, actcfg, "enableLegacyEncoding", p_enable_legacy_encoding);
xsdbool2boolean(xpathCtx, actcfg, "disableUserInformation", p_disable_userinfo); xsdbool2boolean(xpathCtx, actcfg, "disableUserInformation", p_disable_userinfo);
xsdbool2boolean(xpathCtx, actcfg, "enableRealtimeTesting", p_realtime_features);
projDesc = projGenHelper.getTargetOfProject(*p_project_name); projDesc = projGenHelper.getTargetOfProject(*p_project_name);
if (projDesc) projDesc->setLinkingStrategy(*p_lflag); if (projDesc) projDesc->setLinkingStrategy(*p_lflag);
...@@ -2954,6 +2960,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c ...@@ -2954,6 +2960,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
my_diflag = *p_diflag, my_diflag = *p_diflag,
my_duflag = 0; my_duflag = 0;
boolean my_enable_legacy_encoding = 0; boolean my_enable_legacy_encoding = 0;
boolean my_realtime_features = 0;
char *my_ets = NULL; char *my_ets = NULL;
char *my_proj_name = NULL; char *my_proj_name = NULL;
...@@ -3006,7 +3013,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c ...@@ -3006,7 +3013,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
&my_quflag, &my_dsflag, cxxcompiler, optlevel, optflags, &my_dbflag, &my_drflag, &my_quflag, &my_dsflag, cxxcompiler, optlevel, optflags, &my_dbflag, &my_drflag,
&my_dtflag, &my_dxflag, &my_djflag, &my_doerflag, &my_fxflag, &my_doflag, &my_dtflag, &my_dxflag, &my_djflag, &my_doerflag, &my_fxflag, &my_doflag,
&my_gfflag, &my_lnflag, &my_isflag, &my_asflag, &my_swflag, &my_Yflag, &my_Mflag, &my_Eflag, &my_nflag, &my_Nflag, &my_diflag, &my_gfflag, &my_lnflag, &my_isflag, &my_asflag, &my_swflag, &my_Yflag, &my_Mflag, &my_Eflag, &my_nflag, &my_Nflag, &my_diflag,
&my_enable_legacy_encoding, &my_duflag, solspeclibs, sol8speclibs, linuxspeclibs, freebsdspeclibs, win32speclibs, &my_enable_legacy_encoding, &my_duflag, &my_realtime_features, solspeclibs, sol8speclibs, linuxspeclibs, freebsdspeclibs, win32speclibs,
ttcn3prep, linkerlibs, additionalObjects, linkerlibsearchp, Vflag, FALSE, &my_Zflag, ttcn3prep, linkerlibs, additionalObjects, linkerlibsearchp, Vflag, FALSE, &my_Zflag,
&my_Hflag, NULL, NULL, prefix_workdir, run_command_list, seen_tpd_files, required_configs, profiled_file_list, &my_Hflag, NULL, NULL, prefix_workdir, run_command_list, seen_tpd_files, required_configs, profiled_file_list,
search_paths, n_search_paths, makefileScript, all_configs); search_paths, n_search_paths, makefileScript, all_configs);
......
...@@ -287,7 +287,8 @@ tpd_result process_tpd(const char **p_tpd_name, const char *actcfg, ...@@ -287,7 +287,8 @@ tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
boolean *disablejson, boolean *disableoer, boolean *forcexerinasn, boolean *defaultasomit, boolean *gccmessageformat, boolean *disablejson, boolean *disableoer, boolean *forcexerinasn, boolean *defaultasomit, boolean *gccmessageformat,
boolean *linenumber, boolean *includesourceinfo, boolean *addsourcelineinfo, boolean *suppresswarnings, boolean *linenumber, boolean *includesourceinfo, boolean *addsourcelineinfo, boolean *suppresswarnings,
boolean *outparamboundness, boolean *omit_in_value_list, boolean *warnings_for_bad_variants, boolean *activate_debugger, boolean* ignore_untagged_union, boolean *outparamboundness, boolean *omit_in_value_list, boolean *warnings_for_bad_variants, boolean *activate_debugger, boolean* ignore_untagged_union,
boolean *disable_predef_exp_folder, boolean* enable_legacy_encoding, boolean* disable_userinfo, struct string_list* solspeclibs, struct string_list* sol8speclibs, boolean *disable_predef_exp_folder, boolean* enable_legacy_encoding, boolean* disable_userinfo, boolean* realtime_features,
struct string_list* solspeclibs, struct string_list* sol8speclibs,
struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs,
char** ttcn3preprocessor, struct string_list* linkerlibs, struct string_list* additionalObjects, struct string_list* linkerlibsearchpath, boolean Vflag, boolean Dflag, char** ttcn3preprocessor, struct string_list* linkerlibs, struct string_list* additionalObjects, struct string_list* linkerlibsearchpath, boolean Vflag, boolean Dflag,
boolean *Zflag, boolean *Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir, struct string2_list* run_command_list, boolean *Zflag, boolean *Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir, struct string2_list* run_command_list,
......
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
<xs:element name="quietly" minOccurs="0" maxOccurs="1" type="xs:boolean" /> <xs:element name="quietly" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="enableLegacyEncoding" minOccurs="0" maxOccurs="1" type="xs:boolean" /> <xs:element name="enableLegacyEncoding" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="disableUserInformation" minOccurs="0" maxOccurs="1" type="xs:boolean" /> <xs:element name="disableUserInformation" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="enableRealtimeTesting" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="namingRules" minOccurs="0" maxOccurs="1" type="xs:normalizedString" /> <xs:element name="namingRules" minOccurs="0" maxOccurs="1" type="xs:normalizedString" />
<xs:element name="disableSubtypeChecking" minOccurs="0" maxOccurs="1" type="xs:boolean" /> <xs:element name="disableSubtypeChecking" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="CxxCompiler" minOccurs="0" maxOccurs="1" type="xs:normalizedString" /> <xs:element name="CxxCompiler" minOccurs="0" maxOccurs="1" type="xs:normalizedString" />
...